const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Wsunfl8K.js","assets/index-Crdx5q1r.css","assets/SettingsLayout-COW8vA2s.js","assets/SettingsLayout-c_cbNCWy.css","assets/settingsGeneral-DVUJ7gUe.js","assets/settingsGeneral-C43bNIJ7.css"])))=>i.map(i=>d[i]);
var xfe=Object.defineProperty;var Sfe=(t,e,n)=>e in t?xfe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var op=(t,e,n)=>Sfe(t,typeof e!="symbol"?e+"":e,n);function wfe(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var Rp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sw(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var uR={exports:{}},Z2={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var dF;function Cfe(){if(dF)return Z2;dF=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,i){var o=null;if(i!==void 0&&(o=""+i),s.key!==void 0&&(o=""+s.key),"key"in s){i={};for(var a in s)a!=="key"&&(i[a]=s[a])}else i=s;return s=i.ref,{$$typeof:t,type:r,key:o,ref:s!==void 0?s:null,props:i}}return Z2.Fragment=e,Z2.jsx=n,Z2.jsxs=n,Z2}var fF;function Efe(){return fF||(fF=1,uR.exports=Cfe()),uR.exports}var g=Efe(),dR={exports:{}},J2={},fR={exports:{}},pR={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var pF;function Mfe(){return pF||(pF=1,(function(t){function e(H,B){var V=H.length;H.push(B);e:for(;0<V;){var Y=V-1>>>1,G=H[Y];if(0<s(G,B))H[Y]=B,H[V]=G,V=Y;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var B=H[0],V=H.pop();if(V!==B){H[0]=V;e:for(var Y=0,G=H.length,W=G>>>1;Y<W;){var Z=2*(Y+1)-1,Q=H[Z],X=Z+1,re=H[X];if(0>s(Q,V))X<G&&0>s(re,Q)?(H[Y]=re,H[X]=V,Y=X):(H[Y]=Q,H[Z]=V,Y=Z);else if(X<G&&0>s(re,V))H[Y]=re,H[X]=V,Y=X;else break e}}return B}function s(H,B){var V=H.sortIndex-B.sortIndex;return V!==0?V:H.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,p=3,m=!1,v=!1,y=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function D(H){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=H)r(c),B.sortIndex=B.expirationTime,e(l,B);else break;B=n(c)}}function T(H){if(y=!1,D(H),!v)if(n(l)!==null)v=!0,A||(A=!0,L());else{var B=n(c);B!==null&&q(T,B.startTime-H)}}var A=!1,_=-1,R=5,N=-1;function I(){return x?!0:!(t.unstable_now()-N<R)}function $(){if(x=!1,A){var H=t.unstable_now();N=H;var B=!0;try{e:{v=!1,y&&(y=!1,C(_),_=-1),m=!0;var V=p;try{t:{for(D(H),f=n(l);f!==null&&!(f.expirationTime>H&&I());){var Y=f.callback;if(typeof Y=="function"){f.callback=null,p=f.priorityLevel;var G=Y(f.expirationTime<=H);if(H=t.unstable_now(),typeof G=="function"){f.callback=G,D(H),B=!0;break t}f===n(l)&&r(l),D(H)}else r(l);f=n(l)}if(f!==null)B=!0;else{var W=n(c);W!==null&&q(T,W.startTime-H),B=!1}}break e}finally{f=null,p=V,m=!1}B=void 0}}finally{B?L():A=!1}}}var L;if(typeof E=="function")L=function(){E($)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,F=z.port2;z.port1.onmessage=$,L=function(){F.postMessage(null)}}else L=function(){w($,0)};function q(H,B){_=w(function(){H(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_next=function(H){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var V=p;p=B;try{return H()}finally{p=V}},t.unstable_requestPaint=function(){x=!0},t.unstable_runWithPriority=function(H,B){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var V=p;p=H;try{return B()}finally{p=V}},t.unstable_scheduleCallback=function(H,B,V){var Y=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?Y+V:Y):V=Y,H){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=V+G,H={id:d++,callback:B,priorityLevel:H,startTime:V,expirationTime:G,sortIndex:-1},V>Y?(H.sortIndex=V,e(c,H),n(l)===null&&H===n(c)&&(y?(C(_),_=-1):y=!0,q(T,V-Y))):(H.sortIndex=G,e(l,H),v||m||(v=!0,A||(A=!0,L()))),H},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(H){var B=p;return function(){var V=p;p=B;try{return H.apply(this,arguments)}finally{p=V}}}})(pR)),pR}var hF;function Dfe(){return hF||(hF=1,fR.exports=Mfe()),fR.exports}var hR={exports:{}},dn={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mF;function kfe(){if(mF)return dn;mF=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m(W){return W===null||typeof W!="object"?null:(W=p&&W[p]||W["@@iterator"],typeof W=="function"?W:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,x={};function w(W,Z,Q){this.props=W,this.context=Z,this.refs=x,this.updater=Q||v}w.prototype.isReactComponent={},w.prototype.setState=function(W,Z){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,Z,"setState")},w.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function C(){}C.prototype=w.prototype;function E(W,Z,Q){this.props=W,this.context=Z,this.refs=x,this.updater=Q||v}var D=E.prototype=new C;D.constructor=E,y(D,w.prototype),D.isPureReactComponent=!0;var T=Array.isArray;function A(){}var _={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function N(W,Z,Q){var X=Q.ref;return{$$typeof:t,type:W,key:Z,ref:X!==void 0?X:null,props:Q}}function I(W,Z){return N(W.type,Z,W.props)}function $(W){return typeof W=="object"&&W!==null&&W.$$typeof===t}function L(W){var Z={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(Q){return Z[Q]})}var z=/\/+/g;function F(W,Z){return typeof W=="object"&&W!==null&&W.key!=null?L(""+W.key):Z.toString(36)}function q(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(A,A):(W.status="pending",W.then(function(Z){W.status==="pending"&&(W.status="fulfilled",W.value=Z)},function(Z){W.status==="pending"&&(W.status="rejected",W.reason=Z)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function H(W,Z,Q,X,re){var ne=typeof W;(ne==="undefined"||ne==="boolean")&&(W=null);var ee=!1;if(W===null)ee=!0;else switch(ne){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(W.$$typeof){case t:case e:ee=!0;break;case d:return ee=W._init,H(ee(W._payload),Z,Q,X,re)}}if(ee)return re=re(W),ee=X===""?"."+F(W,0):X,T(re)?(Q="",ee!=null&&(Q=ee.replace(z,"$&/")+"/"),H(re,Z,Q,"",function(ue){return ue})):re!=null&&($(re)&&(re=I(re,Q+(re.key==null||W&&W.key===re.key?"":(""+re.key).replace(z,"$&/")+"/")+ee)),Z.push(re)),1;ee=0;var oe=X===""?".":X+":";if(T(W))for(var ce=0;ce<W.length;ce++)X=W[ce],ne=oe+F(X,ce),ee+=H(X,Z,Q,ne,re);else if(ce=m(W),typeof ce=="function")for(W=ce.call(W),ce=0;!(X=W.next()).done;)X=X.value,ne=oe+F(X,ce++),ee+=H(X,Z,Q,ne,re);else if(ne==="object"){if(typeof W.then=="function")return H(q(W),Z,Q,X,re);throw Z=String(W),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ee}function B(W,Z,Q){if(W==null)return W;var X=[],re=0;return H(W,X,"","",function(ne){return Z.call(Q,ne,re++)}),X}function V(W){if(W._status===-1){var Z=W._result;Z=Z(),Z.then(function(Q){(W._status===0||W._status===-1)&&(W._status=1,W._result=Q)},function(Q){(W._status===0||W._status===-1)&&(W._status=2,W._result=Q)}),W._status===-1&&(W._status=0,W._result=Z)}if(W._status===1)return W._result.default;throw W._result}var Y=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},G={map:B,forEach:function(W,Z,Q){B(W,function(){Z.apply(this,arguments)},Q)},count:function(W){var Z=0;return B(W,function(){Z++}),Z},toArray:function(W){return B(W,function(Z){return Z})||[]},only:function(W){if(!$(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return dn.Activity=f,dn.Children=G,dn.Component=w,dn.Fragment=n,dn.Profiler=s,dn.PureComponent=E,dn.StrictMode=r,dn.Suspense=l,dn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,dn.__COMPILER_RUNTIME={__proto__:null,c:function(W){return _.H.useMemoCache(W)}},dn.cache=function(W){return function(){return W.apply(null,arguments)}},dn.cacheSignal=function(){return null},dn.cloneElement=function(W,Z,Q){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var X=y({},W.props),re=W.key;if(Z!=null)for(ne in Z.key!==void 0&&(re=""+Z.key),Z)!R.call(Z,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&Z.ref===void 0||(X[ne]=Z[ne]);var ne=arguments.length-2;if(ne===1)X.children=Q;else if(1<ne){for(var ee=Array(ne),oe=0;oe<ne;oe++)ee[oe]=arguments[oe+2];X.children=ee}return N(W.type,re,X)},dn.createContext=function(W){return W={$$typeof:o,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:i,_context:W},W},dn.createElement=function(W,Z,Q){var X,re={},ne=null;if(Z!=null)for(X in Z.key!==void 0&&(ne=""+Z.key),Z)R.call(Z,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(re[X]=Z[X]);var ee=arguments.length-2;if(ee===1)re.children=Q;else if(1<ee){for(var oe=Array(ee),ce=0;ce<ee;ce++)oe[ce]=arguments[ce+2];re.children=oe}if(W&&W.defaultProps)for(X in ee=W.defaultProps,ee)re[X]===void 0&&(re[X]=ee[X]);return N(W,ne,re)},dn.createRef=function(){return{current:null}},dn.forwardRef=function(W){return{$$typeof:a,render:W}},dn.isValidElement=$,dn.lazy=function(W){return{$$typeof:d,_payload:{_status:-1,_result:W},_init:V}},dn.memo=function(W,Z){return{$$typeof:c,type:W,compare:Z===void 0?null:Z}},dn.startTransition=function(W){var Z=_.T,Q={};_.T=Q;try{var X=W(),re=_.S;re!==null&&re(Q,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(A,Y)}catch(ne){Y(ne)}finally{Z!==null&&Q.types!==null&&(Z.types=Q.types),_.T=Z}},dn.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},dn.use=function(W){return _.H.use(W)},dn.useActionState=function(W,Z,Q){return _.H.useActionState(W,Z,Q)},dn.useCallback=function(W,Z){return _.H.useCallback(W,Z)},dn.useContext=function(W){return _.H.useContext(W)},dn.useDebugValue=function(){},dn.useDeferredValue=function(W,Z){return _.H.useDeferredValue(W,Z)},dn.useEffect=function(W,Z){return _.H.useEffect(W,Z)},dn.useEffectEvent=function(W){return _.H.useEffectEvent(W)},dn.useId=function(){return _.H.useId()},dn.useImperativeHandle=function(W,Z,Q){return _.H.useImperativeHandle(W,Z,Q)},dn.useInsertionEffect=function(W,Z){return _.H.useInsertionEffect(W,Z)},dn.useLayoutEffect=function(W,Z){return _.H.useLayoutEffect(W,Z)},dn.useMemo=function(W,Z){return _.H.useMemo(W,Z)},dn.useOptimistic=function(W,Z){return _.H.useOptimistic(W,Z)},dn.useReducer=function(W,Z,Q){return _.H.useReducer(W,Z,Q)},dn.useRef=function(W){return _.H.useRef(W)},dn.useState=function(W){return _.H.useState(W)},dn.useSyncExternalStore=function(W,Z,Q){return _.H.useSyncExternalStore(W,Z,Q)},dn.useTransition=function(){return _.H.useTransition()},dn.version="19.2.3",dn}var gF;function vi(){return gF||(gF=1,hR.exports=kfe()),hR.exports}var mR={exports:{}},no={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vF;function Tfe(){if(vF)return no;vF=1;var t=vi();function e(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function i(l,c,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:f==null?null:""+f,children:l,containerInfo:c,implementation:d}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return no.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,no.createPortal=function(l,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(e(299));return i(l,c,null,d)},no.flushSync=function(l){var c=o.T,d=r.p;try{if(o.T=null,r.p=2,l)return l()}finally{o.T=c,r.p=d,r.d.f()}},no.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(l,c))},no.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},no.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;d==="style"?r.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:m}):d==="script"&&r.d.X(l,{crossOrigin:f,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},no.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var d=a(c.as,c.crossOrigin);r.d.M(l,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(l)},no.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin);r.d.L(l,d,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},no.preloadModule=function(l,c){if(typeof l=="string")if(c){var d=a(c.as,c.crossOrigin);r.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(l)},no.requestFormReset=function(l){r.d.r(l)},no.unstable_batchedUpdates=function(l,c){return l(c)},no.useFormState=function(l,c,d){return o.H.useFormState(l,c,d)},no.useFormStatus=function(){return o.H.useHostTransitionStatus()},no.version="19.2.3",no}var yF;function qX(){if(yF)return mR.exports;yF=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),mR.exports=Tfe(),mR.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var bF;function Afe(){if(bF)return J2;bF=1;var t=Dfe(),e=vi(),n=qX();function r(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function i(u){var h=u,b=u;if(u.alternate)for(;h.return;)h=h.return;else{u=h;do h=u,(h.flags&4098)!==0&&(b=h.return),u=h.return;while(u)}return h.tag===3?b:null}function o(u){if(u.tag===13){var h=u.memoizedState;if(h===null&&(u=u.alternate,u!==null&&(h=u.memoizedState)),h!==null)return h.dehydrated}return null}function a(u){if(u.tag===31){var h=u.memoizedState;if(h===null&&(u=u.alternate,u!==null&&(h=u.memoizedState)),h!==null)return h.dehydrated}return null}function l(u){if(i(u)!==u)throw Error(r(188))}function c(u){var h=u.alternate;if(!h){if(h=i(u),h===null)throw Error(r(188));return h!==u?null:u}for(var b=u,M=h;;){var j=b.return;if(j===null)break;var U=j.alternate;if(U===null){if(M=j.return,M!==null){b=M;continue}break}if(j.child===U.child){for(U=j.child;U;){if(U===b)return l(j),u;if(U===M)return l(j),h;U=U.sibling}throw Error(r(188))}if(b.return!==M.return)b=j,M=U;else{for(var J=!1,se=j.child;se;){if(se===b){J=!0,b=j,M=U;break}if(se===M){J=!0,M=j,b=U;break}se=se.sibling}if(!J){for(se=U.child;se;){if(se===b){J=!0,b=U,M=j;break}if(se===M){J=!0,M=U,b=j;break}se=se.sibling}if(!J)throw Error(r(189))}}if(b.alternate!==M)throw Error(r(190))}if(b.tag!==3)throw Error(r(188));return b.stateNode.current===b?u:h}function d(u){var h=u.tag;if(h===5||h===26||h===27||h===6)return u;for(u=u.child;u!==null;){if(h=d(u),h!==null)return h;u=u.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function L(u){return u===null||typeof u!="object"?null:(u=$&&u[$]||u["@@iterator"],typeof u=="function"?u:null)}var z=Symbol.for("react.client.reference");function F(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===z?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case y:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case T:return"Suspense";case A:return"SuspenseList";case N:return"Activity"}if(typeof u=="object")switch(u.$$typeof){case v:return"Portal";case E:return u.displayName||"Context";case C:return(u._context.displayName||"Context")+".Consumer";case D:var h=u.render;return u=u.displayName,u||(u=h.displayName||h.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case _:return h=u.displayName||null,h!==null?h:F(u.type)||"Memo";case R:h=u._payload,u=u._init;try{return F(u(h))}catch{}}return null}var q=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},Y=[],G=-1;function W(u){return{current:u}}function Z(u){0>G||(u.current=Y[G],Y[G]=null,G--)}function Q(u,h){G++,Y[G]=u.current,u.current=h}var X=W(null),re=W(null),ne=W(null),ee=W(null);function oe(u,h){switch(Q(ne,h),Q(re,u),Q(X,null),h.nodeType){case 9:case 11:u=(u=h.documentElement)&&(u=u.namespaceURI)?qm(u):0;break;default:if(u=h.tagName,h=h.namespaceURI)h=qm(h),u=eo(h,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}Z(X),Q(X,u)}function ce(){Z(X),Z(re),Z(ne)}function ue(u){u.memoizedState!==null&&Q(ee,u);var h=X.current,b=eo(h,u.type);h!==b&&(Q(re,u),Q(X,b))}function pe(u){re.current===u&&(Z(X),Z(re)),ee.current===u&&(Z(ee),rp._currentValue=V)}var de,me;function Se(u){if(de===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);de=h&&h[1]||"",me=-1<b.stack.indexOf(`
    at`)?" (<anonymous>)":-1<b.stack.indexOf("@")?"@unknown:0:0":""}return`
`+de+u+me}var De=!1;function Ae(u,h){if(!u||De)return"";De=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var M={DetermineComponentFrameRoot:function(){try{if(h){var Ze=function(){throw Error()};if(Object.defineProperty(Ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ze,[])}catch(ze){var Ie=ze}Reflect.construct(u,[],Ze)}else{try{Ze.call()}catch(ze){Ie=ze}u.call(Ze.prototype)}}else{try{throw Error()}catch(ze){Ie=ze}(Ze=u())&&typeof Ze.catch=="function"&&Ze.catch(function(){})}}catch(ze){if(ze&&Ie&&typeof ze.stack=="string")return[ze.stack,Ie.stack]}return[null,null]}};M.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(M.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(M.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var U=M.DetermineComponentFrameRoot(),J=U[0],se=U[1];if(J&&se){var ge=J.split(`
`),Re=se.split(`
`);for(j=M=0;M<ge.length&&!ge[M].includes("DetermineComponentFrameRoot");)M++;for(;j<Re.length&&!Re[j].includes("DetermineComponentFrameRoot");)j++;if(M===ge.length||j===Re.length)for(M=ge.length-1,j=Re.length-1;1<=M&&0<=j&&ge[M]!==Re[j];)j--;for(;1<=M&&0<=j;M--,j--)if(ge[M]!==Re[j]){if(M!==1||j!==1)do if(M--,j--,0>j||ge[M]!==Re[j]){var Ge=`
`+ge[M].replace(" at new "," at ");return u.displayName&&Ge.includes("<anonymous>")&&(Ge=Ge.replace("<anonymous>",u.displayName)),Ge}while(1<=M&&0<=j);break}}}finally{De=!1,Error.prepareStackTrace=b}return(b=u?u.displayName||u.name:"")?Se(b):""}function fe(u,h){switch(u.tag){case 26:case 27:case 5:return Se(u.type);case 16:return Se("Lazy");case 13:return u.child!==h&&h!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return Ae(u.type,!1);case 11:return Ae(u.type.render,!1);case 1:return Ae(u.type,!0);case 31:return Se("Activity");default:return""}}function Te(u){try{var h="",b=null;do h+=fe(u,b),b=u,u=u.return;while(u);return h}catch(M){return`
Error generating stack: `+M.message+`
`+M.stack}}var Ne=Object.prototype.hasOwnProperty,Ue=t.unstable_scheduleCallback,rt=t.unstable_cancelCallback,ot=t.unstable_shouldYield,Je=t.unstable_requestPaint,je=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Le=t.unstable_ImmediatePriority,_e=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,ut=t.unstable_LowPriority,lt=t.unstable_IdlePriority,At=t.log,jt=t.unstable_setDisableYieldValue,Ot=null,Pt=null;function Rt(u){if(typeof At=="function"&&jt(u),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(Ot,u)}catch{}}var Nt=Math.clz32?Math.clz32:hn,Fn=Math.log,pn=Math.LN2;function hn(u){return u>>>=0,u===0?32:31-(Fn(u)/pn|0)|0}var On=256,Vt=262144,an=4194304;function xn(u){var h=u&42;if(h!==0)return h;switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return u&261888;case 262144:case 524288:case 1048576:case 2097152:return u&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function Ts(u,h,b){var M=u.pendingLanes;if(M===0)return 0;var j=0,U=u.suspendedLanes,J=u.pingedLanes;u=u.warmLanes;var se=M&134217727;return se!==0?(M=se&~U,M!==0?j=xn(M):(J&=se,J!==0?j=xn(J):b||(b=se&~u,b!==0&&(j=xn(b))))):(se=M&~U,se!==0?j=xn(se):J!==0?j=xn(J):b||(b=M&~u,b!==0&&(j=xn(b)))),j===0?0:h!==0&&h!==j&&(h&U)===0&&(U=j&-j,b=h&-h,U>=b||U===32&&(b&4194048)!==0)?h:j}function Hr(u,h){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&h)===0}function As(u,h){switch(u){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rr(){var u=an;return an<<=1,(an&62914560)===0&&(an=4194304),u}function ft(u){for(var h=[],b=0;31>b;b++)h.push(u);return h}function xt(u,h){u.pendingLanes|=h,h!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function st(u,h,b,M,j,U){var J=u.pendingLanes;u.pendingLanes=b,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=b,u.entangledLanes&=b,u.errorRecoveryDisabledLanes&=b,u.shellSuspendCounter=0;var se=u.entanglements,ge=u.expirationTimes,Re=u.hiddenUpdates;for(b=J&~b;0<b;){var Ge=31-Nt(b),Ze=1<<Ge;se[Ge]=0,ge[Ge]=-1;var Ie=Re[Ge];if(Ie!==null)for(Re[Ge]=null,Ge=0;Ge<Ie.length;Ge++){var ze=Ie[Ge];ze!==null&&(ze.lane&=-536870913)}b&=~Ze}M!==0&&it(u,M,0),U!==0&&j===0&&u.tag!==0&&(u.suspendedLanes|=U&~(J&~h))}function it(u,h,b){u.pendingLanes|=h,u.suspendedLanes&=~h;var M=31-Nt(h);u.entangledLanes|=h,u.entanglements[M]=u.entanglements[M]|1073741824|b&261930}function ht(u,h){var b=u.entangledLanes|=h;for(u=u.entanglements;b;){var M=31-Nt(b),j=1<<M;j&h|u[M]&h&&(u[M]|=h),b&=~j}}function kt(u,h){var b=h&-h;return b=(b&42)!==0?1:Hn(b),(b&(u.suspendedLanes|h))!==0?0:b}function Hn(u){switch(u){case 2:u=1;break;case 8:u=4;break;case 32:u=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:u=128;break;case 268435456:u=134217728;break;default:u=0}return u}function qr(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function Gn(){var u=B.p;return u!==0?u:(u=window.event,u===void 0?32:SM(u.type))}function Bt(u,h){var b=B.p;try{return B.p=u,h()}finally{B.p=b}}var Vn=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Vn,Kn="__reactProps$"+Vn,Nr="__reactContainer$"+Vn,Ci="__reactEvents$"+Vn,el="__reactListeners$"+Vn,Bi="__reactHandles$"+Vn,ho="__reactResources$"+Vn,ri="__reactMarker$"+Vn;function tl(u){delete u[Wt],delete u[Kn],delete u[Ci],delete u[el],delete u[Bi]}function mo(u){var h=u[Wt];if(h)return h;for(var b=u.parentNode;b;){if(h=b[Nr]||b[Wt]){if(b=h.alternate,h.child!==null||b!==null&&b.child!==null)for(u=sM(u);u!==null;){if(b=u[Wt])return b;u=sM(u)}return h}u=b,b=u.parentNode}return null}function si(u){if(u=u[Wt]||u[Nr]){var h=u.tag;if(h===5||h===6||h===13||h===31||h===26||h===27||h===3)return u}return null}function Go(u){var h=u.tag;if(h===5||h===26||h===27||h===6)return u.stateNode;throw Error(r(33))}function ii(u){var h=u[ho];return h||(h=u[ho]={hoistableStyles:new Map,hoistableScripts:new Map}),h}function Tr(u){u[ri]=!0}var $l=new Set,zl={};function Ei(u,h){Hi(u,h),Hi(u+"Capture",h)}function Hi(u,h){for(zl[u]=h,u=0;u<h.length;u++)$l.add(h[u])}var Gu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),gC={},vC={};function aO(u){return Ne.call(vC,u)?!0:Ne.call(gC,u)?!1:Gu.test(u)?vC[u]=!0:(gC[u]=!0,!1)}function Mv(u,h,b){if(aO(h))if(b===null)u.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":u.removeAttribute(h);return;case"boolean":var M=h.toLowerCase().slice(0,5);if(M!=="data-"&&M!=="aria-"){u.removeAttribute(h);return}}u.setAttribute(h,""+b)}}function Ph(u,h,b){if(b===null)u.removeAttribute(h);else{switch(typeof b){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(h);return}u.setAttribute(h,""+b)}}function nl(u,h,b,M){if(M===null)u.removeAttribute(b);else{switch(typeof M){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(b);return}u.setAttributeNS(h,b,""+M)}}function go(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function Dv(u){var h=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function lO(u,h,b){var M=Object.getOwnPropertyDescriptor(u.constructor.prototype,h);if(!u.hasOwnProperty(h)&&typeof M<"u"&&typeof M.get=="function"&&typeof M.set=="function"){var j=M.get,U=M.set;return Object.defineProperty(u,h,{configurable:!0,get:function(){return j.call(this)},set:function(J){b=""+J,U.call(this,J)}}),Object.defineProperty(u,h,{enumerable:M.enumerable}),{getValue:function(){return b},setValue:function(J){b=""+J},stopTracking:function(){u._valueTracker=null,delete u[h]}}}}function kv(u){if(!u._valueTracker){var h=Dv(u)?"checked":"value";u._valueTracker=lO(u,h,""+u[h])}}function $h(u){if(!u)return!1;var h=u._valueTracker;if(!h)return!0;var b=h.getValue(),M="";return u&&(M=Dv(u)?u.checked?"true":"false":u.value),u=M,u!==b?(h.setValue(u),!0):!1}function zh(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}var cO=/[\n"\\]/g;function vo(u){return u.replace(cO,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Tv(u,h,b,M,j,U,J,se){u.name="",J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?u.type=J:u.removeAttribute("type"),h!=null?J==="number"?(h===0&&u.value===""||u.value!=h)&&(u.value=""+go(h)):u.value!==""+go(h)&&(u.value=""+go(h)):J!=="submit"&&J!=="reset"||u.removeAttribute("value"),h!=null?rb(u,J,go(h)):b!=null?rb(u,J,go(b)):M!=null&&u.removeAttribute("value"),j==null&&U!=null&&(u.defaultChecked=!!U),j!=null&&(u.checked=j&&typeof j!="function"&&typeof j!="symbol"),se!=null&&typeof se!="function"&&typeof se!="symbol"&&typeof se!="boolean"?u.name=""+go(se):u.removeAttribute("name")}function Av(u,h,b,M,j,U,J,se){if(U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"&&(u.type=U),h!=null||b!=null){if(!(U!=="submit"&&U!=="reset"||h!=null)){kv(u);return}b=b!=null?""+go(b):"",h=h!=null?""+go(h):b,se||h===u.value||(u.value=h),u.defaultValue=h}M=M??j,M=typeof M!="function"&&typeof M!="symbol"&&!!M,u.checked=se?u.checked:!!M,u.defaultChecked=!!M,J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"&&(u.name=J),kv(u)}function rb(u,h,b){h==="number"&&zh(u.ownerDocument)===u||u.defaultValue===""+b||(u.defaultValue=""+b)}function Ku(u,h,b,M){if(u=u.options,h){h={};for(var j=0;j<b.length;j++)h["$"+b[j]]=!0;for(b=0;b<u.length;b++)j=h.hasOwnProperty("$"+u[b].value),u[b].selected!==j&&(u[b].selected=j),j&&M&&(u[b].defaultSelected=!0)}else{for(b=""+go(b),h=null,j=0;j<u.length;j++){if(u[j].value===b){u[j].selected=!0,M&&(u[j].defaultSelected=!0);return}h!==null||u[j].disabled||(h=u[j])}h!==null&&(h.selected=!0)}}function _v(u,h,b){if(h!=null&&(h=""+go(h),h!==u.value&&(u.value=h),b==null)){u.defaultValue!==h&&(u.defaultValue=h);return}u.defaultValue=b!=null?""+go(b):""}function Ov(u,h,b,M){if(h==null){if(M!=null){if(b!=null)throw Error(r(92));if(q(M)){if(1<M.length)throw Error(r(93));M=M[0]}b=M}b==null&&(b=""),h=b}b=go(h),u.defaultValue=b,M=u.textContent,M===b&&M!==""&&M!==null&&(u.value=M),kv(u)}function Da(u,h){if(h){var b=u.firstChild;if(b&&b===u.lastChild&&b.nodeType===3){b.nodeValue=h;return}}u.textContent=h}var yC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sb(u,h,b){var M=h.indexOf("--")===0;b==null||typeof b=="boolean"||b===""?M?u.setProperty(h,""):h==="float"?u.cssFloat="":u[h]="":M?u.setProperty(h,b):typeof b!="number"||b===0||yC.has(h)?h==="float"?u.cssFloat=b:u[h]=(""+b).trim():u[h]=b+"px"}function bC(u,h,b){if(h!=null&&typeof h!="object")throw Error(r(62));if(u=u.style,b!=null){for(var M in b)!b.hasOwnProperty(M)||h!=null&&h.hasOwnProperty(M)||(M.indexOf("--")===0?u.setProperty(M,""):M==="float"?u.cssFloat="":u[M]="");for(var j in h)M=h[j],h.hasOwnProperty(j)&&b[j]!==M&&sb(u,j,M)}else for(var U in h)h.hasOwnProperty(U)&&sb(u,U,h[U])}function Rv(u){if(u.indexOf("-")===-1)return!1;switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),SC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fh(u){return SC.test(""+u)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":u}function Fl(){}var ib=null;function ob(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var Zu=null,ff=null;function wC(u){var h=si(u);if(h&&(u=h.stateNode)){var b=u[Kn]||null;e:switch(u=h.stateNode,h.type){case"input":if(Tv(u,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name),h=b.name,b.type==="radio"&&h!=null){for(b=u;b.parentNode;)b=b.parentNode;for(b=b.querySelectorAll('input[name="'+vo(""+h)+'"][type="radio"]'),h=0;h<b.length;h++){var M=b[h];if(M!==u&&M.form===u.form){var j=M[Kn]||null;if(!j)throw Error(r(90));Tv(M,j.value,j.defaultValue,j.defaultValue,j.checked,j.defaultChecked,j.type,j.name)}}for(h=0;h<b.length;h++)M=b[h],M.form===u.form&&$h(M)}break e;case"textarea":_v(u,b.value,b.defaultValue);break e;case"select":h=b.value,h!=null&&Ku(u,!!b.multiple,h,!1)}}}var ab=!1;function CC(u,h,b){if(ab)return u(h,b);ab=!0;try{var M=u(h);return M}finally{if(ab=!1,(Zu!==null||ff!==null)&&(I0(),Zu&&(h=Zu,u=ff,ff=Zu=null,wC(h),u)))for(h=0;h<u.length;h++)wC(u[h])}}function Ju(u,h){var b=u.stateNode;if(b===null)return null;var M=b[Kn]||null;if(M===null)return null;b=M[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(M=!M.disabled)||(u=u.type,M=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!M;break e;default:u=!1}if(u)return null;if(b&&typeof b!="function")throw Error(r(231,h,typeof b));return b}var Bl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lb=!1;if(Bl)try{var Bh={};Object.defineProperty(Bh,"passive",{get:function(){lb=!0}}),window.addEventListener("test",Bh,Bh),window.removeEventListener("test",Bh,Bh)}catch{lb=!1}var Rc=null,cb=null,cr=null;function mr(){if(cr)return cr;var u,h=cb,b=h.length,M,j="value"in Rc?Rc.value:Rc.textContent,U=j.length;for(u=0;u<b&&h[u]===j[u];u++);var J=b-u;for(M=1;M<=J&&h[b-M]===j[U-M];M++);return cr=j.slice(u,1<M?1-M:void 0)}function Nv(u){var h=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&h===13&&(u=13)):u=h,u===10&&(u=13),32<=u||u===13?u:0}function jv(){return!0}function EC(){return!1}function qi(u){function h(b,M,j,U,J){this._reactName=b,this._targetInst=j,this.type=M,this.nativeEvent=U,this.target=J,this.currentTarget=null;for(var se in u)u.hasOwnProperty(se)&&(b=u[se],this[se]=b?b(U):U[se]);return this.isDefaultPrevented=(U.defaultPrevented!=null?U.defaultPrevented:U.returnValue===!1)?jv:EC,this.isPropagationStopped=EC,this}return f(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var b=this.nativeEvent;b&&(b.preventDefault?b.preventDefault():typeof b.returnValue!="unknown"&&(b.returnValue=!1),this.isDefaultPrevented=jv)},stopPropagation:function(){var b=this.nativeEvent;b&&(b.stopPropagation?b.stopPropagation():typeof b.cancelBubble!="unknown"&&(b.cancelBubble=!0),this.isPropagationStopped=jv)},persist:function(){},isPersistent:jv}),h}var Xu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Iv=qi(Xu),pf=f({},Xu,{view:0,detail:0}),uO=qi(pf),_s,Hh,ka,qh=f({},pf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==ka&&(ka&&u.type==="mousemove"?(_s=u.screenX-ka.screenX,Hh=u.screenY-ka.screenY):Hh=_s=0,ka=u),_s)},movementY:function(u){return"movementY"in u?u.movementY:Hh}}),Lv=qi(qh),Ko=f({},qh,{dataTransfer:0}),MC=qi(Ko),DC=f({},pf,{relatedTarget:0}),Pv=qi(DC),kC=f({},Xu,{animationName:0,elapsedTime:0,pseudoElement:0}),TC=qi(kC),AC=f({},Xu,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),yo=qi(AC),dO=f({},Xu,{data:0}),bo=qi(dO),fO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_C={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Nc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $v(u){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(u):(u=Nc[u])?!!h[u]:!1}function Uh(){return $v}var jr=f({},pf,{key:function(u){if(u.key){var h=fO[u.key]||u.key;if(h!=="Unidentified")return h}return u.type==="keypress"?(u=Nv(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?_C[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(u){return u.type==="keypress"?Nv(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?Nv(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),jc=qi(jr),ub=f({},qh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),OC=qi(ub),db=f({},pf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),pO=qi(db),hO=f({},Xu,{propertyName:0,elapsedTime:0,pseudoElement:0}),mO=qi(hO),RC=f({},qh,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),zv=qi(RC),hf=f({},Xu,{newState:0,oldState:0}),gO=qi(hf),NC=[9,13,27,32],Fv=Bl&&"CompositionEvent"in window,Qu=null;Bl&&"documentMode"in document&&(Qu=document.documentMode);var fb=Bl&&"TextEvent"in window&&!Qu,pb=Bl&&(!Fv||Qu&&8<Qu&&11>=Qu),jC=" ",Bv=!1;function Hv(u,h){switch(u){case"keyup":return NC.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IC(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var ed=!1;function xo(u,h){switch(u){case"compositionend":return IC(h);case"keypress":return h.which!==32?null:(Bv=!0,jC);case"textInput":return u=h.data,u===jC&&Bv?null:u;default:return null}}function hb(u,h){if(ed)return u==="compositionend"||!Fv&&Hv(u,h)?(u=mr(),cr=cb=Rc=null,ed=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return pb&&h.locale!=="ko"?null:h.data;default:return null}}var Vh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mb(u){var h=u&&u.nodeName&&u.nodeName.toLowerCase();return h==="input"?!!Vh[u.type]:h==="textarea"}function gb(u,h,b,M){Zu?ff?ff.push(M):ff=[M]:Zu=M,h=zm(h,"onChange"),0<h.length&&(b=new Iv("onChange","change",null,b,M),u.push({event:b,listeners:h}))}var Wh=null,Yh=null;function vO(u){KE(u,0)}function qv(u){var h=Go(u);if($h(h))return u}function LC(u,h){if(u==="change")return h}var td=!1;if(Bl){var vb;if(Bl){var yb="oninput"in document;if(!yb){var Uv=document.createElement("div");Uv.setAttribute("oninput","return;"),yb=typeof Uv.oninput=="function"}vb=yb}else vb=!1;td=vb&&(!document.documentMode||9<document.documentMode)}function bb(){Wh&&(Wh.detachEvent("onpropertychange",Hl),Yh=Wh=null)}function Hl(u){if(u.propertyName==="value"&&qv(Yh)){var h=[];gb(h,Yh,u,ob(u)),CC(vO,h)}}function Vv(u,h,b){u==="focusin"?(bb(),Wh=h,Yh=b,Wh.attachEvent("onpropertychange",Hl)):u==="focusout"&&bb()}function yO(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return qv(Yh)}function bO(u,h){if(u==="click")return qv(h)}function xO(u,h){if(u==="input"||u==="change")return qv(h)}function mf(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var Ur=typeof Object.is=="function"?Object.is:mf;function gf(u,h){if(Ur(u,h))return!0;if(typeof u!="object"||u===null||typeof h!="object"||h===null)return!1;var b=Object.keys(u),M=Object.keys(h);if(b.length!==M.length)return!1;for(M=0;M<b.length;M++){var j=b[M];if(!Ne.call(h,j)||!Ur(u[j],h[j]))return!1}return!0}function PC(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function $C(u,h){var b=PC(u);u=0;for(var M;b;){if(b.nodeType===3){if(M=u+b.textContent.length,u<=h&&M>=h)return{node:b,offset:h-u};u=M}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=PC(b)}}function zC(u,h){return u&&h?u===h?!0:u&&u.nodeType===3?!1:h&&h.nodeType===3?zC(u,h.parentNode):"contains"in u?u.contains(h):u.compareDocumentPosition?!!(u.compareDocumentPosition(h)&16):!1:!1}function FC(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var h=zh(u.document);h instanceof u.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)u=h.contentWindow;else break;h=zh(u.document)}return h}function xb(u){var h=u&&u.nodeName&&u.nodeName.toLowerCase();return h&&(h==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||h==="textarea"||u.contentEditable==="true")}var vf=Bl&&"documentMode"in document&&11>=document.documentMode,we=null,Ye=null,Pe=null,Dt=!1;function tn(u,h,b){var M=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;Dt||we==null||we!==zh(M)||(M=we,"selectionStart"in M&&xb(M)?M={start:M.selectionStart,end:M.selectionEnd}:(M=(M.ownerDocument&&M.ownerDocument.defaultView||window).getSelection(),M={anchorNode:M.anchorNode,anchorOffset:M.anchorOffset,focusNode:M.focusNode,focusOffset:M.focusOffset}),Pe&&gf(Pe,M)||(Pe=M,M=zm(Ye,"onSelect"),0<M.length&&(h=new Iv("onSelect","select",null,h,b),u.push({event:h,listeners:M}),h.target=we)))}function Dn(u,h){var b={};return b[u.toLowerCase()]=h.toLowerCase(),b["Webkit"+u]="webkit"+h,b["Moz"+u]="moz"+h,b}var Ir={animationend:Dn("Animation","AnimationEnd"),animationiteration:Dn("Animation","AnimationIteration"),animationstart:Dn("Animation","AnimationStart"),transitionrun:Dn("Transition","TransitionRun"),transitionstart:Dn("Transition","TransitionStart"),transitioncancel:Dn("Transition","TransitionCancel"),transitionend:Dn("Transition","TransitionEnd")},Qn={},Wv={};Bl&&(Wv=document.createElement("div").style,"AnimationEvent"in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),"TransitionEvent"in window||delete Ir.transitionend.transition);function nd(u){if(Qn[u])return Qn[u];if(!Ir[u])return u;var h=Ir[u],b;for(b in h)if(h.hasOwnProperty(b)&&b in Wv)return Qn[u]=h[b];return u}var So=nd("animationend"),Gh=nd("animationiteration"),BC=nd("animationstart"),yf=nd("transitionrun"),Yv=nd("transitionstart"),Gv=nd("transitioncancel"),Zn=nd("transitionend"),HC=new Map,Kv="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Kv.push("scrollEnd");function Ui(u,h){HC.set(u,h),Ei(h,[u])}var Zv=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)},Zo=[],bf=0,xf=0;function Ta(){for(var u=bf,h=xf=bf=0;h<u;){var b=Zo[h];Zo[h++]=null;var M=Zo[h];Zo[h++]=null;var j=Zo[h];Zo[h++]=null;var U=Zo[h];if(Zo[h++]=null,M!==null&&j!==null){var J=M.pending;J===null?j.next=j:(j.next=J.next,J.next=j),M.pending=j}U!==0&&Sb(b,j,U)}}function rd(u,h,b,M){Zo[bf++]=u,Zo[bf++]=h,Zo[bf++]=b,Zo[bf++]=M,xf|=M,u.lanes|=M,u=u.alternate,u!==null&&(u.lanes|=M)}function Jv(u,h,b,M){return rd(u,h,b,M),Kh(u)}function rl(u,h){return rd(u,null,null,h),Kh(u)}function Sb(u,h,b){u.lanes|=b;var M=u.alternate;M!==null&&(M.lanes|=b);for(var j=!1,U=u.return;U!==null;)U.childLanes|=b,M=U.alternate,M!==null&&(M.childLanes|=b),U.tag===22&&(u=U.stateNode,u===null||u._visibility&1||(j=!0)),u=U,U=U.return;return u.tag===3?(U=u.stateNode,j&&h!==null&&(j=31-Nt(b),u=U.hiddenUpdates,M=u[j],M===null?u[j]=[h]:M.push(h),h.lane=b|536870912),U):null}function Kh(u){if(50<Rm)throw Rm=0,x2=null,Error(r(185));for(var h=u.return;h!==null;)u=h,h=u.return;return u.tag===3?u.stateNode:null}var ql={};function qC(u,h,b,M){this.tag=u,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gs(u,h,b,M){return new qC(u,h,b,M)}function Ul(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Jo(u,h){var b=u.alternate;return b===null?(b=Gs(u.tag,h,u.key,u.mode),b.elementType=u.elementType,b.type=u.type,b.stateNode=u.stateNode,b.alternate=u,u.alternate=b):(b.pendingProps=h,b.type=u.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=u.flags&65011712,b.childLanes=u.childLanes,b.lanes=u.lanes,b.child=u.child,b.memoizedProps=u.memoizedProps,b.memoizedState=u.memoizedState,b.updateQueue=u.updateQueue,h=u.dependencies,b.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},b.sibling=u.sibling,b.index=u.index,b.ref=u.ref,b.refCleanup=u.refCleanup,b}function UC(u,h){u.flags&=65011714;var b=u.alternate;return b===null?(u.childLanes=0,u.lanes=h,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=b.childLanes,u.lanes=b.lanes,u.child=b.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=b.memoizedProps,u.memoizedState=b.memoizedState,u.updateQueue=b.updateQueue,u.type=b.type,h=b.dependencies,u.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),u}function Xv(u,h,b,M,j,U){var J=0;if(M=u,typeof u=="function")Ul(u)&&(J=1);else if(typeof u=="string")J=tR(u,b,X.current)?26:u==="html"||u==="head"||u==="body"?27:5;else e:switch(u){case N:return u=Gs(31,b,h,j),u.elementType=N,u.lanes=U,u;case y:return sd(b.children,j,U,h);case x:J=8,j|=24;break;case w:return u=Gs(12,b,h,j|2),u.elementType=w,u.lanes=U,u;case T:return u=Gs(13,b,h,j),u.elementType=T,u.lanes=U,u;case A:return u=Gs(19,b,h,j),u.elementType=A,u.lanes=U,u;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case E:J=10;break e;case C:J=9;break e;case D:J=11;break e;case _:J=14;break e;case R:J=16,M=null;break e}J=29,b=Error(r(130,u===null?"null":typeof u,"")),M=null}return h=Gs(J,b,h,j),h.elementType=u,h.type=M,h.lanes=U,h}function sd(u,h,b,M){return u=Gs(7,u,M,h),u.lanes=b,u}function Sf(u,h,b){return u=Gs(6,u,null,h),u.lanes=b,u}function Zh(u){var h=Gs(18,null,null,0);return h.stateNode=u,h}function Jh(u,h,b){return h=Gs(4,u.children!==null?u.children:[],u.key,h),h.lanes=b,h.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},h}var VC=new WeakMap;function wo(u,h){if(typeof u=="object"&&u!==null){var b=VC.get(u);return b!==void 0?b:(h={value:u,source:h,stack:Te(h)},VC.set(u,h),h)}return{value:u,source:h,stack:Te(h)}}var wf=[],Cf=0,Zr=null,vs=0,Xo=[],Qo=0,Vl=null,sl=1,ea="";function Co(u,h){wf[Cf++]=vs,wf[Cf++]=Zr,Zr=u,vs=h}function Qv(u,h,b){Xo[Qo++]=sl,Xo[Qo++]=ea,Xo[Qo++]=Vl,Vl=u;var M=sl;u=ea;var j=32-Nt(M)-1;M&=~(1<<j),b+=1;var U=32-Nt(h)+j;if(30<U){var J=j-j%5;U=(M&(1<<J)-1).toString(32),M>>=J,j-=J,sl=1<<32-Nt(h)+j|b<<j|M,ea=U+u}else sl=1<<U|b<<j|M,ea=u}function Ic(u){u.return!==null&&(Co(u,1),Qv(u,1,0))}function id(u){for(;u===Zr;)Zr=wf[--Cf],wf[Cf]=null,vs=wf[--Cf],wf[Cf]=null;for(;u===Vl;)Vl=Xo[--Qo],Xo[Qo]=null,ea=Xo[--Qo],Xo[Qo]=null,sl=Xo[--Qo],Xo[Qo]=null}function Ef(u,h){Xo[Qo++]=sl,Xo[Qo++]=ea,Xo[Qo++]=Vl,sl=h.id,ea=h.overflow,Vl=u}var ys=null,Jn=null,jn=!1,Lc=null,ta=!1,wb=Error(r(519));function Pc(u){var h=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zc(wo(h,u)),wb}function Xh(u){var h=u.stateNode,b=u.type,M=u.memoizedProps;switch(h[Wt]=u,h[Kn]=M,b){case"dialog":Tn("cancel",h),Tn("close",h);break;case"iframe":case"object":case"embed":Tn("load",h);break;case"video":case"audio":for(b=0;b<$m.length;b++)Tn($m[b],h);break;case"source":Tn("error",h);break;case"img":case"image":case"link":Tn("error",h),Tn("load",h);break;case"details":Tn("toggle",h);break;case"input":Tn("invalid",h),Av(h,M.value,M.defaultValue,M.checked,M.defaultChecked,M.type,M.name,!0);break;case"select":Tn("invalid",h);break;case"textarea":Tn("invalid",h),Ov(h,M.value,M.defaultValue,M.children)}b=M.children,typeof b!="string"&&typeof b!="number"&&typeof b!="bigint"||h.textContent===""+b||M.suppressHydrationWarning===!0||XE(h.textContent,b)?(M.popover!=null&&(Tn("beforetoggle",h),Tn("toggle",h)),M.onScroll!=null&&Tn("scroll",h),M.onScrollEnd!=null&&Tn("scrollend",h),M.onClick!=null&&(h.onclick=Fl),h=!0):h=!1,h||Pc(u,!0)}function Mf(u){for(ys=u.return;ys;)switch(ys.tag){case 5:case 31:case 13:ta=!1;return;case 27:case 3:ta=!0;return;default:ys=ys.return}}function od(u){if(u!==ys)return!1;if(!jn)return Mf(u),jn=!0,!1;var h=u.tag,b;if((b=h!==3&&h!==27)&&((b=h===5)&&(b=u.type,b=!(b!=="form"&&b!=="button")||tu(u.type,u.memoizedProps)),b=!b),b&&Jn&&Pc(u),Mf(u),h===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));Jn=rM(u)}else if(h===31){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));Jn=rM(u)}else h===27?(h=Jn,Zt(u.type)?(u=F2,F2=null,Jn=u):Jn=h):Jn=ys?la(u.stateNode.nextSibling):null;return!0}function ie(){Jn=ys=null,jn=!1}function $c(){var u=Lc;return u!==null&&(Ji===null?Ji=u:Ji.push.apply(Ji,u),Lc=null),u}function zc(u){Lc===null?Lc=[u]:Lc.push(u)}var Vi=W(null),ln=null,Wl=null;function Fc(u,h,b){Q(Vi,h._currentValue),h._currentValue=b}function Yl(u){u._currentValue=Vi.current,Z(Vi)}function Gl(u,h,b){for(;u!==null;){var M=u.alternate;if((u.childLanes&h)!==h?(u.childLanes|=h,M!==null&&(M.childLanes|=h)):M!==null&&(M.childLanes&h)!==h&&(M.childLanes|=h),u===b)break;u=u.return}}function Cb(u,h,b,M){var j=u.child;for(j!==null&&(j.return=u);j!==null;){var U=j.dependencies;if(U!==null){var J=j.child;U=U.firstContext;e:for(;U!==null;){var se=U;U=j;for(var ge=0;ge<h.length;ge++)if(se.context===h[ge]){U.lanes|=b,se=U.alternate,se!==null&&(se.lanes|=b),Gl(U.return,b,u),M||(J=null);break e}U=se.next}}else if(j.tag===18){if(J=j.return,J===null)throw Error(r(341));J.lanes|=b,U=J.alternate,U!==null&&(U.lanes|=b),Gl(J,b,u),J=null}else J=j.child;if(J!==null)J.return=j;else for(J=j;J!==null;){if(J===u){J=null;break}if(j=J.sibling,j!==null){j.return=J.return,J=j;break}J=J.return}j=J}}function Df(u,h,b,M){u=null;for(var j=h,U=!1;j!==null;){if(!U){if((j.flags&524288)!==0)U=!0;else if((j.flags&262144)!==0)break}if(j.tag===10){var J=j.alternate;if(J===null)throw Error(r(387));if(J=J.memoizedProps,J!==null){var se=j.type;Ur(j.pendingProps.value,J.value)||(u!==null?u.push(se):u=[se])}}else if(j===ee.current){if(J=j.alternate,J===null)throw Error(r(387));J.memoizedState.memoizedState!==j.memoizedState.memoizedState&&(u!==null?u.push(rp):u=[rp])}j=j.return}u!==null&&Cb(h,u,b,M),h.flags|=262144}function e0(u){for(u=u.firstContext;u!==null;){if(!Ur(u.context._currentValue,u.memoizedValue))return!0;u=u.next}return!1}function ad(u){ln=u,Wl=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function Ks(u){return WC(ln,u)}function na(u,h){return ln===null&&ad(u),WC(u,h)}function WC(u,h){var b=h._currentValue;if(h={context:h,memoizedValue:b,next:null},Wl===null){if(u===null)throw Error(r(308));Wl=h,u.dependencies={lanes:0,firstContext:h},u.flags|=524288}else Wl=Wl.next=h;return b}var SO=typeof AbortController<"u"?AbortController:function(){var u=[],h=this.signal={aborted:!1,addEventListener:function(b,M){u.push(M)}};this.abort=function(){h.aborted=!0,u.forEach(function(b){return b()})}},wO=t.unstable_scheduleCallback,CO=t.unstable_NormalPriority,bs={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Aa(){return{controller:new SO,data:new Map,refCount:0}}function Qh(u){u.refCount--,u.refCount===0&&wO(CO,function(){u.controller.abort()})}var em=null,Eb=0,kf=0,Tf=null;function ld(u,h){if(em===null){var b=em=[];Eb=0,kf=Ro(),Tf={status:"pending",value:void 0,then:function(M){b.push(M)}}}return Eb++,h.then(YC,YC),h}function YC(){if(--Eb===0&&em!==null){Tf!==null&&(Tf.status="fulfilled");var u=em;em=null,kf=0,Tf=null;for(var h=0;h<u.length;h++)(0,u[h])()}}function EO(u,h){var b=[],M={status:"pending",value:null,reason:null,then:function(j){b.push(j)}};return u.then(function(){M.status="fulfilled",M.value=h;for(var j=0;j<b.length;j++)(0,b[j])(h)},function(j){for(M.status="rejected",M.reason=j,j=0;j<b.length;j++)(0,b[j])(void 0)}),M}var ra=H.S;H.S=function(u,h){OE=je(),typeof h=="object"&&h!==null&&typeof h.then=="function"&&ld(u,h),ra!==null&&ra(u,h)};var cd=W(null);function Mb(){var u=cd.current;return u!==null?u:vr.pooledCache}function t0(u,h){h===null?Q(cd,cd.current):Q(cd,h.pool)}function GC(){var u=Mb();return u===null?null:{parent:bs._currentValue,pool:u}}var Af=Error(r(460)),n0=Error(r(474)),tm=Error(r(542)),r0={then:function(){}};function KC(u){return u=u.status,u==="fulfilled"||u==="rejected"}function s0(u,h,b){switch(b=u[b],b===void 0?u.push(h):b!==h&&(h.then(Fl,Fl),h=b),h.status){case"fulfilled":return h.value;case"rejected":throw u=h.reason,Db(u),u;default:if(typeof h.status=="string")h.then(Fl,Fl);else{if(u=vr,u!==null&&100<u.shellSuspendCounter)throw Error(r(482));u=h,u.status="pending",u.then(function(M){if(h.status==="pending"){var j=h;j.status="fulfilled",j.value=M}},function(M){if(h.status==="pending"){var j=h;j.status="rejected",j.reason=M}})}switch(h.status){case"fulfilled":return h.value;case"rejected":throw u=h.reason,Db(u),u}throw il=h,Af}}function _a(u){try{var h=u._init;return h(u._payload)}catch(b){throw b!==null&&typeof b=="object"&&typeof b.then=="function"?(il=b,Af):b}}var il=null;function ZC(){if(il===null)throw Error(r(459));var u=il;return il=null,u}function Db(u){if(u===Af||u===tm)throw Error(r(483))}var _f=null,Eo=0;function Of(u){var h=Eo;return Eo+=1,_f===null&&(_f=[]),s0(_f,u,h)}function Oa(u,h){h=h.props.ref,u.ref=h!==void 0?h:null}function Mi(u,h){throw h.$$typeof===p?Error(r(525)):(u=Object.prototype.toString.call(h),Error(r(31,u==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":u)))}function JC(u){function h(Me,be){if(u){var Oe=Me.deletions;Oe===null?(Me.deletions=[be],Me.flags|=16):Oe.push(be)}}function b(Me,be){if(!u)return null;for(;be!==null;)h(Me,be),be=be.sibling;return null}function M(Me){for(var be=new Map;Me!==null;)Me.key!==null?be.set(Me.key,Me):be.set(Me.index,Me),Me=Me.sibling;return be}function j(Me,be){return Me=Jo(Me,be),Me.index=0,Me.sibling=null,Me}function U(Me,be,Oe){return Me.index=Oe,u?(Oe=Me.alternate,Oe!==null?(Oe=Oe.index,Oe<be?(Me.flags|=67108866,be):Oe):(Me.flags|=67108866,be)):(Me.flags|=1048576,be)}function J(Me){return u&&Me.alternate===null&&(Me.flags|=67108866),Me}function se(Me,be,Oe,Ke){return be===null||be.tag!==6?(be=Sf(Oe,Me.mode,Ke),be.return=Me,be):(be=j(be,Oe),be.return=Me,be)}function ge(Me,be,Oe,Ke){var zt=Oe.type;return zt===y?Ge(Me,be,Oe.props.children,Ke,Oe.key):be!==null&&(be.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===R&&_a(zt)===be.type)?(be=j(be,Oe.props),Oa(be,Oe),be.return=Me,be):(be=Xv(Oe.type,Oe.key,Oe.props,null,Me.mode,Ke),Oa(be,Oe),be.return=Me,be)}function Re(Me,be,Oe,Ke){return be===null||be.tag!==4||be.stateNode.containerInfo!==Oe.containerInfo||be.stateNode.implementation!==Oe.implementation?(be=Jh(Oe,Me.mode,Ke),be.return=Me,be):(be=j(be,Oe.children||[]),be.return=Me,be)}function Ge(Me,be,Oe,Ke,zt){return be===null||be.tag!==7?(be=sd(Oe,Me.mode,Ke,zt),be.return=Me,be):(be=j(be,Oe),be.return=Me,be)}function Ze(Me,be,Oe){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return be=Sf(""+be,Me.mode,Oe),be.return=Me,be;if(typeof be=="object"&&be!==null){switch(be.$$typeof){case m:return Oe=Xv(be.type,be.key,be.props,null,Me.mode,Oe),Oa(Oe,be),Oe.return=Me,Oe;case v:return be=Jh(be,Me.mode,Oe),be.return=Me,be;case R:return be=_a(be),Ze(Me,be,Oe)}if(q(be)||L(be))return be=sd(be,Me.mode,Oe,null),be.return=Me,be;if(typeof be.then=="function")return Ze(Me,Of(be),Oe);if(be.$$typeof===E)return Ze(Me,na(Me,be),Oe);Mi(Me,be)}return null}function Ie(Me,be,Oe,Ke){var zt=be!==null?be.key:null;if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint")return zt!==null?null:se(Me,be,""+Oe,Ke);if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case m:return Oe.key===zt?ge(Me,be,Oe,Ke):null;case v:return Oe.key===zt?Re(Me,be,Oe,Ke):null;case R:return Oe=_a(Oe),Ie(Me,be,Oe,Ke)}if(q(Oe)||L(Oe))return zt!==null?null:Ge(Me,be,Oe,Ke,null);if(typeof Oe.then=="function")return Ie(Me,be,Of(Oe),Ke);if(Oe.$$typeof===E)return Ie(Me,be,na(Me,Oe),Ke);Mi(Me,Oe)}return null}function ze(Me,be,Oe,Ke,zt){if(typeof Ke=="string"&&Ke!==""||typeof Ke=="number"||typeof Ke=="bigint")return Me=Me.get(Oe)||null,se(be,Me,""+Ke,zt);if(typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case m:return Me=Me.get(Ke.key===null?Oe:Ke.key)||null,ge(be,Me,Ke,zt);case v:return Me=Me.get(Ke.key===null?Oe:Ke.key)||null,Re(be,Me,Ke,zt);case R:return Ke=_a(Ke),ze(Me,be,Oe,Ke,zt)}if(q(Ke)||L(Ke))return Me=Me.get(Oe)||null,Ge(be,Me,Ke,zt,null);if(typeof Ke.then=="function")return ze(Me,be,Oe,Of(Ke),zt);if(Ke.$$typeof===E)return ze(Me,be,Oe,na(be,Ke),zt);Mi(be,Ke)}return null}function _t(Me,be,Oe,Ke){for(var zt=null,qn=null,It=be,mn=be=0,Nn=null;It!==null&&mn<Oe.length;mn++){It.index>mn?(Nn=It,It=null):Nn=It.sibling;var Un=Ie(Me,It,Oe[mn],Ke);if(Un===null){It===null&&(It=Nn);break}u&&It&&Un.alternate===null&&h(Me,It),be=U(Un,be,mn),qn===null?zt=Un:qn.sibling=Un,qn=Un,It=Nn}if(mn===Oe.length)return b(Me,It),jn&&Co(Me,mn),zt;if(It===null){for(;mn<Oe.length;mn++)It=Ze(Me,Oe[mn],Ke),It!==null&&(be=U(It,be,mn),qn===null?zt=It:qn.sibling=It,qn=It);return jn&&Co(Me,mn),zt}for(It=M(It);mn<Oe.length;mn++)Nn=ze(It,Me,mn,Oe[mn],Ke),Nn!==null&&(u&&Nn.alternate!==null&&It.delete(Nn.key===null?mn:Nn.key),be=U(Nn,be,mn),qn===null?zt=Nn:qn.sibling=Nn,qn=Nn);return u&&It.forEach(function(au){return h(Me,au)}),jn&&Co(Me,mn),zt}function Ut(Me,be,Oe,Ke){if(Oe==null)throw Error(r(151));for(var zt=null,qn=null,It=be,mn=be=0,Nn=null,Un=Oe.next();It!==null&&!Un.done;mn++,Un=Oe.next()){It.index>mn?(Nn=It,It=null):Nn=It.sibling;var au=Ie(Me,It,Un.value,Ke);if(au===null){It===null&&(It=Nn);break}u&&It&&au.alternate===null&&h(Me,It),be=U(au,be,mn),qn===null?zt=au:qn.sibling=au,qn=au,It=Nn}if(Un.done)return b(Me,It),jn&&Co(Me,mn),zt;if(It===null){for(;!Un.done;mn++,Un=Oe.next())Un=Ze(Me,Un.value,Ke),Un!==null&&(be=U(Un,be,mn),qn===null?zt=Un:qn.sibling=Un,qn=Un);return jn&&Co(Me,mn),zt}for(It=M(It);!Un.done;mn++,Un=Oe.next())Un=ze(It,Me,mn,Un.value,Ke),Un!==null&&(u&&Un.alternate!==null&&It.delete(Un.key===null?mn:Un.key),be=U(Un,be,mn),qn===null?zt=Un:qn.sibling=Un,qn=Un);return u&&It.forEach(function(cR){return h(Me,cR)}),jn&&Co(Me,mn),zt}function fr(Me,be,Oe,Ke){if(typeof Oe=="object"&&Oe!==null&&Oe.type===y&&Oe.key===null&&(Oe=Oe.props.children),typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case m:e:{for(var zt=Oe.key;be!==null;){if(be.key===zt){if(zt=Oe.type,zt===y){if(be.tag===7){b(Me,be.sibling),Ke=j(be,Oe.props.children),Ke.return=Me,Me=Ke;break e}}else if(be.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===R&&_a(zt)===be.type){b(Me,be.sibling),Ke=j(be,Oe.props),Oa(Ke,Oe),Ke.return=Me,Me=Ke;break e}b(Me,be);break}else h(Me,be);be=be.sibling}Oe.type===y?(Ke=sd(Oe.props.children,Me.mode,Ke,Oe.key),Ke.return=Me,Me=Ke):(Ke=Xv(Oe.type,Oe.key,Oe.props,null,Me.mode,Ke),Oa(Ke,Oe),Ke.return=Me,Me=Ke)}return J(Me);case v:e:{for(zt=Oe.key;be!==null;){if(be.key===zt)if(be.tag===4&&be.stateNode.containerInfo===Oe.containerInfo&&be.stateNode.implementation===Oe.implementation){b(Me,be.sibling),Ke=j(be,Oe.children||[]),Ke.return=Me,Me=Ke;break e}else{b(Me,be);break}else h(Me,be);be=be.sibling}Ke=Jh(Oe,Me.mode,Ke),Ke.return=Me,Me=Ke}return J(Me);case R:return Oe=_a(Oe),fr(Me,be,Oe,Ke)}if(q(Oe))return _t(Me,be,Oe,Ke);if(L(Oe)){if(zt=L(Oe),typeof zt!="function")throw Error(r(150));return Oe=zt.call(Oe),Ut(Me,be,Oe,Ke)}if(typeof Oe.then=="function")return fr(Me,be,Of(Oe),Ke);if(Oe.$$typeof===E)return fr(Me,be,na(Me,Oe),Ke);Mi(Me,Oe)}return typeof Oe=="string"&&Oe!==""||typeof Oe=="number"||typeof Oe=="bigint"?(Oe=""+Oe,be!==null&&be.tag===6?(b(Me,be.sibling),Ke=j(be,Oe),Ke.return=Me,Me=Ke):(b(Me,be),Ke=Sf(Oe,Me.mode,Ke),Ke.return=Me,Me=Ke),J(Me)):b(Me,be)}return function(Me,be,Oe,Ke){try{Eo=0;var zt=fr(Me,be,Oe,Ke);return _f=null,zt}catch(It){if(It===Af||It===tm)throw It;var qn=Gs(29,It,null,Me.mode);return qn.lanes=Ke,qn.return=Me,qn}finally{}}}var Bc=JC(!0),kb=JC(!1),sa=!1;function ol(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function i0(u,h){u=u.updateQueue,h.updateQueue===u&&(h.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function Hc(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function Ra(u,h,b){var M=u.updateQueue;if(M===null)return null;if(M=M.shared,(Wn&2)!==0){var j=M.pending;return j===null?h.next=h:(h.next=j.next,j.next=h),M.pending=h,h=Kh(u),Sb(u,null,b),h}return rd(u,M,h,b),Kh(u)}function nm(u,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var M=h.lanes;M&=u.pendingLanes,b|=M,h.lanes=b,ht(u,b)}}function o0(u,h){var b=u.updateQueue,M=u.alternate;if(M!==null&&(M=M.updateQueue,b===M)){var j=null,U=null;if(b=b.firstBaseUpdate,b!==null){do{var J={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};U===null?j=U=J:U=U.next=J,b=b.next}while(b!==null);U===null?j=U=h:U=U.next=h}else j=U=h;b={baseState:M.baseState,firstBaseUpdate:j,lastBaseUpdate:U,shared:M.shared,callbacks:M.callbacks},u.updateQueue=b;return}u=b.lastBaseUpdate,u===null?b.firstBaseUpdate=h:u.next=h,b.lastBaseUpdate=h}var Os=!1;function ud(){if(Os){var u=Tf;if(u!==null)throw u}}function Rf(u,h,b,M){Os=!1;var j=u.updateQueue;sa=!1;var U=j.firstBaseUpdate,J=j.lastBaseUpdate,se=j.shared.pending;if(se!==null){j.shared.pending=null;var ge=se,Re=ge.next;ge.next=null,J===null?U=Re:J.next=Re,J=ge;var Ge=u.alternate;Ge!==null&&(Ge=Ge.updateQueue,se=Ge.lastBaseUpdate,se!==J&&(se===null?Ge.firstBaseUpdate=Re:se.next=Re,Ge.lastBaseUpdate=ge))}if(U!==null){var Ze=j.baseState;J=0,Ge=Re=ge=null,se=U;do{var Ie=se.lane&-536870913,ze=Ie!==se.lane;if(ze?(Rn&Ie)===Ie:(M&Ie)===Ie){Ie!==0&&Ie===kf&&(Os=!0),Ge!==null&&(Ge=Ge.next={lane:0,tag:se.tag,payload:se.payload,callback:null,next:null});e:{var _t=u,Ut=se;Ie=h;var fr=b;switch(Ut.tag){case 1:if(_t=Ut.payload,typeof _t=="function"){Ze=_t.call(fr,Ze,Ie);break e}Ze=_t;break e;case 3:_t.flags=_t.flags&-65537|128;case 0:if(_t=Ut.payload,Ie=typeof _t=="function"?_t.call(fr,Ze,Ie):_t,Ie==null)break e;Ze=f({},Ze,Ie);break e;case 2:sa=!0}}Ie=se.callback,Ie!==null&&(u.flags|=64,ze&&(u.flags|=8192),ze=j.callbacks,ze===null?j.callbacks=[Ie]:ze.push(Ie))}else ze={lane:Ie,tag:se.tag,payload:se.payload,callback:se.callback,next:null},Ge===null?(Re=Ge=ze,ge=Ze):Ge=Ge.next=ze,J|=Ie;if(se=se.next,se===null){if(se=j.shared.pending,se===null)break;ze=se,se=ze.next,ze.next=null,j.lastBaseUpdate=ze,j.shared.pending=null}}while(!0);Ge===null&&(ge=Ze),j.baseState=ge,j.firstBaseUpdate=Re,j.lastBaseUpdate=Ge,U===null&&(j.shared.lanes=0),Zc|=J,u.lanes=J,u.memoizedState=Ze}}function Na(u,h){if(typeof u!="function")throw Error(r(191,u));u.call(h)}function a0(u,h){var b=u.callbacks;if(b!==null)for(u.callbacks=null,u=0;u<b.length;u++)Na(b[u],h)}var Kl=W(null),al=W(0);function Tb(u,h){u=za,Q(al,u),Q(Kl,h),za=u|h.baseLanes}function Zs(){Q(al,za),Q(Kl,Kl.current)}function rm(){za=al.current,Z(Kl),Z(al)}var Mo=W(null),ia=null;function qc(u){var h=u.alternate;Q(as,as.current&1),Q(Mo,u),ia===null&&(h===null||Kl.current!==null||h.memoizedState!==null)&&(ia=u)}function sm(u){Q(as,as.current),Q(Mo,u),ia===null&&(ia=u)}function XC(u){u.tag===22?(Q(as,as.current),Q(Mo,u),ia===null&&(ia=u)):oa()}function oa(){Q(as,as.current),Q(Mo,Mo.current)}function Wi(u){Z(Mo),ia===u&&(ia=null),Z(as)}var as=W(0);function l0(u){for(var h=u;h!==null;){if(h.tag===13){var b=h.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||V0(b)||Jf(b)))return h}else if(h.tag===19&&(h.memoizedProps.revealOrder==="forwards"||h.memoizedProps.revealOrder==="backwards"||h.memoizedProps.revealOrder==="unstable_legacy-backwards"||h.memoizedProps.revealOrder==="together")){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Do=0,cn=null,ur=null,Jr=null,im=!1,Nf=!1,dd=!1,c0=0,jf=0,Uc=null,MO=0;function Lr(){throw Error(r(321))}function u0(u,h){if(h===null)return!1;for(var b=0;b<h.length&&b<u.length;b++)if(!Ur(u[b],h[b]))return!1;return!0}function d0(u,h,b,M,j,U){return Do=U,cn=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,H.H=u===null||u.memoizedState===null?cE:x0,dd=!1,U=b(M,j),dd=!1,Nf&&(U=om(h,b,M,j)),Ab(u),U}function Ab(u){H.H=Wc;var h=ur!==null&&ur.next!==null;if(Do=0,Jr=ur=cn=null,im=!1,jf=0,Uc=null,h)throw Error(r(300));u===null||Vr||(u=u.dependencies,u!==null&&e0(u)&&(Vr=!0))}function om(u,h,b,M){cn=u;var j=0;do{if(Nf&&(Uc=null),jf=0,Nf=!1,25<=j)throw Error(r(301));if(j+=1,Jr=ur=null,u.updateQueue!=null){var U=u.updateQueue;U.lastEffect=null,U.events=null,U.stores=null,U.memoCache!=null&&(U.memoCache.index=0)}H.H=hm,U=h(b,M)}while(Nf);return U}function DO(){var u=H.H,h=u.useState()[0];return h=typeof h.then=="function"?Lf(h):h,u=u.useState()[0],(ur!==null?ur.memoizedState:null)!==u&&(cn.flags|=1024),h}function f0(){var u=c0!==0;return c0=0,u}function p0(u,h,b){h.updateQueue=u.updateQueue,h.flags&=-2053,u.lanes&=~b}function _b(u){if(im){for(u=u.memoizedState;u!==null;){var h=u.queue;h!==null&&(h.pending=null),u=u.next}im=!1}Do=0,Jr=ur=cn=null,Nf=!1,jf=c0=0,Uc=null}function oi(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jr===null?cn.memoizedState=Jr=u:Jr=Jr.next=u,Jr}function ls(){if(ur===null){var u=cn.alternate;u=u!==null?u.memoizedState:null}else u=ur.next;var h=Jr===null?cn.memoizedState:Jr.next;if(h!==null)Jr=h,ur=u;else{if(u===null)throw cn.alternate===null?Error(r(467)):Error(r(310));ur=u,u={memoizedState:ur.memoizedState,baseState:ur.baseState,baseQueue:ur.baseQueue,queue:ur.queue,next:null},Jr===null?cn.memoizedState=Jr=u:Jr=Jr.next=u}return Jr}function If(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lf(u){var h=jf;return jf+=1,Uc===null&&(Uc=[]),u=s0(Uc,u,h),h=cn,(Jr===null?h.memoizedState:Jr.next)===null&&(h=h.alternate,H.H=h===null||h.memoizedState===null?cE:x0),u}function Pf(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return Lf(u);if(u.$$typeof===E)return Ks(u)}throw Error(r(438,String(u)))}function Ob(u){var h=null,b=cn.updateQueue;if(b!==null&&(h=b.memoCache),h==null){var M=cn.alternate;M!==null&&(M=M.updateQueue,M!==null&&(M=M.memoCache,M!=null&&(h={data:M.data.map(function(j){return j.slice()}),index:0})))}if(h==null&&(h={data:[],index:0}),b===null&&(b=If(),cn.updateQueue=b),b.memoCache=h,b=h.data[h.index],b===void 0)for(b=h.data[h.index]=Array(u),M=0;M<u;M++)b[M]=I;return h.index++,b}function ja(u,h){return typeof h=="function"?h(u):h}function un(u){var h=ls();return Rb(h,ur,u)}function Rb(u,h,b){var M=u.queue;if(M===null)throw Error(r(311));M.lastRenderedReducer=b;var j=u.baseQueue,U=M.pending;if(U!==null){if(j!==null){var J=j.next;j.next=U.next,U.next=J}h.baseQueue=j=U,M.pending=null}if(U=u.baseState,j===null)u.memoizedState=U;else{h=j.next;var se=J=null,ge=null,Re=h,Ge=!1;do{var Ze=Re.lane&-536870913;if(Ze!==Re.lane?(Rn&Ze)===Ze:(Do&Ze)===Ze){var Ie=Re.revertLane;if(Ie===0)ge!==null&&(ge=ge.next={lane:0,revertLane:0,gesture:null,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),Ze===kf&&(Ge=!0);else if((Do&Ie)===Ie){Re=Re.next,Ie===kf&&(Ge=!0);continue}else Ze={lane:0,revertLane:Re.revertLane,gesture:null,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},ge===null?(se=ge=Ze,J=U):ge=ge.next=Ze,cn.lanes|=Ie,Zc|=Ie;Ze=Re.action,dd&&b(U,Ze),U=Re.hasEagerState?Re.eagerState:b(U,Ze)}else Ie={lane:Ze,revertLane:Re.revertLane,gesture:Re.gesture,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null},ge===null?(se=ge=Ie,J=U):ge=ge.next=Ie,cn.lanes|=Ze,Zc|=Ze;Re=Re.next}while(Re!==null&&Re!==h);if(ge===null?J=U:ge.next=se,!Ur(U,u.memoizedState)&&(Vr=!0,Ge&&(b=Tf,b!==null)))throw b;u.memoizedState=U,u.baseState=J,u.baseQueue=ge,M.lastRenderedState=U}return j===null&&(M.lanes=0),[u.memoizedState,M.dispatch]}function Nb(u){var h=ls(),b=h.queue;if(b===null)throw Error(r(311));b.lastRenderedReducer=u;var M=b.dispatch,j=b.pending,U=h.memoizedState;if(j!==null){b.pending=null;var J=j=j.next;do U=u(U,J.action),J=J.next;while(J!==j);Ur(U,h.memoizedState)||(Vr=!0),h.memoizedState=U,h.baseQueue===null&&(h.baseState=U),b.lastRenderedState=U}return[U,M]}function $f(u,h,b){var M=cn,j=ls(),U=jn;if(U){if(b===void 0)throw Error(r(407));b=b()}else b=h();var J=!Ur((ur||j).memoizedState,b);if(J&&(j.memoizedState=b,Vr=!0),j=j.queue,um(eE.bind(null,M,j,u),[u]),j.getSnapshot!==h||J||Jr!==null&&Jr.memoizedState.tag&1){if(M.flags|=2048,To(9,{destroy:void 0},QC.bind(null,M,j,b,h),null),vr===null)throw Error(r(349));U||(Do&127)!==0||jb(M,h,b)}return b}function jb(u,h,b){u.flags|=16384,u={getSnapshot:h,value:b},h=cn.updateQueue,h===null?(h=If(),cn.updateQueue=h,h.stores=[u]):(b=h.stores,b===null?h.stores=[u]:b.push(u))}function QC(u,h,b,M){h.value=b,h.getSnapshot=M,ko(h)&&tE(u)}function eE(u,h,b){return b(function(){ko(h)&&tE(u)})}function ko(u){var h=u.getSnapshot;u=u.value;try{var b=h();return!Ur(u,b)}catch{return!0}}function tE(u){var h=rl(u,2);h!==null&&Xi(h,u,2)}function zf(u){var h=oi();if(typeof u=="function"){var b=u;if(u=b(),dd){Rt(!0);try{b()}finally{Rt(!1)}}}return h.memoizedState=h.baseState=u,h.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:u},h}function h0(u,h,b,M){return u.baseState=b,Rb(u,ur,typeof M=="function"?M:ja)}function nE(u,h,b,M,j){if(fm(u))throw Error(r(485));if(u=h.action,u!==null){var U={payload:j,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(J){U.listeners.push(J)}};H.T!==null?b(!0):U.isTransition=!1,M(U),b=h.pending,b===null?(U.next=h.pending=U,Ib(h,U)):(U.next=b.next,h.pending=b.next=U)}}function Ib(u,h){var b=h.action,M=h.payload,j=u.state;if(h.isTransition){var U=H.T,J={};H.T=J;try{var se=b(j,M),ge=H.S;ge!==null&&ge(J,se),Yi(u,h,se)}catch(Re){am(u,h,Re)}finally{U!==null&&J.types!==null&&(U.types=J.types),H.T=U}}else try{U=b(j,M),Yi(u,h,U)}catch(Re){am(u,h,Re)}}function Yi(u,h,b){b!==null&&typeof b=="object"&&typeof b.then=="function"?b.then(function(M){Zl(u,h,M)},function(M){return am(u,h,M)}):Zl(u,h,b)}function Zl(u,h,b){h.status="fulfilled",h.value=b,Lb(h),u.state=b,h=u.pending,h!==null&&(b=h.next,b===h?u.pending=null:(b=b.next,h.next=b,Ib(u,b)))}function am(u,h,b){var M=u.pending;if(u.pending=null,M!==null){M=M.next;do h.status="rejected",h.reason=b,Lb(h),h=h.next;while(h!==M)}u.action=null}function Lb(u){u=u.listeners;for(var h=0;h<u.length;h++)(0,u[h])()}function lm(u,h){return h}function Pb(u,h){if(jn){var b=vr.formState;if(b!==null){e:{var M=cn;if(jn){if(Jn){t:{for(var j=Jn,U=ta;j.nodeType!==8;){if(!U){j=null;break t}if(j=la(j.nextSibling),j===null){j=null;break t}}U=j.data,j=U==="F!"||U==="F"?j:null}if(j){Jn=la(j.nextSibling),M=j.data==="F!";break e}}Pc(M)}M=!1}M&&(h=b[0])}}return b=oi(),b.memoizedState=b.baseState=h,M={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lm,lastRenderedState:h},b.queue=M,b=Gb.bind(null,cn,M),M.dispatch=b,M=zf(!1),U=Bf.bind(null,cn,!1,M.queue),M=oi(),j={state:h,dispatch:null,action:u,pending:null},M.queue=j,b=nE.bind(null,cn,j,U,b),j.dispatch=b,M.memoizedState=u,[h,b,!1]}function m0(u){var h=ls();return $b(h,ur,u)}function $b(u,h,b){if(h=Rb(u,h,lm)[0],u=un(ja)[0],typeof h=="object"&&h!==null&&typeof h.then=="function")try{var M=Lf(h)}catch(J){throw J===Af?tm:J}else M=h;h=ls();var j=h.queue,U=j.dispatch;return b!==h.memoizedState&&(cn.flags|=2048,To(9,{destroy:void 0},zb.bind(null,j,b),null)),[M,U,u]}function zb(u,h){u.action=h}function g0(u){var h=ls(),b=ur;if(b!==null)return $b(h,b,u);ls(),h=h.memoizedState,b=ls();var M=b.queue.dispatch;return b.memoizedState=u,[h,M,!1]}function To(u,h,b,M){return u={tag:u,create:b,deps:M,inst:h,next:null},h=cn.updateQueue,h===null&&(h=If(),cn.updateQueue=h),b=h.lastEffect,b===null?h.lastEffect=u.next=u:(M=b.next,b.next=u,u.next=M,h.lastEffect=u),u}function rE(){return ls().memoizedState}function Ia(u,h,b,M){var j=oi();cn.flags|=u,j.memoizedState=To(1|h,{destroy:void 0},b,M===void 0?null:M)}function cm(u,h,b,M){var j=ls();M=M===void 0?null:M;var U=j.memoizedState.inst;ur!==null&&M!==null&&u0(M,ur.memoizedState.deps)?j.memoizedState=To(h,U,b,M):(cn.flags|=u,j.memoizedState=To(1|h,U,b,M))}function Fb(u,h){Ia(8390656,8,u,h)}function um(u,h){cm(2048,8,u,h)}function kO(u){cn.flags|=4;var h=cn.updateQueue;if(h===null)h=If(),cn.updateQueue=h,h.events=[u];else{var b=h.events;b===null?h.events=[u]:b.push(u)}}function sE(u){var h=ls().memoizedState;return kO({ref:h,nextImpl:u}),function(){if((Wn&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}function iE(u,h){return cm(4,2,u,h)}function Bb(u,h){return cm(4,4,u,h)}function Hb(u,h){if(typeof h=="function"){u=u();var b=h(u);return function(){typeof b=="function"?b():h(null)}}if(h!=null)return u=u(),h.current=u,function(){h.current=null}}function oE(u,h,b){b=b!=null?b.concat([u]):null,cm(4,4,Hb.bind(null,h,u),b)}function v0(){}function qb(u,h){var b=ls();h=h===void 0?null:h;var M=b.memoizedState;return h!==null&&u0(h,M[1])?M[0]:(b.memoizedState=[u,h],u)}function Di(u,h){var b=ls();h=h===void 0?null:h;var M=b.memoizedState;if(h!==null&&u0(h,M[1]))return M[0];if(M=u(),dd){Rt(!0);try{u()}finally{Rt(!1)}}return b.memoizedState=[M,h],M}function aa(u,h,b){return b===void 0||(Do&1073741824)!==0&&(Rn&261930)===0?u.memoizedState=h:(u.memoizedState=b,u=NE(),cn.lanes|=u,Zc|=u,b)}function aE(u,h,b,M){return Ur(b,h)?b:Kl.current!==null?(u=aa(u,b,M),Ur(u,h)||(Vr=!0),u):(Do&42)===0||(Do&1073741824)!==0&&(Rn&261930)===0?(Vr=!0,u.memoizedState=b):(u=NE(),cn.lanes|=u,Zc|=u,h)}function lE(u,h,b,M,j){var U=B.p;B.p=U!==0&&8>U?U:8;var J=H.T,se={};H.T=se,Bf(u,!1,h,b);try{var ge=j(),Re=H.S;if(Re!==null&&Re(se,ge),ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Ge=EO(ge,M);Ff(u,h,Ge,Oo(u))}else Ff(u,h,M,Oo(u))}catch(Ze){Ff(u,h,{then:function(){},status:"rejected",reason:Ze},Oo())}finally{B.p=U,J!==null&&se.types!==null&&(J.types=se.types),H.T=J}}function y0(){}function Vc(u,h,b,M){if(u.tag!==5)throw Error(r(476));var j=Ub(u).queue;lE(u,j,h,V,b===null?y0:function(){return Vb(u),b(M)})}function Ub(u){var h=u.memoizedState;if(h!==null)return h;h={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:V},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:b},next:null},u.memoizedState=h,u=u.alternate,u!==null&&(u.memoizedState=h),h}function Vb(u){var h=Ub(u);h.next===null&&(h=u.alternate.memoizedState),Ff(u,h.next.queue,{},Oo())}function Wb(){return Ks(rp)}function Yb(){return ls().memoizedState}function fd(){return ls().memoizedState}function dm(u){for(var h=u.return;h!==null;){switch(h.tag){case 24:case 3:var b=Oo();u=Hc(b);var M=Ra(h,u,b);M!==null&&(Xi(M,h,b),nm(M,h,b)),h={cache:Aa()},u.payload=h;return}h=h.return}}function TO(u,h,b){var M=Oo();b={lane:M,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},fm(u)?pm(h,b):(b=Jv(u,h,b,M),b!==null&&(Xi(b,u,M),b0(b,h,M)))}function Gb(u,h,b){var M=Oo();Ff(u,h,b,M)}function Ff(u,h,b,M){var j={lane:M,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null};if(fm(u))pm(h,j);else{var U=u.alternate;if(u.lanes===0&&(U===null||U.lanes===0)&&(U=h.lastRenderedReducer,U!==null))try{var J=h.lastRenderedState,se=U(J,b);if(j.hasEagerState=!0,j.eagerState=se,Ur(se,J))return rd(u,h,j,0),vr===null&&Ta(),!1}catch{}finally{}if(b=Jv(u,h,j,M),b!==null)return Xi(b,u,M),b0(b,h,M),!0}return!1}function Bf(u,h,b,M){if(M={lane:2,revertLane:Ro(),gesture:null,action:M,hasEagerState:!1,eagerState:null,next:null},fm(u)){if(h)throw Error(r(479))}else h=Jv(u,b,M,2),h!==null&&Xi(h,u,2)}function fm(u){var h=u.alternate;return u===cn||h!==null&&h===cn}function pm(u,h){Nf=im=!0;var b=u.pending;b===null?h.next=h:(h.next=b.next,b.next=h),u.pending=h}function b0(u,h,b){if((b&4194048)!==0){var M=h.lanes;M&=u.pendingLanes,b|=M,h.lanes=b,ht(u,b)}}var Wc={readContext:Ks,use:Pf,useCallback:Lr,useContext:Lr,useEffect:Lr,useImperativeHandle:Lr,useLayoutEffect:Lr,useInsertionEffect:Lr,useMemo:Lr,useReducer:Lr,useRef:Lr,useState:Lr,useDebugValue:Lr,useDeferredValue:Lr,useTransition:Lr,useSyncExternalStore:Lr,useId:Lr,useHostTransitionStatus:Lr,useFormState:Lr,useActionState:Lr,useOptimistic:Lr,useMemoCache:Lr,useCacheRefresh:Lr};Wc.useEffectEvent=Lr;var cE={readContext:Ks,use:Pf,useCallback:function(u,h){return oi().memoizedState=[u,h===void 0?null:h],u},useContext:Ks,useEffect:Fb,useImperativeHandle:function(u,h,b){b=b!=null?b.concat([u]):null,Ia(4194308,4,Hb.bind(null,h,u),b)},useLayoutEffect:function(u,h){return Ia(4194308,4,u,h)},useInsertionEffect:function(u,h){Ia(4,2,u,h)},useMemo:function(u,h){var b=oi();h=h===void 0?null:h;var M=u();if(dd){Rt(!0);try{u()}finally{Rt(!1)}}return b.memoizedState=[M,h],M},useReducer:function(u,h,b){var M=oi();if(b!==void 0){var j=b(h);if(dd){Rt(!0);try{b(h)}finally{Rt(!1)}}}else j=h;return M.memoizedState=M.baseState=j,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:j},M.queue=u,u=u.dispatch=TO.bind(null,cn,u),[M.memoizedState,u]},useRef:function(u){var h=oi();return u={current:u},h.memoizedState=u},useState:function(u){u=zf(u);var h=u.queue,b=Gb.bind(null,cn,h);return h.dispatch=b,[u.memoizedState,b]},useDebugValue:v0,useDeferredValue:function(u,h){var b=oi();return aa(b,u,h)},useTransition:function(){var u=zf(!1);return u=lE.bind(null,cn,u.queue,!0,!1),oi().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,h,b){var M=cn,j=oi();if(jn){if(b===void 0)throw Error(r(407));b=b()}else{if(b=h(),vr===null)throw Error(r(349));(Rn&127)!==0||jb(M,h,b)}j.memoizedState=b;var U={value:b,getSnapshot:h};return j.queue=U,Fb(eE.bind(null,M,U,u),[u]),M.flags|=2048,To(9,{destroy:void 0},QC.bind(null,M,U,b,h),null),b},useId:function(){var u=oi(),h=vr.identifierPrefix;if(jn){var b=ea,M=sl;b=(M&~(1<<32-Nt(M)-1)).toString(32)+b,h="_"+h+"R_"+b,b=c0++,0<b&&(h+="H"+b.toString(32)),h+="_"}else b=MO++,h="_"+h+"r_"+b.toString(32)+"_";return u.memoizedState=h},useHostTransitionStatus:Wb,useFormState:Pb,useActionState:Pb,useOptimistic:function(u){var h=oi();h.memoizedState=h.baseState=u;var b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return h.queue=b,h=Bf.bind(null,cn,!0,b),b.dispatch=h,[u,h]},useMemoCache:Ob,useCacheRefresh:function(){return oi().memoizedState=dm.bind(null,cn)},useEffectEvent:function(u){var h=oi(),b={impl:u};return h.memoizedState=b,function(){if((Wn&2)!==0)throw Error(r(440));return b.impl.apply(void 0,arguments)}}},x0={readContext:Ks,use:Pf,useCallback:qb,useContext:Ks,useEffect:um,useImperativeHandle:oE,useInsertionEffect:iE,useLayoutEffect:Bb,useMemo:Di,useReducer:un,useRef:rE,useState:function(){return un(ja)},useDebugValue:v0,useDeferredValue:function(u,h){var b=ls();return aE(b,ur.memoizedState,u,h)},useTransition:function(){var u=un(ja)[0],h=ls().memoizedState;return[typeof u=="boolean"?u:Lf(u),h]},useSyncExternalStore:$f,useId:Yb,useHostTransitionStatus:Wb,useFormState:m0,useActionState:m0,useOptimistic:function(u,h){var b=ls();return h0(b,ur,u,h)},useMemoCache:Ob,useCacheRefresh:fd};x0.useEffectEvent=sE;var hm={readContext:Ks,use:Pf,useCallback:qb,useContext:Ks,useEffect:um,useImperativeHandle:oE,useInsertionEffect:iE,useLayoutEffect:Bb,useMemo:Di,useReducer:Nb,useRef:rE,useState:function(){return Nb(ja)},useDebugValue:v0,useDeferredValue:function(u,h){var b=ls();return ur===null?aa(b,u,h):aE(b,ur.memoizedState,u,h)},useTransition:function(){var u=Nb(ja)[0],h=ls().memoizedState;return[typeof u=="boolean"?u:Lf(u),h]},useSyncExternalStore:$f,useId:Yb,useHostTransitionStatus:Wb,useFormState:g0,useActionState:g0,useOptimistic:function(u,h){var b=ls();return ur!==null?h0(b,ur,u,h):(b.baseState=u,[u,b.queue.dispatch])},useMemoCache:Ob,useCacheRefresh:fd};hm.useEffectEvent=sE;function S0(u,h,b,M){h=u.memoizedState,b=b(M,h),b=b==null?h:f({},h,b),u.memoizedState=b,u.lanes===0&&(u.updateQueue.baseState=b)}var mm={enqueueSetState:function(u,h,b){u=u._reactInternals;var M=Oo(),j=Hc(M);j.payload=h,b!=null&&(j.callback=b),h=Ra(u,j,M),h!==null&&(Xi(h,u,M),nm(h,u,M))},enqueueReplaceState:function(u,h,b){u=u._reactInternals;var M=Oo(),j=Hc(M);j.tag=1,j.payload=h,b!=null&&(j.callback=b),h=Ra(u,j,M),h!==null&&(Xi(h,u,M),nm(h,u,M))},enqueueForceUpdate:function(u,h){u=u._reactInternals;var b=Oo(),M=Hc(b);M.tag=2,h!=null&&(M.callback=h),h=Ra(u,M,b),h!==null&&(Xi(h,u,b),nm(h,u,b))}};function uE(u,h,b,M,j,U,J){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(M,U,J):h.prototype&&h.prototype.isPureReactComponent?!gf(b,M)||!gf(j,U):!0}function Kb(u,h,b,M){u=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(b,M),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(b,M),h.state!==u&&mm.enqueueReplaceState(h,h.state,null)}function ki(u,h){var b=h;if("ref"in h){b={};for(var M in h)M!=="ref"&&(b[M]=h[M])}if(u=u.defaultProps){b===h&&(b=f({},b));for(var j in u)b[j]===void 0&&(b[j]=u[j])}return b}function Zb(u){Zv(u)}function Jb(u){console.error(u)}function dE(u){Zv(u)}function gm(u,h){try{var b=u.onUncaughtError;b(h.value,{componentStack:h.stack})}catch(M){setTimeout(function(){throw M})}}function fE(u,h,b){try{var M=u.onCaughtError;M(b.value,{componentStack:b.stack,errorBoundary:h.tag===1?h.stateNode:null})}catch(j){setTimeout(function(){throw j})}}function Xb(u,h,b){return b=Hc(b),b.tag=3,b.payload={element:null},b.callback=function(){gm(u,h)},b}function ll(u){return u=Hc(u),u.tag=3,u}function w0(u,h,b,M){var j=b.type.getDerivedStateFromError;if(typeof j=="function"){var U=M.value;u.payload=function(){return j(U)},u.callback=function(){fE(h,b,M)}}var J=b.stateNode;J!==null&&typeof J.componentDidCatch=="function"&&(u.callback=function(){fE(h,b,M),typeof j!="function"&&(Jc===null?Jc=new Set([this]):Jc.add(this));var se=M.stack;this.componentDidCatch(M.value,{componentStack:se!==null?se:""})})}function Qb(u,h,b,M,j){if(b.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){if(h=b.alternate,h!==null&&Df(h,b,j,!0),b=Mo.current,b!==null){switch(b.tag){case 31:case 13:return ia===null?L0():b.alternate===null&&Wr===0&&(Wr=3),b.flags&=-257,b.flags|=65536,b.lanes=j,M===r0?b.flags|=16384:(h=b.updateQueue,h===null?b.updateQueue=new Set([M]):h.add(M),T2(u,M,j)),!1;case 22:return b.flags|=65536,M===r0?b.flags|=16384:(h=b.updateQueue,h===null?(h={transitions:null,markerInstances:null,retryQueue:new Set([M])},b.updateQueue=h):(b=h.retryQueue,b===null?h.retryQueue=new Set([M]):b.add(M)),T2(u,M,j)),!1}throw Error(r(435,b.tag))}return T2(u,M,j),L0(),!1}if(jn)return h=Mo.current,h!==null?((h.flags&65536)===0&&(h.flags|=256),h.flags|=65536,h.lanes=j,M!==wb&&(u=Error(r(422),{cause:M}),zc(wo(u,b)))):(M!==wb&&(h=Error(r(423),{cause:M}),zc(wo(h,b))),u=u.current.alternate,u.flags|=65536,j&=-j,u.lanes|=j,M=wo(M,b),j=Xb(u.stateNode,M,j),o0(u,j),Wr!==4&&(Wr=2)),!1;var U=Error(r(520),{cause:M});if(U=wo(U,b),_m===null?_m=[U]:_m.push(U),Wr!==4&&(Wr=2),h===null)return!0;M=wo(M,b),b=h;do{switch(b.tag){case 3:return b.flags|=65536,u=j&-j,b.lanes|=u,u=Xb(b.stateNode,M,u),o0(b,u),!1;case 1:if(h=b.type,U=b.stateNode,(b.flags&128)===0&&(typeof h.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Jc===null||!Jc.has(U))))return b.flags|=65536,j&=-j,b.lanes|=j,j=ll(j),w0(j,u,b,M),o0(b,j),!1}b=b.return}while(b!==null);return!1}var vm=Error(r(461)),Vr=!1;function Xr(u,h,b,M){h.child=u===null?kb(h,null,b,M):Bc(h,u.child,b,M)}function Ht(u,h,b,M,j){b=b.render;var U=h.ref;if("ref"in M){var J={};for(var se in M)se!=="ref"&&(J[se]=M[se])}else J=M;return ad(h),M=d0(u,h,b,J,U,j),se=f0(),u!==null&&!Vr?(p0(u,h,j),cl(u,h,j)):(jn&&se&&Ic(h),h.flags|=1,Xr(u,h,M,j),h.child)}function ym(u,h,b,M,j){if(u===null){var U=b.type;return typeof U=="function"&&!Ul(U)&&U.defaultProps===void 0&&b.compare===null?(h.tag=15,h.type=U,C0(u,h,U,M,j)):(u=Xv(b.type,null,M,h,h.mode,j),u.ref=h.ref,u.return=h,h.child=u)}if(U=u.child,!T0(u,j)){var J=U.memoizedProps;if(b=b.compare,b=b!==null?b:gf,b(J,M)&&u.ref===h.ref)return cl(u,h,j)}return h.flags|=1,u=Jo(U,M),u.ref=h.ref,u.return=h,h.child=u}function C0(u,h,b,M,j){if(u!==null){var U=u.memoizedProps;if(gf(U,M)&&u.ref===h.ref)if(Vr=!1,h.pendingProps=M=U,T0(u,j))(u.flags&131072)!==0&&(Vr=!0);else return h.lanes=u.lanes,cl(u,h,j)}return D0(u,h,b,M,j)}function Yc(u,h,b,M){var j=M.children,U=u!==null?u.memoizedState:null;if(u===null&&h.stateNode===null&&(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),M.mode==="hidden"){if((h.flags&128)!==0){if(U=U!==null?U.baseLanes|b:b,u!==null){for(M=h.child=u.child,j=0;M!==null;)j=j|M.lanes|M.childLanes,M=M.sibling;M=j&~U}else M=0,h.child=null;return E0(u,h,U,b,M)}if((b&536870912)!==0)h.memoizedState={baseLanes:0,cachePool:null},u!==null&&t0(h,U!==null?U.cachePool:null),U!==null?Tb(h,U):Zs(),XC(h);else return M=h.lanes=536870912,E0(u,h,U!==null?U.baseLanes|b:b,b,M)}else U!==null?(t0(h,U.cachePool),Tb(h,U),oa(),h.memoizedState=null):(u!==null&&t0(h,null),Zs(),oa());return Xr(u,h,j,b),h.child}function bm(u,h){return u!==null&&u.tag===22||h.stateNode!==null||(h.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.sibling}function E0(u,h,b,M,j){var U=Mb();return U=U===null?null:{parent:bs._currentValue,pool:U},h.memoizedState={baseLanes:b,cachePool:U},u!==null&&t0(h,null),Zs(),XC(h),u!==null&&Df(u,h,M,!0),h.childLanes=j,null}function xm(u,h){return h=k0({mode:h.mode,children:h.children},u.mode),h.ref=u.ref,u.child=h,h.return=u,h}function Js(u,h,b){return Bc(h,u.child,null,b),u=xm(h,h.pendingProps),u.flags|=2,Wi(h),h.memoizedState=null,u}function AO(u,h,b){var M=h.pendingProps,j=(h.flags&128)!==0;if(h.flags&=-129,u===null){if(jn){if(M.mode==="hidden")return u=xm(h,M),h.lanes=536870912,bm(null,u);if(sm(h),(u=Jn)?(u=nM(u,ta),u=u!==null&&u.data==="&"?u:null,u!==null&&(h.memoizedState={dehydrated:u,treeContext:Vl!==null?{id:sl,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},b=Zh(u),b.return=h,h.child=b,ys=h,Jn=null)):u=null,u===null)throw Pc(h);return h.lanes=536870912,null}return xm(h,M)}var U=u.memoizedState;if(U!==null){var J=U.dehydrated;if(sm(h),j)if(h.flags&256)h.flags&=-257,h=Js(u,h,b);else if(h.memoizedState!==null)h.child=u.child,h.flags|=128,h=null;else throw Error(r(558));else if(Vr||Df(u,h,b,!1),j=(b&u.childLanes)!==0,Vr||j){if(M=vr,M!==null&&(J=kt(M,b),J!==0&&J!==U.retryLane))throw U.retryLane=J,rl(u,J),Xi(M,u,J),vm;L0(),h=Js(u,h,b)}else u=U.treeContext,Jn=la(J.nextSibling),ys=h,jn=!0,Lc=null,ta=!1,u!==null&&Ef(h,u),h=xm(h,M),h.flags|=4096;return h}return u=Jo(u.child,{mode:M.mode,children:M.children}),u.ref=h.ref,h.child=u,u.return=h,u}function M0(u,h){var b=h.ref;if(b===null)u!==null&&u.ref!==null&&(h.flags|=4194816);else{if(typeof b!="function"&&typeof b!="object")throw Error(r(284));(u===null||u.ref!==b)&&(h.flags|=4194816)}}function D0(u,h,b,M,j){return ad(h),b=d0(u,h,b,M,void 0,j),M=f0(),u!==null&&!Vr?(p0(u,h,j),cl(u,h,j)):(jn&&M&&Ic(h),h.flags|=1,Xr(u,h,b,j),h.child)}function pE(u,h,b,M,j,U){return ad(h),h.updateQueue=null,b=om(h,M,b,j),Ab(u),M=f0(),u!==null&&!Vr?(p0(u,h,U),cl(u,h,U)):(jn&&M&&Ic(h),h.flags|=1,Xr(u,h,b,U),h.child)}function e2(u,h,b,M,j){if(ad(h),h.stateNode===null){var U=ql,J=b.contextType;typeof J=="object"&&J!==null&&(U=Ks(J)),U=new b(M,U),h.memoizedState=U.state!==null&&U.state!==void 0?U.state:null,U.updater=mm,h.stateNode=U,U._reactInternals=h,U=h.stateNode,U.props=M,U.state=h.memoizedState,U.refs={},ol(h),J=b.contextType,U.context=typeof J=="object"&&J!==null?Ks(J):ql,U.state=h.memoizedState,J=b.getDerivedStateFromProps,typeof J=="function"&&(S0(h,b,J,M),U.state=h.memoizedState),typeof b.getDerivedStateFromProps=="function"||typeof U.getSnapshotBeforeUpdate=="function"||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(J=U.state,typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount(),J!==U.state&&mm.enqueueReplaceState(U,U.state,null),Rf(h,M,U,j),ud(),U.state=h.memoizedState),typeof U.componentDidMount=="function"&&(h.flags|=4194308),M=!0}else if(u===null){U=h.stateNode;var se=h.memoizedProps,ge=ki(b,se);U.props=ge;var Re=U.context,Ge=b.contextType;J=ql,typeof Ge=="object"&&Ge!==null&&(J=Ks(Ge));var Ze=b.getDerivedStateFromProps;Ge=typeof Ze=="function"||typeof U.getSnapshotBeforeUpdate=="function",se=h.pendingProps!==se,Ge||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(se||Re!==J)&&Kb(h,U,M,J),sa=!1;var Ie=h.memoizedState;U.state=Ie,Rf(h,M,U,j),ud(),Re=h.memoizedState,se||Ie!==Re||sa?(typeof Ze=="function"&&(S0(h,b,Ze,M),Re=h.memoizedState),(ge=sa||uE(h,b,ge,M,Ie,Re,J))?(Ge||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(h.flags|=4194308)):(typeof U.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=M,h.memoizedState=Re),U.props=M,U.state=Re,U.context=J,M=ge):(typeof U.componentDidMount=="function"&&(h.flags|=4194308),M=!1)}else{U=h.stateNode,i0(u,h),J=h.memoizedProps,Ge=ki(b,J),U.props=Ge,Ze=h.pendingProps,Ie=U.context,Re=b.contextType,ge=ql,typeof Re=="object"&&Re!==null&&(ge=Ks(Re)),se=b.getDerivedStateFromProps,(Re=typeof se=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(J!==Ze||Ie!==ge)&&Kb(h,U,M,ge),sa=!1,Ie=h.memoizedState,U.state=Ie,Rf(h,M,U,j),ud();var ze=h.memoizedState;J!==Ze||Ie!==ze||sa||u!==null&&u.dependencies!==null&&e0(u.dependencies)?(typeof se=="function"&&(S0(h,b,se,M),ze=h.memoizedState),(Ge=sa||uE(h,b,Ge,M,Ie,ze,ge)||u!==null&&u.dependencies!==null&&e0(u.dependencies))?(Re||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(M,ze,ge),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(M,ze,ge)),typeof U.componentDidUpdate=="function"&&(h.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof U.componentDidUpdate!="function"||J===u.memoizedProps&&Ie===u.memoizedState||(h.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||J===u.memoizedProps&&Ie===u.memoizedState||(h.flags|=1024),h.memoizedProps=M,h.memoizedState=ze),U.props=M,U.state=ze,U.context=ge,M=Ge):(typeof U.componentDidUpdate!="function"||J===u.memoizedProps&&Ie===u.memoizedState||(h.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||J===u.memoizedProps&&Ie===u.memoizedState||(h.flags|=1024),M=!1)}return U=M,M0(u,h),M=(h.flags&128)!==0,U||M?(U=h.stateNode,b=M&&typeof b.getDerivedStateFromError!="function"?null:U.render(),h.flags|=1,u!==null&&M?(h.child=Bc(h,u.child,null,j),h.child=Bc(h,null,b,j)):Xr(u,h,b,j),h.memoizedState=U.state,u=h.child):u=cl(u,h,j),u}function hE(u,h,b,M){return ie(),h.flags|=256,Xr(u,h,b,M),h.child}var t2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function n2(u){return{baseLanes:u,cachePool:GC()}}function La(u,h,b){return u=u!==null?u.childLanes&~b:0,h&&(u|=_o),u}function ai(u,h,b){var M=h.pendingProps,j=!1,U=(h.flags&128)!==0,J;if((J=U)||(J=u!==null&&u.memoizedState===null?!1:(as.current&2)!==0),J&&(j=!0,h.flags&=-129),J=(h.flags&32)!==0,h.flags&=-33,u===null){if(jn){if(j?qc(h):oa(),(u=Jn)?(u=nM(u,ta),u=u!==null&&u.data!=="&"?u:null,u!==null&&(h.memoizedState={dehydrated:u,treeContext:Vl!==null?{id:sl,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},b=Zh(u),b.return=h,h.child=b,ys=h,Jn=null)):u=null,u===null)throw Pc(h);return Jf(u)?h.lanes=32:h.lanes=536870912,null}var se=M.children;return M=M.fallback,j?(oa(),j=h.mode,se=k0({mode:"hidden",children:se},j),M=sd(M,j,b,null),se.return=h,M.return=h,se.sibling=M,h.child=se,M=h.child,M.memoizedState=n2(b),M.childLanes=La(u,J,b),h.memoizedState=t2,bm(null,M)):(qc(h),Sm(h,se))}var ge=u.memoizedState;if(ge!==null&&(se=ge.dehydrated,se!==null)){if(U)h.flags&256?(qc(h),h.flags&=-257,h=wm(u,h,b)):h.memoizedState!==null?(oa(),h.child=u.child,h.flags|=128,h=null):(oa(),se=M.fallback,j=h.mode,M=k0({mode:"visible",children:M.children},j),se=sd(se,j,b,null),se.flags|=2,M.return=h,se.return=h,M.sibling=se,h.child=M,Bc(h,u.child,null,b),M=h.child,M.memoizedState=n2(b),M.childLanes=La(u,J,b),h.memoizedState=t2,h=bm(null,M));else if(qc(h),Jf(se)){if(J=se.nextSibling&&se.nextSibling.dataset,J)var Re=J.dgst;J=Re,M=Error(r(419)),M.stack="",M.digest=J,zc({value:M,source:null,stack:null}),h=wm(u,h,b)}else if(Vr||Df(u,h,b,!1),J=(b&u.childLanes)!==0,Vr||J){if(J=vr,J!==null&&(M=kt(J,b),M!==0&&M!==ge.retryLane))throw ge.retryLane=M,rl(u,M),Xi(J,u,M),vm;V0(se)||L0(),h=wm(u,h,b)}else V0(se)?(h.flags|=192,h.child=u.child,h=null):(u=ge.treeContext,Jn=la(se.nextSibling),ys=h,jn=!0,Lc=null,ta=!1,u!==null&&Ef(h,u),h=Sm(h,M.children),h.flags|=4096);return h}return j?(oa(),se=M.fallback,j=h.mode,ge=u.child,Re=ge.sibling,M=Jo(ge,{mode:"hidden",children:M.children}),M.subtreeFlags=ge.subtreeFlags&65011712,Re!==null?se=Jo(Re,se):(se=sd(se,j,b,null),se.flags|=2),se.return=h,M.return=h,M.sibling=se,h.child=M,bm(null,M),M=h.child,se=u.child.memoizedState,se===null?se=n2(b):(j=se.cachePool,j!==null?(ge=bs._currentValue,j=j.parent!==ge?{parent:ge,pool:ge}:j):j=GC(),se={baseLanes:se.baseLanes|b,cachePool:j}),M.memoizedState=se,M.childLanes=La(u,J,b),h.memoizedState=t2,bm(u.child,M)):(qc(h),b=u.child,u=b.sibling,b=Jo(b,{mode:"visible",children:M.children}),b.return=h,b.sibling=null,u!==null&&(J=h.deletions,J===null?(h.deletions=[u],h.flags|=16):J.push(u)),h.child=b,h.memoizedState=null,b)}function Sm(u,h){return h=k0({mode:"visible",children:h},u.mode),h.return=u,u.child=h}function k0(u,h){return u=Gs(22,u,null,h),u.lanes=0,u}function wm(u,h,b){return Bc(h,u.child,null,b),u=Sm(h,h.pendingProps.children),u.flags|=2,h.memoizedState=null,u}function mE(u,h,b){u.lanes|=h;var M=u.alternate;M!==null&&(M.lanes|=h),Gl(u.return,h,b)}function r2(u,h,b,M,j,U){var J=u.memoizedState;J===null?u.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:M,tail:b,tailMode:j,treeForkCount:U}:(J.isBackwards=h,J.rendering=null,J.renderingStartTime=0,J.last=M,J.tail=b,J.tailMode=j,J.treeForkCount=U)}function Hf(u,h,b){var M=h.pendingProps,j=M.revealOrder,U=M.tail;M=M.children;var J=as.current,se=(J&2)!==0;if(se?(J=J&1|2,h.flags|=128):J&=1,Q(as,J),Xr(u,h,M,b),M=jn?vs:0,!se&&u!==null&&(u.flags&128)!==0)e:for(u=h.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&mE(u,b,h);else if(u.tag===19)mE(u,b,h);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===h)break e;for(;u.sibling===null;){if(u.return===null||u.return===h)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}switch(j){case"forwards":for(b=h.child,j=null;b!==null;)u=b.alternate,u!==null&&l0(u)===null&&(j=b),b=b.sibling;b=j,b===null?(j=h.child,h.child=null):(j=b.sibling,b.sibling=null),r2(h,!1,j,b,U,M);break;case"backwards":case"unstable_legacy-backwards":for(b=null,j=h.child,h.child=null;j!==null;){if(u=j.alternate,u!==null&&l0(u)===null){h.child=j;break}u=j.sibling,j.sibling=b,b=j,j=u}r2(h,!0,b,null,U,M);break;case"together":r2(h,!1,null,null,void 0,M);break;default:h.memoizedState=null}return h.child}function cl(u,h,b){if(u!==null&&(h.dependencies=u.dependencies),Zc|=h.lanes,(b&h.childLanes)===0)if(u!==null){if(Df(u,h,b,!1),(b&h.childLanes)===0)return null}else return null;if(u!==null&&h.child!==u.child)throw Error(r(153));if(h.child!==null){for(u=h.child,b=Jo(u,u.pendingProps),h.child=b,b.return=h;u.sibling!==null;)u=u.sibling,b=b.sibling=Jo(u,u.pendingProps),b.return=h;b.sibling=null}return h.child}function T0(u,h){return(u.lanes&h)!==0?!0:(u=u.dependencies,!!(u!==null&&e0(u)))}function _O(u,h,b){switch(h.tag){case 3:oe(h,h.stateNode.containerInfo),Fc(h,bs,u.memoizedState.cache),ie();break;case 27:case 5:ue(h);break;case 4:oe(h,h.stateNode.containerInfo);break;case 10:Fc(h,h.type,h.memoizedProps.value);break;case 31:if(h.memoizedState!==null)return h.flags|=128,sm(h),null;break;case 13:var M=h.memoizedState;if(M!==null)return M.dehydrated!==null?(qc(h),h.flags|=128,null):(b&h.child.childLanes)!==0?ai(u,h,b):(qc(h),u=cl(u,h,b),u!==null?u.sibling:null);qc(h);break;case 19:var j=(u.flags&128)!==0;if(M=(b&h.childLanes)!==0,M||(Df(u,h,b,!1),M=(b&h.childLanes)!==0),j){if(M)return Hf(u,h,b);h.flags|=128}if(j=h.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),Q(as,as.current),M)break;return null;case 22:return h.lanes=0,Yc(u,h,b,h.pendingProps);case 24:Fc(h,bs,u.memoizedState.cache)}return cl(u,h,b)}function gE(u,h,b){if(u!==null)if(u.memoizedProps!==h.pendingProps)Vr=!0;else{if(!T0(u,b)&&(h.flags&128)===0)return Vr=!1,_O(u,h,b);Vr=(u.flags&131072)!==0}else Vr=!1,jn&&(h.flags&1048576)!==0&&Qv(h,vs,h.index);switch(h.lanes=0,h.tag){case 16:e:{var M=h.pendingProps;if(u=_a(h.elementType),h.type=u,typeof u=="function")Ul(u)?(M=ki(u,M),h.tag=1,h=e2(null,h,u,M,b)):(h.tag=0,h=D0(null,h,u,M,b));else{if(u!=null){var j=u.$$typeof;if(j===D){h.tag=11,h=Ht(null,h,u,M,b);break e}else if(j===_){h.tag=14,h=ym(null,h,u,M,b);break e}}throw h=F(u)||u,Error(r(306,h,""))}}return h;case 0:return D0(u,h,h.type,h.pendingProps,b);case 1:return M=h.type,j=ki(M,h.pendingProps),e2(u,h,M,j,b);case 3:e:{if(oe(h,h.stateNode.containerInfo),u===null)throw Error(r(387));M=h.pendingProps;var U=h.memoizedState;j=U.element,i0(u,h),Rf(h,M,null,b);var J=h.memoizedState;if(M=J.cache,Fc(h,bs,M),M!==U.cache&&Cb(h,[bs],b,!0),ud(),M=J.element,U.isDehydrated)if(U={element:M,isDehydrated:!1,cache:J.cache},h.updateQueue.baseState=U,h.memoizedState=U,h.flags&256){h=hE(u,h,M,b);break e}else if(M!==j){j=wo(Error(r(424)),h),zc(j),h=hE(u,h,M,b);break e}else{switch(u=h.stateNode.containerInfo,u.nodeType){case 9:u=u.body;break;default:u=u.nodeName==="HTML"?u.ownerDocument.body:u}for(Jn=la(u.firstChild),ys=h,jn=!0,Lc=null,ta=!0,b=kb(h,null,M,b),h.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling}else{if(ie(),M===j){h=cl(u,h,b);break e}Xr(u,h,M,b)}h=h.child}return h;case 26:return M0(u,h),u===null?(b=lM(h.type,null,h.pendingProps,null))?h.memoizedState=b:jn||(b=h.type,u=h.pendingProps,M=Hm(ne.current).createElement(b),M[Wt]=h,M[Kn]=u,Xs(M,b,u),Tr(M),h.stateNode=M):h.memoizedState=lM(h.type,u.memoizedProps,h.pendingProps,u.memoizedState),null;case 27:return ue(h),u===null&&jn&&(M=h.stateNode=iM(h.type,h.pendingProps,ne.current),ys=h,ta=!0,j=Jn,Zt(h.type)?(F2=j,Jn=la(M.firstChild)):Jn=j),Xr(u,h,h.pendingProps.children,b),M0(u,h),u===null&&(h.flags|=4194304),h.child;case 5:return u===null&&jn&&((j=M=Jn)&&(M=WO(M,h.type,h.pendingProps,ta),M!==null?(h.stateNode=M,ys=h,Jn=la(M.firstChild),ta=!1,j=!0):j=!1),j||Pc(h)),ue(h),j=h.type,U=h.pendingProps,J=u!==null?u.memoizedProps:null,M=U.children,tu(j,U)?M=null:J!==null&&tu(j,J)&&(h.flags|=32),h.memoizedState!==null&&(j=d0(u,h,DO,null,null,b),rp._currentValue=j),M0(u,h),Xr(u,h,M,b),h.child;case 6:return u===null&&jn&&((u=b=Jn)&&(b=Xn(b,h.pendingProps,ta),b!==null?(h.stateNode=b,ys=h,Jn=null,u=!0):u=!1),u||Pc(h)),null;case 13:return ai(u,h,b);case 4:return oe(h,h.stateNode.containerInfo),M=h.pendingProps,u===null?h.child=Bc(h,null,M,b):Xr(u,h,M,b),h.child;case 11:return Ht(u,h,h.type,h.pendingProps,b);case 7:return Xr(u,h,h.pendingProps,b),h.child;case 8:return Xr(u,h,h.pendingProps.children,b),h.child;case 12:return Xr(u,h,h.pendingProps.children,b),h.child;case 10:return M=h.pendingProps,Fc(h,h.type,M.value),Xr(u,h,M.children,b),h.child;case 9:return j=h.type._context,M=h.pendingProps.children,ad(h),j=Ks(j),M=M(j),h.flags|=1,Xr(u,h,M,b),h.child;case 14:return ym(u,h,h.type,h.pendingProps,b);case 15:return C0(u,h,h.type,h.pendingProps,b);case 19:return Hf(u,h,b);case 31:return AO(u,h,b);case 22:return Yc(u,h,b,h.pendingProps);case 24:return ad(h),M=Ks(bs),u===null?(j=Mb(),j===null&&(j=vr,U=Aa(),j.pooledCache=U,U.refCount++,U!==null&&(j.pooledCacheLanes|=b),j=U),h.memoizedState={parent:M,cache:j},ol(h),Fc(h,bs,j)):((u.lanes&b)!==0&&(i0(u,h),Rf(h,null,null,b),ud()),j=u.memoizedState,U=h.memoizedState,j.parent!==M?(j={parent:M,cache:M},h.memoizedState=j,h.lanes===0&&(h.memoizedState=h.updateQueue.baseState=j),Fc(h,bs,M)):(M=U.cache,Fc(h,bs,M),M!==j.cache&&Cb(h,[bs],b,!0))),Xr(u,h,h.pendingProps.children,b),h.child;case 29:throw h.pendingProps}throw Error(r(156,h.tag))}function Jl(u){u.flags|=4}function s2(u,h,b,M,j){if((h=(u.mode&32)!==0)&&(h=!1),h){if(u.flags|=16777216,(j&335544128)===j)if(u.stateNode.complete)u.flags|=8192;else if(Nm())u.flags|=8192;else throw il=r0,n0}else u.flags&=-16777217}function i2(u,h){if(h.type!=="stylesheet"||(h.state.loading&4)!==0)u.flags&=-16777217;else if(u.flags|=16777216,!pM(h))if(Nm())u.flags|=8192;else throw il=r0,n0}function Cm(u,h){h!==null&&(u.flags|=4),u.flags&16384&&(h=u.tag!==22?Rr():536870912,u.lanes|=h,Wf|=h)}function Em(u,h){if(!jn)switch(u.tailMode){case"hidden":h=u.tail;for(var b=null;h!==null;)h.alternate!==null&&(b=h),h=h.sibling;b===null?u.tail=null:b.sibling=null;break;case"collapsed":b=u.tail;for(var M=null;b!==null;)b.alternate!==null&&(M=b),b=b.sibling;M===null?h||u.tail===null?u.tail=null:u.tail.sibling=null:M.sibling=null}}function gr(u){var h=u.alternate!==null&&u.alternate.child===u.child,b=0,M=0;if(h)for(var j=u.child;j!==null;)b|=j.lanes|j.childLanes,M|=j.subtreeFlags&65011712,M|=j.flags&65011712,j.return=u,j=j.sibling;else for(j=u.child;j!==null;)b|=j.lanes|j.childLanes,M|=j.subtreeFlags,M|=j.flags,j.return=u,j=j.sibling;return u.subtreeFlags|=M,u.childLanes=b,h}function vE(u,h,b){var M=h.pendingProps;switch(id(h),h.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gr(h),null;case 1:return gr(h),null;case 3:return b=h.stateNode,M=null,u!==null&&(M=u.memoizedState.cache),h.memoizedState.cache!==M&&(h.flags|=2048),Yl(bs),ce(),b.pendingContext&&(b.context=b.pendingContext,b.pendingContext=null),(u===null||u.child===null)&&(od(h)?Jl(h):u===null||u.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,$c())),gr(h),null;case 26:var j=h.type,U=h.memoizedState;return u===null?(Jl(h),U!==null?(gr(h),i2(h,U)):(gr(h),s2(h,j,null,M,b))):U?U!==u.memoizedState?(Jl(h),gr(h),i2(h,U)):(gr(h),h.flags&=-16777217):(u=u.memoizedProps,u!==M&&Jl(h),gr(h),s2(h,j,u,M,b)),null;case 27:if(pe(h),b=ne.current,j=h.type,u!==null&&h.stateNode!=null)u.memoizedProps!==M&&Jl(h);else{if(!M){if(h.stateNode===null)throw Error(r(166));return gr(h),null}u=X.current,od(h)?Xh(h):(u=iM(j,M,b),h.stateNode=u,Jl(h))}return gr(h),null;case 5:if(pe(h),j=h.type,u!==null&&h.stateNode!=null)u.memoizedProps!==M&&Jl(h);else{if(!M){if(h.stateNode===null)throw Error(r(166));return gr(h),null}if(U=X.current,od(h))Xh(h);else{var J=Hm(ne.current);switch(U){case 1:U=J.createElementNS("http://www.w3.org/2000/svg",j);break;case 2:U=J.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;default:switch(j){case"svg":U=J.createElementNS("http://www.w3.org/2000/svg",j);break;case"math":U=J.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;case"script":U=J.createElement("div"),U.innerHTML="<script><\/script>",U=U.removeChild(U.firstChild);break;case"select":U=typeof M.is=="string"?J.createElement("select",{is:M.is}):J.createElement("select"),M.multiple?U.multiple=!0:M.size&&(U.size=M.size);break;default:U=typeof M.is=="string"?J.createElement(j,{is:M.is}):J.createElement(j)}}U[Wt]=h,U[Kn]=M;e:for(J=h.child;J!==null;){if(J.tag===5||J.tag===6)U.appendChild(J.stateNode);else if(J.tag!==4&&J.tag!==27&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===h)break e;for(;J.sibling===null;){if(J.return===null||J.return===h)break e;J=J.return}J.sibling.return=J.return,J=J.sibling}h.stateNode=U;e:switch(Xs(U,j,M),j){case"button":case"input":case"select":case"textarea":M=!!M.autoFocus;break e;case"img":M=!0;break e;default:M=!1}M&&Jl(h)}}return gr(h),s2(h,h.type,u===null?null:u.memoizedProps,h.pendingProps,b),null;case 6:if(u&&h.stateNode!=null)u.memoizedProps!==M&&Jl(h);else{if(typeof M!="string"&&h.stateNode===null)throw Error(r(166));if(u=ne.current,od(h)){if(u=h.stateNode,b=h.memoizedProps,M=null,j=ys,j!==null)switch(j.tag){case 27:case 5:M=j.memoizedProps}u[Wt]=h,u=!!(u.nodeValue===b||M!==null&&M.suppressHydrationWarning===!0||XE(u.nodeValue,b)),u||Pc(h,!0)}else u=Hm(u).createTextNode(M),u[Wt]=h,h.stateNode=u}return gr(h),null;case 31:if(b=h.memoizedState,u===null||u.memoizedState!==null){if(M=od(h),b!==null){if(u===null){if(!M)throw Error(r(318));if(u=h.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(557));u[Wt]=h}else ie(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;gr(h),u=!1}else b=$c(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=b),u=!0;if(!u)return h.flags&256?(Wi(h),h):(Wi(h),null);if((h.flags&128)!==0)throw Error(r(558))}return gr(h),null;case 13:if(M=h.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(j=od(h),M!==null&&M.dehydrated!==null){if(u===null){if(!j)throw Error(r(318));if(j=h.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(r(317));j[Wt]=h}else ie(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;gr(h),j=!1}else j=$c(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=j),j=!0;if(!j)return h.flags&256?(Wi(h),h):(Wi(h),null)}return Wi(h),(h.flags&128)!==0?(h.lanes=b,h):(b=M!==null,u=u!==null&&u.memoizedState!==null,b&&(M=h.child,j=null,M.alternate!==null&&M.alternate.memoizedState!==null&&M.alternate.memoizedState.cachePool!==null&&(j=M.alternate.memoizedState.cachePool.pool),U=null,M.memoizedState!==null&&M.memoizedState.cachePool!==null&&(U=M.memoizedState.cachePool.pool),U!==j&&(M.flags|=2048)),b!==u&&b&&(h.child.flags|=8192),Cm(h,h.updateQueue),gr(h),null);case 4:return ce(),u===null&&N2(h.stateNode.containerInfo),gr(h),null;case 10:return Yl(h.type),gr(h),null;case 19:if(Z(as),M=h.memoizedState,M===null)return gr(h),null;if(j=(h.flags&128)!==0,U=M.rendering,U===null)if(j)Em(M,!1);else{if(Wr!==0||u!==null&&(u.flags&128)!==0)for(u=h.child;u!==null;){if(U=l0(u),U!==null){for(h.flags|=128,Em(M,!1),u=U.updateQueue,h.updateQueue=u,Cm(h,u),h.subtreeFlags=0,u=b,b=h.child;b!==null;)UC(b,u),b=b.sibling;return Q(as,as.current&1|2),jn&&Co(h,M.treeForkCount),h.child}u=u.sibling}M.tail!==null&&je()>md&&(h.flags|=128,j=!0,Em(M,!1),h.lanes=4194304)}else{if(!j)if(u=l0(U),u!==null){if(h.flags|=128,j=!0,u=u.updateQueue,h.updateQueue=u,Cm(h,u),Em(M,!0),M.tail===null&&M.tailMode==="hidden"&&!U.alternate&&!jn)return gr(h),null}else 2*je()-M.renderingStartTime>md&&b!==536870912&&(h.flags|=128,j=!0,Em(M,!1),h.lanes=4194304);M.isBackwards?(U.sibling=h.child,h.child=U):(u=M.last,u!==null?u.sibling=U:h.child=U,M.last=U)}return M.tail!==null?(u=M.tail,M.rendering=u,M.tail=u.sibling,M.renderingStartTime=je(),u.sibling=null,b=as.current,Q(as,j?b&1|2:b&1),jn&&Co(h,M.treeForkCount),u):(gr(h),null);case 22:case 23:return Wi(h),rm(),M=h.memoizedState!==null,u!==null?u.memoizedState!==null!==M&&(h.flags|=8192):M&&(h.flags|=8192),M?(b&536870912)!==0&&(h.flags&128)===0&&(gr(h),h.subtreeFlags&6&&(h.flags|=8192)):gr(h),b=h.updateQueue,b!==null&&Cm(h,b.retryQueue),b=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),M=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(M=h.memoizedState.cachePool.pool),M!==b&&(h.flags|=2048),u!==null&&Z(cd),null;case 24:return b=null,u!==null&&(b=u.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),Yl(bs),gr(h),null;case 25:return null;case 30:return null}throw Error(r(156,h.tag))}function Mm(u,h){switch(id(h),h.tag){case 1:return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 3:return Yl(bs),ce(),u=h.flags,(u&65536)!==0&&(u&128)===0?(h.flags=u&-65537|128,h):null;case 26:case 27:case 5:return pe(h),null;case 31:if(h.memoizedState!==null){if(Wi(h),h.alternate===null)throw Error(r(340));ie()}return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 13:if(Wi(h),u=h.memoizedState,u!==null&&u.dehydrated!==null){if(h.alternate===null)throw Error(r(340));ie()}return u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 19:return Z(as),null;case 4:return ce(),null;case 10:return Yl(h.type),null;case 22:case 23:return Wi(h),rm(),u!==null&&Z(cd),u=h.flags,u&65536?(h.flags=u&-65537|128,h):null;case 24:return Yl(bs),null;case 25:return null;default:return null}}function A0(u,h){switch(id(h),h.tag){case 3:Yl(bs),ce();break;case 26:case 27:case 5:pe(h);break;case 4:ce();break;case 31:h.memoizedState!==null&&Wi(h);break;case 13:Wi(h);break;case 19:Z(as);break;case 10:Yl(h.type);break;case 22:case 23:Wi(h),rm(),u!==null&&Z(cd);break;case 24:Yl(bs)}}function qf(u,h){try{var b=h.updateQueue,M=b!==null?b.lastEffect:null;if(M!==null){var j=M.next;b=j;do{if((b.tag&u)===u){M=void 0;var U=b.create,J=b.inst;M=U(),J.destroy=M}b=b.next}while(b!==j)}}catch(se){tr(h,h.return,se)}}function Xl(u,h,b){try{var M=h.updateQueue,j=M!==null?M.lastEffect:null;if(j!==null){var U=j.next;M=U;do{if((M.tag&u)===u){var J=M.inst,se=J.destroy;if(se!==void 0){J.destroy=void 0,j=h;var ge=b,Re=se;try{Re()}catch(Ge){tr(j,ge,Ge)}}}M=M.next}while(M!==U)}}catch(Ge){tr(h,h.return,Ge)}}function Dm(u){var h=u.updateQueue;if(h!==null){var b=u.stateNode;try{a0(h,b)}catch(M){tr(u,u.return,M)}}}function o2(u,h,b){b.props=ki(u.type,u.memoizedProps),b.state=u.memoizedState;try{b.componentWillUnmount()}catch(M){tr(u,h,M)}}function Gi(u,h){try{var b=u.ref;if(b!==null){switch(u.tag){case 26:case 27:case 5:var M=u.stateNode;break;case 30:M=u.stateNode;break;default:M=u.stateNode}typeof b=="function"?u.refCleanup=b(M):b.current=M}}catch(j){tr(u,h,j)}}function li(u,h){var b=u.ref,M=u.refCleanup;if(b!==null)if(typeof M=="function")try{M()}catch(j){tr(u,h,j)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch(j){tr(u,h,j)}else b.current=null}function yE(u){var h=u.type,b=u.memoizedProps,M=u.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&M.focus();break e;case"img":b.src?M.src=b.src:b.srcSet&&(M.srcset=b.srcSet)}}catch(j){tr(u,u.return,j)}}function _0(u,h,b){try{var M=u.stateNode;qO(M,u.type,b,h),M[Kn]=h}catch(j){tr(u,u.return,j)}}function bE(u){return u.tag===5||u.tag===3||u.tag===26||u.tag===27&&Zt(u.type)||u.tag===4}function a2(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||bE(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.tag===27&&Zt(u.type)||u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function l2(u,h,b){var M=u.tag;if(M===5||M===6)u=u.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(u,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(u),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=Fl));else if(M!==4&&(M===27&&Zt(u.type)&&(b=u.stateNode,h=null),u=u.child,u!==null))for(l2(u,h,b),u=u.sibling;u!==null;)l2(u,h,b),u=u.sibling}function O0(u,h,b){var M=u.tag;if(M===5||M===6)u=u.stateNode,h?b.insertBefore(u,h):b.appendChild(u);else if(M!==4&&(M===27&&Zt(u.type)&&(b=u.stateNode),u=u.child,u!==null))for(O0(u,h,b),u=u.sibling;u!==null;)O0(u,h,b),u=u.sibling}function xE(u){var h=u.stateNode,b=u.memoizedProps;try{for(var M=u.type,j=h.attributes;j.length;)h.removeAttributeNode(j[0]);Xs(h,M,b),h[Wt]=u,h[Kn]=b}catch(U){tr(u,u.return,U)}}var Ql=!1,xs=!1,c2=!1,SE=typeof WeakSet=="function"?WeakSet:Set,$s=null;function OO(u,h){if(u=u.containerInfo,Bm=X0,u=FC(u),xb(u)){if("selectionStart"in u)var b={start:u.selectionStart,end:u.selectionEnd};else e:{b=(b=u.ownerDocument)&&b.defaultView||window;var M=b.getSelection&&b.getSelection();if(M&&M.rangeCount!==0){b=M.anchorNode;var j=M.anchorOffset,U=M.focusNode;M=M.focusOffset;try{b.nodeType,U.nodeType}catch{b=null;break e}var J=0,se=-1,ge=-1,Re=0,Ge=0,Ze=u,Ie=null;t:for(;;){for(var ze;Ze!==b||j!==0&&Ze.nodeType!==3||(se=J+j),Ze!==U||M!==0&&Ze.nodeType!==3||(ge=J+M),Ze.nodeType===3&&(J+=Ze.nodeValue.length),(ze=Ze.firstChild)!==null;)Ie=Ze,Ze=ze;for(;;){if(Ze===u)break t;if(Ie===b&&++Re===j&&(se=J),Ie===U&&++Ge===M&&(ge=J),(ze=Ze.nextSibling)!==null)break;Ze=Ie,Ie=Ze.parentNode}Ze=ze}b=se===-1||ge===-1?null:{start:se,end:ge}}else b=null}b=b||{start:0,end:0}}else b=null;for(P2={focusedElem:u,selectionRange:b},X0=!1,$s=h;$s!==null;)if(h=$s,u=h.child,(h.subtreeFlags&1028)!==0&&u!==null)u.return=h,$s=u;else for(;$s!==null;){switch(h=$s,U=h.alternate,u=h.flags,h.tag){case 0:if((u&4)!==0&&(u=h.updateQueue,u=u!==null?u.events:null,u!==null))for(b=0;b<u.length;b++)j=u[b],j.ref.impl=j.nextImpl;break;case 11:case 15:break;case 1:if((u&1024)!==0&&U!==null){u=void 0,b=h,j=U.memoizedProps,U=U.memoizedState,M=b.stateNode;try{var _t=ki(b.type,j);u=M.getSnapshotBeforeUpdate(_t,U),M.__reactInternalSnapshotBeforeUpdate=u}catch(Ut){tr(b,b.return,Ut)}}break;case 3:if((u&1024)!==0){if(u=h.stateNode.containerInfo,b=u.nodeType,b===9)U0(u);else if(b===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":U0(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(r(163))}if(u=h.sibling,u!==null){u.return=h.return,$s=u;break}$s=h.return}}function u2(u,h,b){var M=b.flags;switch(b.tag){case 0:case 11:case 15:tc(u,b),M&4&&qf(5,b);break;case 1:if(tc(u,b),M&4)if(u=b.stateNode,h===null)try{u.componentDidMount()}catch(J){tr(b,b.return,J)}else{var j=ki(b.type,h.memoizedProps);h=h.memoizedState;try{u.componentDidUpdate(j,h,u.__reactInternalSnapshotBeforeUpdate)}catch(J){tr(b,b.return,J)}}M&64&&Dm(b),M&512&&Gi(b,b.return);break;case 3:if(tc(u,b),M&64&&(u=b.updateQueue,u!==null)){if(h=null,b.child!==null)switch(b.child.tag){case 27:case 5:h=b.child.stateNode;break;case 1:h=b.child.stateNode}try{a0(u,h)}catch(J){tr(b,b.return,J)}}break;case 27:h===null&&M&4&&xE(b);case 26:case 5:tc(u,b),h===null&&M&4&&yE(b),M&512&&Gi(b,b.return);break;case 12:tc(u,b);break;case 31:tc(u,b),M&4&&f2(u,b);break;case 13:tc(u,b),M&4&&CE(u,b),M&64&&(u=b.memoizedState,u!==null&&(u=u.dehydrated,u!==null&&(b=z0.bind(null,b),YO(u,b))));break;case 22:if(M=b.memoizedState!==null||Ql,!M){h=h!==null&&h.memoizedState!==null||xs,j=Ql;var U=xs;Ql=M,(xs=h)&&!U?ul(u,b,(b.subtreeFlags&8772)!==0):tc(u,b),Ql=j,xs=U}break;case 30:break;default:tc(u,b)}}function d2(u){var h=u.alternate;h!==null&&(u.alternate=null,d2(h)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(h=u.stateNode,h!==null&&tl(h)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}var Ar=null,Ki=!1;function ec(u,h,b){for(b=b.child;b!==null;)wE(u,h,b),b=b.sibling}function wE(u,h,b){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Ot,b)}catch{}switch(b.tag){case 26:xs||li(b,h),ec(u,h,b),b.memoizedState?b.memoizedState.count--:b.stateNode&&(b=b.stateNode,b.parentNode.removeChild(b));break;case 27:xs||li(b,h);var M=Ar,j=Ki;Zt(b.type)&&(Ar=b.stateNode,Ki=!1),ec(u,h,b),Um(b.stateNode),Ar=M,Ki=j;break;case 5:xs||li(b,h);case 6:if(M=Ar,j=Ki,Ar=null,ec(u,h,b),Ar=M,Ki=j,Ar!==null)if(Ki)try{(Ar.nodeType===9?Ar.body:Ar.nodeName==="HTML"?Ar.ownerDocument.body:Ar).removeChild(b.stateNode)}catch(U){tr(b,h,U)}else try{Ar.removeChild(b.stateNode)}catch(U){tr(b,h,U)}break;case 18:Ar!==null&&(Ki?(u=Ar,z2(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,b.stateNode),ip(u)):z2(Ar,b.stateNode));break;case 4:M=Ar,j=Ki,Ar=b.stateNode.containerInfo,Ki=!0,ec(u,h,b),Ar=M,Ki=j;break;case 0:case 11:case 14:case 15:Xl(2,b,h),xs||Xl(4,b,h),ec(u,h,b);break;case 1:xs||(li(b,h),M=b.stateNode,typeof M.componentWillUnmount=="function"&&o2(b,h,M)),ec(u,h,b);break;case 21:ec(u,h,b);break;case 22:xs=(M=xs)||b.memoizedState!==null,ec(u,h,b),xs=M;break;default:ec(u,h,b)}}function f2(u,h){if(h.memoizedState===null&&(u=h.alternate,u!==null&&(u=u.memoizedState,u!==null))){u=u.dehydrated;try{ip(u)}catch(b){tr(h,h.return,b)}}}function CE(u,h){if(h.memoizedState===null&&(u=h.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{ip(u)}catch(b){tr(h,h.return,b)}}function RO(u){switch(u.tag){case 31:case 13:case 19:var h=u.stateNode;return h===null&&(h=u.stateNode=new SE),h;case 22:return u=u.stateNode,h=u._retryCache,h===null&&(h=u._retryCache=new SE),h;default:throw Error(r(435,u.tag))}}function R0(u,h){var b=RO(u);h.forEach(function(M){if(!b.has(M)){b.add(M);var j=zO.bind(null,u,M);M.then(j,j)}})}function Zi(u,h){var b=h.deletions;if(b!==null)for(var M=0;M<b.length;M++){var j=b[M],U=u,J=h,se=J;e:for(;se!==null;){switch(se.tag){case 27:if(Zt(se.type)){Ar=se.stateNode,Ki=!1;break e}break;case 5:Ar=se.stateNode,Ki=!1;break e;case 3:case 4:Ar=se.stateNode.containerInfo,Ki=!0;break e}se=se.return}if(Ar===null)throw Error(r(160));wE(U,J,j),Ar=null,Ki=!1,U=j.alternate,U!==null&&(U.return=null),j.return=null}if(h.subtreeFlags&13886)for(h=h.child;h!==null;)EE(h,u),h=h.sibling}var Pa=null;function EE(u,h){var b=u.alternate,M=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:Zi(h,u),_r(u),M&4&&(Xl(3,u,u.return),qf(3,u),Xl(5,u,u.return));break;case 1:Zi(h,u),_r(u),M&512&&(xs||b===null||li(b,b.return)),M&64&&Ql&&(u=u.updateQueue,u!==null&&(M=u.callbacks,M!==null&&(b=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=b===null?M:b.concat(M))));break;case 26:var j=Pa;if(Zi(h,u),_r(u),M&512&&(xs||b===null||li(b,b.return)),M&4){var U=b!==null?b.memoizedState:null;if(M=u.memoizedState,b===null)if(M===null)if(u.stateNode===null){e:{M=u.type,b=u.memoizedProps,j=j.ownerDocument||j;t:switch(M){case"title":U=j.getElementsByTagName("title")[0],(!U||U[ri]||U[Wt]||U.namespaceURI==="http://www.w3.org/2000/svg"||U.hasAttribute("itemprop"))&&(U=j.createElement(M),j.head.insertBefore(U,j.querySelector("head > title"))),Xs(U,M,b),U[Wt]=u,Tr(U),M=U;break e;case"link":var J=dM("link","href",j).get(M+(b.href||""));if(J){for(var se=0;se<J.length;se++)if(U=J[se],U.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&U.getAttribute("rel")===(b.rel==null?null:b.rel)&&U.getAttribute("title")===(b.title==null?null:b.title)&&U.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){J.splice(se,1);break t}}U=j.createElement(M),Xs(U,M,b),j.head.appendChild(U);break;case"meta":if(J=dM("meta","content",j).get(M+(b.content||""))){for(se=0;se<J.length;se++)if(U=J[se],U.getAttribute("content")===(b.content==null?null:""+b.content)&&U.getAttribute("name")===(b.name==null?null:b.name)&&U.getAttribute("property")===(b.property==null?null:b.property)&&U.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&U.getAttribute("charset")===(b.charSet==null?null:b.charSet)){J.splice(se,1);break t}}U=j.createElement(M),Xs(U,M,b),j.head.appendChild(U);break;default:throw Error(r(468,M))}U[Wt]=u,Tr(U),M=U}u.stateNode=M}else fM(j,u.type,u.stateNode);else u.stateNode=uM(j,M,u.memoizedProps);else U!==M?(U===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):U.count--,M===null?fM(j,u.type,u.stateNode):uM(j,M,u.memoizedProps)):M===null&&u.stateNode!==null&&_0(u,u.memoizedProps,b.memoizedProps)}break;case 27:Zi(h,u),_r(u),M&512&&(xs||b===null||li(b,b.return)),b!==null&&M&4&&_0(u,u.memoizedProps,b.memoizedProps);break;case 5:if(Zi(h,u),_r(u),M&512&&(xs||b===null||li(b,b.return)),u.flags&32){j=u.stateNode;try{Da(j,"")}catch(_t){tr(u,u.return,_t)}}M&4&&u.stateNode!=null&&(j=u.memoizedProps,_0(u,j,b!==null?b.memoizedProps:j)),M&1024&&(c2=!0);break;case 6:if(Zi(h,u),_r(u),M&4){if(u.stateNode===null)throw Error(r(162));M=u.memoizedProps,b=u.stateNode;try{b.nodeValue=M}catch(_t){tr(u,u.return,_t)}}break;case 3:if(Vm=null,j=Pa,Pa=W0(h.containerInfo),Zi(h,u),Pa=j,_r(u),M&4&&b!==null&&b.memoizedState.isDehydrated)try{ip(h.containerInfo)}catch(_t){tr(u,u.return,_t)}c2&&(c2=!1,ME(u));break;case 4:M=Pa,Pa=W0(u.stateNode.containerInfo),Zi(h,u),_r(u),Pa=M;break;case 12:Zi(h,u),_r(u);break;case 31:Zi(h,u),_r(u),M&4&&(M=u.updateQueue,M!==null&&(u.updateQueue=null,R0(u,M)));break;case 13:Zi(h,u),_r(u),u.child.flags&8192&&u.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(Om=je()),M&4&&(M=u.updateQueue,M!==null&&(u.updateQueue=null,R0(u,M)));break;case 22:j=u.memoizedState!==null;var ge=b!==null&&b.memoizedState!==null,Re=Ql,Ge=xs;if(Ql=Re||j,xs=Ge||ge,Zi(h,u),xs=Ge,Ql=Re,_r(u),M&8192)e:for(h=u.stateNode,h._visibility=j?h._visibility&-2:h._visibility|1,j&&(b===null||ge||Ql||xs||pd(u)),b=null,h=u;;){if(h.tag===5||h.tag===26){if(b===null){ge=b=h;try{if(U=ge.stateNode,j)J=U.style,typeof J.setProperty=="function"?J.setProperty("display","none","important"):J.display="none";else{se=ge.stateNode;var Ze=ge.memoizedProps.style,Ie=Ze!=null&&Ze.hasOwnProperty("display")?Ze.display:null;se.style.display=Ie==null||typeof Ie=="boolean"?"":(""+Ie).trim()}}catch(_t){tr(ge,ge.return,_t)}}}else if(h.tag===6){if(b===null){ge=h;try{ge.stateNode.nodeValue=j?"":ge.memoizedProps}catch(_t){tr(ge,ge.return,_t)}}}else if(h.tag===18){if(b===null){ge=h;try{var ze=ge.stateNode;j?jo(ze,!0):jo(ge.stateNode,!1)}catch(_t){tr(ge,ge.return,_t)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===u)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break e;for(;h.sibling===null;){if(h.return===null||h.return===u)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}M&4&&(M=u.updateQueue,M!==null&&(b=M.retryQueue,b!==null&&(M.retryQueue=null,R0(u,b))));break;case 19:Zi(h,u),_r(u),M&4&&(M=u.updateQueue,M!==null&&(u.updateQueue=null,R0(u,M)));break;case 30:break;case 21:break;default:Zi(h,u),_r(u)}}function _r(u){var h=u.flags;if(h&2){try{for(var b,M=u.return;M!==null;){if(bE(M)){b=M;break}M=M.return}if(b==null)throw Error(r(160));switch(b.tag){case 27:var j=b.stateNode,U=a2(u);O0(u,U,j);break;case 5:var J=b.stateNode;b.flags&32&&(Da(J,""),b.flags&=-33);var se=a2(u);O0(u,se,J);break;case 3:case 4:var ge=b.stateNode.containerInfo,Re=a2(u);l2(u,Re,ge);break;default:throw Error(r(161))}}catch(Ge){tr(u,u.return,Ge)}u.flags&=-3}h&4096&&(u.flags&=-4097)}function ME(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var h=u;ME(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),u=u.sibling}}function tc(u,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)u2(u,h.alternate,h),h=h.sibling}function pd(u){for(u=u.child;u!==null;){var h=u;switch(h.tag){case 0:case 11:case 14:case 15:Xl(4,h,h.return),pd(h);break;case 1:li(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&o2(h,h.return,b),pd(h);break;case 27:Um(h.stateNode);case 26:case 5:li(h,h.return),pd(h);break;case 22:h.memoizedState===null&&pd(h);break;case 30:pd(h);break;default:pd(h)}u=u.sibling}}function ul(u,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var M=h.alternate,j=u,U=h,J=U.flags;switch(U.tag){case 0:case 11:case 15:ul(j,U,b),qf(4,U);break;case 1:if(ul(j,U,b),M=U,j=M.stateNode,typeof j.componentDidMount=="function")try{j.componentDidMount()}catch(Re){tr(M,M.return,Re)}if(M=U,j=M.updateQueue,j!==null){var se=M.stateNode;try{var ge=j.shared.hiddenCallbacks;if(ge!==null)for(j.shared.hiddenCallbacks=null,j=0;j<ge.length;j++)Na(ge[j],se)}catch(Re){tr(M,M.return,Re)}}b&&J&64&&Dm(U),Gi(U,U.return);break;case 27:xE(U);case 26:case 5:ul(j,U,b),b&&M===null&&J&4&&yE(U),Gi(U,U.return);break;case 12:ul(j,U,b);break;case 31:ul(j,U,b),b&&J&4&&f2(j,U);break;case 13:ul(j,U,b),b&&J&4&&CE(j,U);break;case 22:U.memoizedState===null&&ul(j,U,b),Gi(U,U.return);break;case 30:break;default:ul(j,U,b)}h=h.sibling}}function p2(u,h){var b=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),u=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(u=h.memoizedState.cachePool.pool),u!==b&&(u!=null&&u.refCount++,b!=null&&Qh(b))}function h2(u,h){u=null,h.alternate!==null&&(u=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==u&&(h.refCount++,u!=null&&Qh(u))}function $a(u,h,b,M){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)DE(u,h,b,M),h=h.sibling}function DE(u,h,b,M){var j=h.flags;switch(h.tag){case 0:case 11:case 15:$a(u,h,b,M),j&2048&&qf(9,h);break;case 1:$a(u,h,b,M);break;case 3:$a(u,h,b,M),j&2048&&(u=null,h.alternate!==null&&(u=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==u&&(h.refCount++,u!=null&&Qh(u)));break;case 12:if(j&2048){$a(u,h,b,M),u=h.stateNode;try{var U=h.memoizedProps,J=U.id,se=U.onPostCommit;typeof se=="function"&&se(J,h.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(ge){tr(h,h.return,ge)}}else $a(u,h,b,M);break;case 31:$a(u,h,b,M);break;case 13:$a(u,h,b,M);break;case 23:break;case 22:U=h.stateNode,J=h.alternate,h.memoizedState!==null?U._visibility&2?$a(u,h,b,M):km(u,h):U._visibility&2?$a(u,h,b,M):(U._visibility|=2,Gc(u,h,b,M,(h.subtreeFlags&10256)!==0||!1)),j&2048&&p2(J,h);break;case 24:$a(u,h,b,M),j&2048&&h2(h.alternate,h);break;default:$a(u,h,b,M)}}function Gc(u,h,b,M,j){for(j=j&&((h.subtreeFlags&10256)!==0||!1),h=h.child;h!==null;){var U=u,J=h,se=b,ge=M,Re=J.flags;switch(J.tag){case 0:case 11:case 15:Gc(U,J,se,ge,j),qf(8,J);break;case 23:break;case 22:var Ge=J.stateNode;J.memoizedState!==null?Ge._visibility&2?Gc(U,J,se,ge,j):km(U,J):(Ge._visibility|=2,Gc(U,J,se,ge,j)),j&&Re&2048&&p2(J.alternate,J);break;case 24:Gc(U,J,se,ge,j),j&&Re&2048&&h2(J.alternate,J);break;default:Gc(U,J,se,ge,j)}h=h.sibling}}function km(u,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=u,M=h,j=M.flags;switch(M.tag){case 22:km(b,M),j&2048&&p2(M.alternate,M);break;case 24:km(b,M),j&2048&&h2(M.alternate,M);break;default:km(b,M)}h=h.sibling}}var Tm=8192;function Uf(u,h,b){if(u.subtreeFlags&Tm)for(u=u.child;u!==null;)kE(u,h,b),u=u.sibling}function kE(u,h,b){switch(u.tag){case 26:Uf(u,h,b),u.flags&Tm&&u.memoizedState!==null&&np(b,Pa,u.memoizedState,u.memoizedProps);break;case 5:Uf(u,h,b);break;case 3:case 4:var M=Pa;Pa=W0(u.stateNode.containerInfo),Uf(u,h,b),Pa=M;break;case 22:u.memoizedState===null&&(M=u.alternate,M!==null&&M.memoizedState!==null?(M=Tm,Tm=16777216,Uf(u,h,b),Tm=M):Uf(u,h,b));break;default:Uf(u,h,b)}}function TE(u){var h=u.alternate;if(h!==null&&(u=h.child,u!==null)){h.child=null;do h=u.sibling,u.sibling=null,u=h;while(u!==null)}}function Am(u){var h=u.deletions;if((u.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var M=h[b];$s=M,_E(M,u)}TE(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)AE(u),u=u.sibling}function AE(u){switch(u.tag){case 0:case 11:case 15:Am(u),u.flags&2048&&Xl(9,u,u.return);break;case 3:Am(u);break;case 12:Am(u);break;case 22:var h=u.stateNode;u.memoizedState!==null&&h._visibility&2&&(u.return===null||u.return.tag!==13)?(h._visibility&=-3,N0(u)):Am(u);break;default:Am(u)}}function N0(u){var h=u.deletions;if((u.flags&16)!==0){if(h!==null)for(var b=0;b<h.length;b++){var M=h[b];$s=M,_E(M,u)}TE(u)}for(u=u.child;u!==null;){switch(h=u,h.tag){case 0:case 11:case 15:Xl(8,h,h.return),N0(h);break;case 22:b=h.stateNode,b._visibility&2&&(b._visibility&=-3,N0(h));break;default:N0(h)}u=u.sibling}}function _E(u,h){for(;$s!==null;){var b=$s;switch(b.tag){case 0:case 11:case 15:Xl(8,b,h);break;case 23:case 22:if(b.memoizedState!==null&&b.memoizedState.cachePool!==null){var M=b.memoizedState.cachePool.pool;M!=null&&M.refCount++}break;case 24:Qh(b.memoizedState.cache)}if(M=b.child,M!==null)M.return=b,$s=M;else e:for(b=u;$s!==null;){M=$s;var j=M.sibling,U=M.return;if(d2(M),M===b){$s=null;break e}if(j!==null){j.return=U,$s=j;break e}$s=U}}}var NO={getCacheForType:function(u){var h=Ks(bs),b=h.data.get(u);return b===void 0&&(b=u(),h.data.set(u,b)),b},cacheSignal:function(){return Ks(bs).controller.signal}},jO=typeof WeakMap=="function"?WeakMap:Map,Wn=0,vr=null,kn=null,Rn=0,er=0,Ao=null,Kc=!1,Vf=!1,m2=!1,za=0,Wr=0,Zc=0,hd=0,g2=0,_o=0,Wf=0,_m=null,Ji=null,v2=!1,Om=0,OE=0,md=1/0,j0=null,Jc=null,Rs=0,Xc=null,Yf=null,nc=0,y2=0,b2=null,RE=null,Rm=0,x2=null;function Oo(){return(Wn&2)!==0&&Rn!==0?Rn&-Rn:H.T!==null?Ro():Gn()}function NE(){if(_o===0)if((Rn&536870912)===0||jn){var u=Vt;Vt<<=1,(Vt&3932160)===0&&(Vt=262144),_o=u}else _o=536870912;return u=Mo.current,u!==null&&(u.flags|=32),_o}function Xi(u,h,b){(u===vr&&(er===2||er===9)||u.cancelPendingCommit!==null)&&(Gf(u,0),rc(u,Rn,_o,!1)),xt(u,b),((Wn&2)===0||u!==vr)&&(u===vr&&((Wn&2)===0&&(hd|=b),Wr===4&&rc(u,Rn,_o,!1)),dl(u))}function jE(u,h,b){if((Wn&6)!==0)throw Error(r(327));var M=!b&&(h&127)===0&&(h&u.expiredLanes)===0||Hr(u,h),j=M?LO(u,h):w2(u,h,!0),U=M;do{if(j===0){Vf&&!M&&rc(u,h,0,!1);break}else{if(b=u.current.alternate,U&&!LE(b)){j=w2(u,h,!1),U=!1;continue}if(j===2){if(U=h,u.errorRecoveryDisabledLanes&U)var J=0;else J=u.pendingLanes&-536870913,J=J!==0?J:J&536870912?536870912:0;if(J!==0){h=J;e:{var se=u;j=_m;var ge=se.current.memoizedState.isDehydrated;if(ge&&(Gf(se,J).flags|=256),J=w2(se,J,!1),J!==2){if(m2&&!ge){se.errorRecoveryDisabledLanes|=U,hd|=U,j=4;break e}U=Ji,Ji=j,U!==null&&(Ji===null?Ji=U:Ji.push.apply(Ji,U))}j=J}if(U=!1,j!==2)continue}}if(j===1){Gf(u,0),rc(u,h,0,!0);break}e:{switch(M=u,U=j,U){case 0:case 1:throw Error(r(345));case 4:if((h&4194048)!==h)break;case 6:rc(M,h,_o,!Kc);break e;case 2:Ji=null;break;case 3:case 5:break;default:throw Error(r(329))}if((h&62914560)===h&&(j=Om+300-je(),10<j)){if(rc(M,h,_o,!Kc),Ts(M,0,!0)!==0)break e;nc=h,M.timeoutHandle=QE(IE.bind(null,M,b,Ji,j0,v2,h,_o,hd,Wf,Kc,U,"Throttled",-0,0),j);break e}IE(M,b,Ji,j0,v2,h,_o,hd,Wf,Kc,U,null,-0,0)}}break}while(!0);dl(u)}function IE(u,h,b,M,j,U,J,se,ge,Re,Ge,Ze,Ie,ze){if(u.timeoutHandle=-1,Ze=h.subtreeFlags,Ze&8192||(Ze&16785408)===16785408){Ze={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fl},kE(h,U,Ze);var _t=(U&62914560)===U?Om-je():(U&4194048)===U?OE-je():0;if(_t=nR(Ze,_t),_t!==null){nc=U,u.cancelPendingCommit=_t(HE.bind(null,u,h,U,b,M,j,J,se,ge,Ge,Ze,null,Ie,ze)),rc(u,U,J,!Re);return}}HE(u,h,U,b,M,j,J,se,ge)}function LE(u){for(var h=u;;){var b=h.tag;if((b===0||b===11||b===15)&&h.flags&16384&&(b=h.updateQueue,b!==null&&(b=b.stores,b!==null)))for(var M=0;M<b.length;M++){var j=b[M],U=j.getSnapshot;j=j.value;try{if(!Ur(U(),j))return!1}catch{return!1}}if(b=h.child,h.subtreeFlags&16384&&b!==null)b.return=h,h=b;else{if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function rc(u,h,b,M){h&=~g2,h&=~hd,u.suspendedLanes|=h,u.pingedLanes&=~h,M&&(u.warmLanes|=h),M=u.expirationTimes;for(var j=h;0<j;){var U=31-Nt(j),J=1<<U;M[U]=-1,j&=~J}b!==0&&it(u,b,h)}function I0(){return(Wn&6)===0?(Pm(0),!1):!0}function S2(){if(kn!==null){if(er===0)var u=kn.return;else u=kn,Wl=ln=null,_b(u),_f=null,Eo=0,u=kn;for(;u!==null;)A0(u.alternate,u),u=u.return;kn=null}}function Gf(u,h){var b=u.timeoutHandle;b!==-1&&(u.timeoutHandle=-1,VO(b)),b=u.cancelPendingCommit,b!==null&&(u.cancelPendingCommit=null,b()),nc=0,S2(),vr=u,kn=b=Jo(u.current,null),Rn=h,er=0,Ao=null,Kc=!1,Vf=Hr(u,h),m2=!1,Wf=_o=g2=hd=Zc=Wr=0,Ji=_m=null,v2=!1,(h&8)!==0&&(h|=h&32);var M=u.entangledLanes;if(M!==0)for(u=u.entanglements,M&=h;0<M;){var j=31-Nt(M),U=1<<j;h|=u[j],M&=~U}return za=h,Ta(),b}function PE(u,h){cn=null,H.H=Wc,h===Af||h===tm?(h=ZC(),er=3):h===n0?(h=ZC(),er=4):er=h===vm?8:h!==null&&typeof h=="object"&&typeof h.then=="function"?6:1,Ao=h,kn===null&&(Wr=1,gm(u,wo(h,u.current)))}function Nm(){var u=Mo.current;return u===null?!0:(Rn&4194048)===Rn?ia===null:(Rn&62914560)===Rn||(Rn&536870912)!==0?u===ia:!1}function $E(){var u=H.H;return H.H=Wc,u===null?Wc:u}function zE(){var u=H.A;return H.A=NO,u}function L0(){Wr=4,Kc||(Rn&4194048)!==Rn&&Mo.current!==null||(Vf=!0),(Zc&134217727)===0&&(hd&134217727)===0||vr===null||rc(vr,Rn,_o,!1)}function w2(u,h,b){var M=Wn;Wn|=2;var j=$E(),U=zE();(vr!==u||Rn!==h)&&(j0=null,Gf(u,h)),h=!1;var J=Wr;e:do try{if(er!==0&&kn!==null){var se=kn,ge=Ao;switch(er){case 8:S2(),J=6;break e;case 3:case 2:case 9:case 6:Mo.current===null&&(h=!0);var Re=er;if(er=0,Ao=null,Kf(u,se,ge,Re),b&&Vf){J=0;break e}break;default:Re=er,er=0,Ao=null,Kf(u,se,ge,Re)}}IO(),J=Wr;break}catch(Ge){PE(u,Ge)}while(!0);return h&&u.shellSuspendCounter++,Wl=ln=null,Wn=M,H.H=j,H.A=U,kn===null&&(vr=null,Rn=0,Ta()),J}function IO(){for(;kn!==null;)FE(kn)}function LO(u,h){var b=Wn;Wn|=2;var M=$E(),j=zE();vr!==u||Rn!==h?(j0=null,md=je()+500,Gf(u,h)):Vf=Hr(u,h);e:do try{if(er!==0&&kn!==null){h=kn;var U=Ao;t:switch(er){case 1:er=0,Ao=null,Kf(u,h,U,1);break;case 2:case 9:if(KC(U)){er=0,Ao=null,BE(h);break}h=function(){er!==2&&er!==9||vr!==u||(er=7),dl(u)},U.then(h,h);break e;case 3:er=7;break e;case 4:er=5;break e;case 7:KC(U)?(er=0,Ao=null,BE(h)):(er=0,Ao=null,Kf(u,h,U,7));break;case 5:var J=null;switch(kn.tag){case 26:J=kn.memoizedState;case 5:case 27:var se=kn;if(J?pM(J):se.stateNode.complete){er=0,Ao=null;var ge=se.sibling;if(ge!==null)kn=ge;else{var Re=se.return;Re!==null?(kn=Re,P0(Re)):kn=null}break t}}er=0,Ao=null,Kf(u,h,U,5);break;case 6:er=0,Ao=null,Kf(u,h,U,6);break;case 8:S2(),Wr=6;break e;default:throw Error(r(462))}}PO();break}catch(Ge){PE(u,Ge)}while(!0);return Wl=ln=null,H.H=M,H.A=j,Wn=b,kn!==null?0:(vr=null,Rn=0,Ta(),Wr)}function PO(){for(;kn!==null&&!ot();)FE(kn)}function FE(u){var h=gE(u.alternate,u,za);u.memoizedProps=u.pendingProps,h===null?P0(u):kn=h}function BE(u){var h=u,b=h.alternate;switch(h.tag){case 15:case 0:h=pE(b,h,h.pendingProps,h.type,void 0,Rn);break;case 11:h=pE(b,h,h.pendingProps,h.type.render,h.ref,Rn);break;case 5:_b(h);default:A0(b,h),h=kn=UC(h,za),h=gE(b,h,za)}u.memoizedProps=u.pendingProps,h===null?P0(u):kn=h}function Kf(u,h,b,M){Wl=ln=null,_b(h),_f=null,Eo=0;var j=h.return;try{if(Qb(u,j,h,b,Rn)){Wr=1,gm(u,wo(b,u.current)),kn=null;return}}catch(U){if(j!==null)throw kn=j,U;Wr=1,gm(u,wo(b,u.current)),kn=null;return}h.flags&32768?(jn||M===1?u=!0:Vf||(Rn&536870912)!==0?u=!1:(Kc=u=!0,(M===2||M===9||M===3||M===6)&&(M=Mo.current,M!==null&&M.tag===13&&(M.flags|=16384))),jm(h,u)):P0(h)}function P0(u){var h=u;do{if((h.flags&32768)!==0){jm(h,Kc);return}u=h.return;var b=vE(h.alternate,h,za);if(b!==null){kn=b;return}if(h=h.sibling,h!==null){kn=h;return}kn=h=u}while(h!==null);Wr===0&&(Wr=5)}function jm(u,h){do{var b=Mm(u.alternate,u);if(b!==null){b.flags&=32767,kn=b;return}if(b=u.return,b!==null&&(b.flags|=32768,b.subtreeFlags=0,b.deletions=null),!h&&(u=u.sibling,u!==null)){kn=u;return}kn=u=b}while(u!==null);Wr=6,kn=null}function HE(u,h,b,M,j,U,J,se,ge){u.cancelPendingCommit=null;do Im();while(Rs!==0);if((Wn&6)!==0)throw Error(r(327));if(h!==null){if(h===u.current)throw Error(r(177));if(U=h.lanes|h.childLanes,U|=xf,st(u,b,U,J,se,ge),u===vr&&(kn=vr=null,Rn=0),Yf=h,Xc=u,nc=b,y2=U,b2=j,RE=M,(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?(u.callbackNode=null,u.callbackPriority=0,FO(Be,function(){return D2(),null})):(u.callbackNode=null,u.callbackPriority=0),M=(h.flags&13878)!==0,(h.subtreeFlags&13878)!==0||M){M=H.T,H.T=null,j=B.p,B.p=2,J=Wn,Wn|=4;try{OO(u,h,b)}finally{Wn=J,B.p=j,H.T=M}}Rs=1,C2(),E2(),$0()}}function C2(){if(Rs===1){Rs=0;var u=Xc,h=Yf,b=(h.flags&13878)!==0;if((h.subtreeFlags&13878)!==0||b){b=H.T,H.T=null;var M=B.p;B.p=2;var j=Wn;Wn|=4;try{EE(h,u);var U=P2,J=FC(u.containerInfo),se=U.focusedElem,ge=U.selectionRange;if(J!==se&&se&&se.ownerDocument&&zC(se.ownerDocument.documentElement,se)){if(ge!==null&&xb(se)){var Re=ge.start,Ge=ge.end;if(Ge===void 0&&(Ge=Re),"selectionStart"in se)se.selectionStart=Re,se.selectionEnd=Math.min(Ge,se.value.length);else{var Ze=se.ownerDocument||document,Ie=Ze&&Ze.defaultView||window;if(Ie.getSelection){var ze=Ie.getSelection(),_t=se.textContent.length,Ut=Math.min(ge.start,_t),fr=ge.end===void 0?Ut:Math.min(ge.end,_t);!ze.extend&&Ut>fr&&(J=fr,fr=Ut,Ut=J);var Me=$C(se,Ut),be=$C(se,fr);if(Me&&be&&(ze.rangeCount!==1||ze.anchorNode!==Me.node||ze.anchorOffset!==Me.offset||ze.focusNode!==be.node||ze.focusOffset!==be.offset)){var Oe=Ze.createRange();Oe.setStart(Me.node,Me.offset),ze.removeAllRanges(),Ut>fr?(ze.addRange(Oe),ze.extend(be.node,be.offset)):(Oe.setEnd(be.node,be.offset),ze.addRange(Oe))}}}}for(Ze=[],ze=se;ze=ze.parentNode;)ze.nodeType===1&&Ze.push({element:ze,left:ze.scrollLeft,top:ze.scrollTop});for(typeof se.focus=="function"&&se.focus(),se=0;se<Ze.length;se++){var Ke=Ze[se];Ke.element.scrollLeft=Ke.left,Ke.element.scrollTop=Ke.top}}X0=!!Bm,P2=Bm=null}finally{Wn=j,B.p=M,H.T=b}}u.current=h,Rs=2}}function E2(){if(Rs===2){Rs=0;var u=Xc,h=Yf,b=(h.flags&8772)!==0;if((h.subtreeFlags&8772)!==0||b){b=H.T,H.T=null;var M=B.p;B.p=2;var j=Wn;Wn|=4;try{u2(u,h.alternate,h)}finally{Wn=j,B.p=M,H.T=b}}Rs=3}}function $0(){if(Rs===4||Rs===3){Rs=0,Je();var u=Xc,h=Yf,b=nc,M=RE;(h.subtreeFlags&10256)!==0||(h.flags&10256)!==0?Rs=5:(Rs=0,Yf=Xc=null,M2(u,u.pendingLanes));var j=u.pendingLanes;if(j===0&&(Jc=null),qr(b),h=h.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Ot,h,void 0,(h.current.flags&128)===128)}catch{}if(M!==null){h=H.T,j=B.p,B.p=2,H.T=null;try{for(var U=u.onRecoverableError,J=0;J<M.length;J++){var se=M[J];U(se.value,{componentStack:se.stack})}}finally{H.T=h,B.p=j}}(nc&3)!==0&&Im(),dl(u),j=u.pendingLanes,(b&261930)!==0&&(j&42)!==0?u===x2?Rm++:(Rm=0,x2=u):Rm=0,Pm(0)}}function M2(u,h){(u.pooledCacheLanes&=h)===0&&(h=u.pooledCache,h!=null&&(u.pooledCache=null,Qh(h)))}function Im(){return C2(),E2(),$0(),D2()}function D2(){if(Rs!==5)return!1;var u=Xc,h=y2;y2=0;var b=qr(nc),M=H.T,j=B.p;try{B.p=32>b?32:b,H.T=null,b=b2,b2=null;var U=Xc,J=nc;if(Rs=0,Yf=Xc=null,nc=0,(Wn&6)!==0)throw Error(r(331));var se=Wn;if(Wn|=4,AE(U.current),DE(U,U.current,J,b),Wn=se,Pm(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Ot,U)}catch{}return!0}finally{B.p=j,H.T=M,M2(u,h)}}function k2(u,h,b){h=wo(b,h),h=Xb(u.stateNode,h,2),u=Ra(u,h,2),u!==null&&(xt(u,2),dl(u))}function tr(u,h,b){if(u.tag===3)k2(u,u,b);else for(;h!==null;){if(h.tag===3){k2(h,u,b);break}else if(h.tag===1){var M=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(Jc===null||!Jc.has(M))){u=wo(b,u),b=ll(2),M=Ra(h,b,2),M!==null&&(w0(b,M,h,u),xt(M,2),dl(M));break}}h=h.return}}function T2(u,h,b){var M=u.pingCache;if(M===null){M=u.pingCache=new jO;var j=new Set;M.set(h,j)}else j=M.get(h),j===void 0&&(j=new Set,M.set(h,j));j.has(b)||(m2=!0,j.add(b),u=$O.bind(null,u,h,b),h.then(u,u))}function $O(u,h,b){var M=u.pingCache;M!==null&&M.delete(h),u.pingedLanes|=u.suspendedLanes&b,u.warmLanes&=~b,vr===u&&(Rn&b)===b&&(Wr===4||Wr===3&&(Rn&62914560)===Rn&&300>je()-Om?(Wn&2)===0&&Gf(u,0):g2|=b,Wf===Rn&&(Wf=0)),dl(u)}function Lm(u,h){h===0&&(h=Rr()),u=rl(u,h),u!==null&&(xt(u,h),dl(u))}function z0(u){var h=u.memoizedState,b=0;h!==null&&(b=h.retryLane),Lm(u,b)}function zO(u,h){var b=0;switch(u.tag){case 31:case 13:var M=u.stateNode,j=u.memoizedState;j!==null&&(b=j.retryLane);break;case 19:M=u.stateNode;break;case 22:M=u.stateNode._retryCache;break;default:throw Error(r(314))}M!==null&&M.delete(h),Lm(u,b)}function FO(u,h){return Ue(u,h)}var Zf=null,gd=null,A2=!1,F0=!1,_2=!1,Qc=0;function dl(u){u!==gd&&u.next===null&&(gd===null?Zf=gd=u:gd=gd.next=u),F0=!0,A2||(A2=!0,HO())}function Pm(u,h){if(!_2&&F0){_2=!0;do for(var b=!1,M=Zf;M!==null;){if(u!==0){var j=M.pendingLanes;if(j===0)var U=0;else{var J=M.suspendedLanes,se=M.pingedLanes;U=(1<<31-Nt(42|u)+1)-1,U&=j&~(J&~se),U=U&201326741?U&201326741|1:U?U|2:0}U!==0&&(b=!0,WE(M,U))}else U=Rn,U=Ts(M,M===vr?U:0,M.cancelPendingCommit!==null||M.timeoutHandle!==-1),(U&3)===0||Hr(M,U)||(b=!0,WE(M,U));M=M.next}while(b);_2=!1}}function BO(){qE()}function qE(){F0=A2=!1;var u=0;Qc!==0&&UO()&&(u=Qc);for(var h=je(),b=null,M=Zf;M!==null;){var j=M.next,U=UE(M,h);U===0?(M.next=null,b===null?Zf=j:b.next=j,j===null&&(gd=b)):(b=M,(u!==0||(U&3)!==0)&&(F0=!0)),M=j}Rs!==0&&Rs!==5||Pm(u),Qc!==0&&(Qc=0)}function UE(u,h){for(var b=u.suspendedLanes,M=u.pingedLanes,j=u.expirationTimes,U=u.pendingLanes&-62914561;0<U;){var J=31-Nt(U),se=1<<J,ge=j[J];ge===-1?((se&b)===0||(se&M)!==0)&&(j[J]=As(se,h)):ge<=h&&(u.expiredLanes|=se),U&=~se}if(h=vr,b=Rn,b=Ts(u,u===h?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),M=u.callbackNode,b===0||u===h&&(er===2||er===9)||u.cancelPendingCommit!==null)return M!==null&&M!==null&&rt(M),u.callbackNode=null,u.callbackPriority=0;if((b&3)===0||Hr(u,b)){if(h=b&-b,h===u.callbackPriority)return h;switch(M!==null&&rt(M),qr(b)){case 2:case 8:b=_e;break;case 32:b=Be;break;case 268435456:b=lt;break;default:b=Be}return M=VE.bind(null,u),b=Ue(b,M),u.callbackPriority=h,u.callbackNode=b,h}return M!==null&&M!==null&&rt(M),u.callbackPriority=2,u.callbackNode=null,2}function VE(u,h){if(Rs!==0&&Rs!==5)return u.callbackNode=null,u.callbackPriority=0,null;var b=u.callbackNode;if(Im()&&u.callbackNode!==b)return null;var M=Rn;return M=Ts(u,u===vr?M:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),M===0?null:(jE(u,M,h),UE(u,je()),u.callbackNode!=null&&u.callbackNode===b?VE.bind(null,u):null)}function WE(u,h){if(Im())return null;jE(u,h,!0)}function HO(){tM(function(){(Wn&6)!==0?Ue(Le,BO):qE()})}function Ro(){if(Qc===0){var u=kf;u===0&&(u=On,On<<=1,(On&261888)===0&&(On=256)),Qc=u}return Qc}function YE(u){return u==null||typeof u=="symbol"||typeof u=="boolean"?null:typeof u=="function"?u:Fh(""+u)}function GE(u,h){var b=h.ownerDocument.createElement("input");return b.name=h.name,b.value=h.value,u.id&&b.setAttribute("form",u.id),h.parentNode.insertBefore(b,h),u=new FormData(u),b.parentNode.removeChild(b),u}function vd(u,h,b,M,j){if(h==="submit"&&b&&b.stateNode===j){var U=YE((j[Kn]||null).action),J=M.submitter;J&&(h=(h=J[Kn]||null)?YE(h.formAction):J.getAttribute("formAction"),h!==null&&(U=h,J=null));var se=new Iv("action","action",null,M,j);u.push({event:se,listeners:[{instance:null,listener:function(){if(M.defaultPrevented){if(Qc!==0){var ge=J?GE(j,J):new FormData(j);Vc(b,{pending:!0,data:ge,method:j.method,action:U},null,ge)}}else typeof U=="function"&&(se.preventDefault(),ge=J?GE(j,J):new FormData(j),Vc(b,{pending:!0,data:ge,method:j.method,action:U},U,ge))},currentTarget:j}]})}}for(var nn=0;nn<Kv.length;nn++){var O2=Kv[nn],Qi=O2.toLowerCase(),cs=O2[0].toUpperCase()+O2.slice(1);Ui(Qi,"on"+cs)}Ui(So,"onAnimationEnd"),Ui(Gh,"onAnimationIteration"),Ui(BC,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(yf,"onTransitionRun"),Ui(Yv,"onTransitionStart"),Ui(Gv,"onTransitionCancel"),Ui(Zn,"onTransitionEnd"),Hi("onMouseEnter",["mouseout","mouseover"]),Hi("onMouseLeave",["mouseout","mouseover"]),Hi("onPointerEnter",["pointerout","pointerover"]),Hi("onPointerLeave",["pointerout","pointerover"]),Ei("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ei("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ei("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ei("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $m="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($m));function KE(u,h){h=(h&4)!==0;for(var b=0;b<u.length;b++){var M=u[b],j=M.event;M=M.listeners;e:{var U=void 0;if(h)for(var J=M.length-1;0<=J;J--){var se=M[J],ge=se.instance,Re=se.currentTarget;if(se=se.listener,ge!==U&&j.isPropagationStopped())break e;U=se,j.currentTarget=Re;try{U(j)}catch(Ge){Zv(Ge)}j.currentTarget=null,U=ge}else for(J=0;J<M.length;J++){if(se=M[J],ge=se.instance,Re=se.currentTarget,se=se.listener,ge!==U&&j.isPropagationStopped())break e;U=se,j.currentTarget=Re;try{U(j)}catch(Ge){Zv(Ge)}j.currentTarget=null,U=ge}}}}function Tn(u,h){var b=h[Ci];b===void 0&&(b=h[Ci]=new Set);var M=u+"__bubble";b.has(M)||(H0(h,u,2,!1),b.add(M))}function R2(u,h,b){var M=0;h&&(M|=4),H0(b,u,M,h)}var B0="_reactListening"+Math.random().toString(36).slice(2);function N2(u){if(!u[B0]){u[B0]=!0,$l.forEach(function(b){b!=="selectionchange"&&(eu.has(b)||R2(b,!1,u),R2(b,!0,u))});var h=u.nodeType===9?u:u.ownerDocument;h===null||h[B0]||(h[B0]=!0,R2("selectionchange",!1,h))}}function H0(u,h,b,M){switch(SM(h)){case 2:var j=sR;break;case 8:j=iR;break;default:j=V2}b=j.bind(null,h,b,u),j=void 0,!lb||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(j=!0),M?j!==void 0?u.addEventListener(h,b,{capture:!0,passive:j}):u.addEventListener(h,b,!0):j!==void 0?u.addEventListener(h,b,{passive:j}):u.addEventListener(h,b,!1)}function j2(u,h,b,M,j){var U=M;if((h&1)===0&&(h&2)===0&&M!==null)e:for(;;){if(M===null)return;var J=M.tag;if(J===3||J===4){var se=M.stateNode.containerInfo;if(se===j)break;if(J===4)for(J=M.return;J!==null;){var ge=J.tag;if((ge===3||ge===4)&&J.stateNode.containerInfo===j)return;J=J.return}for(;se!==null;){if(J=mo(se),J===null)return;if(ge=J.tag,ge===5||ge===6||ge===26||ge===27){M=U=J;continue e}se=se.parentNode}}M=M.return}CC(function(){var Re=U,Ge=ob(b),Ze=[];e:{var Ie=HC.get(u);if(Ie!==void 0){var ze=Iv,_t=u;switch(u){case"keypress":if(Nv(b)===0)break e;case"keydown":case"keyup":ze=jc;break;case"focusin":_t="focus",ze=Pv;break;case"focusout":_t="blur",ze=Pv;break;case"beforeblur":case"afterblur":ze=Pv;break;case"click":if(b.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ze=Lv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ze=MC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ze=pO;break;case So:case Gh:case BC:ze=TC;break;case Zn:ze=mO;break;case"scroll":case"scrollend":ze=uO;break;case"wheel":ze=zv;break;case"copy":case"cut":case"paste":ze=yo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ze=OC;break;case"toggle":case"beforetoggle":ze=gO}var Ut=(h&4)!==0,fr=!Ut&&(u==="scroll"||u==="scrollend"),Me=Ut?Ie!==null?Ie+"Capture":null:Ie;Ut=[];for(var be=Re,Oe;be!==null;){var Ke=be;if(Oe=Ke.stateNode,Ke=Ke.tag,Ke!==5&&Ke!==26&&Ke!==27||Oe===null||Me===null||(Ke=Ju(be,Me),Ke!=null&&Ut.push(No(be,Ke,Oe))),fr)break;be=be.return}0<Ut.length&&(Ie=new ze(Ie,_t,null,b,Ge),Ze.push({event:Ie,listeners:Ut}))}}if((h&7)===0){e:{if(Ie=u==="mouseover"||u==="pointerover",ze=u==="mouseout"||u==="pointerout",Ie&&b!==ib&&(_t=b.relatedTarget||b.fromElement)&&(mo(_t)||_t[Nr]))break e;if((ze||Ie)&&(Ie=Ge.window===Ge?Ge:(Ie=Ge.ownerDocument)?Ie.defaultView||Ie.parentWindow:window,ze?(_t=b.relatedTarget||b.toElement,ze=Re,_t=_t?mo(_t):null,_t!==null&&(fr=i(_t),Ut=_t.tag,_t!==fr||Ut!==5&&Ut!==27&&Ut!==6)&&(_t=null)):(ze=null,_t=Re),ze!==_t)){if(Ut=Lv,Ke="onMouseLeave",Me="onMouseEnter",be="mouse",(u==="pointerout"||u==="pointerover")&&(Ut=OC,Ke="onPointerLeave",Me="onPointerEnter",be="pointer"),fr=ze==null?Ie:Go(ze),Oe=_t==null?Ie:Go(_t),Ie=new Ut(Ke,be+"leave",ze,b,Ge),Ie.target=fr,Ie.relatedTarget=Oe,Ke=null,mo(Ge)===Re&&(Ut=new Ut(Me,be+"enter",_t,b,Ge),Ut.target=Oe,Ut.relatedTarget=fr,Ke=Ut),fr=Ke,ze&&_t)t:{for(Ut=q0,Me=ze,be=_t,Oe=0,Ke=Me;Ke;Ke=Ut(Ke))Oe++;Ke=0;for(var zt=be;zt;zt=Ut(zt))Ke++;for(;0<Oe-Ke;)Me=Ut(Me),Oe--;for(;0<Ke-Oe;)be=Ut(be),Ke--;for(;Oe--;){if(Me===be||be!==null&&Me===be.alternate){Ut=Me;break t}Me=Ut(Me),be=Ut(be)}Ut=null}else Ut=null;ze!==null&&Pr(Ze,Ie,ze,Ut,!1),_t!==null&&fr!==null&&Pr(Ze,fr,_t,Ut,!0)}}e:{if(Ie=Re?Go(Re):window,ze=Ie.nodeName&&Ie.nodeName.toLowerCase(),ze==="select"||ze==="input"&&Ie.type==="file")var qn=LC;else if(mb(Ie))if(td)qn=xO;else{qn=yO;var It=Vv}else ze=Ie.nodeName,!ze||ze.toLowerCase()!=="input"||Ie.type!=="checkbox"&&Ie.type!=="radio"?Re&&Rv(Re.elementType)&&(qn=LC):qn=bO;if(qn&&(qn=qn(u,Re))){gb(Ze,qn,b,Ge);break e}It&&It(u,Ie,Re),u==="focusout"&&Re&&Ie.type==="number"&&Re.memoizedProps.value!=null&&rb(Ie,"number",Ie.value)}switch(It=Re?Go(Re):window,u){case"focusin":(mb(It)||It.contentEditable==="true")&&(we=It,Ye=Re,Pe=null);break;case"focusout":Pe=Ye=we=null;break;case"mousedown":Dt=!0;break;case"contextmenu":case"mouseup":case"dragend":Dt=!1,tn(Ze,b,Ge);break;case"selectionchange":if(vf)break;case"keydown":case"keyup":tn(Ze,b,Ge)}var mn;if(Fv)e:{switch(u){case"compositionstart":var Nn="onCompositionStart";break e;case"compositionend":Nn="onCompositionEnd";break e;case"compositionupdate":Nn="onCompositionUpdate";break e}Nn=void 0}else ed?Hv(u,b)&&(Nn="onCompositionEnd"):u==="keydown"&&b.keyCode===229&&(Nn="onCompositionStart");Nn&&(pb&&b.locale!=="ko"&&(ed||Nn!=="onCompositionStart"?Nn==="onCompositionEnd"&&ed&&(mn=mr()):(Rc=Ge,cb="value"in Rc?Rc.value:Rc.textContent,ed=!0)),It=zm(Re,Nn),0<It.length&&(Nn=new bo(Nn,u,null,b,Ge),Ze.push({event:Nn,listeners:It}),mn?Nn.data=mn:(mn=IC(b),mn!==null&&(Nn.data=mn)))),(mn=fb?xo(u,b):hb(u,b))&&(Nn=zm(Re,"onBeforeInput"),0<Nn.length&&(It=new bo("onBeforeInput","beforeinput",null,b,Ge),Ze.push({event:It,listeners:Nn}),It.data=mn)),vd(Ze,u,Re,b,Ge)}KE(Ze,h)})}function No(u,h,b){return{instance:u,listener:h,currentTarget:b}}function zm(u,h){for(var b=h+"Capture",M=[];u!==null;){var j=u,U=j.stateNode;if(j=j.tag,j!==5&&j!==26&&j!==27||U===null||(j=Ju(u,b),j!=null&&M.unshift(No(u,j,U)),j=Ju(u,h),j!=null&&M.push(No(u,j,U))),u.tag===3)return M;u=u.return}return[]}function q0(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5&&u.tag!==27);return u||null}function Pr(u,h,b,M,j){for(var U=h._reactName,J=[];b!==null&&b!==M;){var se=b,ge=se.alternate,Re=se.stateNode;if(se=se.tag,ge!==null&&ge===M)break;se!==5&&se!==26&&se!==27||Re===null||(ge=Re,j?(Re=Ju(b,U),Re!=null&&J.unshift(No(b,Re,ge))):j||(Re=Ju(b,U),Re!=null&&J.push(No(b,Re,ge)))),b=b.return}J.length!==0&&u.push({event:h,listeners:J})}var Qr=/\r\n?/g,ZE=/\u0000|\uFFFD/g;function JE(u){return(typeof u=="string"?u:""+u).replace(Qr,`
`).replace(ZE,"")}function XE(u,h){return h=JE(h),JE(u)===h}function dr(u,h,b,M,j,U){switch(b){case"children":typeof M=="string"?h==="body"||h==="textarea"&&M===""||Da(u,M):(typeof M=="number"||typeof M=="bigint")&&h!=="body"&&Da(u,""+M);break;case"className":Ph(u,"class",M);break;case"tabIndex":Ph(u,"tabindex",M);break;case"dir":case"role":case"viewBox":case"width":case"height":Ph(u,b,M);break;case"style":bC(u,M,U);break;case"data":if(h!=="object"){Ph(u,"data",M);break}case"src":case"href":if(M===""&&(h!=="a"||b!=="href")){u.removeAttribute(b);break}if(M==null||typeof M=="function"||typeof M=="symbol"||typeof M=="boolean"){u.removeAttribute(b);break}M=Fh(""+M),u.setAttribute(b,M);break;case"action":case"formAction":if(typeof M=="function"){u.setAttribute(b,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof U=="function"&&(b==="formAction"?(h!=="input"&&dr(u,h,"name",j.name,j,null),dr(u,h,"formEncType",j.formEncType,j,null),dr(u,h,"formMethod",j.formMethod,j,null),dr(u,h,"formTarget",j.formTarget,j,null)):(dr(u,h,"encType",j.encType,j,null),dr(u,h,"method",j.method,j,null),dr(u,h,"target",j.target,j,null)));if(M==null||typeof M=="symbol"||typeof M=="boolean"){u.removeAttribute(b);break}M=Fh(""+M),u.setAttribute(b,M);break;case"onClick":M!=null&&(u.onclick=Fl);break;case"onScroll":M!=null&&Tn("scroll",u);break;case"onScrollEnd":M!=null&&Tn("scrollend",u);break;case"dangerouslySetInnerHTML":if(M!=null){if(typeof M!="object"||!("__html"in M))throw Error(r(61));if(b=M.__html,b!=null){if(j.children!=null)throw Error(r(60));u.innerHTML=b}}break;case"multiple":u.multiple=M&&typeof M!="function"&&typeof M!="symbol";break;case"muted":u.muted=M&&typeof M!="function"&&typeof M!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(M==null||typeof M=="function"||typeof M=="boolean"||typeof M=="symbol"){u.removeAttribute("xlink:href");break}b=Fh(""+M),u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",b);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":M!=null&&typeof M!="function"&&typeof M!="symbol"?u.setAttribute(b,""+M):u.removeAttribute(b);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":M&&typeof M!="function"&&typeof M!="symbol"?u.setAttribute(b,""):u.removeAttribute(b);break;case"capture":case"download":M===!0?u.setAttribute(b,""):M!==!1&&M!=null&&typeof M!="function"&&typeof M!="symbol"?u.setAttribute(b,M):u.removeAttribute(b);break;case"cols":case"rows":case"size":case"span":M!=null&&typeof M!="function"&&typeof M!="symbol"&&!isNaN(M)&&1<=M?u.setAttribute(b,M):u.removeAttribute(b);break;case"rowSpan":case"start":M==null||typeof M=="function"||typeof M=="symbol"||isNaN(M)?u.removeAttribute(b):u.setAttribute(b,M);break;case"popover":Tn("beforetoggle",u),Tn("toggle",u),Mv(u,"popover",M);break;case"xlinkActuate":nl(u,"http://www.w3.org/1999/xlink","xlink:actuate",M);break;case"xlinkArcrole":nl(u,"http://www.w3.org/1999/xlink","xlink:arcrole",M);break;case"xlinkRole":nl(u,"http://www.w3.org/1999/xlink","xlink:role",M);break;case"xlinkShow":nl(u,"http://www.w3.org/1999/xlink","xlink:show",M);break;case"xlinkTitle":nl(u,"http://www.w3.org/1999/xlink","xlink:title",M);break;case"xlinkType":nl(u,"http://www.w3.org/1999/xlink","xlink:type",M);break;case"xmlBase":nl(u,"http://www.w3.org/XML/1998/namespace","xml:base",M);break;case"xmlLang":nl(u,"http://www.w3.org/XML/1998/namespace","xml:lang",M);break;case"xmlSpace":nl(u,"http://www.w3.org/XML/1998/namespace","xml:space",M);break;case"is":Mv(u,"is",M);break;case"innerText":case"textContent":break;default:(!(2<b.length)||b[0]!=="o"&&b[0]!=="O"||b[1]!=="n"&&b[1]!=="N")&&(b=xC.get(b)||b,Mv(u,b,M))}}function I2(u,h,b,M,j,U){switch(b){case"style":bC(u,M,U);break;case"dangerouslySetInnerHTML":if(M!=null){if(typeof M!="object"||!("__html"in M))throw Error(r(61));if(b=M.__html,b!=null){if(j.children!=null)throw Error(r(60));u.innerHTML=b}}break;case"children":typeof M=="string"?Da(u,M):(typeof M=="number"||typeof M=="bigint")&&Da(u,""+M);break;case"onScroll":M!=null&&Tn("scroll",u);break;case"onScrollEnd":M!=null&&Tn("scrollend",u);break;case"onClick":M!=null&&(u.onclick=Fl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zl.hasOwnProperty(b))e:{if(b[0]==="o"&&b[1]==="n"&&(j=b.endsWith("Capture"),h=b.slice(2,j?b.length-7:void 0),U=u[Kn]||null,U=U!=null?U[b]:null,typeof U=="function"&&u.removeEventListener(h,U,j),typeof M=="function")){typeof U!="function"&&U!==null&&(b in u?u[b]=null:u.hasAttribute(b)&&u.removeAttribute(b)),u.addEventListener(h,M,j);break e}b in u?u[b]=M:M===!0?u.setAttribute(b,""):Mv(u,b,M)}}}function Xs(u,h,b){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tn("error",u),Tn("load",u);var M=!1,j=!1,U;for(U in b)if(b.hasOwnProperty(U)){var J=b[U];if(J!=null)switch(U){case"src":M=!0;break;case"srcSet":j=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,h));default:dr(u,h,U,J,b,null)}}j&&dr(u,h,"srcSet",b.srcSet,b,null),M&&dr(u,h,"src",b.src,b,null);return;case"input":Tn("invalid",u);var se=U=J=j=null,ge=null,Re=null;for(M in b)if(b.hasOwnProperty(M)){var Ge=b[M];if(Ge!=null)switch(M){case"name":j=Ge;break;case"type":J=Ge;break;case"checked":ge=Ge;break;case"defaultChecked":Re=Ge;break;case"value":U=Ge;break;case"defaultValue":se=Ge;break;case"children":case"dangerouslySetInnerHTML":if(Ge!=null)throw Error(r(137,h));break;default:dr(u,h,M,Ge,b,null)}}Av(u,U,se,ge,Re,J,j,!1);return;case"select":Tn("invalid",u),M=J=U=null;for(j in b)if(b.hasOwnProperty(j)&&(se=b[j],se!=null))switch(j){case"value":U=se;break;case"defaultValue":J=se;break;case"multiple":M=se;default:dr(u,h,j,se,b,null)}h=U,b=J,u.multiple=!!M,h!=null?Ku(u,!!M,h,!1):b!=null&&Ku(u,!!M,b,!0);return;case"textarea":Tn("invalid",u),U=j=M=null;for(J in b)if(b.hasOwnProperty(J)&&(se=b[J],se!=null))switch(J){case"value":M=se;break;case"defaultValue":j=se;break;case"children":U=se;break;case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(91));break;default:dr(u,h,J,se,b,null)}Ov(u,M,j,U);return;case"option":for(ge in b)if(b.hasOwnProperty(ge)&&(M=b[ge],M!=null))switch(ge){case"selected":u.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:dr(u,h,ge,M,b,null)}return;case"dialog":Tn("beforetoggle",u),Tn("toggle",u),Tn("cancel",u),Tn("close",u);break;case"iframe":case"object":Tn("load",u);break;case"video":case"audio":for(M=0;M<$m.length;M++)Tn($m[M],u);break;case"image":Tn("error",u),Tn("load",u);break;case"details":Tn("toggle",u);break;case"embed":case"source":case"link":Tn("error",u),Tn("load",u);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Re in b)if(b.hasOwnProperty(Re)&&(M=b[Re],M!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,h));default:dr(u,h,Re,M,b,null)}return;default:if(Rv(h)){for(Ge in b)b.hasOwnProperty(Ge)&&(M=b[Ge],M!==void 0&&I2(u,h,Ge,M,b,void 0));return}}for(se in b)b.hasOwnProperty(se)&&(M=b[se],M!=null&&dr(u,h,se,M,b,null))}function qO(u,h,b,M){switch(h){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var j=null,U=null,J=null,se=null,ge=null,Re=null,Ge=null;for(ze in b){var Ze=b[ze];if(b.hasOwnProperty(ze)&&Ze!=null)switch(ze){case"checked":break;case"value":break;case"defaultValue":ge=Ze;default:M.hasOwnProperty(ze)||dr(u,h,ze,null,M,Ze)}}for(var Ie in M){var ze=M[Ie];if(Ze=b[Ie],M.hasOwnProperty(Ie)&&(ze!=null||Ze!=null))switch(Ie){case"type":U=ze;break;case"name":j=ze;break;case"checked":Re=ze;break;case"defaultChecked":Ge=ze;break;case"value":J=ze;break;case"defaultValue":se=ze;break;case"children":case"dangerouslySetInnerHTML":if(ze!=null)throw Error(r(137,h));break;default:ze!==Ze&&dr(u,h,Ie,ze,M,Ze)}}Tv(u,J,se,ge,Re,Ge,U,j);return;case"select":ze=J=se=Ie=null;for(U in b)if(ge=b[U],b.hasOwnProperty(U)&&ge!=null)switch(U){case"value":break;case"multiple":ze=ge;default:M.hasOwnProperty(U)||dr(u,h,U,null,M,ge)}for(j in M)if(U=M[j],ge=b[j],M.hasOwnProperty(j)&&(U!=null||ge!=null))switch(j){case"value":Ie=U;break;case"defaultValue":se=U;break;case"multiple":J=U;default:U!==ge&&dr(u,h,j,U,M,ge)}h=se,b=J,M=ze,Ie!=null?Ku(u,!!b,Ie,!1):!!M!=!!b&&(h!=null?Ku(u,!!b,h,!0):Ku(u,!!b,b?[]:"",!1));return;case"textarea":ze=Ie=null;for(se in b)if(j=b[se],b.hasOwnProperty(se)&&j!=null&&!M.hasOwnProperty(se))switch(se){case"value":break;case"children":break;default:dr(u,h,se,null,M,j)}for(J in M)if(j=M[J],U=b[J],M.hasOwnProperty(J)&&(j!=null||U!=null))switch(J){case"value":Ie=j;break;case"defaultValue":ze=j;break;case"children":break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:j!==U&&dr(u,h,J,j,M,U)}_v(u,Ie,ze);return;case"option":for(var _t in b)if(Ie=b[_t],b.hasOwnProperty(_t)&&Ie!=null&&!M.hasOwnProperty(_t))switch(_t){case"selected":u.selected=!1;break;default:dr(u,h,_t,null,M,Ie)}for(ge in M)if(Ie=M[ge],ze=b[ge],M.hasOwnProperty(ge)&&Ie!==ze&&(Ie!=null||ze!=null))switch(ge){case"selected":u.selected=Ie&&typeof Ie!="function"&&typeof Ie!="symbol";break;default:dr(u,h,ge,Ie,M,ze)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ut in b)Ie=b[Ut],b.hasOwnProperty(Ut)&&Ie!=null&&!M.hasOwnProperty(Ut)&&dr(u,h,Ut,null,M,Ie);for(Re in M)if(Ie=M[Re],ze=b[Re],M.hasOwnProperty(Re)&&Ie!==ze&&(Ie!=null||ze!=null))switch(Re){case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(r(137,h));break;default:dr(u,h,Re,Ie,M,ze)}return;default:if(Rv(h)){for(var fr in b)Ie=b[fr],b.hasOwnProperty(fr)&&Ie!==void 0&&!M.hasOwnProperty(fr)&&I2(u,h,fr,void 0,M,Ie);for(Ge in M)Ie=M[Ge],ze=b[Ge],!M.hasOwnProperty(Ge)||Ie===ze||Ie===void 0&&ze===void 0||I2(u,h,Ge,Ie,M,ze);return}}for(var Me in b)Ie=b[Me],b.hasOwnProperty(Me)&&Ie!=null&&!M.hasOwnProperty(Me)&&dr(u,h,Me,null,M,Ie);for(Ze in M)Ie=M[Ze],ze=b[Ze],!M.hasOwnProperty(Ze)||Ie===ze||Ie==null&&ze==null||dr(u,h,Ze,Ie,M,ze)}function L2(u){switch(u){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fm(){if(typeof performance.getEntriesByType=="function"){for(var u=0,h=0,b=performance.getEntriesByType("resource"),M=0;M<b.length;M++){var j=b[M],U=j.transferSize,J=j.initiatorType,se=j.duration;if(U&&se&&L2(J)){for(J=0,se=j.responseEnd,M+=1;M<b.length;M++){var ge=b[M],Re=ge.startTime;if(Re>se)break;var Ge=ge.transferSize,Ze=ge.initiatorType;Ge&&L2(Ze)&&(ge=ge.responseEnd,J+=Ge*(ge<se?1:(se-Re)/(ge-Re)))}if(--M,h+=8*(U+J)/(j.duration/1e3),u++,10<u)break}}if(0<u)return h/u/1e6}return navigator.connection&&(u=navigator.connection.downlink,typeof u=="number")?u:5}var Bm=null,P2=null;function Hm(u){return u.nodeType===9?u:u.ownerDocument}function qm(u){switch(u){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function eo(u,h){if(u===0)switch(h){case"svg":return 1;case"math":return 2;default:return 0}return u===1&&h==="foreignObject"?0:u}function tu(u,h){return u==="textarea"||u==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.children=="bigint"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var $2=null;function UO(){var u=window.event;return u&&u.type==="popstate"?u===$2?!1:($2=u,!0):($2=null,!1)}var QE=typeof setTimeout=="function"?setTimeout:void 0,VO=typeof clearTimeout=="function"?clearTimeout:void 0,eM=typeof Promise=="function"?Promise:void 0,tM=typeof queueMicrotask=="function"?queueMicrotask:typeof eM<"u"?function(u){return eM.resolve(null).then(u).catch(sc)}:QE;function sc(u){setTimeout(function(){throw u})}function Zt(u){return u==="head"}function z2(u,h){var b=h,M=0;do{var j=b.nextSibling;if(u.removeChild(b),j&&j.nodeType===8)if(b=j.data,b==="/$"||b==="/&"){if(M===0){u.removeChild(j),ip(h);return}M--}else if(b==="$"||b==="$?"||b==="$~"||b==="$!"||b==="&")M++;else if(b==="html")Um(u.ownerDocument.documentElement);else if(b==="head"){b=u.ownerDocument.head,Um(b);for(var U=b.firstChild;U;){var J=U.nextSibling,se=U.nodeName;U[ri]||se==="SCRIPT"||se==="STYLE"||se==="LINK"&&U.rel.toLowerCase()==="stylesheet"||b.removeChild(U),U=J}}else b==="body"&&Um(u.ownerDocument.body);b=j}while(b);ip(h)}function jo(u,h){var b=u;u=0;do{var M=b.nextSibling;if(b.nodeType===1?h?(b._stashedDisplay=b.style.display,b.style.display="none"):(b.style.display=b._stashedDisplay||"",b.getAttribute("style")===""&&b.removeAttribute("style")):b.nodeType===3&&(h?(b._stashedText=b.nodeValue,b.nodeValue=""):b.nodeValue=b._stashedText||""),M&&M.nodeType===8)if(b=M.data,b==="/$"){if(u===0)break;u--}else b!=="$"&&b!=="$?"&&b!=="$~"&&b!=="$!"||u++;b=M}while(b)}function U0(u){var h=u.firstChild;for(h&&h.nodeType===10&&(h=h.nextSibling);h;){var b=h;switch(h=h.nextSibling,b.nodeName){case"HTML":case"HEAD":case"BODY":U0(b),tl(b);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(b.rel.toLowerCase()==="stylesheet")continue}u.removeChild(b)}}function WO(u,h,b,M){for(;u.nodeType===1;){var j=b;if(u.nodeName.toLowerCase()!==h.toLowerCase()){if(!M&&(u.nodeName!=="INPUT"||u.type!=="hidden"))break}else if(M){if(!u[ri])switch(h){case"meta":if(!u.hasAttribute("itemprop"))break;return u;case"link":if(U=u.getAttribute("rel"),U==="stylesheet"&&u.hasAttribute("data-precedence"))break;if(U!==j.rel||u.getAttribute("href")!==(j.href==null||j.href===""?null:j.href)||u.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin)||u.getAttribute("title")!==(j.title==null?null:j.title))break;return u;case"style":if(u.hasAttribute("data-precedence"))break;return u;case"script":if(U=u.getAttribute("src"),(U!==(j.src==null?null:j.src)||u.getAttribute("type")!==(j.type==null?null:j.type)||u.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin))&&U&&u.hasAttribute("async")&&!u.hasAttribute("itemprop"))break;return u;default:return u}}else if(h==="input"&&u.type==="hidden"){var U=j.name==null?null:""+j.name;if(j.type==="hidden"&&u.getAttribute("name")===U)return u}else return u;if(u=la(u.nextSibling),u===null)break}return null}function Xn(u,h,b){if(h==="")return null;for(;u.nodeType!==3;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!b||(u=la(u.nextSibling),u===null))return null;return u}function nM(u,h){for(;u.nodeType!==8;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!h||(u=la(u.nextSibling),u===null))return null;return u}function V0(u){return u.data==="$?"||u.data==="$~"}function Jf(u){return u.data==="$!"||u.data==="$?"&&u.ownerDocument.readyState!=="loading"}function YO(u,h){var b=u.ownerDocument;if(u.data==="$~")u._reactRetry=h;else if(u.data!=="$?"||b.readyState!=="loading")h();else{var M=function(){h(),b.removeEventListener("DOMContentLoaded",M)};b.addEventListener("DOMContentLoaded",M),u._reactRetry=M}}function la(u){for(;u!=null;u=u.nextSibling){var h=u.nodeType;if(h===1||h===3)break;if(h===8){if(h=u.data,h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"||h==="F!"||h==="F")break;if(h==="/$"||h==="/&")return null}}return u}var F2=null;function rM(u){u=u.nextSibling;for(var h=0;u;){if(u.nodeType===8){var b=u.data;if(b==="/$"||b==="/&"){if(h===0)return la(u.nextSibling);h--}else b!=="$"&&b!=="$!"&&b!=="$?"&&b!=="$~"&&b!=="&"||h++}u=u.nextSibling}return null}function sM(u){u=u.previousSibling;for(var h=0;u;){if(u.nodeType===8){var b=u.data;if(b==="$"||b==="$!"||b==="$?"||b==="$~"||b==="&"){if(h===0)return u;h--}else b!=="/$"&&b!=="/&"||h++}u=u.previousSibling}return null}function iM(u,h,b){switch(h=Hm(b),u){case"html":if(u=h.documentElement,!u)throw Error(r(452));return u;case"head":if(u=h.head,!u)throw Error(r(453));return u;case"body":if(u=h.body,!u)throw Error(r(454));return u;default:throw Error(r(451))}}function Um(u){for(var h=u.attributes;h.length;)u.removeAttributeNode(h[0]);tl(u)}var ca=new Map,oM=new Set;function W0(u){return typeof u.getRootNode=="function"?u.getRootNode():u.nodeType===9?u:u.ownerDocument}var ic=B.d;B.d={f:GO,r:KO,D:B2,C:ZO,L:JO,m:XO,X:to,S:zs,M:QO};function GO(){var u=ic.f(),h=I0();return u||h}function KO(u){var h=si(u);h!==null&&h.tag===5&&h.type==="form"?Vb(h):ic.r(u)}var nu=typeof document>"u"?null:document;function aM(u,h,b){var M=nu;if(M&&typeof h=="string"&&h){var j=vo(h);j='link[rel="'+u+'"][href="'+j+'"]',typeof b=="string"&&(j+='[crossorigin="'+b+'"]'),oM.has(j)||(oM.add(j),u={rel:u,crossOrigin:b,href:h},M.querySelector(j)===null&&(h=M.createElement("link"),Xs(h,"link",u),Tr(h),M.head.appendChild(h)))}}function B2(u){ic.D(u),aM("dns-prefetch",u,null)}function ZO(u,h){ic.C(u,h),aM("preconnect",u,h)}function JO(u,h,b){ic.L(u,h,b);var M=nu;if(M&&u&&h){var j='link[rel="preload"][as="'+vo(h)+'"]';h==="image"&&b&&b.imageSrcSet?(j+='[imagesrcset="'+vo(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&(j+='[imagesizes="'+vo(b.imageSizes)+'"]')):j+='[href="'+vo(u)+'"]';var U=j;switch(h){case"style":U=Xf(u);break;case"script":U=ep(u)}ca.has(U)||(u=f({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:u,as:h},b),ca.set(U,u),M.querySelector(j)!==null||h==="style"&&M.querySelector(Qf(U))||h==="script"&&M.querySelector(tp(U))||(h=M.createElement("link"),Xs(h,"link",u),Tr(h),M.head.appendChild(h)))}}function XO(u,h){ic.m(u,h);var b=nu;if(b&&u){var M=h&&typeof h.as=="string"?h.as:"script",j='link[rel="modulepreload"][as="'+vo(M)+'"][href="'+vo(u)+'"]',U=j;switch(M){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":U=ep(u)}if(!ca.has(U)&&(u=f({rel:"modulepreload",href:u},h),ca.set(U,u),b.querySelector(j)===null)){switch(M){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(tp(U)))return}M=b.createElement("link"),Xs(M,"link",u),Tr(M),b.head.appendChild(M)}}}function zs(u,h,b){ic.S(u,h,b);var M=nu;if(M&&u){var j=ii(M).hoistableStyles,U=Xf(u);h=h||"default";var J=j.get(U);if(!J){var se={loading:0,preload:null};if(J=M.querySelector(Qf(U)))se.loading=5;else{u=f({rel:"stylesheet",href:u,"data-precedence":h},b),(b=ca.get(U))&&H2(u,b);var ge=J=M.createElement("link");Tr(ge),Xs(ge,"link",u),ge._p=new Promise(function(Re,Ge){ge.onload=Re,ge.onerror=Ge}),ge.addEventListener("load",function(){se.loading|=1}),ge.addEventListener("error",function(){se.loading|=2}),se.loading|=4,Y0(J,h,M)}J={type:"stylesheet",instance:J,count:1,state:se},j.set(U,J)}}}function to(u,h){ic.X(u,h);var b=nu;if(b&&u){var M=ii(b).hoistableScripts,j=ep(u),U=M.get(j);U||(U=b.querySelector(tp(j)),U||(u=f({src:u,async:!0},h),(h=ca.get(j))&&G0(u,h),U=b.createElement("script"),Tr(U),Xs(U,"link",u),b.head.appendChild(U)),U={type:"script",instance:U,count:1,state:null},M.set(j,U))}}function QO(u,h){ic.M(u,h);var b=nu;if(b&&u){var M=ii(b).hoistableScripts,j=ep(u),U=M.get(j);U||(U=b.querySelector(tp(j)),U||(u=f({src:u,async:!0,type:"module"},h),(h=ca.get(j))&&G0(u,h),U=b.createElement("script"),Tr(U),Xs(U,"link",u),b.head.appendChild(U)),U={type:"script",instance:U,count:1,state:null},M.set(j,U))}}function lM(u,h,b,M){var j=(j=ne.current)?W0(j):null;if(!j)throw Error(r(446));switch(u){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=Xf(b.href),b=ii(j).hoistableStyles,M=b.get(h),M||(M={type:"style",instance:null,count:0,state:null},b.set(h,M)),M):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){u=Xf(b.href);var U=ii(j).hoistableStyles,J=U.get(u);if(J||(j=j.ownerDocument||j,J={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},U.set(u,J),(U=j.querySelector(Qf(u)))&&!U._p&&(J.instance=U,J.state.loading=5),ca.has(u)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},ca.set(u,b),U||eR(j,u,b,J.state))),h&&M===null)throw Error(r(528,""));return J}if(h&&M!==null)throw Error(r(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=ep(b),b=ii(j).hoistableScripts,M=b.get(h),M||(M={type:"script",instance:null,count:0,state:null},b.set(h,M)),M):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,u))}}function Xf(u){return'href="'+vo(u)+'"'}function Qf(u){return'link[rel="stylesheet"]['+u+"]"}function cM(u){return f({},u,{"data-precedence":u.precedence,precedence:null})}function eR(u,h,b,M){u.querySelector('link[rel="preload"][as="style"]['+h+"]")?M.loading=1:(h=u.createElement("link"),M.preload=h,h.addEventListener("load",function(){return M.loading|=1}),h.addEventListener("error",function(){return M.loading|=2}),Xs(h,"link",b),Tr(h),u.head.appendChild(h))}function ep(u){return'[src="'+vo(u)+'"]'}function tp(u){return"script[async]"+u}function uM(u,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var M=u.querySelector('style[data-href~="'+vo(b.href)+'"]');if(M)return h.instance=M,Tr(M),M;var j=f({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return M=(u.ownerDocument||u).createElement("style"),Tr(M),Xs(M,"style",j),Y0(M,b.precedence,u),h.instance=M;case"stylesheet":j=Xf(b.href);var U=u.querySelector(Qf(j));if(U)return h.state.loading|=4,h.instance=U,Tr(U),U;M=cM(b),(j=ca.get(j))&&H2(M,j),U=(u.ownerDocument||u).createElement("link"),Tr(U);var J=U;return J._p=new Promise(function(se,ge){J.onload=se,J.onerror=ge}),Xs(U,"link",M),h.state.loading|=4,Y0(U,b.precedence,u),h.instance=U;case"script":return U=ep(b.src),(j=u.querySelector(tp(U)))?(h.instance=j,Tr(j),j):(M=b,(j=ca.get(U))&&(M=f({},b),G0(M,j)),u=u.ownerDocument||u,j=u.createElement("script"),Tr(j),Xs(j,"link",M),u.head.appendChild(j),h.instance=j);case"void":return null;default:throw Error(r(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(M=h.instance,h.state.loading|=4,Y0(M,b.precedence,u));return h.instance}function Y0(u,h,b){for(var M=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),j=M.length?M[M.length-1]:null,U=j,J=0;J<M.length;J++){var se=M[J];if(se.dataset.precedence===h)U=se;else if(U!==j)break}U?U.parentNode.insertBefore(u,U.nextSibling):(h=b.nodeType===9?b.head:b,h.insertBefore(u,h.firstChild))}function H2(u,h){u.crossOrigin==null&&(u.crossOrigin=h.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=h.referrerPolicy),u.title==null&&(u.title=h.title)}function G0(u,h){u.crossOrigin==null&&(u.crossOrigin=h.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=h.referrerPolicy),u.integrity==null&&(u.integrity=h.integrity)}var Vm=null;function dM(u,h,b){if(Vm===null){var M=new Map,j=Vm=new Map;j.set(b,M)}else j=Vm,M=j.get(b),M||(M=new Map,j.set(b,M));if(M.has(u))return M;for(M.set(u,null),b=b.getElementsByTagName(u),j=0;j<b.length;j++){var U=b[j];if(!(U[ri]||U[Wt]||u==="link"&&U.getAttribute("rel")==="stylesheet")&&U.namespaceURI!=="http://www.w3.org/2000/svg"){var J=U.getAttribute(h)||"";J=u+J;var se=M.get(J);se?se.push(U):M.set(J,[U])}}return M}function fM(u,h,b){u=u.ownerDocument||u,u.head.insertBefore(b,h==="title"?u.querySelector("head > title"):null)}function tR(u,h,b){if(b===1||h.itemProp!=null)return!1;switch(u){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return u=h.disabled,typeof h.precedence=="string"&&u==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function pM(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}function np(u,h,b,M){if(b.type==="stylesheet"&&(typeof M.media!="string"||matchMedia(M.media).matches!==!1)&&(b.state.loading&4)===0){if(b.instance===null){var j=Xf(M.href),U=h.querySelector(Qf(j));if(U){h=U._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(u.count++,u=K0.bind(u),h.then(u,u)),b.state.loading|=4,b.instance=U,Tr(U);return}U=h.ownerDocument||h,M=cM(M),(j=ca.get(j))&&H2(M,j),U=U.createElement("link"),Tr(U);var J=U;J._p=new Promise(function(se,ge){J.onload=se,J.onerror=ge}),Xs(U,"link",M),b.instance=U}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(b,h),(h=b.state.preload)&&(b.state.loading&3)===0&&(u.count++,b=K0.bind(u),h.addEventListener("load",b),h.addEventListener("error",b))}}var q2=0;function nR(u,h){return u.stylesheets&&u.count===0&&J0(u,u.stylesheets),0<u.count||0<u.imgCount?function(b){var M=setTimeout(function(){if(u.stylesheets&&J0(u,u.stylesheets),u.unsuspend){var U=u.unsuspend;u.unsuspend=null,U()}},6e4+h);0<u.imgBytes&&q2===0&&(q2=62500*Fm());var j=setTimeout(function(){if(u.waitingForImages=!1,u.count===0&&(u.stylesheets&&J0(u,u.stylesheets),u.unsuspend)){var U=u.unsuspend;u.unsuspend=null,U()}},(u.imgBytes>q2?50:800)+h);return u.unsuspend=b,function(){u.unsuspend=null,clearTimeout(M),clearTimeout(j)}}:null}function K0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)J0(this,this.stylesheets);else if(this.unsuspend){var u=this.unsuspend;this.unsuspend=null,u()}}}var Z0=null;function J0(u,h){u.stylesheets=null,u.unsuspend!==null&&(u.count++,Z0=new Map,h.forEach(hM,u),Z0=null,K0.call(u))}function hM(u,h){if(!(h.state.loading&4)){var b=Z0.get(u);if(b)var M=b.get(null);else{b=new Map,Z0.set(u,b);for(var j=u.querySelectorAll("link[data-precedence],style[data-precedence]"),U=0;U<j.length;U++){var J=j[U];(J.nodeName==="LINK"||J.getAttribute("media")!=="not all")&&(b.set(J.dataset.precedence,J),M=J)}M&&b.set(null,M)}j=h.instance,J=j.getAttribute("data-precedence"),U=b.get(J)||M,U===M&&b.set(null,j),b.set(J,j),this.count++,M=K0.bind(this),j.addEventListener("load",M),j.addEventListener("error",M),U?U.parentNode.insertBefore(j,U.nextSibling):(u=u.nodeType===9?u.head:u,u.insertBefore(j,u.firstChild)),h.state.loading|=4}}var rp={$$typeof:E,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function rR(u,h,b,M,j,U,J,se,ge){this.tag=1,this.containerInfo=u,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=M,this.onUncaughtError=j,this.onCaughtError=U,this.onRecoverableError=J,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ge,this.incompleteTransitions=new Map}function mM(u,h,b,M,j,U,J,se,ge,Re,Ge,Ze){return u=new rR(u,h,b,J,ge,Re,Ge,Ze,se),h=1,U===!0&&(h|=24),U=Gs(3,null,null,h),u.current=U,U.stateNode=u,h=Aa(),h.refCount++,u.pooledCache=h,h.refCount++,U.memoizedState={element:M,isDehydrated:b,cache:h},ol(U),u}function gM(u){return u?(u=ql,u):ql}function vM(u,h,b,M,j,U){j=gM(j),M.context===null?M.context=j:M.pendingContext=j,M=Hc(h),M.payload={element:b},U=U===void 0?null:U,U!==null&&(M.callback=U),b=Ra(u,M,h),b!==null&&(Xi(b,u,h),nm(b,u,h))}function yM(u,h){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var b=u.retryLane;u.retryLane=b!==0&&b<h?b:h}}function U2(u,h){yM(u,h),(u=u.alternate)&&yM(u,h)}function bM(u){if(u.tag===13||u.tag===31){var h=rl(u,67108864);h!==null&&Xi(h,u,67108864),U2(u,67108864)}}function xM(u){if(u.tag===13||u.tag===31){var h=Oo();h=Hn(h);var b=rl(u,h);b!==null&&Xi(b,u,h),U2(u,h)}}var X0=!0;function sR(u,h,b,M){var j=H.T;H.T=null;var U=B.p;try{B.p=2,V2(u,h,b,M)}finally{B.p=U,H.T=j}}function iR(u,h,b,M){var j=H.T;H.T=null;var U=B.p;try{B.p=8,V2(u,h,b,M)}finally{B.p=U,H.T=j}}function V2(u,h,b,M){if(X0){var j=W2(M);if(j===null)j2(u,h,M,Q0,b),wM(u,M);else if(CM(j,u,h,b,M))M.stopPropagation();else if(wM(u,M),h&4&&-1<oR.indexOf(u)){for(;j!==null;){var U=si(j);if(U!==null)switch(U.tag){case 3:if(U=U.stateNode,U.current.memoizedState.isDehydrated){var J=xn(U.pendingLanes);if(J!==0){var se=U;for(se.pendingLanes|=2,se.entangledLanes|=2;J;){var ge=1<<31-Nt(J);se.entanglements[1]|=ge,J&=~ge}dl(U),(Wn&6)===0&&(md=je()+500,Pm(0))}}break;case 31:case 13:se=rl(U,2),se!==null&&Xi(se,U,2),I0(),U2(U,2)}if(U=W2(M),U===null&&j2(u,h,M,Q0,b),U===j)break;j=U}j!==null&&M.stopPropagation()}else j2(u,h,M,null,b)}}function W2(u){return u=ob(u),Y2(u)}var Q0=null;function Y2(u){if(Q0=null,u=mo(u),u!==null){var h=i(u);if(h===null)u=null;else{var b=h.tag;if(b===13){if(u=o(h),u!==null)return u;u=null}else if(b===31){if(u=a(h),u!==null)return u;u=null}else if(b===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;u=null}else h!==u&&(u=null)}}return Q0=u,null}function SM(u){switch(u){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(We()){case Le:return 2;case _e:return 8;case Be:case ut:return 32;case lt:return 268435456;default:return 32}default:return 32}}var G2=!1,ru=null,su=null,iu=null,Wm=new Map,Ym=new Map,ou=[],oR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function wM(u,h){switch(u){case"focusin":case"focusout":ru=null;break;case"dragenter":case"dragleave":su=null;break;case"mouseover":case"mouseout":iu=null;break;case"pointerover":case"pointerout":Wm.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ym.delete(h.pointerId)}}function yd(u,h,b,M,j,U){return u===null||u.nativeEvent!==U?(u={blockedOn:h,domEventName:b,eventSystemFlags:M,nativeEvent:U,targetContainers:[j]},h!==null&&(h=si(h),h!==null&&bM(h)),u):(u.eventSystemFlags|=M,h=u.targetContainers,j!==null&&h.indexOf(j)===-1&&h.push(j),u)}function CM(u,h,b,M,j){switch(h){case"focusin":return ru=yd(ru,u,h,b,M,j),!0;case"dragenter":return su=yd(su,u,h,b,M,j),!0;case"mouseover":return iu=yd(iu,u,h,b,M,j),!0;case"pointerover":var U=j.pointerId;return Wm.set(U,yd(Wm.get(U)||null,u,h,b,M,j)),!0;case"gotpointercapture":return U=j.pointerId,Ym.set(U,yd(Ym.get(U)||null,u,h,b,M,j)),!0}return!1}function K2(u){var h=mo(u.target);if(h!==null){var b=i(h);if(b!==null){if(h=b.tag,h===13){if(h=o(b),h!==null){u.blockedOn=h,Bt(u.priority,function(){xM(b)});return}}else if(h===31){if(h=a(b),h!==null){u.blockedOn=h,Bt(u.priority,function(){xM(b)});return}}else if(h===3&&b.stateNode.current.memoizedState.isDehydrated){u.blockedOn=b.tag===3?b.stateNode.containerInfo:null;return}}}u.blockedOn=null}function ey(u){if(u.blockedOn!==null)return!1;for(var h=u.targetContainers;0<h.length;){var b=W2(u.nativeEvent);if(b===null){b=u.nativeEvent;var M=new b.constructor(b.type,b);ib=M,b.target.dispatchEvent(M),ib=null}else return h=si(b),h!==null&&bM(h),u.blockedOn=b,!1;h.shift()}return!0}function EM(u,h,b){ey(u)&&b.delete(h)}function aR(){G2=!1,ru!==null&&ey(ru)&&(ru=null),su!==null&&ey(su)&&(su=null),iu!==null&&ey(iu)&&(iu=null),Wm.forEach(EM),Ym.forEach(EM)}function sp(u,h){u.blockedOn===h&&(u.blockedOn=null,G2||(G2=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aR)))}var ty=null;function MM(u){ty!==u&&(ty=u,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ty===u&&(ty=null);for(var h=0;h<u.length;h+=3){var b=u[h],M=u[h+1],j=u[h+2];if(typeof M!="function"){if(Y2(M||b)===null)continue;break}var U=si(b);U!==null&&(u.splice(h,3),h-=3,Vc(U,{pending:!0,data:j,method:b.method,action:M},M,j))}}))}function ip(u){function h(ge){return sp(ge,u)}ru!==null&&sp(ru,u),su!==null&&sp(su,u),iu!==null&&sp(iu,u),Wm.forEach(h),Ym.forEach(h);for(var b=0;b<ou.length;b++){var M=ou[b];M.blockedOn===u&&(M.blockedOn=null)}for(;0<ou.length&&(b=ou[0],b.blockedOn===null);)K2(b),b.blockedOn===null&&ou.shift();if(b=(u.ownerDocument||u).$$reactFormReplay,b!=null)for(M=0;M<b.length;M+=3){var j=b[M],U=b[M+1],J=j[Kn]||null;if(typeof U=="function")J||MM(b);else if(J){var se=null;if(U&&U.hasAttribute("formAction")){if(j=U,J=U[Kn]||null)se=J.formAction;else if(Y2(j)!==null)continue}else se=J.action;typeof se=="function"?b[M+1]=se:(b.splice(M,3),M-=3),MM(b)}}}function Ti(){function u(U){U.canIntercept&&U.info==="react-transition"&&U.intercept({handler:function(){return new Promise(function(J){return j=J})},focusReset:"manual",scroll:"manual"})}function h(){j!==null&&(j(),j=null),M||setTimeout(b,20)}function b(){if(!M&&!navigation.transition){var U=navigation.currentEntry;U&&U.url!=null&&navigation.navigate(U.url,{state:U.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var M=!1,j=null;return navigation.addEventListener("navigate",u),navigation.addEventListener("navigatesuccess",h),navigation.addEventListener("navigateerror",h),setTimeout(b,100),function(){M=!0,navigation.removeEventListener("navigate",u),navigation.removeEventListener("navigatesuccess",h),navigation.removeEventListener("navigateerror",h),j!==null&&(j(),j=null)}}}function Gm(u){this._internalRoot=u}ny.prototype.render=Gm.prototype.render=function(u){var h=this._internalRoot;if(h===null)throw Error(r(409));var b=h.current,M=Oo();vM(b,M,u,h,null,null)},ny.prototype.unmount=Gm.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var h=u.containerInfo;vM(u.current,2,null,u,null,null),I0(),h[Nr]=null}};function ny(u){this._internalRoot=u}ny.prototype.unstable_scheduleHydration=function(u){if(u){var h=Gn();u={blockedOn:null,target:u,priority:h};for(var b=0;b<ou.length&&h!==0&&h<ou[b].priority;b++);ou.splice(b,0,u),b===0&&K2(u)}};var DM=e.version;if(DM!=="19.2.3")throw Error(r(527,DM,"19.2.3"));B.findDOMNode=function(u){var h=u._reactInternals;if(h===void 0)throw typeof u.render=="function"?Error(r(188)):(u=Object.keys(u).join(","),Error(r(268,u)));return u=c(h),u=u!==null?d(u):null,u=u===null?null:u.stateNode,u};var lR={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ry=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ry.isDisabled&&ry.supportsFiber)try{Ot=ry.inject(lR),Pt=ry}catch{}}return J2.createRoot=function(u,h){if(!s(u))throw Error(r(299));var b=!1,M="",j=Zb,U=Jb,J=dE;return h!=null&&(h.unstable_strictMode===!0&&(b=!0),h.identifierPrefix!==void 0&&(M=h.identifierPrefix),h.onUncaughtError!==void 0&&(j=h.onUncaughtError),h.onCaughtError!==void 0&&(U=h.onCaughtError),h.onRecoverableError!==void 0&&(J=h.onRecoverableError)),h=mM(u,1,!1,null,null,b,M,null,j,U,J,Ti),u[Nr]=h.current,N2(u),new Gm(h)},J2.hydrateRoot=function(u,h,b){if(!s(u))throw Error(r(299));var M=!1,j="",U=Zb,J=Jb,se=dE,ge=null;return b!=null&&(b.unstable_strictMode===!0&&(M=!0),b.identifierPrefix!==void 0&&(j=b.identifierPrefix),b.onUncaughtError!==void 0&&(U=b.onUncaughtError),b.onCaughtError!==void 0&&(J=b.onCaughtError),b.onRecoverableError!==void 0&&(se=b.onRecoverableError),b.formState!==void 0&&(ge=b.formState)),h=mM(u,1,!0,h,b??null,M,j,ge,U,J,se,Ti),h.context=gM(null),b=h.current,M=Oo(),M=Hn(M),j=Hc(M),j.callback=null,Ra(b,j,M),b=M,h.current.lanes=b,xt(h,b),dl(h),u[Nr]=h.current,N2(u),new ny(h)},J2.version="19.2.3",J2}var xF;function _fe(){if(xF)return dR.exports;xF=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),dR.exports=Afe(),dR.exports}var Ofe=_fe();const Rfe=Mr(Ofe);var O=vi();const xe=Mr(O),UX=wfe({__proto__:null,default:xe},[O]);var gR={exports:{}},vR={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var SF;function Nfe(){if(SF)return vR;SF=1;var t=vi();function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,s=t.useRef,i=t.useEffect,o=t.useMemo,a=t.useDebugValue;return vR.useSyncExternalStoreWithSelector=function(l,c,d,f,p){var m=s(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=o(function(){function x(T){if(!w){if(w=!0,C=T,T=f(T),p!==void 0&&v.hasValue){var A=v.value;if(p(A,T))return E=A}return E=T}if(A=E,n(C,T))return A;var _=f(T);return p!==void 0&&p(A,_)?(C=T,A):(C=T,E=_)}var w=!1,C,E,D=d===void 0?null:d;return[function(){return x(c())},D===null?void 0:function(){return x(D())}]},[c,d,f,p]);var y=r(l,m[0],m[1]);return i(function(){v.hasValue=!0,v.value=y},[y]),a(y),y},vR}var wF;function jfe(){return wF||(wF=1,gR.exports=Nfe()),gR.exports}var Ife=jfe();function Lfe(t){t()}function Pfe(){let t=null,e=null;return{clear(){t=null,e=null},notify(){Lfe(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const s=e={callback:n,next:null,prev:e};return s.prev?s.prev.next=s:t=s,function(){!r||t===null||(r=!1,s.next?s.next.prev=s.prev:e=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var CF={notify(){},get:()=>[]};function $fe(t,e){let n,r=CF,s=0,i=!1;function o(y){d();const x=r.subscribe(y);let w=!1;return()=>{w||(w=!0,x(),f())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function d(){s++,n||(n=t.subscribe(l),r=Pfe())}function f(){s--,n&&s===0&&(n(),n=void 0,r.clear(),r=CF)}function p(){i||(i=!0,d())}function m(){i&&(i=!1,f())}const v={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return v}var zfe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ffe=zfe(),Bfe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Hfe=Bfe(),qfe=()=>Ffe||Hfe?O.useLayoutEffect:O.useEffect,Ufe=qfe(),yR=Symbol.for("react-redux-context"),bR=typeof globalThis<"u"?globalThis:{};function Vfe(){if(!O.createContext)return{};const t=bR[yR]??(bR[yR]=new Map);let e=t.get(O.createContext);return e||(e=O.createContext(null),t.set(O.createContext,e)),e}var th=Vfe();function Wfe(t){const{children:e,context:n,serverState:r,store:s}=t,i=O.useMemo(()=>{const l=$fe(s);return{store:s,subscription:l,getServerState:r?()=>r:void 0}},[s,r]),o=O.useMemo(()=>s.getState(),[s]);Ufe(()=>{const{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==s.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,o]);const a=n||th;return O.createElement(a.Provider,{value:i},e)}var Yfe=Wfe;function zP(t=th){return function(){return O.useContext(t)}}var VX=zP();function WX(t=th){const e=t===th?VX:zP(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var Gfe=WX();function Kfe(t=th){const e=t===th?Gfe:WX(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var MA=Kfe(),Zfe=(t,e)=>t===e;function Jfe(t=th){const e=t===th?VX:zP(t),n=(r,s={})=>{const{equalityFn:i=Zfe}=typeof s=="function"?{equalityFn:s}:s,o=e(),{store:a,subscription:l,getServerState:c}=o;O.useRef(!0);const d=O.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=Ife.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,d,i);return O.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var nh=Jfe();/**
 * @remix-run/router v1.5.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function lS(){return lS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lS.apply(this,arguments)}var Np;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Np||(Np={}));const EF="popstate";function Xfe(t){t===void 0&&(t={});function e(r,s){let{pathname:i,search:o,hash:a}=r.location;return MI("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Dk(s)}return epe(e,n,null,t)}function Vs(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function FP(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Qfe(){return Math.random().toString(36).substr(2,8)}function MF(t,e){return{usr:t.state,key:t.key,idx:e}}function MI(t,e,n,r){return n===void 0&&(n=null),lS({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?S1(e):e,{state:n,key:e&&e.key||r||Qfe()})}function Dk(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function S1(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function epe(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Np.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(lS({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Np.Pop;let x=d(),w=x==null?null:x-c;c=x,l&&l({action:a,location:y.location,delta:w})}function p(x,w){a=Np.Push;let C=MI(y.location,x,w);c=d()+1;let E=MF(C,c),D=y.createHref(C);try{o.pushState(E,"",D)}catch{s.location.assign(D)}i&&l&&l({action:a,location:y.location,delta:1})}function m(x,w){a=Np.Replace;let C=MI(y.location,x,w);c=d();let E=MF(C,c),D=y.createHref(C);o.replaceState(E,"",D),i&&l&&l({action:a,location:y.location,delta:0})}function v(x){let w=s.location.origin!=="null"?s.location.origin:s.location.href,C=typeof x=="string"?x:Dk(x);return Vs(w,"No window.location.(origin|href) available to create URL for href: "+C),new URL(C,w)}let y={get action(){return a},get location(){return t(s,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(EF,f),l=x,()=>{s.removeEventListener(EF,f),l=null}},createHref(x){return e(s,x)},createURL:v,encodeLocation(x){let w=v(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:m,go(x){return o.go(x)}};return y}var DF;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(DF||(DF={}));function tpe(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?S1(e):e,s=BP(r.pathname||"/",n);if(s==null)return null;let i=YX(t);npe(i);let o=null;for(let a=0;o==null&&a<i.length;++a)o=dpe(i[a],hpe(s));return o}function YX(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Vs(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Up([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(Vs(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),YX(i.children,e,d,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:cpe(c,i.index),routesMeta:d})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of GX(i.path))s(i,o,l)}),e}function GX(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=GX(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function npe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:upe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rpe=/^:\w+$/,spe=3,ipe=2,ope=1,ape=10,lpe=-2,kF=t=>t==="*";function cpe(t,e){let n=t.split("/"),r=n.length;return n.some(kF)&&(r+=lpe),e&&(r+=ipe),n.filter(s=>!kF(s)).reduce((s,i)=>s+(rpe.test(i)?spe:i===""?ope:ape),r)}function upe(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function dpe(t,e){let{routesMeta:n}=t,r={},s="/",i=[];for(let o=0;o<n.length;++o){let a=n[o],l=o===n.length-1,c=s==="/"?e:e.slice(s.length)||"/",d=fpe({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!d)return null;Object.assign(r,d.params);let f=a.route;i.push({params:r,pathname:Up([s,d.pathname]),pathnameBase:ype(Up([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=Up([s,d.pathnameBase]))}return i}function fpe(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=ppe(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{if(d==="*"){let p=a[f]||"";o=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}return c[d]=mpe(a[f]||"",d),c},{}),pathname:i,pathnameBase:o,pattern:t}}function ppe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),FP(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(r.push(a),"/([^\\/]+)"));return t.endsWith("*")?(r.push("*"),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function hpe(t){try{return decodeURI(t)}catch(e){return FP(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function mpe(t,e){try{return decodeURIComponent(t)}catch(n){return FP(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+t+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),t}}function BP(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function gpe(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?S1(t):t;return{pathname:n?n.startsWith("/")?n:vpe(n,e):e,search:bpe(r),hash:xpe(s)}}function vpe(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function xR(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function KX(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ZX(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=S1(t):(s=lS({},t),Vs(!s.pathname||!s.pathname.includes("?"),xR("?","pathname","search",s)),Vs(!s.pathname||!s.pathname.includes("#"),xR("#","pathname","hash",s)),Vs(!s.search||!s.search.includes("#"),xR("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(r||o==null)a=n;else{let f=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=gpe(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Up=t=>t.join("/").replace(/\/\/+/g,"/"),ype=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),bpe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,xpe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Spe(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const JX=["post","put","patch","delete"];new Set(JX);const wpe=["get",...JX];new Set(wpe);/**
 * React Router v6.10.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */const XX=O.createContext(null),HP=O.createContext(null),iw=O.createContext(null),DA=O.createContext(null),vh=O.createContext({outlet:null,matches:[]}),QX=O.createContext(null);function DI(){return DI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},DI.apply(this,arguments)}function Cpe(t,e){let{relative:n}=e===void 0?{}:e;w1()||Vs(!1);let{basename:r,navigator:s}=O.useContext(iw),{hash:i,pathname:o,search:a}=eQ(t,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:Up([r,o])),s.createHref({pathname:l,search:a,hash:i})}function w1(){return O.useContext(DA)!=null}function yh(){return w1()||Vs(!1),O.useContext(DA).location}function Br(){w1()||Vs(!1);let{basename:t,navigator:e}=O.useContext(iw),{matches:n}=O.useContext(vh),{pathname:r}=yh(),s=JSON.stringify(KX(n).map(a=>a.pathnameBase)),i=O.useRef(!1);return O.useEffect(()=>{i.current=!0}),O.useCallback(function(a,l){if(l===void 0&&(l={}),!i.current)return;if(typeof a=="number"){e.go(a);return}let c=ZX(a,JSON.parse(s),r,l.relative==="path");t!=="/"&&(c.pathname=c.pathname==="/"?t:Up([t,c.pathname])),(l.replace?e.replace:e.push)(c,l.state,l)},[t,e,s,r])}const Epe=O.createContext(null);function Mpe(t){let e=O.useContext(vh).outlet;return e&&O.createElement(Epe.Provider,{value:t},e)}function Fu(){let{matches:t}=O.useContext(vh),e=t[t.length-1];return e?e.params:{}}function eQ(t,e){let{relative:n}=e===void 0?{}:e,{matches:r}=O.useContext(vh),{pathname:s}=yh(),i=JSON.stringify(KX(r).map(o=>o.pathnameBase));return O.useMemo(()=>ZX(t,JSON.parse(i),s,n==="path"),[t,i,s,n])}function Dpe(t,e){w1()||Vs(!1);let{navigator:n}=O.useContext(iw),r=O.useContext(HP),{matches:s}=O.useContext(vh),i=s[s.length-1],o=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=yh(),c;if(e){var d;let y=typeof e=="string"?S1(e):e;a==="/"||(d=y.pathname)!=null&&d.startsWith(a)||Vs(!1),c=y}else c=l;let f=c.pathname||"/",p=a==="/"?f:f.slice(a.length)||"/",m=tpe(t,{pathname:p}),v=_pe(m&&m.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:Up([a,n.encodeLocation?n.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?a:Up([a,n.encodeLocation?n.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,r||void 0);return e&&v?O.createElement(DA.Provider,{value:{location:DI({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Np.Pop}},v):v}function kpe(){let t=jpe(),e=Spe(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),n?O.createElement("pre",{style:s},n):null,null)}class Tpe extends O.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location?{error:e.error,location:e.location}:{error:e.error||n.error,location:n.location}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error?O.createElement(vh.Provider,{value:this.props.routeContext},O.createElement(QX.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ape(t){let{routeContext:e,match:n,children:r}=t,s=O.useContext(XX);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(vh.Provider,{value:e},r)}function _pe(t,e,n){if(e===void 0&&(e=[]),t==null)if(n!=null&&n.errors)t=n.matches;else return null;let r=t,s=n==null?void 0:n.errors;if(s!=null){let i=r.findIndex(o=>o.route.id&&(s==null?void 0:s[o.route.id]));i>=0||Vs(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((i,o,a)=>{let l=o.route.id?s==null?void 0:s[o.route.id]:null,c=null;n&&(o.route.ErrorBoundary?c=O.createElement(o.route.ErrorBoundary,null):o.route.errorElement?c=o.route.errorElement:c=O.createElement(kpe,null));let d=e.concat(r.slice(0,a+1)),f=()=>{let p=i;return l?p=c:o.route.Component?p=O.createElement(o.route.Component,null):o.route.element&&(p=o.route.element),O.createElement(Ape,{match:o,routeContext:{outlet:i,matches:d},children:p})};return n&&(o.route.ErrorBoundary||o.route.errorElement||a===0)?O.createElement(Tpe,{location:n.location,component:c,error:l,children:f(),routeContext:{outlet:null,matches:d}}):f()},null)}var TF;(function(t){t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator"})(TF||(TF={}));var kk;(function(t){t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator"})(kk||(kk={}));function Ope(t){let e=O.useContext(HP);return e||Vs(!1),e}function Rpe(t){let e=O.useContext(vh);return e||Vs(!1),e}function Npe(t){let e=Rpe(),n=e.matches[e.matches.length-1];return n.route.id||Vs(!1),n.route.id}function jpe(){var t;let e=O.useContext(QX),n=Ope(kk.UseRouteError),r=Npe(kk.UseRouteError);return e||((t=n.errors)==null?void 0:t[r])}function tQ(t){let{to:e,replace:n,state:r,relative:s}=t;w1()||Vs(!1);let i=O.useContext(HP),o=Br();return O.useEffect(()=>{i&&i.navigation.state!=="idle"||o(e,{replace:n,state:r,relative:s})}),null}function nQ(t){return Mpe(t.context)}function ua(t){Vs(!1)}function Ipe(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Np.Pop,navigator:i,static:o=!1}=t;w1()&&Vs(!1);let a=e.replace(/^\/*/,"/"),l=O.useMemo(()=>({basename:a,navigator:i,static:o}),[a,i,o]);typeof r=="string"&&(r=S1(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,v=O.useMemo(()=>{let y=BP(c,a);return y==null?null:{location:{pathname:y,search:d,hash:f,state:p,key:m},navigationType:s}},[a,c,d,f,p,m,s]);return v==null?null:O.createElement(iw.Provider,{value:l},O.createElement(DA.Provider,{children:n,value:v}))}function Lpe(t){let{children:e,location:n}=t,r=O.useContext(XX),s=r&&!e?r.router.routes:kI(e);return Dpe(s,n)}var AF;(function(t){t[t.pending=0]="pending",t[t.success=1]="success",t[t.error=2]="error"})(AF||(AF={}));new Promise(()=>{});function kI(t,e){e===void 0&&(e=[]);let n=[];return O.Children.forEach(t,(r,s)=>{if(!O.isValidElement(r))return;let i=[...e,s];if(r.type===O.Fragment){n.push.apply(n,kI(r.props.children,i));return}r.type!==ua&&Vs(!1),!r.props.index||!r.props.children||Vs(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=kI(r.props.children,i)),n.push(o)}),n}/**
 * React Router DOM v6.10.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function TI(){return TI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},TI.apply(this,arguments)}function Ppe(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}function $pe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function zpe(t,e){return t.button===0&&(!e||e==="_self")&&!$pe(t)}function AI(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Fpe(t,e){let n=AI(t);if(e)for(let r of e.keys())n.has(r)||e.getAll(r).forEach(s=>{n.append(r,s)});return n}const Bpe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Hpe(t){let{basename:e,children:n,window:r}=t,s=O.useRef();s.current==null&&(s.current=Xfe({window:r,v5Compat:!0}));let i=s.current,[o,a]=O.useState({action:i.action,location:i.location});return O.useLayoutEffect(()=>i.listen(a),[i]),O.createElement(Ipe,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:i})}const qpe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Upe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qP=O.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d}=e,f=Ppe(e,Bpe),{basename:p}=O.useContext(iw),m,v=!1;if(typeof c=="string"&&Upe.test(c)&&(m=c,qpe)){let C=new URL(window.location.href),E=c.startsWith("//")?new URL(C.protocol+c):new URL(c),D=BP(E.pathname,p);E.origin===C.origin&&D!=null?c=D+E.search+E.hash:v=!0}let y=Cpe(c,{relative:s}),x=Vpe(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s});function w(C){r&&r(C),C.defaultPrevented||x(C)}return O.createElement("a",TI({},f,{href:m||y,onClick:v||i?r:w,ref:n,target:l}))});var _F;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmitImpl="useSubmitImpl",t.UseFetcher="useFetcher"})(_F||(_F={}));var OF;(function(t){t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(OF||(OF={}));function Vpe(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o}=e===void 0?{}:e,a=Br(),l=yh(),c=eQ(t,{relative:o});return O.useCallback(d=>{if(zpe(d,n)){d.preventDefault();let f=r!==void 0?r:Dk(l)===Dk(c);a(t,{replace:f,state:s,preventScrollReset:i,relative:o})}},[l,a,c,r,s,n,t,i,o])}function Wpe(t){let e=O.useRef(AI(t)),n=O.useRef(!1),r=yh(),s=O.useMemo(()=>Fpe(r.search,n.current?null:e.current),[r.search]),i=Br(),o=O.useCallback((a,l)=>{const c=AI(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}var gu=function(){return gu=Object.assign||function(e){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},gu.apply(this,arguments)};function rQ(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}function sv(t,e,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(d){try{c(r.next(d))}catch(f){o(f)}}function l(d){try{c(r.throw(d))}catch(f){o(f)}}function c(d){d.done?i(d.value):s(d.value).then(a,l)}c((r=r.apply(t,e||[])).next())})}function Ype(t,e,n){if(n||arguments.length===2)for(var r=0,s=e.length,i;r<s;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}var _D="right-scroll-bar-position",OD="width-before-scroll-bar",Gpe="with-scroll-bars-hidden",Kpe="--removed-body-scroll-bar-size";function SR(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Zpe(t,e){var n=O.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=e,n.facade}var Jpe=typeof window<"u"?O.useLayoutEffect:O.useEffect,RF=new WeakMap;function Xpe(t,e){var n=Zpe(null,function(r){return t.forEach(function(s){return SR(s,r)})});return Jpe(function(){var r=RF.get(n);if(r){var s=new Set(r),i=new Set(t),o=n.current;s.forEach(function(a){i.has(a)||SR(a,null)}),i.forEach(function(a){s.has(a)||SR(a,o)})}RF.set(n,t)},[t]),n}function Qpe(t){return t}function ehe(t,e){e===void 0&&(e=Qpe);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(i){var o=e(i,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var d=o;o=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){o.push(d),c()},filter:function(d){return o=o.filter(d),n}}}};return s}function the(t){t===void 0&&(t={});var e=ehe(null);return e.options=gu({async:!0,ssr:!1},t),e}var sQ=function(t){var e=t.sideCar,n=rQ(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return O.createElement(r,gu({},n))};sQ.isSideCarExport=!0;function nhe(t,e){return t.useMedium(e),sQ}var iQ=the(),wR=function(){},kA=O.forwardRef(function(t,e){var n=O.useRef(null),r=O.useState({onScrollCapture:wR,onWheelCapture:wR,onTouchMoveCapture:wR}),s=r[0],i=r[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,m=t.noRelative,v=t.noIsolation,y=t.inert,x=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,E=t.gapMode,D=rQ(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=p,A=Xpe([n,e]),_=gu(gu({},D),s);return O.createElement(O.Fragment,null,d&&O.createElement(T,{sideCar:iQ,removeScrollBar:c,shards:f,noRelative:m,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:E}),o?O.cloneElement(O.Children.only(a),gu(gu({},_),{ref:A})):O.createElement(C,gu({},_,{className:l,ref:A}),a))});kA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};kA.classNames={fullWidth:OD,zeroRight:_D};var rhe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function she(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=rhe();return e&&t.setAttribute("nonce",e),t}function ihe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ohe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var ahe=function(){var t=0,e=null;return{add:function(n){t==0&&(e=she())&&(ihe(e,n),ohe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},lhe=function(){var t=ahe();return function(e,n){O.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},oQ=function(){var t=lhe(),e=function(n){var r=n.styles,s=n.dynamic;return t(r,s),null};return e},che={left:0,top:0,right:0,gap:0},CR=function(t){return parseInt(t||"",10)||0},uhe=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[CR(n),CR(r),CR(s)]},dhe=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return che;var e=uhe(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},fhe=oQ(),Ly="data-scroll-locked",phe=function(t,e,n,r){var s=t.left,i=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),`
  .`.concat(Gpe,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(a,"px ").concat(r,`;
  }
  body[`).concat(Ly,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(s,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(o,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(a,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(_D,` {
    right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(OD,` {
    margin-right: `).concat(a,"px ").concat(r,`;
  }
  
  .`).concat(_D," .").concat(_D,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(OD," .").concat(OD,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Ly,`] {
    `).concat(Kpe,": ").concat(a,`px;
  }
`)},NF=function(){var t=parseInt(document.body.getAttribute(Ly)||"0",10);return isFinite(t)?t:0},hhe=function(){O.useEffect(function(){return document.body.setAttribute(Ly,(NF()+1).toString()),function(){var t=NF()-1;t<=0?document.body.removeAttribute(Ly):document.body.setAttribute(Ly,t.toString())}},[])},mhe=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;hhe();var i=O.useMemo(function(){return dhe(s)},[s]);return O.createElement(fhe,{styles:phe(i,!e,s,n?"":"!important")})},_I=!1;if(typeof window<"u")try{var kM=Object.defineProperty({},"passive",{get:function(){return _I=!0,!0}});window.addEventListener("test",kM,kM),window.removeEventListener("test",kM,kM)}catch{_I=!1}var sy=_I?{passive:!1}:!1,ghe=function(t){return t.tagName==="TEXTAREA"},aQ=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ghe(t)&&n[e]==="visible")},vhe=function(t){return aQ(t,"overflowY")},yhe=function(t){return aQ(t,"overflowX")},jF=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=lQ(t,r);if(s){var i=cQ(t,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bhe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},xhe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},lQ=function(t,e){return t==="v"?vhe(e):yhe(e)},cQ=function(t,e){return t==="v"?bhe(e):xhe(e)},She=function(t,e){return t==="h"&&e==="rtl"?-1:1},whe=function(t,e,n,r,s){var i=She(t,window.getComputedStyle(e).direction),o=i*r,a=n.target,l=e.contains(a),c=!1,d=o>0,f=0,p=0;do{if(!a)break;var m=cQ(t,a),v=m[0],y=m[1],x=m[2],w=y-x-i*v;(v||w)&&lQ(t,a)&&(f+=w,p+=v);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(c=!0),c},TM=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},IF=function(t){return[t.deltaX,t.deltaY]},LF=function(t){return t&&"current"in t?t.current:t},Che=function(t,e){return t[0]===e[0]&&t[1]===e[1]},Ehe=function(t){return`
  .block-interactivity-`.concat(t,` {pointer-events: none;}
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
`)},Mhe=0,iy=[];function Dhe(t){var e=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),s=O.useState(Mhe++)[0],i=O.useState(oQ)[0],o=O.useRef(t);O.useEffect(function(){o.current=t},[t]),O.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var y=Ype([t.lockRef.current],(t.shards||[]).map(LF),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=O.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=TM(y),C=n.current,E="deltaX"in y?y.deltaX:C[0]-w[0],D="deltaY"in y?y.deltaY:C[1]-w[1],T,A=y.target,_=Math.abs(E)>Math.abs(D)?"h":"v";if("touches"in y&&_==="h"&&A.type==="range")return!1;var R=window.getSelection(),N=R&&R.anchorNode,I=N?N===A||N.contains(A):!1;if(I)return!1;var $=jF(_,A);if(!$)return!0;if($?T=_:(T=_==="v"?"h":"v",$=jF(_,A)),!$)return!1;if(!r.current&&"changedTouches"in y&&(E||D)&&(r.current=T),!T)return!0;var L=r.current||T;return whe(L,x,y,L==="h"?E:D)},[]),l=O.useCallback(function(y){var x=y;if(!(!iy.length||iy[iy.length-1]!==i)){var w="deltaY"in x?IF(x):TM(x),C=e.current.filter(function(T){return T.name===x.type&&(T.target===x.target||x.target===T.shadowParent)&&Che(T.delta,w)})[0];if(C&&C.should){x.cancelable&&x.preventDefault();return}if(!C){var E=(o.current.shards||[]).map(LF).filter(Boolean).filter(function(T){return T.contains(x.target)}),D=E.length>0?a(x,E[0]):!o.current.noIsolation;D&&x.cancelable&&x.preventDefault()}}},[]),c=O.useCallback(function(y,x,w,C){var E={name:y,delta:x,target:w,should:C,shadowParent:khe(w)};e.current.push(E),setTimeout(function(){e.current=e.current.filter(function(D){return D!==E})},1)},[]),d=O.useCallback(function(y){n.current=TM(y),r.current=void 0},[]),f=O.useCallback(function(y){c(y.type,IF(y),y.target,a(y,t.lockRef.current))},[]),p=O.useCallback(function(y){c(y.type,TM(y),y.target,a(y,t.lockRef.current))},[]);O.useEffect(function(){return iy.push(i),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,sy),document.addEventListener("touchmove",l,sy),document.addEventListener("touchstart",d,sy),function(){iy=iy.filter(function(y){return y!==i}),document.removeEventListener("wheel",l,sy),document.removeEventListener("touchmove",l,sy),document.removeEventListener("touchstart",d,sy)}},[]);var m=t.removeScrollBar,v=t.inert;return O.createElement(O.Fragment,null,v?O.createElement(i,{styles:Ehe(s)}):null,m?O.createElement(mhe,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function khe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const The=nhe(iQ,Dhe);var Ig=O.forwardRef(function(t,e){return O.createElement(kA,gu({},t,{ref:e,sideCar:The}))});Ig.classNames=kA.classNames;function ir(t){return Object.keys(t)}function ER(t){return t&&typeof t=="object"&&!Array.isArray(t)}function UP(t,e){const n={...t},r=e;return ER(t)&&ER(e)&&Object.keys(e).forEach(s=>{ER(r[s])&&s in t?n[s]=UP(n[s],r[s]):n[s]=r[s]}),n}function Ahe(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function _he(t){var e;return typeof t!="string"||!t.includes("var(--mantine-scale)")?t:(e=t.match(/^calc\((.*?)\)$/))==null?void 0:e[1].split("*")[0].trim()}function Lg(t){const e=_he(t);return typeof e=="number"?e:typeof e=="string"?e.includes("calc")||e.includes("var")?e:e.includes("px")?Number(e.replace("px","")):e.includes("rem")?Number(e.replace("rem",""))*16:e.includes("em")?Number(e.replace("em",""))*16:Number(e):NaN}function PF(t){return t==="0rem"?"0rem":`calc(${t} * var(--mantine-scale))`}function uQ(t,{shouldScale:e=!1}={}){function n(r){if(r===0||r==="0")return`0${t}`;if(typeof r=="number"){const s=`${r/16}${t}`;return e?PF(s):s}if(typeof r=="string"){if(r===""||r.startsWith("calc(")||r.startsWith("clamp(")||r.includes("rgba("))return r;if(r.includes(","))return r.split(",").map(i=>n(i)).join(",");if(r.includes(" "))return r.split(" ").map(i=>n(i)).join(" ");const s=r.replace("px","");if(!Number.isNaN(Number(s))){const i=`${Number(s)/16}${t}`;return e?PF(i):i}}return r}return n}const Ee=uQ("rem",{shouldScale:!0}),Tk=uQ("em");function Bu(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}function dQ(t){if(typeof t=="number")return!0;if(typeof t=="string"){if(t.startsWith("calc(")||t.startsWith("var(")||t.includes(" ")&&t.trim()!=="")return!0;const e=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return t.trim().split(/\s+/).every(r=>e.test(r))}return!1}function TA(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==O.Fragment:!1}function Ys(t){const e=O.createContext(null);return[({children:s,value:i})=>g.jsx(e.Provider,{value:i,children:s}),()=>{const s=O.useContext(e);if(s===null)throw new Error(t);return s}]}function Jd(t=null){const e=O.createContext(t);return[({children:s,value:i})=>g.jsx(e.Provider,{value:i,children:s}),()=>O.useContext(e)]}function Ak(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}function _k(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function Ohe(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function Rhe(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].disabled)return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].disabled)return r}return t}function Nhe(t,e,n){return _k(t,n)===_k(e,n)}function AA({parentSelector:t,siblingSelector:e,onKeyDown:n,loop:r=!0,activateOnFocus:s=!1,dir:i="rtl",orientation:o}){return a=>{var v;n==null||n(a);const l=Array.from(((v=_k(a.currentTarget,t))==null?void 0:v.querySelectorAll(e))||[]).filter(y=>Nhe(a.currentTarget,y,t)),c=l.findIndex(y=>a.currentTarget===y),d=Rhe(c,l,r),f=Ohe(c,l,r),p=i==="rtl"?f:d,m=i==="rtl"?d:f;switch(a.key){case"ArrowRight":{o==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[p].focus(),s&&l[p].click());break}case"ArrowLeft":{o==="horizontal"&&(a.stopPropagation(),a.preventDefault(),l[m].focus(),s&&l[m].click());break}case"ArrowUp":{o==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[f].focus(),s&&l[f].click());break}case"ArrowDown":{o==="vertical"&&(a.stopPropagation(),a.preventDefault(),l[d].focus(),s&&l[d].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const y=l.length-1;!l[y].disabled&&l[y].focus();break}}}}const jhe={app:100,modal:200,popover:300,overlay:400,max:9999};function yi(t){return jhe[t]}const Ok=()=>{};function Ihe(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||Ok:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function Qt(t,e="size",n=!0){if(t!==void 0)return dQ(t)?n?Ee(t):t:`var(--${e}-${t})`}function Er(t){return Qt(t,"mantine-spacing")}function ar(t){return t===void 0?"var(--mantine-radius-default)":Qt(t,"mantine-radius")}function hs(t){return Qt(t,"mantine-font-size")}function fQ(t){return Qt(t,"mantine-line-height",!1)}function VP(t){if(t)return Qt(t,"mantine-shadow",!1)}function Hs(t,e){return n=>{t==null||t(n),e==null||e(n)}}function WP(t,e){return t in e?Lg(e[t]):Lg(t)}function Wy(t,e){const n=t.map(r=>({value:r,px:WP(r,e)}));return n.sort((r,s)=>r.px-s.px),n}function Po(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function Lhe(t,e,n){var r;return n?Array.from(((r=_k(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(s=>s===n):null}function Eu(t,e,n){return e===void 0&&n===void 0?t:e!==void 0&&n===void 0?Math.max(t,e):Math.min(e===void 0&&n!==void 0?t:Math.max(t,e),n)}function Sg(t="mantine-"){return`${t}${Math.random().toString(36).slice(2,11)}`}function Phe(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:r}=n;if(r!==Object.keys(e).length)return!1;for(let s=0;s<r;s+=1){const i=n[s];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function $F(t){return typeof t!="string"?"":t.charAt(0).toUpperCase()+t.slice(1)}function ig(t){const e=O.useRef(t);return O.useEffect(()=>{e.current=t}),O.useMemo(()=>((...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)}),[])}function _A(t,e){const{delay:n,flushOnUnmount:r,leading:s}=typeof e=="number"?{delay:e,flushOnUnmount:!1,leading:!1}:e,i=ig(t),o=O.useRef(0),a=O.useMemo(()=>{const l=Object.assign((...c)=>{window.clearTimeout(o.current);const d=l._isFirstCall;l._isFirstCall=!1;function f(){window.clearTimeout(o.current),o.current=0,l._isFirstCall=!0}if(s&&d){i(...c);const v=()=>{f()},y=()=>{o.current!==0&&(f(),i(...c))},x=()=>{f()};l.flush=y,l.cancel=x,o.current=window.setTimeout(v,n);return}if(s&&!d){const v=()=>{o.current!==0&&(f(),i(...c))},y=()=>{f()};l.flush=v,l.cancel=y;const x=()=>{f()};o.current=window.setTimeout(x,n);return}const p=()=>{o.current!==0&&(f(),i(...c))},m=()=>{f()};l.flush=p,l.cancel=m,o.current=window.setTimeout(p,n)},{flush:()=>{},cancel:()=>{},_isFirstCall:!0});return l},[i,n,s]);return O.useEffect(()=>()=>{r?a.flush():a.cancel()},[a,r]),a}const $he=["mousedown","touchstart"];function ow(t,e,n){const r=O.useRef(null),s=e||$he;return O.useEffect(()=>{const i=o=>{const{target:a}=o??{};if(Array.isArray(n)){const l=!document.body.contains(a)&&(a==null?void 0:a.tagName)!=="HTML";n.every(d=>!!d&&!o.composedPath().includes(d))&&!l&&t(o)}else r.current&&!r.current.contains(a)&&t(o)};return s.forEach(o=>document.addEventListener(o,i)),()=>{s.forEach(o=>document.removeEventListener(o,i))}},[r,t,n]),r}function zhe(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function Fhe(t,e){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function pQ(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,s]=O.useState(n?e:Fhe(t));return O.useEffect(()=>{try{const i=window.matchMedia(t);return s(i.matches),zhe(i,o=>s(o.matches))}catch{return}},[t]),r||!1}function Bhe(t,e){return pQ("(prefers-color-scheme: dark)",t==="dark",e)?"dark":"light"}function OA(t,e,n={leading:!1}){const[r,s]=O.useState(t),i=O.useRef(!1),o=O.useRef(null),a=O.useRef(!1),l=O.useCallback(()=>window.clearTimeout(o.current),[]);return O.useEffect(()=>{i.current&&(!a.current&&n.leading?(a.current=!0,s(t)):(l(),o.current=window.setTimeout(()=>{a.current=!1,s(t)},e)))},[t,n.leading,e]),O.useEffect(()=>(i.current=!0,l),[]),[r,l]}const bh=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Ru(t,e){const n=O.useRef(!1);O.useEffect(()=>()=>{n.current=!1},[]),O.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function hQ({opened:t,shouldReturnFocus:e=!0}){const n=O.useRef(null),r=()=>{var s;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((s=n.current)==null||s.focus({preventScroll:!0}))};return Ru(()=>{let s=-1;const i=o=>{o.key==="Tab"&&window.clearTimeout(s)};return document.addEventListener("keydown",i),t?n.current=document.activeElement:e&&(s=window.setTimeout(r,10)),()=>{window.clearTimeout(s),document.removeEventListener("keydown",i)}},[t,e]),r}const Hhe=/input|select|textarea|button|object/,mQ="a, input, select, textarea, button, object, [tabindex]";function qhe(t){return t.style.display==="none"}function Uhe(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(qhe(n))return!1;n=n.parentNode}return!0}function gQ(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function OI(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(gQ(t));return(Hhe.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&Uhe(t)}function vQ(t){const e=gQ(t);return(Number.isNaN(e)||e>=0)&&OI(t)}function Vhe(t){return Array.from(t.querySelectorAll(mQ)).filter(vQ)}function Whe(t,e){const n=Vhe(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],s=t.getRootNode();let i=r===s.activeElement||t===s.activeElement;const o=s.activeElement;if(o.tagName==="INPUT"&&o.getAttribute("type")==="radio"&&(i=n.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===o.getAttribute("name")).includes(r)),!i)return;e.preventDefault();const l=n[e.shiftKey?n.length-1:0];l&&l.focus()}function Yhe(t=!0){const e=O.useRef(null),n=s=>{let i=s.querySelector("[data-autofocus]");if(!i){const o=Array.from(s.querySelectorAll(mQ));i=o.find(vQ)||o.find(OI)||null,!i&&OI(s)&&(i=s)}i&&i.focus({preventScroll:!0})},r=O.useCallback(s=>{t&&s!==null&&e.current!==s&&(s?(setTimeout(()=>{s.getRootNode()&&n(s)}),e.current=s):e.current=null)},[t]);return O.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>n(e.current));const s=i=>{i.key==="Tab"&&e.current&&Whe(e.current,i)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),r}const Ghe=t=>(t+1)%1e6;function Khe(){const[,t]=O.useReducer(Ghe,0);return t}const Zhe=xe.useId||(()=>{});function Jhe(){const t=Zhe();return t?`mantine-${t.replace(/:/g,"")}`:""}function bi(t){const e=Jhe(),[n,r]=O.useState(e);return bh(()=>{r(Sg())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function cS(t,e,n){O.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function uS(t,e){if(typeof t=="function")return t(e);typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function yQ(...t){const e=new Map;return n=>{if(t.forEach(r=>{const s=uS(r,n);s&&e.set(r,s)}),e.size>0)return()=>{t.forEach(r=>{const s=e.get(r);s&&typeof s=="function"?s():uS(r,null)}),e.clear()}}}function Ds(...t){return O.useCallback(yQ(...t),t)}function bQ(t){return{x:Eu(t.x,0,1),y:Eu(t.y,0,1)}}function xQ(t,e,n="ltr"){const r=O.useRef(!1),s=O.useRef(!1),i=O.useRef(0),[o,a]=O.useState(!1),l=O.useRef(null);return O.useEffect(()=>{r.current=!0},[]),{ref:O.useCallback(d=>{if(l.current&&(l.current(),l.current=null),!d)return;const f=({x:D,y:T})=>{cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{if(r.current&&d){d.style.userSelect="none";const A=d.getBoundingClientRect();if(A.width&&A.height){const _=Eu((D-A.left)/A.width,0,1);t({x:n==="ltr"?_:1-_,y:Eu((T-A.top)/A.height,0,1)})}}})},p=()=>{document.addEventListener("mousemove",w),document.addEventListener("mouseup",y),document.addEventListener("touchmove",E,{passive:!1}),document.addEventListener("touchend",y)},m=()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",y),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",y)},v=()=>{!s.current&&r.current&&(s.current=!0,typeof(e==null?void 0:e.onScrubStart)=="function"&&e.onScrubStart(),a(!0),p())},y=()=>{s.current&&r.current&&(s.current=!1,a(!1),m(),setTimeout(()=>{typeof(e==null?void 0:e.onScrubEnd)=="function"&&e.onScrubEnd()},0))},x=D=>{v(),D.preventDefault(),w(D)},w=D=>f({x:D.clientX,y:D.clientY}),C=D=>{D.cancelable&&D.preventDefault(),v(),E(D)},E=D=>{D.cancelable&&D.preventDefault(),f({x:D.changedTouches[0].clientX,y:D.changedTouches[0].clientY})};d.addEventListener("mousedown",x),d.addEventListener("touchstart",C,{passive:!1}),l.current=()=>{d.removeEventListener("mousedown",x),d.removeEventListener("touchstart",C)}},[n,t]),active:o}}function gi({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[s,i]=O.useState(e!==void 0?e:n),o=(a,...l)=>{i(a),r==null||r(a,...l)};return t!==void 0?[t,r,!0]:[s,o,!1]}function RA(t,e){return pQ("(prefers-reduced-motion: reduce)",t,e)}const Xhe={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function SQ(t){const e=O.useRef(0),n=O.useRef(null),[r,s]=O.useState(Xhe),i=O.useMemo(()=>typeof window<"u"?new ResizeObserver(o=>{const a=o[0];a&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{var l,c;if(n.current){const d=((l=a.borderBoxSize)==null?void 0:l[0])||((c=a.contentBoxSize)==null?void 0:c[0]);if(d){const f=d.inlineSize,p=d.blockSize;s({width:f,height:p,x:a.contentRect.x,y:a.contentRect.y,top:a.contentRect.top,left:a.contentRect.left,bottom:a.contentRect.bottom,right:a.contentRect.right})}else s(a.contentRect)}}))}):null,[]);return O.useEffect(()=>(n.current&&(i==null||i.observe(n.current,t)),()=>{i==null||i.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[n.current]),[n,r]}function Qhe(t){const[e,{width:n,height:r}]=SQ(t);return{ref:e,width:n,height:r}}function eme(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!Phe(t[n],e[n]))return!1;return!0}function tme(t){const e=O.useRef([]),n=O.useRef(0);return eme(e.current,t)||(e.current=t,n.current+=1),[n.current]}function nme(t,e){O.useEffect(t,tme(e))}const zF={passive:!0};function YP(){const[t,e]=O.useState({width:0,height:0}),n=O.useCallback(()=>{e({width:window.innerWidth||0,height:window.innerHeight||0})},[]);return cS("resize",n,zF),cS("orientationchange",n,zF),O.useEffect(n,[]),t}function wQ(){const[t,e]=O.useState(!1),n=O.useRef(null),r=O.useCallback(()=>{e(!0)},[]),s=O.useCallback(()=>{e(!1)},[]);return{ref:O.useCallback(o=>{n.current&&(n.current.removeEventListener("mouseenter",r),n.current.removeEventListener("mouseleave",s)),o&&(o.addEventListener("mouseenter",r),o.addEventListener("mouseleave",s)),n.current=o},[r,s]),hovered:t}}function rme(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n.type==="checkbox"?t(n.checked):t(n.value)}else t(e)}}function sme(t){const[e,n]=O.useState(t);return[e,rme(n)]}function Ps(t=!1,e={}){const[n,r]=O.useState(t),s=O.useCallback(()=>{r(a=>{var l;return a||((l=e.onOpen)==null||l.call(e),!0)})},[e.onOpen]),i=O.useCallback(()=>{r(a=>{var l;return a&&((l=e.onClose)==null||l.call(e),!1)})},[e.onClose]),o=O.useCallback(()=>{n?i():s()},[i,s,n]);return[n,{open:s,close:i,toggle:o}]}function ime(t,e,n={autoInvoke:!1}){const r=O.useRef(null),s=O.useCallback((...o)=>{r.current||(r.current=window.setTimeout(()=>{t(o),r.current=null},e))},[e]),i=O.useCallback(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return O.useEffect(()=>(n.autoInvoke&&s(),i),[i,s]),{start:s,clear:i}}function CQ(t){const e=O.useRef(void 0);return O.useEffect(()=>{e.current=t},[t]),e.current}function ome(t,e,n){const r=O.useRef(null),s=O.useRef(null);return O.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||s.current)&&(r.current=new MutationObserver(t),r.current.observe(i||s.current,e)),()=>{var o;(o=r.current)==null||o.disconnect()}},[t,e]),s}function ame(){const[t,e]=O.useState(!1);return O.useEffect(()=>e(!0),[]),t}function lme(t,e){window.dispatchEvent(new CustomEvent(t,{detail:e}))}function cme(t){function e(r){const s=Object.keys(r).reduce((i,o)=>(i[`${t}:${o}`]=a=>r[o](a.detail),i),{});bh(()=>(Object.keys(s).forEach(i=>{window.removeEventListener(i,s[i]),window.addEventListener(i,s[i])}),()=>Object.keys(s).forEach(i=>{window.removeEventListener(i,s[i])})),[s])}function n(r){return(...s)=>lme(`${t}:${String(r)}`,s[0])}return[e,n]}var ume={};function EQ(){return typeof process<"u"&&ume?"production":"development"}function NA(t){var n;const e=xe.version;return typeof xe.version!="string"||e.startsWith("18.")?t==null?void 0:t.ref:(n=t==null?void 0:t.props)==null?void 0:n.ref}function RD(t,e=document){const n=e.querySelector(t);if(n)return n;const r=e.querySelectorAll("*");for(let s=0;s<r.length;s+=1){const i=r[s];if(i.shadowRoot){const o=RD(t,i.shadowRoot);if(o)return o}}return null}function vp(t,e=document){const n=[],r=e.querySelectorAll(t);n.push(...Array.from(r));const s=e.querySelectorAll("*");for(let i=0;i<s.length;i+=1){const o=s[i];if(o.shadowRoot){const a=vp(t,o.shadowRoot);n.push(...a)}}return n}function ap(t){if(!t)return document;const e=t.getRootNode();return e instanceof ShadowRoot||e instanceof Document?e:document}function xh(t){const e=O.Children.toArray(t);return e.length!==1||!TA(e[0])?null:e[0]}function Pet(t){return t}function MQ(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=MQ(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Ms(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=MQ(t))&&(r&&(r+=" "),r+=e);return r}const dme={};function fme(t){const e={};return t.forEach(n=>{Object.entries(n).forEach(([r,s])=>{e[r]?e[r]=Ms(e[r],s):e[r]=s})}),e}function jA({theme:t,classNames:e,props:n,stylesCtx:r}){const i=(Array.isArray(e)?e:[e]).map(o=>typeof o=="function"?o(t,n,r):o||dme);return fme(i)}function Rk({theme:t,styles:e,props:n,stylesCtx:r}){return(Array.isArray(e)?e:[e]).reduce((i,o)=>typeof o=="function"?{...i,...o(t,n,r)}:{...i,...o},{})}const GP=O.createContext(null);function Xd(){const t=O.useContext(GP);if(!t)throw new Error("[@mantine/core] MantineProvider was not found in tree");return t}function pme(){return Xd().cssVariablesResolver}function hme(){return Xd().classNamesPrefix}function IA(){return Xd().getStyleNonce}function mme(){return Xd().withStaticClasses}function gme(){return Xd().headless}function vme(){var t;return(t=Xd().stylesTransform)==null?void 0:t.sx}function yme(){var t;return(t=Xd().stylesTransform)==null?void 0:t.styles}function LA(){return Xd().env||"default"}function bme(t){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(t)}function xme(t){let e=t.replace("#","");if(e.length===3){const o=e.split("");e=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}if(e.length===8){const o=parseInt(e.slice(6,8),16)/255;return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:o}}const n=parseInt(e,16),r=n>>16&255,s=n>>8&255,i=n&255;return{r,g:s,b:i,a:1}}function Sme(t){const[e,n,r,s]=t.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:e,g:n,b:r,a:s===void 0?1:s}}function wme(t){const e=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=t.match(e);if(!n)return{r:0,g:0,b:0,a:1};const r=parseInt(n[1],10),s=parseInt(n[2],10)/100,i=parseInt(n[3],10)/100,o=n[5]?parseFloat(n[5]):void 0,a=(1-Math.abs(2*i-1))*s,l=r/60,c=a*(1-Math.abs(l%2-1)),d=i-a/2;let f,p,m;return l>=0&&l<1?(f=a,p=c,m=0):l>=1&&l<2?(f=c,p=a,m=0):l>=2&&l<3?(f=0,p=a,m=c):l>=3&&l<4?(f=0,p=c,m=a):l>=4&&l<5?(f=c,p=0,m=a):(f=a,p=0,m=c),{r:Math.round((f+d)*255),g:Math.round((p+d)*255),b:Math.round((m+d)*255),a:o||1}}function KP(t){return bme(t)?xme(t):t.startsWith("rgb")?Sme(t):t.startsWith("hsl")?wme(t):{r:0,g:0,b:0,a:1}}function AM(t,e){if(t.startsWith("var("))return`color-mix(in srgb, ${t}, black ${e*100}%)`;const{r:n,g:r,b:s,a:i}=KP(t),o=1-e,a=l=>Math.round(l*o);return`rgba(${a(n)}, ${a(r)}, ${a(s)}, ${i})`}function dS(t,e){return typeof t.primaryShade=="number"?t.primaryShade:e==="dark"?t.primaryShade.dark:t.primaryShade.light}function MR(t){return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function Cme(t){const e=t.match(/oklch\((.*?)%\s/);return e?parseFloat(e[1]):null}function DQ(t){if(t.startsWith("oklch("))return(Cme(t)||0)/100;const{r:e,g:n,b:r}=KP(t),s=e/255,i=n/255,o=r/255,a=MR(s),l=MR(i),c=MR(o);return .2126*a+.7152*l+.0722*c}function X2(t,e=.179){return t.startsWith("var(")?!1:DQ(t)>e}function Mc({color:t,theme:e,colorScheme:n}){if(typeof t!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof t}`);if(t==="bright")return{color:t,value:n==="dark"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:X2(n==="dark"?e.white:e.black,e.luminanceThreshold),variable:"--mantine-color-bright"};if(t==="dimmed")return{color:t,value:n==="dark"?e.colors.dark[2]:e.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:X2(n==="dark"?e.colors.dark[2]:e.colors.gray[6],e.luminanceThreshold),variable:"--mantine-color-dimmed"};if(t==="white"||t==="black")return{color:t,value:t==="white"?e.white:e.black,shade:void 0,isThemeColor:!1,isLight:X2(t==="white"?e.white:e.black,e.luminanceThreshold),variable:`--mantine-color-${t}`};const[r,s]=t.split("."),i=s?Number(s):void 0,o=r in e.colors;if(o){const a=i!==void 0?e.colors[r][i]:e.colors[r][dS(e,n||"light")];return{color:r,value:a,shade:i,isThemeColor:o,isLight:X2(a,e.luminanceThreshold),variable:s?`--mantine-color-${r}-${i}`:`--mantine-color-${r}-filled`}}return{color:t,value:t,isThemeColor:o,isLight:X2(t,e.luminanceThreshold),shade:i,variable:void 0}}function Fr(t,e){const n=Mc({color:t||e.primaryColor,theme:e});return n.variable?`var(${n.variable})`:t}function RI(t,e){const n={from:(t==null?void 0:t.from)||e.defaultGradient.from,to:(t==null?void 0:t.to)||e.defaultGradient.to,deg:(t==null?void 0:t.deg)??e.defaultGradient.deg??0},r=Fr(n.from,e),s=Fr(n.to,e);return`linear-gradient(${n.deg}deg, ${r} 0%, ${s} 100%)`}function du(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(")){const i=(1-e)*100;return`color-mix(in srgb, ${t}, transparent ${i}%)`}if(t.startsWith("oklch"))return t.includes("/")?t.replace(/\/\s*[\d.]+\s*\)/,`/ ${e})`):t.replace(")",` / ${e})`);const{r:n,g:r,b:s}=KP(t);return`rgba(${n}, ${r}, ${s}, ${e})`}const oy=du,Eme=({color:t,theme:e,variant:n,gradient:r,autoContrast:s})=>{const i=Mc({color:t,theme:e}),o=typeof s=="boolean"?s:e.autoContrast;if(n==="none")return{background:"transparent",hover:"transparent",color:"inherit",border:"none"};if(n==="filled"){const a=o&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${t}-filled)`,hover:`var(--mantine-color-${t}-filled-hover)`,color:a,border:`${Ee(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:a,border:`${Ee(1)} solid transparent`}:{background:t,hover:AM(t,.1),color:a,border:`${Ee(1)} solid transparent`}}if(n==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${t}-light)`,hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Ee(1)} solid transparent`};const a=e.colors[i.color][i.shade];return{background:du(a,.1),hover:du(a,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Ee(1)} solid transparent`}}return{background:du(t,.1),hover:du(t,.12),color:t,border:`${Ee(1)} solid transparent`}}if(n==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${t}-outline-hover)`,color:`var(--mantine-color-${t}-outline)`,border:`${Ee(1)} solid var(--mantine-color-${t}-outline)`}:{background:"transparent",hover:du(e.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Ee(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:du(t,.05),color:t,border:`${Ee(1)} solid ${t}`};if(n==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${t}-light-hover)`,color:`var(--mantine-color-${t}-light-color)`,border:`${Ee(1)} solid transparent`};const a=e.colors[i.color][i.shade];return{background:"transparent",hover:du(a,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Ee(1)} solid transparent`}}return{background:"transparent",hover:du(t,.12),color:t,border:`${Ee(1)} solid transparent`}}return n==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${t}-light-color)`,border:`${Ee(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Ee(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:t,border:`${Ee(1)} solid transparent`}:n==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:AM(e.white,.01),color:`var(--mantine-color-${t}-filled)`,border:`${Ee(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:AM(e.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Ee(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:AM(e.white,.01),color:t,border:`${Ee(1)} solid transparent`}:n==="gradient"?{background:RI(r,e),hover:RI(r,e),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Ee(1)} solid var(--mantine-color-default-border)`}:{}},Mme={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},FF="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",ZP={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:Mme,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:Eme,autoContrast:!1,luminanceThreshold:.3,fontFamily:FF,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:FF,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Ee(34),lineHeight:"1.3"},h2:{fontSize:Ee(26),lineHeight:"1.35"},h3:{fontSize:Ee(22),lineHeight:"1.4"},h4:{fontSize:Ee(18),lineHeight:"1.45"},h5:{fontSize:Ee(16),lineHeight:"1.5"},h6:{fontSize:Ee(14),lineHeight:"1.5"}}},fontSizes:{xs:Ee(12),sm:Ee(14),md:Ee(16),lg:Ee(18),xl:Ee(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Ee(2),sm:Ee(4),md:Ee(8),lg:Ee(16),xl:Ee(32)},spacing:{xs:Ee(10),sm:Ee(12),md:Ee(16),lg:Ee(20),xl:Ee(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Ee(1)} ${Ee(3)} rgba(0, 0, 0, 0.05), 0 ${Ee(1)} ${Ee(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Ee(1)} ${Ee(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Ee(10)} ${Ee(15)} ${Ee(-5)}, rgba(0, 0, 0, 0.04) 0 ${Ee(7)} ${Ee(7)} ${Ee(-5)}`,md:`0 ${Ee(1)} ${Ee(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Ee(20)} ${Ee(25)} ${Ee(-5)}, rgba(0, 0, 0, 0.04) 0 ${Ee(10)} ${Ee(10)} ${Ee(-5)}`,lg:`0 ${Ee(1)} ${Ee(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Ee(28)} ${Ee(23)} ${Ee(-7)}, rgba(0, 0, 0, 0.04) 0 ${Ee(12)} ${Ee(12)} ${Ee(-7)}`,xl:`0 ${Ee(1)} ${Ee(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Ee(36)} ${Ee(28)} ${Ee(-7)}, rgba(0, 0, 0, 0.04) 0 ${Ee(17)} ${Ee(17)} ${Ee(-7)}`},other:{},components:{}};function BF(t){return t==="auto"||t==="dark"||t==="light"}function kQ({key:t="mantine-color-scheme-value"}={}){let e;return{get:n=>{if(typeof window>"u")return n;try{const r=window.localStorage.getItem(t);return BF(r)?r:n}catch{return n}},set:n=>{try{window.localStorage.setItem(t,n)}catch(r){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",r)}},subscribe:n=>{e=r=>{r.storageArea===window.localStorage&&r.key===t&&BF(r.newValue)&&n(r.newValue)},window.addEventListener("storage",e)},unsubscribe:()=>{window.removeEventListener("storage",e)},clear:()=>{window.localStorage.removeItem(t)}}}const Dme="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color",HF="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function DR(t){return t<0||t>9?!1:parseInt(t.toString(),10)===t}function qF(t){if(!(t.primaryColor in t.colors))throw new Error(Dme);if(typeof t.primaryShade=="object"&&(!DR(t.primaryShade.dark)||!DR(t.primaryShade.light)))throw new Error(HF);if(typeof t.primaryShade=="number"&&!DR(t.primaryShade))throw new Error(HF)}function kme(t,e){var r;if(!e)return qF(t),t;const n=UP(t,e);return e.fontFamily&&!((r=e.headings)!=null&&r.fontFamily)&&(n.headings.fontFamily=e.fontFamily),qF(n),n}const JP=O.createContext(null),Tme=()=>O.useContext(JP)||ZP;function Dr(){const t=O.useContext(JP);if(!t)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return t}function TQ({theme:t,children:e,inherit:n=!0}){const r=Tme(),s=O.useMemo(()=>kme(n?r:ZP,t),[t,r,n]);return g.jsx(JP.Provider,{value:s,children:e})}TQ.displayName="@mantine/core/MantineThemeProvider";function Ame(){const t=Dr(),e=IA(),n=ir(t.breakpoints).reduce((r,s)=>{const i=t.breakpoints[s].includes("px"),o=Lg(t.breakpoints[s]),a=i?`${o-.1}px`:Tk(o-.1),l=i?`${o}px`:Tk(o);return`${r}@media (max-width: ${a}) {.mantine-visible-from-${s} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${s} {display: none !important;}}`},"");return g.jsx("style",{"data-mantine-styles":"classes",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:n}})}function kR(t){return Object.entries(t).map(([e,n])=>`${e}: ${n};`).join("")}function AQ(t,e){const n=e?[e]:[":root",":host"],r=kR(t.variables),s=r?`${n.join(", ")}{${r}}`:"",i=kR(t.dark),o=kR(t.light),a=d=>n.map(f=>f===":host"?`${f}([data-mantine-color-scheme="${d}"])`:`${f}[data-mantine-color-scheme="${d}"]`).join(", "),l=i?`${a("dark")}{${i}}`:"",c=o?`${a("light")}{${o}}`:"";return`${s}

${l}

${c}`}function Qd({color:t,theme:e,autoContrast:n}){return(typeof n=="boolean"?n:e.autoContrast)&&Mc({color:t||e.primaryColor,theme:e}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function UF(t,e){return Qd({color:t.colors[t.primaryColor][dS(t,e)],theme:t,autoContrast:null})}function _M({theme:t,color:e,colorScheme:n,name:r=e,withColorValues:s=!0}){if(!t.colors[e])return{};if(n==="light"){const a=dS(t,"light"),l={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:oy(t.colors[e][a],.1),[`--mantine-color-${r}-light-hover`]:oy(t.colors[e][a],.12),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-outline-hover`]:oy(t.colors[e][a],.05)};return s?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...l}:l}const i=dS(t,"dark"),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${i})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${i===9?8:i+1})`,[`--mantine-color-${r}-light`]:oy(t.colors[e][Math.max(0,i-2)],.15),[`--mantine-color-${r}-light-hover`]:oy(t.colors[e][Math.max(0,i-2)],.2),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-${Math.max(i-5,0)})`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(i-4,0)})`,[`--mantine-color-${r}-outline-hover`]:oy(t.colors[e][Math.max(i-4,0)],.05)};return s?{[`--mantine-color-${r}-0`]:t.colors[e][0],[`--mantine-color-${r}-1`]:t.colors[e][1],[`--mantine-color-${r}-2`]:t.colors[e][2],[`--mantine-color-${r}-3`]:t.colors[e][3],[`--mantine-color-${r}-4`]:t.colors[e][4],[`--mantine-color-${r}-5`]:t.colors[e][5],[`--mantine-color-${r}-6`]:t.colors[e][6],[`--mantine-color-${r}-7`]:t.colors[e][7],[`--mantine-color-${r}-8`]:t.colors[e][8],[`--mantine-color-${r}-9`]:t.colors[e][9],...o}:o}function OM(t){return Array.isArray(t)?t:Array(10).fill(t)}function _me(t){return!!t&&typeof t=="object"&&"mantine-virtual-color"in t}function ay(t,e,n){ir(e).forEach(r=>Object.assign(t,{[`--mantine-${n}-${r}`]:e[r]}))}const _Q=t=>{const e=dS(t,"light"),n=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:Ee(t.defaultRadius),r={variables:{"--mantine-z-index-app":"100","--mantine-z-index-modal":"200","--mantine-z-index-popover":"300","--mantine-z-index-overlay":"400","--mantine-z-index-max":"9999","--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":t.fontSmoothing?"grayscale":"unset","--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":"light","--mantine-primary-color-contrast":UF(t,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${e})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)","--mantine-color-disabled":"var(--mantine-color-gray-2)","--mantine-color-disabled-color":"var(--mantine-color-gray-5)","--mantine-color-disabled-border":"var(--mantine-color-gray-3)"},dark:{"--mantine-color-scheme":"dark","--mantine-primary-color-contrast":UF(t,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)","--mantine-color-disabled":"var(--mantine-color-dark-6)","--mantine-color-disabled-color":"var(--mantine-color-dark-3)","--mantine-color-disabled-border":"var(--mantine-color-dark-4)"}};ay(r.variables,t.breakpoints,"breakpoint"),ay(r.variables,t.spacing,"spacing"),ay(r.variables,t.fontSizes,"font-size"),ay(r.variables,t.lineHeights,"line-height"),ay(r.variables,t.shadows,"shadow"),ay(r.variables,t.radius,"radius"),t.colors[t.primaryColor].forEach((i,o)=>{r.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${t.primaryColor}-${o})`}),ir(t.colors).forEach(i=>{const o=t.colors[i];if(_me(o)){Object.assign(r.light,_M({theme:t,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(r.dark,_M({theme:t,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((a,l)=>{r.variables[`--mantine-color-${i}-${l}`]=a}),Object.assign(r.light,_M({theme:t,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(r.dark,_M({theme:t,color:i,colorScheme:"dark",withColorValues:!1}))});const s=t.headings.sizes;return ir(s).forEach(i=>{r.variables[`--mantine-${i}-font-size`]=s[i].fontSize,r.variables[`--mantine-${i}-line-height`]=s[i].lineHeight,r.variables[`--mantine-${i}-font-weight`]=s[i].fontWeight||t.headings.fontWeight}),r};function Ome({theme:t,generator:e}){const n=_Q(t),r=e==null?void 0:e(t);return r?UP(n,r):n}const TR=_Q(ZP);function Rme(t){const e={variables:{},light:{},dark:{}};return ir(t.variables).forEach(n=>{TR.variables[n]!==t.variables[n]&&(e.variables[n]=t.variables[n])}),ir(t.light).forEach(n=>{TR.light[n]!==t.light[n]&&(e.light[n]=t.light[n])}),ir(t.dark).forEach(n=>{TR.dark[n]!==t.dark[n]&&(e.dark[n]=t.dark[n])}),e}function Nme(t){return AQ({variables:{},dark:{"--mantine-color-scheme":"dark"},light:{"--mantine-color-scheme":"light"}},t)}function OQ({cssVariablesSelector:t,deduplicateCssVariables:e}){const n=Dr(),r=IA(),s=pme(),i=Ome({theme:n,generator:s}),o=(t===void 0||t===":root"||t===":host")&&e,a=o?Rme(i):i,l=AQ(a,t);return l?g.jsx("style",{"data-mantine-styles":!0,nonce:r==null?void 0:r(),dangerouslySetInnerHTML:{__html:`${l}${o?"":Nme(t)}`}}):null}OQ.displayName="@mantine/CssVariables";function ly(t,e){var s,i;const n=typeof window<"u"&&"matchMedia"in window&&((s=window.matchMedia("(prefers-color-scheme: dark)"))==null?void 0:s.matches),r=t!=="auto"?t:n?"dark":"light";(i=e())==null||i.setAttribute("data-mantine-color-scheme",r)}function jme({manager:t,defaultColorScheme:e,getRootElement:n,forceColorScheme:r}){const s=O.useRef(null),[i,o]=O.useState(()=>t.get(e)),a=r||i,l=O.useCallback(d=>{r||(ly(d,n),o(d),t.set(d))},[t.set,a,r]),c=O.useCallback(()=>{o(e),ly(e,n),t.clear()},[t.clear,e]);return O.useEffect(()=>(t.subscribe(l),t.unsubscribe),[t.subscribe,t.unsubscribe]),bh(()=>{ly(t.get(e),n)},[]),O.useEffect(()=>{var f;if(r)return ly(r,n),()=>{};r===void 0&&ly(i,n),typeof window<"u"&&"matchMedia"in window&&(s.current=window.matchMedia("(prefers-color-scheme: dark)"));const d=p=>{i==="auto"&&ly(p.matches?"dark":"light",n)};return(f=s.current)==null||f.addEventListener("change",d),()=>{var p;return(p=s.current)==null?void 0:p.removeEventListener("change",d)}},[i,r]),{colorScheme:a,setColorScheme:l,clearColorScheme:c}}function Ime({respectReducedMotion:t,getRootElement:e}){bh(()=>{var n;t&&((n=e())==null||n.setAttribute("data-respect-reduced-motion","true"))},[t])}function RQ({theme:t,children:e,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:s=!0,deduplicateCssVariables:i=!0,withCssVariables:o=!0,cssVariablesSelector:a,classNamesPrefix:l="mantine",colorSchemeManager:c=kQ(),defaultColorScheme:d="light",getRootElement:f=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:m,stylesTransform:v,env:y}){const{colorScheme:x,setColorScheme:w,clearColorScheme:C}=jme({defaultColorScheme:d,forceColorScheme:m,manager:c,getRootElement:f});return Ime({respectReducedMotion:(t==null?void 0:t.respectReducedMotion)||!1,getRootElement:f}),g.jsx(GP.Provider,{value:{colorScheme:x,setColorScheme:w,clearColorScheme:C,getRootElement:f,classNamesPrefix:l,getStyleNonce:n,cssVariablesResolver:p,cssVariablesSelector:a??":root",withStaticClasses:r,stylesTransform:v,env:y},children:g.jsxs(TQ,{theme:t,children:[o&&g.jsx(OQ,{cssVariablesSelector:a,deduplicateCssVariables:i}),s&&g.jsx(Ame,{}),e]})})}RQ.displayName="@mantine/core/MantineProvider";function Ma({classNames:t,styles:e,props:n,stylesCtx:r}){const s=Dr();return{resolvedClassNames:jA({theme:s,classNames:t,props:n,stylesCtx:r||void 0}),resolvedStyles:Rk({theme:s,styles:e,props:n,stylesCtx:r||void 0})}}const Lme={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function Pme({theme:t,options:e,unstyled:n}){return Ms((e==null?void 0:e.focusable)&&!n&&(t.focusClassName||Lme[t.focusRing]),(e==null?void 0:e.active)&&!n&&t.activeClassName)}function $me({selector:t,stylesCtx:e,options:n,props:r,theme:s}){return jA({theme:s,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||r,stylesCtx:e})[t]}function VF({selector:t,stylesCtx:e,theme:n,classNames:r,props:s}){return jA({theme:n,classNames:r,props:s,stylesCtx:e})[t]}function zme({rootSelector:t,selector:e,className:n}){return t===e?n:void 0}function Fme({selector:t,classes:e,unstyled:n}){return n?void 0:e[t]}function Bme({themeName:t,classNamesPrefix:e,selector:n,withStaticClass:r}){return r===!1?[]:t.map(s=>`${e}-${s}-${n}`)}function Hme({themeName:t,theme:e,selector:n,props:r,stylesCtx:s}){return t.map(i=>{var o,a;return(a=jA({theme:e,classNames:(o=e.components[i])==null?void 0:o.classNames,props:r,stylesCtx:s}))==null?void 0:a[n]})}function qme({options:t,classes:e,selector:n,unstyled:r}){return t!=null&&t.variant&&!r?e[`${n}--${t.variant}`]:void 0}function Ume({theme:t,options:e,themeName:n,selector:r,classNamesPrefix:s,classNames:i,classes:o,unstyled:a,className:l,rootSelector:c,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:v}){return Ms(Pme({theme:t,options:e,unstyled:a||m}),Hme({theme:t,themeName:n,selector:r,props:d,stylesCtx:f}),qme({options:e,classes:o,selector:r,unstyled:a}),VF({selector:r,stylesCtx:f,theme:t,classNames:i,props:d}),VF({selector:r,stylesCtx:f,theme:t,classNames:v,props:d}),$me({selector:r,stylesCtx:f,options:e,props:d,theme:t}),zme({rootSelector:c,selector:r,className:l}),Fme({selector:r,classes:o,unstyled:a||m}),p&&!m&&Bme({themeName:n,classNamesPrefix:s,selector:r,withStaticClass:e==null?void 0:e.withStaticClass}),e==null?void 0:e.className)}function Vme({theme:t,themeName:e,props:n,stylesCtx:r,selector:s}){return e.map(i=>{var o;return Rk({theme:t,styles:(o=t.components[i])==null?void 0:o.styles,props:n,stylesCtx:r})[s]}).reduce((i,o)=>({...i,...o}),{})}function NI({style:t,theme:e}){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...NI({style:r,theme:e})}),{}):typeof t=="function"?t(e):t??{}}function Wme(t){return t.reduce((e,n)=>(n&&Object.keys(n).forEach(r=>{e[r]={...e[r],...Bu(n[r])}}),e),{})}function Yme({vars:t,varsResolver:e,theme:n,props:r,stylesCtx:s,selector:i,themeName:o,headless:a}){var l;return(l=Wme([a?{}:e==null?void 0:e(n,r,s),...o.map(c=>{var d,f,p;return(p=(f=(d=n.components)==null?void 0:d[c])==null?void 0:f.vars)==null?void 0:p.call(f,n,r,s)}),t==null?void 0:t(n,r,s)]))==null?void 0:l[i]}function Gme({theme:t,themeName:e,selector:n,options:r,props:s,stylesCtx:i,rootSelector:o,styles:a,style:l,vars:c,varsResolver:d,headless:f,withStylesTransform:p}){return{...!p&&Vme({theme:t,themeName:e,props:s,stylesCtx:i,selector:n}),...!p&&Rk({theme:t,styles:a,props:s,stylesCtx:i})[n],...!p&&Rk({theme:t,styles:r==null?void 0:r.styles,props:(r==null?void 0:r.props)||s,stylesCtx:i})[n],...Yme({theme:t,props:s,stylesCtx:i,vars:c,varsResolver:d,selector:n,themeName:e,headless:f}),...o===n?NI({style:l,theme:t}):null,...NI({style:r==null?void 0:r.style,theme:t})}}function Kme({props:t,stylesCtx:e,themeName:n}){var o;const r=Dr(),s=(o=yme())==null?void 0:o();return{getTransformedStyles:a=>s?[...a.map(c=>s(c,{props:t,theme:r,ctx:e})),...n.map(c=>{var d;return s((d=r.components[c])==null?void 0:d.styles,{props:t,theme:r,ctx:e})})].filter(Boolean):[],withStylesTransform:!!s}}function bt({name:t,classes:e,props:n,stylesCtx:r,className:s,style:i,rootSelector:o="root",unstyled:a,classNames:l,styles:c,vars:d,varsResolver:f,attributes:p}){const m=Dr(),v=hme(),y=mme(),x=gme(),w=(Array.isArray(t)?t:[t]).filter(D=>D),{withStylesTransform:C,getTransformedStyles:E}=Kme({props:n,stylesCtx:r,themeName:w});return(D,T)=>({className:Ume({theme:m,options:T,themeName:w,selector:D,classNamesPrefix:v,classNames:l,classes:e,unstyled:a,className:s,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:y,headless:x,transformedStyles:E([T==null?void 0:T.styles,c])}),style:Gme({theme:m,themeName:w,selector:D,options:T,props:n,stylesCtx:r,rootSelector:o,styles:c,style:i,vars:d,varsResolver:f,headless:x,withStylesTransform:C}),...p==null?void 0:p[D]})}function iv(t,e){return typeof t=="boolean"?t:e.autoContrast}function WF(t){const e=document.createElement("style");return e.setAttribute("data-mantine-styles","inline"),e.innerHTML="*, *::before, *::after {transition: none !important;}",e.setAttribute("data-mantine-disable-transition","true"),t&&e.setAttribute("nonce",t),document.head.appendChild(e),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(r=>r.remove())}function NQ({keepTransitions:t}={}){const e=O.useRef(Ok),n=O.useRef(-1),r=O.useContext(GP),s=IA(),i=O.useRef(s==null?void 0:s());if(!r)throw new Error("[@mantine/core] MantineProvider was not found in tree");const o=f=>{r.setColorScheme(f),e.current=t?()=>{}:WF(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var p;(p=e.current)==null||p.call(e)},10)},a=()=>{r.clearColorScheme(),e.current=t?()=>{}:WF(i.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{var f;(f=e.current)==null||f.call(e)},10)},l=Bhe("light",{getInitialValueInEffect:!1}),c=r.colorScheme==="auto"?l:r.colorScheme,d=O.useCallback(()=>o(c==="light"?"dark":"light"),[o,c]);return O.useEffect(()=>()=>{var f;(f=e.current)==null||f.call(e),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:o,clearColorScheme:a,toggleColorScheme:d}}function Ce(t,e,n){var o;const r=Dr(),s=(o=r.components[t])==null?void 0:o.defaultProps,i=typeof s=="function"?s(r):s;return{...e,...i,...Bu(n)}}function AR(t){return ir(t).reduce((e,n)=>t[n]!==void 0?`${e}${Ahe(n)}:${t[n]};`:e,"").trim()}function Zme({selector:t,styles:e,media:n,container:r}){const s=e?AR(e):"",i=Array.isArray(n)?n.map(a=>`@media${a.query}{${t}{${AR(a.styles)}}}`):[],o=Array.isArray(r)?r.map(a=>`@container ${a.query}{${t}{${AR(a.styles)}}}`):[];return`${s?`${t}{${s}}`:""}${i.join("")}${o.join("")}`.trim()}function ef(t){const e=IA();return g.jsx("style",{"data-mantine-styles":"inline",nonce:e==null?void 0:e(),dangerouslySetInnerHTML:{__html:Zme(t)}})}function C1(t){const{m:e,mx:n,my:r,mt:s,mb:i,ml:o,mr:a,me:l,ms:c,p:d,px:f,py:p,pt:m,pb:v,pl:y,pr:x,pe:w,ps:C,bd:E,bdrs:D,bg:T,c:A,opacity:_,ff:R,fz:N,fw:I,lts:$,ta:L,lh:z,fs:F,tt:q,td:H,w:B,miw:V,maw:Y,h:G,mih:W,mah:Z,bgsz:Q,bgp:X,bgr:re,bga:ne,pos:ee,top:oe,left:ce,bottom:ue,right:pe,inset:de,display:me,flex:Se,hiddenFrom:De,visibleFrom:Ae,lightHidden:fe,darkHidden:Te,sx:Ne,...Ue}=t;return{styleProps:Bu({m:e,mx:n,my:r,mt:s,mb:i,ml:o,mr:a,me:l,ms:c,p:d,px:f,py:p,pt:m,pb:v,pl:y,pr:x,pe:w,ps:C,bd:E,bg:T,c:A,opacity:_,ff:R,fz:N,fw:I,lts:$,ta:L,lh:z,fs:F,tt:q,td:H,w:B,miw:V,maw:Y,h:G,mih:W,mah:Z,bgsz:Q,bgp:X,bgr:re,bga:ne,pos:ee,top:oe,left:ce,bottom:ue,right:pe,inset:de,display:me,flex:Se,bdrs:D,hiddenFrom:De,visibleFrom:Ae,lightHidden:fe,darkHidden:Te,sx:Ne}),rest:Ue}}const Jme={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bdrs:{type:"radius",property:"borderRadius"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function XP(t,e){const n=Mc({color:t,theme:e});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function Xme(t,e){const n=Mc({color:t,theme:e});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:XP(t,e)}function Qme(t,e){if(typeof t=="number")return Ee(t);if(typeof t=="string"){const[n,r,...s]=t.split(" ").filter(o=>o.trim()!=="");let i=`${Ee(n)}`;return r&&(i+=` ${r}`),s.length>0&&(i+=` ${XP(s.join(" "),e)}`),i.trim()}return t}const YF={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function ege(t){return typeof t=="string"&&t in YF?YF[t]:t}const tge=["h1","h2","h3","h4","h5","h6"];function nge(t,e){return typeof t=="string"&&t in e.fontSizes?`var(--mantine-font-size-${t})`:typeof t=="string"&&tge.includes(t)?`var(--mantine-${t}-font-size)`:typeof t=="number"||typeof t=="string"?Ee(t):t}function rge(t){return t}const sge=["h1","h2","h3","h4","h5","h6"];function ige(t,e){return typeof t=="string"&&t in e.lineHeights?`var(--mantine-line-height-${t})`:typeof t=="string"&&sge.includes(t)?`var(--mantine-${t}-line-height)`:t}function oge(t,e){return typeof t=="string"&&t in e.radius?`var(--mantine-radius-${t})`:typeof t=="number"||typeof t=="string"?Ee(t):t}function age(t){return typeof t=="number"?Ee(t):t}function lge(t,e){if(typeof t=="number")return Ee(t);if(typeof t=="string"){const n=t.replace("-","");if(!(n in e.spacing))return Ee(t);const r=`--mantine-spacing-${n}`;return t.startsWith("-")?`calc(var(${r}) * -1)`:`var(${r})`}return t}const _R={color:XP,textColor:Xme,fontSize:nge,spacing:lge,radius:oge,identity:rge,size:age,lineHeight:ige,fontFamily:ege,border:Qme};function GF(t){return t.replace("(min-width: ","").replace("em)","")}function cge({media:t,...e}){const r=Object.keys(t).sort((s,i)=>Number(GF(s))-Number(GF(i))).map(s=>({query:s,styles:t[s]}));return{...e,media:r}}function uge(t){if(typeof t!="object"||t===null)return!1;const e=Object.keys(t);return!(e.length===1&&e[0]==="base")}function dge(t){return typeof t=="object"&&t!==null?"base"in t?t.base:void 0:t}function fge(t){return typeof t=="object"&&t!==null?ir(t).filter(e=>e!=="base"):[]}function pge(t,e){return typeof t=="object"&&t!==null&&e in t?t[e]:t}function jQ({styleProps:t,data:e,theme:n}){return cge(ir(t).reduce((r,s)=>{if(s==="hiddenFrom"||s==="visibleFrom"||s==="sx")return r;const i=e[s],o=Array.isArray(i.property)?i.property:[i.property],a=dge(t[s]);if(!uge(t[s]))return o.forEach(c=>{r.inlineStyles[c]=_R[i.type](a,n)}),r;r.hasResponsiveStyles=!0;const l=fge(t[s]);return o.forEach(c=>{a!=null&&(r.styles[c]=_R[i.type](a,n)),l.forEach(d=>{const f=`(min-width: ${n.breakpoints[d]})`;r.media[f]={...r.media[f],[c]:_R[i.type](pge(t[s],d),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function E1(){return`__m__-${O.useId().replace(/[:«»]/g,"")}`}function QP(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...QP(r,e)}),{}):typeof t=="function"?t(e):t??{}}function IQ(t){return t.startsWith("data-")?t:`data-${t}`}function hge(t){return Object.keys(t).reduce((e,n)=>{const r=t[n];return r===void 0||r===""||r===!1||r===null||(e[IQ(n)]=t[n]),e},{})}function LQ(t){return t?typeof t=="string"?{[IQ(t)]:!0}:Array.isArray(t)?[...t].reduce((e,n)=>({...e,...LQ(n)}),{}):hge(t):null}function jI(t,e){return Array.isArray(t)?[...t].reduce((n,r)=>({...n,...jI(r,e)}),{}):typeof t=="function"?t(e):t??{}}function mge({theme:t,style:e,vars:n,styleProps:r}){const s=jI(e,t),i=jI(n,t);return{...s,...i,...r}}const PQ=O.forwardRef(({component:t,style:e,__vars:n,className:r,variant:s,mod:i,size:o,hiddenFrom:a,visibleFrom:l,lightHidden:c,darkHidden:d,renderRoot:f,__size:p,...m},v)=>{var R;const y=Dr(),x=t||"div",{styleProps:w,rest:C}=C1(m),E=vme(),D=(R=E==null?void 0:E())==null?void 0:R(w.sx),T=E1(),A=jQ({styleProps:w,theme:y,data:Jme}),_={ref:v,style:mge({theme:y,style:e,vars:n,styleProps:A.inlineStyles}),className:Ms(r,D,{[T]:A.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":d,[`mantine-hidden-from-${a}`]:a,[`mantine-visible-from-${l}`]:l}),"data-variant":s,"data-size":dQ(o)?void 0:o||void 0,size:p,...LQ(i),...C};return g.jsxs(g.Fragment,{children:[A.hasResponsiveStyles&&g.jsx(ef,{selector:`.${T}`,styles:A.styles,media:A.media}),typeof f=="function"?f(_):g.jsx(x,{..._})]})});PQ.displayName="@mantine/core/Box";const le=PQ;function $Q(t){return t}function zQ(t){const e=t;return n=>{const r=O.forwardRef((s,i)=>g.jsx(e,{...n,...s,ref:i}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r}}function Fe(t){const e=O.forwardRef(t);return e.extend=$Q,e.withProps=n=>{const r=O.forwardRef((s,i)=>g.jsx(e,{...n,...s,ref:i}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e}function xi(t){const e=O.forwardRef(t);return e.withProps=n=>{const r=O.forwardRef((s,i)=>g.jsx(e,{...n,...s,ref:i}));return r.extend=e.extend,r.displayName=`WithProps(${e.displayName})`,r},e.extend=$Q,e}const gge=O.createContext({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function Hu(){return O.useContext(gge)}var M1=qX();const jp=Mr(M1);function vge(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function OR(t){return t!=null&&t.current?t.current.scrollHeight:"auto"}const Q2=typeof window<"u"&&window.requestAnimationFrame,KF=0,yge=t=>({height:0,overflow:"hidden",...t?{}:{display:"none"}});function bge({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r,keepMounted:s=!1}){const i=O.useRef(null),o=yge(s),[a,l]=O.useState(r?{}:o),c=v=>{M1.flushSync(()=>l(v))},d=v=>{c(y=>({...y,...v}))};function f(v){const y=t||vge(v);return{transition:`height ${y}ms ${e}, opacity ${y}ms ${e}`}}Ru(()=>{typeof Q2=="function"&&Q2(r?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Q2(()=>{const v=OR(i);d({...f(v),height:v})})}:()=>{const v=OR(i);d({...f(v),willChange:"height",height:v}),Q2(()=>d({height:KF,overflow:"hidden"}))})},[r]);const p=v=>{if(!(v.target!==i.current||v.propertyName!=="height"))if(r){const y=OR(i);y===a.height?c({}):d({height:y}),n()}else a.height===KF&&(c(o),n())};function m({style:v={},refKey:y="ref",...x}={}){const w=x[y],C={"aria-hidden":!r,...x,[y]:yQ(i,w),onTransitionEnd:p,style:{boxSizing:"border-box",...v,...a}};return xe.version.startsWith("18")?r||(C.inert=""):C.inert=!r,C}return m}const xge={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},e9=Fe((t,e)=>{const{children:n,in:r,transitionDuration:s,transitionTimingFunction:i,style:o,onTransitionEnd:a,animateOpacity:l,keepMounted:c,...d}=Ce("Collapse",xge,t),f=Dr(),p=RA(),v=(f.respectReducedMotion?p:!1)?0:s,y=bge({opened:r,transitionDuration:v,transitionTimingFunction:i,onTransitionEnd:a,keepMounted:c});return v===0?r?g.jsx(le,{...d,children:n}):null:g.jsx(le,{...y({style:{opacity:r||!l?1:0,transition:l?`opacity ${v}ms ${i}`:"none",...QP(o,f)},ref:e,...d}),children:n})});e9.displayName="@mantine/core/Collapse";function PA(){return typeof window<"u"}function D1(t){return FQ(t)?(t.nodeName||"").toLowerCase():"#document"}function ma(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function qu(t){var e;return(e=(FQ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function FQ(t){return PA()?t instanceof Node||t instanceof ma(t).Node:!1}function Gr(t){return PA()?t instanceof Element||t instanceof ma(t).Element:!1}function Ka(t){return PA()?t instanceof HTMLElement||t instanceof ma(t).HTMLElement:!1}function II(t){return!PA()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ma(t).ShadowRoot}const Sge=new Set(["inline","contents"]);function aw(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=Dl(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!Sge.has(s)}const wge=new Set(["table","td","th"]);function Cge(t){return wge.has(D1(t))}const Ege=[":popover-open",":modal"];function $A(t){return Ege.some(e=>{try{return t.matches(e)}catch{return!1}})}const Mge=["transform","translate","scale","rotate","perspective"],Dge=["transform","translate","scale","rotate","perspective","filter"],kge=["paint","layout","strict","content"];function t9(t){const e=zA(),n=Gr(t)?Dl(t):t;return Mge.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Dge.some(r=>(n.willChange||"").includes(r))||kge.some(r=>(n.contain||"").includes(r))}function Tge(t){let e=Bd(t);for(;Ka(e)&&!Id(e);){if(t9(e))return e;if($A(e))return null;e=Bd(e)}return null}function zA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Age=new Set(["html","body","#document"]);function Id(t){return Age.has(D1(t))}function Dl(t){return ma(t).getComputedStyle(t)}function FA(t){return Gr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bd(t){if(D1(t)==="html")return t;const e=t.assignedSlot||t.parentNode||II(t)&&t.host||qu(t);return II(e)?e.host:e}function BQ(t){const e=Bd(t);return Id(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ka(e)&&aw(e)?e:BQ(e)}function Ld(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=BQ(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),o=ma(s);if(i){const a=LI(o);return e.concat(o,o.visualViewport||[],aw(s)?s:[],a&&n?Ld(a):[])}return e.concat(s,Ld(s,[],n))}function LI(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const _ge=["top","right","bottom","left"],bc=Math.min,io=Math.max,Nk=Math.round,RM=Math.floor,Mu=t=>({x:t,y:t}),Oge={left:"right",right:"left",bottom:"top",top:"bottom"},Rge={start:"end",end:"start"};function PI(t,e,n){return io(t,bc(e,n))}function Nu(t,e){return typeof t=="function"?t(e):t}function xc(t){return t.split("-")[0]}function k1(t){return t.split("-")[1]}function n9(t){return t==="x"?"y":"x"}function r9(t){return t==="y"?"height":"width"}const Nge=new Set(["top","bottom"]);function fc(t){return Nge.has(xc(t))?"y":"x"}function s9(t){return n9(fc(t))}function jge(t,e,n){n===void 0&&(n=!1);const r=k1(t),s=s9(t),i=r9(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=jk(o)),[o,jk(o)]}function Ige(t){const e=jk(t);return[$I(t),e,$I(e)]}function $I(t){return t.replace(/start|end/g,e=>Rge[e])}const ZF=["left","right"],JF=["right","left"],Lge=["top","bottom"],Pge=["bottom","top"];function $ge(t,e,n){switch(t){case"top":case"bottom":return n?e?JF:ZF:e?ZF:JF;case"left":case"right":return e?Lge:Pge;default:return[]}}function zge(t,e,n,r){const s=k1(t);let i=$ge(xc(t),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map($I)))),i}function jk(t){return t.replace(/left|right|bottom|top/g,e=>Oge[e])}function Fge(t){return{top:0,right:0,bottom:0,left:0,...t}}function i9(t){return typeof t!="number"?Fge(t):{top:t,right:t,bottom:t,left:t}}function Yy(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function Bge(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function Hge(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function qge(){return/apple/i.test(navigator.vendor)}function Uge(){return Bge().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Vge(){return Hge().includes("jsdom/")}const XF="data-floating-ui-focusable",Wge="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function QF(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function fS(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&II(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function wy(t){return"composedPath"in t?t.composedPath()[0]:t.target}function RR(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function Yge(t){return t.matches("html,body")}function fg(t){return(t==null?void 0:t.ownerDocument)||document}function Gge(t){return Ka(t)&&t.matches(Wge)}function Kge(t){if(!t||Vge())return!0;try{return t.matches(":focus-visible")}catch{return!0}}function Zge(t){return t?t.hasAttribute(XF)?t:t.querySelector("["+XF+"]")||t:null}function ND(t,e,n){return n===void 0&&(n=!0),t.filter(s=>{var i;return s.parentId===e&&(!n||((i=s.context)==null?void 0:i.open))}).flatMap(s=>[s,...ND(t,s.id,n)])}function Jge(t){return"nativeEvent"in t}function zI(t,e){const n=["mouse","pen"];return n.push("",void 0),n.includes(t)}var Xge=typeof document<"u",Qge=function(){},Du=Xge?O.useLayoutEffect:Qge;const eve={...UX};function NM(t){const e=O.useRef(t);return Du(()=>{e.current=t}),e}const tve=eve.useInsertionEffect,nve=tve||(t=>t());function vu(t){const e=O.useRef(()=>{});return nve(()=>{e.current=t}),O.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function eB(t,e,n){let{reference:r,floating:s}=t;const i=fc(e),o=s9(e),a=r9(o),l=xc(e),c=i==="y",d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,p=r[a]/2-s[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(k1(e)){case"start":m[o]-=p*(n&&c?-1:1);break;case"end":m[o]+=p*(n&&c?-1:1);break}return m}const rve=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:f}=eB(c,r,l),p=r,m={},v=0;for(let y=0;y<a.length;y++){const{name:x,fn:w}=a[y],{x:C,y:E,data:D,reset:T}=await w({x:d,y:f,initialPlacement:r,placement:p,strategy:s,middlewareData:m,rects:c,platform:o,elements:{reference:t,floating:e}});d=C??d,f=E??f,m={...m,[x]:{...m[x],...D}},T&&v<=50&&(v++,typeof T=="object"&&(T.placement&&(p=T.placement),T.rects&&(c=T.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):T.rects),{x:d,y:f}=eB(c,p,l)),y=-1)}return{x:d,y:f,placement:p,strategy:s,middlewareData:m}};async function pS(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Nu(e,t),v=i9(m),x=a[p?f==="floating"?"reference":"floating":f],w=Yy(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),C=f==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),D=await(i.isElement==null?void 0:i.isElement(E))?await(i.getScale==null?void 0:i.getScale(E))||{x:1,y:1}:{x:1,y:1},T=Yy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:E,strategy:l}):C);return{top:(w.top-T.top+v.top)/D.y,bottom:(T.bottom-w.bottom+v.bottom)/D.y,left:(w.left-T.left+v.left)/D.x,right:(T.right-w.right+v.right)/D.x}}const sve=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:d=0}=Nu(t,e)||{};if(c==null)return{};const f=i9(d),p={x:n,y:r},m=s9(s),v=r9(m),y=await o.getDimensions(c),x=m==="y",w=x?"top":"left",C=x?"bottom":"right",E=x?"clientHeight":"clientWidth",D=i.reference[v]+i.reference[m]-p[m]-i.floating[v],T=p[m]-i.reference[m],A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let _=A?A[E]:0;(!_||!await(o.isElement==null?void 0:o.isElement(A)))&&(_=a.floating[E]||i.floating[v]);const R=D/2-T/2,N=_/2-y[v]/2-1,I=bc(f[w],N),$=bc(f[C],N),L=I,z=_-y[v]-$,F=_/2-y[v]/2+R,q=PI(L,F,z),H=!l.arrow&&k1(s)!=null&&F!==q&&i.reference[v]/2-(F<L?I:$)-y[v]/2<0,B=H?F<L?F-L:F-z:0;return{[m]:p[m]+B,data:{[m]:q,centerOffset:F-q-B,...H&&{alignmentOffset:B}},reset:H}}}),ive=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...x}=Nu(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=xc(s),C=fc(a),E=xc(a)===a,D=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=p||(E||!y?[jk(a)]:Ige(a)),A=v!=="none";!p&&A&&T.push(...zge(a,y,v,D));const _=[a,...T],R=await pS(e,x),N=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&N.push(R[w]),f){const F=jge(s,o,D);N.push(R[F[0]],R[F[1]])}if(I=[...I,{placement:s,overflows:N}],!N.every(F=>F<=0)){var $,L;const F=((($=i.flip)==null?void 0:$.index)||0)+1,q=_[F];if(q&&(!(f==="alignment"?C!==fc(q):!1)||I.every(V=>fc(V.placement)===C?V.overflows[0]>0:!0)))return{data:{index:F,overflows:I},reset:{placement:q}};let H=(L=I.filter(B=>B.overflows[0]<=0).sort((B,V)=>B.overflows[1]-V.overflows[1])[0])==null?void 0:L.placement;if(!H)switch(m){case"bestFit":{var z;const B=(z=I.filter(V=>{if(A){const Y=fc(V.placement);return Y===C||Y==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(Y=>Y>0).reduce((Y,G)=>Y+G,0)]).sort((V,Y)=>V[1]-Y[1])[0])==null?void 0:z[0];B&&(H=B);break}case"initialPlacement":H=a;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function tB(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function nB(t){return _ge.some(e=>t[e]>=0)}const ove=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Nu(t,e);switch(r){case"referenceHidden":{const i=await pS(e,{...s,elementContext:"reference"}),o=tB(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:nB(o)}}}case"escaped":{const i=await pS(e,{...s,altBoundary:!0}),o=tB(i,n.floating);return{data:{escapedOffsets:o,escaped:nB(o)}}}default:return{}}}}};function HQ(t){const e=bc(...t.map(i=>i.left)),n=bc(...t.map(i=>i.top)),r=io(...t.map(i=>i.right)),s=io(...t.map(i=>i.bottom));return{x:e,y:n,width:r-e,height:s-n}}function ave(t){const e=t.slice().sort((s,i)=>s.y-i.y),n=[];let r=null;for(let s=0;s<e.length;s++){const i=e[s];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(s=>Yy(HQ(s)))}const lve=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:s,platform:i,strategy:o}=e,{padding:a=2,x:l,y:c}=Nu(t,e),d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(r.reference))||[]),f=ave(d),p=Yy(HQ(d)),m=i9(a);function v(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(x=>l>x.left-m.left&&l<x.right+m.right&&c>x.top-m.top&&c<x.bottom+m.bottom)||p;if(f.length>=2){if(fc(n)==="y"){const I=f[0],$=f[f.length-1],L=xc(n)==="top",z=I.top,F=$.bottom,q=L?I.left:$.left,H=L?I.right:$.right,B=H-q,V=F-z;return{top:z,bottom:F,left:q,right:H,width:B,height:V,x:q,y:z}}const x=xc(n)==="left",w=io(...f.map(I=>I.right)),C=bc(...f.map(I=>I.left)),E=f.filter(I=>x?I.left===C:I.right===w),D=E[0].top,T=E[E.length-1].bottom,A=C,_=w,R=_-A,N=T-D;return{top:D,bottom:T,left:A,right:_,width:R,height:N,x:A,y:D}}return p}const y=await i.getElementRects({reference:{getBoundingClientRect:v},floating:r.floating,strategy:o});return s.reference.x!==y.reference.x||s.reference.y!==y.reference.y||s.reference.width!==y.reference.width||s.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}},qQ=new Set(["left","top"]);async function cve(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=xc(n),a=k1(n),l=fc(n)==="y",c=qQ.has(o)?-1:1,d=i&&l?-1:1,f=Nu(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),l?{x:m*d,y:p*c}:{x:p*c,y:m*d}}const uve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await cve(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},dve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:x=>{let{x:w,y:C}=x;return{x:w,y:C}}},...l}=Nu(t,e),c={x:n,y:r},d=await pS(e,l),f=fc(xc(s)),p=n9(f);let m=c[p],v=c[f];if(i){const x=p==="y"?"top":"left",w=p==="y"?"bottom":"right",C=m+d[x],E=m-d[w];m=PI(C,m,E)}if(o){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",C=v+d[x],E=v-d[w];v=PI(C,v,E)}const y=a.fn({...e,[p]:m,[f]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:i,[f]:o}}}}}},fve=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Nu(t,e),d={x:n,y:r},f=fc(s),p=n9(f);let m=d[p],v=d[f];const y=Nu(a,e),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const E=p==="y"?"height":"width",D=i.reference[p]-i.floating[E]+x.mainAxis,T=i.reference[p]+i.reference[E]-x.mainAxis;m<D?m=D:m>T&&(m=T)}if(c){var w,C;const E=p==="y"?"width":"height",D=qQ.has(xc(s)),T=i.reference[f]-i.floating[E]+(D&&((w=o.offset)==null?void 0:w[f])||0)+(D?0:x.crossAxis),A=i.reference[f]+i.reference[E]+(D?0:((C=o.offset)==null?void 0:C[f])||0)-(D?x.crossAxis:0);v<T?v=T:v>A&&(v=A)}return{[p]:m,[f]:v}}}},pve=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=Nu(t,e),d=await pS(e,c),f=xc(s),p=k1(s),m=fc(s)==="y",{width:v,height:y}=i.floating;let x,w;f==="top"||f==="bottom"?(x=f,w=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,x=p==="end"?"top":"bottom");const C=y-d.top-d.bottom,E=v-d.left-d.right,D=bc(y-d[x],C),T=bc(v-d[w],E),A=!e.middlewareData.shift;let _=D,R=T;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(_=C),A&&!p){const I=io(d.left,0),$=io(d.right,0),L=io(d.top,0),z=io(d.bottom,0);m?R=v-2*(I!==0||$!==0?I+$:io(d.left,d.right)):_=y-2*(L!==0||z!==0?L+z:io(d.top,d.bottom))}await l({...e,availableWidth:R,availableHeight:_});const N=await o.getDimensions(a.floating);return v!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function UQ(t){const e=Dl(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=Ka(t),i=s?t.offsetWidth:n,o=s?t.offsetHeight:r,a=Nk(n)!==i||Nk(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function o9(t){return Gr(t)?t:t.contextElement}function Py(t){const e=o9(t);if(!Ka(e))return Mu(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=UQ(e);let o=(i?Nk(n.width):n.width)/r,a=(i?Nk(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const hve=Mu(0);function VQ(t){const e=ma(t);return!zA()||!e.visualViewport?hve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function mve(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==ma(t)?!1:e}function Pg(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=o9(t);let o=Mu(1);e&&(r?Gr(r)&&(o=Py(r)):o=Py(t));const a=mve(i,n,r)?VQ(i):Mu(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(i){const p=ma(i),m=r&&Gr(r)?ma(r):r;let v=p,y=LI(v);for(;y&&r&&m!==v;){const x=Py(y),w=y.getBoundingClientRect(),C=Dl(y),E=w.left+(y.clientLeft+parseFloat(C.paddingLeft))*x.x,D=w.top+(y.clientTop+parseFloat(C.paddingTop))*x.y;l*=x.x,c*=x.y,d*=x.x,f*=x.y,l+=E,c+=D,v=ma(y),y=LI(v)}}return Yy({width:d,height:f,x:l,y:c})}function BA(t,e){const n=FA(t).scrollLeft;return e?e.left+n:Pg(qu(t)).left+n}function WQ(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-BA(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function gve(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",o=qu(r),a=e?$A(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Mu(1);const d=Mu(0),f=Ka(r);if((f||!f&&!i)&&((D1(r)!=="body"||aw(o))&&(l=FA(r)),Ka(r))){const m=Pg(r);c=Py(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=o&&!f&&!i?WQ(o,l):Mu(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}}function vve(t){return Array.from(t.getClientRects())}function yve(t){const e=qu(t),n=FA(t),r=t.ownerDocument.body,s=io(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=io(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+BA(t);const a=-n.scrollTop;return Dl(r).direction==="rtl"&&(o+=io(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}const rB=25;function bve(t,e){const n=ma(t),r=qu(t),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const d=zA();(!d||d&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=BA(r);if(c<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-m);v<=rB&&(i-=v)}else c<=rB&&(i+=c);return{width:i,height:o,x:a,y:l}}const xve=new Set(["absolute","fixed"]);function Sve(t,e){const n=Pg(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=Ka(t)?Py(t):Mu(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function sB(t,e,n){let r;if(e==="viewport")r=bve(t,n);else if(e==="document")r=yve(qu(t));else if(Gr(e))r=Sve(e,n);else{const s=VQ(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return Yy(r)}function YQ(t,e){const n=Bd(t);return n===e||!Gr(n)||Id(n)?!1:Dl(n).position==="fixed"||YQ(n,e)}function wve(t,e){const n=e.get(t);if(n)return n;let r=Ld(t,[],!1).filter(a=>Gr(a)&&D1(a)!=="body"),s=null;const i=Dl(t).position==="fixed";let o=i?Bd(t):t;for(;Gr(o)&&!Id(o);){const a=Dl(o),l=t9(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&xve.has(s.position)||aw(o)&&!l&&YQ(t,o))?r=r.filter(d=>d!==o):s=a,o=Bd(o)}return e.set(t,r),r}function Cve(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const o=[...n==="clippingAncestors"?$A(e)?[]:wve(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,d)=>{const f=sB(e,d,s);return c.top=io(f.top,c.top),c.right=bc(f.right,c.right),c.bottom=bc(f.bottom,c.bottom),c.left=io(f.left,c.left),c},sB(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Eve(t){const{width:e,height:n}=UQ(t);return{width:e,height:n}}function Mve(t,e,n){const r=Ka(e),s=qu(e),i=n==="fixed",o=Pg(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Mu(0);function c(){l.x=BA(s)}if(r||!r&&!i)if((D1(e)!=="body"||aw(s))&&(a=FA(e)),r){const m=Pg(e,!0,i,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else s&&c();i&&!r&&s&&c();const d=s&&!r&&!i?WQ(s,a):Mu(0),f=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:o.width,height:o.height}}function NR(t){return Dl(t).position==="static"}function iB(t,e){if(!Ka(t)||Dl(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return qu(t)===n&&(n=n.ownerDocument.body),n}function GQ(t,e){const n=ma(t);if($A(t))return n;if(!Ka(t)){let s=Bd(t);for(;s&&!Id(s);){if(Gr(s)&&!NR(s))return s;s=Bd(s)}return n}let r=iB(t,e);for(;r&&Cge(r)&&NR(r);)r=iB(r,e);return r&&Id(r)&&NR(r)&&!t9(r)?n:r||Tge(t)||n}const Dve=async function(t){const e=this.getOffsetParent||GQ,n=this.getDimensions,r=await n(t.floating);return{reference:Mve(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kve(t){return Dl(t).direction==="rtl"}const Tve={convertOffsetParentRelativeRectToViewportRelativeRect:gve,getDocumentElement:qu,getClippingRect:Cve,getOffsetParent:GQ,getElementRects:Dve,getClientRects:vve,getDimensions:Eve,getScale:Py,isElement:Gr,isRTL:kve};function KQ(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ave(t,e){let n=null,r;const s=qu(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=c;if(a||e(),!p||!m)return;const v=RM(f),y=RM(s.clientWidth-(d+p)),x=RM(s.clientHeight-(f+m)),w=RM(d),E={rootMargin:-v+"px "+-y+"px "+-x+"px "+-w+"px",threshold:io(0,bc(1,l))||1};let D=!0;function T(A){const _=A[0].intersectionRatio;if(_!==l){if(!D)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}_===1&&!KQ(c,t.getBoundingClientRect())&&o(),D=!1}try{n=new IntersectionObserver(T,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(T,E)}n.observe(t)}return o(!0),i}function FI(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=o9(t),d=s||i?[...c?Ld(c):[],...Ld(e)]:[];d.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=c&&a?Ave(c,n):null;let p=-1,m=null;o&&(m=new ResizeObserver(w=>{let[C]=w;C&&C.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(e)})),n()}),c&&!l&&m.observe(c),m.observe(e));let v,y=l?Pg(t):null;l&&x();function x(){const w=Pg(t);y&&!KQ(y,w)&&n(),y=w,v=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(C=>{s&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const _ve=uve,Ove=dve,Rve=ive,Nve=pve,jve=ove,oB=sve,Ive=lve,Lve=fve,Pve=(t,e,n)=>{const r=new Map,s={platform:Tve,...n},i={...s.platform,_c:r};return rve(t,e,{...s,platform:i})};var $ve=typeof document<"u",zve=function(){},jD=$ve?O.useLayoutEffect:zve;function Ik(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!Ik(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!Ik(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ZQ(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function aB(t,e){const n=ZQ(t);return Math.round(e*n)/n}function jR(t){const e=O.useRef(t);return jD(()=>{e.current=t}),e}function Fve(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[d,f]=O.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,m]=O.useState(r);Ik(p,r)||m(r);const[v,y]=O.useState(null),[x,w]=O.useState(null),C=O.useCallback(V=>{V!==A.current&&(A.current=V,y(V))},[]),E=O.useCallback(V=>{V!==_.current&&(_.current=V,w(V))},[]),D=i||v,T=o||x,A=O.useRef(null),_=O.useRef(null),R=O.useRef(d),N=l!=null,I=jR(l),$=jR(s),L=jR(c),z=O.useCallback(()=>{if(!A.current||!_.current)return;const V={placement:e,strategy:n,middleware:p};$.current&&(V.platform=$.current),Pve(A.current,_.current,V).then(Y=>{const G={...Y,isPositioned:L.current!==!1};F.current&&!Ik(R.current,G)&&(R.current=G,M1.flushSync(()=>{f(G)}))})},[p,e,n,$,L]);jD(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const F=O.useRef(!1);jD(()=>(F.current=!0,()=>{F.current=!1}),[]),jD(()=>{if(D&&(A.current=D),T&&(_.current=T),D&&T){if(I.current)return I.current(D,T,z);z()}},[D,T,z,I,N]);const q=O.useMemo(()=>({reference:A,floating:_,setReference:C,setFloating:E}),[C,E]),H=O.useMemo(()=>({reference:D,floating:T}),[D,T]),B=O.useMemo(()=>{const V={position:n,left:0,top:0};if(!H.floating)return V;const Y=aB(H.floating,d.x),G=aB(H.floating,d.y);return a?{...V,transform:"translate("+Y+"px, "+G+"px)",...ZQ(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:G}},[n,a,H.floating,d.x,d.y]);return O.useMemo(()=>({...d,update:z,refs:q,elements:H,floatingStyles:B}),[d,z,q,H,B])}const Bve=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?oB({element:r.current,padding:s}).fn(n):{}:r?oB({element:r,padding:s}).fn(n):{}}}},JQ=(t,e)=>({..._ve(t),options:[t,e]}),a9=(t,e)=>({...Ove(t),options:[t,e]}),lB=(t,e)=>({...Lve(t),options:[t,e]}),Lk=(t,e)=>({...Rve(t),options:[t,e]}),Hve=(t,e)=>({...Nve(t),options:[t,e]}),qve=(t,e)=>({...jve(t),options:[t,e]}),Px=(t,e)=>({...Ive(t),options:[t,e]}),XQ=(t,e)=>({...Bve(t),options:[t,e]});function QQ(t){const e=O.useRef(void 0),n=O.useCallback(r=>{const s=t.map(i=>{if(i!=null){if(typeof i=="function"){const o=i,a=o(r);return typeof a=="function"?a:()=>{o(null)}}return i.current=r,()=>{i.current=null}}});return()=>{s.forEach(i=>i==null?void 0:i())}},t);return O.useMemo(()=>t.every(r=>r==null)?null:r=>{e.current&&(e.current(),e.current=void 0),r!=null&&(e.current=n(r))},t)}const Uve="data-floating-ui-focusable",cB="active",uB="selected",Vve={...UX};let dB=!1,Wve=0;const fB=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Wve++;function Yve(){const[t,e]=O.useState(()=>dB?fB():void 0);return Du(()=>{t==null&&e(fB())},[]),O.useEffect(()=>{dB=!0},[]),t}const Gve=Vve.useId,eee=Gve||Yve;function Kve(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Zve=O.createContext(null),Jve=O.createContext(null),l9=()=>{var t;return((t=O.useContext(Zve))==null?void 0:t.id)||null},c9=()=>O.useContext(Jve);function u9(t){return"data-floating-ui-"+t}function hl(t){t.current!==-1&&(clearTimeout(t.current),t.current=-1)}const pB=u9("safe-polygon");function ID(t,e,n){if(n&&!zI(n))return 0;if(typeof t=="number")return t;if(typeof t=="function"){const r=t();return typeof r=="number"?r:r==null?void 0:r[e]}return t==null?void 0:t[e]}function IR(t){return typeof t=="function"?t():t}function tee(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:s,events:i,elements:o}=t,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=e,m=c9(),v=l9(),y=NM(c),x=NM(l),w=NM(n),C=NM(f),E=O.useRef(),D=O.useRef(-1),T=O.useRef(),A=O.useRef(-1),_=O.useRef(!0),R=O.useRef(!1),N=O.useRef(()=>{}),I=O.useRef(!1),$=vu(()=>{var B;const V=(B=s.current.openEvent)==null?void 0:B.type;return(V==null?void 0:V.includes("mouse"))&&V!=="mousedown"});O.useEffect(()=>{if(!a)return;function B(V){let{open:Y}=V;Y||(hl(D),hl(A),_.current=!0,I.current=!1)}return i.on("openchange",B),()=>{i.off("openchange",B)}},[a,i]),O.useEffect(()=>{if(!a||!y.current||!n)return;function B(Y){$()&&r(!1,Y,"hover")}const V=fg(o.floating).documentElement;return V.addEventListener("mouseleave",B),()=>{V.removeEventListener("mouseleave",B)}},[o.floating,n,r,a,y,$]);const L=O.useCallback(function(B,V,Y){V===void 0&&(V=!0),Y===void 0&&(Y="hover");const G=ID(x.current,"close",E.current);G&&!T.current?(hl(D),D.current=window.setTimeout(()=>r(!1,B,Y),G)):V&&(hl(D),r(!1,B,Y))},[x,r]),z=vu(()=>{N.current(),T.current=void 0}),F=vu(()=>{if(R.current){const B=fg(o.floating).body;B.style.pointerEvents="",B.removeAttribute(pB),R.current=!1}}),q=vu(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);O.useEffect(()=>{if(!a)return;function B(Z){if(hl(D),_.current=!1,d&&!zI(E.current)||IR(C.current)>0&&!ID(x.current,"open"))return;const Q=ID(x.current,"open",E.current);Q?D.current=window.setTimeout(()=>{w.current||r(!0,Z,"hover")},Q):n||r(!0,Z,"hover")}function V(Z){if(q()){F();return}N.current();const Q=fg(o.floating);if(hl(A),I.current=!1,y.current&&s.current.floatingContext){n||hl(D),T.current=y.current({...s.current.floatingContext,tree:m,x:Z.clientX,y:Z.clientY,onClose(){F(),z(),q()||L(Z,!0,"safe-polygon")}});const re=T.current;Q.addEventListener("mousemove",re),N.current=()=>{Q.removeEventListener("mousemove",re)};return}(E.current==="touch"?!fS(o.floating,Z.relatedTarget):!0)&&L(Z)}function Y(Z){q()||s.current.floatingContext&&(y.current==null||y.current({...s.current.floatingContext,tree:m,x:Z.clientX,y:Z.clientY,onClose(){F(),z(),q()||L(Z)}})(Z))}function G(){hl(D)}function W(Z){q()||L(Z,!1)}if(Gr(o.domReference)){const Z=o.domReference,Q=o.floating;return n&&Z.addEventListener("mouseleave",Y),p&&Z.addEventListener("mousemove",B,{once:!0}),Z.addEventListener("mouseenter",B),Z.addEventListener("mouseleave",V),Q&&(Q.addEventListener("mouseleave",Y),Q.addEventListener("mouseenter",G),Q.addEventListener("mouseleave",W)),()=>{n&&Z.removeEventListener("mouseleave",Y),p&&Z.removeEventListener("mousemove",B),Z.removeEventListener("mouseenter",B),Z.removeEventListener("mouseleave",V),Q&&(Q.removeEventListener("mouseleave",Y),Q.removeEventListener("mouseenter",G),Q.removeEventListener("mouseleave",W))}}},[o,a,t,d,p,L,z,F,r,n,w,m,x,y,s,q,C]),Du(()=>{var B;if(a&&n&&(B=y.current)!=null&&(B=B.__options)!=null&&B.blockPointerEvents&&$()){R.current=!0;const Y=o.floating;if(Gr(o.domReference)&&Y){var V;const G=fg(o.floating).body;G.setAttribute(pB,"");const W=o.domReference,Z=m==null||(V=m.nodesRef.current.find(Q=>Q.id===v))==null||(V=V.context)==null?void 0:V.elements.floating;return Z&&(Z.style.pointerEvents=""),G.style.pointerEvents="none",W.style.pointerEvents="auto",Y.style.pointerEvents="auto",()=>{G.style.pointerEvents="",W.style.pointerEvents="",Y.style.pointerEvents=""}}}},[a,n,v,o,m,y,$]),Du(()=>{n||(E.current=void 0,I.current=!1,z(),F())},[n,z,F]),O.useEffect(()=>()=>{z(),hl(D),hl(A),F()},[a,o.domReference,z,F]);const H=O.useMemo(()=>{function B(V){E.current=V.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(V){const{nativeEvent:Y}=V;function G(){!_.current&&!w.current&&r(!0,Y,"hover")}d&&!zI(E.current)||n||IR(C.current)===0||I.current&&V.movementX**2+V.movementY**2<2||(hl(A),E.current==="touch"?G():(I.current=!0,A.current=window.setTimeout(G,IR(C.current))))}}},[d,r,n,w,C]);return O.useMemo(()=>a?{reference:H}:{},[a,H])}const BI=()=>{},nee=O.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:BI,setState:BI,isInstantPhase:!1}),Xve=()=>O.useContext(nee);function ree(t){const{children:e,delay:n,timeoutMs:r=0}=t,[s,i]=O.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=O.useRef(null),a=O.useCallback(l=>{i({currentId:l})},[]);return Du(()=>{s.currentId?o.current===null?o.current=s.currentId:s.isInstantPhase||i({isInstantPhase:!0}):(s.isInstantPhase&&i({isInstantPhase:!1}),o.current=null)},[s.currentId,s.isInstantPhase]),g.jsx(nee.Provider,{value:O.useMemo(()=>({...s,setState:i,setCurrentId:a}),[s,a]),children:e})}function see(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,floatingId:s}=t,{id:i,enabled:o=!0}=e,a=i??s,l=Xve(),{currentId:c,setCurrentId:d,initialDelay:f,setState:p,timeoutMs:m}=l;return Du(()=>{o&&c&&(p({delay:{open:1,close:ID(f,"close")}}),c!==a&&r(!1))},[o,a,r,p,c,f]),Du(()=>{function v(){r(!1),p({delay:f,currentId:null})}if(o&&c&&!n&&c===a){if(m){const y=window.setTimeout(v,m);return()=>{clearTimeout(y)}}v()}},[o,n,p,c,a,r,f,m]),Du(()=>{o&&(d===BI||!n||d(a))},[o,n,d,a]),l}const Qve={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},e0e={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hB=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t==null?void 0:t.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t==null?void 0:t.outsidePress)!=null?n:!0}};function iee(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:s,dataRef:i}=t,{enabled:o=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:v}=e,y=c9(),x=vu(typeof l=="function"?l:()=>!1),w=typeof l=="function"?x:l,C=O.useRef(!1),{escapeKey:E,outsidePress:D}=hB(m),{escapeKey:T,outsidePress:A}=hB(v),_=O.useRef(!1),R=vu(F=>{var q;if(!n||!o||!a||F.key!=="Escape"||_.current)return;const H=(q=i.current.floatingContext)==null?void 0:q.nodeId,B=y?ND(y.nodesRef.current,H):[];if(!E&&(F.stopPropagation(),B.length>0)){let V=!0;if(B.forEach(Y=>{var G;if((G=Y.context)!=null&&G.open&&!Y.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,Jge(F)?F.nativeEvent:F,"escape-key")}),N=vu(F=>{var q;const H=()=>{var B;R(F),(B=wy(F))==null||B.removeEventListener("keydown",H)};(q=wy(F))==null||q.addEventListener("keydown",H)}),I=vu(F=>{var q;const H=i.current.insideReactTree;i.current.insideReactTree=!1;const B=C.current;if(C.current=!1,c==="click"&&B||H||typeof w=="function"&&!w(F))return;const V=wy(F),Y="["+u9("inert")+"]",G=fg(s.floating).querySelectorAll(Y);let W=Gr(V)?V:null;for(;W&&!Id(W);){const re=Bd(W);if(Id(re)||!Gr(re))break;W=re}if(G.length&&Gr(V)&&!Yge(V)&&!fS(V,s.floating)&&Array.from(G).every(re=>!fS(W,re)))return;if(Ka(V)&&z){const re=Id(V),ne=Dl(V),ee=/auto|scroll/,oe=re||ee.test(ne.overflowX),ce=re||ee.test(ne.overflowY),ue=oe&&V.clientWidth>0&&V.scrollWidth>V.clientWidth,pe=ce&&V.clientHeight>0&&V.scrollHeight>V.clientHeight,de=ne.direction==="rtl",me=pe&&(de?F.offsetX<=V.offsetWidth-V.clientWidth:F.offsetX>V.clientWidth),Se=ue&&F.offsetY>V.clientHeight;if(me||Se)return}const Z=(q=i.current.floatingContext)==null?void 0:q.nodeId,Q=y&&ND(y.nodesRef.current,Z).some(re=>{var ne;return RR(F,(ne=re.context)==null?void 0:ne.elements.floating)});if(RR(F,s.floating)||RR(F,s.domReference)||Q)return;const X=y?ND(y.nodesRef.current,Z):[];if(X.length>0){let re=!0;if(X.forEach(ne=>{var ee;if((ee=ne.context)!=null&&ee.open&&!ne.context.dataRef.current.__outsidePressBubbles){re=!1;return}}),!re)return}r(!1,F,"outside-press")}),$=vu(F=>{var q;const H=()=>{var B;I(F),(B=wy(F))==null||B.removeEventListener(c,H)};(q=wy(F))==null||q.addEventListener(c,H)});O.useEffect(()=>{if(!n||!o)return;i.current.__escapeKeyBubbles=E,i.current.__outsidePressBubbles=D;let F=-1;function q(G){r(!1,G,"ancestor-scroll")}function H(){window.clearTimeout(F),_.current=!0}function B(){F=window.setTimeout(()=>{_.current=!1},zA()?5:0)}const V=fg(s.floating);a&&(V.addEventListener("keydown",T?N:R,T),V.addEventListener("compositionstart",H),V.addEventListener("compositionend",B)),w&&V.addEventListener(c,A?$:I,A);let Y=[];return p&&(Gr(s.domReference)&&(Y=Ld(s.domReference)),Gr(s.floating)&&(Y=Y.concat(Ld(s.floating))),!Gr(s.reference)&&s.reference&&s.reference.contextElement&&(Y=Y.concat(Ld(s.reference.contextElement)))),Y=Y.filter(G=>{var W;return G!==((W=V.defaultView)==null?void 0:W.visualViewport)}),Y.forEach(G=>{G.addEventListener("scroll",q,{passive:!0})}),()=>{a&&(V.removeEventListener("keydown",T?N:R,T),V.removeEventListener("compositionstart",H),V.removeEventListener("compositionend",B)),w&&V.removeEventListener(c,A?$:I,A),Y.forEach(G=>{G.removeEventListener("scroll",q)}),window.clearTimeout(F)}},[i,s,a,w,c,n,r,p,o,E,D,R,T,N,I,A,$]),O.useEffect(()=>{i.current.insideReactTree=!1},[i,w,c]);const L=O.useMemo(()=>({onKeyDown:R,...d&&{[Qve[f]]:F=>{r(!1,F.nativeEvent,"reference-press")},...f!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}}}}),[R,r,d,f]),z=O.useMemo(()=>({onKeyDown:R,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[e0e[c]]:()=>{i.current.insideReactTree=!0}}),[R,c,i]);return O.useMemo(()=>o?{reference:L,floating:z}:{},[o,L,z])}function t0e(t){const{open:e=!1,onOpenChange:n,elements:r}=t,s=eee(),i=O.useRef({}),[o]=O.useState(()=>Kve()),a=l9()!=null,[l,c]=O.useState(r.reference),d=vu((m,v,y)=>{i.current.openEvent=m?v:void 0,o.emit("openchange",{open:m,event:v,reason:y,nested:a}),n==null||n(m,v,y)}),f=O.useMemo(()=>({setPositionReference:c}),[]),p=O.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return O.useMemo(()=>({dataRef:i,open:e,onOpenChange:d,elements:p,events:o,floatingId:s,refs:f}),[e,d,p,o,s,f])}function HA(t){t===void 0&&(t={});const{nodeId:e}=t,n=t0e({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,s=r.elements,[i,o]=O.useState(null),[a,l]=O.useState(null),d=(s==null?void 0:s.domReference)||i,f=O.useRef(null),p=c9();Du(()=>{d&&(f.current=d)},[d]);const m=Fve({...t,elements:{...s,...a&&{reference:a}}}),v=O.useCallback(E=>{const D=Gr(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;l(D),m.refs.setReference(D)},[m.refs]),y=O.useCallback(E=>{(Gr(E)||E===null)&&(f.current=E,o(E)),(Gr(m.refs.reference.current)||m.refs.reference.current===null||E!==null&&!Gr(E))&&m.refs.setReference(E)},[m.refs]),x=O.useMemo(()=>({...m.refs,setReference:y,setPositionReference:v,domReference:f}),[m.refs,y,v]),w=O.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),C=O.useMemo(()=>({...m,...r,refs:x,elements:w,nodeId:e}),[m,x,w,e,r]);return Du(()=>{r.dataRef.current.floatingContext=C;const E=p==null?void 0:p.nodesRef.current.find(D=>D.id===e);E&&(E.context=C)}),O.useMemo(()=>({...m,context:C,refs:x,elements:w}),[m,x,w,C])}function LR(){return Uge()&&qge()}function n0e(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,events:s,dataRef:i,elements:o}=t,{enabled:a=!0,visibleOnly:l=!0}=e,c=O.useRef(!1),d=O.useRef(-1),f=O.useRef(!0);O.useEffect(()=>{if(!a)return;const m=ma(o.domReference);function v(){!n&&Ka(o.domReference)&&o.domReference===QF(fg(o.domReference))&&(c.current=!0)}function y(){f.current=!0}function x(){f.current=!1}return m.addEventListener("blur",v),LR()&&(m.addEventListener("keydown",y,!0),m.addEventListener("pointerdown",x,!0)),()=>{m.removeEventListener("blur",v),LR()&&(m.removeEventListener("keydown",y,!0),m.removeEventListener("pointerdown",x,!0))}},[o.domReference,n,a]),O.useEffect(()=>{if(!a)return;function m(v){let{reason:y}=v;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return s.on("openchange",m),()=>{s.off("openchange",m)}},[s,a]),O.useEffect(()=>()=>{hl(d)},[]);const p=O.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;const v=wy(m.nativeEvent);if(l&&Gr(v)){if(LR()&&!m.relatedTarget){if(!f.current&&!Gge(v))return}else if(!Kge(v))return}r(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;const v=m.relatedTarget,y=m.nativeEvent,x=Gr(v)&&v.hasAttribute(u9("focus-guard"))&&v.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var w;const C=QF(o.domReference?o.domReference.ownerDocument:document);!v&&C===o.domReference||fS((w=i.current.floatingContext)==null?void 0:w.refs.floating.current,C)||fS(o.domReference,C)||x||r(!1,y,"focus")})}}),[i,o.domReference,r,l]);return O.useMemo(()=>a?{reference:p}:{},[a,p])}function PR(t,e,n){const r=new Map,s=n==="item";let i=t;if(s&&t){const{[cB]:o,[uB]:a,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1,[Uve]:""},...i,...e.map(o=>{const a=o?o[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((o,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(s&&[cB,uB].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var f;(f=r.get(c))==null||f.push(d),o[c]=function(){for(var p,m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];return(p=r.get(c))==null?void 0:p.map(x=>x(...v)).find(x=>x!==void 0)}}}else o[c]=d}),o),{})}}function oee(t){t===void 0&&(t=[]);const e=t.map(a=>a==null?void 0:a.reference),n=t.map(a=>a==null?void 0:a.floating),r=t.map(a=>a==null?void 0:a.item),s=O.useCallback(a=>PR(a,t,"reference"),e),i=O.useCallback(a=>PR(a,t,"floating"),n),o=O.useCallback(a=>PR(a,t,"item"),r);return O.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:o}),[s,i,o])}const r0e=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function aee(t,e){var n,r;e===void 0&&(e={});const{open:s,elements:i,floatingId:o}=t,{enabled:a=!0,role:l="dialog"}=e,c=eee(),d=((n=i.domReference)==null?void 0:n.id)||c,f=O.useMemo(()=>{var C;return((C=Zge(i.floating))==null?void 0:C.id)||o},[i.floating,o]),p=(r=r0e.get(l))!=null?r:l,v=l9()!=null,y=O.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:s?f:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":s?f:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:d},...p==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,f,v,s,d,l]),x=O.useMemo(()=>{const C={id:f,...p&&{role:p}};return p==="tooltip"||l==="label"?C:{...C,...p==="menu"&&{"aria-labelledby":d}}},[p,f,d,l]),w=O.useCallback(C=>{let{active:E,selected:D}=C;const T={role:"option",...E&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...T,"aria-selected":D}}return{}},[f,l]);return O.useMemo(()=>a?{reference:y,floating:x,item:w}:{},[a,y,x,w])}var d9={root:"m_d57069b5",content:"m_b1336c6",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};const[s0e,_l]=Ys("ScrollArea.Root component was not found in tree");function Gy(t,e){const n=ig(e);bh(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}const i0e=O.forwardRef((t,e)=>{const{style:n,...r}=t,s=_l(),[i,o]=O.useState(0),[a,l]=O.useState(0),c=!!(i&&a);return Gy(s.scrollbarX,()=>{var f;const d=((f=s.scrollbarX)==null?void 0:f.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),Gy(s.scrollbarY,()=>{var f;const d=((f=s.scrollbarY)==null?void 0:f.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),c?g.jsx("div",{...r,ref:e,style:{...n,width:i,height:a}}):null}),o0e=O.forwardRef((t,e)=>{const n=_l(),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?g.jsx(i0e,{...t,ref:e}):null}),a0e={scrollHideDelay:1e3,type:"hover"},lee=O.forwardRef((t,e)=>{const{type:n,scrollHideDelay:r,scrollbars:s,getStyles:i,...o}=Ce("ScrollAreaRoot",a0e,t),[a,l]=O.useState(null),[c,d]=O.useState(null),[f,p]=O.useState(null),[m,v]=O.useState(null),[y,x]=O.useState(null),[w,C]=O.useState(0),[E,D]=O.useState(0),[T,A]=O.useState(!1),[_,R]=O.useState(!1),N=Ds(e,I=>l(I));return g.jsx(s0e,{value:{type:n,scrollHideDelay:r,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:T,onScrollbarXEnabledChange:A,scrollbarY:y,onScrollbarYChange:x,scrollbarYEnabled:_,onScrollbarYEnabledChange:R,onCornerWidthChange:C,onCornerHeightChange:D,getStyles:i},children:g.jsx(le,{...o,ref:N,__vars:{"--sa-corner-width":s!=="xy"?"0px":`${w}px`,"--sa-corner-height":s!=="xy"?"0px":`${E}px`}})})});lee.displayName="@mantine/core/ScrollAreaRoot";function cee(t,e){const n=t/e;return Number.isNaN(n)?0:n}function qA(t){const e=cee(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function uee(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function l0e(t,[e,n]){return Math.min(n,Math.max(e,t))}function mB(t,e,n="ltr"){const r=qA(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,o=e.content-e.viewport,a=i-r,l=n==="ltr"?[0,o]:[o*-1,0],c=l0e(t,l);return uee([0,o],[0,a])(c)}function c0e(t,e,n,r="ltr"){const s=qA(n),i=s/2,o=e||i,a=s-o,l=n.scrollbar.paddingStart+o,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return uee([l,c],f)(t)}function dee(t,e){return t>0&&t<e}function Ip(t){return t?parseInt(t,10):0}function wg(t,e,{checkForDefaultPrevented:n=!0}={}){return r=>{t==null||t(r),(n===!1||!r.defaultPrevented)&&(e==null||e(r))}}const[u0e,fee]=Ys("ScrollAreaScrollbar was not found in tree"),pee=O.forwardRef((t,e)=>{const{sizes:n,hasThumb:r,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:o,onThumbPositionChange:a,onDragScroll:l,onWheelScroll:c,onResize:d,...f}=t,p=_l(),[m,v]=O.useState(null),y=Ds(e,R=>v(R)),x=O.useRef(null),w=O.useRef(""),{viewport:C}=p,E=n.content-n.viewport,D=ig(c),T=ig(a),A=_A(d,10),_=R=>{if(x.current){const N=R.clientX-x.current.left,I=R.clientY-x.current.top;l({x:N,y:I})}};return O.useEffect(()=>{const R=N=>{const I=N.target;(m==null?void 0:m.contains(I))&&D(N,E)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[C,m,E,D]),O.useEffect(T,[n,T]),Gy(m,A),Gy(p.content,A),g.jsx(u0e,{value:{scrollbar:m,hasThumb:r,onThumbChange:ig(s),onThumbPointerUp:ig(i),onThumbPositionChange:T,onThumbPointerDown:ig(o)},children:g.jsx("div",{...f,ref:y,"data-mantine-scrollbar":!0,style:{position:"absolute",...f.style},onPointerDown:wg(t.onPointerDown,R=>{R.preventDefault(),R.button===0&&(R.target.setPointerCapture(R.pointerId),x.current=m.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",_(R))}),onPointerMove:wg(t.onPointerMove,_),onPointerUp:wg(t.onPointerUp,R=>{const N=R.target;N.hasPointerCapture(R.pointerId)&&(R.preventDefault(),N.releasePointerCapture(R.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=w.current,x.current=null}})})}),hee=O.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:s,...i}=t,o=_l(),[a,l]=O.useState(),c=O.useRef(null),d=Ds(e,c,o.onScrollbarXChange);return O.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),g.jsx(pee,{"data-orientation":"horizontal",...i,ref:d,sizes:n,style:{...s,"--sa-thumb-width":`${qA(n)}px`},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,p)=>{if(o.viewport){const m=o.viewport.scrollLeft+f.deltaX;t.onWheelScroll(m),dee(m,p)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ip(a.paddingLeft),paddingEnd:Ip(a.paddingRight)}})}})});hee.displayName="@mantine/core/ScrollAreaScrollbarX";const mee=O.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,style:s,...i}=t,o=_l(),[a,l]=O.useState(),c=O.useRef(null),d=Ds(e,c,o.onScrollbarYChange);return O.useEffect(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),g.jsx(pee,{...i,"data-orientation":"vertical",ref:d,sizes:n,style:{"--sa-thumb-height":`${qA(n)}px`,...s},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,p)=>{if(o.viewport){const m=o.viewport.scrollTop+f.deltaY;t.onWheelScroll(m),dee(m,p)&&f.preventDefault()}},onResize:()=>{c.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ip(a.paddingTop),paddingEnd:Ip(a.paddingBottom)}})}})});mee.displayName="@mantine/core/ScrollAreaScrollbarY";const UA=O.forwardRef((t,e)=>{const{orientation:n="vertical",...r}=t,{dir:s}=Hu(),i=_l(),o=O.useRef(null),a=O.useRef(0),[l,c]=O.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=cee(l.viewport,l.content),f={...r,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>{o.current=m},onThumbPointerUp:()=>{a.current=0},onThumbPointerDown:m=>{a.current=m}},p=(m,v)=>c0e(m,a.current,l,v);return n==="horizontal"?g.jsx(hee,{...f,ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollLeft,v=mB(m,l,s);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=p(m,s))}}):n==="vertical"?g.jsx(mee,{...f,ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const m=i.viewport.scrollTop,v=mB(m,l);l.scrollbar.size===0?o.current.style.setProperty("--thumb-opacity","0"):o.current.style.setProperty("--thumb-opacity","1"),o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=p(m))}}):null});UA.displayName="@mantine/core/ScrollAreaScrollbarVisible";const f9=O.forwardRef((t,e)=>{const n=_l(),{forceMount:r,...s}=t,[i,o]=O.useState(!1),a=t.orientation==="horizontal",l=_A(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?c:d)}},10);return Gy(n.viewport,l),Gy(n.content,l),r||i?g.jsx(UA,{"data-state":i?"visible":"hidden",...s,ref:e}):null});f9.displayName="@mantine/core/ScrollAreaScrollbarAuto";const gee=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=_l(),[i,o]=O.useState(!1);return O.useEffect(()=>{const{scrollArea:a}=s;let l=0;if(a){const c=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),n||i?g.jsx(f9,{"data-state":i?"visible":"hidden",...r,ref:e}):null});gee.displayName="@mantine/core/ScrollAreaScrollbarHover";const d0e=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=_l(),i=t.orientation==="horizontal",[o,a]=O.useState("hidden"),l=_A(()=>a("idle"),100);return O.useEffect(()=>{if(o==="idle"){const c=window.setTimeout(()=>a("hidden"),s.scrollHideDelay);return()=>window.clearTimeout(c)}},[o,s.scrollHideDelay]),O.useEffect(()=>{const{viewport:c}=s,d=i?"scrollLeft":"scrollTop";if(c){let f=c[d];const p=()=>{const m=c[d];f!==m&&(a("scrolling"),l()),f=m};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[s.viewport,i,l]),n||o!=="hidden"?g.jsx(UA,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:wg(t.onPointerEnter,()=>a("interacting")),onPointerLeave:wg(t.onPointerLeave,()=>a("idle"))}):null}),HI=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=_l(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=t.orientation==="horizontal";return O.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?g.jsx(gee,{...r,ref:e,forceMount:n}):s.type==="scroll"?g.jsx(d0e,{...r,ref:e,forceMount:n}):s.type==="auto"?g.jsx(f9,{...r,ref:e,forceMount:n}):s.type==="always"?g.jsx(UA,{...r,ref:e}):null});HI.displayName="@mantine/core/ScrollAreaScrollbar";function f0e(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return(function s(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&e(),n=i,r=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(r)}const vee=O.forwardRef((t,e)=>{const{style:n,...r}=t,s=_l(),i=fee(),{onThumbPositionChange:o}=i,a=Ds(e,d=>i.onThumbChange(d)),l=O.useRef(void 0),c=_A(()=>{l.current&&(l.current(),l.current=void 0)},100);return O.useEffect(()=>{const{viewport:d}=s;if(d){const f=()=>{if(c(),!l.current){const p=f0e(d,o);l.current=p,o()}};return o(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[s.viewport,c,o]),g.jsx("div",{"data-state":i.hasThumb?"visible":"hidden",...r,ref:a,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...n},onPointerDownCapture:wg(t.onPointerDownCapture,d=>{const p=d.target.getBoundingClientRect(),m=d.clientX-p.left,v=d.clientY-p.top;i.onThumbPointerDown({x:m,y:v})}),onPointerUp:wg(t.onPointerUp,i.onThumbPointerUp)})});vee.displayName="@mantine/core/ScrollAreaThumb";const qI=O.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=fee();return n||s.hasThumb?g.jsx(vee,{ref:e,...r}):null});qI.displayName="@mantine/core/ScrollAreaThumb";const yee=O.forwardRef(({children:t,style:e,onWheel:n,...r},s)=>{const i=_l(),o=Ds(s,i.onViewportChange),a=l=>{if(n==null||n(l),i.scrollbarXEnabled&&i.viewport&&l.shiftKey){const{scrollTop:c,scrollHeight:d,clientHeight:f,scrollWidth:p,clientWidth:m}=i.viewport,v=c<1,y=c>=d-f-1;p>m&&(v||y)&&l.stopPropagation()}};return g.jsx(le,{...r,ref:o,onWheel:a,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e},children:g.jsx("div",{...i.getStyles("content"),ref:i.onContentChange,children:t})})});yee.displayName="@mantine/core/ScrollAreaViewport";const bee={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},p0e=(t,{scrollbarSize:e,overscrollBehavior:n,scrollbars:r})=>{let s=n;return n&&r&&(r==="x"?s=`${n} auto`:r==="y"&&(s=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":Ee(e),"--scrollarea-over-scroll-behavior":s}}},Qs=Fe((t,e)=>{const n=Ce("ScrollArea",bee,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,scrollbarSize:l,vars:c,type:d,scrollHideDelay:f,viewportProps:p,viewportRef:m,onScrollPositionChange:v,children:y,offsetScrollbars:x,scrollbars:w,onBottomReached:C,onTopReached:E,overscrollBehavior:D,attributes:T,...A}=n,[_,R]=O.useState(!1),[N,I]=O.useState(!1),[$,L]=O.useState(!1),z=bt({name:"ScrollArea",props:n,classes:d9,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:T,vars:c,varsResolver:p0e}),F=O.useRef(null),q=QQ([m,F]);return O.useEffect(()=>{if(!F.current||x!=="present")return;const H=F.current,B=new ResizeObserver(()=>{const{scrollHeight:V,clientHeight:Y,scrollWidth:G,clientWidth:W}=H;I(V>Y),L(G>W)});return B.observe(H),()=>B.disconnect()},[F,x]),g.jsxs(lee,{getStyles:z,type:d==="never"?"always":d,scrollHideDelay:f,ref:e,scrollbars:w,...z("root"),...A,children:[g.jsx(yee,{...p,...z("viewport",{style:p==null?void 0:p.style}),ref:q,"data-offset-scrollbars":x===!0?"xy":x||void 0,"data-scrollbars":w||void 0,"data-horizontal-hidden":x==="present"&&!$?"true":void 0,"data-vertical-hidden":x==="present"&&!N?"true":void 0,onScroll:H=>{var G;(G=p==null?void 0:p.onScroll)==null||G.call(p,H),v==null||v({x:H.currentTarget.scrollLeft,y:H.currentTarget.scrollTop});const{scrollTop:B,scrollHeight:V,clientHeight:Y}=H.currentTarget;B-(V-Y)>=-.8&&(C==null||C()),B===0&&(E==null||E())},children:y}),(w==="xy"||w==="x")&&g.jsx(HI,{...z("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||x==="present"&&!$?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:g.jsx(qI,{...z("thumb")})}),(w==="xy"||w==="y")&&g.jsx(HI,{...z("scrollbar"),orientation:"vertical","data-hidden":d==="never"||x==="present"&&!N?!0:void 0,forceMount:!0,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),children:g.jsx(qI,{...z("thumb")})}),g.jsx(o0e,{...z("corner"),"data-hovered":_||void 0,"data-hidden":d==="never"||void 0})]})});Qs.displayName="@mantine/core/ScrollArea";const p9=Fe((t,e)=>{const{children:n,classNames:r,styles:s,scrollbarSize:i,scrollHideDelay:o,type:a,dir:l,offsetScrollbars:c,overscrollBehavior:d,viewportRef:f,onScrollPositionChange:p,unstyled:m,variant:v,viewportProps:y,scrollbars:x,style:w,vars:C,onBottomReached:E,onTopReached:D,onOverflowChange:T,...A}=Ce("ScrollAreaAutosize",bee,t),_=O.useRef(null),R=QQ([f,_]),[N,I]=O.useState(!1),$=O.useRef(!1);return O.useEffect(()=>{if(!T)return;const L=_.current;if(!L)return;const z=()=>{const q=L.scrollHeight>L.clientHeight;q!==N&&($.current?T==null||T(q):($.current=!0,q&&(T==null||T(!0))),I(q))};z();const F=new ResizeObserver(z);return F.observe(L),()=>F.disconnect()},[T,N]),g.jsx(le,{...A,ref:e,style:[{display:"flex",overflow:"hidden"},w],children:g.jsx(le,{style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden",...x==="y"&&{minWidth:0},...x==="x"&&{minHeight:0},...x==="xy"&&{minWidth:0,minHeight:0},...x===!1&&{minWidth:0,minHeight:0}},children:g.jsx(Qs,{classNames:r,styles:s,scrollHideDelay:o,scrollbarSize:i,type:a,dir:l,offsetScrollbars:c,overscrollBehavior:d,viewportRef:R,onScrollPositionChange:p,unstyled:m,variant:v,viewportProps:y,vars:C,scrollbars:x,onBottomReached:E,onTopReached:D,"data-autosize":"true",children:n})})})});Qs.classes=d9;p9.displayName="@mantine/core/ScrollAreaAutosize";p9.classes=d9;Qs.Autosize=p9;var xee={root:"m_87cf2631"};const h0e={__staticSelector:"UnstyledButton"},or=xi((t,e)=>{const n=Ce("UnstyledButton",h0e,t),{className:r,component:s="button",__staticSelector:i,unstyled:o,classNames:a,styles:l,style:c,attributes:d,...f}=n,p=bt({name:i,props:n,classes:xee,className:r,style:c,classNames:a,styles:l,unstyled:o,attributes:d});return g.jsx(le,{...p("root",{focusable:!0}),component:s,ref:e,type:s==="button"?"button":void 0,...f})});or.classes=xee;or.displayName="@mantine/core/UnstyledButton";var See={root:"m_515a97f8"};const h9=Fe((t,e)=>{const n=Ce("VisuallyHidden",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,attributes:c,...d}=n,f=bt({name:"VisuallyHidden",classes:See,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:c});return g.jsx(le,{component:"span",ref:e,...f("root"),...d})});h9.classes=See;h9.displayName="@mantine/core/VisuallyHidden";var wee={root:"m_1b7284a3"};const m0e=(t,{radius:e,shadow:n})=>({root:{"--paper-radius":e===void 0?void 0:ar(e),"--paper-shadow":VP(n)}}),lw=xi((t,e)=>{const n=Ce("Paper",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,withBorder:l,vars:c,radius:d,shadow:f,variant:p,mod:m,attributes:v,...y}=n,x=bt({name:"Paper",props:n,classes:wee,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:c,varsResolver:m0e});return g.jsx(le,{ref:e,mod:[{"data-with-border":l},m],...x("root"),variant:p,...y})});lw.classes=wee;lw.displayName="@mantine/core/Paper";function gB(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function vB(t,e,n,r,s){return t==="center"||r==="center"?{left:e}:t==="end"?{[s==="ltr"?"right":"left"]:n}:t==="start"?{[s==="ltr"?"left":"right"]:n}:{}}const g0e={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function v0e({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,arrowX:i,arrowY:o,dir:a}){const[l,c="center"]=t.split("-"),d={width:e,height:e,transform:"rotate(45deg)",position:"absolute",[g0e[l]]:r},f=-e/2;return l==="left"?{...d,...gB(c,o,n,s),right:f,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...d,...gB(c,o,n,s),left:f,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...d,...vB(c,i,n,s,a),bottom:f,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...d,...vB(c,i,n,s,a),top:f,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}const Pk=O.forwardRef(({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,visible:i,arrowX:o,arrowY:a,style:l,...c},d)=>{const{dir:f}=Hu();return i?g.jsx("div",{...c,ref:d,style:{...l,...v0e({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:s,dir:f,arrowX:o,arrowY:a})}}):null});Pk.displayName="@mantine/core/FloatingArrow";function Cee(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),s=n==="right"?"left":"right";return r===void 0?s:`${s}-${r}`}return e}var Eee={root:"m_9814e45f"};const y0e={zIndex:yi("modal")},b0e=(t,{gradient:e,color:n,backgroundOpacity:r,blur:s,radius:i,zIndex:o})=>({root:{"--overlay-bg":e||(n!==void 0||r!==void 0)&&du(n||"#000",r??.6)||void 0,"--overlay-filter":s?`blur(${Ee(s)})`:void 0,"--overlay-radius":i===void 0?void 0:ar(i),"--overlay-z-index":o==null?void 0:o.toString()}}),Ky=xi((t,e)=>{const n=Ce("Overlay",y0e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,fixed:c,center:d,children:f,radius:p,zIndex:m,gradient:v,blur:y,color:x,backgroundOpacity:w,mod:C,attributes:E,...D}=n,T=bt({name:"Overlay",props:n,classes:Eee,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:E,vars:l,varsResolver:b0e});return g.jsx(le,{ref:e,...T("root"),mod:[{center:d,fixed:c},C],...D,children:f})});Ky.classes=Eee;Ky.displayName="@mantine/core/Overlay";function $R(t){const e=document.createElement("div");return e.setAttribute("data-portal","true"),typeof t.className=="string"&&e.classList.add(...t.className.split(" ").filter(Boolean)),typeof t.style=="object"&&Object.assign(e.style,t.style),typeof t.id=="string"&&e.setAttribute("id",t.id),e}function x0e({target:t,reuseTargetNode:e,...n}){if(t)return typeof t=="string"?document.querySelector(t)||$R(n):t;if(e){const r=document.querySelector("[data-mantine-shared-portal-node]");if(r)return r;const s=$R(n);return s.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(s),s}return $R(n)}const S0e={reuseTargetNode:!0},Mee=Fe((t,e)=>{const{children:n,target:r,reuseTargetNode:s,...i}=Ce("Portal",S0e,t),[o,a]=O.useState(!1),l=O.useRef(null);return bh(()=>(a(!0),l.current=x0e({target:r,reuseTargetNode:s,...i}),uS(e,l.current),!r&&!s&&l.current&&document.body.appendChild(l.current),()=>{!r&&!s&&l.current&&document.body.removeChild(l.current)}),[r]),!o||!l.current?null:M1.createPortal(g.jsx(g.Fragment,{children:n}),l.current)});Mee.displayName="@mantine/core/Portal";const Hd=Fe(({withinPortal:t=!0,children:e,...n},r)=>LA()==="test"||!t?g.jsx(g.Fragment,{children:e}):g.jsx(Mee,{ref:r,...n,children:e}));Hd.displayName="@mantine/core/OptionalPortal";const ex=t=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${t==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),jM={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...ex("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...ex("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...ex("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...ex("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...ex("top"),common:{transformOrigin:"top right"}}},yB={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function w0e({transition:t,state:e,duration:n,timingFunction:r}){const s={WebkitBackfaceVisibility:"hidden",transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in jM?{transitionProperty:jM[t].transitionProperty,...s,...jM[t].common,...jM[t][yB[e]]}:{}:{transitionProperty:t.transitionProperty,...s,...t.common,...t[yB[e]]}}function C0e({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:s,onExit:i,onEntered:o,onExited:a,enterDelay:l,exitDelay:c}){const d=Dr(),f=RA(),p=d.respectReducedMotion?f:!1,[m,v]=O.useState(p?0:t),[y,x]=O.useState(r?"entered":"exited"),w=O.useRef(-1),C=O.useRef(-1),E=O.useRef(-1);function D(){window.clearTimeout(w.current),window.clearTimeout(C.current),cancelAnimationFrame(E.current)}const T=_=>{D();const R=_?s:i,N=_?o:a,I=p?0:_?t:e;v(I),I===0?(typeof R=="function"&&R(),typeof N=="function"&&N(),x(_?"entered":"exited")):E.current=requestAnimationFrame(()=>{jp.flushSync(()=>{x(_?"pre-entering":"pre-exiting")}),E.current=requestAnimationFrame(()=>{typeof R=="function"&&R(),x(_?"entering":"exiting"),w.current=window.setTimeout(()=>{typeof N=="function"&&N(),x(_?"entered":"exited")},I)})})},A=_=>{if(D(),typeof(_?l:c)!="number"){T(_);return}C.current=window.setTimeout(()=>{T(_)},_?l:c)};return Ru(()=>{A(r)},[r]),O.useEffect(()=>()=>{D()},[]),{transitionDuration:m,transitionStatus:y,transitionTimingFunction:n||"ease"}}function Sc({keepMounted:t,transition:e="fade",duration:n=250,exitDuration:r=n,mounted:s,children:i,timingFunction:o="ease",onExit:a,onEntered:l,onEnter:c,onExited:d,enterDelay:f,exitDelay:p}){const m=LA(),{transitionDuration:v,transitionStatus:y,transitionTimingFunction:x}=C0e({mounted:s,exitDuration:r,duration:n,timingFunction:o,onExit:a,onEntered:l,onEnter:c,onExited:d,enterDelay:f,exitDelay:p});return v===0||m==="test"?s?g.jsx(g.Fragment,{children:i({})}):t?i({display:"none"}):null:y==="exited"?t?i({display:"none"}):null:g.jsx(g.Fragment,{children:i(w0e({transition:e,duration:v,state:y,timingFunction:x}))})}Sc.displayName="@mantine/core/Transition";const[E0e,Dee]=Ys("Popover component was not found in the tree");var kee={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};function cw({children:t,active:e=!0,refProp:n="ref",innerRef:r}){const s=Yhe(e),i=Ds(s,r),o=xh(t);return o?O.cloneElement(o,{[n]:i}):t}function Tee(t){return g.jsx(h9,{tabIndex:-1,"data-autofocus":!0,...t})}cw.displayName="@mantine/core/FocusTrap";Tee.displayName="@mantine/core/FocusTrapInitialFocus";cw.InitialFocus=Tee;const VA=Fe((t,e)=>{var x,w,C,E;const n=Ce("PopoverDropdown",null,t),{className:r,style:s,vars:i,children:o,onKeyDownCapture:a,variant:l,classNames:c,styles:d,...f}=n,p=Dee(),m=hQ({opened:p.opened,shouldReturnFocus:p.returnFocus}),v=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=Ds(e,p.floating);return p.disabled?null:g.jsx(Hd,{...p.portalProps,withinPortal:p.withinPortal,children:g.jsx(Sc,{mounted:p.opened,...p.transitionProps,transition:((x=p.transitionProps)==null?void 0:x.transition)||"fade",duration:((w=p.transitionProps)==null?void 0:w.duration)??150,keepMounted:p.keepMounted,exitDuration:typeof((C=p.transitionProps)==null?void 0:C.exitDuration)=="number"?p.transitionProps.exitDuration:(E=p.transitionProps)==null?void 0:E.duration,children:D=>g.jsx(cw,{active:p.trapFocus&&p.opened,innerRef:y,children:g.jsxs(le,{...v,...f,variant:l,onKeyDownCapture:Ihe(()=>{var T,A;(T=p.onClose)==null||T.call(p),(A=p.onDismiss)==null||A.call(p)},{active:p.closeOnEscape,onTrigger:m,onKeyDown:a}),"data-position":p.placement,"data-fixed":p.floatingStrategy==="fixed"||void 0,...p.getStyles("dropdown",{className:r,props:n,classNames:c,styles:d,style:[{...D,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width==="target"?void 0:Ee(p.width),...p.referenceHidden?{display:"none"}:null},p.resolvedStyles.dropdown,d==null?void 0:d.dropdown,s]}),children:[o,g.jsx(Pk,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles("arrow",{props:n,classNames:c,styles:d})})]})})})})});VA.classes=kee;VA.displayName="@mantine/core/PopoverDropdown";const M0e={refProp:"ref",popupType:"dialog"},Aee=Fe((t,e)=>{const{children:n,refProp:r,popupType:s,...i}=Ce("PopoverTarget",M0e,t),o=xh(n);if(!o)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=i,l=Dee(),c=Ds(l.reference,NA(o),e),d=l.withRoles?{"aria-haspopup":s,"aria-expanded":l.opened,"aria-controls":l.opened?l.getDropdownId():void 0,id:l.getTargetId()}:{},f=o.props;return O.cloneElement(o,{...a,...d,...l.targetProps,className:Ms(l.targetProps.className,a.className,f.className),[r]:c,...l.controlled?null:{onClick:()=>{var p;l.onToggle(),(p=f.onClick)==null||p.call(f)}}})});Aee.displayName="@mantine/core/PopoverTarget";function D0e(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function k0e(t,e,n){const r=D0e(t.middlewares),s=[JQ(t.offset),qve()];return t.dropdownVisible&&n!=="test"&&t.preventPositionChangeWhenVisible&&(r.flip=!1),r.flip&&s.push(typeof r.flip=="boolean"?Lk():Lk(r.flip)),r.shift&&s.push(a9(typeof r.shift=="boolean"?{limiter:lB(),padding:5}:{limiter:lB(),padding:5,...r.shift})),r.inline&&s.push(typeof r.inline=="boolean"?Px():Px(r.inline)),s.push(XQ({element:t.arrowRef,padding:t.arrowOffset})),(r.size||t.width==="target")&&s.push(Hve({...typeof r.size=="boolean"?{}:r.size,apply({rects:i,availableWidth:o,availableHeight:a,...l}){var f;const d=((f=e().refs.floating.current)==null?void 0:f.style)??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:i,availableWidth:o,availableHeight:a,...l}):Object.assign(d,{maxWidth:`${o}px`,maxHeight:`${a}px`})),t.width==="target"&&Object.assign(d,{width:`${i.reference.width}px`})}})),s}function T0e(t){const e=LA(),[n,r]=gi({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),s=O.useRef(n),i=()=>{n&&!t.disabled&&r(!1)},o=()=>{t.disabled||r(!n)},a=HA({strategy:t.strategy,placement:t.preventPositionChangeWhenVisible?t.positionRef.current:t.position,middleware:k0e(t,()=>a,e),whileElementsMounted:t.keepMounted?void 0:FI});return O.useEffect(()=>{if(!(!a.refs.reference.current||!a.refs.floating.current)&&n)return FI(a.refs.reference.current,a.refs.floating.current,a.update)},[n,a.update]),Ru(()=>{var l;(l=t.onPositionChange)==null||l.call(t,a.placement),t.positionRef.current=a.placement},[a.placement,t.preventPositionChangeWhenVisible]),Ru(()=>{var l,c;n!==s.current&&(n?(c=t.onOpen)==null||c.call(t):(l=t.onClose)==null||l.call(t)),s.current=n},[n,t.onClose,t.onOpen]),bh(()=>{let l=-1;return n&&(l=window.setTimeout(()=>t.setDropdownVisible(!0),4)),()=>{window.clearTimeout(l)}},[n,t.position]),{floating:a,controlled:typeof t.opened=="boolean",opened:n,onClose:i,onToggle:o}}const A0e={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:yi("popover"),__staticSelector:"Popover",width:"max-content"},_0e=(t,{radius:e,shadow:n})=>({dropdown:{"--popover-radius":e===void 0?void 0:ar(e),"--popover-shadow":VP(n)}});function Mn(t){var jt,Ot,Pt,Rt,Nt,Fn,pn;const e=Ce("Popover",A0e,t),{children:n,position:r,offset:s,onPositionChange:i,positionDependencies:o,opened:a,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:d,width:f,middlewares:p,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:x,arrowPosition:w,unstyled:C,classNames:E,styles:D,closeOnClickOutside:T,withinPortal:A,portalProps:_,closeOnEscape:R,clickOutsideEvents:N,trapFocus:I,onClose:$,onDismiss:L,onOpen:z,onChange:F,zIndex:q,radius:H,shadow:B,id:V,defaultOpened:Y,__staticSelector:G,withRoles:W,disabled:Z,returnFocus:Q,variant:X,keepMounted:re,vars:ne,floatingStrategy:ee,withOverlay:oe,overlayProps:ce,hideDetached:ue,attributes:pe,preventPositionChangeWhenVisible:de,...me}=e,Se=bt({name:G,props:e,classes:kee,classNames:E,styles:D,unstyled:C,attributes:pe,rootSelector:"dropdown",vars:ne,varsResolver:_0e}),{resolvedStyles:De}=Ma({classNames:E,styles:D,props:e}),[Ae,fe]=O.useState(a??Y??!1),Te=O.useRef(r),Ne=O.useRef(null),[Ue,rt]=O.useState(null),[ot,Je]=O.useState(null),{dir:je}=Hu(),We=LA(),Le=bi(V),_e=T0e({middlewares:p,width:f,position:Cee(je,r),offset:typeof s=="number"?s+(m?v/2:0):s,arrowRef:Ne,arrowOffset:y,onPositionChange:i,positionDependencies:o,opened:a,defaultOpened:Y,onChange:F,onOpen:z,onClose:$,onDismiss:L,strategy:ee,dropdownVisible:Ae,setDropdownVisible:fe,positionRef:Te,disabled:Z,preventPositionChangeWhenVisible:de,keepMounted:re});ow(()=>{T&&(_e.onClose(),L==null||L())},N,[Ue,ot]);const Be=O.useCallback(hn=>{rt(hn),_e.floating.refs.setReference(hn)},[_e.floating.refs.setReference]),ut=O.useCallback(hn=>{Je(hn),_e.floating.refs.setFloating(hn)},[_e.floating.refs.setFloating]),lt=O.useCallback(()=>{var hn;(hn=l==null?void 0:l.onExited)==null||hn.call(l),c==null||c(),fe(!1),de||(Te.current=r)},[l==null?void 0:l.onExited,c,de,r]),At=O.useCallback(()=>{var hn;(hn=l==null?void 0:l.onEntered)==null||hn.call(l),d==null||d()},[l==null?void 0:l.onEntered,d]);return g.jsxs(E0e,{value:{returnFocus:Q,disabled:Z,controlled:_e.controlled,reference:Be,floating:ut,x:_e.floating.x,y:_e.floating.y,arrowX:(Pt=(Ot=(jt=_e.floating)==null?void 0:jt.middlewareData)==null?void 0:Ot.arrow)==null?void 0:Pt.x,arrowY:(Fn=(Nt=(Rt=_e.floating)==null?void 0:Rt.middlewareData)==null?void 0:Nt.arrow)==null?void 0:Fn.y,opened:_e.opened,arrowRef:Ne,transitionProps:{...l,onExited:lt,onEntered:At},width:f,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:x,arrowPosition:w,placement:_e.floating.placement,trapFocus:I,withinPortal:A,portalProps:_,zIndex:q,radius:H,shadow:B,closeOnEscape:R,onDismiss:L,onClose:_e.onClose,onToggle:_e.onToggle,getTargetId:()=>`${Le}-target`,getDropdownId:()=>`${Le}-dropdown`,withRoles:W,targetProps:me,__staticSelector:G,classNames:E,styles:D,unstyled:C,variant:X,keepMounted:re,getStyles:Se,resolvedStyles:De,floatingStrategy:ee,referenceHidden:ue&&We!=="test"?(pn=_e.floating.middlewareData.hide)==null?void 0:pn.referenceHidden:!1},children:[n,oe&&g.jsx(Sc,{transition:"fade",mounted:_e.opened,duration:(l==null?void 0:l.duration)||250,exitDuration:(l==null?void 0:l.exitDuration)||250,children:hn=>g.jsx(Hd,{withinPortal:A,children:g.jsx(Ky,{...ce,...Se("overlay",{className:ce==null?void 0:ce.className,style:[hn,ce==null?void 0:ce.style]})})})})]})}Mn.Target=Aee;Mn.Dropdown=VA;Mn.displayName="@mantine/core/Popover";Mn.extend=t=>t;var pc={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const _ee=O.forwardRef(({className:t,...e},n)=>g.jsxs(le,{component:"span",className:Ms(pc.barsLoader,t),...e,ref:n,children:[g.jsx("span",{className:pc.bar}),g.jsx("span",{className:pc.bar}),g.jsx("span",{className:pc.bar})]}));_ee.displayName="@mantine/core/Bars";const Oee=O.forwardRef(({className:t,...e},n)=>g.jsxs(le,{component:"span",className:Ms(pc.dotsLoader,t),...e,ref:n,children:[g.jsx("span",{className:pc.dot}),g.jsx("span",{className:pc.dot}),g.jsx("span",{className:pc.dot})]}));Oee.displayName="@mantine/core/Dots";const Ree=O.forwardRef(({className:t,...e},n)=>g.jsx(le,{component:"span",className:Ms(pc.ovalLoader,t),...e,ref:n}));Ree.displayName="@mantine/core/Oval";const Nee={bars:_ee,oval:Ree,dots:Oee},O0e={loaders:Nee,type:"oval"},R0e=(t,{size:e,color:n})=>({root:{"--loader-size":Qt(e,"loader-size"),"--loader-color":n?Fr(n,t):void 0}}),zi=Fe((t,e)=>{const n=Ce("Loader",O0e,t),{size:r,color:s,type:i,vars:o,className:a,style:l,classNames:c,styles:d,unstyled:f,loaders:p,variant:m,children:v,attributes:y,...x}=n,w=bt({name:"Loader",props:n,classes:pc,className:a,style:l,classNames:c,styles:d,unstyled:f,attributes:y,vars:o,varsResolver:R0e});return v?g.jsx(le,{...w("root"),ref:e,...x,children:v}):g.jsx(le,{...w("root"),ref:e,component:p[i],variant:m,size:r,...x})});zi.defaultLoaders=Nee;zi.classes=pc;zi.displayName="@mantine/core/Loader";var T1={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};const bB={orientation:"horizontal"},N0e=(t,{borderWidth:e})=>({group:{"--ai-border-width":Ee(e)}}),m9=Fe((t,e)=>{const n=Ce("ActionIconGroup",bB,t),{className:r,style:s,classNames:i,styles:o,unstyled:a,orientation:l,vars:c,borderWidth:d,variant:f,mod:p,attributes:m,...v}=Ce("ActionIconGroup",bB,t),y=bt({name:"ActionIconGroup",props:n,classes:T1,className:r,style:s,classNames:i,styles:o,unstyled:a,attributes:m,vars:c,varsResolver:N0e,rootSelector:"group"});return g.jsx(le,{...y("group"),ref:e,variant:f,mod:[{"data-orientation":l},p],role:"group",...v})});m9.classes=T1;m9.displayName="@mantine/core/ActionIconGroup";const j0e=(t,{radius:e,color:n,gradient:r,variant:s,autoContrast:i,size:o})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:i});return{groupSection:{"--section-height":Qt(o,"section-height"),"--section-padding-x":Qt(o,"section-padding-x"),"--section-fz":hs(o),"--section-radius":e===void 0?void 0:ar(e),"--section-bg":n||s?a.background:void 0,"--section-color":a.color,"--section-bd":n||s?a.border:void 0}}},g9=Fe((t,e)=>{const n=Ce("ActionIconGroupSection",null,t),{className:r,style:s,classNames:i,styles:o,unstyled:a,vars:l,variant:c,gradient:d,radius:f,autoContrast:p,attributes:m,...v}=n,y=bt({name:"ActionIconGroupSection",props:n,classes:T1,className:r,style:s,classNames:i,styles:o,unstyled:a,attributes:m,vars:l,varsResolver:j0e,rootSelector:"groupSection"});return g.jsx(le,{...y("groupSection"),ref:e,variant:c,...v})});g9.classes=T1;g9.displayName="@mantine/core/ActionIconGroupSection";const I0e=(t,{size:e,radius:n,variant:r,gradient:s,color:i,autoContrast:o})=>{const a=t.variantColorResolver({color:i||t.primaryColor,theme:t,gradient:s,variant:r||"filled",autoContrast:o});return{root:{"--ai-size":Qt(e,"ai-size"),"--ai-radius":n===void 0?void 0:ar(n),"--ai-bg":i||r?a.background:void 0,"--ai-hover":i||r?a.hover:void 0,"--ai-hover-color":i||r?a.hoverColor:void 0,"--ai-color":a.color,"--ai-bd":i||r?a.border:void 0}}},gn=xi((t,e)=>{const n=Ce("ActionIcon",null,t),{className:r,unstyled:s,variant:i,classNames:o,styles:a,style:l,loading:c,loaderProps:d,size:f,color:p,radius:m,__staticSelector:v,gradient:y,vars:x,children:w,disabled:C,"data-disabled":E,autoContrast:D,mod:T,attributes:A,..._}=n,R=bt({name:["ActionIcon",v],props:n,className:r,style:l,classes:T1,classNames:o,styles:a,unstyled:s,attributes:A,vars:x,varsResolver:I0e});return g.jsxs(or,{...R("root",{active:!C&&!c&&!E}),..._,unstyled:s,variant:i,size:f,disabled:C||c,ref:e,mod:[{loading:c,disabled:C||E},T],children:[typeof c=="boolean"&&g.jsx(Sc,{mounted:c,transition:"slide-down",duration:150,children:N=>g.jsx(le,{component:"span",...R("loader",{style:N}),"aria-hidden":!0,children:g.jsx(zi,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),g.jsx(le,{component:"span",mod:{loading:c},...R("icon"),children:w})]})});gn.classes=T1;gn.displayName="@mantine/core/ActionIcon";gn.Group=m9;gn.GroupSection=g9;const jee=O.forwardRef(({size:t="var(--cb-icon-size, 70%)",style:e,...n},r)=>g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:t,height:t},ref:r,...n,children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));jee.displayName="@mantine/core/CloseIcon";var Iee={root:"m_86a44da5","root--subtle":"m_220c80f2"};const L0e={variant:"subtle"},P0e=(t,{size:e,radius:n,iconSize:r})=>({root:{"--cb-size":Qt(e,"cb-size"),"--cb-radius":n===void 0?void 0:ar(n),"--cb-icon-size":Ee(r)}}),A1=xi((t,e)=>{const n=Ce("CloseButton",L0e,t),{iconSize:r,children:s,vars:i,radius:o,className:a,classNames:l,style:c,styles:d,unstyled:f,"data-disabled":p,disabled:m,variant:v,icon:y,mod:x,attributes:w,__staticSelector:C,...E}=n,D=bt({name:C||"CloseButton",props:n,className:a,style:c,classes:Iee,classNames:l,styles:d,unstyled:f,attributes:w,vars:i,varsResolver:P0e});return g.jsxs(or,{ref:e,...E,unstyled:f,variant:v,disabled:m,mod:[{disabled:m||p},x],...D("root",{variant:v,active:!m&&!p}),children:[y||g.jsx(jee,{}),s]})});A1.classes=Iee;A1.displayName="@mantine/core/CloseButton";function $0e(t){return O.Children.toArray(t).filter(Boolean)}var Lee={root:"m_4081bf90"};const z0e={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},F0e=(t,{grow:e,preventGrowOverflow:n,gap:r,align:s,justify:i,wrap:o},{childWidth:a})=>({root:{"--group-child-width":e&&n?a:void 0,"--group-gap":Er(r),"--group-align":s,"--group-justify":i,"--group-wrap":o}}),wt=Fe((t,e)=>{const n=Ce("Group",z0e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,children:l,gap:c,align:d,justify:f,wrap:p,grow:m,preventGrowOverflow:v,vars:y,variant:x,__size:w,mod:C,attributes:E,...D}=n,T=$0e(l),A=T.length,_=Er(c??"md"),N={childWidth:`calc(${100/A}% - (${_} - ${_} / ${A}))`},I=bt({name:"Group",props:n,stylesCtx:N,className:s,style:i,classes:Lee,classNames:r,styles:o,unstyled:a,attributes:E,vars:y,varsResolver:F0e});return g.jsx(le,{...I("root"),ref:e,variant:x,mod:[{grow:m},C],size:w,...D,children:T})});wt.classes=Lee;wt.displayName="@mantine/core/Group";const[B0e,tf]=Ys("ModalBase component was not found in tree");function H0e({opened:t,transitionDuration:e}){const[n,r]=O.useState(t),s=O.useRef(-1),o=RA()?0:e;return O.useEffect(()=>(t?(r(!0),window.clearTimeout(s.current)):o===0?r(!1):s.current=window.setTimeout(()=>r(!1),o),()=>window.clearTimeout(s.current)),[t,o]),n}function q0e({id:t,transitionProps:e,opened:n,trapFocus:r,closeOnEscape:s,onClose:i,returnFocus:o}){const a=bi(t),[l,c]=O.useState(!1),[d,f]=O.useState(!1),p=typeof(e==null?void 0:e.duration)=="number"?e==null?void 0:e.duration:200,m=H0e({opened:n,transitionDuration:p});return cS("keydown",v=>{var y;v.key==="Escape"&&s&&!v.isComposing&&n&&((y=v.target)==null?void 0:y.getAttribute("data-mantine-stop-propagation"))!=="true"&&i()},{capture:!0}),hQ({opened:n,shouldReturnFocus:r&&o}),{_id:a,titleMounted:l,bodyMounted:d,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:f}}const v9=O.forwardRef(({keepMounted:t,opened:e,onClose:n,id:r,transitionProps:s,onExitTransitionEnd:i,onEnterTransitionEnd:o,trapFocus:a,closeOnEscape:l,returnFocus:c,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:v,zIndex:y,shadow:x,padding:w,__vars:C,unstyled:E,removeScrollProps:D,...T},A)=>{const{_id:_,titleMounted:R,bodyMounted:N,shouldLockScroll:I,setTitleMounted:$,setBodyMounted:L}=q0e({id:r,transitionProps:s,opened:e,trapFocus:a,closeOnEscape:l,onClose:n,returnFocus:c}),{key:z,...F}=D||{};return g.jsx(Hd,{...p,withinPortal:f,children:g.jsx(B0e,{value:{opened:e,onClose:n,closeOnClickOutside:d,onExitTransitionEnd:i,onEnterTransitionEnd:o,transitionProps:{...s,keepMounted:t},getTitleId:()=>`${_}-title`,getBodyId:()=>`${_}-body`,titleMounted:R,bodyMounted:N,setTitleMounted:$,setBodyMounted:L,trapFocus:a,closeOnEscape:l,zIndex:y,unstyled:E},children:g.jsx(Ig,{enabled:I&&m,...F,children:g.jsx(le,{ref:A,...T,__vars:{...C,"--mb-z-index":(y||yi("modal")).toString(),"--mb-shadow":VP(x),"--mb-padding":Er(w)},children:v})},z)})})});v9.displayName="@mantine/core/ModalBase";var Zy={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};function U0e(){const t=tf();return O.useEffect(()=>(t.setBodyMounted(!0),()=>t.setBodyMounted(!1)),[]),t.getBodyId()}const y9=O.forwardRef(({className:t,...e},n)=>{const r=U0e(),s=tf();return g.jsx(le,{ref:n,...e,id:r,className:Ms({[Zy.body]:!s.unstyled},t)})});y9.displayName="@mantine/core/ModalBaseBody";const b9=O.forwardRef(({className:t,onClick:e,...n},r)=>{const s=tf();return g.jsx(A1,{ref:r,...n,onClick:i=>{s.onClose(),e==null||e(i)},className:Ms({[Zy.close]:!s.unstyled},t),unstyled:s.unstyled})});b9.displayName="@mantine/core/ModalBaseCloseButton";const x9=O.forwardRef(({transitionProps:t,className:e,innerProps:n,onKeyDown:r,style:s,...i},o)=>{const a=tf();return g.jsx(Sc,{mounted:a.opened,transition:"pop",...a.transitionProps,onExited:()=>{var l,c,d;(l=a.onExitTransitionEnd)==null||l.call(a),(d=(c=a.transitionProps)==null?void 0:c.onExited)==null||d.call(c)},onEntered:()=>{var l,c,d;(l=a.onEnterTransitionEnd)==null||l.call(a),(d=(c=a.transitionProps)==null?void 0:c.onEntered)==null||d.call(c)},...t,children:l=>g.jsx("div",{...n,className:Ms({[Zy.inner]:!a.unstyled},n.className),children:g.jsx(cw,{active:a.opened&&a.trapFocus,innerRef:o,children:g.jsx(lw,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":a.bodyMounted?a.getBodyId():void 0,"aria-labelledby":a.titleMounted?a.getTitleId():void 0,style:[s,l],className:Ms({[Zy.content]:!a.unstyled},e),unstyled:a.unstyled,children:i.children})})})})});x9.displayName="@mantine/core/ModalBaseContent";const S9=O.forwardRef(({className:t,...e},n)=>{const r=tf();return g.jsx(le,{component:"header",ref:n,className:Ms({[Zy.header]:!r.unstyled},t),...e})});S9.displayName="@mantine/core/ModalBaseHeader";const V0e={duration:200,timingFunction:"ease",transition:"fade"};function W0e(t){const e=tf();return{...V0e,...e.transitionProps,...t}}const w9=O.forwardRef(({onClick:t,transitionProps:e,style:n,visible:r,...s},i)=>{const o=tf(),a=W0e(e);return g.jsx(Sc,{mounted:r!==void 0?r:o.opened,...a,transition:"fade",children:l=>g.jsx(Ky,{ref:i,fixed:!0,style:[n,l],zIndex:o.zIndex,unstyled:o.unstyled,onClick:c=>{t==null||t(c),o.closeOnClickOutside&&o.onClose()},...s})})});w9.displayName="@mantine/core/ModalBaseOverlay";function Y0e(){const t=tf();return O.useEffect(()=>(t.setTitleMounted(!0),()=>t.setTitleMounted(!1)),[]),t.getTitleId()}const C9=O.forwardRef(({className:t,...e},n)=>{const r=Y0e(),s=tf();return g.jsx(le,{component:"h2",ref:n,className:Ms({[Zy.title]:!s.unstyled},t),...e,id:r})});C9.displayName="@mantine/core/ModalBaseTitle";function Pee({children:t}){return g.jsx(g.Fragment,{children:t})}const[G0e,K0e]=Jd({size:"sm"});var Ol={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};const $ee=Fe((t,e)=>{const n=Ce("InputClearButton",null,t),{size:r,variant:s,vars:i,classNames:o,styles:a,...l}=n,c=K0e(),{resolvedClassNames:d,resolvedStyles:f}=Ma({classNames:o,styles:a,props:n});return g.jsx(A1,{variant:s||"transparent",ref:e,size:r||(c==null?void 0:c.size)||"sm",classNames:d,styles:f,__staticSelector:"InputClearButton",style:{pointerEvents:"all",background:"var(--input-bg)",...l.style},...l})});$ee.displayName="@mantine/core/InputClearButton";const Z0e={xs:7,sm:8,md:10,lg:12,xl:15};function J0e({__clearable:t,__clearSection:e,rightSection:n,__defaultRightSection:r,size:s="sm"}){const i=t&&e;return i&&(n||r)?g.jsxs("div",{"data-combined-clear-section":!0,style:{display:"flex",gap:2,alignItems:"center",paddingInlineEnd:Z0e[s]},children:[i,n||r]}):n===null?null:n||i||r}const[X0e,uw]=Jd({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),Q0e=(t,{size:e})=>({description:{"--input-description-size":e===void 0?void 0:`calc(${hs(e)} - ${Ee(2)})`}}),WA=Fe((t,e)=>{const n=Ce("InputDescription",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,size:c,__staticSelector:d,__inheritStyles:f=!0,attributes:p,variant:m,...v}=Ce("InputDescription",null,n),y=uw(),x=bt({name:["InputWrapper",d],props:n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:p,rootSelector:"description",vars:l,varsResolver:Q0e}),w=f&&(y==null?void 0:y.getStyles)||x;return g.jsx(le,{component:"p",ref:e,variant:m,size:c,...w("description",y!=null&&y.getStyles?{className:s,style:i}:void 0),...v})});WA.classes=Ol;WA.displayName="@mantine/core/InputDescription";const eye=(t,{size:e})=>({error:{"--input-error-size":e===void 0?void 0:`calc(${hs(e)} - ${Ee(2)})`}}),YA=Fe((t,e)=>{const n=Ce("InputError",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,size:c,attributes:d,__staticSelector:f,__inheritStyles:p=!0,variant:m,...v}=n,y=bt({name:["InputWrapper",f],props:n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:d,rootSelector:"error",vars:l,varsResolver:eye}),x=uw(),w=p&&(x==null?void 0:x.getStyles)||y;return g.jsx(le,{component:"p",ref:e,variant:m,size:c,...w("error",x!=null&&x.getStyles?{className:s,style:i}:void 0),...v})});YA.classes=Ol;YA.displayName="@mantine/core/InputError";const xB={labelElement:"label"},tye=(t,{size:e})=>({label:{"--input-label-size":hs(e),"--input-asterisk-color":void 0}}),GA=Fe((t,e)=>{const n=Ce("InputLabel",xB,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,labelElement:c,size:d,required:f,htmlFor:p,onMouseDown:m,children:v,__staticSelector:y,variant:x,mod:w,attributes:C,...E}=Ce("InputLabel",xB,n),D=bt({name:["InputWrapper",y],props:n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:C,rootSelector:"label",vars:l,varsResolver:tye}),T=uw(),A=(T==null?void 0:T.getStyles)||D;return g.jsxs(le,{...A("label",T!=null&&T.getStyles?{className:s,style:i}:void 0),component:c,variant:x,size:d,ref:e,htmlFor:c==="label"?p:void 0,mod:[{required:f},w],onMouseDown:_=>{m==null||m(_),!_.defaultPrevented&&_.detail>1&&_.preventDefault()},...E,children:[v,f&&g.jsx("span",{...A("required"),"aria-hidden":!0,children:" *"})]})});GA.classes=Ol;GA.displayName="@mantine/core/InputLabel";const E9=Fe((t,e)=>{const n=Ce("InputPlaceholder",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,__staticSelector:c,variant:d,error:f,mod:p,attributes:m,...v}=n,y=bt({name:["InputPlaceholder",c],props:n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:m,rootSelector:"placeholder"});return g.jsx(le,{...y("placeholder"),mod:[{error:!!f},p],component:"span",variant:d,ref:e,...v})});E9.classes=Ol;E9.displayName="@mantine/core/InputPlaceholder";function nye(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),s=t.slice(0,r),i=t.slice(r+1),o=e&&s.includes("description")||n&&s.includes("error");return{offsetBottom:e&&i.includes("description")||n&&i.includes("error"),offsetTop:o}}const rye={labelElement:"label",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},sye=(t,{size:e})=>({label:{"--input-label-size":hs(e),"--input-asterisk-color":void 0},error:{"--input-error-size":e===void 0?void 0:`calc(${hs(e)} - ${Ee(2)})`},description:{"--input-description-size":e===void 0?void 0:`calc(${hs(e)} - ${Ee(2)})`}}),M9=Fe((t,e)=>{const n=Ce("InputWrapper",rye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,size:c,variant:d,__staticSelector:f,inputContainer:p,inputWrapperOrder:m,label:v,error:y,description:x,labelProps:w,descriptionProps:C,errorProps:E,labelElement:D,children:T,withAsterisk:A,id:_,required:R,__stylesApiProps:N,mod:I,attributes:$,...L}=n,z=bt({name:["InputWrapper",f],props:N||n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:$,vars:l,varsResolver:sye}),F={size:c,variant:d,__staticSelector:f},q=bi(_),H=typeof A=="boolean"?A:R,B=(E==null?void 0:E.id)||`${q}-error`,V=(C==null?void 0:C.id)||`${q}-description`,Y=q,G=!!y&&typeof y!="boolean",W=!!x,Z=`${G?B:""} ${W?V:""}`,Q=Z.trim().length>0?Z.trim():void 0,X=(w==null?void 0:w.id)||`${q}-label`,re=v&&g.jsx(GA,{labelElement:D,id:X,htmlFor:Y,required:H,...F,...w,children:v},"label"),ne=W&&g.jsx(WA,{...C,...F,size:(C==null?void 0:C.size)||F.size,id:(C==null?void 0:C.id)||V,children:x},"description"),ee=g.jsx(O.Fragment,{children:p(T)},"input"),oe=G&&O.createElement(YA,{...E,...F,size:(E==null?void 0:E.size)||F.size,key:"error",id:(E==null?void 0:E.id)||B},y),ce=m.map(ue=>{switch(ue){case"label":return re;case"input":return ee;case"description":return ne;case"error":return oe;default:return null}});return g.jsx(X0e,{value:{getStyles:z,describedBy:Q,inputId:Y,labelId:X,...nye(m,{hasDescription:W,hasError:G})},children:g.jsx(le,{ref:e,variant:d,size:c,mod:[{error:!!y},I],...z("root"),...L,children:ce})})});M9.classes=Ol;M9.displayName="@mantine/core/InputWrapper";const iye={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0,size:"sm"},oye=(t,e,n)=>({wrapper:{"--input-margin-top":n.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":n.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":Qt(e.size,"input-height"),"--input-fz":hs(e.size),"--input-radius":e.radius===void 0?void 0:ar(e.radius),"--input-left-section-width":e.leftSectionWidth!==void 0?Ee(e.leftSectionWidth):void 0,"--input-right-section-width":e.rightSectionWidth!==void 0?Ee(e.rightSectionWidth):void 0,"--input-padding-y":e.multiline?Qt(e.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":e.leftSectionPointerEvents,"--input-right-section-pointer-events":e.rightSectionPointerEvents}}),Pn=xi((t,e)=>{const n=Ce("Input",iye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,required:l,__staticSelector:c,__stylesApiProps:d,size:f,wrapperProps:p,error:m,disabled:v,leftSection:y,leftSectionProps:x,leftSectionWidth:w,rightSection:C,rightSectionProps:E,rightSectionWidth:D,rightSectionPointerEvents:T,leftSectionPointerEvents:A,variant:_,vars:R,pointer:N,multiline:I,radius:$,id:L,withAria:z,withErrorStyles:F,mod:q,inputSize:H,attributes:B,__clearSection:V,__clearable:Y,__defaultRightSection:G,...W}=n,{styleProps:Z,rest:Q}=C1(W),X=uw(),re={offsetBottom:X==null?void 0:X.offsetBottom,offsetTop:X==null?void 0:X.offsetTop},ne=bt({name:["Input",c],props:d||n,classes:Ol,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:B,stylesCtx:re,rootSelector:"wrapper",vars:R,varsResolver:oye}),ee=z?{required:l,disabled:v,"aria-invalid":!!m,"aria-describedby":X==null?void 0:X.describedBy,id:(X==null?void 0:X.inputId)||L}:{},oe=J0e({__clearable:Y,__clearSection:V,rightSection:C,__defaultRightSection:G,size:f});return g.jsx(G0e,{value:{size:f||"sm"},children:g.jsxs(le,{...ne("wrapper"),...Z,...p,mod:[{error:!!m&&F,pointer:N,disabled:v,multiline:I,"data-with-right-section":!!oe,"data-with-left-section":!!y},q],variant:_,size:f,children:[y&&g.jsx("div",{...x,"data-position":"left",...ne("section",{className:x==null?void 0:x.className,style:x==null?void 0:x.style}),children:y}),g.jsx(le,{component:"input",...Q,...ee,ref:e,required:l,mod:{disabled:v,error:!!m&&F},variant:_,__size:H,...ne("input")}),oe&&g.jsx("div",{...E,"data-position":"right",...ne("section",{className:E==null?void 0:E.className,style:E==null?void 0:E.style}),children:oe})]})})});Pn.classes=Ol;Pn.Wrapper=M9;Pn.Label=GA;Pn.Error=YA;Pn.Description=WA;Pn.Placeholder=E9;Pn.ClearButton=$ee;Pn.displayName="@mantine/core/Input";function zee(t,e,n){const r=Ce(t,e,n),{label:s,description:i,error:o,required:a,classNames:l,styles:c,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:v,labelProps:y,descriptionProps:x,wrapperProps:w,id:C,size:E,style:D,inputContainer:T,inputWrapperOrder:A,withAsterisk:_,variant:R,vars:N,mod:I,attributes:$,...L}=r,{styleProps:z,rest:F}=C1(L),q={label:s,description:i,error:o,required:a,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:v,labelProps:y,descriptionProps:x,unstyled:f,styles:c,size:E,style:D,inputContainer:T,inputWrapperOrder:A,withAsterisk:_,variant:R,id:C,mod:I,attributes:$,...w};return{...F,classNames:l,styles:c,unstyled:f,wrapperProps:{...q,...z},inputProps:{required:a,classNames:l,styles:c,unstyled:f,size:E,__staticSelector:p,__stylesApiProps:m||r,error:o,variant:R,id:C,attributes:$}}}const aye={__staticSelector:"InputBase",withAria:!0,size:"sm"},Rl=xi((t,e)=>{const{inputProps:n,wrapperProps:r,...s}=zee("InputBase",aye,t);return g.jsx(Pn.Wrapper,{...r,children:g.jsx(Pn,{...n,...s,ref:e})})});Rl.classes={...Pn.classes,...Pn.Wrapper.classes};Rl.displayName="@mantine/core/InputBase";const lye={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var Fee={root:"m_8bffd616"};const vt=xi((t,e)=>{const n=Ce("Flex",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,gap:c,rowGap:d,columnGap:f,align:p,justify:m,wrap:v,direction:y,attributes:x,...w}=n,C=bt({name:"Flex",classes:Fee,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l}),E=Dr(),D=E1(),T=jQ({styleProps:{gap:c,rowGap:d,columnGap:f,align:p,justify:m,wrap:v,direction:y},theme:E,data:lye});return g.jsxs(g.Fragment,{children:[T.hasResponsiveStyles&&g.jsx(ef,{selector:`.${D}`,styles:T.styles,media:T.media}),g.jsx(le,{ref:e,...C("root",{className:D,style:Bu(T.inlineStyles)}),...w})]})});vt.classes=Fee;vt.displayName="@mantine/core/Flex";var Bee={root:"m_96b553a6"};function cye(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function uye({target:t,parent:e,ref:n,displayAfterTransitionEnd:r}){const s=O.useRef(-1),[i,o]=O.useState(!1),[a,l]=O.useState(typeof r=="boolean"?r:!1),c=()=>{if(!t||!e||!n.current)return;const m=t.getBoundingClientRect(),v=e.getBoundingClientRect(),y=window.getComputedStyle(t),x=window.getComputedStyle(e),w=Ip(y.borderTopWidth)+Ip(x.borderTopWidth),C=Ip(y.borderLeftWidth)+Ip(x.borderLeftWidth),E={top:m.top-v.top-w,left:m.left-v.left-C,width:m.width,height:m.height};n.current.style.transform=`translateY(${E.top}px) translateX(${E.left}px)`,n.current.style.width=`${E.width}px`,n.current.style.height=`${E.height}px`},d=()=>{window.clearTimeout(s.current),n.current&&(n.current.style.transitionDuration="0ms"),c(),s.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},f=O.useRef(null),p=O.useRef(null);return O.useEffect(()=>{if(c(),t)return f.current=new ResizeObserver(d),f.current.observe(t),e&&(p.current=new ResizeObserver(d),p.current.observe(e)),()=>{var m,v;(m=f.current)==null||m.disconnect(),(v=p.current)==null||v.disconnect()}},[e,t]),O.useEffect(()=>{if(e){const m=v=>{cye(v.target,e)&&(d(),l(!1))};return e.addEventListener("transitionend",m),()=>{e.removeEventListener("transitionend",m)}}},[e]),ime(()=>{EQ()!=="test"&&o(!0)},20,{autoInvoke:!0}),ome(m=>{m.forEach(v=>{v.type==="attributes"&&v.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:a}}const dye=(t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}}),D9=Fe((t,e)=>{const n=Ce("FloatingIndicator",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,target:c,parent:d,transitionDuration:f,mod:p,displayAfterTransitionEnd:m,attributes:v,...y}=n,x=bt({name:"FloatingIndicator",classes:Bee,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:l,varsResolver:dye}),w=O.useRef(null),{initialized:C,hidden:E}=uye({target:c,parent:d,ref:w,displayAfterTransitionEnd:m}),D=Ds(e,w);return!c||!d?null:g.jsx(le,{ref:D,mod:[{initialized:C,hidden:E},p],...x("root"),...y})});D9.displayName="@mantine/core/FloatingIndicator";D9.classes=Bee;function Hee({open:t,close:e,openDelay:n,closeDelay:r}){const s=O.useRef(-1),i=O.useRef(-1),o=()=>{window.clearTimeout(s.current),window.clearTimeout(i.current)},a=()=>{o(),n===0||n===void 0?t():s.current=window.setTimeout(t,n)},l=()=>{o(),r===0||r===void 0?e():i.current=window.setTimeout(e,r)};return O.useEffect(()=>o,[]),{openDropdown:a,closeDropdown:l}}const[fye,k9]=Ys("Accordion component was not found in the tree");var dw={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};function rh({style:t,size:e=16,...n}){return g.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:Ee(e),height:Ee(e),display:"block"},...n,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}rh.displayName="@mantine/core/AccordionChevron";const[pye,qee]=Ys("Accordion.Item component was not found in the tree"),T9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,chevron:a,icon:l,onClick:c,onKeyDown:d,children:f,disabled:p,mod:m,...v}=Ce("AccordionControl",null,t),{value:y}=qee(),x=k9(),w=x.isItemActive(y),C=typeof x.order=="number",E=`h${x.order}`,D=g.jsxs(or,{...v,...x.getStyles("control",{className:r,classNames:n,style:s,styles:i,variant:x.variant}),unstyled:x.unstyled,mod:["accordion-control",{active:w,"chevron-position":x.chevronPosition,disabled:p},m],ref:e,onClick:T=>{c==null||c(T),x.onChange(y)},type:"button",disabled:p,"aria-expanded":w,"aria-controls":x.getRegionId(y),id:x.getControlId(y),onKeyDown:AA({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:x.loop,orientation:"vertical",onKeyDown:d}),children:[g.jsx(le,{component:"span",mod:{rotate:!x.disableChevronRotation&&w,position:x.chevronPosition},...x.getStyles("chevron",{classNames:n,styles:i}),children:a||x.chevron}),g.jsx("span",{...x.getStyles("label",{classNames:n,styles:i}),children:f}),l&&g.jsx(le,{component:"span",mod:{"chevron-position":x.chevronPosition},...x.getStyles("icon",{classNames:n,styles:i}),children:l})]});return C?g.jsx(E,{...x.getStyles("itemTitle",{classNames:n,styles:i}),children:D}):D});T9.displayName="@mantine/core/AccordionControl";T9.classes=dw;const A9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,value:a,mod:l,...c}=Ce("AccordionItem",null,t),d=k9();return g.jsx(pye,{value:{value:a},children:g.jsx(le,{ref:e,mod:[{active:d.isItemActive(a)},l],...d.getStyles("item",{className:r,classNames:n,styles:i,style:s,variant:d.variant}),...c})})});A9.displayName="@mantine/core/AccordionItem";A9.classes=dw;const _9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,children:a,...l}=Ce("AccordionPanel",null,t),{value:c}=qee(),d=k9();return g.jsx(e9,{ref:e,...d.getStyles("panel",{className:r,classNames:n,style:s,styles:i}),...l,in:d.isItemActive(c),transitionDuration:d.transitionDuration??200,role:"region",id:d.getRegionId(c),"aria-labelledby":d.getControlId(c),children:g.jsx("div",{...d.getStyles("content",{classNames:n,styles:i}),children:a})})});_9.displayName="@mantine/core/AccordionPanel";_9.classes=dw;const hye={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},mye=(t,{transitionDuration:e,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":e===void 0?void 0:`${e}ms`,"--accordion-chevron-size":n===void 0?void 0:Ee(n),"--accordion-radius":r===void 0?void 0:ar(r)}});function Pi(t){const e=Ce("Accordion",hye,t),{classNames:n,className:r,style:s,styles:i,unstyled:o,vars:a,children:l,multiple:c,value:d,defaultValue:f,onChange:p,id:m,loop:v,transitionDuration:y,disableChevronRotation:x,chevronPosition:w,chevronSize:C,order:E,chevron:D,variant:T,radius:A,chevronIconSize:_,attributes:R,...N}=e,I=bi(m),[$,L]=gi({value:d,defaultValue:f,finalValue:c?[]:null,onChange:p}),z=H=>Array.isArray($)?$.includes(H):H===$,F=H=>{const B=Array.isArray($)?$.includes(H)?$.filter(V=>V!==H):[...$,H]:H===$?null:H;L(B)},q=bt({name:"Accordion",classes:dw,props:e,className:r,style:s,classNames:n,styles:i,unstyled:o,attributes:R,vars:a,varsResolver:mye});return g.jsx(fye,{value:{isItemActive:z,onChange:F,getControlId:Ak(`${I}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:Ak(`${I}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:D===null?null:D||g.jsx(rh,{size:_}),transitionDuration:y,disableChevronRotation:x,chevronPosition:w,order:E,loop:v,getStyles:q,variant:T,unstyled:o},children:g.jsx(le,{...q("root"),id:I,...N,variant:T,"data-accordion":!0,children:l})})}const gye=t=>t;Pi.extend=gye;Pi.withProps=zQ(Pi);Pi.classes=dw;Pi.displayName="@mantine/core/Accordion";Pi.Item=A9;Pi.Panel=_9;Pi.Control=T9;Pi.Chevron=rh;var Uee={root:"m_b6d8b162"};function vye(t){if(t==="start")return"start";if(t==="end"||t)return"end"}const yye={inherit:!1},bye=(t,{variant:e,lineClamp:n,gradient:r,size:s,color:i})=>({root:{"--text-fz":hs(s),"--text-lh":fQ(s),"--text-gradient":e==="gradient"?RI(r,t):void 0,"--text-line-clamp":typeof n=="number"?n.toString():void 0,"--text-color":i?Fr(i,t):void 0}}),He=xi((t,e)=>{const n=Ce("Text",yye,t),{lineClamp:r,truncate:s,inline:i,inherit:o,gradient:a,span:l,__staticSelector:c,vars:d,className:f,style:p,classNames:m,styles:v,unstyled:y,variant:x,mod:w,size:C,attributes:E,...D}=n,T=bt({name:["Text",c],props:n,classes:Uee,className:f,style:p,classNames:m,styles:v,unstyled:y,attributes:E,vars:d,varsResolver:bye});return g.jsx(le,{...T("root",{focusable:!0}),ref:e,component:l?"span":"p",variant:x,mod:[{"data-truncate":vye(s),"data-line-clamp":typeof r=="number","data-inline":i,"data-inherit":o},w],size:C,...D})});He.classes=Uee;He.displayName="@mantine/core/Text";var Vee={root:"m_849cf0da"};const xye={underline:"hover"},fw=xi((t,e)=>{const{underline:n,className:r,unstyled:s,mod:i,...o}=Ce("Anchor",xye,t);return g.jsx(He,{component:"a",ref:e,className:Ms({[Vee.root]:!s},r),...o,mod:[{underline:n},i],__staticSelector:"Anchor",unstyled:s})});fw.classes=Vee;fw.displayName="@mantine/core/Anchor";const[Sye,_1]=Ys("AppShell was not found in tree");var Sh={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const O9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,unstyled:o,vars:a,withBorder:l,zIndex:c,mod:d,...f}=Ce("AppShellAside",null,t),p=_1();return p.disabled?null:g.jsx(le,{component:"aside",ref:e,mod:[{"with-border":l??p.withBorder},d],...p.getStyles("aside",{className:Ms({[Ig.classNames.zeroRight]:p.offsetScrollbars},r),classNames:n,styles:i,style:s}),...f,__vars:{"--app-shell-aside-z-index":`calc(${c??p.zIndex} + 1)`}})});O9.classes=Sh;O9.displayName="@mantine/core/AppShellAside";const R9=Fe((t,e)=>{var m;const{classNames:n,className:r,style:s,styles:i,unstyled:o,vars:a,withBorder:l,zIndex:c,mod:d,...f}=Ce("AppShellFooter",null,t),p=_1();return p.disabled?null:g.jsx(le,{component:"footer",ref:e,mod:[{"with-border":l??p.withBorder},d],...p.getStyles("footer",{className:Ms({[Ig.classNames.zeroRight]:p.offsetScrollbars},r),classNames:n,styles:i,style:s}),...f,__vars:{"--app-shell-footer-z-index":(m=c??p.zIndex)==null?void 0:m.toString()}})});R9.classes=Sh;R9.displayName="@mantine/core/AppShellFooter";const N9=Fe((t,e)=>{var m;const{classNames:n,className:r,style:s,styles:i,unstyled:o,vars:a,withBorder:l,zIndex:c,mod:d,...f}=Ce("AppShellHeader",null,t),p=_1();return p.disabled?null:g.jsx(le,{component:"header",ref:e,mod:[{"with-border":l??p.withBorder},d],...p.getStyles("header",{className:Ms({[Ig.classNames.zeroRight]:p.offsetScrollbars},r),classNames:n,styles:i,style:s}),...f,__vars:{"--app-shell-header-z-index":(m=c??p.zIndex)==null?void 0:m.toString()}})});N9.classes=Sh;N9.displayName="@mantine/core/AppShellHeader";const j9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("AppShellMain",null,t),l=_1();return g.jsx(le,{component:"main",ref:e,...l.getStyles("main",{className:r,style:s,classNames:n,styles:i}),...a})});j9.classes=Sh;j9.displayName="@mantine/core/AppShellMain";function pw(t){return typeof t=="object"?t.base:t}function hw(t){const e=typeof t=="object"&&t!==null&&typeof t.base<"u"&&Object.keys(t).length===1;return typeof t=="number"||typeof t=="string"||e}function mw(t){return!(typeof t!="object"||t===null||Object.keys(t).length===1&&"base"in t)}function wye({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,aside:r,theme:s,mode:i}){var c,d,f;const o=r==null?void 0:r.width,a="translateX(var(--app-shell-aside-width))",l="translateX(calc(var(--app-shell-aside-width) * -1))";if(r!=null&&r.breakpoint&&!((c=r==null?void 0:r.collapsed)!=null&&c.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},i==="fixed"?(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="100%",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px"):(n[r==null?void 0:r.breakpoint]["--app-shell-aside-width"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-aside-offset"]="0px")),hw(o)){const p=Ee(pw(o));t["--app-shell-aside-width"]=p,t["--app-shell-aside-offset"]=p}if(mw(o)&&(typeof o.base<"u"&&(t["--app-shell-aside-width"]=Ee(o.base),t["--app-shell-aside-offset"]=Ee(o.base)),ir(o).forEach(p=>{p!=="base"&&(e[p]=e[p]||{},e[p]["--app-shell-aside-width"]=Ee(o[p]),e[p]["--app-shell-aside-offset"]=Ee(o[p]))})),r!=null&&r.breakpoint&&i==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-aside-position"]="sticky",e[r.breakpoint]["--app-shell-aside-grid-row"]="2",e[r.breakpoint]["--app-shell-aside-grid-column"]="3",e[r.breakpoint]["--app-shell-main-column-end"]="3"),(d=r==null?void 0:r.collapsed)!=null&&d.desktop){const p=r.breakpoint;e[p]=e[p]||{},e[p]["--app-shell-aside-transform"]=a,e[p]["--app-shell-aside-transform-rtl"]=l,i==="fixed"?e[p]["--app-shell-aside-offset"]="0px !important":(e[p]["--app-shell-aside-width"]="0px",e[p]["--app-shell-aside-display"]="none",e[p]["--app-shell-main-column-end"]="-1"),e[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if((f=r==null?void 0:r.collapsed)!=null&&f.mobile){const p=WP(r.breakpoint,s.breakpoints)-.1;n[p]=n[p]||{},i==="fixed"?(n[p]["--app-shell-aside-width"]="100%",n[p]["--app-shell-aside-offset"]="0px"):n[p]["--app-shell-aside-width"]="0px",n[p]["--app-shell-aside-transform"]=a,n[p]["--app-shell-aside-transform-rtl"]=l,n[p]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function Cye({baseStyles:t,minMediaStyles:e,footer:n,mode:r}){const s=n==null?void 0:n.height,i="translateY(var(--app-shell-footer-height))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-footer-position"]="sticky",t["--app-shell-footer-grid-column"]="1 / -1",t["--app-shell-footer-grid-row"]="3"),hw(s)){const a=Ee(pw(s));t["--app-shell-footer-height"]=a,o&&(t["--app-shell-footer-offset"]=a)}mw(s)&&(typeof s.base<"u"&&(t["--app-shell-footer-height"]=Ee(s.base),o&&(t["--app-shell-footer-offset"]=Ee(s.base))),ir(s).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-footer-height"]=Ee(s[a]),o&&(e[a]["--app-shell-footer-offset"]=Ee(s[a])))})),n!=null&&n.collapsed&&(t["--app-shell-footer-transform"]=i,r==="fixed"&&(t["--app-shell-footer-offset"]="0px !important"))}function Eye({baseStyles:t,minMediaStyles:e,header:n,mode:r}){const s=n==null?void 0:n.height,i="translateY(calc(var(--app-shell-header-height) * -1))",o=r==="static"?!0:(n==null?void 0:n.offset)??!0;if(r==="static"&&n&&(t["--app-shell-header-position"]="sticky",t["--app-shell-header-grid-column"]="1 / -1",t["--app-shell-header-grid-row"]="1"),hw(s)){const a=Ee(pw(s));t["--app-shell-header-height"]=a,o&&(t["--app-shell-header-offset"]=a)}mw(s)&&(typeof s.base<"u"&&(t["--app-shell-header-height"]=Ee(s.base),o&&(t["--app-shell-header-offset"]=Ee(s.base))),ir(s).forEach(a=>{a!=="base"&&(e[a]=e[a]||{},e[a]["--app-shell-header-height"]=Ee(s[a]),o&&(e[a]["--app-shell-header-offset"]=Ee(s[a])))})),n!=null&&n.collapsed&&(t["--app-shell-header-transform"]=i,r==="fixed"&&(t["--app-shell-header-offset"]="0px !important"))}function Mye({baseStyles:t,minMediaStyles:e,maxMediaStyles:n,navbar:r,theme:s,mode:i}){var c,d,f;const o=r==null?void 0:r.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",l="translateX(var(--app-shell-navbar-width))";if(r!=null&&r.breakpoint&&!((c=r==null?void 0:r.collapsed)!=null&&c.mobile)&&(n[r==null?void 0:r.breakpoint]=n[r==null?void 0:r.breakpoint]||{},n[r==null?void 0:r.breakpoint]["--app-shell-navbar-offset"]="0px",n[r==null?void 0:r.breakpoint]["--app-shell-navbar-width"]="100%",i==="static"&&(n[r==null?void 0:r.breakpoint]["--app-shell-navbar-grid-width"]="0px")),hw(o)){const p=Ee(pw(o));t["--app-shell-navbar-width"]=p,t["--app-shell-navbar-offset"]=p,i==="static"&&(t["--app-shell-navbar-grid-width"]=p)}if(mw(o)&&(typeof o.base<"u"&&(t["--app-shell-navbar-width"]=Ee(o.base),t["--app-shell-navbar-offset"]=Ee(o.base),i==="static"&&(t["--app-shell-navbar-grid-width"]=Ee(o.base))),ir(o).forEach(p=>{p!=="base"&&(e[p]=e[p]||{},e[p]["--app-shell-navbar-width"]=Ee(o[p]),e[p]["--app-shell-navbar-offset"]=Ee(o[p]),i==="static"&&(e[p]["--app-shell-navbar-grid-width"]=Ee(o[p])))})),r!=null&&r.breakpoint&&i==="static"&&(e[r.breakpoint]=e[r.breakpoint]||{},e[r.breakpoint]["--app-shell-navbar-position"]="sticky",e[r.breakpoint]["--app-shell-navbar-grid-row"]="2",e[r.breakpoint]["--app-shell-navbar-grid-column"]="1",e[r.breakpoint]["--app-shell-main-column-start"]="2"),(d=r==null?void 0:r.collapsed)!=null&&d.desktop){const p=r.breakpoint;e[p]=e[p]||{},e[p]["--app-shell-navbar-transform"]=a,e[p]["--app-shell-navbar-transform-rtl"]=l,i==="fixed"?e[p]["--app-shell-navbar-offset"]="0px !important":(e[p]["--app-shell-navbar-width"]="0px",e[p]["--app-shell-navbar-display"]="none",e[p]["--app-shell-main-column-start"]="1")}if((f=r==null?void 0:r.collapsed)!=null&&f.mobile){const p=WP(r.breakpoint,s.breakpoints)-.1;n[p]=n[p]||{},n[p]["--app-shell-navbar-width"]="100%",n[p]["--app-shell-navbar-offset"]="0px",i==="static"&&(n[p]["--app-shell-navbar-grid-width"]="0px"),n[p]["--app-shell-navbar-transform"]=a,n[p]["--app-shell-navbar-transform-rtl"]=l}}function zR(t){return Number(t)===0?"0px":Er(t)}function Dye({padding:t,baseStyles:e,minMediaStyles:n}){hw(t)&&(e["--app-shell-padding"]=zR(pw(t))),mw(t)&&(t.base&&(e["--app-shell-padding"]=zR(t.base)),ir(t).forEach(r=>{r!=="base"&&(n[r]=n[r]||{},n[r]["--app-shell-padding"]=zR(t[r]))}))}function kye({navbar:t,header:e,footer:n,aside:r,padding:s,theme:i,mode:o}){const a={},l={},c={};o==="static"&&(c["--app-shell-main-grid-column"]="1 / -1",c["--app-shell-main-grid-row"]="2"),Mye({baseStyles:c,minMediaStyles:a,maxMediaStyles:l,navbar:t,theme:i,mode:o}),wye({baseStyles:c,minMediaStyles:a,maxMediaStyles:l,aside:r,theme:i,mode:o}),Eye({baseStyles:c,minMediaStyles:a,header:e,mode:o}),Cye({baseStyles:c,minMediaStyles:a,footer:n,mode:o}),Dye({baseStyles:c,minMediaStyles:a,padding:s});const d=Wy(ir(a),i.breakpoints).map(m=>({query:`(min-width: ${Tk(m.px)})`,styles:a[m.value]})),f=Wy(ir(l),i.breakpoints).map(m=>({query:`(max-width: ${Tk(m.px)})`,styles:l[m.value]})),p=[...d,...f];return{baseStyles:c,media:p}}function Tye({navbar:t,header:e,aside:n,footer:r,padding:s,mode:i,selector:o}){const a=Dr(),l=Xd(),{media:c,baseStyles:d}=kye({navbar:t,header:e,footer:r,aside:n,padding:s,theme:a,mode:i});return g.jsx(ef,{media:c,styles:d,selector:o||l.cssVariablesSelector})}const I9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,unstyled:o,vars:a,withBorder:l,zIndex:c,mod:d,...f}=Ce("AppShellNavbar",null,t),p=_1();return p.disabled?null:g.jsx(le,{component:"nav",ref:e,mod:[{"with-border":l??p.withBorder},d],...p.getStyles("navbar",{className:r,classNames:n,styles:i,style:s}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${c??p.zIndex} + 1)`}})});I9.classes=Sh;I9.displayName="@mantine/core/AppShellNavbar";const L9=xi((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,grow:a,mod:l,...c}=Ce("AppShellSection",null,t),d=_1();return g.jsx(le,{ref:e,mod:[{grow:a},l],...d.getStyles("section",{className:r,style:s,classNames:n,styles:i}),...c})});L9.classes=Sh;L9.displayName="@mantine/core/AppShellSection";function Aye({transitionDuration:t,disabled:e}){const[n,r]=O.useState(!0),s=O.useRef(-1),i=O.useRef(-1);return cS("resize",()=>{r(!0),clearTimeout(s.current),s.current=window.setTimeout(()=>O.startTransition(()=>{r(!1)}),200)}),bh(()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>O.startTransition(()=>{r(!1)}),t||0)},[e,t]),n}const _ye={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:yi("app"),mode:"fixed"},Oye=(t,{transitionDuration:e,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${e}ms`,"--app-shell-transition-timing-function":n}}),ei=Fe((t,e)=>{const n=Ce("AppShell",_ye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,navbar:c,withBorder:d,padding:f,transitionDuration:p,transitionTimingFunction:m,header:v,zIndex:y,layout:x,disabled:w,aside:C,footer:E,offsetScrollbars:D=!0,mode:T,mod:A,attributes:_,id:R,...N}=n,I=bt({name:"AppShell",classes:Sh,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:_,vars:l,varsResolver:Oye}),$=Aye({disabled:w,transitionDuration:p}),L=bi(R);return g.jsxs(Sye,{value:{getStyles:I,withBorder:d,zIndex:y,disabled:w,offsetScrollbars:D,mode:T},children:[g.jsx(Tye,{navbar:c,header:v,aside:C,footer:E,padding:f,mode:T,selector:T==="static"?`#${L}`:void 0}),g.jsx(le,{ref:e,...I("root"),mod:[{resizing:$,layout:x,disabled:w,mode:T},A],id:L,...N})]})});ei.classes=Sh;ei.displayName="@mantine/core/AppShell";ei.Navbar=I9;ei.Header=N9;ei.Main=j9;ei.Aside=O9;ei.Footer=R9;ei.Section=L9;function Wee(t){return typeof t=="string"?{value:t,label:t}:"value"in t&&!("label"in t)?{value:t.value,label:t.value,disabled:t.disabled}:typeof t=="number"?{value:t.toString(),label:t.toString()}:"group"in t?{group:t.group,items:t.items.map(e=>Wee(e))}:t}function Rye(t){return t?t.map(e=>Wee(e)):[]}function Yee(t){return t.reduce((e,n)=>"group"in n?{...e,...Yee(n.items)}:(e[n.value]=n,e),{})}var Fo={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const Nye={error:null},jye=(t,{size:e,color:n})=>({chevron:{"--combobox-chevron-size":Qt(e,"combobox-chevron-size"),"--combobox-chevron-color":n?Fr(n,t):void 0}}),P9=Fe((t,e)=>{const n=Ce("ComboboxChevron",Nye,t),{size:r,error:s,style:i,className:o,classNames:a,styles:l,unstyled:c,vars:d,mod:f,...p}=n,m=bt({name:"ComboboxChevron",classes:Fo,props:n,style:i,className:o,classNames:a,styles:l,unstyled:c,vars:d,varsResolver:jye,rootSelector:"chevron"});return g.jsx(le,{component:"svg",...p,...m("chevron"),size:r,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:s},f],ref:e,children:g.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});P9.classes=Fo;P9.displayName="@mantine/core/ComboboxChevron";const[Iye,Nl]=Ys("Combobox component was not found in tree"),Gee=O.forwardRef(({size:t,onMouseDown:e,onClick:n,onClear:r,...s},i)=>g.jsx(Pn.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...s,onMouseDown:o=>{o.preventDefault(),e==null||e(o)},onClick:o=>{r(),n==null||n(o)}}));Gee.displayName="@mantine/core/ComboboxClearButton";const $9=Fe((t,e)=>{const{classNames:n,styles:r,className:s,style:i,hidden:o,...a}=Ce("ComboboxDropdown",null,t),l=Nl();return g.jsx(Mn.Dropdown,{...a,ref:e,role:"presentation","data-hidden":o||void 0,...l.getStyles("dropdown",{className:s,style:i,classNames:n,styles:r})})});$9.classes=Fo;$9.displayName="@mantine/core/ComboboxDropdown";const Lye={refProp:"ref"},Kee=Fe((t,e)=>{const{children:n,refProp:r}=Ce("ComboboxDropdownTarget",Lye,t);if(Nl(),!TA(n))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return g.jsx(Mn.Target,{ref:e,refProp:r,children:n})});Kee.displayName="@mantine/core/ComboboxDropdownTarget";const z9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("ComboboxEmpty",null,t),l=Nl();return g.jsx(le,{ref:e,...l.getStyles("empty",{className:r,classNames:n,styles:i,style:s}),...a})});z9.classes=Fo;z9.displayName="@mantine/core/ComboboxEmpty";function F9({onKeyDown:t,withKeyboardNavigation:e,withAriaAttributes:n,withExpandedAttribute:r,targetType:s,autoComplete:i}){const o=Nl(),[a,l]=O.useState(null),c=f=>{if(t==null||t(f),!o.readOnly&&e){if(f.nativeEvent.isComposing)return;if(f.nativeEvent.code==="ArrowDown"&&(f.preventDefault(),o.store.dropdownOpened?l(o.store.selectNextOption()):(o.store.openDropdown("keyboard"),l(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="ArrowUp"&&(f.preventDefault(),o.store.dropdownOpened?l(o.store.selectPreviousOption()):(o.store.openDropdown("keyboard"),l(o.store.selectActiveOption()),o.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),f.nativeEvent.code==="Enter"||f.nativeEvent.code==="NumpadEnter"){if(f.nativeEvent.keyCode===229)return;const p=o.store.getSelectedOptionIndex();o.store.dropdownOpened&&p!==-1?(f.preventDefault(),o.store.clickSelectedOption()):s==="button"&&(f.preventDefault(),o.store.openDropdown("keyboard"))}f.key==="Escape"&&o.store.closeDropdown("keyboard"),f.nativeEvent.code==="Space"&&s==="button"&&(f.preventDefault(),o.store.toggleDropdown("keyboard"))}};return{...n?{"aria-haspopup":"listbox","aria-expanded":r?!!(o.store.listId&&o.store.dropdownOpened):void 0,"aria-controls":o.store.dropdownOpened&&o.store.listId?o.store.listId:void 0,"aria-activedescendant":o.store.dropdownOpened&&a||void 0,autoComplete:i,"data-expanded":o.store.dropdownOpened||void 0,"data-mantine-stop-propagation":o.store.dropdownOpened||void 0}:{},onKeyDown:c}}const Pye={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},Zee=Fe((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:s,withAriaAttributes:i,withExpandedAttribute:o,targetType:a,autoComplete:l,...c}=Ce("ComboboxEventsTarget",Pye,t),d=xh(n);if(!d)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=Nl(),p=F9({targetType:a,withAriaAttributes:i,withKeyboardNavigation:s,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,autoComplete:l});return O.cloneElement(d,{...p,...c,[r]:Ds(e,f.store.targetRef,NA(d))})});Zee.displayName="@mantine/core/ComboboxEventsTarget";const B9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("ComboboxFooter",null,t),l=Nl();return g.jsx(le,{ref:e,...l.getStyles("footer",{className:r,classNames:n,style:s,styles:i}),...a,onMouseDown:c=>{c.preventDefault()}})});B9.classes=Fo;B9.displayName="@mantine/core/ComboboxFooter";const H9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,children:a,label:l,id:c,...d}=Ce("ComboboxGroup",null,t),f=Nl(),p=bi(c);return g.jsxs(le,{ref:e,role:"group","aria-labelledby":l?p:void 0,...f.getStyles("group",{className:r,classNames:n,style:s,styles:i}),...d,children:[l&&g.jsx("div",{id:p,...f.getStyles("groupLabel",{classNames:n,styles:i}),children:l}),a]})});H9.classes=Fo;H9.displayName="@mantine/core/ComboboxGroup";const q9=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("ComboboxHeader",null,t),l=Nl();return g.jsx(le,{ref:e,...l.getStyles("header",{className:r,classNames:n,style:s,styles:i}),...a,onMouseDown:c=>{c.preventDefault()}})});q9.classes=Fo;q9.displayName="@mantine/core/ComboboxHeader";function Jee({value:t,valuesDivider:e=",",...n}){return g.jsx("input",{type:"hidden",value:Array.isArray(t)?t.join(e):t||"",...n})}Jee.displayName="@mantine/core/ComboboxHiddenInput";const U9=Fe((t,e)=>{const n=Ce("ComboboxOption",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,onClick:l,id:c,active:d,onMouseDown:f,onMouseOver:p,disabled:m,selected:v,mod:y,...x}=n,w=Nl(),C=O.useId(),E=c||C;return g.jsx(le,{...w.getStyles("option",{className:s,classNames:r,styles:o,style:i}),...x,ref:e,id:E,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":m,"combobox-selected":v},y],role:"option",onClick:D=>{var T;m?D.preventDefault():((T=w.onOptionSubmit)==null||T.call(w,n.value,n),l==null||l(D))},onMouseDown:D=>{D.preventDefault(),f==null||f(D)},onMouseOver:D=>{w.resetSelectionOnOptionHover&&w.store.resetSelectedOption(),p==null||p(D)}})});U9.classes=Fo;U9.displayName="@mantine/core/ComboboxOption";const V9=Fe((t,e)=>{const n=Ce("ComboboxOptions",null,t),{classNames:r,className:s,style:i,styles:o,id:a,onMouseDown:l,labelledBy:c,...d}=n,f=Nl(),p=bi(a);return O.useEffect(()=>{f.store.setListId(p)},[p]),g.jsx(le,{ref:e,...f.getStyles("options",{className:s,style:i,classNames:r,styles:o}),...d,id:p,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l==null||l(m)}})});V9.classes=Fo;V9.displayName="@mantine/core/ComboboxOptions";const $ye={withAriaAttributes:!0,withKeyboardNavigation:!0},W9=Fe((t,e)=>{const n=Ce("ComboboxSearch",$ye,t),{classNames:r,styles:s,unstyled:i,vars:o,withAriaAttributes:a,onKeyDown:l,withKeyboardNavigation:c,size:d,...f}=n,p=Nl(),m=p.getStyles("search"),v=F9({targetType:"input",withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return g.jsx(Pn,{ref:Ds(e,p.store.searchRef),classNames:[{input:m.className},r],styles:[{input:m.style},s],size:d||p.size,...v,...f,__staticSelector:"Combobox"})});W9.classes=Fo;W9.displayName="@mantine/core/ComboboxSearch";const zye={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},Xee=Fe((t,e)=>{const{children:n,refProp:r,withKeyboardNavigation:s,withAriaAttributes:i,withExpandedAttribute:o,targetType:a,autoComplete:l,...c}=Ce("ComboboxTarget",zye,t),d=xh(n);if(!d)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const f=Nl(),p=F9({targetType:a,withAriaAttributes:i,withKeyboardNavigation:s,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,autoComplete:l}),m=O.cloneElement(d,{...p,...c});return g.jsx(Mn.Target,{ref:Ds(e,f.store.targetRef),children:m})});Xee.displayName="@mantine/core/ComboboxTarget";function Fye(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function Bye(t,e,n){for(let r=t+1;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r;if(n){for(let r=0;r<e.length;r+=1)if(!e[r].hasAttribute("data-combobox-disabled"))return r}return t}function Hye(t){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute("data-combobox-disabled"))return e;return-1}function Qee({defaultOpened:t,opened:e,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:s,loop:i=!0,scrollBehavior:o="instant"}={}){const[a,l]=gi({value:e,defaultValue:t,finalValue:!1,onChange:n}),c=O.useRef(null),d=O.useRef(-1),f=O.useRef(null),p=O.useRef(null),m=O.useRef(-1),v=O.useRef(-1),y=O.useRef(-1),x=O.useCallback((H="unknown")=>{a||(l(!0),s==null||s(H))},[l,s,a]),w=O.useCallback((H="unknown")=>{a&&(l(!1),r==null||r(H))},[l,r,a]),C=O.useCallback((H="unknown")=>{a?w(H):x(H)},[w,x,a]),E=O.useCallback(()=>{const H=ap(p.current),B=RD(`#${c.current} [data-combobox-selected]`,H);B==null||B.removeAttribute("data-combobox-selected"),B==null||B.removeAttribute("aria-selected")},[]),D=O.useCallback(H=>{const B=ap(p.current),V=RD(`#${c.current}`,B),Y=V?vp("[data-combobox-option]",V):null;if(!Y)return null;const G=H>=Y.length?0:H<0?Y.length-1:H;return d.current=G,Y!=null&&Y[G]&&!Y[G].hasAttribute("data-combobox-disabled")?(E(),Y[G].setAttribute("data-combobox-selected","true"),Y[G].setAttribute("aria-selected","true"),Y[G].scrollIntoView({block:"nearest",behavior:o}),Y[G].id):null},[o,E]),T=O.useCallback(()=>{const H=ap(p.current),B=RD(`#${c.current} [data-combobox-active]`,H);if(B){const Y=vp(`#${c.current} [data-combobox-option]`,H).findIndex(G=>G===B);return D(Y)}return D(0)},[D]),A=O.useCallback(()=>{const H=ap(p.current),B=vp(`#${c.current} [data-combobox-option]`,H);return D(Bye(d.current,B,i))},[D,i]),_=O.useCallback(()=>{const H=ap(p.current),B=vp(`#${c.current} [data-combobox-option]`,H);return D(Fye(d.current,B,i))},[D,i]),R=O.useCallback(()=>{const H=ap(p.current),B=vp(`#${c.current} [data-combobox-option]`,H);return D(Hye(B))},[D]),N=O.useCallback((H="selected",B)=>{y.current=window.setTimeout(()=>{var W;const V=ap(p.current),Y=vp(`#${c.current} [data-combobox-option]`,V),G=Y.findIndex(Z=>Z.hasAttribute(`data-combobox-${H}`));d.current=G,B!=null&&B.scrollIntoView&&((W=Y[G])==null||W.scrollIntoView({block:"nearest",behavior:o}))},0)},[]),I=O.useCallback(()=>{d.current=-1,E()},[E]),$=O.useCallback(()=>{const H=ap(p.current),B=vp(`#${c.current} [data-combobox-option]`,H),V=B==null?void 0:B[d.current];V==null||V.click()},[]),L=O.useCallback(H=>{c.current=H},[]),z=O.useCallback(()=>{m.current=window.setTimeout(()=>{var H;return(H=f.current)==null?void 0:H.focus()},0)},[]),F=O.useCallback(()=>{v.current=window.setTimeout(()=>{var H;return(H=p.current)==null?void 0:H.focus()},0)},[]),q=O.useCallback(()=>d.current,[]);return O.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(v.current),window.clearTimeout(y.current)},[]),{dropdownOpened:a,openDropdown:x,closeDropdown:w,toggleDropdown:C,selectedOptionIndex:d.current,getSelectedOptionIndex:q,selectOption:D,selectFirstOption:R,selectActiveOption:T,selectNextOption:A,selectPreviousOption:_,resetSelectedOption:I,updateSelectedOptionIndex:N,listId:c.current,setListId:L,clickSelectedOption:$,searchRef:f,focusSearchInput:z,targetRef:p,focusTarget:F}}const qye={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},Uye=(t,{size:e,dropdownPadding:n})=>({options:{"--combobox-option-fz":hs(e),"--combobox-option-padding":Qt(e,"combobox-option-padding")},dropdown:{"--combobox-padding":n===void 0?void 0:Ee(n),"--combobox-option-fz":hs(e),"--combobox-option-padding":Qt(e,"combobox-option-padding")}});function Cr(t){const e=Ce("Combobox",qye,t),{classNames:n,styles:r,unstyled:s,children:i,store:o,vars:a,onOptionSubmit:l,onClose:c,size:d,dropdownPadding:f,resetSelectionOnOptionHover:p,__staticSelector:m,readOnly:v,attributes:y,...x}=e,w=Qee(),C=o||w,E=bt({name:m||"Combobox",classes:Fo,props:e,classNames:n,styles:r,unstyled:s,attributes:y,vars:a,varsResolver:Uye}),D=()=>{c==null||c(),C.closeDropdown()};return g.jsx(Iye,{value:{getStyles:E,store:C,onOptionSubmit:l,size:d,resetSelectionOnOptionHover:p,readOnly:v},children:g.jsx(Mn,{opened:C.dropdownOpened,preventPositionChangeWhenVisible:!1,...x,onChange:T=>!T&&D(),withRoles:!1,unstyled:s,children:i})})}const Vye=t=>t;Cr.extend=Vye;Cr.classes=Fo;Cr.displayName="@mantine/core/Combobox";Cr.Target=Xee;Cr.Dropdown=$9;Cr.Options=V9;Cr.Option=U9;Cr.Search=W9;Cr.Empty=z9;Cr.Chevron=P9;Cr.Footer=B9;Cr.Header=q9;Cr.EventsTarget=Zee;Cr.DropdownTarget=Kee;Cr.Group=H9;Cr.ClearButton=Gee;Cr.HiddenInput=Jee;var ete={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const tte=ete,KA=O.forwardRef(({__staticSelector:t,__stylesApiProps:e,className:n,classNames:r,styles:s,unstyled:i,children:o,label:a,description:l,id:c,disabled:d,error:f,size:p,labelPosition:m="left",bodyElement:v="div",labelElement:y="label",variant:x,style:w,vars:C,mod:E,attributes:D,...T},A)=>{const _=bt({name:t,props:e,className:n,style:w,classes:ete,classNames:r,styles:s,unstyled:i,attributes:D});return g.jsx(le,{..._("root"),ref:A,__vars:{"--label-fz":hs(p),"--label-lh":Qt(p,"label-lh")},mod:[{"label-position":m},E],variant:x,size:p,...T,children:g.jsxs(le,{component:v,htmlFor:v==="label"?c:void 0,..._("body"),children:[o,g.jsxs("div",{..._("labelWrapper"),"data-disabled":d||void 0,children:[a&&g.jsx(le,{component:y,htmlFor:y==="label"?c:void 0,..._("label"),"data-disabled":d||void 0,children:a}),l&&g.jsx(Pn.Description,{size:p,__inheritStyles:!1,..._("description"),children:l}),f&&typeof f!="boolean"&&g.jsx(Pn.Error,{size:p,__inheritStyles:!1,..._("error"),children:f})]})]})})});KA.displayName="@mantine/core/InlineInput";var nte={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const rte=O.createContext(null),Wye=rte.Provider,ste=()=>O.useContext(rte),[Yye,Gye]=Jd();var ite={card:"m_26775b0a"};const Kye={withBorder:!0},Zye=(t,{radius:e})=>({card:{"--card-radius":ar(e)}}),Y9=Fe((t,e)=>{const n=Ce("CheckboxCard",Kye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,checked:c,mod:d,withBorder:f,value:p,onClick:m,defaultChecked:v,onChange:y,attributes:x,...w}=n,C=bt({name:"CheckboxCard",classes:ite,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l,varsResolver:Zye,rootSelector:"card"}),E=ste(),D=typeof c=="boolean"?c:E?E.value.includes(p||""):void 0,[T,A]=gi({value:D,defaultValue:v,finalValue:!1,onChange:y});return g.jsx(Yye,{value:{checked:T},children:g.jsx(or,{ref:e,mod:[{"with-border":f,checked:T},d],...C("card"),...w,role:"checkbox","aria-checked":T,onClick:_=>{m==null||m(_),E==null||E.onChange(p||""),A(!T)}})})});Y9.displayName="@mantine/core/CheckboxCard";Y9.classes=ite;function G9({children:t,role:e}){const n=uw();return n?g.jsx("div",{role:e,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:t}):g.jsx(g.Fragment,{children:t})}const K9=Fe((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:i,wrapperProps:o,children:a,readOnly:l,disabled:c,...d}=Ce("CheckboxGroup",null,t),[f,p]=gi({value:n,defaultValue:r,finalValue:[],onChange:s}),m=v=>{const y=typeof v=="string"?v:v.currentTarget.value;!l&&p(f.includes(y)?f.filter(x=>x!==y):[...f,y])};return g.jsx(Wye,{value:{value:f,onChange:m,size:i,disabled:c},children:g.jsx(Pn.Wrapper,{size:i,ref:e,...o,...d,labelElement:"div",__staticSelector:"CheckboxGroup",children:g.jsx(G9,{role:"group",children:a})})})});K9.classes=Pn.Wrapper.classes;K9.displayName="@mantine/core/CheckboxGroup";function gw({size:t,style:e,...n}){const r=t!==void 0?{width:Ee(t),height:Ee(t),...e}:e;return g.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:r,"aria-hidden":!0,...n,children:g.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function ote({indeterminate:t,...e}){return t?g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...e,children:g.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):g.jsx(gw,{...e})}var ate={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const Jye={icon:ote,variant:"filled"},Xye=(t,{radius:e,color:n,size:r,iconColor:s,variant:i,autoContrast:o})=>{const a=Mc({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--checkbox-size":Qt(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:ar(e),"--checkbox-color":i==="outline"?l:Fr(n,t),"--checkbox-icon-color":s?Fr(s,t):iv(o,t)?Qd({color:n,theme:t,autoContrast:o}):void 0}}},Z9=Fe((t,e)=>{const n=Ce("CheckboxIndicator",Jye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,icon:c,indeterminate:d,radius:f,color:p,iconColor:m,autoContrast:v,checked:y,mod:x,variant:w,disabled:C,attributes:E,...D}=n,T=bt({name:"CheckboxIndicator",classes:ate,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:E,vars:l,varsResolver:Xye,rootSelector:"indicator"}),A=Gye(),_=typeof y=="boolean"||typeof d=="boolean"?y||d:(A==null?void 0:A.checked)||!1;return g.jsx(le,{ref:e,...T("indicator",{variant:w}),variant:w,mod:[{checked:_,disabled:C},x],...D,children:g.jsx(c,{indeterminate:d,...T("icon")})})});Z9.displayName="@mantine/core/CheckboxIndicator";Z9.classes=ate;const Qye={labelPosition:"right",icon:ote,variant:"filled"},e1e=(t,{radius:e,color:n,size:r,iconColor:s,variant:i,autoContrast:o})=>{const a=Mc({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--checkbox-size":Qt(r,"checkbox-size"),"--checkbox-radius":e===void 0?void 0:ar(e),"--checkbox-color":i==="outline"?l:Fr(n,t),"--checkbox-icon-color":s?Fr(s,t):iv(o,t)?Qd({color:n,theme:t,autoContrast:o}):void 0}}},nf=Fe((t,e)=>{const n=Ce("Checkbox",Qye,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,color:c,label:d,id:f,size:p,radius:m,wrapperProps:v,checked:y,labelPosition:x,description:w,error:C,disabled:E,variant:D,indeterminate:T,icon:A,rootRef:_,iconColor:R,onChange:N,autoContrast:I,mod:$,attributes:L,...z}=n,F=ste(),q=p||(F==null?void 0:F.size),H=bt({name:"Checkbox",props:n,classes:nte,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:L,vars:l,varsResolver:e1e}),{styleProps:B,rest:V}=C1(z),Y=bi(f),G={checked:(F==null?void 0:F.value.includes(V.value))??y,onChange:Q=>{F==null||F.onChange(Q),N==null||N(Q)},disabled:(F==null?void 0:F.disabled)??E},W=O.useRef(null),Z=e||W;return O.useEffect(()=>{Z&&"current"in Z&&Z.current&&(Z.current.indeterminate=T||!1,T?Z.current.setAttribute("data-indeterminate","true"):Z.current.removeAttribute("data-indeterminate"))},[T,Z]),g.jsx(KA,{...H("root"),__staticSelector:"Checkbox",__stylesApiProps:n,id:Y,size:q,labelPosition:x,label:d,description:w,error:C,disabled:G.disabled,classNames:r,styles:o,unstyled:a,"data-checked":G.checked||y||void 0,variant:D,ref:_,mod:$,...B,...v,children:g.jsxs(le,{...H("inner"),mod:{"data-label-position":x},children:[g.jsx(le,{component:"input",id:Y,ref:Z,mod:{error:!!C},...H("input",{focusable:!0,variant:D}),...V,...G,type:"checkbox"}),g.jsx(A,{indeterminate:T,...H("icon")})]})})});nf.classes={...nte,...tte};nf.displayName="@mantine/core/Checkbox";nf.Group=K9;nf.Indicator=Z9;nf.Card=Y9;function hS(t){return"group"in t}function lte({options:t,search:e,limit:n}){const r=e.trim().toLowerCase(),s=[];for(let i=0;i<t.length;i+=1){const o=t[i];if(s.length===n)return s;hS(o)&&s.push({group:o.group,items:lte({options:o.items,search:e,limit:n-s.length})}),hS(o)||o.label.toLowerCase().includes(r)&&s.push(o)}return s}function t1e(t){if(t.length===0)return!0;for(const e of t)if(!("group"in e)||e.items.length>0)return!1;return!0}function cte(t,e=new Set){if(Array.isArray(t))for(const n of t)if(hS(n))cte(n.items,e);else{if(typeof n.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof n.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof n.value}`);if(e.has(n.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);e.add(n.value)}}function n1e(t,e){return Array.isArray(t)?t.includes(e):t===e}function ute({data:t,withCheckIcon:e,withAlignedLabels:n,value:r,checkIconPosition:s,unstyled:i,renderOption:o}){if(!hS(t)){const l=n1e(r,t.value),c=e&&(l?g.jsx(gw,{className:Fo.optionsDropdownCheckIcon}):n?g.jsx("div",{className:Fo.optionsDropdownCheckPlaceholder}):null),d=g.jsxs(g.Fragment,{children:[s==="left"&&c,g.jsx("span",{children:t.label}),s==="right"&&c]});return g.jsx(Cr.Option,{value:t.value,disabled:t.disabled,className:Ms({[Fo.optionsDropdownOption]:!i}),"data-reverse":s==="right"||void 0,"data-checked":l||void 0,"aria-selected":l,active:l,children:typeof o=="function"?o({option:t,checked:l}):d})}const a=t.items.map(l=>g.jsx(ute,{data:l,value:r,unstyled:i,withCheckIcon:e,withAlignedLabels:n,checkIconPosition:s,renderOption:o},l.value));return g.jsx(Cr.Group,{label:t.group,children:a})}function r1e({data:t,hidden:e,hiddenWhenEmpty:n,filter:r,search:s,limit:i,maxDropdownHeight:o,withScrollArea:a=!0,filterOptions:l=!0,withCheckIcon:c=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:v,labelId:y,renderOption:x,scrollAreaProps:w,"aria-label":C}){cte(t);const D=typeof s=="string"?(r||lte)({options:t,search:l?s:"",limit:i??1/0}):t,T=t1e(D),A=D.map(_=>g.jsx(ute,{data:_,withCheckIcon:c,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:v,renderOption:x},hS(_)?_.group:_.value));return g.jsx(Cr.Dropdown,{hidden:e||n&&T,"data-composed":!0,children:g.jsxs(Cr.Options,{labelledBy:y,"aria-label":C,children:[a?g.jsx(Qs.Autosize,{mah:o??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...w,children:A}):A,T&&m&&g.jsx(Cr.Empty,{children:m})]})})}var ZA={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};const dte=O.createContext(null),s1e=dte.Provider;function i1e(){return{withinGroup:!!O.useContext(dte)}}const o1e=(t,{spacing:e})=>({group:{"--ag-spacing":Er(e)}}),J9=Fe((t,e)=>{const n=Ce("AvatarGroup",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,spacing:c,attributes:d,...f}=n,p=bt({name:"AvatarGroup",classes:ZA,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:d,vars:l,varsResolver:o1e,rootSelector:"group"});return g.jsx(s1e,{value:!0,children:g.jsx(le,{ref:e,...p("group"),...f})})});J9.classes=ZA;J9.displayName="@mantine/core/AvatarGroup";function a1e(t){return g.jsx("svg",{...t,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function l1e(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e|=0}return e}const c1e=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function u1e(t,e=c1e){const n=l1e(t),r=Math.abs(n)%e.length;return e[r]}function d1e(t,e=2){const n=t.split(" ");return n.length===1?t.slice(0,e).toUpperCase():n.map(r=>r[0]).slice(0,e).join("").toUpperCase()}const f1e=(t,{size:e,radius:n,variant:r,gradient:s,color:i,autoContrast:o,name:a,allowedInitialsColors:l})=>{const c=i==="initials"&&typeof a=="string"?u1e(a,l):i,d=t.variantColorResolver({color:c||"gray",theme:t,gradient:s,variant:r||"light",autoContrast:o});return{root:{"--avatar-size":Qt(e,"avatar-size"),"--avatar-radius":n===void 0?void 0:ar(n),"--avatar-bg":c||r?d.background:void 0,"--avatar-color":c||r?d.color:void 0,"--avatar-bd":c||r?d.border:void 0}}},O1=xi((t,e)=>{const n=Ce("Avatar",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,src:c,alt:d,radius:f,color:p,gradient:m,imageProps:v,children:y,autoContrast:x,mod:w,name:C,allowedInitialsColors:E,attributes:D,...T}=n,A=i1e(),[_,R]=O.useState(!c),N=bt({name:"Avatar",props:n,classes:ZA,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:D,vars:l,varsResolver:f1e});return O.useEffect(()=>R(!c),[c]),g.jsx(le,{...N("root"),mod:[{"within-group":A.withinGroup},w],ref:e,...T,children:_||!c?g.jsx("span",{...N("placeholder"),title:d,children:y||typeof C=="string"&&d1e(C)||g.jsx(a1e,{})}):g.jsx("img",{...v,...N("image"),src:c,alt:d,onError:I=>{var $;R(!0),($=v==null?void 0:v.onError)==null||$.call(v,I)}})})});O1.classes=ZA;O1.displayName="@mantine/core/Avatar";O1.Group=J9;var fte={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const p1e=(t,{color:e,size:n,lineSize:r,transitionDuration:s,transitionTimingFunction:i})=>({root:{"--burger-color":e?Fr(e,t):void 0,"--burger-size":Qt(n,"burger-size"),"--burger-line-size":r?Ee(r):void 0,"--burger-transition-duration":s===void 0?void 0:`${s}ms`,"--burger-transition-timing-function":i}}),X9=Fe((t,e)=>{const n=Ce("Burger",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,opened:c,children:d,transitionDuration:f,transitionTimingFunction:p,lineSize:m,attributes:v,...y}=n,x=bt({name:"Burger",classes:fte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:l,varsResolver:p1e});return g.jsxs(or,{...x("root"),ref:e,...y,children:[g.jsx(le,{mod:["reduce-motion",{opened:c}],...x("burger")}),d]})});X9.classes=fte;X9.displayName="@mantine/core/Burger";var R1={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};const SB={orientation:"horizontal"},h1e=(t,{borderWidth:e})=>({group:{"--button-border-width":Ee(e)}}),Q9=Fe((t,e)=>{const n=Ce("ButtonGroup",SB,t),{className:r,style:s,classNames:i,styles:o,unstyled:a,orientation:l,vars:c,borderWidth:d,variant:f,mod:p,attributes:m,...v}=Ce("ButtonGroup",SB,t),y=bt({name:"ButtonGroup",props:n,classes:R1,className:r,style:s,classNames:i,styles:o,unstyled:a,attributes:m,vars:c,varsResolver:h1e,rootSelector:"group"});return g.jsx(le,{...y("group"),ref:e,variant:f,mod:[{"data-orientation":l},p],role:"group",...v})});Q9.classes=R1;Q9.displayName="@mantine/core/ButtonGroup";const m1e=(t,{radius:e,color:n,gradient:r,variant:s,autoContrast:i,size:o})=>{const a=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:i});return{groupSection:{"--section-height":Qt(o,"section-height"),"--section-padding-x":Qt(o,"section-padding-x"),"--section-fz":o!=null&&o.includes("compact")?hs(o.replace("compact-","")):hs(o),"--section-radius":e===void 0?void 0:ar(e),"--section-bg":n||s?a.background:void 0,"--section-color":a.color,"--section-bd":n||s?a.border:void 0}}},e8=Fe((t,e)=>{const n=Ce("ButtonGroupSection",null,t),{className:r,style:s,classNames:i,styles:o,unstyled:a,vars:l,variant:c,gradient:d,radius:f,autoContrast:p,attributes:m,...v}=n,y=bt({name:"ButtonGroupSection",props:n,classes:R1,className:r,style:s,classNames:i,styles:o,unstyled:a,attributes:m,vars:l,varsResolver:m1e,rootSelector:"groupSection"});return g.jsx(le,{...y("groupSection"),ref:e,variant:c,...v})});e8.classes=R1;e8.displayName="@mantine/core/ButtonGroupSection";const g1e={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Ee(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},v1e=(t,{radius:e,color:n,gradient:r,variant:s,size:i,justify:o,autoContrast:a})=>{const l=t.variantColorResolver({color:n||t.primaryColor,theme:t,gradient:r,variant:s||"filled",autoContrast:a});return{root:{"--button-justify":o,"--button-height":Qt(i,"button-height"),"--button-padding-x":Qt(i,"button-padding-x"),"--button-fz":i!=null&&i.includes("compact")?hs(i.replace("compact-","")):hs(i),"--button-radius":e===void 0?void 0:ar(e),"--button-bg":n||s?l.background:void 0,"--button-hover":n||s?l.hover:void 0,"--button-color":l.color,"--button-bd":n||s?l.border:void 0,"--button-hover-color":n||s?l.hoverColor:void 0}}},en=xi((t,e)=>{const n=Ce("Button",null,t),{style:r,vars:s,className:i,color:o,disabled:a,children:l,leftSection:c,rightSection:d,fullWidth:f,variant:p,radius:m,loading:v,loaderProps:y,gradient:x,classNames:w,styles:C,unstyled:E,"data-disabled":D,autoContrast:T,mod:A,attributes:_,...R}=n,N=bt({name:"Button",props:n,classes:R1,className:i,style:r,classNames:w,styles:C,unstyled:E,attributes:_,vars:s,varsResolver:v1e}),I=!!c,$=!!d;return g.jsxs(or,{ref:e,...N("root",{active:!a&&!v&&!D}),unstyled:E,variant:p,disabled:a||v,mod:[{disabled:a||D,loading:v,block:f,"with-left-section":I,"with-right-section":$},A],...R,children:[typeof v=="boolean"&&g.jsx(Sc,{mounted:v,transition:g1e,duration:150,children:L=>g.jsx(le,{component:"span",...N("loader",{style:L}),"aria-hidden":!0,children:g.jsx(zi,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...y})})}),g.jsxs("span",{...N("inner"),children:[c&&g.jsx(le,{component:"span",...N("section"),mod:{position:"left"},children:c}),g.jsx(le,{component:"span",mod:{loading:v},...N("label"),children:l}),d&&g.jsx(le,{component:"span",...N("section"),mod:{position:"right"},children:d})]})]})});en.classes=R1;en.displayName="@mantine/core/Button";en.Group=Q9;en.GroupSection=e8;var pte={root:"m_4451eb3a"};const JA=xi((t,e)=>{const n=Ce("Center",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,inline:c,mod:d,attributes:f,...p}=n,m=bt({name:"Center",props:n,classes:pte,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:f,vars:l});return g.jsx(le,{ref:e,mod:[{inline:c},d],...m("root"),...p})});JA.classes=pte;JA.displayName="@mantine/core/Center";var hte={root:"m_de3d2490",colorOverlay:"m_862f3d1b",shadowOverlay:"m_98ae7f22",alphaOverlay:"m_95709ac0",childrenOverlay:"m_93e74e3"};const wB={withShadow:!0},y1e=(t,{radius:e,size:n})=>({root:{"--cs-radius":e===void 0?void 0:ar(e),"--cs-size":Ee(n)}}),qd=xi((t,e)=>{const n=Ce("ColorSwatch",wB,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,color:c,size:d,radius:f,withShadow:p,children:m,variant:v,attributes:y,...x}=Ce("ColorSwatch",wB,n),w=bt({name:"ColorSwatch",props:n,classes:hte,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,vars:l,varsResolver:y1e});return g.jsxs(le,{ref:e,variant:v,size:d,...w("root",{focusable:!0}),...x,children:[g.jsx("span",{...w("alphaOverlay")}),p&&g.jsx("span",{...w("shadowOverlay")}),g.jsx("span",{...w("colorOverlay",{style:{backgroundColor:c}})}),g.jsx("span",{...w("childrenOverlay"),children:m})]})});qd.classes=hte;qd.displayName="@mantine/core/ColorSwatch";const[b1e,t8]=Jd(null);var n8={wrapper:"m_fee9c77",preview:"m_9dddfbac",body:"m_bffecc3e",sliders:"m_3283bb96",thumb:"m_40d572ba",swatch:"m_d8ee6fd8",swatches:"m_5711e686",saturation:"m_202a296e",saturationOverlay:"m_11b3db02",slider:"m_d856d47d",sliderOverlay:"m_8f327113"};const r8=O.forwardRef(({position:t,...e},n)=>g.jsx(le,{ref:n,__vars:{"--thumb-y-offset":`${t.y*100}%`,"--thumb-x-offset":`${t.x*100}%`},...e}));r8.displayName="@mantine/core/ColorPickerThumb";const s8=Fe((t,e)=>{var Y;const n=Ce("ColorSlider",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,onChange:c,onChangeEnd:d,maxValue:f,round:p,size:m="md",focusable:v=!0,value:y,overlays:x,thumbColor:w="transparent",onScrubStart:C,onScrubEnd:E,__staticSelector:D="ColorPicker",attributes:T,...A}=n,_=bt({name:D,classes:n8,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:T}),N=((Y=t8())==null?void 0:Y.getStyles)||_,I=Dr(),[$,L]=O.useState({y:0,x:y/f}),z=O.useRef($),F=G=>p?Math.round(G*f):G*f,{ref:q}=xQ(({x:G,y:W})=>{z.current={x:G,y:W},c==null||c(F(G))},{onScrubEnd:()=>{const{x:G}=z.current;d==null||d(F(G)),E==null||E()},onScrubStart:C});Ru(()=>{L({y:0,x:y/f})},[y]);const H=(G,W)=>{G.preventDefault();const Z=bQ(W);c==null||c(F(Z.x)),d==null||d(F(Z.x))},B=G=>{switch(G.key){case"ArrowRight":{H(G,{x:$.x+.05,y:$.y});break}case"ArrowLeft":{H(G,{x:$.x-.05,y:$.y});break}}},V=x.map((G,W)=>O.createElement("div",{...N("sliderOverlay"),style:G,key:W}));return g.jsxs(le,{...A,ref:Ds(q,e),...N("slider"),role:"slider","aria-valuenow":y,"aria-valuemax":f,"aria-valuemin":0,tabIndex:v?0:-1,onKeyDown:B,"data-focus-ring":I.focusRing,__vars:{"--cp-thumb-size":`var(--cp-thumb-size-${m})`},children:[V,g.jsx(r8,{position:$,...N("thumb",{style:{top:Ee(1),background:w}})})]})});s8.displayName="@mantine/core/ColorSlider";function xl(t,e=0,n=10**e){return Math.round(n*t)/n}function x1e({h:t,s:e,l:n,a:r}){const s=e*((n<50?n:100-n)/100);return{h:t,s:s>0?2*s/(n+s)*100:0,v:n+s,a:r}}const S1e={grad:360/400,turn:360,rad:360/(Math.PI*2)};function w1e(t,e="deg"){return Number(t)*(S1e[e]||1)}const C1e=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function CB(t){const e=C1e.exec(t);return e?x1e({h:w1e(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function UI({r:t,g:e,b:n,a:r}){const s=Math.max(t,e,n),i=s-Math.min(t,e,n),o=i?s===t?(e-n)/i:s===e?2+(n-t)/i:4+(t-e)/i:0;return{h:xl(60*(o<0?o+6:o),3),s:xl(s?i/s*100:0,3),v:xl(s/255*100,3),a:r}}function VI(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?UI({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):UI({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function E1e(t){const e=t[0]==="#"?t.slice(1):t,n=o=>xl(parseInt(o,16)/255,3);if(e.length===4){const o=e.slice(0,3),a=n(e[3]+e[3]);return{...VI(o),a}}const r=e.slice(0,6),s=n(e.slice(6,8));return{...VI(r),a:s}}const M1e=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function EB(t){const e=M1e.exec(t);return e?UI({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const mte={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},D1e={hex:VI,hexa:E1e,rgb:EB,rgba:EB,hsl:CB,hsla:CB};function k1e(t){for(const[,e]of Object.entries(mte))if(e.test(t))return!0;return!1}function IM(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(mte))if(r.test(e))return D1e[n](e);return{h:0,s:0,v:0,a:1}}const gte=O.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:s,color:i,...o}=Ce("AlphaSlider",null,t);return g.jsx(s8,{...o,ref:e,value:n,onChange:a=>r==null?void 0:r(xl(a,2)),onChangeEnd:a=>s==null?void 0:s(xl(a,2)),maxValue:1,round:!1,"data-alpha":!0,overlays:[{backgroundImage:"linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)",backgroundSize:`${Ee(8)} ${Ee(8)}`,backgroundPosition:`0 0, 0 ${Ee(4)}, ${Ee(4)} ${Ee(-4)}, ${Ee(-4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${i})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Ee(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Ee(4)} inset`}]})});gte.displayName="@mantine/core/AlphaSlider";function vte({h:t,s:e,v:n,a:r}){const s=t/360*6,i=e/100,o=n/100,a=Math.floor(s),l=o*(1-i),c=o*(1-(s-a)*i),d=o*(1-(1-s+a)*i),f=a%6;return{r:xl([o,c,l,l,d,o][f]*255),g:xl([d,o,o,c,l,l][f]*255),b:xl([l,l,d,o,o,c][f]*255),a:xl(r,2)}}function MB(t,e){const{r:n,g:r,b:s,a:i}=vte(t);return e?`rgba(${n}, ${r}, ${s}, ${xl(i,2)})`:`rgb(${n}, ${r}, ${s})`}function DB({h:t,s:e,v:n,a:r},s){const i=(200-e)*n/100,o={h:Math.round(t),s:Math.round(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:Math.round(i/2)};return s?`hsla(${o.h}, ${o.s}%, ${o.l}%, ${xl(r,2)})`:`hsl(${o.h}, ${o.s}%, ${o.l}%)`}function LD(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function yte(t){const{r:e,g:n,b:r}=vte(t);return`#${LD(e)}${LD(n)}${LD(r)}`}function T1e(t){const e=Math.round(t.a*255);return`${yte(t)}${LD(e)}`}const FR={hex:yte,hexa:t=>T1e(t),rgb:t=>MB(t,!1),rgba:t=>MB(t,!0),hsl:t=>DB(t,!1),hsla:t=>DB(t,!0)};function yp(t,e){return e?t in FR?FR[t](e):FR.hex(e):"#000000"}const bte=O.forwardRef((t,e)=>{const{value:n,onChange:r,onChangeEnd:s,color:i,...o}=Ce("HueSlider",{},t);return g.jsx(s8,{...o,ref:e,value:n,onChange:r,onChangeEnd:s,maxValue:360,thumbColor:`hsl(${n}, 100%, 50%)`,round:!0,"data-hue":!0,overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${Ee(1)} inset, rgb(0, 0, 0, .15) 0 0 ${Ee(4)} inset`}]})});bte.displayName="@mantine/core/HueSlider";function xte({className:t,onChange:e,onChangeEnd:n,value:r,saturationLabel:s,focusable:i=!0,size:o,color:a,onScrubStart:l,onScrubEnd:c,...d}){const{getStyles:f}=t8(),[p,m]=O.useState({x:r.s/100,y:1-r.v/100}),v=O.useRef(p),{ref:y}=xQ(({x:C,y:E})=>{v.current={x:C,y:E},e({s:Math.round(C*100),v:Math.round((1-E)*100)})},{onScrubEnd:()=>{const{x:C,y:E}=v.current;n({s:Math.round(C*100),v:Math.round((1-E)*100)}),c==null||c()},onScrubStart:l});O.useEffect(()=>{m({x:r.s/100,y:1-r.v/100})},[r.s,r.v]);const x=(C,E)=>{C.preventDefault();const D=bQ(E);e({s:Math.round(D.x*100),v:Math.round((1-D.y)*100)}),n({s:Math.round(D.x*100),v:Math.round((1-D.y)*100)})},w=C=>{switch(C.key){case"ArrowUp":{x(C,{y:p.y-.05,x:p.x});break}case"ArrowDown":{x(C,{y:p.y+.05,x:p.x});break}case"ArrowRight":{x(C,{x:p.x+.05,y:p.y});break}case"ArrowLeft":{x(C,{x:p.x-.05,y:p.y});break}}};return g.jsxs(le,{...f("saturation"),ref:y,...d,role:"slider","aria-label":s,"aria-valuenow":p.x,"aria-valuetext":yp("rgba",r),tabIndex:i?0:-1,onKeyDown:w,children:[g.jsx("div",{...f("saturationOverlay",{style:{backgroundColor:`hsl(${r.h}, 100%, 50%)`}})}),g.jsx("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}})}),g.jsx("div",{...f("saturationOverlay",{style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}})}),g.jsx(r8,{position:p,...f("thumb",{style:{backgroundColor:a}})})]})}xte.displayName="@mantine/core/Saturation";const Ste=O.forwardRef(({className:t,datatype:e,setValue:n,onChangeEnd:r,size:s,focusable:i,data:o,swatchesPerRow:a,value:l,...c},d)=>{const f=t8(),p=o.map((m,v)=>O.createElement(qd,{...f.getStyles("swatch"),unstyled:f.unstyled,component:"button",type:"button",color:m,key:v,radius:"sm",onClick:()=>{n(m),r==null||r(m)},"aria-label":m,tabIndex:i?0:-1,"data-swatch":!0},l===m&&g.jsx(gw,{size:"35%",color:DQ(m)<.5?"white":"black"})));return g.jsx(le,{...f.getStyles("swatches"),ref:d,...c,children:p})});Ste.displayName="@mantine/core/Swatches";const A1e={swatchesPerRow:7,withPicker:!0,focusable:!0,size:"md",__staticSelector:"ColorPicker"},_1e=(t,{size:e,swatchesPerRow:n})=>({wrapper:{"--cp-preview-size":Qt(e,"cp-preview-size"),"--cp-width":Qt(e,"cp-width"),"--cp-body-spacing":Er(e),"--cp-swatch-size":`${100/n}%`,"--cp-thumb-size":Qt(e,"cp-thumb-size"),"--cp-saturation-height":Qt(e,"cp-saturation-height")}}),i8=Fe((t,e)=>{const n=Ce("ColorPicker",A1e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,format:c="hex",value:d,defaultValue:f,onChange:p,onChangeEnd:m,withPicker:v,size:y,saturationLabel:x,hueLabel:w,alphaLabel:C,focusable:E,swatches:D,swatchesPerRow:T,fullWidth:A,onColorSwatchClick:_,__staticSelector:R,mod:N,attributes:I,...$}=n,L=bt({name:R,props:n,classes:n8,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:I,rootSelector:"wrapper",vars:l,varsResolver:_1e}),z=O.useRef(c||"hex"),F=O.useRef(""),q=O.useRef(-1),H=O.useRef(!1),B=c==="hexa"||c==="rgba"||c==="hsla",[V,Y,G]=gi({value:d,defaultValue:f,finalValue:"#FFFFFF",onChange:p}),[W,Z]=O.useState(IM(V)),Q=()=>{window.clearTimeout(q.current),H.current=!0},X=()=>{window.clearTimeout(q.current),q.current=window.setTimeout(()=>{H.current=!1},200)},re=ne=>{Z(ee=>{const oe={...ee,...ne};return F.current=yp(z.current,oe),oe}),Y(F.current)};return Ru(()=>{typeof d=="string"&&k1e(d)&&!H.current&&Z(IM(d))},[d]),Ru(()=>{z.current=c||"hex",Y(yp(z.current,W))},[c]),g.jsx(b1e,{value:{getStyles:L,unstyled:a},children:g.jsxs(le,{ref:e,...L("wrapper"),size:y,mod:[{"full-width":A},N],...$,children:[v&&g.jsxs(g.Fragment,{children:[g.jsx(xte,{value:W,onChange:re,onChangeEnd:({s:ne,v:ee})=>m==null?void 0:m(yp(z.current,{...W,s:ne,v:ee})),color:V,size:y,focusable:E,saturationLabel:x,onScrubStart:Q,onScrubEnd:X}),g.jsxs("div",{...L("body"),children:[g.jsxs("div",{...L("sliders"),children:[g.jsx(bte,{value:W.h,onChange:ne=>re({h:ne}),onChangeEnd:ne=>m==null?void 0:m(yp(z.current,{...W,h:ne})),size:y,focusable:E,"aria-label":w,onScrubStart:Q,onScrubEnd:X}),B&&g.jsx(gte,{value:W.a,onChange:ne=>re({a:ne}),onChangeEnd:ne=>{m==null||m(yp(z.current,{...W,a:ne}))},size:y,color:yp("hex",W),focusable:E,"aria-label":C,onScrubStart:Q,onScrubEnd:X})]}),B&&g.jsx(qd,{color:V,radius:"sm",size:"var(--cp-preview-size)",...L("preview")})]})]}),Array.isArray(D)&&g.jsx(Ste,{data:D,swatchesPerRow:T,focusable:E,setValue:Y,value:V,onChangeEnd:ne=>{const ee=yp(c,IM(ne));_==null||_(ee),m==null||m(ee),G||Z(IM(ne))}})]})})});i8.classes=n8;i8.displayName="@mantine/core/ColorPicker";var wte={root:"m_7485cace"};const O1e=(t,{size:e,fluid:n})=>({root:{"--container-size":n?void 0:Qt(e,"container-size")}}),o8=Fe((t,e)=>{const n=Ce("Container",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,fluid:c,mod:d,attributes:f,strategy:p,...m}=n,v=bt({name:"Container",classes:wte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:f,vars:l,varsResolver:O1e});return g.jsx(le,{ref:e,mod:[{fluid:c,strategy:p||"block"},d],...v("root"),...m})});o8.classes=wte;o8.displayName="@mantine/core/Container";var Cte={root:"m_3eebeb36",label:"m_9e365f20"};const R1e={orientation:"horizontal"},N1e=(t,{color:e,variant:n,size:r})=>({root:{"--divider-color":e?Fr(e,t):void 0,"--divider-border-style":n,"--divider-size":Qt(r,"divider-size")}}),Bo=Fe((t,e)=>{const n=Ce("Divider",R1e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,color:c,orientation:d,label:f,labelPosition:p,mod:m,attributes:v,...y}=n,x=bt({name:"Divider",classes:Cte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:l,varsResolver:N1e});return g.jsx(le,{ref:e,mod:[{orientation:d,"with-label":!!f},m],...x("root"),...y,role:"separator",children:f&&g.jsx(le,{component:"span",mod:{position:p},...x("label"),children:f})})});Bo.classes=Cte;Bo.displayName="@mantine/core/Divider";var rf={root:"m_f11b401e",header:"m_5a7c2c9",content:"m_b8a05bbd",inner:"m_31cd769a"};const[j1e,N1]=Ys("Drawer component was not found in tree"),XA=Fe((t,e)=>{const n=Ce("DrawerBody",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=N1();return g.jsx(y9,{ref:e,...c.getStyles("body",{classNames:r,style:i,styles:o,className:s}),...l})});XA.classes=rf;XA.displayName="@mantine/core/DrawerBody";const QA=Fe((t,e)=>{const n=Ce("DrawerCloseButton",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=N1();return g.jsx(b9,{ref:e,...c.getStyles("close",{classNames:r,style:i,styles:o,className:s}),...l})});QA.classes=rf;QA.displayName="@mantine/core/DrawerCloseButton";const e_=Fe((t,e)=>{const n=Ce("DrawerContent",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,children:l,radius:c,__hidden:d,...f}=n,p=N1(),m=p.scrollAreaComponent||Pee;return g.jsx(x9,{...p.getStyles("content",{className:s,style:i,styles:o,classNames:r}),innerProps:p.getStyles("inner",{className:s,style:i,styles:o,classNames:r}),ref:e,...f,radius:c||p.radius||0,"data-hidden":d||void 0,children:g.jsx(m,{style:{height:"calc(100vh - var(--drawer-offset) * 2)"},children:l})})});e_.classes=rf;e_.displayName="@mantine/core/DrawerContent";const t_=Fe((t,e)=>{const n=Ce("DrawerHeader",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=N1();return g.jsx(S9,{ref:e,...c.getStyles("header",{classNames:r,style:i,styles:o,className:s}),...l})});t_.classes=rf;t_.displayName="@mantine/core/DrawerHeader";const n_=Fe((t,e)=>{const n=Ce("DrawerOverlay",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=N1();return g.jsx(w9,{ref:e,...c.getStyles("overlay",{classNames:r,style:i,styles:o,className:s}),...l})});n_.classes=rf;n_.displayName="@mantine/core/DrawerOverlay";function I1e(t){switch(t){case"top":return"flex-start";case"bottom":return"flex-end";default:return}}function L1e(t){if(t==="top"||t==="bottom")return"0 0 calc(100% - var(--drawer-offset, 0rem) * 2)"}const P1e={top:"slide-down",bottom:"slide-up",left:"slide-right",right:"slide-left"},$1e={top:"slide-down",bottom:"slide-up",right:"slide-right",left:"slide-left"},z1e={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:yi("modal"),position:"left"},F1e=(t,{position:e,size:n,offset:r})=>({root:{"--drawer-size":Qt(n,"drawer-size"),"--drawer-flex":L1e(e),"--drawer-height":e==="left"||e==="right"?void 0:"var(--drawer-size)","--drawer-align":I1e(e),"--drawer-justify":e==="right"?"flex-end":void 0,"--drawer-offset":Ee(r)}}),r_=Fe((t,e)=>{const n=Ce("DrawerRoot",z1e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,scrollAreaComponent:c,position:d,transitionProps:f,radius:p,attributes:m,...v}=n,{dir:y}=Hu(),x=bt({name:"Drawer",classes:rf,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:m,vars:l,varsResolver:F1e}),w=(y==="rtl"?$1e:P1e)[d];return g.jsx(j1e,{value:{scrollAreaComponent:c,getStyles:x,radius:p},children:g.jsx(v9,{ref:e,...x("root"),transitionProps:{transition:w,...f},"data-offset-scrollbars":c===Qs.Autosize||void 0,unstyled:a,...v})})});r_.classes=rf;r_.displayName="@mantine/core/DrawerRoot";const[B1e,H1e]=Jd();function Ete({children:t}){const[e,n]=O.useState([]),[r,s]=O.useState(yi("modal"));return g.jsx(B1e,{value:{stack:e,addModal:(i,o)=>{n(a=>[...new Set([...a,i])]),s(a=>typeof o=="number"&&typeof a=="number"?Math.max(a,o):a)},removeModal:i=>n(o=>o.filter(a=>a!==i)),getZIndex:i=>`calc(${r} + ${e.indexOf(i)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}Ete.displayName="@mantine/core/DrawerStack";const s_=Fe((t,e)=>{const n=Ce("DrawerTitle",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=N1();return g.jsx(C9,{ref:e,...c.getStyles("title",{classNames:r,style:i,styles:o,className:s}),...l})});s_.classes=rf;s_.displayName="@mantine/core/DrawerTitle";const q1e={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:yi("modal"),withOverlay:!0,withCloseButton:!0},jl=Fe((t,e)=>{const{title:n,withOverlay:r,overlayProps:s,withCloseButton:i,closeButtonProps:o,children:a,opened:l,stackId:c,zIndex:d,...f}=Ce("Drawer",q1e,t),p=H1e(),m=!!n||i,v=p&&c?{closeOnEscape:p.currentId===c,trapFocus:p.currentId===c,zIndex:p.getZIndex(c)}:{},y=r===!1?!1:c&&p?p.currentId===c:l;return O.useEffect(()=>{p&&c&&(l?p.addModal(c,d||yi("modal")):p.removeModal(c))},[l,c,d]),g.jsxs(r_,{ref:e,opened:l,zIndex:p&&c?p.getZIndex(c):d,...f,...v,children:[r&&g.jsx(n_,{visible:y,transitionProps:p&&c?{duration:0}:void 0,...s}),g.jsxs(e_,{__hidden:p&&c&&l?c!==p.currentId:!1,children:[m&&g.jsxs(t_,{children:[n&&g.jsx(s_,{children:n}),i&&g.jsx(QA,{...o})]}),g.jsx(XA,{children:a})]})]})});jl.classes=rf;jl.displayName="@mantine/core/Drawer";jl.Root=r_;jl.Overlay=n_;jl.Content=e_;jl.Body=XA;jl.Header=t_;jl.Title=s_;jl.CloseButton=QA;jl.Stack=Ete;const[kB,Mte]=Ys("Grid component was not found in tree");var a8={container:"m_8478a6da",root:"m_410352e9",inner:"m_dee7bd2f",col:"m_96bdd299"};const WI=(t,e)=>t==="content"?"auto":t==="auto"?"0rem":t?`${100/(e/t)}%`:void 0,TB=(t,e,n)=>n||t==="auto"?"100%":t==="content"?"unset":WI(t,e),AB=(t,e)=>{if(t)return t==="auto"||e?"1":"auto"},_B=(t,e)=>t===0?"0":t?`${100/(e/t)}%`:void 0;function U1e({span:t,order:e,offset:n,selector:r}){var m;const s=Dr(),i=Mte(),o=i.breakpoints||s.breakpoints,l=Po(t)===void 0?12:Po(t),c=Bu({"--col-order":(m=Po(e))==null?void 0:m.toString(),"--col-flex-grow":AB(l,i.grow),"--col-flex-basis":WI(l,i.columns),"--col-width":l==="content"?"auto":void 0,"--col-max-width":TB(l,i.columns,i.grow),"--col-offset":_B(Po(n),i.columns)}),d=ir(o).reduce((v,y)=>{var x;return v[y]||(v[y]={}),typeof e=="object"&&e[y]!==void 0&&(v[y]["--col-order"]=(x=e[y])==null?void 0:x.toString()),typeof t=="object"&&t[y]!==void 0&&(v[y]["--col-flex-grow"]=AB(t[y],i.grow),v[y]["--col-flex-basis"]=WI(t[y],i.columns),v[y]["--col-width"]=t[y]==="content"?"auto":void 0,v[y]["--col-max-width"]=TB(t[y],i.columns,i.grow)),typeof n=="object"&&n[y]!==void 0&&(v[y]["--col-offset"]=_B(n[y],i.columns)),v},{}),p=Wy(ir(d),o).filter(v=>ir(d[v.value]).length>0).map(v=>({query:i.type==="container"?`mantine-grid (min-width: ${o[v.value]})`:`(min-width: ${o[v.value]})`,styles:d[v.value]}));return g.jsx(ef,{styles:c,media:i.type==="container"?void 0:p,container:i.type==="container"?p:void 0,selector:r})}const V1e={span:12},l8=Fe((t,e)=>{const n=Ce("GridCol",V1e,t),{classNames:r,className:s,style:i,styles:o,vars:a,span:l,order:c,offset:d,...f}=n,p=Mte(),m=E1();return g.jsxs(g.Fragment,{children:[g.jsx(U1e,{selector:`.${m}`,span:l,order:c,offset:d}),g.jsx(le,{ref:e,...p.getStyles("col",{className:Ms(s,m),style:i,classNames:r,styles:o}),...f})]})});l8.classes=a8;l8.displayName="@mantine/core/GridCol";function OB({gutter:t,selector:e,breakpoints:n,type:r}){const s=Dr(),i=n||s.breakpoints,o=Bu({"--grid-gutter":Er(Po(t))}),a=ir(i).reduce((d,f)=>(d[f]||(d[f]={}),typeof t=="object"&&t[f]!==void 0&&(d[f]["--grid-gutter"]=Er(t[f])),d),{}),c=Wy(ir(a),i).filter(d=>ir(a[d.value]).length>0).map(d=>({query:r==="container"?`mantine-grid (min-width: ${i[d.value]})`:`(min-width: ${i[d.value]})`,styles:a[d.value]}));return g.jsx(ef,{styles:o,media:r==="container"?void 0:c,container:r==="container"?c:void 0,selector:e})}const W1e={gutter:"md",grow:!1,columns:12},Y1e=(t,{justify:e,align:n,overflow:r})=>({root:{"--grid-justify":e,"--grid-align":n,"--grid-overflow":r}}),sr=Fe((t,e)=>{const n=Ce("Grid",W1e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,grow:c,gutter:d,columns:f,align:p,justify:m,children:v,breakpoints:y,type:x,attributes:w,...C}=n,E=bt({name:"Grid",classes:a8,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:w,vars:l,varsResolver:Y1e}),D=E1();return x==="container"&&y?g.jsxs(kB,{value:{getStyles:E,grow:c,columns:f,breakpoints:y,type:x},children:[g.jsx(OB,{selector:`.${D}`,...n}),g.jsx("div",{...E("container"),children:g.jsx(le,{ref:e,...E("root",{className:D}),...C,children:g.jsx("div",{...E("inner"),children:v})})})]}):g.jsxs(kB,{value:{getStyles:E,grow:c,columns:f,breakpoints:y,type:x},children:[g.jsx(OB,{selector:`.${D}`,...n}),g.jsx(le,{ref:e,...E("root",{className:D}),...C,children:g.jsx("div",{...E("inner"),children:v})})]})});sr.classes=a8;sr.displayName="@mantine/core/Grid";sr.Col=l8;const[G1e,Dte]=Ys("HoverCard component was not found in the tree"),kte=O.createContext(!1),K1e=kte.Provider,c8=()=>O.useContext(kte);function Tte(t){const{children:e,onMouseEnter:n,onMouseLeave:r,...s}=Ce("HoverCardDropdown",null,t),i=Dte();if(c8()&&i.getFloatingProps&&i.floating){const c=i.getFloatingProps();return g.jsx(Mn.Dropdown,{ref:i.floating,...c,onMouseEnter:Hs(n,c.onMouseEnter),onMouseLeave:Hs(r,c.onMouseLeave),...s,children:e})}const a=Hs(n,i.openDropdown),l=Hs(r,i.closeDropdown);return g.jsx(Mn.Dropdown,{onMouseEnter:a,onMouseLeave:l,...s,children:e})}Tte.displayName="@mantine/core/HoverCardDropdown";const Z1e={openDelay:0,closeDelay:0};function u8(t){const{openDelay:e,closeDelay:n,children:r}=Ce("HoverCardGroup",Z1e,t);return g.jsx(K1e,{value:!0,children:g.jsx(ree,{delay:{open:e,close:n},children:r})})}u8.displayName="@mantine/core/HoverCardGroup";u8.extend=t=>t;const J1e={refProp:"ref"},Ate=O.forwardRef((t,e)=>{const{children:n,refProp:r,eventPropsWrapperName:s,...i}=Ce("HoverCardTarget",J1e,t),o=xh(n);if(!o)throw new Error("HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const a=Dte();if(c8()&&a.getReferenceProps&&a.reference){const p=a.getReferenceProps();return g.jsx(Mn.Target,{refProp:r,ref:e,...i,children:O.cloneElement(o,s?{[s]:{...p,ref:a.reference}}:{...p,ref:a.reference})})}const c=Hs(o.props.onMouseEnter,a.openDropdown),d=Hs(o.props.onMouseLeave,a.closeDropdown),f={onMouseEnter:c,onMouseLeave:d};return g.jsx(Mn.Target,{refProp:r,ref:e,...i,children:O.cloneElement(o,s?{[s]:f}:f)})});Ate.displayName="@mantine/core/HoverCardTarget";function X1e(t){const[e,n]=O.useState(t.defaultOpened),s=typeof t.opened=="boolean"?t.opened:e,i=c8(),o=bi(),a=O.useRef(-1),l=O.useRef(-1),c=O.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(l.current)},[]),d=O.useCallback(E=>{var D,T;n(E),E?(v(o),(D=t.onOpen)==null||D.call(t)):(T=t.onClose)==null||T.call(t)},[o,t.onOpen,t.onClose]),{context:f,refs:p}=HA({open:s,onOpenChange:d}),{delay:m,setCurrentId:v}=see(f,{id:o}),{getReferenceProps:y,getFloatingProps:x}=oee([tee(f,{enabled:!0,delay:i?m:{open:t.openDelay,close:t.closeDelay}}),aee(f,{role:"dialog"}),iee(f,{enabled:i})]),w=O.useCallback(()=>{i||(c(),t.openDelay===0||t.openDelay===void 0?d(!0):a.current=window.setTimeout(()=>d(!0),t.openDelay))},[i,c,t.openDelay,d]),C=O.useCallback(()=>{i||(c(),t.closeDelay===0||t.closeDelay===void 0?d(!1):l.current=window.setTimeout(()=>d(!1),t.closeDelay))},[i,c,t.closeDelay,d]);return O.useEffect(()=>()=>c(),[c]),{opened:s,reference:p.setReference,floating:p.setFloating,getReferenceProps:y,getFloatingProps:x,openDropdown:w,closeDropdown:C}}const Q1e={openDelay:0,closeDelay:150,initiallyOpened:!1};function Vp(t){const{children:e,onOpen:n,onClose:r,openDelay:s,closeDelay:i,initiallyOpened:o,...a}=Ce("HoverCard",Q1e,t),l=X1e({openDelay:s,closeDelay:i,defaultOpened:o,onOpen:n,onClose:r});return g.jsx(G1e,{value:{openDropdown:l.openDropdown,closeDropdown:l.closeDropdown,getReferenceProps:l.getReferenceProps,getFloatingProps:l.getFloatingProps,reference:l.reference,floating:l.floating},children:g.jsx(Mn,{...a,opened:l.opened,__staticSelector:"HoverCard",children:e})})}Vp.displayName="@mantine/core/HoverCard";Vp.Target=Ate;Vp.Dropdown=Tte;Vp.Group=u8;Vp.extend=t=>t;var _te={root:"m_9e117634"};const ebe=(t,{radius:e,fit:n})=>({root:{"--image-radius":e===void 0?void 0:ar(e),"--image-object-fit":n}}),ov=xi((t,e)=>{const n=Ce("Image",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,onError:c,src:d,radius:f,fit:p,fallbackSrc:m,mod:v,attributes:y,...x}=n,[w,C]=O.useState(!d);O.useEffect(()=>C(!d),[d]);const E=bt({name:"Image",classes:_te,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,vars:l,varsResolver:ebe});return w&&m?g.jsx(le,{component:"img",ref:e,src:m,...E("root"),onError:c,mod:["fallback",v],...x}):g.jsx(le,{component:"img",ref:e,...E("root"),src:d,onError:D=>{c==null||c(D),C(!0)},mod:v,...x})});ov.classes=_te;ov.displayName="@mantine/core/Image";function tbe(t="top-end",e=0){const n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=Ee(e),[s,i]=t.split("-");return s==="top"&&(n["--indicator-top"]=r,n["--indicator-translate-y"]="-50%"),s==="middle"&&(n["--indicator-top"]="50%",n["--indicator-translate-y"]="-50%"),s==="bottom"&&(n["--indicator-bottom"]=r,n["--indicator-translate-y"]="50%"),i==="start"&&(n["--indicator-left"]=r,n["--indicator-translate-x"]="-50%"),i==="center"&&(n["--indicator-left"]="50%",n["--indicator-translate-x"]="-50%"),i==="end"&&(n["--indicator-right"]=r,n["--indicator-translate-x"]="50%"),n}var Ote={root:"m_e5262200",indicator:"m_760d1fb1",processing:"m_885901b1"};const nbe={position:"top-end",offset:0},rbe=(t,{color:e,position:n,offset:r,size:s,radius:i,zIndex:o,autoContrast:a})=>({root:{"--indicator-color":e?Fr(e,t):void 0,"--indicator-text-color":iv(a,t)?Qd({color:e,theme:t,autoContrast:a}):void 0,"--indicator-size":Ee(s),"--indicator-radius":i===void 0?void 0:ar(i),"--indicator-z-index":o==null?void 0:o.toString(),...tbe(n,r)}}),d8=Fe((t,e)=>{const n=Ce("Indicator",nbe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,children:c,position:d,offset:f,inline:p,label:m,radius:v,color:y,withBorder:x,disabled:w,processing:C,zIndex:E,autoContrast:D,mod:T,attributes:A,..._}=n,R=bt({name:"Indicator",classes:Ote,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:A,vars:l,varsResolver:rbe});return g.jsxs(le,{ref:e,...R("root"),mod:[{inline:p},T],..._,children:[!w&&g.jsx(le,{mod:{"with-label":!!m,"with-border":x,processing:C},...R("indicator"),children:m}),c]})});d8.classes=Ote;d8.displayName="@mantine/core/Indicator";function wr(){return wr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},wr.apply(null,arguments)}function Ud(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var sbe=O.useLayoutEffect,ibe=function(e){var n=xe.useRef(e);return sbe(function(){n.current=e}),n},RB=function(e,n){if(typeof e=="function"){e(n);return}e.current=n},obe=function(e,n){var r=xe.useRef();return xe.useCallback(function(s){e.current=s,r.current&&RB(r.current,null),r.current=n,n&&RB(n,s)},[n])},NB={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},abe=function(e){Object.keys(NB).forEach(function(n){e.style.setProperty(n,NB[n],"important")})},jB=abe,Lo=null,IB=function(e,n){var r=e.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function lbe(t,e,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Lo||(Lo=document.createElement("textarea"),Lo.setAttribute("tabindex","-1"),Lo.setAttribute("aria-hidden","true"),jB(Lo)),Lo.parentNode===null&&document.body.appendChild(Lo);var s=t.paddingSize,i=t.borderSize,o=t.sizingStyle,a=o.boxSizing;Object.keys(o).forEach(function(p){var m=p;Lo.style[m]=o[m]}),jB(Lo),Lo.value=e;var l=IB(Lo,t);Lo.value=e,l=IB(Lo,t),Lo.value="x";var c=Lo.scrollHeight-s,d=c*n;a==="border-box"&&(d=d+s+i),l=Math.max(d,l);var f=c*r;return a==="border-box"&&(f=f+s+i),l=Math.min(f,l),[l,c]}var LB=function(){},cbe=function(e,n){return e.reduce(function(r,s){return r[s]=n[s],r},{})},ube=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],dbe=!!document.documentElement.currentStyle,fbe=function(e){var n=window.getComputedStyle(e);if(n===null)return null;var r=cbe(ube,n),s=r.boxSizing;if(s==="")return null;dbe&&s==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:o}},pbe=fbe;function f8(t,e,n){var r=ibe(n);O.useLayoutEffect(function(){var s=function(o){return r.current(o)};if(t)return t.addEventListener(e,s),function(){return t.removeEventListener(e,s)}},[])}var hbe=function(e,n){f8(document.body,"reset",function(r){e.current.form===r.target&&n(r)})},mbe=function(e){f8(window,"resize",e)},gbe=function(e){f8(document.fonts,"loadingdone",e)},vbe=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ybe=function(e,n){var r=e.cacheMeasurements,s=e.maxRows,i=e.minRows,o=e.onChange,a=o===void 0?LB:o,l=e.onHeightChange,c=l===void 0?LB:l,d=Ud(e,vbe),f=d.value!==void 0,p=O.useRef(null),m=obe(p,n),v=O.useRef(0),y=O.useRef(),x=function(){var E=p.current,D=r&&y.current?y.current:pbe(E);if(D){y.current=D;var T=lbe(D,E.value||E.placeholder||"x",i,s),A=T[0],_=T[1];v.current!==A&&(v.current=A,E.style.setProperty("height",A+"px","important"),c(A,{rowHeight:_}))}},w=function(E){f||x(),a(E)};return O.useLayoutEffect(x),hbe(p,function(){if(!f){var C=p.current.value;requestAnimationFrame(function(){var E=p.current;E&&C!==E.value&&x()})}}),mbe(x),gbe(x),O.createElement("textarea",wr({},d,{onChange:w,ref:m}))},bbe=O.forwardRef(ybe);const xbe={size:"sm"},p8=Fe((t,e)=>{const{autosize:n,maxRows:r,minRows:s,__staticSelector:i,resize:o,...a}=Ce("Textarea",xbe,t),l=n&&EQ()!=="test",c=l?{maxRows:r,minRows:s}:{};return g.jsx(Rl,{component:l?bbe:"textarea",ref:e,...a,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":n&&r===void 0||void 0,__vars:{"--input-resize":o},...c})});p8.classes=Rl.classes;p8.displayName="@mantine/core/Textarea";const[Sbe,wbe]=Ys("List component was not found in tree");var h8={root:"m_abbac491",item:"m_abb6bec2",itemWrapper:"m_75cd9f71",itemIcon:"m_60f83e5b"};const m8=Fe((t,e)=>{const n=Ce("ListItem",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,icon:l,children:c,mod:d,...f}=n,p=wbe(),m=l||p.icon,v={classNames:r,styles:o};return g.jsx(le,{...p.getStyles("item",{...v,className:s,style:i}),component:"li",mod:[{"with-icon":!!m,centered:p.center},d],ref:e,...f,children:g.jsxs("div",{...p.getStyles("itemWrapper",v),children:[m&&g.jsx("span",{...p.getStyles("itemIcon",v),children:m}),g.jsx("span",{...p.getStyles("itemLabel",v),children:c})]})})});m8.classes=h8;m8.displayName="@mantine/core/ListItem";const Cbe={type:"unordered"},Ebe=(t,{size:e,spacing:n})=>({root:{"--list-fz":hs(e),"--list-lh":fQ(e),"--list-spacing":Er(n)}}),Fi=Fe((t,e)=>{const n=Ce("List",Cbe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,children:c,type:d,withPadding:f,icon:p,spacing:m,center:v,listStyleType:y,mod:x,attributes:w,...C}=n,E=bt({name:"List",classes:h8,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:w,vars:l,varsResolver:Ebe});return g.jsx(Sbe,{value:{center:v,icon:p,getStyles:E},children:g.jsx(le,{...E("root",{style:{listStyleType:y}}),component:d==="unordered"?"ul":"ol",mod:[{"with-padding":f,type:p?"none":y},x],ref:e,...C,children:c})})});Fi.classes=h8;Fi.displayName="@mantine/core/List";Fi.Item=m8;var Rte={root:"m_6e45937b",loader:"m_e8eb006c",overlay:"m_df587f17"};const PB={transitionProps:{transition:"fade",duration:0},overlayProps:{backgroundOpacity:.75},zIndex:yi("overlay")},Mbe=(t,{zIndex:e})=>({root:{"--lo-z-index":e==null?void 0:e.toString()}}),j1=Fe((t,e)=>{const n=Ce("LoadingOverlay",PB,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,transitionProps:c,loaderProps:d,overlayProps:f,visible:p,zIndex:m,attributes:v,...y}=n,x=Dr(),w=bt({name:"LoadingOverlay",classes:Rte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:l,varsResolver:Mbe}),C={...PB.overlayProps,...f};return g.jsx(Sc,{transition:"fade",...c,mounted:!!p,children:E=>g.jsxs(le,{...w("root",{style:E}),ref:e,...y,children:[g.jsx(zi,{...w("loader"),unstyled:a,...d}),g.jsx(Ky,{...C,...w("overlay"),darkHidden:!0,unstyled:a,color:(f==null?void 0:f.color)||x.white}),g.jsx(Ky,{...C,...w("overlay"),lightHidden:!0,unstyled:a,color:(f==null?void 0:f.color)||x.colors.dark[5]})]})})});j1.classes=Rte;j1.displayName="@mantine/core/LoadingOverlay";const[Dbe,wh]=Ys("Menu component was not found in the tree");var Ch={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const g8=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("MenuDivider",null,t),l=wh();return g.jsx(le,{ref:e,...l.getStyles("divider",{className:r,style:s,styles:i,classNames:n}),...a})});g8.classes=Ch;g8.displayName="@mantine/core/MenuDivider";const i_=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,onMouseEnter:a,onMouseLeave:l,onKeyDown:c,children:d,...f}=Ce("MenuDropdown",null,t),p=O.useRef(null),m=wh(),v=Hs(c,w=>{var C,E;(w.key==="ArrowUp"||w.key==="ArrowDown")&&(w.preventDefault(),(E=(C=p.current)==null?void 0:C.querySelectorAll("[data-menu-item]:not(:disabled)")[0])==null||E.focus())}),y=Hs(a,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),x=Hs(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return g.jsxs(Mn.Dropdown,{...f,onMouseEnter:y,onMouseLeave:x,role:"menu","aria-orientation":"vertical",ref:Ds(e,p),...m.getStyles("dropdown",{className:r,style:s,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:[m.withInitialFocusPlaceholder&&g.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});i_.classes=Ch;i_.displayName="@mantine/core/MenuDropdown";const[kbe,o_]=Jd(),v8=xi((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,color:a,closeMenuOnClick:l,leftSection:c,rightSection:d,children:f,disabled:p,"data-disabled":m,...v}=Ce("MenuItem",null,t),y=wh(),x=o_(),w=Dr(),{dir:C}=Hu(),E=O.useRef(null),D=v,T=Hs(D.onClick,()=>{m||(typeof l=="boolean"?l&&y.closeDropdownImmediately():y.closeOnItemClick&&y.closeDropdownImmediately())}),A=a?w.variantColorResolver({color:a,theme:w,variant:"light"}):void 0,_=a?Mc({color:a,theme:w}):null,R=Hs(D.onKeyDown,N=>{N.key==="ArrowLeft"&&x&&(x.close(),x.focusParentItem())});return g.jsxs(or,{onMouseDown:N=>N.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles("item",{className:r,style:s,styles:i,classNames:n}),ref:Ds(E,e),role:"menuitem",disabled:p,"data-menu-item":!0,"data-disabled":p||m||void 0,"data-mantine-stop-propagation":!0,onClick:T,onKeyDown:AA({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:y.loop,dir:C,orientation:"vertical",onKeyDown:R}),__vars:{"--menu-item-color":_!=null&&_.isThemeColor&&(_==null?void 0:_.shade)===void 0?`var(--mantine-color-${_.color}-6)`:A==null?void 0:A.color,"--menu-item-hover":A==null?void 0:A.hover},children:[c&&g.jsx("div",{...y.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:c}),f&&g.jsx("div",{...y.getStyles("itemLabel",{styles:i,classNames:n}),children:f}),d&&g.jsx("div",{...y.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:d})]})});v8.classes=Ch;v8.displayName="@mantine/core/MenuItem";const y8=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("MenuLabel",null,t),l=wh();return g.jsx(le,{ref:e,...l.getStyles("label",{className:r,style:s,styles:i,classNames:n}),...a})});y8.classes=Ch;y8.displayName="@mantine/core/MenuLabel";const b8=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,onMouseEnter:a,onMouseLeave:l,onKeyDown:c,children:d,...f}=Ce("MenuSubDropdown",null,t),p=O.useRef(null),m=wh(),v=o_(),y=Hs(a,v==null?void 0:v.open),x=Hs(l,v==null?void 0:v.close);return g.jsx(Mn.Dropdown,{...f,onMouseEnter:y,onMouseLeave:x,role:"menu","aria-orientation":"vertical",ref:Ds(e,p),...m.getStyles("dropdown",{className:r,style:s,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:d})});b8.classes=Ch;b8.displayName="@mantine/core/MenuSubDropdown";const x8=xi((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,color:a,leftSection:l,rightSection:c,children:d,disabled:f,"data-disabled":p,closeMenuOnClick:m,...v}=Ce("MenuSubItem",null,t),y=wh(),x=o_(),w=Dr(),{dir:C}=Hu(),E=O.useRef(null),D=v,T=a?w.variantColorResolver({color:a,theme:w,variant:"light"}):void 0,A=a?Mc({color:a,theme:w}):null,_=Hs(D.onKeyDown,$=>{$.key==="ArrowRight"&&(x==null||x.open(),x==null||x.focusFirstItem()),$.key==="ArrowLeft"&&(x!=null&&x.parentContext)&&(x.parentContext.close(),x.parentContext.focusParentItem())}),R=Hs(D.onClick,()=>{!p&&m&&y.closeDropdownImmediately()}),N=Hs(D.onMouseEnter,x==null?void 0:x.open),I=Hs(D.onMouseLeave,x==null?void 0:x.close);return g.jsxs(or,{onMouseDown:$=>$.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles("item",{className:r,style:s,styles:i,classNames:n}),ref:Ds(E,e),role:"menuitem",disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:N,onMouseLeave:I,onClick:R,onKeyDown:AA({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:y.loop,dir:C,orientation:"vertical",onKeyDown:_}),__vars:{"--menu-item-color":A!=null&&A.isThemeColor&&(A==null?void 0:A.shade)===void 0?`var(--mantine-color-${A.color}-6)`:T==null?void 0:T.color,"--menu-item-hover":T==null?void 0:T.hover},children:[l&&g.jsx("div",{...y.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:l}),d&&g.jsx("div",{...y.getStyles("itemLabel",{styles:i,classNames:n}),children:d}),g.jsx("div",{...y.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:c||g.jsx(rh,{...y.getStyles("chevron"),size:14})})]})});x8.classes=Ch;x8.displayName="@mantine/core/MenuSubItem";function Nte({children:t,refProp:e}){if(!TA(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return wh(),g.jsx(Mn.Target,{refProp:e,popupType:"menu",children:t})}Nte.displayName="@mantine/core/MenuSubTarget";const Tbe={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function I1(t){const{children:e,closeDelay:n,openDelay:r,...s}=Ce("MenuSub",Tbe,t),i=bi(),[o,{open:a,close:l}]=Ps(!1),c=o_(),{openDropdown:d,closeDropdown:f}=Hee({open:a,close:l,closeDelay:n,openDelay:r}),p=()=>window.setTimeout(()=>{var v,y;(y=(v=document.getElementById(`${i}-dropdown`))==null?void 0:v.querySelectorAll("[data-menu-item]:not([data-disabled])")[0])==null||y.focus()},16),m=()=>window.setTimeout(()=>{var v;(v=document.getElementById(`${i}-target`))==null||v.focus()},16);return g.jsx(kbe,{value:{opened:o,close:f,open:d,focusFirstItem:p,focusParentItem:m,parentContext:c},children:g.jsx(Mn,{opened:o,withinPortal:!1,withArrow:!1,id:i,...s,children:e})})}I1.extend=t=>t;I1.displayName="@mantine/core/MenuSub";I1.Target=Nte;I1.Dropdown=b8;I1.Item=x8;const Abe={refProp:"ref"},jte=O.forwardRef((t,e)=>{const{children:n,refProp:r,...s}=Ce("MenuTarget",Abe,t),i=xh(n);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const o=wh(),a=i.props,l=Hs(a.onClick,()=>{o.trigger==="click"?o.toggleDropdown():o.trigger==="click-hover"&&(o.setOpenedViaClick(!0),o.opened||o.openDropdown())}),c=Hs(a.onMouseEnter,()=>(o.trigger==="hover"||o.trigger==="click-hover")&&o.openDropdown()),d=Hs(a.onMouseLeave,()=>{(o.trigger==="hover"||o.trigger==="click-hover"&&!o.openedViaClick)&&o.closeDropdown()});return g.jsx(Mn.Target,{refProp:r,popupType:"menu",ref:e,...s,children:O.cloneElement(i,{onClick:l,onMouseEnter:c,onMouseLeave:d,"data-expanded":o.opened?!0:void 0})})});jte.displayName="@mantine/core/MenuTarget";const _be={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Gt(t){const e=Ce("Menu",_be,t),{children:n,onOpen:r,onClose:s,opened:i,defaultOpened:o,trapFocus:a,onChange:l,closeOnItemClick:c,loop:d,closeOnEscape:f,trigger:p,openDelay:m,closeDelay:v,classNames:y,styles:x,unstyled:w,variant:C,vars:E,menuItemTabIndex:D,keepMounted:T,withInitialFocusPlaceholder:A,attributes:_,...R}=e,N=bt({name:"Menu",classes:Ch,props:e,classNames:y,styles:x,unstyled:w,attributes:_}),[I,$]=gi({value:i,defaultValue:o,finalValue:!1,onChange:l}),[L,z]=O.useState(!1),F=()=>{$(!1),z(!1),I&&(s==null||s())},q=()=>{$(!0),!I&&(r==null||r())},H=()=>{I?F():q()},{openDropdown:B,closeDropdown:V}=Hee({open:q,close:F,closeDelay:v,openDelay:m}),Y=Z=>Lhe("[data-menu-item]","[data-menu-dropdown]",Z),{resolvedClassNames:G,resolvedStyles:W}=Ma({classNames:y,styles:x,props:e});return g.jsx(Dbe,{value:{getStyles:N,opened:I,toggleDropdown:H,getItemIndex:Y,openedViaClick:L,setOpenedViaClick:z,closeOnItemClick:c,closeDropdown:p==="click"?F:V,openDropdown:p==="click"?q:B,closeDropdownImmediately:F,loop:d,trigger:p,unstyled:w,menuItemTabIndex:D,withInitialFocusPlaceholder:A},children:g.jsx(Mn,{returnFocus:!0,...R,opened:I,onChange:H,defaultOpened:o,trapFocus:T?!1:a,closeOnEscape:f,__staticSelector:"Menu",classNames:G,styles:W,unstyled:w,variant:C,keepMounted:T,children:n})})}Gt.extend=t=>t;Gt.withProps=zQ(Gt);Gt.classes=Ch;Gt.displayName="@mantine/core/Menu";Gt.Item=v8;Gt.Label=y8;Gt.Dropdown=i_;Gt.Target=jte;Gt.Divider=g8;Gt.Sub=I1;var sf={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};const[Obe,L1]=Ys("Modal component was not found in tree"),a_=Fe((t,e)=>{const n=Ce("ModalBody",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=L1();return g.jsx(y9,{ref:e,...c.getStyles("body",{classNames:r,style:i,styles:o,className:s}),...l})});a_.classes=sf;a_.displayName="@mantine/core/ModalBody";const l_=Fe((t,e)=>{const n=Ce("ModalCloseButton",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=L1();return g.jsx(b9,{ref:e,...c.getStyles("close",{classNames:r,style:i,styles:o,className:s}),...l})});l_.classes=sf;l_.displayName="@mantine/core/ModalCloseButton";const c_=Fe((t,e)=>{const n=Ce("ModalContent",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,children:l,__hidden:c,...d}=n,f=L1(),p=f.scrollAreaComponent||Pee;return g.jsx(x9,{...f.getStyles("content",{className:s,style:i,styles:o,classNames:r}),innerProps:f.getStyles("inner",{className:s,style:i,styles:o,classNames:r}),"data-full-screen":f.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:e,...d,children:g.jsx(p,{style:{maxHeight:f.fullScreen?"100dvh":`calc(100dvh - (${Ee(f.yOffset)} * 2))`},children:l})})});c_.classes=sf;c_.displayName="@mantine/core/ModalContent";const u_=Fe((t,e)=>{const n=Ce("ModalHeader",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=L1();return g.jsx(S9,{ref:e,...c.getStyles("header",{classNames:r,style:i,styles:o,className:s}),...l})});u_.classes=sf;u_.displayName="@mantine/core/ModalHeader";const d_=Fe((t,e)=>{const n=Ce("ModalOverlay",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=L1();return g.jsx(w9,{ref:e,...c.getStyles("overlay",{classNames:r,style:i,styles:o,className:s}),...l})});d_.classes=sf;d_.displayName="@mantine/core/ModalOverlay";const Rbe={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:yi("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},Nbe=(t,{radius:e,size:n,yOffset:r,xOffset:s})=>({root:{"--modal-radius":e===void 0?void 0:ar(e),"--modal-size":Qt(n,"modal-size"),"--modal-y-offset":Ee(r),"--modal-x-offset":Ee(s)}}),f_=Fe((t,e)=>{const n=Ce("ModalRoot",Rbe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,yOffset:c,scrollAreaComponent:d,radius:f,fullScreen:p,centered:m,xOffset:v,__staticSelector:y,attributes:x,...w}=n,C=bt({name:y,classes:sf,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l,varsResolver:Nbe});return g.jsx(Obe,{value:{yOffset:c,scrollAreaComponent:d,getStyles:C,fullScreen:p},children:g.jsx(v9,{ref:e,...C("root"),"data-full-screen":p||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===Qs.Autosize||void 0,unstyled:a,...w})})});f_.classes=sf;f_.displayName="@mantine/core/ModalRoot";const[jbe,Ibe]=Jd();function Ite({children:t}){const[e,n]=O.useState([]),[r,s]=O.useState(yi("modal"));return g.jsx(jbe,{value:{stack:e,addModal:(i,o)=>{n(a=>[...new Set([...a,i])]),s(a=>typeof o=="number"&&typeof a=="number"?Math.max(a,o):a)},removeModal:i=>n(o=>o.filter(a=>a!==i)),getZIndex:i=>`calc(${r} + ${e.indexOf(i)} + 1)`,currentId:e[e.length-1],maxZIndex:r},children:t})}Ite.displayName="@mantine/core/ModalStack";const p_=Fe((t,e)=>{const n=Ce("ModalTitle",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=L1();return g.jsx(C9,{ref:e,...c.getStyles("title",{classNames:r,style:i,styles:o,className:s}),...l})});p_.classes=sf;p_.displayName="@mantine/core/ModalTitle";const Lbe={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:yi("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},ks=Fe((t,e)=>{const{title:n,withOverlay:r,overlayProps:s,withCloseButton:i,closeButtonProps:o,children:a,radius:l,opened:c,stackId:d,zIndex:f,...p}=Ce("Modal",Lbe,t),m=Ibe(),v=!!n||i,y=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},x=r===!1?!1:d&&m?m.currentId===d:c;return O.useEffect(()=>{m&&d&&(c?m.addModal(d,f||yi("modal")):m.removeModal(d))},[c,d,f]),g.jsxs(f_,{ref:e,radius:l,opened:c,zIndex:m&&d?m.getZIndex(d):f,...p,...y,children:[r&&g.jsx(d_,{visible:x,transitionProps:m&&d?{duration:0}:void 0,...s}),g.jsxs(c_,{radius:l,__hidden:m&&d&&c?d!==m.currentId:!1,children:[v&&g.jsxs(u_,{children:[n&&g.jsx(p_,{children:n}),i&&g.jsx(l_,{...o})]}),g.jsx(a_,{children:a})]})]})});ks.classes=sf;ks.displayName="@mantine/core/Modal";ks.Root=f_;ks.Overlay=d_;ks.Content=c_;ks.Body=a_;ks.Header=u_;ks.Title=p_;ks.CloseButton=l_;ks.Stack=Ite;var Lte={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const Pbe={withCloseButton:!0},$be=(t,{radius:e,color:n})=>({root:{"--notification-radius":e===void 0?void 0:ar(e),"--notification-color":n?Fr(n,t):void 0}}),h_=Fe((t,e)=>{const n=Ce("Notification",Pbe,t),{className:r,color:s,radius:i,loading:o,withCloseButton:a,withBorder:l,title:c,icon:d,children:f,onClose:p,closeButtonProps:m,classNames:v,style:y,styles:x,unstyled:w,vars:C,mod:E,loaderProps:D,role:T,attributes:A,..._}=n,R=bt({name:"Notification",classes:Lte,props:n,className:r,style:y,classNames:v,styles:x,unstyled:w,attributes:A,vars:C,varsResolver:$be});return g.jsxs(le,{...R("root"),mod:[{"data-with-icon":!!d||o,"data-with-border":l},E],ref:e,role:T||"alert",..._,children:[d&&!o&&g.jsx("div",{...R("icon"),children:d}),o&&g.jsx(zi,{size:28,color:s,...D,...R("loader")}),g.jsxs("div",{...R("body"),children:[c&&g.jsx("div",{...R("title"),children:c}),g.jsx(le,{...R("description"),mod:{"data-with-title":!!c},children:f})]}),a&&g.jsx(A1,{iconSize:16,color:"gray",...m,unstyled:w,onClick:p,...R("closeButton")})]})});h_.classes=Lte;h_.displayName="@mantine/core/Notification";function Pte(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)e.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(n[r[s]]=t[r[s]]);return n}var mS;(function(t){t.event="event",t.props="prop"})(mS||(mS={}));function kp(){}function zbe(t){var e,n=void 0;return function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return e&&r.length===e.length&&r.every(function(i,o){return i===e[o]})||(e=r,n=t.apply(void 0,r)),n}}function gS(t){return!!(t||"").match(/\d/)}function $y(t){return t==null}function Fbe(t){return typeof t=="number"&&isNaN(t)}function $te(t){return $y(t)||Fbe(t)||typeof t=="number"&&!isFinite(t)}function zte(t){return t.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Bbe(t){switch(t){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Hbe(t,e,n){var r=Bbe(n),s=t.search(/[1-9]/);return s=s===-1?t.length:s,t.substring(0,s)+t.substring(s,t.length).replace(r,"$1"+e)}function qbe(t){var e=O.useRef(t);e.current=t;var n=O.useRef(function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return e.current.apply(e,r)});return n.current}function S8(t,e){e===void 0&&(e=!0);var n=t[0]==="-",r=n&&e;t=t.replace("-","");var s=t.split("."),i=s[0],o=s[1]||"";return{beforeDecimal:i,afterDecimal:o,hasNegation:n,addNegation:r}}function Ube(t){if(!t)return t;var e=t[0]==="-";e&&(t=t.substring(1,t.length));var n=t.split("."),r=n[0].replace(/^0+/,"")||"0",s=n[1]||"";return(e?"-":"")+r+(s?"."+s:"")}function Fte(t,e,n){for(var r="",s=n?"0":"",i=0;i<=e-1;i++)r+=t[i]||s;return r}function $B(t,e){return Array(e+1).join(t)}function Bte(t){var e=t+"",n=e[0]==="-"?"-":"";n&&(e=e.substring(1));var r=e.split(/[eE]/g),s=r[0],i=r[1];if(i=Number(i),!i)return n+s;s=s.replace(".","");var o=1+i,a=s.length;return o<0?s="0."+$B("0",Math.abs(o))+s:o>=a?s=s+$B("0",o-a):s=(s.substring(0,o)||"0")+"."+s.substring(o),n+s}function zB(t,e,n){if(["","-"].indexOf(t)!==-1)return t;var r=(t.indexOf(".")!==-1||n)&&e,s=S8(t),i=s.beforeDecimal,o=s.afterDecimal,a=s.hasNegation,l=parseFloat("0."+(o||"0")),c=o.length<=e?"0."+o:l.toFixed(e),d=c.split("."),f=i;i&&Number(d[0])&&(f=i.split("").reverse().reduce(function(y,x,w){return y.length>w?(Number(y[0])+Number(x)).toString()+y.substring(1,y.length):x+y},d[0]));var p=Fte(d[1]||"",e,n),m=a?"-":"",v=r?".":"";return""+m+f+v+p}function og(t,e){if(t.value=t.value,t!==null){if(t.createTextRange){var n=t.createTextRange();return n.move("character",e),n.select(),!0}return t.selectionStart||t.selectionStart===0?(t.focus(),t.setSelectionRange(e,e),!0):(t.focus(),!1)}}var Hte=zbe(function(t,e){for(var n=0,r=0,s=t.length,i=e.length;t[n]===e[n]&&n<s;)n++;for(;t[s-1-r]===e[i-1-r]&&i-r>n&&s-r>n;)r++;return{from:{start:n,end:s-r},to:{start:n,end:i-r}}}),Vbe=function(t,e){var n=Math.min(t.selectionStart,e);return{from:{start:n,end:t.selectionEnd},to:{start:n,end:e}}};function Wbe(t,e,n){return Math.min(Math.max(t,e),n)}function BR(t){return Math.max(t.selectionStart,t.selectionEnd)}function Ybe(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Gbe(t){return{from:{start:0,end:0},to:{start:0,end:t.length},lastValue:""}}function Kbe(t){var e=t.currentValue,n=t.formattedValue,r=t.currentValueIndex,s=t.formattedValueIndex;return e[r]===n[s]}function Zbe(t,e,n,r,s,i,o){o===void 0&&(o=Kbe);var a=s.findIndex(function(D){return D}),l=t.slice(0,a);!e&&!n.startsWith(l)&&(e=l,n=l+n,r=r+l.length);for(var c=n.length,d=t.length,f={},p=new Array(c),m=0;m<c;m++){p[m]=-1;for(var v=0,y=d;v<y;v++){var x=o({currentValue:n,lastValue:e,formattedValue:t,currentValueIndex:m,formattedValueIndex:v});if(x&&f[v]!==!0){p[m]=v,f[v]=!0;break}}}for(var w=r;w<c&&(p[w]===-1||!i(n[w]));)w++;var C=w===c||p[w]===-1?d:p[w];for(w=r-1;w>0&&p[w]===-1;)w--;var E=w===-1||p[w]===-1?0:p[w]+1;return E>C?C:r-E<C-r?E:C}function FB(t,e,n,r){var s=t.length;if(e=Wbe(e,0,s),r==="left"){for(;e>=0&&!n[e];)e--;e===-1&&(e=n.indexOf(!0))}else{for(;e<=s&&!n[e];)e++;e>s&&(e=n.lastIndexOf(!0))}return e===-1&&(e=s),e}function Jbe(t){for(var e=Array.from({length:t.length+1}).map(function(){return!0}),n=0,r=e.length;n<r;n++)e[n]=!!(gS(t[n])||gS(t[n-1]));return e}function qte(t,e,n,r,s,i){i===void 0&&(i=kp);var o=qbe(function(v,y){var x,w;return $te(v)?(w="",x=""):typeof v=="number"||y?(w=typeof v=="number"?Bte(v):v,x=r(w)):(w=s(v,void 0),x=r(w)),{formattedValue:x,numAsString:w}}),a=O.useState(function(){return o($y(t)?e:t,n)}),l=a[0],c=a[1],d=function(v,y){v.formattedValue!==l.formattedValue&&c({formattedValue:v.formattedValue,numAsString:v.value}),i(v,y)},f=t,p=n;$y(t)&&(f=l.numAsString,p=!0);var m=o(f,p);return O.useMemo(function(){c(m)},[m.formattedValue]),[l,d]}function Xbe(t){return t.replace(/[^0-9]/g,"")}function Qbe(t){return t}function e2e(t){var e=t.type;e===void 0&&(e="text");var n=t.displayType;n===void 0&&(n="input");var r=t.customInput,s=t.renderText,i=t.getInputRef,o=t.format;o===void 0&&(o=Qbe);var a=t.removeFormatting;a===void 0&&(a=Xbe);var l=t.defaultValue,c=t.valueIsNumericString,d=t.onValueChange,f=t.isAllowed,p=t.onChange;p===void 0&&(p=kp);var m=t.onKeyDown;m===void 0&&(m=kp);var v=t.onMouseUp;v===void 0&&(v=kp);var y=t.onFocus;y===void 0&&(y=kp);var x=t.onBlur;x===void 0&&(x=kp);var w=t.value,C=t.getCaretBoundary;C===void 0&&(C=Jbe);var E=t.isValidInputCharacter;E===void 0&&(E=gS);var D=t.isCharacterSame,T=Pte(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),A=qte(w,l,!!c,o,a,d),_=A[0],R=_.formattedValue,N=_.numAsString,I=A[1],$=O.useRef(),L=O.useRef({formattedValue:R,numAsString:N}),z=function(fe,Te){L.current={formattedValue:fe.formattedValue,numAsString:fe.value},I(fe,Te)},F=O.useState(!1),q=F[0],H=F[1],B=O.useRef(null),V=O.useRef({setCaretTimeout:null,focusTimeout:null});O.useEffect(function(){return H(!0),function(){clearTimeout(V.current.setCaretTimeout),clearTimeout(V.current.focusTimeout)}},[]);var Y=o,G=function(fe,Te){var Ne=parseFloat(Te);return{formattedValue:fe,value:Te,floatValue:isNaN(Ne)?void 0:Ne}},W=function(fe,Te,Ne){fe.selectionStart===0&&fe.selectionEnd===fe.value.length||(og(fe,Te),V.current.setCaretTimeout=setTimeout(function(){fe.value===Ne&&fe.selectionStart!==Te&&og(fe,Te)},0))},Z=function(fe,Te,Ne){return FB(fe,Te,C(fe),Ne)},Q=function(fe,Te,Ne){var Ue=C(Te),rt=Zbe(Te,R,fe,Ne,Ue,E,D);return rt=FB(Te,rt,Ue),rt},X=function(fe){var Te=fe.formattedValue;Te===void 0&&(Te="");var Ne=fe.input,Ue=fe.source,rt=fe.event,ot=fe.numAsString,Je;if(Ne){var je=fe.inputValue||Ne.value,We=BR(Ne);Ne.value=Te,Je=Q(je,Te,We),Je!==void 0&&W(Ne,Je,Te)}Te!==R&&z(G(Te,ot),{event:rt,source:Ue})};O.useEffect(function(){var fe=L.current,Te=fe.formattedValue,Ne=fe.numAsString;(R!==Te||N!==Ne)&&z(G(R,N),{event:void 0,source:mS.props})},[R,N]);var re=B.current?BR(B.current):void 0,ne=typeof window<"u"?O.useLayoutEffect:O.useEffect;ne(function(){var fe=B.current;if(R!==L.current.formattedValue&&fe){var Te=Q(L.current.formattedValue,R,re);fe.value=R,W(fe,Te,R)}},[R]);var ee=function(fe,Te,Ne){var Ue=Te.target,rt=$.current?Vbe($.current,Ue.selectionEnd):Hte(R,fe),ot=Object.assign(Object.assign({},rt),{lastValue:R}),Je=a(fe,ot),je=Y(Je);if(Je=a(je,void 0),f&&!f(G(je,Je))){var We=Te.target,Le=BR(We),_e=Q(fe,R,Le);return We.value=R,W(We,_e,R),!1}return X({formattedValue:je,numAsString:Je,inputValue:fe,event:Te,source:Ne,input:Te.target}),!0},oe=function(fe,Te){Te===void 0&&(Te=0);var Ne=fe.selectionStart,Ue=fe.selectionEnd;$.current={selectionStart:Ne,selectionEnd:Ue+Te}},ce=function(fe){var Te=fe.target,Ne=Te.value,Ue=ee(Ne,fe,mS.event);Ue&&p(fe),$.current=void 0},ue=function(fe){var Te=fe.target,Ne=fe.key,Ue=Te.selectionStart,rt=Te.selectionEnd,ot=Te.value;ot===void 0&&(ot="");var Je;Ne==="ArrowLeft"||Ne==="Backspace"?Je=Math.max(Ue-1,0):Ne==="ArrowRight"?Je=Math.min(Ue+1,ot.length):Ne==="Delete"&&(Je=Ue);var je=0;Ne==="Delete"&&Ue===rt&&(je=1);var We=Ne==="ArrowLeft"||Ne==="ArrowRight";if(Je===void 0||Ue!==rt&&!We){m(fe),oe(Te,je);return}var Le=Je;if(We){var _e=Ne==="ArrowLeft"?"left":"right";Le=Z(ot,Je,_e),Le!==Je&&fe.preventDefault()}else Ne==="Delete"&&!E(ot[Je])?Le=Z(ot,Je,"right"):Ne==="Backspace"&&!E(ot[Je])&&(Le=Z(ot,Je,"left"));Le!==Je&&W(Te,Le,ot),m(fe),oe(Te,je)},pe=function(fe){var Te=fe.target,Ne=function(){var Ue=Te.selectionStart,rt=Te.selectionEnd,ot=Te.value;if(ot===void 0&&(ot=""),Ue===rt){var Je=Z(ot,Ue);Je!==Ue&&W(Te,Je,ot)}};Ne(),requestAnimationFrame(function(){Ne()}),v(fe),oe(Te)},de=function(fe){fe.persist&&fe.persist();var Te=fe.target,Ne=fe.currentTarget;B.current=Te,V.current.focusTimeout=setTimeout(function(){var Ue=Te.selectionStart,rt=Te.selectionEnd,ot=Te.value;ot===void 0&&(ot="");var Je=Z(ot,Ue);Je!==Ue&&!(Ue===0&&rt===ot.length)&&W(Te,Je,ot),y(Object.assign(Object.assign({},fe),{currentTarget:Ne}))},0)},me=function(fe){B.current=null,clearTimeout(V.current.focusTimeout),clearTimeout(V.current.setCaretTimeout),x(fe)},Se=q&&Ybe()?"numeric":void 0,De=Object.assign({inputMode:Se},T,{type:e,value:R,onChange:ce,onKeyDown:ue,onMouseUp:pe,onFocus:de,onBlur:me});if(n==="text")return s?xe.createElement(xe.Fragment,null,s(R,T)||null):xe.createElement("span",Object.assign({},T,{ref:i}),R);if(r){var Ae=r;return xe.createElement(Ae,Object.assign({},De,{ref:i}))}return xe.createElement("input",Object.assign({},De,{ref:i}))}function BB(t,e){var n=e.decimalScale,r=e.fixedDecimalScale,s=e.prefix;s===void 0&&(s="");var i=e.suffix;i===void 0&&(i="");var o=e.allowNegative,a=e.thousandsGroupStyle;if(a===void 0&&(a="thousand"),t===""||t==="-")return t;var l=m_(e),c=l.thousandSeparator,d=l.decimalSeparator,f=n!==0&&t.indexOf(".")!==-1||n&&r,p=S8(t,o),m=p.beforeDecimal,v=p.afterDecimal,y=p.addNegation;return n!==void 0&&(v=Fte(v,n,!!r)),c&&(m=Hbe(m,c,a)),s&&(m=s+m),i&&(v=v+i),y&&(m="-"+m),t=m+(f&&d||"")+v,t}function m_(t){var e=t.decimalSeparator;e===void 0&&(e=".");var n=t.thousandSeparator,r=t.allowedDecimalSeparators;return n===!0&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}function t2e(t,e){t===void 0&&(t="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),s=n.test(t),i=r.test(t);return t=t.replace(/-/g,""),s&&!i&&e&&(t="-"+t),t}function n2e(t,e){return new RegExp("(^-)|[0-9]|"+zte(t),"g")}function r2e(t,e,n){return t===""?!0:!(e!=null&&e.match(/\d/))&&!(n!=null&&n.match(/\d/))&&typeof t=="string"&&!isNaN(Number(t))}function s2e(t,e,n){var r;e===void 0&&(e=Gbe(t));var s=n.allowNegative,i=n.prefix;i===void 0&&(i="");var o=n.suffix;o===void 0&&(o="");var a=n.decimalScale,l=e.from,c=e.to,d=c.start,f=c.end,p=m_(n),m=p.allowedDecimalSeparators,v=p.decimalSeparator,y=t[f]===v;if(gS(t)&&(t===i||t===o)&&e.lastValue==="")return t;if(f-d===1&&m.indexOf(t[d])!==-1){var x=a===0?"":v;t=t.substring(0,d)+x+t.substring(d+1,t.length)}var w=function(B,V,Y){var G=!1,W=!1;i.startsWith("-")?G=!1:B.startsWith("--")?(G=!1,W=!0):o.startsWith("-")&&B.length===o.length?G=!1:B[0]==="-"&&(G=!0);var Z=G?1:0;return W&&(Z=2),Z&&(B=B.substring(Z),V-=Z,Y-=Z),{value:B,start:V,end:Y,hasNegation:G}},C=w(t,d,f),E=C.hasNegation;r=C,t=r.value,d=r.start,f=r.end;var D=w(e.lastValue,l.start,l.end),T=D.start,A=D.end,_=D.value,R=t.substring(d,f);t.length&&_.length&&(T>_.length-o.length||A<i.length)&&!(R&&o.startsWith(R))&&(t=_);var N=0;t.startsWith(i)?N+=i.length:d<i.length&&(N=d),t=t.substring(N),f-=N;var I=t.length,$=t.length-o.length;t.endsWith(o)?I=$:(f>$||f>t.length-o.length)&&(I=f),t=t.substring(0,I),t=t2e(E?"-"+t:t,s),t=(t.match(n2e(v))||[]).join("");var L=t.indexOf(v);t=t.replace(new RegExp(zte(v),"g"),function(B,V){return V===L?".":""});var z=S8(t,s),F=z.beforeDecimal,q=z.afterDecimal,H=z.addNegation;return c.end-c.start<l.end-l.start&&F===""&&y&&!parseFloat(q)&&(t=H?"-":""),t}function i2e(t,e){var n=e.prefix;n===void 0&&(n="");var r=e.suffix;r===void 0&&(r="");var s=Array.from({length:t.length+1}).map(function(){return!0}),i=t[0]==="-";s.fill(!1,0,n.length+(i?1:0));var o=t.length;return s.fill(!1,o-r.length+1,o+1),s}function o2e(t){var e=m_(t),n=e.thousandSeparator,r=e.decimalSeparator,s=t.prefix;s===void 0&&(s="");var i=t.allowNegative;if(i===void 0&&(i=!0),n===r)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+r+` (default value for decimalSeparator is .)
     `);return s.startsWith("-")&&i&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+s+`
      allowNegative: `+i+`
    `),i=!1),Object.assign(Object.assign({},t),{allowNegative:i})}function a2e(t){t=o2e(t),t.decimalSeparator,t.allowedDecimalSeparators,t.thousandsGroupStyle;var e=t.suffix,n=t.allowNegative,r=t.allowLeadingZeros,s=t.onKeyDown;s===void 0&&(s=kp);var i=t.onBlur;i===void 0&&(i=kp);var o=t.thousandSeparator,a=t.decimalScale,l=t.fixedDecimalScale,c=t.prefix;c===void 0&&(c="");var d=t.defaultValue,f=t.value,p=t.valueIsNumericString,m=t.onValueChange,v=Pte(t,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),y=m_(t),x=y.decimalSeparator,w=y.allowedDecimalSeparators,C=function(H){return BB(H,t)},E=function(H,B){return s2e(H,B,t)},D=$y(f)?d:f,T=p??r2e(D,c,e);$y(f)?$y(d)||(T=T||typeof d=="number"):T=T||typeof f=="number";var A=function(H){return $te(H)?H:(typeof H=="number"&&(H=Bte(H)),T&&typeof a=="number"?zB(H,a,!!l):H)},_=qte(A(f),A(d),!!T,C,E,m),R=_[0],N=R.numAsString,I=R.formattedValue,$=_[1],L=function(H){var B=H.target,V=H.key,Y=B.selectionStart,G=B.selectionEnd,W=B.value;if(W===void 0&&(W=""),(V==="Backspace"||V==="Delete")&&G<c.length){H.preventDefault();return}if(Y!==G){s(H);return}V==="Backspace"&&W[0]==="-"&&Y===c.length+1&&n&&og(B,1),a&&l&&(V==="Backspace"&&W[Y-1]===x?(og(B,Y-1),H.preventDefault()):V==="Delete"&&W[Y]===x&&H.preventDefault()),w!=null&&w.includes(V)&&W[Y]===x&&og(B,Y+1);var Z=o===!0?",":o;V==="Backspace"&&W[Y-1]===Z&&og(B,Y-1),V==="Delete"&&W[Y]===Z&&og(B,Y+1),s(H)},z=function(H){var B=N;if(B.match(/\d/g)||(B=""),r||(B=Ube(B)),l&&a&&(B=zB(B,a,l)),B!==N){var V=BB(B,t);$({formattedValue:V,value:B,floatValue:parseFloat(B)},{event:H,source:mS.event})}i(H)},F=function(H){return H===x?!0:gS(H)},q=function(H){var B=H.currentValue,V=H.lastValue,Y=H.formattedValue,G=H.currentValueIndex,W=H.formattedValueIndex,Z=B[G],Q=Y[W],X=Hte(V,B),re=X.to,ne=function(ee){return E(ee).indexOf(".")+c.length};return f===0&&l&&a&&B[re.start]===x&&ne(B)<G&&ne(Y)>W?!1:G>=re.start&&G<re.end&&w&&w.includes(Z)&&Q===x?!0:Z===Q};return Object.assign(Object.assign({},v),{value:I,valueIsNumericString:!1,isValidInputCharacter:F,isCharacterSame:q,onValueChange:$,format:C,removeFormatting:E,getCaretBoundary:function(H){return i2e(H,t)},onKeyDown:L,onBlur:z})}function l2e(t){var e=a2e(t);return xe.createElement(e2e,Object.assign({},e))}var YI={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};function HB({direction:t,style:e,...n}){return g.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:t==="up"?"rotate(180deg)":void 0,...e},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:g.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}const c2e=/^(0\.0*|-0(\.0*)?)$/,u2e=/^-?0\d+(\.\d+)?\.?$/,d2e=/\.\d*0$/,Ute=/^-?\d+\.$/;function GI(t){return typeof t=="string"&&t!==""&&!Number.isNaN(Number(t))}function HR(t){return typeof t=="number"?t<Number.MAX_SAFE_INTEGER:t===""||GI(t)&&Number(t)<Number.MAX_SAFE_INTEGER}function f2e(t){return t.toString().replace(".","").length}function p2e(t,e){return(typeof t=="number"?t<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(t)))&&!Number.isNaN(t)&&f2e(e)<14&&e!==""}function qB(t,e,n){if(t===void 0)return!0;const r=e===void 0||t>=e,s=n===void 0||t<=n;return r&&s}const h2e={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},m2e=(t,{size:e})=>({controls:{"--ni-chevron-size":Qt(e,"ni-chevron-size")}});function g2e(t,e,n){const r=t.toString(),s=Ute.test(r),i=r.replace(/^0+(?=\d)/,""),o=parseFloat(i);if(Number.isNaN(o))return i;if(o>Number.MAX_SAFE_INTEGER)return e!==void 0?e:i;const a=Eu(o,n,e);return s?`${a.toString().replace(/^0+(?=\d)/,"")}.`:a}const Jy=Fe((t,e)=>{const n=Ce("NumberInput",h2e,t),{className:r,classNames:s,styles:i,unstyled:o,vars:a,onChange:l,onValueChange:c,value:d,defaultValue:f,max:p,min:m,step:v,hideControls:y,rightSection:x,isAllowed:w,clampBehavior:C,onBlur:E,allowDecimal:D,decimalScale:T,onKeyDown:A,onKeyDownCapture:_,handlersRef:R,startValue:N,disabled:I,rightSectionPointerEvents:$,allowNegative:L,readOnly:z,size:F,rightSectionWidth:q,stepHoldInterval:H,stepHoldDelay:B,allowLeadingZeros:V,withKeyboardEvents:Y,trimLeadingZeroesOnBlur:G,allowedDecimalSeparators:W,attributes:Z,...Q}=n,X=bt({name:"NumberInput",classes:YI,props:n,classNames:s,styles:i,unstyled:o,attributes:Z,vars:a,varsResolver:m2e}),{resolvedClassNames:re,resolvedStyles:ne}=Ma({classNames:s,styles:i,props:n}),[ee,oe]=gi({value:d,defaultValue:f,finalValue:"",onChange:l}),ce=B!==void 0&&H!==void 0,ue=O.useRef(null),pe=O.useRef(null),de=O.useRef(0),me=(Le,_e)=>{_e.source==="event"&&oe(p2e(Le.floatValue,Le.value)&&!c2e.test(Le.value)&&!(V&&u2e.test(Le.value))&&!d2e.test(Le.value)&&!Ute.test(Le.value)?Le.floatValue:Le.value),c==null||c(Le,_e)},Se=Le=>{const _e=String(Le).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return _e?Math.max(0,(_e[1]?_e[1].length:0)-(_e[2]?+_e[2]:0)):0},De=Le=>{ue.current&&typeof Le<"u"&&ue.current.setSelectionRange(Le,Le)},Ae=O.useRef(Ok);Ae.current=()=>{if(!HR(ee))return;let Le;const _e=Se(ee),Be=Se(v),ut=Math.max(_e,Be),lt=10**ut;if(!GI(ee)&&(typeof ee!="number"||Number.isNaN(ee)))Le=Eu(N,m,p);else if(p!==void 0){const jt=(Math.round(Number(ee)*lt)+Math.round(v*lt))/lt;Le=jt<=p?jt:p}else Le=(Math.round(Number(ee)*lt)+Math.round(v*lt))/lt;const At=Le.toFixed(ut);oe(parseFloat(At)),c==null||c({floatValue:parseFloat(At),formattedValue:At,value:At},{source:"increment"}),setTimeout(()=>{var jt;return De((jt=ue.current)==null?void 0:jt.value.length)},0)};const fe=O.useRef(Ok);fe.current=()=>{if(!HR(ee))return;let Le;const _e=m!==void 0?m:L?Number.MIN_SAFE_INTEGER:0,Be=Se(ee),ut=Se(v),lt=Math.max(Be,ut),At=10**lt;if(!GI(ee)&&typeof ee!="number"||Number.isNaN(ee))Le=Eu(N,_e,p);else{const Ot=(Math.round(Number(ee)*At)-Math.round(v*At))/At;Le=_e!==void 0&&Ot<_e?_e:Ot}const jt=Le.toFixed(lt);oe(parseFloat(jt)),c==null||c({floatValue:parseFloat(jt),formattedValue:jt,value:jt},{source:"decrement"}),setTimeout(()=>{var Ot;return De((Ot=ue.current)==null?void 0:Ot.value.length)},0)};const Te=Le=>{var _e,Be;A==null||A(Le),!(z||!Y)&&(Le.key==="ArrowUp"&&(Le.preventDefault(),(_e=Ae.current)==null||_e.call(Ae)),Le.key==="ArrowDown"&&(Le.preventDefault(),(Be=fe.current)==null||Be.call(fe)))},Ne=Le=>{if(_==null||_(Le),Le.key==="Backspace"){const _e=ue.current;_e&&_e.selectionStart===0&&_e.selectionStart===_e.selectionEnd&&(Le.preventDefault(),window.setTimeout(()=>De(0),0))}},Ue=Le=>{let _e=ee;C==="blur"&&typeof _e=="number"&&(_e=Eu(_e,m,p)),G&&typeof _e=="string"&&Se(_e)<15&&(_e=g2e(_e,p,m)),ee!==_e&&oe(_e),E==null||E(Le)};uS(R,{increment:Ae.current,decrement:fe.current});const rt=Le=>{var _e,Be;Le?(_e=Ae.current)==null||_e.call(Ae):(Be=fe.current)==null||Be.call(fe),de.current+=1},ot=Le=>{if(rt(Le),ce){const _e=typeof H=="number"?H:H(de.current);pe.current=window.setTimeout(()=>ot(Le),_e)}},Je=(Le,_e)=>{var Be;Le.preventDefault(),(Be=ue.current)==null||Be.focus(),rt(_e),ce&&(pe.current=window.setTimeout(()=>ot(_e),B))},je=()=>{pe.current&&window.clearTimeout(pe.current),pe.current=null,de.current=0},We=g.jsxs("div",{...X("controls"),children:[g.jsx(or,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:I||typeof ee=="number"&&p!==void 0&&ee>=p,mod:{direction:"up"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{Je(Le,!0)},onPointerUp:je,onPointerLeave:je,children:g.jsx(HB,{direction:"up"})}),g.jsx(or,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:I||typeof ee=="number"&&m!==void 0&&ee<=m,mod:{direction:"down"},onMouseDown:Le=>Le.preventDefault(),onPointerDown:Le=>{Je(Le,!1)},onPointerUp:je,onPointerLeave:je,children:g.jsx(HB,{direction:"down"})})]});return g.jsx(Rl,{component:l2e,allowNegative:L,className:Ms(YI.root,r),size:F,inputMode:"decimal",...Q,readOnly:z,disabled:I,value:ee,getInputRef:Ds(e,ue),onValueChange:me,rightSection:y||z||!HR(ee)?x:x||We,classNames:re,styles:ne,unstyled:o,__staticSelector:"NumberInput",decimalScale:D?T:0,onKeyDown:Te,onKeyDownCapture:Ne,rightSectionPointerEvents:$??(I?"none":void 0),rightSectionWidth:q??`var(--ni-right-section-width-${F||"sm"})`,allowLeadingZeros:V,allowedDecimalSeparators:W,onBlur:Ue,attributes:Z,isAllowed:Le=>C==="strict"?w?w(Le)&&qB(Le.floatValue,m,p):qB(Le.floatValue,m,p):w?w(Le):!0})});Jy.classes={...Rl.classes,...YI};Jy.displayName="@mantine/core/NumberInput";var vw={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd","stripes-animation-vertical":"m_e0fb7a86",label:"m_91e40b74"};const[v2e,Vte]=Ys("Progress.Root component was not found in tree"),w8=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,...a}=Ce("ProgressLabel",null,t),l=Vte();return g.jsx(le,{ref:e,...l.getStyles("label",{className:r,style:s,classNames:n,styles:i}),...a})});w8.classes=vw;w8.displayName="@mantine/core/ProgressLabel";const y2e=(t,{size:e,radius:n,transitionDuration:r})=>({root:{"--progress-size":Qt(e,"progress-size"),"--progress-radius":n===void 0?void 0:ar(n),"--progress-transition-duration":typeof r=="number"?`${r}ms`:void 0}}),g_=Fe((t,e)=>{const n=Ce("ProgressRoot",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,autoContrast:c,transitionDuration:d,orientation:f,attributes:p,mod:m,...v}=n,y=bt({name:"Progress",classes:vw,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:p,vars:l,varsResolver:y2e});return g.jsx(v2e,{value:{getStyles:y,autoContrast:c},children:g.jsx(le,{ref:e,mod:[{orientation:f},m],...y("root"),...v})})});g_.classes=vw;g_.displayName="@mantine/core/ProgressRoot";const b2e={withAria:!0},v_=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,value:a,withAria:l,color:c,striped:d,animated:f,mod:p,...m}=Ce("ProgressSection",b2e,t),v=Vte(),y=Dr(),x=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,"aria-valuetext":`${a}%`}:{};return g.jsx(le,{ref:e,...v.getStyles("section",{className:r,classNames:n,styles:i,style:s}),...m,...x,mod:[{striped:d||f,animated:f},p],__vars:{"--progress-section-size":`${a}%`,"--progress-section-color":Fr(c,y),"--progress-label-color":iv(v.autoContrast,y)?Qd({color:c,theme:y,autoContrast:v.autoContrast}):void 0}})});v_.classes=vw;v_.displayName="@mantine/core/ProgressSection";const P1=Fe((t,e)=>{const n=Ce("Progress",null,t),{value:r,classNames:s,styles:i,vars:o,color:a,striped:l,animated:c,"aria-label":d,...f}=n,{resolvedClassNames:p,resolvedStyles:m}=Ma({classNames:s,styles:i,props:n});return g.jsx(g_,{ref:e,classNames:p,styles:m,vars:o,...f,children:g.jsx(v_,{value:r,color:a,striped:l,animated:c,"aria-label":d})})});P1.classes=vw;P1.displayName="@mantine/core/Progress";P1.Section=v_;P1.Root=g_;P1.Label=w8;var Wte={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};const[x2e,Yte]=Jd(),[S2e,w2e]=Jd();var Gte={card:"m_9dc8ae12"};const C2e={withBorder:!0},E2e=(t,{radius:e})=>({card:{"--card-radius":ar(e)}}),C8=Fe((t,e)=>{const n=Ce("RadioCard",C2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,checked:c,mod:d,withBorder:f,value:p,onClick:m,name:v,onKeyDown:y,attributes:x,...w}=n,C=bt({name:"RadioCard",classes:Gte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l,varsResolver:E2e,rootSelector:"card"}),{dir:E}=Hu(),D=Yte(),T=typeof c=="boolean"?c:(D==null?void 0:D.value)===p||!1,A=v||(D==null?void 0:D.name),_=R=>{if(y==null||y(R),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(R.nativeEvent.code)){R.preventDefault();const N=Array.from(document.querySelectorAll(`[role="radio"][name="${A||"__mantine"}"]`)),I=N.findIndex(z=>z===R.target),$=I+1>=N.length?0:I+1,L=I-1<0?N.length-1:I-1;R.nativeEvent.code==="ArrowDown"&&(N[$].focus(),N[$].click()),R.nativeEvent.code==="ArrowUp"&&(N[L].focus(),N[L].click()),R.nativeEvent.code==="ArrowLeft"&&(N[E==="ltr"?L:$].focus(),N[E==="ltr"?L:$].click()),R.nativeEvent.code==="ArrowRight"&&(N[E==="ltr"?$:L].focus(),N[E==="ltr"?$:L].click())}};return g.jsx(S2e,{value:{checked:T},children:g.jsx(or,{ref:e,mod:[{"with-border":f,checked:T},d],...C("card"),...w,role:"radio","aria-checked":T,name:A,onClick:R=>{m==null||m(R),D==null||D.onChange(p||"")},onKeyDown:_})})});C8.displayName="@mantine/core/RadioCard";C8.classes=Gte;const E8=Fe((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:i,wrapperProps:o,children:a,name:l,readOnly:c,disabled:d,...f}=Ce("RadioGroup",null,t),p=bi(l),[m,v]=gi({value:n,defaultValue:r,finalValue:"",onChange:s}),y=x=>!c&&v(typeof x=="string"?x:x.currentTarget.value);return g.jsx(x2e,{value:{value:m,onChange:y,size:i,name:p,disabled:d},children:g.jsx(Pn.Wrapper,{size:i,ref:e,...o,...f,labelElement:"div",__staticSelector:"RadioGroup",children:g.jsx(G9,{role:"radiogroup",children:a})})})});E8.classes=Pn.Wrapper.classes;E8.displayName="@mantine/core/RadioGroup";function Kte({size:t,style:e,...n}){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Ee(t),height:Ee(t),...e},"aria-hidden":!0,...n,children:g.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var Zte={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};const M2e={icon:Kte},D2e=(t,{radius:e,color:n,size:r,iconColor:s,variant:i,autoContrast:o})=>{const a=Mc({color:n||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{indicator:{"--radio-size":Qt(r,"radio-size"),"--radio-radius":e===void 0?void 0:ar(e),"--radio-color":i==="outline"?l:Fr(n,t),"--radio-icon-size":Qt(r,"radio-icon-size"),"--radio-icon-color":s?Fr(s,t):iv(o,t)?Qd({color:n,theme:t,autoContrast:o}):void 0}}},M8=Fe((t,e)=>{const n=Ce("RadioIndicator",M2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,icon:c,radius:d,color:f,iconColor:p,autoContrast:m,checked:v,mod:y,variant:x,disabled:w,attributes:C,...E}=n,D=bt({name:"RadioIndicator",classes:Zte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:C,vars:l,varsResolver:D2e,rootSelector:"indicator"}),T=w2e(),A=typeof v=="boolean"?v:(T==null?void 0:T.checked)||!1;return g.jsx(le,{ref:e,...D("indicator",{variant:x}),variant:x,mod:[{checked:A,disabled:w},y],...E,children:g.jsx(c,{...D("icon")})})});M8.displayName="@mantine/core/RadioIndicator";M8.classes=Zte;const k2e={labelPosition:"right"},T2e=(t,{size:e,radius:n,color:r,iconColor:s,variant:i,autoContrast:o})=>{const a=Mc({color:r||t.primaryColor,theme:t}),l=a.isThemeColor&&a.shade===void 0?`var(--mantine-color-${a.color}-outline)`:a.color;return{root:{"--radio-size":Qt(e,"radio-size"),"--radio-radius":n===void 0?void 0:ar(n),"--radio-color":i==="outline"?l:Fr(r,t),"--radio-icon-color":s?Fr(s,t):iv(o,t)?Qd({color:r,theme:t,autoContrast:o}):void 0,"--radio-icon-size":Qt(e,"radio-icon-size")}}},qs=Fe((t,e)=>{const n=Ce("Radio",k2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,id:c,size:d,label:f,labelPosition:p,description:m,error:v,radius:y,color:x,variant:w,disabled:C,wrapperProps:E,icon:D=Kte,rootRef:T,iconColor:A,onChange:_,mod:R,attributes:N,checked:I,...$}=n,L=bt({name:"Radio",classes:Wte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:N,vars:l,varsResolver:T2e}),z=Yte(),F=(z==null?void 0:z.size)??d,q=n.size?d:F,{styleProps:H,rest:B}=C1($),V=bi(c),Y=z?z.value===B.value:void 0,G={checked:Y??I,name:(z==null?void 0:z.name)??B.name,onChange:W=>{z==null||z.onChange(W),_==null||_(W)},disabled:(z==null?void 0:z.disabled)??C};return g.jsx(KA,{...L("root"),__staticSelector:"Radio",__stylesApiProps:n,id:V,size:q,labelPosition:p,label:f,description:m,error:v,disabled:G.disabled,classNames:r,styles:o,unstyled:a,"data-checked":(Y??I)||void 0,variant:w,ref:T,mod:R,...H,...E,children:g.jsxs(le,{...L("inner"),mod:{"label-position":p},children:[g.jsx(le,{...L("radio",{focusable:!0,variant:w}),...B,...G,component:"input",mod:{error:!!v},ref:e,id:V,type:"radio"}),g.jsx(D,{...L("icon"),"aria-hidden":!0})]})})});qs.classes=Wte;qs.displayName="@mantine/core/Radio";qs.Group=E8;qs.Card=C8;qs.Indicator=M8;const A2e={duration:100,transition:"fade"};function UB(t,e){return{...A2e,...e,...t}}var y_={tooltip:"m_1b3c8819",arrow:"m_f898399f"};function _2e({offset:t,position:e,defaultOpened:n}){const[r,s]=O.useState(n),i=O.useRef(null),{x:o,y:a,elements:l,refs:c,update:d,placement:f}=HA({placement:e,middleware:[a9({crossAxis:!0,padding:5,rootBoundary:"document"})]}),p=f.includes("right")?t:e.includes("left")?t*-1:0,m=f.includes("bottom")?t:e.includes("top")?t*-1:0,v=O.useCallback(({clientX:y,clientY:x})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:y,y:x,left:y+p,top:x+m,right:y,bottom:x}}})},[l.reference]);return O.useEffect(()=>{if(c.floating.current){const y=i.current;y.addEventListener("mousemove",v);const x=Ld(c.floating.current);return x.forEach(w=>{w.addEventListener("scroll",d)}),()=>{y.removeEventListener("mousemove",v),x.forEach(w=>{w.removeEventListener("scroll",d)})}}},[l.reference,c.floating.current,d,v,r]),{handleMouseMove:v,x:o,y:a,opened:r,setOpened:s,boundaryRef:i,floating:c.setFloating}}const O2e={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:yi("popover")},R2e=(t,{radius:e,color:n})=>({tooltip:{"--tooltip-radius":e===void 0?void 0:ar(e),"--tooltip-bg":n?Fr(n,t):void 0,"--tooltip-color":n?"var(--mantine-color-white)":void 0}}),D8=Fe((t,e)=>{const n=Ce("TooltipFloating",O2e,t),{children:r,refProp:s,withinPortal:i,style:o,className:a,classNames:l,styles:c,unstyled:d,radius:f,color:p,label:m,offset:v,position:y,multiline:x,zIndex:w,disabled:C,defaultOpened:E,variant:D,vars:T,portalProps:A,attributes:_,...R}=n,N=Dr(),I=bt({name:"TooltipFloating",props:n,classes:y_,className:a,style:o,classNames:l,styles:c,unstyled:d,attributes:_,rootSelector:"tooltip",vars:T,varsResolver:R2e}),{handleMouseMove:$,x:L,y:z,opened:F,boundaryRef:q,floating:H,setOpened:B}=_2e({offset:v,position:y,defaultOpened:E}),V=xh(r);if(!V)throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");const Y=Ds(q,NA(V),e),G=V.props,W=Q=>{var X;(X=G.onMouseEnter)==null||X.call(G,Q),$(Q),B(!0)},Z=Q=>{var X;(X=G.onMouseLeave)==null||X.call(G,Q),B(!1)};return g.jsxs(g.Fragment,{children:[g.jsx(Hd,{...A,withinPortal:i,children:g.jsx(le,{...R,...I("tooltip",{style:{...QP(o,N),zIndex:w,display:!C&&F?"block":"none",top:(z&&Math.round(z))??"",left:(L&&Math.round(L))??""}}),variant:D,ref:H,mod:{multiline:x},children:m})}),O.cloneElement(V,{...G,[s]:Y,onMouseEnter:W,onMouseLeave:Z})]})});D8.classes=y_;D8.displayName="@mantine/core/TooltipFloating";const Jte=O.createContext(!1),N2e=Jte.Provider,j2e=()=>O.useContext(Jte),I2e={openDelay:0,closeDelay:0};function k8(t){const{openDelay:e,closeDelay:n,children:r}=Ce("TooltipGroup",I2e,t);return g.jsx(N2e,{value:!0,children:g.jsx(ree,{delay:{open:e,close:n},children:r})})}k8.displayName="@mantine/core/TooltipGroup";k8.extend=t=>t;function L2e(t){if(t===void 0)return{shift:!0,flip:!0};const e={...t};return t.shift===void 0&&(e.shift=!0),t.flip===void 0&&(e.flip=!0),e}function P2e(t){const e=L2e(t.middlewares),n=[JQ(t.offset)];return e.shift&&n.push(a9(typeof e.shift=="boolean"?{padding:8}:{padding:8,...e.shift})),e.flip&&n.push(typeof e.flip=="boolean"?Lk():Lk(e.flip)),n.push(XQ({element:t.arrowRef,padding:t.arrowOffset})),e.inline?n.push(typeof e.inline=="boolean"?Px():Px(e.inline)):t.inline&&n.push(Px()),n}function $2e(t){var T,A,_;const[e,n]=O.useState(t.defaultOpened),s=typeof t.opened=="boolean"?t.opened:e,i=j2e(),o=bi(),a=O.useCallback(R=>{n(R),R&&w(o)},[o]),{x:l,y:c,context:d,refs:f,placement:p,middlewareData:{arrow:{x:m,y:v}={}}}=HA({strategy:t.strategy,placement:t.position,open:s,onOpenChange:a,middleware:P2e(t),whileElementsMounted:FI}),{delay:y,currentId:x,setCurrentId:w}=see(d,{id:o}),{getReferenceProps:C,getFloatingProps:E}=oee([tee(d,{enabled:(T=t.events)==null?void 0:T.hover,delay:i?y:{open:t.openDelay,close:t.closeDelay},mouseOnly:!((A=t.events)!=null&&A.touch)}),n0e(d,{enabled:(_=t.events)==null?void 0:_.focus,visibleOnly:!0}),aee(d,{role:"tooltip"}),iee(d,{enabled:typeof t.opened>"u"})]);Ru(()=>{var R;(R=t.onPositionChange)==null||R.call(t,p)},[p]);const D=s&&x&&x!==o;return{x:l,y:c,arrowX:m,arrowY:v,reference:f.setReference,floating:f.setFloating,getFloatingProps:E,getReferenceProps:C,isGroupPhase:D,opened:s,placement:p}}const VB={position:"top",refProp:"ref",withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:yi("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},z2e=(t,{radius:e,color:n,variant:r,autoContrast:s})=>{const i=t.variantColorResolver({theme:t,color:n||t.primaryColor,autoContrast:s,variant:r||"filled"});return{tooltip:{"--tooltip-radius":e===void 0?void 0:ar(e),"--tooltip-bg":n?i.background:void 0,"--tooltip-color":n?i.color:void 0}}},ss=Fe((t,e)=>{const n=Ce("Tooltip",VB,t),{children:r,position:s,refProp:i,label:o,openDelay:a,closeDelay:l,onPositionChange:c,opened:d,defaultOpened:f,withinPortal:p,radius:m,color:v,classNames:y,styles:x,unstyled:w,style:C,className:E,withArrow:D,arrowSize:T,arrowOffset:A,arrowRadius:_,arrowPosition:R,offset:N,transitionProps:I,multiline:$,events:L,zIndex:z,disabled:F,positionDependencies:q,onClick:H,onMouseEnter:B,onMouseLeave:V,inline:Y,variant:G,keepMounted:W,vars:Z,portalProps:Q,mod:X,floatingStrategy:re,middlewares:ne,autoContrast:ee,attributes:oe,target:ce,...ue}=Ce("Tooltip",VB,n),{dir:pe}=Hu(),de=O.useRef(null),me=$2e({position:Cee(pe,s),closeDelay:l,openDelay:a,onPositionChange:c,opened:d,defaultOpened:f,events:L,arrowRef:de,arrowOffset:A,offset:typeof N=="number"?N+(D?T/2:0):N,positionDependencies:[...q,ce??r],inline:Y,strategy:re,middlewares:ne});O.useEffect(()=>{const Ne=ce instanceof HTMLElement?ce:typeof ce=="string"?document.querySelector(ce):(ce==null?void 0:ce.current)||null;Ne&&me.reference(Ne)},[ce,me]);const Se=bt({name:"Tooltip",props:n,classes:y_,className:E,style:C,classNames:y,styles:x,unstyled:w,attributes:oe,rootSelector:"tooltip",vars:Z,varsResolver:z2e}),De=xh(r);if(!ce&&!De)return null;if(ce){const Ne=UB(I,{duration:100,transition:"fade"});return g.jsx(g.Fragment,{children:g.jsx(Hd,{...Q,withinPortal:p,children:g.jsx(Sc,{...Ne,keepMounted:W,mounted:!F&&!!me.opened,duration:me.isGroupPhase?10:Ne.duration,children:Ue=>g.jsxs(le,{...ue,"data-fixed":re==="fixed"||void 0,variant:G,mod:[{multiline:$},X],...me.getFloatingProps({ref:me.floating,className:Se("tooltip").className,style:{...Se("tooltip").style,...Ue,zIndex:z,top:me.y??0,left:me.x??0}}),children:[o,g.jsx(Pk,{ref:de,arrowX:me.arrowX,arrowY:me.arrowY,visible:D,position:me.placement,arrowSize:T,arrowOffset:A,arrowRadius:_,arrowPosition:R,...Se("arrow")})]})})})})}const Ae=De.props,fe=Ds(me.reference,NA(De),e),Te=UB(I,{duration:100,transition:"fade"});return g.jsxs(g.Fragment,{children:[g.jsx(Hd,{...Q,withinPortal:p,children:g.jsx(Sc,{...Te,keepMounted:W,mounted:!F&&!!me.opened,duration:me.isGroupPhase?10:Te.duration,children:Ne=>g.jsxs(le,{...ue,"data-fixed":re==="fixed"||void 0,variant:G,mod:[{multiline:$},X],...me.getFloatingProps({ref:me.floating,className:Se("tooltip").className,style:{...Se("tooltip").style,...Ne,zIndex:z,top:me.y??0,left:me.x??0}}),children:[o,g.jsx(Pk,{ref:de,arrowX:me.arrowX,arrowY:me.arrowY,visible:D,position:me.placement,arrowSize:T,arrowOffset:A,arrowRadius:_,arrowPosition:R,...Se("arrow")})]})})}),O.cloneElement(De,me.getReferenceProps({onClick:H,onMouseEnter:B,onMouseLeave:V,onMouseMove:n.onMouseMove,onPointerDown:n.onPointerDown,onPointerEnter:n.onPointerEnter,...Ae,className:Ms(E,Ae.className),[i]:fe}))]})});ss.classes=y_;ss.displayName="@mantine/core/Tooltip";ss.Floating=D8;ss.Group=k8;var Xte={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const F2e={withItemsBorders:!0},B2e=(t,{radius:e,color:n,transitionDuration:r,size:s,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:ar(e),"--sc-color":n?Fr(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":i,"--sc-padding":Qt(s,"sc-padding"),"--sc-font-size":hs(s)}}),T8=Fe((t,e)=>{var ce,ue;const n=Ce("SegmentedControl",F2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,data:c,value:d,defaultValue:f,onChange:p,size:m,name:v,disabled:y,readOnly:x,fullWidth:w,orientation:C,radius:E,color:D,transitionDuration:T,transitionTimingFunction:A,variant:_,autoContrast:R,withItemsBorders:N,mod:I,attributes:$,...L}=n,z=bt({name:"SegmentedControl",props:n,classes:Xte,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:$,vars:l,varsResolver:B2e}),F=Dr(),q=c.map(pe=>typeof pe=="string"?{label:pe,value:pe}:pe),H=ame(),[B,V]=O.useState(Sg()),[Y,G]=O.useState(null),[W,Z]=O.useState({}),Q=(pe,de)=>{W[de]=pe,Z(W)},[X,re]=gi({value:d,defaultValue:f,finalValue:Array.isArray(c)?((ce=q.find(pe=>!pe.disabled))==null?void 0:ce.value)??((ue=c[0])==null?void 0:ue.value)??null:null,onChange:p}),ne=bi(v),ee=q.map(pe=>O.createElement(le,{...z("control"),mod:{active:X===pe.value,orientation:C},key:pe.value},O.createElement("input",{...z("input"),disabled:y||pe.disabled,type:"radio",name:ne,value:pe.value,id:`${ne}-${pe.value}`,checked:X===pe.value,onChange:()=>!x&&re(pe.value),"data-focus-ring":F.focusRing,key:`${pe.value}-input`}),O.createElement(le,{component:"label",...z("label"),mod:{active:X===pe.value&&!(y||pe.disabled),disabled:y||pe.disabled,"read-only":x},htmlFor:`${ne}-${pe.value}`,ref:de=>Q(de,pe.value),__vars:{"--sc-label-color":D!==void 0?Qd({color:D,theme:F,autoContrast:R}):void 0},key:`${pe.value}-label`},g.jsx("span",{...z("innerLabel"),children:pe.label})))),oe=Ds(e,pe=>G(pe));return nme(()=>{V(Sg())},[c.length]),c.length===0?null:g.jsxs(le,{...z("root"),variant:_,size:m,ref:oe,mod:[{"full-width":w,orientation:C,initialized:H,"with-items-borders":N},I],...L,role:"radiogroup","data-disabled":y,children:[typeof X=="string"&&g.jsx(D9,{target:W[X],parent:Y,component:"span",transitionDuration:"var(--sc-transition-duration)",...z("indicator")},B),ee]})});T8.classes=Xte;T8.displayName="@mantine/core/SegmentedControl";const H2e={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left",openOnFocus:!0},uo=Fe((t,e)=>{const n=Ce("Select",H2e,t),{classNames:r,styles:s,unstyled:i,vars:o,dropdownOpened:a,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:d,onFocus:f,onBlur:p,onClick:m,onChange:v,data:y,value:x,defaultValue:w,selectFirstOptionOnChange:C,selectFirstOptionOnDropdownOpen:E,onOptionSubmit:D,comboboxProps:T,readOnly:A,disabled:_,filter:R,limit:N,withScrollArea:I,maxDropdownHeight:$,size:L,searchable:z,rightSection:F,checkIconPosition:q,withCheckIcon:H,withAlignedLabels:B,nothingFoundMessage:V,name:Y,form:G,searchValue:W,defaultSearchValue:Z,onSearchChange:Q,allowDeselect:X,error:re,rightSectionPointerEvents:ne,id:ee,clearable:oe,clearButtonProps:ce,hiddenInputProps:ue,renderOption:pe,onClear:de,autoComplete:me,scrollAreaProps:Se,__defaultRightSection:De,__clearSection:Ae,__clearable:fe,chevronColor:Te,autoSelectOnBlur:Ne,openOnFocus:Ue,attributes:rt,...ot}=n,Je=O.useMemo(()=>Rye(y),[y]),je=O.useRef({}),We=O.useMemo(()=>Yee(Je),[Je]),Le=bi(ee),[_e,Be,ut]=gi({value:x,defaultValue:w,finalValue:null,onChange:v}),lt=typeof _e=="string"?_e in We?We[_e]:je.current[_e]:void 0,At=CQ(lt),[jt,Ot,Pt]=gi({value:W,defaultValue:Z,finalValue:lt?lt.label:"",onChange:Q}),Rt=Qee({opened:a,defaultOpened:l,onDropdownOpen:()=>{d==null||d(),E?Rt.selectFirstOption():Rt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c==null||c(),setTimeout(Rt.resetSelectedOption,0)}}),Nt=Vt=>{Ot(Vt),Rt.resetSelectedOption()},{resolvedClassNames:Fn,resolvedStyles:pn}=Ma({props:n,styles:s,classNames:r});O.useEffect(()=>{C&&Rt.selectFirstOption()},[C,jt]),O.useEffect(()=>{x===null&&Nt(""),typeof x=="string"&&lt&&((At==null?void 0:At.value)!==lt.value||(At==null?void 0:At.label)!==lt.label)&&Nt(lt.label)},[x,lt]),O.useEffect(()=>{var Vt,an;!ut&&!Pt&&Nt(typeof _e=="string"?_e in We?(Vt=We[_e])==null?void 0:Vt.label:((an=je.current[_e])==null?void 0:an.label)||"":"")},[We,_e]),O.useEffect(()=>{_e&&_e in We&&(je.current[_e]=We[_e])},[We,_e]);const hn=g.jsx(Cr.ClearButton,{...ce,onClear:()=>{Be(null,null),Nt(""),de==null||de()}}),On=oe&&!!_e&&!_&&!A;return g.jsxs(g.Fragment,{children:[g.jsxs(Cr,{store:Rt,__staticSelector:"Select",classNames:Fn,styles:pn,unstyled:i,readOnly:A,size:L,attributes:rt,keepMounted:Ne,onOptionSubmit:Vt=>{D==null||D(Vt);const an=X&&We[Vt].value===_e?null:We[Vt],xn=an?an.value:null;xn!==_e&&Be(xn,an),!ut&&Nt(typeof xn=="string"&&(an==null?void 0:an.label)||""),Rt.closeDropdown()},...T,children:[g.jsx(Cr.Target,{targetType:z?"input":"button",autoComplete:me,children:g.jsx(Rl,{id:Le,ref:e,__defaultRightSection:g.jsx(Cr.Chevron,{size:L,error:re,unstyled:i,color:Te}),__clearSection:hn,__clearable:On,rightSection:F,rightSectionPointerEvents:ne||"none",...ot,size:L,__staticSelector:"Select",disabled:_,readOnly:A||!z,value:jt,onChange:Vt=>{Nt(Vt.currentTarget.value),Rt.openDropdown(),C&&Rt.selectFirstOption()},onFocus:Vt=>{Ue&&z&&Rt.openDropdown(),f==null||f(Vt)},onBlur:Vt=>{Ne&&Rt.clickSelectedOption(),z&&Rt.closeDropdown();const an=typeof _e=="string"&&(_e in We?We[_e]:je.current[_e]);Nt(an&&an.label||""),p==null||p(Vt)},onClick:Vt=>{z?Rt.openDropdown():Rt.toggleDropdown(),m==null||m(Vt)},classNames:Fn,styles:pn,unstyled:i,pointer:!z,error:re,attributes:rt})}),g.jsx(r1e,{data:Je,hidden:A||_,filter:R,search:jt,limit:N,hiddenWhenEmpty:!V,withScrollArea:I,maxDropdownHeight:$,filterOptions:!!z&&(lt==null?void 0:lt.label)!==jt,value:_e,checkIconPosition:q,withCheckIcon:H,withAlignedLabels:B,nothingFoundMessage:V,unstyled:i,labelId:ot.label?`${Le}-label`:void 0,"aria-label":ot.label?void 0:ot["aria-label"],renderOption:pe,scrollAreaProps:Se})]}),g.jsx(Cr.HiddenInput,{value:_e,name:Y,form:G,disabled:_,...ue})]})});uo.classes={...Rl.classes,...Cr.classes};uo.displayName="@mantine/core/Select";var Qte={container:"m_925c2d2c",root:"m_2415a157"};function q2e({spacing:t,verticalSpacing:e,cols:n,selector:r}){var d;const s=Dr(),i=e===void 0?t:e,o=Bu({"--sg-spacing-x":Er(Po(t)),"--sg-spacing-y":Er(Po(i)),"--sg-cols":(d=Po(n))==null?void 0:d.toString()}),a=ir(s.breakpoints).reduce((f,p)=>(f[p]||(f[p]={}),typeof t=="object"&&t[p]!==void 0&&(f[p]["--sg-spacing-x"]=Er(t[p])),typeof i=="object"&&i[p]!==void 0&&(f[p]["--sg-spacing-y"]=Er(i[p])),typeof n=="object"&&n[p]!==void 0&&(f[p]["--sg-cols"]=n[p]),f),{}),c=Wy(ir(a),s.breakpoints).filter(f=>ir(a[f.value]).length>0).map(f=>({query:`(min-width: ${s.breakpoints[f.value]})`,styles:a[f.value]}));return g.jsx(ef,{styles:o,media:c,selector:r})}function qR(t){return typeof t=="object"&&t!==null?ir(t):[]}function U2e(t){return t.sort((e,n)=>Lg(e)-Lg(n))}function V2e({spacing:t,verticalSpacing:e,cols:n}){const r=Array.from(new Set([...qR(t),...qR(e),...qR(n)]));return U2e(r)}function W2e({spacing:t,verticalSpacing:e,cols:n,selector:r}){var c;const s=e===void 0?t:e,i=Bu({"--sg-spacing-x":Er(Po(t)),"--sg-spacing-y":Er(Po(s)),"--sg-cols":(c=Po(n))==null?void 0:c.toString()}),o=V2e({spacing:t,verticalSpacing:e,cols:n}),a=o.reduce((d,f)=>(d[f]||(d[f]={}),typeof t=="object"&&t[f]!==void 0&&(d[f]["--sg-spacing-x"]=Er(t[f])),typeof s=="object"&&s[f]!==void 0&&(d[f]["--sg-spacing-y"]=Er(s[f])),typeof n=="object"&&n[f]!==void 0&&(d[f]["--sg-cols"]=n[f]),d),{}),l=o.map(d=>({query:`simple-grid (min-width: ${d})`,styles:a[d]}));return g.jsx(ef,{styles:i,container:l,selector:r})}const Y2e={cols:1,spacing:"md",type:"media"},A8=Fe((t,e)=>{const n=Ce("SimpleGrid",Y2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,cols:c,verticalSpacing:d,spacing:f,type:p,attributes:m,...v}=n,y=bt({name:"SimpleGrid",classes:Qte,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:m,vars:l}),x=E1();return p==="container"?g.jsxs(g.Fragment,{children:[g.jsx(W2e,{...n,selector:`.${x}`}),g.jsx("div",{...y("container"),children:g.jsx(le,{ref:e,...y("root",{className:x}),...v})})]}):g.jsxs(g.Fragment,{children:[g.jsx(q2e,{...n,selector:`.${x}`}),g.jsx(le,{ref:e,...y("root",{className:x}),...v})]})});A8.classes=Qte;A8.displayName="@mantine/core/SimpleGrid";var ene={root:"m_18320242","skeleton-fade":"m_299c329c"};const G2e={visible:!0,animate:!0},K2e=(t,{width:e,height:n,radius:r,circle:s})=>({root:{"--skeleton-height":Ee(n),"--skeleton-width":Ee(s?n:e),"--skeleton-radius":s?"1000px":r===void 0?void 0:ar(r)}}),br=Fe((t,e)=>{const n=Ce("Skeleton",G2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,width:c,height:d,circle:f,visible:p,radius:m,animate:v,mod:y,attributes:x,...w}=n,C=bt({name:"Skeleton",classes:ene,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l,varsResolver:K2e});return g.jsx(le,{ref:e,...C("root"),mod:[{visible:p,animate:v},y],...w})});br.classes=ene;br.displayName="@mantine/core/Skeleton";const vn=Fe((t,e)=>{const{w:n,h:r,miw:s,mih:i,...o}=Ce("Space",null,t);return g.jsx(le,{ref:e,...o,w:n,miw:s??n,h:r,mih:i??r})});vn.displayName="@mantine/core/Space";var tne={root:"m_559cce2d",content:"m_b912df4e",control:"m_b9131032"};const Z2e={maxHeight:100,initialState:!1},J2e=(t,{transitionDuration:e})=>({root:{"--spoiler-transition-duration":e!==void 0?`${e}ms`:void 0}}),_8=Fe((t,e)=>{const n=Ce("Spoiler",Z2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,initialState:c,maxHeight:d,hideLabel:f,showLabel:p,children:m,controlRef:v,transitionDuration:y,id:x,expanded:w,onExpandedChange:C,attributes:E,...D}=n,T=bt({name:"Spoiler",classes:tne,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:E,vars:l,varsResolver:J2e}),A=bi(x),_=`${A}-region`,[R,N]=gi({value:w,defaultValue:c,finalValue:!1,onChange:C}),{ref:I,height:$}=Qhe(),L=R?f:p,z=L!==null&&d<$;return g.jsxs(le,{...T("root"),id:A,ref:e,"data-has-spoiler":z||void 0,...D,children:[z&&g.jsx(fw,{component:"button",type:"button",ref:v,onClick:()=>N(!R),"aria-expanded":R,"aria-controls":_,...T("control"),children:L}),g.jsx("div",{...T("content",{style:{maxHeight:R?$?Ee($):void 0:Ee(d)}}),"data-reduce-motion":!0,role:"region",id:_,children:g.jsx("div",{ref:I,children:m})})]})});_8.classes=tne;_8.displayName="@mantine/core/Spoiler";var nne={root:"m_6d731127"};const X2e={gap:"md",align:"stretch",justify:"flex-start"},Q2e=(t,{gap:e,align:n,justify:r})=>({root:{"--stack-gap":Er(e),"--stack-align":n,"--stack-justify":r}}),Is=Fe((t,e)=>{const n=Ce("Stack",X2e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,align:c,justify:d,gap:f,variant:p,attributes:m,...v}=n,y=bt({name:"Stack",props:n,classes:nne,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:m,vars:l,varsResolver:Q2e});return g.jsx(le,{ref:e,...y("root"),variant:p,...v})});Is.classes=nne;Is.displayName="@mantine/core/Stack";var rne={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const sne=O.createContext(null),exe=sne.Provider,txe=()=>O.useContext(sne),O8=Fe((t,e)=>{const{value:n,defaultValue:r,onChange:s,size:i,wrapperProps:o,children:a,readOnly:l,disabled:c,...d}=Ce("SwitchGroup",null,t),[f,p]=gi({value:n,defaultValue:r,finalValue:[],onChange:s}),m=v=>{const y=v.currentTarget.value;!l&&p(f.includes(y)?f.filter(x=>x!==y):[...f,y])};return g.jsx(exe,{value:{value:f,onChange:m,size:i,disabled:c},children:g.jsx(Pn.Wrapper,{size:i,ref:e,...o,...d,labelElement:"div",__staticSelector:"SwitchGroup",children:g.jsx(G9,{role:"group",children:a})})})});O8.classes=Pn.Wrapper.classes;O8.displayName="@mantine/core/SwitchGroup";const nxe={labelPosition:"right",withThumbIndicator:!0},rxe=(t,{radius:e,color:n,size:r})=>({root:{"--switch-radius":e===void 0?void 0:ar(e),"--switch-height":Qt(r,"switch-height"),"--switch-width":Qt(r,"switch-width"),"--switch-thumb-size":Qt(r,"switch-thumb-size"),"--switch-label-font-size":Qt(r,"switch-label-font-size"),"--switch-track-label-padding":Qt(r,"switch-track-label-padding"),"--switch-color":n?Fr(n,t):void 0}}),Lp=Fe((t,e)=>{const n=Ce("Switch",nxe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,color:c,label:d,offLabel:f,onLabel:p,id:m,size:v,radius:y,wrapperProps:x,thumbIcon:w,checked:C,defaultChecked:E,onChange:D,labelPosition:T,description:A,error:_,disabled:R,variant:N,rootRef:I,mod:$,withThumbIndicator:L,attributes:z,...F}=n,q=txe(),H=v||(q==null?void 0:q.size),B=bt({name:"Switch",props:n,classes:rne,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:z,vars:l,varsResolver:rxe}),{styleProps:V,rest:Y}=C1(F),G=bi(m),W={checked:(q==null?void 0:q.value.includes(Y.value))??C,onChange:X=>{q==null||q.onChange(X),D==null||D(X)},disabled:(q==null?void 0:q.disabled)??R},[Z,Q]=gi({value:W.checked??C,defaultValue:E,finalValue:!1});return g.jsxs(KA,{...B("root"),__staticSelector:"Switch",__stylesApiProps:n,id:G,size:H,labelPosition:T,label:d,description:A,error:_,disabled:W.disabled,bodyElement:"label",labelElement:"span",classNames:r,styles:o,unstyled:a,"data-checked":W.checked,variant:N,ref:I,mod:$,...V,...x,children:[g.jsx("input",{...Y,...W,checked:Z,"data-checked":W.checked,onChange:X=>{var re;(re=W.onChange)==null||re.call(W,X),Q(X.currentTarget.checked)},id:G,ref:e,type:"checkbox",role:"switch",...B("input")}),g.jsxs(le,{"aria-hidden":"true",component:"span",mod:{error:_,"label-position":T,"without-labels":!p&&!f},...B("track"),children:[g.jsx(le,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":L&&!w},...B("thumb"),children:w}),g.jsx("span",{...B("trackLabel"),children:Z?p:f})]})]})});Lp.classes={...rne,...tte};Lp.displayName="@mantine/core/Switch";Lp.Group=O8;const[sxe,ixe]=Ys("Table component was not found in the tree");var yw={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function oxe(t,e){if(!e)return;const n={};return e.columnBorder&&t.withColumnBorders&&(n["data-with-column-border"]=!0),e.rowBorder&&t.withRowBorders&&(n["data-with-row-border"]=!0),e.striped&&t.striped&&(n["data-striped"]=t.striped),e.highlightOnHover&&t.highlightOnHover&&(n["data-hover"]=!0),e.captionSide&&t.captionSide&&(n["data-side"]=t.captionSide),e.stickyHeader&&t.stickyHeader&&(n["data-sticky"]=!0),n}function av(t,e){const n=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,r=Fe((s,i)=>{const o=Ce(n,{},s),{classNames:a,className:l,style:c,styles:d,...f}=o,p=ixe();return g.jsx(le,{component:t,ref:i,...oxe(p,e),...p.getStyles(t,{className:l,classNames:a,style:c,styles:d,props:o}),...f})});return r.displayName=`@mantine/core/${n}`,r.classes=yw,r}const KI=av("th",{columnBorder:!0}),ine=av("td",{columnBorder:!0}),PD=av("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),one=av("thead",{stickyHeader:!0}),ane=av("tbody"),lne=av("tfoot"),cne=av("caption",{captionSide:!0});function R8({data:t}){return g.jsxs(g.Fragment,{children:[t.caption&&g.jsx(cne,{children:t.caption}),t.head&&g.jsx(one,{children:g.jsx(PD,{children:t.head.map((e,n)=>g.jsx(KI,{children:e},n))})}),t.body&&g.jsx(ane,{children:t.body.map((e,n)=>g.jsx(PD,{children:e.map((r,s)=>g.jsx(ine,{children:r},s))},n))}),t.foot&&g.jsx(lne,{children:g.jsx(PD,{children:t.foot.map((e,n)=>g.jsx(KI,{children:e},n))})})]})}R8.displayName="@mantine/core/TableDataRenderer";const axe={type:"scrollarea"},lxe=(t,{minWidth:e,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":Ee(e),"--table-max-height":Ee(n),"--table-overflow":r==="native"?"auto":void 0}}),N8=Fe((t,e)=>{const n=Ce("TableScrollContainer",axe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,children:c,minWidth:d,maxHeight:f,type:p,scrollAreaProps:m,attributes:v,...y}=n,x=bt({name:"TableScrollContainer",classes:yw,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:v,vars:l,varsResolver:lxe,rootSelector:"scrollContainer"});return g.jsx(le,{component:p==="scrollarea"?Qs:"div",...p==="scrollarea"?f?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:e,...x("scrollContainer"),...y,children:g.jsx("div",{...x("scrollContainerInner"),children:c})})});N8.classes=yw;N8.displayName="@mantine/core/TableScrollContainer";const cxe={withRowBorders:!0,verticalSpacing:7},uxe=(t,{layout:e,captionSide:n,horizontalSpacing:r,verticalSpacing:s,borderColor:i,stripedColor:o,highlightOnHoverColor:a,striped:l,highlightOnHover:c,stickyHeaderOffset:d,stickyHeader:f})=>({table:{"--table-layout":e,"--table-caption-side":n,"--table-horizontal-spacing":Er(r),"--table-vertical-spacing":Er(s),"--table-border-color":i?Fr(i,t):void 0,"--table-striped-color":l&&o?Fr(o,t):void 0,"--table-highlight-on-hover-color":c&&a?Fr(a,t):void 0,"--table-sticky-header-offset":f?Ee(d):void 0}}),$r=Fe((t,e)=>{const n=Ce("Table",cxe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,horizontalSpacing:c,verticalSpacing:d,captionSide:f,stripedColor:p,highlightOnHoverColor:m,striped:v,highlightOnHover:y,withColumnBorders:x,withRowBorders:w,withTableBorder:C,borderColor:E,layout:D,variant:T,data:A,children:_,stickyHeader:R,stickyHeaderOffset:N,mod:I,tabularNums:$,attributes:L,...z}=n,F=bt({name:"Table",props:n,className:s,style:i,classes:yw,classNames:r,styles:o,unstyled:a,attributes:L,rootSelector:"table",vars:l,varsResolver:uxe});return g.jsx(sxe,{value:{getStyles:F,stickyHeader:R,striped:v===!0?"odd":v||void 0,highlightOnHover:y,withColumnBorders:x,withRowBorders:w,captionSide:f||"bottom"},children:g.jsx(le,{component:"table",variant:T,ref:e,mod:[{"data-with-table-border":C,"data-tabular-nums":$},I],...F("table"),...z,children:_||!!A&&g.jsx(R8,{data:A})})})});$r.classes=yw;$r.displayName="@mantine/core/Table";$r.Td=ine;$r.Th=KI;$r.Tr=PD;$r.Thead=one;$r.Tbody=ane;$r.Tfoot=lne;$r.Caption=cne;$r.ScrollContainer=N8;$r.DataRenderer=R8;const[dxe,j8]=Ys("Tabs component was not found in the tree");var bw={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const I8=Fe((t,e)=>{const n=Ce("TabsList",null,t),{children:r,className:s,grow:i,justify:o,classNames:a,styles:l,style:c,mod:d,...f}=n,p=j8();return g.jsx(le,{...f,...p.getStyles("list",{className:s,style:c,classNames:a,styles:l,props:n,variant:p.variant}),ref:e,role:"tablist",variant:p.variant,mod:[{grow:i,orientation:p.orientation,placement:p.orientation==="vertical"&&p.placement,inverted:p.inverted},d],"aria-orientation":p.orientation,__vars:{"--tabs-justify":o},children:r})});I8.classes=bw;I8.displayName="@mantine/core/TabsList";const L8=Fe((t,e)=>{const n=Ce("TabsPanel",null,t),{children:r,className:s,value:i,classNames:o,styles:a,style:l,mod:c,keepMounted:d,...f}=n,p=j8(),m=p.value===i,v=p.keepMounted||d||m?r:null;return g.jsx(le,{...p.getStyles("panel",{className:s,classNames:o,styles:a,style:[l,m?void 0:{display:"none"}],props:n}),ref:e,mod:[{orientation:p.orientation},c],role:"tabpanel",id:p.getPanelId(i),"aria-labelledby":p.getTabId(i),...f,children:v})});L8.classes=bw;L8.displayName="@mantine/core/TabsPanel";const P8=Fe((t,e)=>{const n=Ce("TabsTab",null,t),{className:r,children:s,rightSection:i,leftSection:o,value:a,onClick:l,onKeyDown:c,disabled:d,color:f,style:p,classNames:m,styles:v,vars:y,mod:x,tabIndex:w,...C}=n,E=Dr(),{dir:D}=Hu(),T=j8(),A=a===T.value,_=N=>{T.onChange(T.allowTabDeactivation&&a===T.value?null:a),l==null||l(N)},R={classNames:m,styles:v,props:n};return g.jsxs(or,{...T.getStyles("tab",{className:r,style:p,variant:T.variant,...R}),disabled:d,unstyled:T.unstyled,variant:T.variant,mod:[{active:A,disabled:d,orientation:T.orientation,inverted:T.inverted,placement:T.orientation==="vertical"&&T.placement},x],ref:e,role:"tab",id:T.getTabId(a),"aria-selected":A,tabIndex:w!==void 0?w:A||T.value===null?0:-1,"aria-controls":T.getPanelId(a),onClick:_,__vars:{"--tabs-color":f?Fr(f,E):void 0},onKeyDown:AA({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:T.activateTabWithKeyboard,loop:T.loop,orientation:T.orientation||"horizontal",dir:D,onKeyDown:c}),...C,children:[o&&g.jsx("span",{...T.getStyles("tabSection",R),"data-position":"left",children:o}),s&&g.jsx("span",{...T.getStyles("tabLabel",R),children:s}),i&&g.jsx("span",{...T.getStyles("tabSection",R),"data-position":"right",children:i})]})});P8.classes=bw;P8.displayName="@mantine/core/TabsTab";const WB="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",fxe={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},pxe=(t,{radius:e,color:n,autoContrast:r})=>({root:{"--tabs-radius":ar(e),"--tabs-color":Fr(n,t),"--tabs-text-color":iv(r,t)?Qd({color:n,theme:t,autoContrast:r}):void 0}}),ts=Fe((t,e)=>{const n=Ce("Tabs",fxe,t),{defaultValue:r,value:s,onChange:i,orientation:o,children:a,loop:l,id:c,activateTabWithKeyboard:d,allowTabDeactivation:f,variant:p,color:m,radius:v,inverted:y,placement:x,keepMounted:w,classNames:C,styles:E,unstyled:D,className:T,style:A,vars:_,autoContrast:R,mod:N,attributes:I,...$}=n,L=bi(c),[z,F]=gi({value:s,defaultValue:r,finalValue:null,onChange:i}),q=bt({name:"Tabs",props:n,classes:bw,className:T,style:A,classNames:C,styles:E,unstyled:D,attributes:I,vars:_,varsResolver:pxe});return g.jsx(dxe,{value:{placement:x,value:z,orientation:o,id:L,loop:l,activateTabWithKeyboard:d,getTabId:Ak(`${L}-tab`,WB),getPanelId:Ak(`${L}-panel`,WB),onChange:F,allowTabDeactivation:f,variant:p,color:m,radius:v,inverted:y,keepMounted:w,unstyled:D,getStyles:q},children:g.jsx(le,{ref:e,id:L,variant:p,mod:[{orientation:o,inverted:o==="horizontal"&&y,placement:o==="vertical"&&x},N],...q("root"),...$,children:a})})});ts.classes=bw;ts.displayName="@mantine/core/Tabs";ts.Tab=P8;ts.Panel=L8;ts.List=I8;const Xy=Fe((t,e)=>{const n=Ce("TextInput",null,t);return g.jsx(Rl,{component:"input",ref:e,...n,__staticSelector:"TextInput"})});Xy.classes=Rl.classes;Xy.displayName="@mantine/core/TextInput";var une={root:"m_7341320d"};const hxe=(t,{size:e,radius:n,variant:r,gradient:s,color:i,autoContrast:o})=>{const a=t.variantColorResolver({color:i||t.primaryColor,theme:t,gradient:s,variant:r||"filled",autoContrast:o});return{root:{"--ti-size":Qt(e,"ti-size"),"--ti-radius":n===void 0?void 0:ar(n),"--ti-bg":i||r?a.background:void 0,"--ti-color":i||r?a.color:void 0,"--ti-bd":i||r?a.border:void 0}}},b_=Fe((t,e)=>{const n=Ce("ThemeIcon",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,autoContrast:c,attributes:d,...f}=n,p=bt({name:"ThemeIcon",classes:une,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:d,vars:l,varsResolver:hxe});return g.jsx(le,{ref:e,...p("root"),...f})});b_.classes=une;b_.displayName="@mantine/core/ThemeIcon";const mxe=["h1","h2","h3","h4","h5","h6"],gxe=["xs","sm","md","lg","xl"];function vxe(t,e){const n=e!==void 0?e:`h${t}`;return mxe.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:gxe.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}:{fontSize:Ee(n),fontWeight:`var(--mantine-h${t}-font-weight)`,lineHeight:`var(--mantine-h${t}-line-height)`}}var dne={root:"m_8a5d1357"};const yxe={order:1},bxe=(t,{order:e,size:n,lineClamp:r,textWrap:s})=>{const i=vxe(e||1,n);return{root:{"--title-fw":i.fontWeight,"--title-lh":i.lineHeight,"--title-fz":i.fontSize,"--title-line-clamp":typeof r=="number"?r.toString():void 0,"--title-text-wrap":s}}},$g=Fe((t,e)=>{const n=Ce("Title",yxe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,order:l,vars:c,size:d,variant:f,lineClamp:p,textWrap:m,mod:v,attributes:y,...x}=n,w=bt({name:"Title",props:n,classes:dne,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,vars:c,varsResolver:bxe});return[1,2,3,4,5,6].includes(l)?g.jsx(le,{...w("root"),component:`h${l}`,variant:f,ref:e,mod:[{order:l,"data-line-clamp":typeof p=="number"},v],size:d,...x}):null});$g.classes=dne;$g.displayName="@mantine/core/Title";var fne={root:"m_d08caa0"};const $8=Fe((t,e)=>{const n=Ce("Typography",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,attributes:l,...c}=n,d=bt({name:"Typography",classes:fne,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:l});return g.jsx(le,{ref:e,...d("root"),...c})});$8.classes=fne;$8.displayName="@mantine/core/Typography";const xxe={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class $k{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||xxe,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,s){return s&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new $k(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new $k(this.logger,e)}}var Su=new $k;let x_=class{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]=this.observers[r]||[],this.observers[r].push(n)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(r=>r!==n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];this.observers[e]&&[].concat(this.observers[e]).forEach(o=>{o(...r)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[e,...r])})}};function tx(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n}function YB(t){return t==null?"":""+t}function Sxe(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}function z8(t,e,n){function r(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function s(){return!t||typeof t=="string"}const i=typeof e!="string"?[].concat(e):e.split(".");for(;i.length>1;){if(s())return{};const o=r(i.shift());!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={}}return s()?{}:{obj:t,k:r(i.shift())}}function GB(t,e,n){const{obj:r,k:s}=z8(t,e,Object);r[s]=n}function wxe(t,e,n,r){const{obj:s,k:i}=z8(t,e,Object);s[i]=s[i]||[],s[i].push(n)}function zk(t,e){const{obj:n,k:r}=z8(t,e);if(n)return n[r]}function Cxe(t,e,n){const r=zk(t,n);return r!==void 0?r:zk(e,n)}function pne(t,e,n){for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):pne(t[r],e[r],n):t[r]=e[r]);return t}function cy(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Exe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Mxe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Exe[e]):t}const Dxe=[" ",",","?","!",";"];function kxe(t,e,n){e=e||"",n=n||"";const r=Dxe.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(r.length===0)return!0;const s=new RegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(t);if(!i){const o=t.indexOf(n);o>0&&!s.test(t.substring(0,o))&&(i=!0)}return i}function Fk(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let i=0;i<r.length;++i){if(!s||typeof s[r[i]]=="string"&&i+1<r.length)return;if(s[r[i]]===void 0){let o=2,a=r.slice(i,i+o).join(n),l=s[a];for(;l===void 0&&r.length>i+o;)o++,a=r.slice(i,i+o).join(n),l=s[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}const c=r.slice(i+o).join(n);return c?Fk(l,c,n):void 0}s=s[r[i]]}return s}function Bk(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class KB extends x_{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a=[e,n];r&&typeof r!="string"&&(a=a.concat(r)),r&&typeof r=="string"&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."));const l=zk(this.data,a);return l||!o||typeof r!="string"?l:Fk(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,n];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=n,n=a[1]),this.addNamespaces(n),GB(this.data,a,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Object.prototype.toString.apply(r[i])==="[object Array]")&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},a=[e,n];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=n,n=a[1]),this.addNamespaces(n);let l=zk(this.data,a)||{};s?pne(l,r,i):l={...l,...r},GB(this.data,a,l),o.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var hne={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,s))}),e}};const ZB={};class Hk extends x_{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Sxe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Su.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!kxe(e,r,s);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:i};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(s)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],n),l=a[a.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){const D=n.nsSeparator||this.options.nsSeparator;return s?{res:`${l}${D}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${D}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:o}const f=this.resolve(e,n);let p=f&&f.res;const m=f&&f.usedKey||o,v=f&&f.exactUsedKey||o,y=Object.prototype.toString.apply(p),x=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject;if(C&&p&&(typeof p!="string"&&typeof p!="boolean"&&typeof p!="number")&&x.indexOf(y)<0&&!(typeof w=="string"&&y==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,p,{...n,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(f.res=D,f.usedParams=this.getUsedParamsDetails(n),f):D}if(i){const D=y==="[object Array]",T=D?[]:{},A=D?v:m;for(const _ in p)if(Object.prototype.hasOwnProperty.call(p,_)){const R=`${A}${i}${_}`;T[_]=this.translate(R,{...n,joinArrays:!1,ns:a}),T[_]===R&&(T[_]=p[_])}p=T}}else if(C&&typeof w=="string"&&y==="[object Array]")p=p.join(w),p&&(p=this.extendTranslation(p,e,n,r));else{let D=!1,T=!1;const A=n.count!==void 0&&typeof n.count!="string",_=Hk.hasDefaultValue(n),R=A?this.pluralResolver.getSuffix(c,n.count,n):"",N=n.ordinal&&A?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",I=n[`defaultValue${R}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(p)&&_&&(D=!0,p=I),this.isValidLookup(p)||(T=!0,p=o);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:p,z=_&&I!==p&&this.options.updateMissing;if(T||D||z){if(this.logger.log(z?"updateKey":"missingKey",c,l,o,z?I:p),i){const B=this.resolve(o,{...n,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let F=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let B=0;B<q.length;B++)F.push(q[B]);else this.options.saveMissingTo==="all"?F=this.languageUtils.toResolveHierarchy(n.lng||this.language):F.push(n.lng||this.language);const H=(B,V,Y)=>{const G=_&&Y!==p?Y:L;this.options.missingKeyHandler?this.options.missingKeyHandler(B,l,V,G,z,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(B,l,V,G,z,n),this.emit("missingKey",B,l,V,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?F.forEach(B=>{this.pluralResolver.getSuffixes(B,n).forEach(V=>{H([B],o+V,n[`defaultValue${V}`]||I)})}):H(F,o,I))}p=this.extendTranslation(p,e,n,f,r),T&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${o}`),(T||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,D?p:void 0):p=this.options.parseMissingKeyHandler(p))}return s?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(e,n,r,s,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(c){const p=e.match(this.interpolator.nestingRegexp);d=p&&p.length}let f=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language,r),c){const p=e.match(this.interpolator.nestingRegexp),m=p&&p.length;d<m&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&s&&s.res&&(r.lng=s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var p=arguments.length,m=new Array(p),v=0;v<p;v++)m[v]=arguments[v];return i&&i[0]===m[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):o.translate(...m,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,l=typeof a=="string"?[a]:a;return e!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(e=hne.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:s,...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),d=c.key;s=d;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&typeof n.count!="string",m=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(x=>{this.isValidLookup(r)||(a=x,!ZB[`${y[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(ZB[`${y[0]}-${x}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(w=>{if(this.isValidLookup(r))return;o=w;const C=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(C,d,w,x,n);else{let D;p&&(D=this.pluralResolver.getSuffix(w,n.count,n));const T=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(C.push(d+D),n.ordinal&&D.indexOf(A)===0&&C.push(d+D.replace(A,this.options.pluralSeparator)),m&&C.push(d+T)),v){const _=`${d}${this.options.contextSeparator}${n.context}`;C.push(_),p&&(C.push(_+D),n.ordinal&&D.indexOf(A)===0&&C.push(_+D.replace(A,this.options.pluralSeparator)),m&&C.push(_+T))}}let E;for(;E=C.pop();)this.isValidLookup(r)||(i=E,r=this.getResource(w,x,E,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function UR(t){return t.charAt(0).toUpperCase()+t.slice(1)}class JB{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Su.create("languageUtils")}getScriptPartFromCode(e){if(e=Bk(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Bk(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=UR(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=UR(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=UR(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&i.indexOf(s)===0)return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}let Txe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Axe={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const _xe=["v1","v2","v3"],Oxe=["v4"],XB={zero:0,one:1,two:2,few:3,many:4,other:5};function Rxe(){const t={};return Txe.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Axe[e.fc]}})}),t}class Nxe{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Su.create("pluralResolver"),(!this.options.compatibilityJSON||Oxe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Rxe()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Bk(e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>XB[s]-XB[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!_xe.includes(this.options.compatibilityJSON)}}function QB(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Cxe(t,e,n);return!i&&s&&typeof n=="string"&&(i=Fk(t,n,r),i===void 0&&(i=Fk(e,n,r))),i}class jxe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Su.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:Mxe,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?cy(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?cy(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?cy(n.nestingPrefix):n.nestingPrefixEscaped||cy("$t("),this.nestingSuffix=n.nestingSuffix?cy(n.nestingSuffix):n.nestingSuffixEscaped||cy(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const r=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(r,"g")}interpolate(e,n,r,s){let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(v){return v.replace(/\$/g,"$$$$")}const d=v=>{if(v.indexOf(this.formatSeparator)<0){const C=QB(n,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(C,void 0,r,{...s,...n,interpolationkey:v}):C}const y=v.split(this.formatSeparator),x=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(QB(n,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...s,...n,interpolationkey:x})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>c(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?c(this.escape(v)):c(v)}].forEach(v=>{for(a=0;i=v.regex.exec(e);){const y=i[1].trim();if(o=d(y),o===void 0)if(typeof f=="function"){const w=f(e,i,s);o=typeof w=="string"?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(p){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=YB(o));const x=v.safeValue(o);if(e=e.replace(i[0],x),p?(v.regex.lastIndex+=o.length,v.regex.lastIndex-=i[0].length):v.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;function a(l,c){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,o);const m=p.match(/'/g),v=p.match(/"/g);(m&&m.length%2===0&&!v||v.length%2!==0)&&(p=p.replace(/'/g,'"'));try{o=JSON.parse(p),c&&(o={...c,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,y),`${l}${d}${p}`}return delete o.defaultValue,l}for(;s=this.nestingRegexp.exec(e);){let l=[];o={...r},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=d.shift(),l=d,c=!0}if(i=n(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=YB(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),c&&(i=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}function Ixe(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(o=>{if(!o)return;const[a,...l]=o.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,"");n[a.trim()]||(n[a.trim()]=c),c==="false"&&(n[a.trim()]=!1),c==="true"&&(n[a.trim()]=!0),isNaN(c)||(n[a.trim()]=parseInt(c,10))})}return{formatName:e,formatOptions:n}}function uy(t){const e={};return function(r,s,i){const o=s+JSON.stringify(i);let a=e[o];return a||(a=t(Bk(s),i),e[o]=a),a(r)}}let Lxe=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Su.create("formatter"),this.options=e,this.formats={number:uy((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:uy((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:uy((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:uy((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:uy((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=uy(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((a,l)=>{const{formatName:c,formatOptions:d}=Ixe(l);if(this.formats[c]){let f=a;try{const p=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=p.locale||p.lng||s.locale||s.lng||r;f=this.formats[c](a,m,{...d,...s,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}};function Pxe(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class $xe extends x_{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Su.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const i={},o={},a={},l={};return e.forEach(c=>{let d=!0;n.forEach(f=>{const p=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?o[p]===void 0&&(o[p]=!0):(this.state[p]=1,d=!1,o[p]===void 0&&(o[p]=!0),i[p]===void 0&&(i[p]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const s=e.split("|"),i=s[0],o=s[1];n&&this.emit("failedLoading",i,o,n),r&&this.store.addResourceBundle(i,o,r),this.state[e]=n?-1:2;const a={};this.queue.forEach(l=>{wxe(l.loaded,[i],o),Pxe(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const d=l.loaded[c];d.length&&d.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,i*2,o)},i);return}o(c,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,n,a)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,n,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let d;c.length===5?d=c(e,n,r,s,l):d=c(e,n,r,s),d&&typeof d.then=="function"?d.then(f=>a(null,f)).catch(a):a(null,d)}catch(d){a(d)}else c(e,n,r,s,a,l)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}function eH(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(s=>{n[s]=r[s]})}return n},interpolation:{escapeValue:!0,format:(t,e,n,r)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function tH(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function LM(){}function zxe(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class vS extends x_{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=tH(e),this.services={},this.logger=Su,this.modules={external:[]},zxe(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=eH();this.options={...s,...this.options,...tH(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Su.init(i(this.modules.logger),this.options):Su.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=Lxe);const f=new JB(this.options);this.store=new KB(this.options.resources,this.options);const p=this.services;p.logger=Su,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new Nxe(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=i(d),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new jxe(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new $xe(i(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(m){for(var v=arguments.length,y=new Array(v>1?v-1:0),x=1;x<v;x++)y[x-1]=arguments[x];e.emit(m,...y)}),this.modules.languageDetector&&(p.languageDetector=i(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=i(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Hk(this.services,this.options),this.translator.on("*",function(m){for(var v=arguments.length,y=new Array(v>1?v-1:0),x=1;x<v;x++)y[x-1]=arguments[x];e.emit(m,...y)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=LM),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=tx(),c=()=>{const d=(f,p)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),r(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:LM;const s=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(e,n,r){const s=tx();return e||(e=this.languages),n||(n=this.options.ns),r||(r=LM),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&hne.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=tx();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const c=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,d=>{o(d,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,n,r){var s=this;const i=function(o,a){let l;if(typeof a!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),f=2;f<c;f++)d[f-2]=arguments[f];l=s.options.overloadTranslationOptionHandler([o,a].concat(d))}else l={...a};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix=l.keyPrefix||r||i.keyPrefix;const p=s.options.keySeparator||".";let m;return l.keyPrefix&&Array.isArray(o)?m=o.map(v=>`${l.keyPrefix}${p}${v}`):m=l.keyPrefix?`${l.keyPrefix}${p}${o}`:o,s.t(m,l)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};if(n.precheck){const a=n.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,n){const r=tx();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=tx();typeof e=="string"&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0);return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new JB(eH());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new vS(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:LM;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new vS(s);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new KB(this.store.data,s),i.services.resourceStore=i.store),i.translator=new Hk(i.services,s),i.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];i.emit(a,...c)}),i.init(s,n),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ln=vS.createInstance();Ln.createInstance=vS.createInstance;Ln.createInstance;Ln.dir;Ln.init;Ln.loadResources;Ln.reloadResources;Ln.use;Ln.changeLanguage;Ln.getFixedT;const ct=Ln.t;Ln.exists;Ln.setDefaultNamespace;Ln.hasLoadedNamespace;Ln.loadNamespaces;Ln.loadLanguages;var VR,nH;function Fxe(){return nH||(nH=1,VR={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),VR}var Bxe=Fxe();const Hxe=Mr(Bxe);var qxe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function rH(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=t.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(e.name=n[1],(Hxe[n[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=t.indexOf("-->");return{type:"comment",comment:r!==-1?t.slice(4,r):""}}for(var s=new RegExp(qxe),i=null;(i=s.exec(t))!==null;)if(i[0].trim())if(i[1]){var o=i[1].trim(),a=[o,""];o.indexOf("=")>-1&&(a=o.split("=")),e.attrs[a[0]]=a[1],s.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}var Uxe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Vxe=/^\s*$/,Wxe=Object.create(null);function mne(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?(function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""})(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(mne,"")+"</"+e.name+">";case"comment":return t+"<!--"+e.comment+"-->"}}var Yxe={parse:function(t,e){e||(e={}),e.components||(e.components=Wxe);var n,r=[],s=[],i=-1,o=!1;if(t.indexOf("<")!==0){var a=t.indexOf("<");r.push({type:"text",content:a===-1?t:t.substring(0,a)})}return t.replace(Uxe,function(l,c){if(o){if(l!=="</"+n.name+">")return;o=!1}var d,f=l.charAt(1)!=="/",p=l.startsWith("<!--"),m=c+l.length,v=t.charAt(m);if(p){var y=rH(l);return i<0?(r.push(y),r):((d=s[i]).children.push(y),r)}if(f&&(i++,(n=rH(l)).type==="tag"&&e.components[n.name]&&(n.type="component",o=!0),n.voidElement||o||!v||v==="<"||n.children.push({type:"text",content:t.slice(m,t.indexOf("<",m))}),i===0&&r.push(n),(d=s[i-1])&&d.children.push(n),s[i]=n),(!f||n.voidElement)&&(i>-1&&(n.voidElement||n.name===l.slice(2,-1))&&(i--,n=i===-1?r:s[i]),!o&&v!=="<"&&v)){d=i===-1?r:s[i].children;var x=t.indexOf("<",m),w=t.slice(m,x===-1?void 0:x);Vxe.test(w)&&(w=" "),(x>-1&&i+d.length>=0||w!==" ")&&d.push({type:"text",content:w})}}),r},stringify:function(t){return t.reduce(function(e,n){return e+mne("",n)},"")}};function $D(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const sH={};function qk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&sH[e[0]]||(typeof e[0]=="string"&&(sH[e[0]]=new Date),$D(...e))}const gne=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function iH(t,e,n){t.loadNamespaces(e,gne(t,n))}function oH(t,e,n,r){typeof n=="string"&&(n=[n]),n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,gne(t,r))}function Gxe(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],s=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const c=e.services.backendConnector.state[`${a}|${l}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!o(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||o(r,t)&&(!s||o(i,t)))}function Kxe(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(qk("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(s,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!i(s.isLanguageChangingTo,t))return!1}}):Gxe(t,e,n)}const Zxe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Jxe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Xxe=t=>Jxe[t],Qxe=t=>t.replace(Zxe,Xxe);let ZI={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Qxe};function eSe(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ZI={...ZI,...t}}function vne(){return ZI}let yne;function tSe(t){yne=t}function F8(){return yne}function WR(t,e){if(!t)return!1;const n=t.props?t.props.children:t.children;return e?n.length>0:!!n}function YR(t){if(!t)return[];const e=t.props?t.props.children:t.children;return t.props&&t.props.i18nIsDynamicList?_y(e):e}function nSe(t){return Object.prototype.toString.call(t)!=="[object Array]"?!1:t.every(e=>O.isValidElement(e))}function _y(t){return Array.isArray(t)?t:[t]}function rSe(t,e){const n={...e};return n.props=Object.assign(t.props,e.props),n}function bne(t,e){if(!t)return"";let n="";const r=_y(t),s=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return r.forEach((i,o)=>{if(typeof i=="string")n+=`${i}`;else if(O.isValidElement(i)){const a=Object.keys(i.props).length,l=s.indexOf(i.type)>-1,c=i.props.children;if(!c&&l&&a===0)n+=`<${i.type}/>`;else if(!c&&(!l||a!==0))n+=`<${o}></${o}>`;else if(i.props.i18nIsDynamicList)n+=`<${o}></${o}>`;else if(l&&a===1&&typeof c=="string")n+=`<${i.type}>${c}</${i.type}>`;else{const d=bne(c,e);n+=`<${o}>${d}</${o}>`}}else if(i===null)$D("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof i=="object"){const{format:a,...l}=i,c=Object.keys(l);if(c.length===1){const d=a?`${c[0]}, ${a}`:c[0];n+=`{{${d}}}`}else $D("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",i)}else $D("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",i)}),n}function sSe(t,e,n,r,s,i){if(e==="")return[];const o=r.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(o.map(x=>`<${x}`).join("|")).test(e);if(!t&&!a&&!i)return[e];const l={};function c(x){_y(x).forEach(C=>{typeof C!="string"&&(WR(C)?c(YR(C)):typeof C=="object"&&!O.isValidElement(C)&&Object.assign(l,C))})}c(t);const d=Yxe.parse(`<0>${e}</0>`),f={...l,...s};function p(x,w,C){const E=YR(x),D=v(E,w.children,C);return nSe(E)&&D.length===0||x.props&&x.props.i18nIsDynamicList?E:D}function m(x,w,C,E,D){x.dummy?(x.children=w,C.push(O.cloneElement(x,{key:E},D?void 0:w))):C.push(...O.Children.map([x],T=>{const A={...T.props};return delete A.i18nIsDynamicList,xe.createElement(T.type,wr({},A,{key:E,ref:T.ref},D?{}:{children:w}))}))}function v(x,w,C){const E=_y(x);return _y(w).reduce((T,A,_)=>{const R=A.children&&A.children[0]&&A.children[0].content&&n.services.interpolator.interpolate(A.children[0].content,f,n.language);if(A.type==="tag"){let N=E[parseInt(A.name,10)];C.length===1&&!N&&(N=C[0][A.name]),N||(N={});const I=Object.keys(A.attrs).length!==0?rSe({props:A.attrs},N):N,$=O.isValidElement(I),L=$&&WR(A,!0)&&!A.voidElement,z=a&&typeof I=="object"&&I.dummy&&!$,F=typeof t=="object"&&t!==null&&Object.hasOwnProperty.call(t,A.name);if(typeof I=="string"){const q=n.services.interpolator.interpolate(I,f,n.language);T.push(q)}else if(WR(I)||L){const q=p(I,A,C);m(I,q,T,_)}else if(z){const q=v(E,A.children,C);m(I,q,T,_)}else if(Number.isNaN(parseFloat(A.name)))if(F){const q=p(I,A,C);m(I,q,T,_,A.voidElement)}else if(r.transSupportBasicHtmlNodes&&o.indexOf(A.name)>-1)if(A.voidElement)T.push(O.createElement(A.name,{key:`${A.name}-${_}`}));else{const q=v(E,A.children,C);T.push(O.createElement(A.name,{key:`${A.name}-${_}`},q))}else if(A.voidElement)T.push(`<${A.name} />`);else{const q=v(E,A.children,C);T.push(`<${A.name}>${q}</${A.name}>`)}else if(typeof I=="object"&&!$){const q=A.children[0]?R:null;q&&T.push(q)}else m(I,R,T,_,A.children.length!==1||!R)}else if(A.type==="text"){const N=r.transWrapTextNodes,I=i?r.unescape(n.services.interpolator.interpolate(A.content,f,n.language)):n.services.interpolator.interpolate(A.content,f,n.language);N?T.push(O.createElement(N,{key:`${A.name}-${_}`},I)):T.push(I)}return T},[])}const y=v([{dummy:!0,children:t||[]}],d,_y(t||[]));return YR(y[0])}function iSe(t){let{children:e,count:n,parent:r,i18nKey:s,context:i,tOptions:o={},values:a,defaults:l,components:c,ns:d,i18n:f,t:p,shouldUnescape:m,...v}=t;const y=f||F8();if(!y)return qk("You will need to pass in an i18next instance by using i18nextReactModule"),e;const x=p||y.t.bind(y)||(L=>L);i&&(o.context=i);const w={...vne(),...y.options&&y.options.react};let C=d||x.ns||y.options&&y.options.defaultNS;C=typeof C=="string"?[C]:C||["translation"];const E=bne(e,w),D=l||E||w.transEmptyNodeValue||s,{hashTransKey:T}=w,A=s||(T?T(E||D):E||D);y.options&&y.options.interpolation&&y.options.interpolation.defaultVariables&&(a=a&&Object.keys(a).length>0?{...a,...y.options.interpolation.defaultVariables}:{...y.options.interpolation.defaultVariables});const _=a?o.interpolation:{interpolation:{...o.interpolation,prefix:"#$?",suffix:"?$#"}},R={...o,count:n,...a,..._,defaultValue:D,ns:C},N=A?x(A,R):D,I=sSe(c||e,N,y,w,R,m),$=r!==void 0?r:w.defaultTransParent;return $?O.createElement($,v,I):I}const oSe={type:"3rdParty",init(t){eSe(t.options.react),tSe(t)}},xne=O.createContext();class aSe{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function xw(t){let{children:e,count:n,parent:r,i18nKey:s,context:i,tOptions:o={},values:a,defaults:l,components:c,ns:d,i18n:f,t:p,shouldUnescape:m,...v}=t;const{i18n:y,defaultNS:x}=O.useContext(xne)||{},w=f||y||F8(),C=p||w&&w.t.bind(w);return iSe({children:e,count:n,parent:r,i18nKey:s,context:i,tOptions:o,values:a,defaults:l,components:c,ns:d||C&&C.ns||x||w&&w.options&&w.options.defaultNS,i18n:w,t:p,shouldUnescape:m,...v})}const lSe=(t,e)=>{const n=O.useRef();return O.useEffect(()=>{n.current=t},[t,e]),n.current};function yt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:r,defaultNS:s}=O.useContext(xne)||{},i=n||r||F8();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new aSe),!i){qk("You will need to pass in an i18next instance by using initReactI18next");const E=(T,A)=>typeof A=="string"?A:A&&typeof A=="object"&&typeof A.defaultValue=="string"?A.defaultValue:Array.isArray(T)?T[T.length-1]:T,D=[E,{},!1];return D.t=E,D.i18n={},D.ready=!1,D}i.options.react&&i.options.react.wait!==void 0&&qk("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...vne(),...i.options.react,...e},{useSuspense:a,keyPrefix:l}=o;let c=t||s||i.options&&i.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(c);const d=(i.isInitialized||i.initializedStoreOnce)&&c.every(E=>Kxe(E,i,o));function f(){return i.getFixedT(e.lng||null,o.nsMode==="fallback"?c:c[0],l)}const[p,m]=O.useState(f);let v=c.join();e.lng&&(v=`${e.lng}${v}`);const y=lSe(v),x=O.useRef(!0);O.useEffect(()=>{const{bindI18n:E,bindI18nStore:D}=o;x.current=!0,!d&&!a&&(e.lng?oH(i,e.lng,c,()=>{x.current&&m(f)}):iH(i,c,()=>{x.current&&m(f)})),d&&y&&y!==v&&x.current&&m(f);function T(){x.current&&m(f)}return E&&i&&i.on(E,T),D&&i&&i.store.on(D,T),()=>{x.current=!1,E&&i&&E.split(" ").forEach(A=>i.off(A,T)),D&&i&&D.split(" ").forEach(A=>i.store.off(A,T))}},[i,v]);const w=O.useRef(!0);O.useEffect(()=>{x.current&&!w.current&&m(f),w.current=!1},[i,l]);const C=[p,i,d];if(C.t=p,C.i18n=i,C.ready=d,d||!d&&!a)return C;throw new Promise(E=>{e.lng?oH(i,e.lng,c,()=>E()):iH(i,c,()=>E())})}var cSe=Object.defineProperty,uSe=(t,e,n)=>e in t?cSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uk=(t,e,n)=>uSe(t,typeof e!="symbol"?e+"":e,n);const dSe={accent:OM("#339AF0"),primary:OM(["#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#f7f7f7","#343a40","#f7f7f7","#f7f7f7","#f7f7f7"]),secondary:OM("#868e96"),warning:OM("#FA5252"),grey:["#F7F9FB","#EEF3F9","#E6EDF5","#DAE3ED","#C9D3E0","#A9B4C6","#818DA1","#4C576A","#31394A","#1E232E"]},fSe={cursorType:"pointer",colors:dSe},An={DiskFileShared:1,DiskFileCommented:2,DiskFileMentioned:3,DiskFileUploaded:23,DiskFilePermissionGranted:24,DiskFileDownloadReady:25,DiskLinkGenerated:26,DiskDirectoryShared:200,DiskRoomShared:201,ProjectShared:400,ProjectTaskCreated:401,ProjectTaskDeleted:402,ProjectTaskUpdated:403,ProjectTaskMoved:404,ProjectTaskStatusChanged:405,ProjectTaskCommented:406,ProjectMyTaskDeleted:420,ProjectMyTaskUpdated:421,ProjectMyTaskMoved:422,ProjectMyTaskStatusChanged:423,ProjectMyTaskCommented:424,ProjectTaskUnassigned:425,ProjectTaskAssigned:426,ProjectTaskMentioned:427,ProjectTaskAttachmentAdded:429,ProjectSprintCreated:450,AdminRoleAssigned:500,AdminRoleDeleted:501,MailMessageImportant:550,MailMessageReceived:551,CalendarShared:600,CalendarEventCanceled:601,CalendarEventInvited:602,CalendarEventUpdated:603,CalendarEventUpcoming:604},Od={Unread:0,Read:1},Sne=()=>{const{colorScheme:t}=NQ();return{isDark:t==="dark",colorScheme:t}},Sw=({children:t})=>g.jsx(Is,{gap:2,w:"100%",style:{flexGrow:1},children:t});function wne(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zD={exports:{}},pSe=zD.exports,aH;function Cne(){return aH||(aH=1,(function(t,e){(function(n,r){t.exports=r()})(pSe,function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",d="week",f="month",p="quarter",m="year",v="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var q=["th","st","nd","rd"],H=F%100;return"["+F+(q[(H-20)%10]||q[H]||q[0])+"]"}},E=function(F,q,H){var B=String(F);return!B||B.length>=q?F:""+Array(q+1-B.length).join(H)+F},D={s:E,z:function(F){var q=-F.utcOffset(),H=Math.abs(q),B=Math.floor(H/60),V=H%60;return(q<=0?"+":"-")+E(B,2,"0")+":"+E(V,2,"0")},m:function F(q,H){if(q.date()<H.date())return-F(H,q);var B=12*(H.year()-q.year())+(H.month()-q.month()),V=q.clone().add(B,f),Y=H-V<0,G=q.clone().add(B+(Y?-1:1),f);return+(-(B+(H-V)/(Y?V-G:G-V))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:m,w:d,d:c,D:v,h:l,m:a,s:o,ms:i,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},T="en",A={};A[T]=C;var _="$isDayjsObject",R=function(F){return F instanceof L||!(!F||!F[_])},N=function F(q,H,B){var V;if(!q)return T;if(typeof q=="string"){var Y=q.toLowerCase();A[Y]&&(V=Y),H&&(A[Y]=H,V=Y);var G=q.split("-");if(!V&&G.length>1)return F(G[0])}else{var W=q.name;A[W]=q,V=W}return!B&&V&&(T=V),V||!B&&T},I=function(F,q){if(R(F))return F.clone();var H=typeof q=="object"?q:{};return H.date=F,H.args=arguments,new L(H)},$=D;$.l=N,$.i=R,$.w=function(F,q){return I(F,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var L=(function(){function F(H){this.$L=N(H.locale,null,!0),this.parse(H),this.$x=this.$x||H.x||{},this[_]=!0}var q=F.prototype;return q.parse=function(H){this.$d=(function(B){var V=B.date,Y=B.utc;if(V===null)return new Date(NaN);if($.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var G=V.match(x);if(G){var W=G[2]-1||0,Z=(G[7]||"0").substring(0,3);return Y?new Date(Date.UTC(G[1],W,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)):new Date(G[1],W,G[3]||1,G[4]||0,G[5]||0,G[6]||0,Z)}}return new Date(V)})(H),this.init()},q.init=function(){var H=this.$d;this.$y=H.getFullYear(),this.$M=H.getMonth(),this.$D=H.getDate(),this.$W=H.getDay(),this.$H=H.getHours(),this.$m=H.getMinutes(),this.$s=H.getSeconds(),this.$ms=H.getMilliseconds()},q.$utils=function(){return $},q.isValid=function(){return this.$d.toString()!==y},q.isSame=function(H,B){var V=I(H);return this.startOf(B)<=V&&V<=this.endOf(B)},q.isAfter=function(H,B){return I(H)<this.startOf(B)},q.isBefore=function(H,B){return this.endOf(B)<I(H)},q.$g=function(H,B,V){return $.u(H)?this[B]:this.set(V,H)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(H,B){var V=this,Y=!!$.u(B)||B,G=$.p(H),W=function(ce,ue){var pe=$.w(V.$u?Date.UTC(V.$y,ue,ce):new Date(V.$y,ue,ce),V);return Y?pe:pe.endOf(c)},Z=function(ce,ue){return $.w(V.toDate()[ce].apply(V.toDate("s"),(Y?[0,0,0,0]:[23,59,59,999]).slice(ue)),V)},Q=this.$W,X=this.$M,re=this.$D,ne="set"+(this.$u?"UTC":"");switch(G){case m:return Y?W(1,0):W(31,11);case f:return Y?W(1,X):W(0,X+1);case d:var ee=this.$locale().weekStart||0,oe=(Q<ee?Q+7:Q)-ee;return W(Y?re-oe:re+(6-oe),X);case c:case v:return Z(ne+"Hours",0);case l:return Z(ne+"Minutes",1);case a:return Z(ne+"Seconds",2);case o:return Z(ne+"Milliseconds",3);default:return this.clone()}},q.endOf=function(H){return this.startOf(H,!1)},q.$set=function(H,B){var V,Y=$.p(H),G="set"+(this.$u?"UTC":""),W=(V={},V[c]=G+"Date",V[v]=G+"Date",V[f]=G+"Month",V[m]=G+"FullYear",V[l]=G+"Hours",V[a]=G+"Minutes",V[o]=G+"Seconds",V[i]=G+"Milliseconds",V)[Y],Z=Y===c?this.$D+(B-this.$W):B;if(Y===f||Y===m){var Q=this.clone().set(v,1);Q.$d[W](Z),Q.init(),this.$d=Q.set(v,Math.min(this.$D,Q.daysInMonth())).$d}else W&&this.$d[W](Z);return this.init(),this},q.set=function(H,B){return this.clone().$set(H,B)},q.get=function(H){return this[$.p(H)]()},q.add=function(H,B){var V,Y=this;H=Number(H);var G=$.p(B),W=function(X){var re=I(Y);return $.w(re.date(re.date()+Math.round(X*H)),Y)};if(G===f)return this.set(f,this.$M+H);if(G===m)return this.set(m,this.$y+H);if(G===c)return W(1);if(G===d)return W(7);var Z=(V={},V[a]=r,V[l]=s,V[o]=n,V)[G]||1,Q=this.$d.getTime()+H*Z;return $.w(Q,this)},q.subtract=function(H,B){return this.add(-1*H,B)},q.format=function(H){var B=this,V=this.$locale();if(!this.isValid())return V.invalidDate||y;var Y=H||"YYYY-MM-DDTHH:mm:ssZ",G=$.z(this),W=this.$H,Z=this.$m,Q=this.$M,X=V.weekdays,re=V.months,ne=V.meridiem,ee=function(ue,pe,de,me){return ue&&(ue[pe]||ue(B,Y))||de[pe].slice(0,me)},oe=function(ue){return $.s(W%12||12,ue,"0")},ce=ne||function(ue,pe,de){var me=ue<12?"AM":"PM";return de?me.toLowerCase():me};return Y.replace(w,function(ue,pe){return pe||(function(de){switch(de){case"YY":return String(B.$y).slice(-2);case"YYYY":return $.s(B.$y,4,"0");case"M":return Q+1;case"MM":return $.s(Q+1,2,"0");case"MMM":return ee(V.monthsShort,Q,re,3);case"MMMM":return ee(re,Q);case"D":return B.$D;case"DD":return $.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return ee(V.weekdaysMin,B.$W,X,2);case"ddd":return ee(V.weekdaysShort,B.$W,X,3);case"dddd":return X[B.$W];case"H":return String(W);case"HH":return $.s(W,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ce(W,Z,!0);case"A":return ce(W,Z,!1);case"m":return String(Z);case"mm":return $.s(Z,2,"0");case"s":return String(B.$s);case"ss":return $.s(B.$s,2,"0");case"SSS":return $.s(B.$ms,3,"0");case"Z":return G}return null})(ue)||G.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(H,B,V){var Y,G=this,W=$.p(B),Z=I(H),Q=(Z.utcOffset()-this.utcOffset())*r,X=this-Z,re=function(){return $.m(G,Z)};switch(W){case m:Y=re()/12;break;case f:Y=re();break;case p:Y=re()/3;break;case d:Y=(X-Q)/6048e5;break;case c:Y=(X-Q)/864e5;break;case l:Y=X/s;break;case a:Y=X/r;break;case o:Y=X/n;break;default:Y=X}return V?Y:$.a(Y)},q.daysInMonth=function(){return this.endOf(f).$D},q.$locale=function(){return A[this.$L]},q.locale=function(H,B){if(!H)return this.$L;var V=this.clone(),Y=N(H,B,!0);return Y&&(V.$L=Y),V},q.clone=function(){return $.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},F})(),z=L.prototype;return I.prototype=z,[["$ms",i],["$s",o],["$m",a],["$H",l],["$W",c],["$M",f],["$y",m],["$D",v]].forEach(function(F){z[F[1]]=function(q){return this.$g(q,F[0],F[1])}}),I.extend=function(F,q){return F.$i||(F(q,L,I),F.$i=!0),I},I.locale=N,I.isDayjs=R,I.unix=function(F){return I(1e3*F)},I.en=A[T],I.Ls=A,I.p={},I})})(zD)),zD.exports}var hSe=Cne();const zy=wne(hSe);var FD={exports:{}},mSe=FD.exports,lH;function gSe(){return lH||(lH=1,(function(t,e){(function(n,r){t.exports=r(Cne())})(mSe,function(n){function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var s=r(n),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),o="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),a="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),l="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(v,y,x){var w,C;return x==="m"?y?"минута":"минуту":v+" "+(w=+v,C={mm:y?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[x].split("_"),w%10==1&&w%100!=11?C[0]:w%10>=2&&w%10<=4&&(w%100<10||w%100>=20)?C[1]:C[2])}var f=function(v,y){return c.test(y)?i[v.month()]:o[v.month()]};f.s=o,f.f=i;var p=function(v,y){return c.test(y)?a[v.month()]:l[v.month()]};p.s=l,p.f=a;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:f,monthsShort:p,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:d,mm:d,h:"час",hh:d,d:"день",dd:d,M:"месяц",MM:d,y:"год",yy:d},ordinal:function(v){return v},meridiem:function(v){return v<4?"ночи":v<12?"утра":v<17?"дня":"вечера"}};return s.default.locale(m,null,!0),m})})(FD)),FD.exports}gSe();const vSe=t=>{if(!t)return"";const e=Ln.language.split("-")[0];zy.locale(e);const n=zy(t),r=zy();if(n.isSame(r,"day"))return new Intl.DateTimeFormat(e,{hour:"2-digit",minute:"2-digit"}).format(n.toDate());if(n.isSame(r,"year")){const o=new Intl.DateTimeFormat(e,{day:"numeric",month:"long"}).format(n.toDate()),[a,l]=o.split(" "),c=l.length>4?l.slice(0,3)+".":l;return`${a} ${c}`}return new Intl.DateTimeFormat(e).format(n.toDate())},ySe=t=>{if(!t||typeof t!="string")return 0;const e=t.trim();if(e.includes(".")){const[r,...s]=e.split("."),i=parseInt(r,10);if(isNaN(i))return 0;if(s.length>0){const a=s.join(".").split(":").map(l=>parseInt(l,10));if(a.some(l=>isNaN(l)))return 0;if(a.length===3){const[l,c,d]=a;return i*86400+l*3600+c*60+d}}return i*86400}const n=e.split(":").map(r=>parseInt(r,10));if(n.some(r=>isNaN(r)))return 0;if(n.length===2){const[r,s]=n;return r*60+s}else if(n.length===3){const[r,s,i]=n;return r*3600+s*60+i}else if(n.length===4){const[r,s,i,o]=n;return r*86400+s*3600+i*60+o}return 0};function JI(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var GR=()=>Math.random().toString(36).substring(7).split("").join("."),bSe={INIT:`@@redux/INIT${GR()}`,REPLACE:`@@redux/REPLACE${GR()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${GR()}`},cH=bSe;function sh(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function xSe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:cH.INIT})>"u")throw new Error(JI(12));if(typeof n(void 0,{type:cH.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(JI(13))})}function SSe(t){const e=Object.keys(t),n={};for(let i=0;i<e.length;i++){const o=e[i];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let s;try{xSe(n)}catch(i){s=i}return function(o={},a){if(s)throw s;let l=!1;const c={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],m=o[f],v=p(m,a);if(typeof v>"u")throw a&&a.type,new Error(JI(14));c[f]=v,l=l||v!==m}return l=l||r.length!==Object.keys(o).length,l?c:o}}function Ene(t){return sh(t)&&"type"in t&&typeof t.type=="string"}var B8=Symbol.for("immer-nothing"),$x=Symbol.for("immer-draftable"),wa=Symbol.for("immer-state");function Ii(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var zg=Object.getPrototypeOf;function ju(t){return!!t&&!!t[wa]}function wc(t){var e;return t?Mne(t)||Array.isArray(t)||!!t[$x]||!!((e=t.constructor)!=null&&e[$x])||ww(t)||Cw(t):!1}var wSe=Object.prototype.constructor.toString();function Mne(t){if(!t||typeof t!="object")return!1;const e=zg(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===wSe}function CSe(t){return ju(t)||Ii(15,t),t[wa].base_}function yS(t,e){Fg(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Fg(t){const e=t[wa];return e?e.type_:Array.isArray(t)?1:ww(t)?2:Cw(t)?3:0}function bS(t,e){return Fg(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function KR(t,e){return Fg(t)===2?t.get(e):t[e]}function Dne(t,e,n){const r=Fg(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function ESe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function ww(t){return t instanceof Map}function Cw(t){return t instanceof Set}function ng(t){return t.copy_||t.base_}function XI(t,e){if(ww(t))return new Map(t);if(Cw(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Mne(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[wa];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[o]})}return Object.create(zg(t),r)}else{const r=zg(t);if(r!==null&&n)return{...t};const s=Object.create(r);return Object.assign(s,t)}}function H8(t,e=!1){return S_(t)||ju(t)||!wc(t)||(Fg(t)>1&&(t.set=t.add=t.clear=t.delete=MSe),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>H8(r,!0))),t}function MSe(){Ii(2)}function S_(t){return Object.isFrozen(t)}var QI={};function Bg(t){const e=QI[t];return e||Ii(0,t),e}function DSe(t,e){QI[t]||(QI[t]=e)}var xS;function kne(){return xS}function kSe(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function uH(t,e){e&&(Bg("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function eL(t){tL(t),t.drafts_.forEach(TSe),t.drafts_=null}function tL(t){t===xS&&(xS=t.parent_)}function dH(t){return xS=kSe(xS,t)}function TSe(t){const e=t[wa];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function fH(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[wa].modified_&&(eL(e),Ii(4)),wc(t)&&(t=Vk(e,t),e.parent_||Wk(e,t)),e.patches_&&Bg("Patches").generateReplacementPatches_(n[wa].base_,t,e.patches_,e.inversePatches_)):t=Vk(e,n,[]),eL(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==B8?t:void 0}function Vk(t,e,n){if(S_(e))return e;const r=e[wa];if(!r)return yS(e,(s,i)=>pH(t,r,e,s,i,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Wk(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let i=s,o=!1;r.type_===3&&(i=new Set(s),s.clear(),o=!0),yS(i,(a,l)=>pH(t,r,s,a,l,n,o)),Wk(t,s,!1),n&&t.patches_&&Bg("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function pH(t,e,n,r,s,i,o){if(ju(s)){const a=i&&e&&e.type_!==3&&!bS(e.assigned_,r)?i.concat(r):void 0,l=Vk(t,s,a);if(Dne(n,r,l),ju(l))t.canAutoFreeze_=!1;else return}else o&&n.add(s);if(wc(s)&&!S_(s)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Vk(t,s),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Wk(t,s)}}function Wk(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&H8(e,n)}function ASe(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:kne(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,i=q8;n&&(s=[r],i=SS);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,a}var q8={get(t,e){if(e===wa)return t;const n=ng(t);if(!bS(n,e))return _Se(t,n,e);const r=n[e];return t.finalized_||!wc(r)?r:r===ZR(t.base_,e)?(JR(t),t.copy_[e]=rL(r,t)):r},has(t,e){return e in ng(t)},ownKeys(t){return Reflect.ownKeys(ng(t))},set(t,e,n){const r=Tne(ng(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const s=ZR(ng(t),e),i=s==null?void 0:s[wa];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(ESe(n,s)&&(n!==void 0||bS(t.base_,e)))return!0;JR(t),nL(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return ZR(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,JR(t),nL(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=ng(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Ii(11)},getPrototypeOf(t){return zg(t.base_)},setPrototypeOf(){Ii(12)}},SS={};yS(q8,(t,e)=>{SS[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});SS.deleteProperty=function(t,e){return SS.set.call(this,t,e,void 0)};SS.set=function(t,e,n){return q8.set.call(this,t[0],e,n,t[0])};function ZR(t,e){const n=t[wa];return(n?ng(n):t)[e]}function _Se(t,e,n){var r;const s=Tne(e,n);return s?"value"in s?s.value:(r=s.get)==null?void 0:r.call(t.draft_):void 0}function Tne(t,e){if(!(e in t))return;let n=zg(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=zg(n)}}function nL(t){t.modified_||(t.modified_=!0,t.parent_&&nL(t.parent_))}function JR(t){t.copy_||(t.copy_=XI(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var OSe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,r,s)=>{if(typeof n=="function"&&typeof r!="function"){const o=r;r=n;const a=this;return function(c=o,...d){return a.produce(c,f=>r.call(this,f,...d))}}typeof r!="function"&&Ii(6),s!==void 0&&typeof s!="function"&&Ii(7);let i;if(wc(n)){const o=dH(this),a=rL(n,void 0);let l=!0;try{i=r(a),l=!1}finally{l?eL(o):tL(o)}return uH(o,s),fH(i,o)}else if(!n||typeof n!="object"){if(i=r(n),i===void 0&&(i=n),i===B8&&(i=void 0),this.autoFreeze_&&H8(i,!0),s){const o=[],a=[];Bg("Patches").generateReplacementPatches_(n,i,o,a),s(o,a)}return i}else Ii(1,n)},this.produceWithPatches=(n,r)=>{if(typeof n=="function")return(a,...l)=>this.produceWithPatches(a,c=>n(c,...l));let s,i;return[this.produce(n,r,(a,l)=>{s=a,i=l}),s,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wc(e)||Ii(8),ju(e)&&(e=RSe(e));const n=dH(this),r=rL(e,void 0);return r[wa].isManual_=!0,tL(n),r}finishDraft(e,n){const r=e&&e[wa];(!r||!r.isManual_)&&Ii(9);const{scope_:s}=r;return uH(s,n),fH(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(n=n.slice(r+1));const s=Bg("Patches").applyPatches_;return ju(e)?s(e,n):this.produce(e,i=>s(i,n))}};function rL(t,e){const n=ww(t)?Bg("MapSet").proxyMap_(t,e):Cw(t)?Bg("MapSet").proxySet_(t,e):ASe(t,e);return(e?e.scope_:kne()).drafts_.push(n),n}function RSe(t){return ju(t)||Ii(10,t),Ane(t)}function Ane(t){if(!wc(t)||S_(t))return t;const e=t[wa];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=XI(t,e.scope_.immer_.useStrictShallowCopy_)}else n=XI(t,!0);return yS(n,(r,s)=>{Dne(n,r,Ane(s))}),e&&(e.finalized_=!1),n}function NSe(){const e="replace",r="remove";function s(p,m,v,y){switch(p.type_){case 0:case 2:return o(p,m,v,y);case 1:return i(p,m,v,y);case 3:return a(p,m,v,y)}}function i(p,m,v,y){let{base_:x,assigned_:w}=p,C=p.copy_;C.length<x.length&&([x,C]=[C,x],[v,y]=[y,v]);for(let E=0;E<x.length;E++)if(w[E]&&C[E]!==x[E]){const D=m.concat([E]);v.push({op:e,path:D,value:f(C[E])}),y.push({op:e,path:D,value:f(x[E])})}for(let E=x.length;E<C.length;E++){const D=m.concat([E]);v.push({op:"add",path:D,value:f(C[E])})}for(let E=C.length-1;x.length<=E;--E){const D=m.concat([E]);y.push({op:r,path:D})}}function o(p,m,v,y){const{base_:x,copy_:w}=p;yS(p.assigned_,(C,E)=>{const D=KR(x,C),T=KR(w,C),A=E?bS(x,C)?e:"add":r;if(D===T&&A===e)return;const _=m.concat(C);v.push(A===r?{op:A,path:_}:{op:A,path:_,value:T}),y.push(A==="add"?{op:r,path:_}:A===r?{op:"add",path:_,value:f(D)}:{op:e,path:_,value:f(D)})})}function a(p,m,v,y){let{base_:x,copy_:w}=p,C=0;x.forEach(E=>{if(!w.has(E)){const D=m.concat([C]);v.push({op:r,path:D,value:E}),y.unshift({op:"add",path:D,value:E})}C++}),C=0,w.forEach(E=>{if(!x.has(E)){const D=m.concat([C]);v.push({op:"add",path:D,value:E}),y.unshift({op:r,path:D,value:E})}C++})}function l(p,m,v,y){v.push({op:e,path:[],value:m===B8?void 0:m}),y.push({op:e,path:[],value:p})}function c(p,m){return m.forEach(v=>{const{path:y,op:x}=v;let w=p;for(let T=0;T<y.length-1;T++){const A=Fg(w);let _=y[T];typeof _!="string"&&typeof _!="number"&&(_=""+_),(A===0||A===1)&&(_==="__proto__"||_==="constructor")&&Ii(19),typeof w=="function"&&_==="prototype"&&Ii(19),w=KR(w,_),typeof w!="object"&&Ii(18,y.join("/"))}const C=Fg(w),E=d(v.value),D=y[y.length-1];switch(x){case e:switch(C){case 2:return w.set(D,E);case 3:Ii(16);default:return w[D]=E}case"add":switch(C){case 1:return D==="-"?w.push(E):w.splice(D,0,E);case 2:return w.set(D,E);case 3:return w.add(E);default:return w[D]=E}case r:switch(C){case 1:return w.splice(D,1);case 2:return w.delete(D);case 3:return w.delete(v.value);default:return delete w[D]}default:Ii(17,x)}}),p}function d(p){if(!wc(p))return p;if(Array.isArray(p))return p.map(d);if(ww(p))return new Map(Array.from(p.entries()).map(([v,y])=>[v,d(y)]));if(Cw(p))return new Set(Array.from(p).map(d));const m=Object.create(zg(p));for(const v in p)m[v]=d(p[v]);return bS(p,$x)&&(m[$x]=p[$x]),m}function f(p){return ju(p)?d(p):p}DSe("Patches",{applyPatches_:c,generatePatches_:s,generateReplacementPatches_:l})}var Za=new OSe,Ew=Za.produce,_ne=Za.produceWithPatches.bind(Za);Za.setAutoFreeze.bind(Za);Za.setUseStrictShallowCopy.bind(Za);var hH=Za.applyPatches.bind(Za);Za.createDraft.bind(Za);Za.finishDraft.bind(Za);function jSe(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function ISe(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function LSe(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(n=>typeof n=="function")){const n=t.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${e}[${n}]`)}}var mH=t=>Array.isArray(t)?t:[t];function PSe(t){const e=Array.isArray(t[0])?t[0]:t;return LSe(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function $Se(t,e){const n=[],{length:r}=t;for(let s=0;s<r;s++)n.push(t[s].apply(null,e));return n}var zSe=class{constructor(t){this.value=t}deref(){return this.value}},FSe=typeof WeakRef<"u"?WeakRef:zSe,BSe=0,gH=1;function PM(){return{s:BSe,v:void 0,o:null,p:null}}function Yk(t,e={}){let n=PM();const{resultEqualityCheck:r}=e;let s,i=0;function o(){var a;let l=n;const{length:c}=arguments;for(let p=0,m=c;p<m;p++){const v=arguments[p];if(typeof v=="function"||typeof v=="object"&&v!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const x=y.get(v);x===void 0?(l=PM(),y.set(v,l)):l=x}else{let y=l.p;y===null&&(l.p=y=new Map);const x=y.get(v);x===void 0?(l=PM(),y.set(v,l)):l=x}}const d=l;let f;if(l.s===gH)f=l.v;else if(f=t.apply(null,arguments),i++,r){const p=((a=s==null?void 0:s.deref)==null?void 0:a.call(s))??s;p!=null&&r(p,f)&&(f=p,i!==0&&i--),s=typeof f=="object"&&f!==null||typeof f=="function"?new FSe(f):f}return d.s=gH,d.v=f,f}return o.clearCache=()=>{n=PM(),o.resetResultsCount()},o.resultsCount=()=>i,o.resetResultsCount=()=>{i=0},o}function HSe(t,...e){const n=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,r=(...s)=>{let i=0,o=0,a,l={},c=s.pop();typeof c=="object"&&(l=c,c=s.pop()),jSe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:m=Yk,argsMemoizeOptions:v=[]}=d,y=mH(p),x=mH(v),w=PSe(s),C=f(function(){return i++,c.apply(null,arguments)},...y),E=m(function(){o++;const T=$Se(w,arguments);return a=C.apply(null,T),a},...x);return Object.assign(E,{resultFunc:c,memoizedResultFunc:C,dependencies:w,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var U8=HSe(Yk),qSe=Object.assign((t,e=U8)=>{ISe(t,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`);const n=Object.keys(t),r=n.map(i=>t[i]);return e(r,(...i)=>i.reduce((o,a,l)=>(o[n[l]]=a,o),{}))},{withTypes:()=>qSe}),USe=t=>t&&typeof t.match=="function";function vc(t,e){function n(...r){if(e){let s=e(...r);if(!s)throw new Error(ku(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>Ene(r)&&r.type===t,n}function vH(t){return wc(t)?Ew(t,()=>{}):t}function yH(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}var Oy="RTK_autoBatch",nx=()=>t=>({payload:t,meta:{[Oy]:!0}});function One(t){const e={},n=[];let r;const s={addCase(i,o){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(ku(28));if(a in e)throw new Error(ku(29));return e[a]=o,s},addMatcher(i,o){return n.push({matcher:i,reducer:o}),s},addDefaultCase(i){return r=i,s}};return t(s),[e,n,r]}function VSe(t){return typeof t=="function"}function WSe(t,e){let[n,r,s]=One(e),i;if(VSe(t))i=()=>vH(t());else{const a=vH(t);i=()=>a}function o(a=i(),l){let c=[n[l.type],...r.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return c.filter(d=>!!d).length===0&&(c=[s]),c.reduce((d,f)=>{if(f)if(ju(d)){const m=f(d,l);return m===void 0?d:m}else{if(wc(d))return Ew(d,p=>f(p,l));{const p=f(d,l);if(p===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return d},a)}return o.getInitialState=i,o}var Rne=(t,e)=>USe(t)?t.match(e):t(e);function Vd(...t){return e=>t.some(n=>Rne(n,e))}function zx(...t){return e=>t.every(n=>Rne(n,e))}function w_(t,e){if(!t||!t.meta)return!1;const n=typeof t.meta.requestId=="string",r=e.indexOf(t.meta.requestStatus)>-1;return n&&r}function Mw(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function V8(...t){return t.length===0?e=>w_(e,["pending"]):Mw(t)?Vd(...t.map(e=>e.pending)):V8()(t[0])}function Qy(...t){return t.length===0?e=>w_(e,["rejected"]):Mw(t)?Vd(...t.map(e=>e.rejected)):Qy()(t[0])}function C_(...t){const e=n=>n&&n.meta&&n.meta.rejectedWithValue;return t.length===0?zx(Qy(...t),e):Mw(t)?zx(Qy(...t),e):C_()(t[0])}function ih(...t){return t.length===0?e=>w_(e,["fulfilled"]):Mw(t)?Vd(...t.map(e=>e.fulfilled)):ih()(t[0])}function sL(...t){return t.length===0?e=>w_(e,["pending","fulfilled","rejected"]):Mw(t)?Vd(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):sL()(t[0])}var YSe="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",W8=(t=21)=>{let e="",n=t;for(;n--;)e+=YSe[Math.random()*64|0];return e},GSe=["name","message","stack","code"],XR=class{constructor(e,n){Uk(this,"_type"),this.payload=e,this.meta=n}},bH=class{constructor(e,n){Uk(this,"_type"),this.payload=e,this.meta=n}},KSe=t=>{if(typeof t=="object"&&t!==null){const e={};for(const n of GSe)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},xH=(()=>{function t(e,n,r){const s=vc(e+"/fulfilled",(l,c,d,f)=>({payload:l,meta:{...f||{},arg:d,requestId:c,requestStatus:"fulfilled"}})),i=vc(e+"/pending",(l,c,d)=>({payload:void 0,meta:{...d||{},arg:c,requestId:l,requestStatus:"pending"}})),o=vc(e+"/rejected",(l,c,d,f,p)=>({payload:f,error:(r&&r.serializeError||KSe)(l||"Rejected"),meta:{...p||{},arg:d,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function a(l){return(c,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(l):W8(),m=new AbortController;let v,y;function x(C){y=C,m.abort()}const w=(async function(){var C,E;let D;try{let A=(C=r==null?void 0:r.condition)==null?void 0:C.call(r,l,{getState:d,extra:f});if(JSe(A)&&(A=await A),A===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((R,N)=>{v=()=>{N({name:"AbortError",message:y||"Aborted"})},m.signal.addEventListener("abort",v)});c(i(p,l,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),D=await Promise.race([_,Promise.resolve(n(l,{dispatch:c,getState:d,extra:f,requestId:p,signal:m.signal,abort:x,rejectWithValue:(R,N)=>new XR(R,N),fulfillWithValue:(R,N)=>new bH(R,N)})).then(R=>{if(R instanceof XR)throw R;return R instanceof bH?s(R.payload,p,l,R.meta):s(R,p,l)})])}catch(A){D=A instanceof XR?o(null,p,l,A.payload,A.meta):o(A,p,l)}finally{v&&m.signal.removeEventListener("abort",v)}return r&&!r.dispatchConditionRejection&&o.match(D)&&D.meta.condition||c(D),D})();return Object.assign(w,{abort:x,requestId:p,arg:l,unwrap(){return w.then(ZSe)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:Vd(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function ZSe(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function JSe(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var XSe=Symbol.for("rtk-slice-createasyncthunk");function QSe(t,e){return`${t}/${e}`}function ewe({creators:t}={}){var e;const n=(e=t==null?void 0:t.asyncThunk)==null?void 0:e[XSe];return function(s){const{name:i,reducerPath:o=i}=s;if(!i)throw new Error(ku(11));const a=(typeof s.reducers=="function"?s.reducers(nwe()):s.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(E,D){const T=typeof E=="string"?E:E.type;if(!T)throw new Error(ku(12));if(T in c.sliceCaseReducersByType)throw new Error(ku(13));return c.sliceCaseReducersByType[T]=D,d},addMatcher(E,D){return c.sliceMatchers.push({matcher:E,reducer:D}),d},exposeAction(E,D){return c.actionCreators[E]=D,d},exposeCaseReducer(E,D){return c.sliceCaseReducersByName[E]=D,d}};l.forEach(E=>{const D=a[E],T={reducerName:E,type:QSe(i,E),createNotation:typeof s.reducers=="function"};swe(D)?owe(T,D,d,n):rwe(T,D,d)});function f(){const[E={},D=[],T=void 0]=typeof s.extraReducers=="function"?One(s.extraReducers):[s.extraReducers],A={...E,...c.sliceCaseReducersByType};return WSe(s.initialState,_=>{for(let R in A)_.addCase(R,A[R]);for(let R of c.sliceMatchers)_.addMatcher(R.matcher,R.reducer);for(let R of D)_.addMatcher(R.matcher,R.reducer);T&&_.addDefaultCase(T)})}const p=E=>E,m=new Map;let v;function y(E,D){return v||(v=f()),v(E,D)}function x(){return v||(v=f()),v.getInitialState()}function w(E,D=!1){function T(_){let R=_[E];return typeof R>"u"&&D&&(R=x()),R}function A(_=p){const R=yH(m,D,()=>new WeakMap);return yH(R,_,()=>{const N={};for(const[I,$]of Object.entries(s.selectors??{}))N[I]=twe($,_,x,D);return N})}return{reducerPath:E,getSelectors:A,get selectors(){return A(T)},selectSlice:T}}const C={name:i,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...w(o),injectInto(E,{reducerPath:D,...T}={}){const A=D??o;return E.inject({reducerPath:A,reducer:y},T),{...C,...w(A,!0)}}};return C}}function twe(t,e,n,r){function s(i,...o){let a=e(i);return typeof a>"u"&&r&&(a=n()),t(a,...o)}return s.unwrapped=t,s}var dy=ewe();function nwe(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function rwe({type:t,reducerName:e,createNotation:n},r,s){let i,o;if("reducer"in r){if(n&&!iwe(r))throw new Error(ku(17));i=r.reducer,o=r.prepare}else i=r;s.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,o?vc(t,o):vc(t))}function swe(t){return t._reducerDefinitionType==="asyncThunk"}function iwe(t){return t._reducerDefinitionType==="reducerWithPrepare"}function owe({type:t,reducerName:e},n,r,s){if(!s)throw new Error(ku(18));const{payloadCreator:i,fulfilled:o,pending:a,rejected:l,settled:c,options:d}=n,f=s(t,i,d);r.exposeAction(e,f),o&&r.addCase(f.fulfilled,o),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:o||$M,pending:a||$M,rejected:l||$M,settled:c||$M})}function $M(){}function ku(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Nne=(t=>(t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected",t))(Nne||{});function awe(t){return{status:t,isUninitialized:t==="uninitialized",isLoading:t==="pending",isSuccess:t==="fulfilled",isError:t==="rejected"}}var SH=sh;function jne(t,e){if(t===e||!(SH(t)&&SH(e)||Array.isArray(t)&&Array.isArray(e)))return e;const n=Object.keys(e),r=Object.keys(t);let s=n.length===r.length;const i=Array.isArray(e)?[]:{};for(const o of n)i[o]=jne(t[o],e[o]),s&&(s=t[o]===i[o]);return s?t:i}function Fy(t){let e=0;for(const n in t)e++;return e}var wH=t=>[].concat(...t);function lwe(t){return new RegExp("(^|:)//").test(t)}function cwe(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Gk(t){return t!=null}function uwe(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var dwe=t=>t.replace(/\/$/,""),fwe=t=>t.replace(/^\//,"");function pwe(t,e){if(!t)return e;if(!e)return t;if(lwe(e))return e;const n=t.endsWith("/")||!e.startsWith("?")?"/":"";return t=dwe(t),e=fwe(e),`${t}${n}${e}`}function hwe(t,e,n){return t.has(e)?t.get(e):t.set(e,n).get(e)}var CH=(...t)=>fetch(...t),mwe=t=>t.status>=200&&t.status<=299,gwe=t=>/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"");function EH(t){if(!sh(t))return t;const e={...t};for(const[n,r]of Object.entries(e))r===void 0&&delete e[n];return e}function vwe({baseUrl:t,prepareHeaders:e=f=>f,fetchFn:n=CH,paramsSerializer:r,isJsonContentType:s=gwe,jsonContentType:i="application/json",jsonReplacer:o,timeout:a,responseHandler:l,validateStatus:c,...d}={}){return typeof fetch>"u"&&n===CH&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,m,v)=>{const{getState:y,extra:x,endpoint:w,forced:C,type:E}=m;let D,{url:T,headers:A=new Headers(d.headers),params:_=void 0,responseHandler:R=l??"json",validateStatus:N=c??mwe,timeout:I=a,...$}=typeof p=="string"?{url:p}:p,L,z=m.signal;I&&(L=new AbortController,m.signal.addEventListener("abort",L.abort),z=L.signal);let F={...d,signal:z,...$};A=new Headers(EH(A)),F.headers=await e(A,{getState:y,arg:p,extra:x,endpoint:w,forced:C,type:E,extraOptions:v})||A;const q=X=>typeof X=="object"&&(sh(X)||Array.isArray(X)||typeof X.toJSON=="function");if(!F.headers.has("content-type")&&q(F.body)&&F.headers.set("content-type",i),q(F.body)&&s(F.headers)&&(F.body=JSON.stringify(F.body,o)),_){const X=~T.indexOf("?")?"&":"?",re=r?r(_):new URLSearchParams(EH(_));T+=X+re}T=pwe(t,T);const H=new Request(T,F);D={request:new Request(T,F)};let V,Y=!1,G=L&&setTimeout(()=>{Y=!0,L.abort()},I);try{V=await n(H)}catch(X){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(X)},meta:D}}finally{G&&clearTimeout(G),L==null||L.signal.removeEventListener("abort",L.abort)}const W=V.clone();D.response=W;let Z,Q="";try{let X;if(await Promise.all([f(V,R).then(re=>Z=re,re=>X=re),W.text().then(re=>Q=re,()=>{})]),X)throw X}catch(X){return{error:{status:"PARSING_ERROR",originalStatus:V.status,data:Q,error:String(X)},meta:D}}return N(V,Z)?{data:Z,meta:D}:{error:{status:V.status,data:Z},meta:D}};async function f(p,m){if(typeof m=="function")return m(p);if(m==="content-type"&&(m=s(p.headers)?"json":"text"),m==="json"){const v=await p.text();return v.length?JSON.parse(v):null}return p.text()}}var MH=class{constructor(t,e=void 0){this.value=t,this.meta=e}},Y8=vc("__rtkq/focused"),Ine=vc("__rtkq/unfocused"),G8=vc("__rtkq/online"),Lne=vc("__rtkq/offline");function Pne(t){return t.type==="query"}function ywe(t){return t.type==="mutation"}function K8(t,e,n,r,s,i){return bwe(t)?t(e,n,r,s).filter(Gk).map(iL).map(i):Array.isArray(t)?t.map(iL).map(i):[]}function bwe(t){return typeof t=="function"}function iL(t){return typeof t=="string"?{type:t}:t}function xwe(t,e){return t.catch(e)}var wS=Symbol("forceQueryFn"),oL=t=>typeof t[wS]=="function";function Swe({serializeQueryArgs:t,queryThunk:e,mutationThunk:n,api:r,context:s}){const i=new Map,o=new Map,{unsubscribeQueryResult:a,removeMutationResult:l,updateSubscriptionOptions:c}=r.internalActions;return{buildInitiateQuery:v,buildInitiateMutation:y,getRunningQueryThunk:d,getRunningMutationThunk:f,getRunningQueriesThunk:p,getRunningMutationsThunk:m};function d(x,w){return C=>{var E;const D=s.endpointDefinitions[x],T=t({queryArgs:w,endpointDefinition:D,endpointName:x});return(E=i.get(C))==null?void 0:E[T]}}function f(x,w){return C=>{var E;return(E=o.get(C))==null?void 0:E[w]}}function p(){return x=>Object.values(i.get(x)||{}).filter(Gk)}function m(){return x=>Object.values(o.get(x)||{}).filter(Gk)}function v(x,w){const C=(E,{subscribe:D=!0,forceRefetch:T,subscriptionOptions:A,[wS]:_,...R}={})=>(N,I)=>{var $;const L=t({queryArgs:E,endpointDefinition:w,endpointName:x}),z=e({...R,type:"query",subscribe:D,forceRefetch:T,subscriptionOptions:A,endpointName:x,originalArgs:E,queryCacheKey:L,[wS]:_}),F=r.endpoints[x].select(E),q=N(z),H=F(I()),{requestId:B,abort:V}=q,Y=H.requestId!==B,G=($=i.get(N))==null?void 0:$[L],W=()=>F(I()),Z=Object.assign(_?q.then(W):Y&&!G?Promise.resolve(H):Promise.all([G,q]).then(W),{arg:E,requestId:B,subscriptionOptions:A,queryCacheKey:L,abort:V,async unwrap(){const Q=await Z;if(Q.isError)throw Q.error;return Q.data},refetch:()=>N(C(E,{subscribe:!1,forceRefetch:!0})),unsubscribe(){D&&N(a({queryCacheKey:L,requestId:B}))},updateSubscriptionOptions(Q){Z.subscriptionOptions=Q,N(c({endpointName:x,requestId:B,queryCacheKey:L,options:Q}))}});if(!G&&!Y&&!_){const Q=hwe(i,N,{});Q[L]=Z,Z.then(()=>{delete Q[L],Fy(Q)||i.delete(N)})}return Z};return C}function y(x){return(w,{track:C=!0,fixedCacheKey:E}={})=>(D,T)=>{const A=n({type:"mutation",endpointName:x,originalArgs:w,track:C,fixedCacheKey:E}),_=D(A),{requestId:R,abort:N,unwrap:I}=_,$=xwe(_.unwrap().then(q=>({data:q})),q=>({error:q})),L=()=>{D(l({requestId:R,fixedCacheKey:E}))},z=Object.assign($,{arg:_.arg,requestId:R,abort:N,unwrap:I,reset:L}),F=o.get(D)||{};return o.set(D,F),F[R]=z,z.then(()=>{delete F[R],Fy(F)||o.delete(D)}),E&&(F[E]=z,z.then(()=>{F[E]===z&&(delete F[E],Fy(F)||o.delete(D))})),z}}}function DH(t){return t}function wwe({reducerPath:t,baseQuery:e,context:{endpointDefinitions:n},serializeQueryArgs:r,api:s,assertTagType:i}){const o=(C,E,D,T)=>(A,_)=>{const R=n[C],N=r({queryArgs:E,endpointDefinition:R,endpointName:C});if(A(s.internalActions.queryResultPatched({queryCacheKey:N,patches:D})),!T)return;const I=s.endpoints[C].select(E)(_()),$=K8(R.providesTags,I.data,void 0,E,{},i);A(s.internalActions.updateProvidedBy({queryCacheKey:N,providedTags:$}))},a=(C,E,D,T=!0)=>(A,_)=>{const N=s.endpoints[C].select(E)(_()),I={patches:[],inversePatches:[],undo:()=>A(s.util.patchQueryData(C,E,I.inversePatches,T))};if(N.status==="uninitialized")return I;let $;if("data"in N)if(wc(N.data)){const[L,z,F]=_ne(N.data,D);I.patches.push(...z),I.inversePatches.push(...F),$=L}else $=D(N.data),I.patches.push({op:"replace",path:[],value:$}),I.inversePatches.push({op:"replace",path:[],value:N.data});return I.patches.length===0||A(s.util.patchQueryData(C,E,I.patches,T)),I},l=(C,E,D)=>T=>T(s.endpoints[C].initiate(E,{subscribe:!1,forceRefetch:!0,[wS]:()=>({data:D})})),c=async(C,{signal:E,abort:D,rejectWithValue:T,fulfillWithValue:A,dispatch:_,getState:R,extra:N})=>{const I=n[C.endpointName];try{let $=DH,L;const z={signal:E,abort:D,dispatch:_,getState:R,extra:N,endpoint:C.endpointName,type:C.type,forced:C.type==="query"?d(C,R()):void 0,queryCacheKey:C.type==="query"?C.queryCacheKey:void 0},F=C.type==="query"?C[wS]:void 0;if(F?L=F():I.query?(L=await e(I.query(C.originalArgs),z,I.extraOptions),I.transformResponse&&($=I.transformResponse)):L=await I.queryFn(C.originalArgs,z,I.extraOptions,q=>e(q,z,I.extraOptions)),typeof process<"u",L.error)throw new MH(L.error,L.meta);return A(await $(L.data,L.meta,C.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:L.meta,[Oy]:!0})}catch($){let L=$;if(L instanceof MH){let z=DH;I.query&&I.transformErrorResponse&&(z=I.transformErrorResponse);try{return T(await z(L.value,L.meta,C.originalArgs),{baseQueryMeta:L.meta,[Oy]:!0})}catch(F){L=F}}throw console.error(L),L}};function d(C,E){var D,T,A;const _=(T=(D=E[t])==null?void 0:D.queries)==null?void 0:T[C.queryCacheKey],R=(A=E[t])==null?void 0:A.config.refetchOnMountOrArgChange,N=_==null?void 0:_.fulfilledTimeStamp,I=C.forceRefetch??(C.subscribe&&R);return I?I===!0||(Number(new Date)-Number(N))/1e3>=I:!1}const f=xH(`${t}/executeQuery`,c,{getPendingMeta(){return{startedTimeStamp:Date.now(),[Oy]:!0}},condition(C,{getState:E}){var D,T,A;const _=E(),R=(T=(D=_[t])==null?void 0:D.queries)==null?void 0:T[C.queryCacheKey],N=R==null?void 0:R.fulfilledTimeStamp,I=C.originalArgs,$=R==null?void 0:R.originalArgs,L=n[C.endpointName];return oL(C)?!0:(R==null?void 0:R.status)==="pending"?!1:d(C,_)||Pne(L)&&((A=L==null?void 0:L.forceRefetch)!=null&&A.call(L,{currentArg:I,previousArg:$,endpointState:R,state:_}))?!0:!N},dispatchConditionRejection:!0}),p=xH(`${t}/executeMutation`,c,{getPendingMeta(){return{startedTimeStamp:Date.now(),[Oy]:!0}}}),m=C=>"force"in C,v=C=>"ifOlderThan"in C,y=(C,E,D)=>(T,A)=>{const _=m(D)&&D.force,R=v(D)&&D.ifOlderThan,N=($=!0)=>{const L={forceRefetch:$,isPrefetch:!0};return s.endpoints[C].initiate(E,L)},I=s.endpoints[C].select(E)(A());if(_)T(N());else if(R){const $=I==null?void 0:I.fulfilledTimeStamp;if(!$){T(N());return}(Number(new Date)-Number(new Date($)))/1e3>=R&&T(N())}else T(N(!1))};function x(C){return E=>{var D,T;return((T=(D=E==null?void 0:E.meta)==null?void 0:D.arg)==null?void 0:T.endpointName)===C}}function w(C,E){return{matchPending:zx(V8(C),x(E)),matchFulfilled:zx(ih(C),x(E)),matchRejected:zx(Qy(C),x(E))}}return{queryThunk:f,mutationThunk:p,prefetch:y,updateQueryData:a,upsertQueryData:l,patchQueryData:o,buildMatchThunkActions:w}}function $ne(t,e,n,r){return K8(n[t.meta.arg.endpointName][e],ih(t)?t.payload:void 0,C_(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,r)}function zM(t,e,n){const r=t[e];r&&n(r)}function CS(t){return("arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)??t.requestId}function kH(t,e,n){const r=t[CS(e)];r&&n(r)}var rx={};function Cwe({reducerPath:t,queryThunk:e,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:s,apiUid:i,extractRehydrationInfo:o,hasRehydrationInfo:a},assertTagType:l,config:c}){const d=vc(`${t}/resetApiState`);function f(A,_,R,N){var I;A[I=_.queryCacheKey]??(A[I]={status:"uninitialized",endpointName:_.endpointName}),zM(A,_.queryCacheKey,$=>{$.status="pending",$.requestId=R&&$.requestId?$.requestId:N.requestId,_.originalArgs!==void 0&&($.originalArgs=_.originalArgs),$.startedTimeStamp=N.startedTimeStamp})}function p(A,_,R){zM(A,_.arg.queryCacheKey,N=>{if(N.requestId!==_.requestId&&!oL(_.arg))return;const{merge:I}=s[_.arg.endpointName];if(N.status="fulfilled",I)if(N.data!==void 0){const{fulfilledTimeStamp:$,arg:L,baseQueryMeta:z,requestId:F}=_;let q=Ew(N.data,H=>I(H,R,{arg:L.originalArgs,baseQueryMeta:z,fulfilledTimeStamp:$,requestId:F}));N.data=q}else N.data=R;else N.data=s[_.arg.endpointName].structuralSharing??!0?jne(ju(N.data)?CSe(N.data):N.data,R):R;delete N.error,N.fulfilledTimeStamp=_.fulfilledTimeStamp})}const m=dy({name:`${t}/queries`,initialState:rx,reducers:{removeQueryResult:{reducer(A,{payload:{queryCacheKey:_}}){delete A[_]},prepare:nx()},cacheEntriesUpserted:{reducer(A,_){for(const R of _.payload){const{queryDescription:N,value:I}=R;f(A,N,!0,{requestId:_.meta.requestId,startedTimeStamp:_.meta.timestamp}),p(A,{arg:N,requestId:_.meta.requestId,fulfilledTimeStamp:_.meta.timestamp,baseQueryMeta:{}},I)}},prepare:A=>({payload:A.map(N=>{const{endpointName:I,arg:$,value:L}=N,z=s[I];return{queryDescription:{type:"query",endpointName:I,originalArgs:N.arg,queryCacheKey:r({queryArgs:$,endpointDefinition:z,endpointName:I})},value:L}}),meta:{[Oy]:!0,requestId:W8(),timestamp:Date.now()}})},queryResultPatched:{reducer(A,{payload:{queryCacheKey:_,patches:R}}){zM(A,_,N=>{N.data=hH(N.data,R.concat())})},prepare:nx()}},extraReducers(A){A.addCase(e.pending,(_,{meta:R,meta:{arg:N}})=>{const I=oL(N);f(_,N,I,R)}).addCase(e.fulfilled,(_,{meta:R,payload:N})=>{p(_,R,N)}).addCase(e.rejected,(_,{meta:{condition:R,arg:N,requestId:I},error:$,payload:L})=>{zM(_,N.queryCacheKey,z=>{if(!R){if(z.requestId!==I)return;z.status="rejected",z.error=L??$}})}).addMatcher(a,(_,R)=>{const{queries:N}=o(R);for(const[I,$]of Object.entries(N))(($==null?void 0:$.status)==="fulfilled"||($==null?void 0:$.status)==="rejected")&&(_[I]=$)})}}),v=dy({name:`${t}/mutations`,initialState:rx,reducers:{removeMutationResult:{reducer(A,{payload:_}){const R=CS(_);R in A&&delete A[R]},prepare:nx()}},extraReducers(A){A.addCase(n.pending,(_,{meta:R,meta:{requestId:N,arg:I,startedTimeStamp:$}})=>{I.track&&(_[CS(R)]={requestId:N,status:"pending",endpointName:I.endpointName,startedTimeStamp:$})}).addCase(n.fulfilled,(_,{payload:R,meta:N})=>{N.arg.track&&kH(_,N,I=>{I.requestId===N.requestId&&(I.status="fulfilled",I.data=R,I.fulfilledTimeStamp=N.fulfilledTimeStamp)})}).addCase(n.rejected,(_,{payload:R,error:N,meta:I})=>{I.arg.track&&kH(_,I,$=>{$.requestId===I.requestId&&($.status="rejected",$.error=R??N)})}).addMatcher(a,(_,R)=>{const{mutations:N}=o(R);for(const[I,$]of Object.entries(N))(($==null?void 0:$.status)==="fulfilled"||($==null?void 0:$.status)==="rejected")&&I!==($==null?void 0:$.requestId)&&(_[I]=$)})}}),y=dy({name:`${t}/invalidation`,initialState:rx,reducers:{updateProvidedBy:{reducer(A,_){var R,N;const{queryCacheKey:I,providedTags:$}=_.payload;for(const L of Object.values(A))for(const z of Object.values(L)){const F=z.indexOf(I);F!==-1&&z.splice(F,1)}for(const{type:L,id:z}of $){const F=(R=A[L]??(A[L]={}))[N=z||"__internal_without_id"]??(R[N]=[]);F.includes(I)||F.push(I)}},prepare:nx()}},extraReducers(A){A.addCase(m.actions.removeQueryResult,(_,{payload:{queryCacheKey:R}})=>{for(const N of Object.values(_))for(const I of Object.values(N)){const $=I.indexOf(R);$!==-1&&I.splice($,1)}}).addMatcher(a,(_,R)=>{var N,I;const{provided:$}=o(R);for(const[L,z]of Object.entries($))for(const[F,q]of Object.entries(z)){const H=(N=_[L]??(_[L]={}))[I=F||"__internal_without_id"]??(N[I]=[]);for(const B of q)H.includes(B)||H.push(B)}}).addMatcher(Vd(ih(e),C_(e)),(_,R)=>{const N=$ne(R,"providesTags",s,l),{queryCacheKey:I}=R.meta.arg;y.caseReducers.updateProvidedBy(_,y.actions.updateProvidedBy({queryCacheKey:I,providedTags:N}))})}}),x=dy({name:`${t}/subscriptions`,initialState:rx,reducers:{updateSubscriptionOptions(A,_){},unsubscribeQueryResult(A,_){},internal_getRTKQSubscriptions(){}}}),w=dy({name:`${t}/internalSubscriptions`,initialState:rx,reducers:{subscriptionsUpdated:{reducer(A,_){return hH(A,_.payload)},prepare:nx()}}}),C=dy({name:`${t}/config`,initialState:{online:uwe(),focused:cwe(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(A,{payload:_}){A.middlewareRegistered=A.middlewareRegistered==="conflict"||i!==_?"conflict":!0}},extraReducers:A=>{A.addCase(G8,_=>{_.online=!0}).addCase(Lne,_=>{_.online=!1}).addCase(Y8,_=>{_.focused=!0}).addCase(Ine,_=>{_.focused=!1}).addMatcher(a,_=>({..._}))}}),E=SSe({queries:m.reducer,mutations:v.reducer,provided:y.reducer,subscriptions:w.reducer,config:C.reducer}),D=(A,_)=>E(d.match(_)?void 0:A,_),T={...C.actions,...m.actions,...x.actions,...w.actions,...v.actions,...y.actions,resetApiState:d};return{reducer:D,actions:T}}var Tp=Symbol.for("RTKQ/skipToken"),zne={status:"uninitialized"},TH=Ew(zne,()=>{}),AH=Ew(zne,()=>{});function Ewe({serializeQueryArgs:t,reducerPath:e,createSelector:n}){const r=f=>TH,s=f=>AH;return{buildQuerySelector:a,buildMutationSelector:l,selectInvalidatedBy:c,selectCachedArgsForQuery:d};function i(f){return{...f,...awe(f.status)}}function o(f){return f[e]}function a(f,p){return m=>{if(m===Tp)return n(r,i);const v=t({queryArgs:m,endpointDefinition:p,endpointName:f});return n(x=>{var w,C;return((C=(w=o(x))==null?void 0:w.queries)==null?void 0:C[v])??TH},i)}}function l(){return f=>{let p;return typeof f=="object"?p=CS(f)??Tp:p=f,n(p===Tp?s:y=>{var x,w;return((w=(x=o(y))==null?void 0:x.mutations)==null?void 0:w[p])??AH},i)}}function c(f,p){const m=f[e],v=new Set;for(const y of p.filter(Gk).map(iL)){const x=m.provided[y.type];if(!x)continue;let w=(y.id!==void 0?x[y.id]:wH(Object.values(x)))??[];for(const C of w)v.add(C)}return wH(Array.from(v.values()).map(y=>{const x=m.queries[y];return x?[{queryCacheKey:y,endpointName:x.endpointName,originalArgs:x.originalArgs}]:[]}))}function d(f,p){return Object.values(f[e].queries).filter(m=>(m==null?void 0:m.endpointName)===p&&m.status!=="uninitialized").map(m=>m.originalArgs)}}var FM=WeakMap?new WeakMap:void 0,_H=({endpointName:t,queryArgs:e})=>{let n="";const r=FM==null?void 0:FM.get(e);if(typeof r=="string")n=r;else{const s=JSON.stringify(e,(i,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=sh(o)?Object.keys(o).sort().reduce((a,l)=>(a[l]=o[l],a),{}):o,o));sh(e)&&(FM==null||FM.set(e,s)),n=s}return`${t}(${n})`};function Mwe(...t){return function(n){const r=Yk(c=>{var d;return(d=n.extractRehydrationInfo)==null?void 0:d.call(n,c,{reducerPath:n.reducerPath??"api"})}),s={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let d=_H;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;d=p=>{const m=f(p);return typeof m=="string"?m:_H({...p,queryArgs:m})}}else n.serializeQueryArgs&&(d=n.serializeQueryArgs);return d(c)},tagTypes:[...n.tagTypes||[]]},i={endpointDefinitions:{},batch(c){c()},apiUid:W8(),extractRehydrationInfo:r,hasRehydrationInfo:Yk(c=>r(c)!=null)},o={injectEndpoints:l,enhanceEndpoints({addTagTypes:c,endpoints:d}){if(c)for(const f of c)s.tagTypes.includes(f)||s.tagTypes.push(f);if(d)for(const[f,p]of Object.entries(d))typeof p=="function"?p(i.endpointDefinitions[f]):Object.assign(i.endpointDefinitions[f]||{},p);return o}},a=t.map(c=>c.init(o,s,i));function l(c){const d=c.endpoints({query:f=>({...f,type:"query"}),mutation:f=>({...f,type:"mutation"})});for(const[f,p]of Object.entries(d)){if(c.overrideExisting!==!0&&f in i.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(ku(39));continue}i.endpointDefinitions[f]=p;for(const m of a)m.injectEndpoint(f,p)}return o}return o.injectEndpoints({endpoints:n.endpoints})}}function lp(t,...e){return Object.assign(t,...e)}var Dwe=({api:t,queryThunk:e,internalState:n})=>{const r=`${t.reducerPath}/subscriptions`;let s=null,i=null;const{updateSubscriptionOptions:o,unsubscribeQueryResult:a}=t.internalActions,l=(m,v)=>{var y,x,w;if(o.match(v)){const{queryCacheKey:E,requestId:D,options:T}=v.payload;return(y=m==null?void 0:m[E])!=null&&y[D]&&(m[E][D]=T),!0}if(a.match(v)){const{queryCacheKey:E,requestId:D}=v.payload;return m[E]&&delete m[E][D],!0}if(t.internalActions.removeQueryResult.match(v))return delete m[v.payload.queryCacheKey],!0;if(e.pending.match(v)){const{meta:{arg:E,requestId:D}}=v,T=m[x=E.queryCacheKey]??(m[x]={});return T[`${D}_running`]={},E.subscribe&&(T[D]=E.subscriptionOptions??T[D]??{}),!0}let C=!1;if(e.fulfilled.match(v)||e.rejected.match(v)){const E=m[v.meta.arg.queryCacheKey]||{},D=`${v.meta.requestId}_running`;C||(C=!!E[D]),delete E[D]}if(e.rejected.match(v)){const{meta:{condition:E,arg:D,requestId:T}}=v;if(E&&D.subscribe){const A=m[w=D.queryCacheKey]??(m[w]={});A[T]=D.subscriptionOptions??A[T]??{},C=!0}}return C},c=()=>n.currentSubscriptions,p={getSubscriptions:c,getSubscriptionCount:m=>{const y=c()[m]??{};return Fy(y)},isRequestSubscribed:(m,v)=>{var y;const x=c();return!!((y=x==null?void 0:x[m])!=null&&y[v])}};return(m,v)=>{if(s||(s=JSON.parse(JSON.stringify(n.currentSubscriptions))),t.util.resetApiState.match(m))return s=n.currentSubscriptions={},i=null,[!0,!1];if(t.internalActions.internal_getRTKQSubscriptions.match(m))return[!1,p];const y=l(n.currentSubscriptions,m);let x=!0;if(y){i||(i=setTimeout(()=>{const E=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,D]=_ne(s,()=>E);v.next(t.internalActions.subscriptionsUpdated(D)),s=E,i=null},500));const w=typeof m.type=="string"&&!!m.type.startsWith(r),C=e.rejected.match(m)&&m.meta.condition&&!!m.meta.arg.subscribe;x=!w&&!C}return[x,!1]}};function kwe(t){for(const e in t)return!1;return!0}var Twe=2147483647/1e3-1,Awe=({reducerPath:t,api:e,queryThunk:n,context:r,internalState:s})=>{const{removeQueryResult:i,unsubscribeQueryResult:o,cacheEntriesUpserted:a}=e.internalActions,l=Vd(o.match,n.fulfilled,n.rejected,a.match);function c(m){const v=s.currentSubscriptions[m];return!!v&&!kwe(v)}const d={},f=(m,v,y)=>{var x;if(l(m)){const w=v.getState()[t];let C;if(a.match(m))C=m.payload.map(E=>E.queryDescription.queryCacheKey);else{const{queryCacheKey:E}=o.match(m)?m.payload:m.meta.arg;C=[E]}for(const E of C)p(E,(x=w.queries[E])==null?void 0:x.endpointName,v,w.config)}if(e.util.resetApiState.match(m))for(const[w,C]of Object.entries(d))C&&clearTimeout(C),delete d[w];if(r.hasRehydrationInfo(m)){const w=v.getState()[t],{queries:C}=r.extractRehydrationInfo(m);for(const[E,D]of Object.entries(C))p(E,D==null?void 0:D.endpointName,v,w.config)}};function p(m,v,y,x){const w=r.endpointDefinitions[v],C=(w==null?void 0:w.keepUnusedDataFor)??x.keepUnusedDataFor;if(C===1/0)return;const E=Math.max(0,Math.min(C,Twe));if(!c(m)){const D=d[m];D&&clearTimeout(D),d[m]=setTimeout(()=>{c(m)||y.dispatch(i({queryCacheKey:m})),delete d[m]},E*1e3)}}return f},OH=new Error("Promise never resolved before cacheEntryRemoved."),_we=({api:t,reducerPath:e,context:n,queryThunk:r,mutationThunk:s,internalState:i})=>{const o=sL(r),a=sL(s),l=ih(r,s),c={};function d(y,x,w){const C=c[y];C!=null&&C.valueResolved&&(C.valueResolved({data:x,meta:w}),delete C.valueResolved)}function f(y){const x=c[y];x&&(delete c[y],x.cacheEntryRemoved())}const p=(y,x,w)=>{const C=m(y);function E(D,T,A,_){const R=w[e].queries[T],N=x.getState()[e].queries[T];!R&&N&&v(D,_,T,x,A)}if(r.pending.match(y))E(y.meta.arg.endpointName,C,y.meta.requestId,y.meta.arg.originalArgs);else if(t.internalActions.cacheEntriesUpserted.match(y))for(const{queryDescription:D,value:T}of y.payload){const{endpointName:A,originalArgs:_,queryCacheKey:R}=D;E(A,R,y.meta.requestId,_),d(R,T,{})}else if(s.pending.match(y))x.getState()[e].mutations[C]&&v(y.meta.arg.endpointName,y.meta.arg.originalArgs,C,x,y.meta.requestId);else if(l(y))d(C,y.payload,y.meta.baseQueryMeta);else if(t.internalActions.removeQueryResult.match(y)||t.internalActions.removeMutationResult.match(y))f(C);else if(t.util.resetApiState.match(y))for(const D of Object.keys(c))f(D)};function m(y){return o(y)?y.meta.arg.queryCacheKey:a(y)?y.meta.arg.fixedCacheKey??y.meta.requestId:t.internalActions.removeQueryResult.match(y)?y.payload.queryCacheKey:t.internalActions.removeMutationResult.match(y)?CS(y.payload):""}function v(y,x,w,C,E){const D=n.endpointDefinitions[y],T=D==null?void 0:D.onCacheEntryAdded;if(!T)return;const A={},_=new Promise(z=>{A.cacheEntryRemoved=z}),R=Promise.race([new Promise(z=>{A.valueResolved=z}),_.then(()=>{throw OH})]);R.catch(()=>{}),c[w]=A;const N=t.endpoints[y].select(D.type==="query"?x:w),I=C.dispatch((z,F,q)=>q),$={...C,getCacheEntry:()=>N(C.getState()),requestId:E,extra:I,updateCachedData:D.type==="query"?z=>C.dispatch(t.util.updateQueryData(y,x,z)):void 0,cacheDataLoaded:R,cacheEntryRemoved:_},L=T(x,$);Promise.resolve(L).catch(z=>{if(z!==OH)throw z})}return p},Owe=({api:t,context:{apiUid:e},reducerPath:n})=>(r,s)=>{t.util.resetApiState.match(r)&&s.dispatch(t.internalActions.middlewareRegistered(e))},Rwe=({reducerPath:t,context:e,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:s,api:i,assertTagType:o,refetchQuery:a,internalState:l})=>{const{removeQueryResult:c}=i.internalActions,d=Vd(ih(r),C_(r)),f=Vd(ih(r,s),Qy(r,s));let p=[];const m=(x,w)=>{d(x)?y($ne(x,"invalidatesTags",n,o),w):f(x)?y([],w):i.util.invalidateTags.match(x)&&y(K8(x.payload,void 0,void 0,void 0,void 0,o),w)};function v(x){var w,C;for(const E in x.queries)if(((w=x.queries[E])==null?void 0:w.status)==="pending")return!0;for(const E in x.mutations)if(((C=x.mutations[E])==null?void 0:C.status)==="pending")return!0;return!1}function y(x,w){const C=w.getState(),E=C[t];if(p.push(...x),E.config.invalidationBehavior==="delayed"&&v(E))return;const D=p;if(p=[],D.length===0)return;const T=i.util.selectInvalidatedBy(C,D);e.batch(()=>{const A=Array.from(T.values());for(const{queryCacheKey:_}of A){const R=E.queries[_],N=l.currentSubscriptions[_]??{};R&&(Fy(N)===0?w.dispatch(c({queryCacheKey:_})):R.status!=="uninitialized"&&w.dispatch(a(R)))}})}return m},Nwe=({reducerPath:t,queryThunk:e,api:n,refetchQuery:r,internalState:s})=>{const i={},o=(p,m)=>{(n.internalActions.updateSubscriptionOptions.match(p)||n.internalActions.unsubscribeQueryResult.match(p))&&l(p.payload,m),(e.pending.match(p)||e.rejected.match(p)&&p.meta.condition)&&l(p.meta.arg,m),(e.fulfilled.match(p)||e.rejected.match(p)&&!p.meta.condition)&&a(p.meta.arg,m),n.util.resetApiState.match(p)&&d()};function a({queryCacheKey:p},m){const v=m.getState()[t],y=v.queries[p],x=s.currentSubscriptions[p];if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:w,skipPollingIfUnfocused:C}=f(x);if(!Number.isFinite(w))return;const E=i[p];E!=null&&E.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);const D=Date.now()+w;i[p]={nextPollTimestamp:D,pollingInterval:w,timeout:setTimeout(()=>{(v.config.focused||!C)&&m.dispatch(r(y)),a({queryCacheKey:p},m)},w)}}function l({queryCacheKey:p},m){const y=m.getState()[t].queries[p],x=s.currentSubscriptions[p];if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:w}=f(x);if(!Number.isFinite(w)){c(p);return}const C=i[p],E=Date.now()+w;(!C||E<C.nextPollTimestamp)&&a({queryCacheKey:p},m)}function c(p){const m=i[p];m!=null&&m.timeout&&clearTimeout(m.timeout),delete i[p]}function d(){for(const p of Object.keys(i))c(p)}function f(p={}){let m=!1,v=Number.POSITIVE_INFINITY;for(let y in p)p[y].pollingInterval&&(v=Math.min(p[y].pollingInterval,v),m=p[y].skipPollingIfUnfocused||m);return{lowestPollingInterval:v,skipPollingIfUnfocused:m}}return o},jwe=({api:t,context:e,queryThunk:n,mutationThunk:r})=>{const s=V8(n,r),i=Qy(n,r),o=ih(n,r),a={};return(c,d)=>{var f,p;if(s(c)){const{requestId:m,arg:{endpointName:v,originalArgs:y}}=c.meta,x=e.endpointDefinitions[v],w=x==null?void 0:x.onQueryStarted;if(w){const C={},E=new Promise((_,R)=>{C.resolve=_,C.reject=R});E.catch(()=>{}),a[m]=C;const D=t.endpoints[v].select(x.type==="query"?y:m),T=d.dispatch((_,R,N)=>N),A={...d,getCacheEntry:()=>D(d.getState()),requestId:m,extra:T,updateCachedData:x.type==="query"?_=>d.dispatch(t.util.updateQueryData(v,y,_)):void 0,queryFulfilled:E};w(y,A)}}else if(o(c)){const{requestId:m,baseQueryMeta:v}=c.meta;(f=a[m])==null||f.resolve({data:c.payload,meta:v}),delete a[m]}else if(i(c)){const{requestId:m,rejectedWithValue:v,baseQueryMeta:y}=c.meta;(p=a[m])==null||p.reject({error:c.payload??c.error,isUnhandledError:!v,meta:y}),delete a[m]}}},Iwe=({reducerPath:t,context:e,api:n,refetchQuery:r,internalState:s})=>{const{removeQueryResult:i}=n.internalActions,o=(l,c)=>{Y8.match(l)&&a(c,"refetchOnFocus"),G8.match(l)&&a(c,"refetchOnReconnect")};function a(l,c){const d=l.getState()[t],f=d.queries,p=s.currentSubscriptions;e.batch(()=>{for(const m of Object.keys(p)){const v=f[m],y=p[m];if(!y||!v)continue;(Object.values(y).some(w=>w[c]===!0)||Object.values(y).every(w=>w[c]===void 0)&&d.config[c])&&(Fy(y)===0?l.dispatch(i({queryCacheKey:m})):v.status!=="uninitialized"&&l.dispatch(r(v)))}})}return o};function Lwe(t){const{reducerPath:e,queryThunk:n,api:r,context:s}=t,{apiUid:i}=s,o={invalidateTags:vc(`${e}/invalidateTags`)},a=f=>f.type.startsWith(`${e}/`),l=[Owe,Awe,Rwe,Nwe,_we,jwe];return{middleware:f=>{let p=!1;const v={...t,internalState:{currentSubscriptions:{}},refetchQuery:d,isThisApiSliceAction:a},y=l.map(C=>C(v)),x=Dwe(v),w=Iwe(v);return C=>E=>{if(!Ene(E))return C(E);p||(p=!0,f.dispatch(r.internalActions.middlewareRegistered(i)));const D={...f,next:C},T=f.getState(),[A,_]=x(E,D,T);let R;if(A?R=C(E):R=_,f.getState()[e]&&(w(E,D,T),a(E)||s.hasRehydrationInfo(E)))for(const N of y)N(E,D,T);return R}},actions:o};function d(f){return t.api.endpoints[f.endpointName].initiate(f.originalArgs,{subscribe:!1,forceRefetch:!0})}}var RH=Symbol(),Pwe=({createSelector:t=U8}={})=>({name:RH,init(e,{baseQuery:n,tagTypes:r,reducerPath:s,serializeQueryArgs:i,keepUnusedDataFor:o,refetchOnMountOrArgChange:a,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:d},f){NSe();const p=V=>V;Object.assign(e,{reducerPath:s,endpoints:{},internalActions:{onOnline:G8,onOffline:Lne,onFocus:Y8,onFocusLost:Ine},util:{}});const{queryThunk:m,mutationThunk:v,patchQueryData:y,updateQueryData:x,upsertQueryData:w,prefetch:C,buildMatchThunkActions:E}=wwe({baseQuery:n,reducerPath:s,context:f,api:e,serializeQueryArgs:i,assertTagType:p}),{reducer:D,actions:T}=Cwe({context:f,queryThunk:m,mutationThunk:v,serializeQueryArgs:i,reducerPath:s,assertTagType:p,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:a,keepUnusedDataFor:o,reducerPath:s,invalidationBehavior:d}});lp(e.util,{patchQueryData:y,updateQueryData:x,upsertQueryData:w,prefetch:C,resetApiState:T.resetApiState,upsertQueryEntries:T.cacheEntriesUpserted}),lp(e.internalActions,T);const{middleware:A,actions:_}=Lwe({reducerPath:s,context:f,queryThunk:m,mutationThunk:v,api:e,assertTagType:p});lp(e.util,_),lp(e,{reducer:D,middleware:A});const{buildQuerySelector:R,buildMutationSelector:N,selectInvalidatedBy:I,selectCachedArgsForQuery:$}=Ewe({serializeQueryArgs:i,reducerPath:s,createSelector:t});lp(e.util,{selectInvalidatedBy:I,selectCachedArgsForQuery:$});const{buildInitiateQuery:L,buildInitiateMutation:z,getRunningMutationThunk:F,getRunningMutationsThunk:q,getRunningQueriesThunk:H,getRunningQueryThunk:B}=Swe({queryThunk:m,mutationThunk:v,api:e,serializeQueryArgs:i,context:f});return lp(e.util,{getRunningMutationThunk:F,getRunningMutationsThunk:q,getRunningQueryThunk:B,getRunningQueriesThunk:H}),{name:RH,injectEndpoint(V,Y){var G;const W=e;(G=W.endpoints)[V]??(G[V]={}),Pne(Y)?lp(W.endpoints[V],{name:V,select:R(V,Y),initiate:L(V,Y)},E(m,V)):ywe(Y)&&lp(W.endpoints[V],{name:V,select:N(),initiate:z(V)},E(v,V))}}}});const $we="/api",zwe="http://localhost:3050",Fwe=async t=>(t.set("Content-Type","application/json"),t),Bwe=({url:t,baseUrl:e,isMockEndpoint:n,isMock:r})=>`${(n!==void 0?n:r)?zwe:e||$we}${t}`,E_=(t,e={isMock:!1})=>{const{baseUrl:n,isMock:r}=e||{};return async(s,i,o)=>{var a;const l=Bwe({url:t,baseUrl:n,isMockEndpoint:(a=i.meta)==null?void 0:a.isMock,isMock:r});return vwe({baseUrl:l,prepareHeaders:Fwe})(s,i,o)}};var BD={exports:{}},Hwe=BD.exports,NH;function qwe(){return NH||(NH=1,(function(t,e){(function(n,r){t.exports=r()})(Hwe,function(){var n,r,s=1e3,i=6e4,o=36e5,a=864e5,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,d=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,p={years:c,months:d,days:a,hours:o,minutes:i,seconds:s,milliseconds:1,weeks:6048e5},m=function(A){return A instanceof D},v=function(A,_,R){return new D(A,R,_.$l)},y=function(A){return r.p(A)+"s"},x=function(A){return A<0},w=function(A){return x(A)?Math.ceil(A):Math.floor(A)},C=function(A){return Math.abs(A)},E=function(A,_){return A?x(A)?{negative:!0,format:""+C(A)+_}:{negative:!1,format:""+A+_}:{negative:!1,format:""}},D=(function(){function A(R,N,I){var $=this;if(this.$d={},this.$l=I,R===void 0&&(this.$ms=0,this.parseFromMilliseconds()),N)return v(R*p[y(N)],this);if(typeof R=="number")return this.$ms=R,this.parseFromMilliseconds(),this;if(typeof R=="object")return Object.keys(R).forEach(function(F){$.$d[y(F)]=R[F]}),this.calMilliseconds(),this;if(typeof R=="string"){var L=R.match(f);if(L){var z=L.slice(2).map(function(F){return F!=null?Number(F):0});return this.$d.years=z[0],this.$d.months=z[1],this.$d.weeks=z[2],this.$d.days=z[3],this.$d.hours=z[4],this.$d.minutes=z[5],this.$d.seconds=z[6],this.calMilliseconds(),this}}return this}var _=A.prototype;return _.calMilliseconds=function(){var R=this;this.$ms=Object.keys(this.$d).reduce(function(N,I){return N+(R.$d[I]||0)*p[I]},0)},_.parseFromMilliseconds=function(){var R=this.$ms;this.$d.years=w(R/c),R%=c,this.$d.months=w(R/d),R%=d,this.$d.days=w(R/a),R%=a,this.$d.hours=w(R/o),R%=o,this.$d.minutes=w(R/i),R%=i,this.$d.seconds=w(R/s),R%=s,this.$d.milliseconds=R},_.toISOString=function(){var R=E(this.$d.years,"Y"),N=E(this.$d.months,"M"),I=+this.$d.days||0;this.$d.weeks&&(I+=7*this.$d.weeks);var $=E(I,"D"),L=E(this.$d.hours,"H"),z=E(this.$d.minutes,"M"),F=this.$d.seconds||0;this.$d.milliseconds&&(F+=this.$d.milliseconds/1e3,F=Math.round(1e3*F)/1e3);var q=E(F,"S"),H=R.negative||N.negative||$.negative||L.negative||z.negative||q.negative,B=L.format||z.format||q.format?"T":"",V=(H?"-":"")+"P"+R.format+N.format+$.format+B+L.format+z.format+q.format;return V==="P"||V==="-P"?"P0D":V},_.toJSON=function(){return this.toISOString()},_.format=function(R){var N=R||"YYYY-MM-DDTHH:mm:ss",I={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return N.replace(l,function($,L){return L||String(I[$])})},_.as=function(R){return this.$ms/p[y(R)]},_.get=function(R){var N=this.$ms,I=y(R);return I==="milliseconds"?N%=1e3:N=I==="weeks"?w(N/p[I]):this.$d[I],N||0},_.add=function(R,N,I){var $;return $=N?R*p[y(N)]:m(R)?R.$ms:v(R,this).$ms,v(this.$ms+$*(I?-1:1),this)},_.subtract=function(R,N){return this.add(R,N,!0)},_.locale=function(R){var N=this.clone();return N.$l=R,N},_.clone=function(){return v(this.$ms,this)},_.humanize=function(R){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!R)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get("milliseconds")},_.asMilliseconds=function(){return this.as("milliseconds")},_.seconds=function(){return this.get("seconds")},_.asSeconds=function(){return this.as("seconds")},_.minutes=function(){return this.get("minutes")},_.asMinutes=function(){return this.as("minutes")},_.hours=function(){return this.get("hours")},_.asHours=function(){return this.as("hours")},_.days=function(){return this.get("days")},_.asDays=function(){return this.as("days")},_.weeks=function(){return this.get("weeks")},_.asWeeks=function(){return this.as("weeks")},_.months=function(){return this.get("months")},_.asMonths=function(){return this.as("months")},_.years=function(){return this.get("years")},_.asYears=function(){return this.as("years")},A})(),T=function(A,_,R){return A.add(_.years()*R,"y").add(_.months()*R,"M").add(_.days()*R,"d").add(_.hours()*R,"h").add(_.minutes()*R,"m").add(_.seconds()*R,"s").add(_.milliseconds()*R,"ms")};return function(A,_,R){n=R,r=R().$utils(),R.duration=function($,L){var z=R.locale();return v($,{$l:z},L)},R.isDuration=m;var N=_.prototype.add,I=_.prototype.subtract;_.prototype.add=function($,L){return m($)?T(this,$,1):N.bind(this)($,L)},_.prototype.subtract=function($,L){return m($)?T(this,$,-1):I.bind(this)($,L)}}})})(BD)),BD.exports}var Uwe=qwe();const Vwe=wne(Uwe);zy.extend(Vwe);const Fne=(t,e)=>{let n;if(typeof t=="string"){if(!t)return t;const l=new Date(t),c=new Date;if(isNaN(l.getTime()))return console.warn("Invalid date format for duration formatter:",t),t;const d=l.getTime()-c.getTime();if(d<=0)return e?e("ds:notifications.duration.started",{defaultValue:"Started"}):"Started";n=Math.floor(d/1e3)}else{if(typeof t!="number"||t<=0)return e?e("ds:notifications.duration.started",{defaultValue:"Started"}):"Started";n=Math.floor(t)}const r=zy.duration(n,"seconds"),s=r.weeks(),i=r.days(),o=r.hours(),a=r.minutes();if(e)try{if(s>0)return e("ds:notifications.duration.week",{count:s});if(i>0)return e("ds:notifications.duration.day",{count:i});if(o>0&&a>0){const l=e("ds:notifications.duration.hour",{count:o}),c=e("ds:notifications.duration.minute",{count:a});return`${l} ${c}`}return o>0?e("ds:notifications.duration.hour",{count:o}):a>0?e("ds:notifications.duration.minute",{count:a}):e("ds:notifications.duration.lessThanMinute")}catch(l){console.warn("UI Kit duration translation failed, falling back to English:",l)}return s>0?`${s}w`:i>0?`${i}d`:o>0&&a>0?`${o}:${a.toString().padStart(2,"0")}`:o>0?`${o}:00`:a>0?`${a}m`:"<1m"},Wwe=(t,e)=>!t||typeof t=="string"&&t.trim()===""?(e==null?void 0:e.fallback)||(e==null?void 0:e[0]):t,Ywe=(t,e)=>{if(t<=0)return e?e("ds:notifications.CalendarEventUpcoming.started",{defaultValue:"started"}):"started";{const n=Fne(t,e);return`${e?e("ds:notifications.CalendarEventUpcoming.willStartIn",{defaultValue:"will start in"}):"will start in"} <strong>${n}</strong>`}},Dw=({title:t,date:e,isMobile:n})=>g.jsxs(wt,{justify:"space-between",pr:"xs",children:[g.jsx(He,{c:"primary",size:n?"sm":"md",fw:600,children:t}),g.jsx(He,{size:"sm",c:"grey.5",children:vSe(e)})]}),kw=({children:t,isMobile:e})=>g.jsx(He,{size:e?"xs":"sm",c:"primary",lineClamp:4,style:{wordBreak:"break-word"},children:t}),Gwe=({children:t})=>{const{isDark:e}=Sne();return g.jsx(lw,{p:"xs",radius:"lg",bg:e?"gray.7":"gray.1",c:"grey.6",style:{borderTopLeftRadius:0},children:g.jsx(He,{size:"xs",fs:"italic",fw:400,lineClamp:2,style:{wordBreak:"break-word"},children:t})})},Tw=({source:t,subject:e,isMobile:n})=>g.jsx(wt,{children:g.jsxs(He,{style:{fontSize:n?"10px":"12px",wordBreak:"break-all"},c:"secondary",lineClamp:1,children:[t," • ",e]})}),Kwe=t=>({[An.DiskFileShared]:"DiskFileShared",[An.DiskFileCommented]:"DiskFileCommented",[An.DiskFileMentioned]:"DiskFileMentioned",[An.DiskFileUploaded]:"DiskFileUploaded",[An.DiskFilePermissionGranted]:"DiskFilePermissionGranted",[An.DiskFileDownloadReady]:"DiskFileDownloadReady",[An.DiskLinkGenerated]:"DiskLinkGenerated",[An.DiskDirectoryShared]:"DiskDirectoryShared",[An.DiskRoomShared]:"DiskRoomShared",[An.ProjectShared]:"ProjectShared",[An.ProjectTaskCreated]:"ProjectTaskCreated",[An.ProjectTaskDeleted]:"ProjectTaskDeleted",[An.ProjectTaskUpdated]:"ProjectTaskUpdated",[An.ProjectTaskMoved]:"ProjectTaskMoved",[An.ProjectTaskStatusChanged]:"ProjectTaskStatusChanged",[An.ProjectTaskCommented]:"ProjectTaskCommented",[An.ProjectMyTaskDeleted]:"ProjectMyTaskDeleted",[An.ProjectMyTaskUpdated]:"ProjectMyTaskUpdated",[An.ProjectMyTaskMoved]:"ProjectMyTaskMoved",[An.ProjectMyTaskStatusChanged]:"ProjectMyTaskStatusChanged",[An.ProjectMyTaskCommented]:"ProjectMyTaskCommented",[An.ProjectTaskUnassigned]:"ProjectTaskUnassigned",[An.ProjectTaskAssigned]:"ProjectTaskAssigned",[An.ProjectTaskMentioned]:"ProjectTaskMentioned",[An.ProjectTaskAttachmentAdded]:"ProjectTaskAttachmentAdded",[An.ProjectSprintCreated]:"ProjectSprintCreated",[An.AdminRoleAssigned]:"AdminRoleAssigned",[An.AdminRoleDeleted]:"AdminRoleDeleted",[An.MailMessageImportant]:"MailMessageImportant",[An.MailMessageReceived]:"MailMessageReceived",[An.CalendarShared]:"CalendarShared",[An.CalendarEventCanceled]:"CalendarEventCanceled",[An.CalendarEventInvited]:"CalendarEventInvited",[An.CalendarEventUpdated]:"CalendarEventUpdated",[An.CalendarEventUpcoming]:"CalendarEventUpcoming"})[t]||"unknown",Zwe=({notification:t,isMobile:e})=>{const{t:n}=yt(),r=Kwe(t.type);return g.jsxs(Sw,{children:[g.jsx(Dw,{title:n(`ds:notifications.${r}.title`),date:t.date,isMobile:e}),g.jsx(kw,{isMobile:e,children:g.jsx(xw,{i18nKey:`ds:notifications.${r}.description`,values:t,components:{strong:g.jsx("strong",{},"strong"),br:g.jsx("br",{},"br")}})}),t.action.description&&g.jsx(Gwe,{children:t.action.description}),g.jsx(Tw,{source:t.source.title,subject:t.action.subject,isMobile:e})]})};var Z8=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.DELETE="DELETE",t))(Z8||{});const hu={System:0,Disk:1,Projects:2,Calendar:3,Mail:4,Contacts:5,Admin:6,Forms:7,Draw:8,Payments:9,Team:10,Pages:11},Jwe={Deny:-4096,OnlyUpload:-1024,FreeBusy:-64,CanDownload:-16,Read:0,Comment:1,Review:2,Write:4,Delete:8,FullInternal:256,Full:512,Lock:4096,LockPrint:8192,LockCopy:16384,LockDownload:32768},ES={Completed:2,Blocked:3,Error:4},Xwe={en:{success:{title:"File link generated",description:"Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated."},error:{title:"Failed to generate link",description:"Your file <strong>«{{fileName}}»</strong> didn't pass validation. Try again."}},ru:{success:{title:"Ссылка на файл сгенерирована",description:"Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку."},error:{title:"Ссылка не создана",description:"Ваш файл <strong>«{{fileName}}»</strong> не прошёл проверку. Поробуйте снова."}}},Qwe=({notification:t,isMobile:e})=>{const{i18n:n}=yt(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===ES.Completed,i=Xwe[r][s?"success":"error"],o={fileName:t.action.subject};return g.jsxs(Sw,{children:[g.jsx(Dw,{title:i.title,date:t.date,isMobile:e}),g.jsx(kw,{isMobile:e,children:g.jsx(xw,{i18nKey:i.description,values:o,components:{strong:g.jsx("strong",{},"strong"),a:g.jsx("a",{href:t.action.externalLinkUrl,target:"_blank",rel:"noopener noreferrer"},"link")}})}),g.jsx(Tw,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},eCe={en:{completed:{title:"File Uploaded",description:"The file <strong>«{{fileName}}»</strong> has been uploaded and checked successfully."},blocked:{title:"File Upload Blocked",description:"The file <strong>«{{fileName}}»</strong> was blocked by DLP policy."},error:{title:"File Upload Error",description:"An error occurred while checking the file <strong>«{{fileName}}»</strong>."}},ru:{completed:{title:"Файл загружен",description:"Файл <strong>«{{fileName}}»</strong> был загружен и успешно проверен."},blocked:{title:"Загрузка файла отклонена",description:"Файл <strong>«{{fileName}}»</strong> был заблокирован политикой DLP."},error:{title:"Ошибка при загрузке файла",description:"Произошла ошибка при проверке файла <strong>«{{fileName}}»</strong>."}}},tCe=({notification:t,isMobile:e})=>{const{i18n:n}=yt(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus;let i="completed";s&&(s===ES.Blocked?i="blocked":s===ES.Error&&(i="error"));const o=eCe[r][i],a={fileName:t.action.subject};return g.jsxs(Sw,{children:[g.jsx(Dw,{title:o.title,date:t.date,isMobile:e}),g.jsx(kw,{isMobile:e,children:g.jsx(xw,{i18nKey:o.description,values:a,components:{strong:g.jsx("strong",{},"strong")}})}),g.jsx(Tw,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},nCe={en:{success:{title:"Permissions granted",description:"<strong>«{{roleName}}»</strong> permissions granted to user <strong>{{userName}}</strong>. Your file has been successfully validated."},error:{title:"Failed to grant permissions",description:"Failed to grant permissions to user. Your file didn't pass validation. Try again."}},ru:{success:{title:"Права выданы",description:"Права <strong>«{{roleName}}»</strong> пользователю <strong>{{userName}}</strong> выданы. Ваш файл успешно прошёл проверку."},error:{title:"Доступ не выдан",description:"Ваш файл не прошёл проверку. Попробуйте снова."}}},rCe=({notification:t,isMobile:e})=>{const{i18n:n}=yt(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===ES.Completed,i=nCe[r][s?"success":"error"],o={roleName:t.action.roleName||"",userName:t.action.targetUserName||""};return g.jsxs(Sw,{children:[g.jsx(Dw,{title:i.title,date:t.date,isMobile:e}),g.jsx(kw,{isMobile:e,children:g.jsx(xw,{i18nKey:i.description,values:o,components:{strong:g.jsx("strong",{},"strong")}})}),g.jsx(Tw,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},sCe={en:{success:{title:"File is ready to download",description:"Your file <a><strong>«{{fileName}}»</strong></a> has been successfully validated and is ready to download."},error:{title:"Unable to download file",description:"Your file didn't pass validation. Try again."}},ru:{success:{title:"Файл готов к скачиванию",description:"Ваш файл <a><strong>«{{fileName}}»</strong></a> успешно прошёл проверку и готов к скачиванию."},error:{title:"Не удаётся скачать файл",description:"Ваш файл не прошёл проверку. Попробуйте снова."}}},iCe=({notification:t,isMobile:e})=>{const{i18n:n}=yt(),r=n.language==="ru"?"ru":"en",s=t.action.dlpCheckStatus===ES.Completed,i=sCe[r][s?"success":"error"],o=i.title.replace("{{fileName}}",t.action.subject),a={fileName:t.action.subject};return g.jsxs(Sw,{children:[g.jsx(Dw,{title:o,date:t.date,isMobile:e}),g.jsx(kw,{isMobile:e,children:g.jsx(xw,{values:a,i18nKey:i.description,components:{strong:g.jsx("strong",{},"strong"),a:g.jsx("a",{href:t.action.downloadUrl,target:"_blank",rel:"noopener noreferrer"},"link")}})}),g.jsx(Tw,{source:t.source.title,subject:t.action.subject,isMobile:e})]})},oCe={[An.DiskLinkGenerated]:Qwe,[An.DiskFileUploaded]:tCe,[An.DiskFilePermissionGranted]:rCe,[An.DiskFileDownloadReady]:iCe},aCe=t=>oCe[t]||Zwe,lCe=({notification:t,indicatorSlot:e,avatarSlot:n,onClick:r})=>{const{isDark:s}=Sne(),i=O.useRef(null),{hovered:o,ref:a}=wQ(),[l,c]=O.useState(!0),d=O.useMemo(()=>aCe(t.type),[t.type]);O.useEffect(()=>{var p;c((((p=i==null?void 0:i.current)==null?void 0:p.offsetWidth)||0)<576)},[i]);const f=()=>{r&&r(t)};return g.jsx("a",{href:t.action.subjectUrl,style:{textDecoration:"none"},target:"_blank",onClick:f,ref:i,children:g.jsxs(vt,{gap:"xs",p:"sm",style:p=>({backgroundColor:o?s?p.colors.gray[8]:p.colors.gray[0]:"transparent"}),ref:a,children:[n?g.jsx(n,{notification:t,size:l?30:40}):g.jsx(O1,{title:t.actor,src:t.imageUrl,color:"cyan",size:l?30:40}),g.jsx(d,{notification:t,isMobile:l},t.id),e&&g.jsx(le,{mt:l?1:3,children:g.jsx(e,{hovered:o,notification:t})})]})})},cCe="notifications:new",uCe=t=>{const e=new CustomEvent(cCe,{detail:{notifications:t}});window.dispatchEvent(e)};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var dCe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dc=(t,e,n,r)=>{const s=O.forwardRef(({color:i="currentColor",size:o=24,stroke:a=2,title:l,className:c,children:d,...f},p)=>O.createElement("svg",{ref:p,...dCe[t],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:i}:{strokeWidth:a,stroke:i},...f},[l&&O.createElement("title",{key:"svg-title"},l),...r.map(([m,v])=>O.createElement(m,v)),...Array.isArray(d)?d:[d]]));return s.displayName=`${n}`,s};/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var fCe=Dc("outline","archive","IconArchive",[["path",{d:"M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10",key:"svg-1"}],["path",{d:"M10 12l4 0",key:"svg-2"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var pCe=Dc("outline","bell","IconBell",[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var hCe=Dc("outline","building-skyscraper","IconBuildingSkyscraper",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M5 21v-14l8 -4v18",key:"svg-1"}],["path",{d:"M19 21v-10l-6 -4",key:"svg-2"}],["path",{d:"M9 9l0 .01",key:"svg-3"}],["path",{d:"M9 12l0 .01",key:"svg-4"}],["path",{d:"M9 15l0 .01",key:"svg-5"}],["path",{d:"M9 18l0 .01",key:"svg-6"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var mCe=Dc("outline","calendar-event","IconCalendarEvent",[["path",{d:"M4 5m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M16 3l0 4",key:"svg-1"}],["path",{d:"M8 3l0 4",key:"svg-2"}],["path",{d:"M4 11l16 0",key:"svg-3"}],["path",{d:"M8 15h2v2h-2z",key:"svg-4"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var gCe=Dc("outline","checks","IconChecks",[["path",{d:"M7 12l5 5l10 -10",key:"svg-0"}],["path",{d:"M2 12l5 5m5 -5l5 -5",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var vCe=Dc("outline","mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var yCe=Dc("outline","settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var bCe=Dc("outline","star","IconStar",[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z",key:"svg-0"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var xCe=Dc("outline","user-plus","IconUserPlus",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var SCe=Dc("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/**
 * @license @tabler/icons-react v3.28.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var wCe=Dc("filled","star-filled","IconStarFilled",[["path",{d:"M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z",key:"svg-0"}]]),QR={exports:{}},e4={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jH;function CCe(){if(jH)return e4;jH=1;var t=xe;function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,s=t.useRef,i=t.useEffect,o=t.useMemo,a=t.useDebugValue;return e4.useSyncExternalStoreWithSelector=function(l,c,d,f,p){var m=s(null);if(m.current===null){var v={hasValue:!1,value:null};m.current=v}else v=m.current;m=o(function(){function x(T){if(!w){if(w=!0,C=T,T=f(T),p!==void 0&&v.hasValue){var A=v.value;if(p(A,T))return E=A}return E=T}if(A=E,n(C,T))return A;var _=f(T);return p!==void 0&&p(A,_)?(C=T,A):(C=T,E=_)}var w=!1,C,E,D=d===void 0?null:d;return[function(){return x(c())},D===null?void 0:function(){return x(D())}]},[c,d,f,p]);var y=r(l,m[0],m[1]);return i(function(){v.hasValue=!0,v.value=y},[y]),a(y),y},e4}var IH;function ECe(){return IH||(IH=1,QR.exports=CCe()),QR.exports}var MCe=ECe();function DCe(t){t()}function LH(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function Fx(t,e){if(LH(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(e,n[s])||!LH(t[n[s]],e[n[s]]))return!1;return!0}var PH=Symbol.for("react-redux-context"),$H=typeof globalThis<"u"?globalThis:{};function kCe(){if(!O.createContext)return{};const t=$H[PH]??($H[PH]=new Map);let e=t.get(O.createContext);return e||(e=O.createContext(null),t.set(O.createContext,e)),e}var Hg=kCe();function J8(t=Hg){return function(){return O.useContext(t)}}var Bne=J8();function Hne(t=Hg){const e=t===Hg?Bne:J8(t),n=()=>{const{store:r}=e();return r};return Object.assign(n,{withTypes:()=>n}),n}var qne=Hne();function TCe(t=Hg){const e=t===Hg?qne:Hne(t),n=()=>e().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ACe=TCe(),_Ce=(t,e)=>t===e;function OCe(t=Hg){const e=t===Hg?Bne:J8(t),n=(r,s={})=>{const{equalityFn:i=_Ce}=typeof s=="function"?{equalityFn:s}:s,o=e(),{store:a,subscription:l,getServerState:c}=o;O.useRef(!0);const d=O.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=MCe.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,d,i);return O.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var RCe=OCe(),NCe=DCe;function t4(t){return t.replace(t[0],t[0].toUpperCase())}function jCe(t){return t.type==="query"}function ICe(t){return t.type==="mutation"}function BM(t,...e){return Object.assign(t,...e)}var HM=WeakMap?new WeakMap:void 0,LCe=({endpointName:t,queryArgs:e})=>{let n="";const r=HM==null?void 0:HM.get(e);if(typeof r=="string")n=r;else{const s=JSON.stringify(e,(i,o)=>(o=typeof o=="bigint"?{$bigint:o.toString()}:o,o=sh(o)?Object.keys(o).sort().reduce((a,l)=>(a[l]=o[l],a),{}):o,o));sh(e)&&(HM==null||HM.set(e,s)),n=s}return`${t}(${n})`},n4=Symbol();function zH(t,e,n,r){const s=O.useMemo(()=>({queryArgs:t,serialized:typeof t=="object"?e({queryArgs:t,endpointDefinition:n,endpointName:r}):t}),[t,e,n,r]),i=O.useRef(s);return O.useEffect(()=>{i.current.serialized!==s.serialized&&(i.current=s)},[s]),i.current.serialized===s.serialized?i.current.queryArgs:t}function r4(t){const e=O.useRef(t);return O.useEffect(()=>{Fx(e.current,t)||(e.current=t)},[t]),Fx(e.current,t)?e.current:t}var PCe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$Ce=PCe(),zCe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",FCe=zCe(),BCe=()=>$Ce||FCe?O.useLayoutEffect:O.useEffect,HCe=BCe(),qCe=t=>t.isUninitialized?{...t,isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:Nne.pending}:t;function UCe({api:t,moduleOptions:{batch:e,hooks:{useDispatch:n,useSelector:r,useStore:s},unstable__sideEffectsInRender:i,createSelector:o},serializeQueryArgs:a,context:l}){const c=i?v=>v():O.useEffect;return{buildQueryHooks:p,buildMutationHook:m,usePrefetch:f};function d(v,y,x){if(y!=null&&y.endpointName&&v.isUninitialized){const{endpointName:A}=y,_=l.endpointDefinitions[A];x!==Tp&&a({queryArgs:y.originalArgs,endpointDefinition:_,endpointName:A})===a({queryArgs:x,endpointDefinition:_,endpointName:A})&&(y=void 0)}let w=v.isSuccess?v.data:y==null?void 0:y.data;w===void 0&&(w=v.data);const C=w!==void 0,E=v.isLoading,D=(!y||y.isLoading||y.isUninitialized)&&!C&&E,T=v.isSuccess||C&&(E&&!(y!=null&&y.isError)||v.isUninitialized);return{...v,data:w,currentData:v.data,isFetching:E,isLoading:D,isSuccess:T}}function f(v,y){const x=n(),w=r4(y);return O.useCallback((C,E)=>x(t.util.prefetch(v,C,{...w,...E})),[v,x,w])}function p(v){const y=(C,{refetchOnReconnect:E,refetchOnFocus:D,refetchOnMountOrArgChange:T,skip:A=!1,pollingInterval:_=0,skipPollingIfUnfocused:R=!1}={})=>{const{initiate:N}=t.endpoints[v],I=n(),$=O.useRef(void 0);if(!$.current){const G=I(t.internalActions.internal_getRTKQSubscriptions());$.current=G}const L=zH(A?Tp:C,LCe,l.endpointDefinitions[v],v),z=r4({refetchOnReconnect:E,refetchOnFocus:D,pollingInterval:_,skipPollingIfUnfocused:R}),F=O.useRef(!1),q=O.useRef(void 0);let{queryCacheKey:H,requestId:B}=q.current||{},V=!1;H&&B&&(V=$.current.isRequestSubscribed(H,B));const Y=!V&&F.current;return c(()=>{F.current=V}),c(()=>{Y&&(q.current=void 0)},[Y]),c(()=>{var G;const W=q.current;if(L===Tp){W==null||W.unsubscribe(),q.current=void 0;return}const Z=(G=q.current)==null?void 0:G.subscriptionOptions;if(!W||W.arg!==L){W==null||W.unsubscribe();const Q=I(N(L,{subscriptionOptions:z,forceRefetch:T}));q.current=Q}else z!==Z&&W.updateSubscriptionOptions(z)},[I,N,T,L,z,Y]),O.useEffect(()=>()=>{var G;(G=q.current)==null||G.unsubscribe(),q.current=void 0},[]),O.useMemo(()=>({refetch:()=>{var G;if(!q.current)throw new Error(ku(38));return(G=q.current)==null?void 0:G.refetch()}}),[])},x=({refetchOnReconnect:C,refetchOnFocus:E,pollingInterval:D=0,skipPollingIfUnfocused:T=!1}={})=>{const{initiate:A}=t.endpoints[v],_=n(),[R,N]=O.useState(n4),I=O.useRef(void 0),$=r4({refetchOnReconnect:C,refetchOnFocus:E,pollingInterval:D,skipPollingIfUnfocused:T});c(()=>{var q,H;const B=(q=I.current)==null?void 0:q.subscriptionOptions;$!==B&&((H=I.current)==null||H.updateSubscriptionOptions($))},[$]);const L=O.useRef($);c(()=>{L.current=$},[$]);const z=O.useCallback(function(q,H=!1){let B;return e(()=>{var V;(V=I.current)==null||V.unsubscribe(),I.current=B=_(A(q,{subscriptionOptions:L.current,forceRefetch:!H})),N(q)}),B},[_,A]),F=O.useCallback(()=>{var q,H;(q=I.current)!=null&&q.queryCacheKey&&_(t.internalActions.removeQueryResult({queryCacheKey:(H=I.current)==null?void 0:H.queryCacheKey}))},[_]);return O.useEffect(()=>()=>{var q;(q=I==null?void 0:I.current)==null||q.unsubscribe()},[]),O.useEffect(()=>{R!==n4&&!I.current&&z(R,!0)},[R,z]),O.useMemo(()=>[z,R,{reset:F}],[z,R,F])},w=(C,{skip:E=!1,selectFromResult:D}={})=>{const{select:T}=t.endpoints[v],A=zH(E?Tp:C,a,l.endpointDefinitions[v],v),_=O.useRef(void 0),R=O.useMemo(()=>o([T(A),(z,F)=>F,z=>A],d,{memoizeOptions:{resultEqualityCheck:Fx}}),[T,A]),N=O.useMemo(()=>D?o([R],D,{devModeChecks:{identityFunctionCheck:"never"}}):R,[R,D]),I=r(z=>N(z,_.current),Fx),$=s(),L=R($.getState(),_.current);return HCe(()=>{_.current=L},[L]),I};return{useQueryState:w,useQuerySubscription:y,useLazyQuerySubscription:x,useLazyQuery(C){const[E,D,{reset:T}]=x(C),A=w(D,{...C,skip:D===n4}),_=O.useMemo(()=>({lastArg:D}),[D]);return O.useMemo(()=>[E,{...A,reset:T},_],[E,A,T,_])},useQuery(C,E){const D=y(C,E),T=w(C,{selectFromResult:C===Tp||E!=null&&E.skip?void 0:qCe,...E}),{data:A,status:_,isLoading:R,isSuccess:N,isError:I,error:$}=T;return O.useDebugValue({data:A,status:_,isLoading:R,isSuccess:N,isError:I,error:$}),O.useMemo(()=>({...T,...D}),[T,D])}}}function m(v){return({selectFromResult:y,fixedCacheKey:x}={})=>{const{select:w,initiate:C}=t.endpoints[v],E=n(),[D,T]=O.useState();O.useEffect(()=>()=>{D!=null&&D.arg.fixedCacheKey||D==null||D.reset()},[D]);const A=O.useCallback(function(W){const Z=E(C(W,{fixedCacheKey:x}));return T(Z),Z},[E,C,x]),{requestId:_}=D||{},R=O.useMemo(()=>w({fixedCacheKey:x,requestId:D==null?void 0:D.requestId}),[x,D,w]),N=O.useMemo(()=>y?o([R],y):R,[y,R]),I=r(N,Fx),$=x==null?D==null?void 0:D.arg.originalArgs:void 0,L=O.useCallback(()=>{e(()=>{D&&T(void 0),x&&E(t.internalActions.removeMutationResult({requestId:_,fixedCacheKey:x}))})},[E,x,D,_]),{endpointName:z,data:F,status:q,isLoading:H,isSuccess:B,isError:V,error:Y}=I;O.useDebugValue({endpointName:z,data:F,status:q,isLoading:H,isSuccess:B,isError:V,error:Y});const G=O.useMemo(()=>({...I,originalArgs:$,reset:L}),[I,$,L]);return O.useMemo(()=>[A,G],[A,G])}}}var VCe=Symbol(),WCe=({batch:t=NCe,hooks:e={useDispatch:ACe,useSelector:RCe,useStore:qne},createSelector:n=U8,unstable__sideEffectsInRender:r=!1,...s}={})=>({name:VCe,init(i,{serializeQueryArgs:o},a){const l=i,{buildQueryHooks:c,buildMutationHook:d,usePrefetch:f}=UCe({api:i,moduleOptions:{batch:t,hooks:e,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:o,context:a});return BM(l,{usePrefetch:f}),BM(a,{batch:t}),{injectEndpoint(p,m){if(jCe(m)){const{useQuery:v,useLazyQuery:y,useLazyQuerySubscription:x,useQueryState:w,useQuerySubscription:C}=c(p);BM(l.endpoints[p],{useQuery:v,useLazyQuery:y,useLazyQuerySubscription:x,useQueryState:w,useQuerySubscription:C}),i[`use${t4(p)}Query`]=v,i[`useLazy${t4(p)}Query`]=y}else if(ICe(m)){const v=d(p);BM(l.endpoints[p],{useMutation:v}),i[`use${t4(p)}Mutation`]=v}}}}}),M_=Mwe(Pwe(),WCe());class Une{constructor(e,n,r){Uk(this,"data"),Uk(this,"t"),this.t=n,this.data=Object.keys(e).reduce((s,i)=>{const o=e[i];return(typeof o=="number"||typeof o=="string")&&(s[o]={id:o,title:n(`${r}.${i}`)}),s},{})}get(e){return this.data[e]||{id:e,title:this.t("dictionary:unknown")}}getAll(){return Object.values(this.data)}}class YCe extends Une{constructor(){super(Jwe,ct,"ds:dictionary.accessType")}}class GCe extends Une{constructor(){super(hu,ct,"ds:dictionary.module")}}const FH=t=>{var e;const n=new GCe,r=new YCe;return{id:t.Id,date:t.Date,type:t.NotificationType,title:t.Name,imageUrl:t.ImageUrl,source:n.get(t.Source),actor:t.Name,userId:t.UserId,action:{title:t.Payload.Title,subject:t.Payload.Subject,accessType:r.get(t.Payload.AccessType),subjectUrl:t.Payload.SubjectUrl,status:t.Payload.Status,dlpCheckStatus:t.Payload.Status,externalLinkUrl:t.Payload.ExternalLinkUrl,downloadUrl:t.Payload.DownloadUrl||void 0,roleName:t.Payload.RoleName,targetUserName:t.Payload.TargetUserName,movedTo:t.Payload.MoveTo,description:(e=t.Payload.Description)==null?void 0:e.replace(/<[^>]+>/g,"").trim(),project:t.Payload.Project,customerName:t.Payload.CustomerName,timeUntilStart:t.Payload.TimeUntilStart?ySe(t.Payload.TimeUntilStart):void 0,startsAt:t.Payload.StartsAt},isRead:t.State,isNew:!1}},Cg=M_({reducerPath:"DCNotificationApi",baseQuery:E_("/v1/notifications"),tagTypes:["Notifications","UnreadNotifications"],endpoints:t=>({getNotifications:t.query({query:({count:e=10,offset:n=0,isAll:r=!1}={count:10,offset:0,isAll:!1})=>({method:"POST",url:"/",body:{FilterConditions:[],Count:e,Offset:n,IsAll:r}}),transformResponse:e=>({notifications:e.Items.map(n=>FH(n)),lastSeenAt:e.ReadDate,count:e.Items.length||0,unreadCount:e.UnreadCount}),serializeQueryArgs:({endpointName:e})=>e,forceRefetch({currentArg:e,previousArg:n}){return e!==n},merge:(e,n)=>{const r=new Map(e.notifications.map(s=>[s.id,s]));return n.notifications.forEach(s=>{r.set(s.id,s)}),{notifications:Array.from(r.values()),lastSeenAt:n.lastSeenAt,count:n.notifications.length,unreadCount:n.unreadCount}},providesTags:["Notifications"]}),getUnreadNotifications:t.query({query:({count:e=10,offset:n=0,isAll:r=!1}={count:10,offset:0,isAll:!1})=>({method:"POST",url:"/",body:{FilterConditions:[{Type:20,NumValues:[0]}],Count:e,Offset:n,IsAll:r}}),transformResponse:e=>({notifications:e.Items.map(n=>FH(n)),lastSeenAt:e.ReadDate,count:e.Items.length,unreadCount:e.UnreadCount}),serializeQueryArgs:({endpointName:e})=>e,forceRefetch({currentArg:e,previousArg:n}){return e!==n},merge:(e,n)=>{const r=new Map(e.notifications.map(s=>[s.id,s]));return n.notifications.forEach(s=>{r.set(s.id,s)}),{notifications:Array.from(r.values()),lastSeenAt:n.lastSeenAt,count:n.notifications.length,unreadCount:n.unreadCount}},providesTags:["UnreadNotifications"]}),markAsRead:t.mutation({query:({id:e,value:n})=>({url:"/mark",method:"POST",body:{Id:e,State:n}}),async onQueryStarted({id:e,value:n},{dispatch:r,queryFulfilled:s,getState:i}){const o=r(Cg.util.updateQueryData("getNotifications",{},l=>{e||l.notifications.forEach(d=>{d.isRead=Od.Read});const c=l.notifications.find(d=>d.id===e);c&&(c.isRead=c.isRead?Od.Unread:Od.Read)})),a=r(Cg.util.updateQueryData("getUnreadNotifications",{},l=>{var c;if(e||(l.notifications=[],l.unreadCount=0),l.notifications.find(f=>f.id===e))l.notifications=l.notifications.filter(f=>f.id!==e),l.unreadCount-=1;else if(n===Od.Unread){const m=(c=Cg.endpoints.getNotifications.select({})(i()).data)==null?void 0:c.notifications.find(v=>v.id===e);m&&(l.notifications.push(m),l.unreadCount+=1)}}));try{await s}catch{o.undo(),a.undo()}}}),markAsSeen:t.mutation({query:()=>({url:"/setreaddate",method:"POST",body:{Date:new Date().toISOString()}})})})}),{useGetNotificationsQuery:Vne,useGetUnreadNotificationsQuery:KCe,useMarkAsReadMutation:X8,useMarkAsSeenMutation:ZCe}=Cg,JCe=({interval:t=1e4}={interval:1e4})=>{const[e,n]=O.useState(t),[r,s]=O.useState(!1),{data:{notifications:i=[],lastSeenAt:o=""}={},isLoading:a}=Vne({count:20},{pollingInterval:e});return O.useEffect(()=>{const l=i.some(c=>new Date(c.date)>new Date(o));if(s(l),n(l?0:t),l){const c=i.filter(d=>new Date(d.date)>new Date(o));uCe(c)}},[i,o]),{notifications:i,haveNew:r,isLoading:a}},XCe=(t,e=Date.now().toString())=>{const{t:n}=yt(),r=(i,o)=>new Date(o.date).getTime()-new Date(i.date).getTime();return O.useMemo(()=>{const i=t.filter(a=>new Date(a.date)>new Date(e)).sort(r),o=t.filter(a=>new Date(a.date)<=new Date(e)).sort(r);return[{id:1,title:n("ds:notifications.modal.groups.new"),items:i},{id:2,title:n("ds:notifications.modal.groups.older"),items:o}]},[t,e,n])},QCe=({hovered:t,notification:e})=>{const n=({...o})=>g.jsx(gw,{...o,size:8}),[r]=X8(),s=o=>{r({id:e.id,value:o.target.checked?Od.Unread:Od.Read})},i=O.useMemo(()=>e.isRead,[e.isRead]);return g.jsx(nf,{checked:!i,onChange:s,onClick:o=>o.stopPropagation(),radius:"xl",size:"xs",icon:n,iconColor:t?"white":"blue.4",color:t?"blue.5":"blue.4",styles:o=>({input:{borderColor:t?o.colors.grey[5]:o.colors.grey[3]}})})},Wne=({title:t,children:e,...n})=>g.jsxs(le,{...n,children:[g.jsx(He,{style:{fontSize:"10px"},ml:"sm",c:"secondary",tt:"uppercase",children:t}),g.jsx(Fi,{listStyleType:"none",children:e})]});Wne.Item=Fi.Item;const BH=({notifications:t,lastSeenAt:e,avatarSlot:n,...r})=>{const s=XCe(t,e),[i]=X8(),o=a=>{a.isRead===Od.Unread&&i({id:a.id,value:Od.Read})};return g.jsx(Is,{gap:"sm",...r,children:s.map(a=>a.items.length?g.jsx(Wne,{title:a.title,maw:"900px",children:a.items.map(l=>g.jsx("li",{children:g.jsx(lCe,{notification:l,avatarSlot:n,indicatorSlot:QCe,onClick:o})},l.id))},a.id):null)})},eEe=()=>{const{t}=yt(["ds"]),[e]=X8(),n=()=>{e({id:null,value:Od.Read})};return g.jsx(en,{variant:"subtle",size:"xs",fw:400,leftSection:g.jsx(gCe,{size:14}),onClick:n,children:t("notifications.modal.allAsReadButton")})},tEe="_root_16nkv_1",nEe="_list_16nkv_7",rEe="_tab_16nkv_12",sEe="_header_16nkv_26",iEe="_headerDark_16nkv_30",oEe="_shrink_16nkv_35",fy={root:tEe,list:nEe,tab:rEe,header:sEe,headerDark:iEe,shrink:oEe};function HH({children:t,isLoading:e=!1,height:n=500,threshold:r=250,disabled:s=!1,onLoadMore:i}){const o=O.useRef(null),a=O.useCallback(({y:l})=>{var c;const d=(c=o.current)==null?void 0:c.querySelector(".mantine-ScrollArea-viewport");if(!(d!=null&&d.clientHeight)||!(d!=null&&d.scrollHeight))return;l+d.clientHeight+r>=d.scrollHeight&&i&&!e&&!s&&i()},[r,i,e,s]);return g.jsx(Qs,{ref:o,h:n,scrollbars:"y",onScrollPositionChange:a,children:g.jsxs(Is,{gap:"md",children:[t,e&&!s&&g.jsx(JA,{py:"md",children:g.jsx(zi,{size:"sm"})})]})})}function aEe({initialCount:t=10}){const[e,n]=O.useState(0),[r]=O.useState(t),[s,i]=O.useState(!0),{data:o,isFetching:a,isLoading:l}=Vne({count:r,offset:e});return O.useEffect(()=>{(!(o!=null&&o.count)||o.count<r)&&i(!1)},[o==null?void 0:o.notifications,r]),{loadMore:()=>{!a&&!l&&s&&n(d=>d+r)},isLoading:a||l,notifications:(o==null?void 0:o.notifications)??[],hasMore:s,lastSeenAt:(o==null?void 0:o.lastSeenAt)??""}}function lEe({initialCount:t=10}){const[e,n]=O.useState(0),[r]=O.useState(t),[s,i]=O.useState(!0),{data:o,isFetching:a,isLoading:l,refetch:c}=KCe({count:r,offset:e},{refetchOnMountOrArgChange:!0}),d=((o==null?void 0:o.unreadCount)||0)>999?"999+":o==null?void 0:o.unreadCount;return O.useEffect(()=>{(!(o!=null&&o.count)||o.count<r)&&i(!1)},[o==null?void 0:o.notifications,r]),{loadMore:()=>{!a&&!l&&s&&n(p=>p+r)},isLoading:a||l,hasMore:s,refetch:c,notifications:(o==null?void 0:o.notifications)??[],lastSeenAt:(o==null?void 0:o.lastSeenAt)??"",unreadCount:d}}const cEe="data:image/svg+xml,%3csvg%20width='126'%20height='114'%20viewBox='0%200%20126%20114'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M84.885%2041.6769C75.9426%2041.6769%2066.8399%2041.3136%2058.3249%2038.9418C49.9701%2036.6234%2042.2991%2032.1255%2035.4615%2026.9225C30.9849%2023.5357%2026.9144%2020.8434%2021.1024%2021.2493C15.4153%2021.5518%209.97646%2023.6757%205.5894%2027.3071C-1.80382%2033.7815%20-0.692703%2045.7688%202.26672%2054.177C6.71121%2066.8587%2020.237%2075.6836%2031.7328%2081.4101C45.0128%2088.0448%2059.607%2091.891%2074.2332%2094.1132C87.0538%2096.0577%20103.528%2097.4786%20114.639%2089.1025C124.843%2081.4101%20127.642%2063.8459%20125.142%2051.9868C124.536%2048.4802%20122.67%2045.3155%20119.896%2043.0871C112.727%2037.8521%20102.033%2041.3457%2093.9769%2041.5273C90.9854%2041.5914%2087.9406%2041.6555%2084.885%2041.6769Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M63.004%20111.502C84.6649%20111.502%20102.224%20110.406%20102.224%20109.055C102.224%20107.704%2084.6649%20106.609%2063.004%20106.609C41.3432%20106.609%2023.7836%20107.704%2023.7836%20109.055C23.7836%20110.406%2041.3432%20111.502%2063.004%20111.502Z'%20fill='%23F3F6FA'/%3e%3cpath%20d='M111.946%2014.8919C112.525%2014.8919%20112.993%2014.4231%20112.993%2013.8449C112.993%2013.2666%20112.525%2012.7979%20111.946%2012.7979C111.368%2012.7979%20110.899%2013.2666%20110.899%2013.8449C110.899%2014.4231%20111.368%2014.8919%20111.946%2014.8919Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M42.2992%206.12162C42.8774%206.12162%2043.3462%205.65286%2043.3462%205.07461C43.3462%204.49636%2042.8774%204.02759%2042.2992%204.02759C41.7209%204.02759%2041.2521%204.49636%2041.2521%205.07461C41.2521%205.65286%2041.7209%206.12162%2042.2992%206.12162Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M84.5803%2037.3028C85.1586%2037.3028%2085.6274%2036.834%2085.6274%2036.2558C85.6274%2035.6775%2085.1586%2035.2087%2084.5803%2035.2087C84.0021%2035.2087%2083.5333%2035.6775%2083.5333%2036.2558C83.5333%2036.834%2084.0021%2037.3028%2084.5803%2037.3028Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.7137%20102.169C83.2919%20102.169%2083.7607%20101.701%2083.7607%20101.122C83.7607%20100.544%2083.2919%20100.075%2082.7137%20100.075C82.1354%20100.075%2081.6667%20100.544%2081.6667%20101.122C81.6667%20101.701%2082.1354%20102.169%2082.7137%20102.169Z'%20fill='%23DAE3ED'/%3e%3cpath%20d='M82.9076%201.14111V5.73517'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M80.6112%203.43896H85.2053'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.97446%2012.342V16.9361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M4.66666%2014.6372H9.2714'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.519%2084.4858V89.0906'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M9.21118%2086.7837H13.8159'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M111.963%2030.542V35.1361'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M109.667%2032.8398H114.261'%20stroke='%23C9D3E0'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681'%20fill='white'/%3e%3cpath%20d='M49.8458%2077.4681V81.9533C49.8458%2085.522%2051.2563%2088.9444%2053.7669%2091.4678C56.2776%2093.9912%2059.6827%2095.4089%2063.2333%2095.4089C66.7839%2095.4089%2070.1891%2093.9912%2072.6997%2091.4678C75.2104%2088.9444%2076.6208%2085.522%2076.6208%2081.9533V77.4681M54.3083%2023.6459C54.3083%2021.2668%2055.2486%2018.9852%2056.9224%2017.3029C58.5962%2015.6206%2060.8663%2014.6755%2063.2333%2014.6755C65.6004%2014.6755%2067.8705%2015.6206%2069.5443%2017.3029C71.218%2018.9852%2072.1583%2021.2668%2072.1583%2023.6459C77.2831%2026.0815%2081.6519%2029.8728%2084.7964%2034.6135C87.9408%2039.3543%2089.7425%2044.8657%2090.0083%2050.557V64.0126C90.3442%2066.801%2091.3267%2069.4713%2092.8769%2071.8084C94.4271%2074.1455%2096.5015%2076.0841%2098.9333%2077.4681H27.5333C29.9651%2076.0841%2032.0396%2074.1455%2033.5898%2071.8084C35.1399%2069.4713%2036.1225%2066.801%2036.4583%2064.0126V50.557C36.7241%2044.8657%2038.5258%2039.3543%2041.6703%2034.6135C44.8148%2029.8728%2049.1835%2026.0815%2054.3083%2023.6459Z'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M56%2031.9421C48.3%2033.3421%2041.86%2045.8488%2042.2333%2058.5421M82.3667%2046.1755C84.2334%2051.5421%2084.2334%2053.6421%2084.2334%2058.5421M48.7667%2046.1755C46.9%2051.5421%2046.9%2053.6421%2046.9%2058.5421'%20stroke='%23C9D3E0'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e",qH=({title:t,description:e})=>g.jsx(vt,{justify:"center",align:"center",children:g.jsxs(Is,{gap:"md",justify:"center",align:"center",w:"350",children:[g.jsx(ov,{src:cEe,alt:"Bell",w:"126"}),g.jsxs(Is,{justify:"center",align:"center",gap:0,children:[g.jsx(He,{c:"primary",size:"lg",fw:500,children:t}),g.jsx(He,{c:"secondary",size:"sm",ta:"center",children:e})]})]})}),UH=({url:t,children:e,tooltip:n})=>g.jsx(qP,{to:t,children:g.jsx(ss,{disabled:!n,label:n,position:"bottom",withArrow:!0,children:g.jsx(gn,{size:"lg",variant:"subtle",c:"grey.6",children:e})})}),uEe=t=>{const e=t.ModuleSettings.ModuleUrls.filter(n=>n.HasAccess);return{userId:t.UserId,modules:e.reduce((n,r)=>(n[hu[r.Name]]={url:r.Url},n),{})}},Kk=M_({reducerPath:"DCSettingsApi",baseQuery:E_("/v1"),tagTypes:["Settings","User"],endpoints:t=>({getSettings:t.query({query:()=>({method:Z8.GET,url:"/settings"}),transformResponse:e=>uEe(e),providesTags:["Settings"]})})}),{useGetSettingsQuery:Yne}=Kk,dEe=()=>{const{data:t,isLoading:e}=Yne();return{modules:(t==null?void 0:t.modules)||null,isLoading:e}},Gne=t=>{var e;const{data:n,isLoading:r}=Yne();return{module:((e=n==null?void 0:n.modules)==null?void 0:e[t])||null,isLoading:r}},fEe=t=>({id:t.Id,fullName:`${t.Surname} ${t.FirstName} ${t.MiddleName}`.trim(),firstName:t.FirstName,lastName:t.Surname,middleName:t.MiddleName,email:t.Email,avatarUrl:t.Avatar,organization:{id:t.Customer.Id,title:t.Customer.Title}}),Zk=M_({reducerPath:"DCUserApi",baseQuery:E_("/v1"),tagTypes:["User"],endpoints:t=>({getCurrentUser:t.query({query:()=>({method:Z8.GET,url:"/user"}),transformResponse:e=>fEe(e),providesTags:["User"]})})}),{useGetCurrentUserQuery:Kne}=Zk,pEe=()=>{const{data:t}=Kne();return t??{}},hEe=()=>{const{module:t}=Gne(hu.Admin),{id:e}=pEe();return{settingsUrl:`${t==null?void 0:t.url}/profile/${e}/notification-settings`,archiveUrl:`${t==null?void 0:t.url}/profile/${e}/notifications`}},mEe="data:image/svg+xml,%3csvg%20width='18'%20height='22'%20viewBox='0%200%2018%2022'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.98198%200.544189C5.59973%200.544189%202.85786%203.21918%202.85786%206.51896C2.85786%209.81867%205.59973%2012.4937%208.98198%2012.4937C12.3642%2012.4937%2015.1061%209.81867%2015.1061%206.51896C15.1061%203.21918%2012.3642%200.544189%208.98198%200.544189ZM16.808%2015.4772C17.9682%2016.2061%2017.9116%2017.795%2016.855%2018.6609C14.7261%2020.4052%2011.9801%2021.4559%208.98229%2021.4559C6.00442%2021.4559%203.27467%2020.4191%201.15175%2018.6952C0.0857694%2017.8296%200.0292887%2016.2327%201.19454%2015.499C1.55729%2015.2706%201.95233%2015.0705%202.38106%2014.8981C4.10603%2014.2043%206.30925%2013.9874%208.98213%2013.9874C11.6685%2013.9874%2013.8842%2014.1904%2015.6137%2014.8768C16.0457%2015.0482%2016.4435%2015.2482%2016.808%2015.4772Z'%20fill='white'/%3e%3c/svg%3e";function gEe(t,e){if(!t||e.length===0)return e[0];let n=0;for(let s=0;s<t.length;s++)n=t.charCodeAt(s)+((n<<5)-n);const r=Math.abs(n)%e.length;return e[r]}function Zne(t){return t!=null&&t.trim()&&t.trim().split(/\s+/).slice(0,2).map(r=>{var s;return(s=r[0])==null?void 0:s.toUpperCase()}).filter(Boolean).join("")||null}const vEe=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"];function yEe(t,e){return O.useMemo(()=>{const n=String(t==null?void 0:t.id)||e||"",r=!(t!=null&&t.id)&&!e?"var(--mantine-color-gray-4)":gEe(n,vEe),s=(t==null?void 0:t.id)&&bEe(t)||Zne(e);return{color:r,initials:s}},[t,e])}function bEe({fullName:t,firstName:e,middleName:n,lastName:r,email:s}){const i=r==null?void 0:r[0],o=e==null?void 0:e[0],a=n==null?void 0:n[0];return r&&e?`${i}${o}`.toUpperCase():t?Zne(t):e&&n?`${o}`.toUpperCase():r&&n?`${i}`.toUpperCase():n?`${a}`.toUpperCase():s?s[0].toUpperCase():null}const Jne=O.forwardRef(({user:t,fallbackSrc:e,fallback:n,avatarProps:r,...s},i)=>{const{color:o,initials:a}=yEe(t,n);return g.jsx(O1,{src:(t==null?void 0:t.avatarUrl)||e,radius:60,tt:"uppercase",color:o,styles:{placeholder:{color:"white",backgroundColor:o,fontWeight:500}},ref:i,...s,...r,children:a||g.jsx(ov,{src:mEe,alt:"User avatar placeholder",w:"60%",h:"60%",fit:"contain"})})}),VH=t=>({id:t.Id,contactId:t.Contact.Id,userId:t.Contact.UserId,fullName:t.Contact.FullName,firstName:t.Contact.FirstName,lastName:t.Contact.Surname,middleName:t.Contact.MiddleName,email:t.Contact.Email,position:t.Contact.Position,organization:t.Contact.Company,isFavourite:t.IsFavorite,haveAvatar:t.Contact.HasAvatar,isPersonal:t.IsPersonal}),xEe=t=>({Id:t.id,IsFavorite:t.isFavourite,IsPersonal:t.isPersonal,Contact:{Id:t.contactId,FullName:t.fullName,FirstName:t.firstName,Email:t.email,Position:t.position,Company:t.organization,HasAvatar:t.haveAvatar||!1}}),Jk=M_({reducerPath:"DCContactApi",baseQuery:E_("/v1"),tagTypes:["Contacts"],endpoints:t=>({getContact:t.query({query:({name:e,phone:n,email:r,contactId:s})=>({method:"POST",url:"/addressbook/Links",body:{ContactIds:s?[s]:[],Like:e,Email:r,Phone:n}}),transformResponse:(e,n,{id:r})=>{var s;if(r){const i=e.Items.find(o=>o.Contact.UserId===r);if(i)return VH(i)}return(s=e==null?void 0:e.Items)!=null&&s[0]?VH(e.Items[0]):null},providesTags:["Contacts"]}),addContact:t.mutation({query:e=>({method:"POST",url:"/addressbook/SaveLink",body:xEe(e)}),invalidatesTags:["Contacts"]}),addToFavourite:t.mutation({query:({id:e})=>({method:"POST",url:"/Favorites/Add",body:{EntityIds:[e],Type:15}}),invalidatesTags:["Contacts"]}),removeFromFavourite:t.mutation({query:({id:e})=>({method:"POST",url:"/Favorites/Delete",body:{EntityIds:[e],Type:15}}),invalidatesTags:["Contacts"]})})}),{useGetContactQuery:SEe,useAddContactMutation:wEe,useAddToFavouriteMutation:CEe,useRemoveFromFavouriteMutation:EEe}=Jk,WH=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"],MEe=t=>{if(typeof t!="string")throw new Error("Input must be a string");const e=n=>n.trim()===""?0:Array.from(n).reduce((r,s)=>r+s.charCodeAt(0),0)%WH.length;return(()=>{try{const n=e(t);return WH[n]}catch(n){return console.error("Error generating color:",n),"#FFFFFF"}})()},DEe=t=>!t||!t.userId?null:{id:t.userId,fullName:t.fullName||"",firstName:t.firstName||"",lastName:t.lastName||"",middleName:t.middleName||"",email:t.email||"",avatarUrl:t.haveAvatar?`/api/v2/profile/getAvatar?&id=${t.contactId}&type=Contact`:""},YH=({contact:t,fallbackSrc:e,actions:n})=>{var r,s;const i=DEe(t),o=MEe(((r=t==null?void 0:t.userId)==null?void 0:r.toString())||((s=t==null?void 0:t.contactId)==null?void 0:s.toString())||""),a=O.useMemo(()=>[t.fullName,t.position,t.email].filter(Boolean),[t]);return g.jsxs(Is,{gap:0,children:[g.jsxs(wt,{gap:10,align:"stretch",wrap:"nowrap",children:[g.jsx(Jne,{user:i,fallbackSrc:e,avatarProps:{size:48,color:o}}),g.jsxs(Is,{gap:0,w:"100%",justify:"center",children:[g.jsx(He,{size:"lg",c:"primary",truncate:!0,w:290,children:a.length?a[0]:t.phone}),a[1]&&g.jsx(He,{size:"sm",c:"secondary",truncate:!0,w:290,children:a[1]})]})]}),g.jsxs(Is,{gap:0,ml:58,children:[a[2]&&g.jsx(He,{size:"sm",c:"primary",mt:4,truncate:!0,w:290,children:a[2]}),!!n&&g.jsx(le,{mt:"sm",children:n})]})]})},Xne=({baseUrl:t,contact:e})=>{const[n]=wEe(),r=O.useMemo(()=>e.id?e.organization?g.jsx(hCe,{stroke:1.2,size:18}):g.jsx(SCe,{stroke:1.4,size:18}):g.jsx(xCe,{stroke:1.2,size:18}),[e,e==null?void 0:e.isPersonal]),s=()=>{const i=t;e!=null&&e.id?window.open(`${i}/contact/${e.id}/`,"_blank"):n(e)};return g.jsx(en,{size:"compact-md",radius:"sm",variant:"light",color:"accent",leftSection:r,fw:400,onClick:s,disabled:!e.id&&!e.email,children:g.jsx(He,{size:"xs",children:e.id?e.organization?ct("ds:contact.card.actions.addToContacts.organization"):ct("ds:contact.card.actions.addToContacts.inContacts"):ct("ds:contact.card.actions.addToContacts.add")})})},kEe=({baseUrl:t,email:e})=>{const n=()=>{const r=t,s=zy().format("YYYY-MM-DD");window.open(`${r}/event/new/${s}/?add=${e}`,"_blank")};return g.jsx(gn,{size:30,variant:"light",color:"accent",onClick:n,children:g.jsx(mCe,{stroke:1.2,size:22})})},TEe=({baseUrl:t,email:e,name:n})=>{const r=()=>{const s=t,i=n?`${n}<${e}>`:e;window.open(`${s}/inbox?to=${i}`,"_blank")};return g.jsx(gn,{size:30,variant:"light",color:"accent",onClick:r,children:g.jsx(vCe,{stroke:1.2,size:22})})},AEe=({contact:t})=>{const[e,n]=O.useState(t.isFavourite),[r]=CEe(),[s]=EEe(),i=()=>{n(o=>!o),e?s({id:t.contactId}):r({id:t.contactId})};return g.jsx(gn,{size:30,variant:"subtle",color:e?"yellow.4":"gray.6",onClick:i,children:e?g.jsx(wCe,{size:22}):g.jsx(bCe,{stroke:1.2,size:22})})},_Ee=({contact:t})=>{const{modules:e}=dEe();return e?g.jsxs(wt,{justify:"space-between",children:[g.jsxs(wt,{gap:"xs",children:[t.email&&g.jsxs(g.Fragment,{children:[e[hu.Mail]&&g.jsx(TEe,{baseUrl:e[hu.Mail].url,email:t.email,name:t.fullName}),e[hu.Calendar]&&g.jsx(kEe,{baseUrl:e[hu.Calendar].url,email:t.email})]}),e[hu.Contacts]&&g.jsx(Xne,{baseUrl:e[hu.Contacts].url,contact:t})]}),g.jsx(AEe,{contact:t})]}):null},OEe=({id:t,contactId:e,name:n,email:r,phone:s,fallbackSrc:i,nameFallback:o,actions:a})=>{const{data:l,isLoading:c}=SEe({id:t,contactId:e,name:n,email:r,phone:s}),{module:d,isLoading:f}=Gne(hu.Contacts);if(c||f)return g.jsx(g.Fragment,{children:g.jsx(vt,{justify:"center",align:"center",h:100,children:g.jsx(zi,{size:"sm",color:"gray.5"})})});if(!l){const p={fullName:n||o,email:r,phone:s};return g.jsx(YH,{contact:p,fallbackSrc:i,actions:p.email&&(d==null?void 0:d.url)&&g.jsx(Xne,{baseUrl:d.url,contact:p})})}return g.jsx(g.Fragment,{children:g.jsx(YH,{fallbackSrc:i,contact:l,actions:a?a({contact:l}):g.jsx(_Ee,{contact:l})})})},Qne=({children:t,actions:e,hoverCardProps:n={},fallbackSrc:r,nameFallback:s,...i})=>g.jsxs(Vp,{openDelay:700,radius:"md",shadow:"lg",width:380,trapFocus:!0,...n,children:[g.jsx(Vp.Target,{children:t}),g.jsx(Vp.Dropdown,{p:"sm",onMouseDown:o=>{o.stopPropagation()},onClick:o=>{o.stopPropagation(),o.preventDefault()},children:g.jsx(OEe,{...i,actions:e,fallbackSrc:r,nameFallback:s})})]}),GH=({notification:t,...e})=>{const n=O.useMemo(()=>t.userId?{id:t.userId,fullName:t.actor,avatarUrl:t.imageUrl||""}:null,[t]);return g.jsx(le,{onClick:r=>{r.stopPropagation(),r.preventDefault()},children:g.jsx(Qne,{id:t.userId,name:t.actor,children:g.jsx(Jne,{user:n,avatarProps:{size:30,...e}})})})},REe=()=>{var t;const{t:e}=yt(["ds"]),[n,r]=O.useState("all"),{loadMore:s,isLoading:i,notifications:o,hasMore:a,lastSeenAt:l}=aEe({initialCount:20}),{settingsUrl:c,archiveUrl:d}=hEe(),{loadMore:f,isLoading:p,notifications:m,hasMore:v,lastSeenAt:y,refetch:x,unreadCount:w}=lEe({initialCount:20}),{data:C,isLoading:E}=Kne(),D=(t=C==null?void 0:C.organization)==null?void 0:t.title;O.useEffect(()=>{n==="unread"&&x()},[n,x]);const T=!m.length,A=!o.length,_=n==="all"?A:T,{colorScheme:R}=NQ(),N=R==="dark";return g.jsxs(Is,{h:"100%",gap:0,style:{overflow:"hidden"},children:[g.jsxs(wt,{justify:"space-between",px:"sm",mt:"sm",mb:"xs",children:[g.jsx(He,{c:"primary",fw:500,children:e("notifications.modal.title")}),g.jsxs(wt,{gap:"0",children:[g.jsx(UH,{url:d,tooltip:e("notifications.modal.archiveButton"),children:g.jsx(fCe,{size:18,stroke:1})}),g.jsx(UH,{url:c,tooltip:e("notifications.modal.settingsButton"),children:g.jsx(yCe,{size:18,stroke:1})})]})]}),g.jsx(ts,{value:n,onChange:r,classNames:fy,children:g.jsxs(Is,{gap:0,h:"100%",children:[g.jsxs(wt,{justify:"space-between",wrap:"nowrap",gap:0,px:"sm",className:N?fy.headerDark:fy.header,children:[g.jsxs(ts.List,{style:{flexWrap:"nowrap"},children:[g.jsx(ts.Tab,{value:"all",children:e("notifications.modal.tabs.all")}),g.jsxs(ts.Tab,{value:"unread",disabled:A,children:[e("notifications.modal.tabs.unread")," ",w||""]})]}),g.jsx(eEe,{})]}),g.jsxs(Is,{gap:0,h:"100%",style:{justifyContent:_?"center":"flex-start"},className:fy.shrink,children:[g.jsx(ts.Panel,{value:"all",className:fy.shrink,children:g.jsx(HH,{height:"100%",onLoadMore:s,isLoading:i||E,disabled:!a||A,children:A?g.jsx(qH,{title:e("ds:notifications.modal.empty.title"),description:e("ds:notifications.modal.empty.description",{serviceName:D})}):g.jsx(BH,{avatarSlot:GH,notifications:o,lastSeenAt:l,py:"sm"})})}),g.jsx(ts.Panel,{value:"unread",className:fy.shrink,children:g.jsx(HH,{height:"100%",onLoadMore:f,isLoading:p,disabled:!v||T,children:T?g.jsx(qH,{title:e("ds:notifications.modal.emptyUnread.title"),description:e("ds:notifications.modal.emptyUnread.description",{serviceName:D})}):g.jsx(BH,{avatarSlot:GH,notifications:m,lastSeenAt:y,py:"sm"})})})]})]})})]})},NEe=({actionIconProps:t={}})=>{const[e,n]=O.useState(!1),{haveNew:r}=JCe(),[s]=ZCe(),i=o=>{o&&n(!0),s()};return O.useEffect(()=>{n(!1)},[r]),g.jsxs(Gt,{position:"bottom-end",shadow:"sm",offset:15,radius:16,keepMounted:!1,onChange:i,children:[g.jsx(Gt.Target,{children:g.jsx(gn,{size:"lg",...t,children:g.jsx(d8,{size:12,color:"red",withBorder:!0,offset:3,disabled:!r||e,style:{borderColor:"transparent"},children:g.jsx(pCe,{size:22})})})}),g.jsx(Gt.Dropdown,{w:400,h:565,p:0,children:g.jsx(REe,{})})]})},jEe={[Cg.reducerPath]:Cg.reducer,[Jk.reducerPath]:Jk.reducer,[Kk.reducerPath]:Kk.reducer,[Zk.reducerPath]:Zk.reducer},IEe=[Cg.middleware,Jk.middleware,Kk.middleware,Zk.middleware],LEe={title:"Уведомления",tabs:{all:"Все",unread:"Непрочитанные"},groups:{new:"Новые",older:"Полученные ранее"},empty:{title:"Новых уведомлений нет",description:"Здесь отображаются все важные уведомления сервисов {{serviceName}}"},emptyUnread:{title:"Непрочитанных уведомлений нет",description:"Здесь отображаются непрочитанные уведомления сервисов {{serviceName}}"},allAsReadButton:"Все как прочитанные",archiveButton:"Архив уведомлений",settingsButton:"Настройки уведомлений"},PEe={title:"Настройка уведомлений",modules:{admin:{roleChange:"Изменение группы",login:"Авторизация с другого устройства"},project:{taskChange:"Изменения задач в спринте",assignedTaskChanged:"Изменения задач назначенных на тебя",taskAssign:"Назначение на задачу",commentMention:"Упоминание в комментариях",projectAccess:"Выдача доступа к проекту",newSprint:"Новый спринт создан"}}},$Ee={title:"Изменен доступ к файлу",description:"<strong>{{actor}}</strong> изменил настройки доступа к файлу <strong>«{{action.subject}}»</strong>.<br />Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>."},zEe={title:"Новый комментарий к файлу",description:"<strong>{{actor}}</strong> оставил новый комментарий к файлу <strong>«{{action.subject}}»</strong>."},FEe={title:"Вас упомянули в комментарии",description:"<strong>{{actor}}</strong> упомянул вас в комментарии к файлу <strong>«{{action.subject}}»</strong>."},BEe={title:"Файл загружен",description:"Файл <strong>«{{action.subject}}»</strong> был загружен и успешно проверен."},HEe={title:"Загрузка файла заблокирована",description:"Файл <strong>«{{action.subject}}»</strong> был заблокирован политикой DLP."},qEe={title:"Ошибка при загрузке файла",description:"Произошла ошибка при проверке файла <strong>«{{action.subject}}»</strong>."},UEe={title:"Ссылка на файл сгенерирована",description:'Ваш файл <strong>«{{action.subject}}»</strong> успешно прошёл проверку. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Ссылка</a>'},VEe={title:"Не удалось сгенерировать ссылку на файл",description:"Ваш файл <strong>«{{action.subject}}»</strong> не прошёл проверку. Попробуйте снова."},WEe={title:"Изменен доступ к папке",description:"<strong>{{actor}}</strong> изменил настройки доступа к папке <strong>«{{action.subject}}»</strong>. Текущий уровень доступа: <strong>«{{action.accessType.title}}»</strong>."},YEe={title:"Доступ к комнате",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к комнате <strong>«{{action.subject}}»</strong>."},GEe={title:"Доступ к проекту",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к проекту <strong>«{{action.subject}}»</strong>."},KEe={title:"Новая задача создана",description:"<strong>{{actor}}</strong> создал(а) новую задачу <strong>«{{action.title}}»</strong>."},ZEe={title:"Задача удалена",description:"<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>."},JEe={title:"Детали задачи обновлены",description:"<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>."},XEe={title:"Задача перемещена",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>."},QEe={title:"Статус задачи изменен",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>."},eMe={title:"Новый комментарий к задаче",description:"<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>."},tMe={title:"Задача удалена",description:"<strong>{{actor}}</strong> удалил задачу <strong>«{{action.title}}»</strong>."},nMe={title:"Детали задачи обновлены",description:"<strong>{{actor}}</strong> обновил(а) задачу <strong>«{{action.title}}»</strong>."},rMe={title:"Задача перемещена",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в <strong>«{{action.movedTo}}»</strong>."},sMe={title:"Статус задачи изменен",description:"<strong>{{actor}}</strong> переместил(а) задачу <strong>«{{action.title}}»</strong> в статус <strong>«{{action.status}}»</strong>."},iMe={title:"Новый комментарий к задаче",description:"<strong>{{actor}}</strong> оставил(а) новый комментарий к задаче <strong>«{{action.title}}»</strong>."},oMe={title:"Вы исключены из задачи",description:"<strong>{{actor}}</strong> исключил(а) вас из задачи <strong>«{{action.title}}»</strong>."},aMe={title:"Вам назначена задача",description:"<strong>{{actor}}</strong> назначил(а) вас на задачу <strong>«{{action.title}}»</strong>."},lMe={title:"Вас упомянули в комментарии",description:"<strong>{{actor}}</strong> упомянул(а) вас в комментарии к задаче <strong>«{{action.title}}»</strong>."},cMe={title:"Новое вложение в задаче",description:"<strong>{{actor}}</strong> добавил(а) новое вложение к задаче <strong>«{{action.title}}»</strong>."},uMe={title:"Новый спринт создан",description:"Новый спринт <strong>«{{action.subject}}»</strong> был создан в проекте <strong>«{{action.project}}»</strong>."},dMe={title:"Вам назначена новая группа",description:"Вам назначена группа <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>."},fMe={title:"Ваша группа удалена",description:"Вас удалили из группы <strong>«{{action.subject}}»</strong> в проекте <strong>«{{action.customerName}}»</strong>."},pMe={title:"Сообщение с флагом «Важное»",description:"<strong>{{actor}}</strong> отправил(а) новое сообщение с флагом «Важное»"},hMe={title:"Новое сообщение",description:"<strong>{{actor}}</strong> отправил(а) новое сообщение"},mMe={title:"Доступ к календарю",description:"Теперь у вас есть доступ уровня <strong>«{{action.accessType.title}}»</strong> к календарю <strong>«{{action.subject}}»</strong>."},gMe={title:"Событие отменено",description:"Событие <strong>«{{action.title}}»</strong> было отменено <strong>{{actor}}</strong>."},vMe={title:"Вы приглашены на событие",description:"<strong>{{actor}}</strong> пригласил(а) вас на событие <strong>«{{action.title}}»</strong>."},yMe={title:"Детали события обновлены",description:"<strong>{{actor}}</strong> обновил(а) детали события <strong>«{{action.title}}»</strong>."},bMe={title:"Запланированное событие",description:"Событие <strong>«{{action.title, defaultValue(fallback:Без заголовка)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.",started:"началось",willStartIn:"начнется через"},xMe={week_one:"{{count}} неделю",week_few:"{{count}} недели",week_many:"{{count}} недель",day_one:"{{count}} день",day_few:"{{count}} дня",day_many:"{{count}} дней",hour_one:"{{count}} час",hour_few:"{{count}} часа",hour_many:"{{count}} часов",minute_one:"{{count}} минуту",minute_few:"{{count}} минуты",minute_many:"{{count}} минут",second_one:"{{count}} секунду",second_few:"{{count}} секунды",second_many:"{{count}} секунд",lessThanMinute:"меньше минуты",started:"началось"},SMe={modal:LEe,settingsPage:PEe,DiskFileShared:$Ee,DiskFileCommented:zEe,DiskFileMentioned:FEe,DiskFileUploaded:BEe,DiskFileUploadedBlocked:HEe,DiskFileUploadedError:qEe,DiskLinkGenerated:UEe,DiskLinkGeneratedError:VEe,DiskDirectoryShared:WEe,DiskRoomShared:YEe,ProjectShared:GEe,ProjectTaskCreated:KEe,ProjectTaskDeleted:ZEe,ProjectTaskUpdated:JEe,ProjectTaskMoved:XEe,ProjectTaskStatusChanged:QEe,ProjectTaskCommented:eMe,ProjectMyTaskDeleted:tMe,ProjectMyTaskUpdated:nMe,ProjectMyTaskMoved:rMe,ProjectMyTaskStatusChanged:sMe,ProjectMyTaskCommented:iMe,ProjectTaskUnassigned:oMe,ProjectTaskAssigned:aMe,ProjectTaskMentioned:lMe,ProjectTaskAttachmentAdded:cMe,ProjectSprintCreated:uMe,AdminRoleAssigned:dMe,AdminRoleDeleted:fMe,MailMessageImportant:pMe,MailMessageReceived:hMe,CalendarShared:mMe,CalendarEventCanceled:gMe,CalendarEventInvited:vMe,CalendarEventUpdated:yMe,CalendarEventUpcoming:bMe,duration:xMe},wMe={title:"Notifications",tabs:{all:"All",unread:"Unread"},groups:{new:"New",older:"Received earlier"},empty:{title:"No new notifications",description:"All important notifications from {{serviceName}} services are collected here"},emptyUnread:{title:"No unread notifications",description:"Here are displayed unread notifications from {{serviceName}} services"},allAsReadButton:"Mark all as read",archiveButton:"All notifications",settingsButton:"Notification Settings"},CMe={title:"Notification Settings",modules:{admin:{roleChange:"Group Change",login:"Login from Another Device"},project:{taskChange:"Task Changes in Sprint",assignedTaskChanged:"Assigned Task Changes",taskAssign:"Task Assignment",commentMention:"Mention in Comments",projectAccess:"Project Access Granted",newSprint:"New Sprint Created"}}},EMe={title:"File Access Changed",description:"<strong>{{actor}}</strong> changed access settings for the file <strong>«{{action.subject}}»</strong>.<br />Current access level: <strong>«{{action.accessType.title}}»</strong>."},MMe={title:"New Comment on File",description:"<strong>{{actor}}</strong> left a new comment on the file <strong>«{{action.subject}}»</strong>."},DMe={title:"You've Been Mentioned",description:"<strong>{{actor}}</strong> mentioned you in a comment on the file <strong>«{{action.subject}}»</strong>."},kMe={title:"File Uploaded",description:"The file <strong>«{{action.subject}}»</strong> has been uploaded and checked successfully."},TMe={title:"File Upload Blocked",description:"The file <strong>«{{action.subject}}»</strong> was blocked by DLP policy."},AMe={title:"File Upload Error",description:"An error occurred while checking the file <strong>«{{action.subject}}»</strong>."},_Me={title:"File link generated",description:'Your file <strong>«{{action.subject}}»</strong> has been successfully validated. <a href="{{action.externalLinkUrl}}" target="_blank" rel="noopener noreferrer">Link</a>'},OMe={title:"Failed to generate file link",description:"Your file <strong>«{{action.subject}}»</strong> didn't pass validation. Try again."},RMe={title:"Folder Access Changed",description:"<strong>{{actor}}</strong> changed access settings for the folder <strong>«{{action.subject}}»</strong>. Current access level: <strong>«{{action.accessType.title}}»</strong>."},NMe={title:"Access Granted to Room",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the room <strong>«{{action.subject}}»</strong>."},jMe={title:"Access Granted to Project",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the project <strong>«{{action.subject}}»</strong>."},IMe={title:"New Task Created",description:"<strong>{{actor}}</strong> created a new task <strong>«{{action.title}}»</strong>."},LMe={title:"Task Deleted",description:"The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>."},PMe={title:"Task Details Updated",description:"<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>."},$Me={title:"Task Moved",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>."},zMe={title:"Task Status Changed",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>."},FMe={title:"New Comment on Task",description:"<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>."},BMe={title:"Task Deleted",description:"The task <strong>«{{action.title}}»</strong> was deleted by <strong>{{actor}}</strong>."},HMe={title:"Task Details Updated",description:"<strong>{{actor}}</strong> updated the task <strong>«{{action.title}}»</strong>."},qMe={title:"Task Moved",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.movedTo}}»</strong>."},UMe={title:"Task Status Changed",description:"<strong>{{actor}}</strong> moved the task <strong>«{{action.title}}»</strong> to <strong>«{{action.status}}»</strong>."},VMe={title:"New Comment on Task",description:"<strong>{{actor}}</strong> left a new comment on the task <strong>«{{action.title}}»</strong>."},WMe={title:"Unassigned from Task",description:"<strong>{{actor}}</strong> unassigned you from the task <strong>«{{action.title}}»</strong>."},YMe={title:"Assigned a Task",description:"<strong>{{actor}}</strong> assigned you to the task <strong>«{{action.title}}»</strong>."},GMe={title:"You've Been Mentioned",description:"<strong>{{actor}}</strong> mentioned you in a comment on the task <strong>«{{action.title}}»</strong>."},KMe={title:"New Attachment in Task",description:"<strong>{{actor}}</strong> added a new attachment to the task <strong>«{{action.title}}»</strong>."},ZMe={title:"New Sprint Created",description:"A new sprint <strong>«{{action.subject}}»</strong> has been created in the project <strong>«{{action.project}}»</strong>."},JMe={title:"Assigned to a New Group",description:"You have been assigned to the group <strong>«{{action.subject}}»</strong> in <strong>«{{action.customerName}}»</strong>."},XMe={title:"Group Has Been Removed",description:"You have been removed from the <strong>«{{action.subject}}»</strong> group in <strong>«{{action.customerName}}»</strong>."},QMe={title:'Message with "Important" Tag',description:'<strong>{{actor}}</strong> sent a new message tagged as "Important"'},eDe={title:"New Message",description:"<strong>{{actor}}</strong> sent a new message"},tDe={title:"Access Granted to Calendar",description:"You now have <strong>«{{action.accessType.title}}»</strong> access to the calendar <strong>«{{action.subject}}»</strong>."},nDe={title:"Event Canceled",description:"The event <strong>«{{action.title}}»</strong> was canceled by <strong>{{actor}}</strong>."},rDe={title:"Invite to Event",description:"<strong>{{actor}}</strong> invited you to the event <strong>«{{action.title}}»</strong>."},sDe={title:"Event Details Updated",description:"<strong>{{actor}}</strong> updated the event <strong>«{{action.title}}»</strong>."},iDe={title:"Upcoming Event",description:"Event <strong>«{{action.title, defaultValue(fallback: Untitled)}}»</strong> {{action.timeUntilStart, eventStatusDescription}}.",started:"started",willStartIn:"will start in"},oDe={week_one:"{{count}} week",week_other:"{{count}} weeks",day_one:"{{count}} day",day_other:"{{count}} days",hour_one:"{{count}} hour",hour_other:"{{count}} hours",minute_one:"{{count}} minute",minute_other:"{{count}} minutes",second_one:"{{count}} second",second_other:"{{count}} seconds",lessThanMinute:"less than a minute",started:"started"},aDe={modal:wMe,settingsPage:CMe,DiskFileShared:EMe,DiskFileCommented:MMe,DiskFileMentioned:DMe,DiskFileUploaded:kMe,DiskFileUploadedBlocked:TMe,DiskFileUploadedError:AMe,DiskLinkGenerated:_Me,DiskLinkGeneratedError:OMe,DiskDirectoryShared:RMe,DiskRoomShared:NMe,ProjectShared:jMe,ProjectTaskCreated:IMe,ProjectTaskDeleted:LMe,ProjectTaskUpdated:PMe,ProjectTaskMoved:$Me,ProjectTaskStatusChanged:zMe,ProjectTaskCommented:FMe,ProjectMyTaskDeleted:BMe,ProjectMyTaskUpdated:HMe,ProjectMyTaskMoved:qMe,ProjectMyTaskStatusChanged:UMe,ProjectMyTaskCommented:VMe,ProjectTaskUnassigned:WMe,ProjectTaskAssigned:YMe,ProjectTaskMentioned:GMe,ProjectTaskAttachmentAdded:KMe,ProjectSprintCreated:ZMe,AdminRoleAssigned:JMe,AdminRoleDeleted:XMe,MailMessageImportant:QMe,MailMessageReceived:eDe,CalendarShared:tDe,CalendarEventCanceled:nDe,CalendarEventInvited:rDe,CalendarEventUpdated:sDe,CalendarEventUpcoming:iDe,duration:oDe},lDe="Неизвестно",cDe={Off:"Отключено",All:"Все модули",Self:"Этот модуль"},uDe={Deny:"Запретить",OnlyUpload:"Только загрузка",FreeBusy:"Свободен/Занят",CanDownload:"Можно скачать",Read:"Чтение",Comment:"Комментировать",Review:"Рецензировать",Write:"Запись",Delete:"Удалить",FullInternal:"Полный внутренний",Full:"Полный",Lock:"Заблокировать",LockPrint:"Заблокировать печать",LockCopy:"Заблокировать копирование",LockDownload:"Заблокировать скачивание"},dDe={System:"Система",Disk:"Диск",Projects:"Проекты",Calendar:"Календарь",Mail:"Почта",Contacts:"Контакты",Admin:"Управление"},fDe={RoleChange:"Изменения ролей",Login:"Авторизация с другого устройства",TaskChange:"Изменения задач в спринте",AssignedTaskChange:"Изменения задач назначенных на тебя",TaskAssign:"Назначение на задачу",CommentMention:"Упоминание в комментариях",ProjectAccess:"Выдача доступа к проекту",SprintCreated:"Новый спринт создан",NewMessage:"Новое входящее сообщение",ReplyToImportantMessage:"Ответ на важное сообщение",DiskCommentMention:"Упоминание в комментариях",DiskAccess:"Выдача доступа",DiskFull:"Заканчивается место на диске",AvailableDocumentChange:"Изменения доступным мне документов",MyDocumentChange:"Изменения моих документов",UpcomingEvent:"Уведомление о предстоящем событии",EventInvite:"Приглашение в событие",EventChange:"Изменение событий в твоем календаре или где ты участник",SharedEventChange:"Изменение событий в пошареных тебе календарях",CalendarShared:"Выдача доступа к каленадрю"},pDe={Completed:"Завершено",Blocked:"Заблокировано",Error:"Ошибка"},hDe={unknown:lDe,notificationSetting:cDe,accessType:uDe,module:dDe,notificationSettingType:fDe,fileUploadStatus:pDe},mDe="Unknown",gDe={Off:"Off",All:"All modules",Self:"This module"},vDe={Deny:"Deny",OnlyUpload:"Upload Only",FreeBusy:"Free/Busy",CanDownload:"Can Download",Read:"Read",Comment:"Comment",Review:"Review",Write:"Write",Delete:"Delete",FullInternal:"Full Internal",Full:"Full",Lock:"Lock",LockPrint:"Lock Print",LockCopy:"Lock Copy",LockDownload:"Lock Download"},yDe={System:"System",Disk:"Disk",Projects:"Projects",Calendar:"Calendar",Mail:"Mail",Contacts:"Contacts",Admin:"Admin"},bDe={Completed:"Completed",Blocked:"Blocked",Error:"Error"},xDe={unknown:mDe,notificationSetting:gDe,accessType:vDe,module:yDe,fileUploadStatus:bDe},SDe={actions:{addToContacts:{inContacts:"Личные",add:"Добавить",organization:"Организация"}}},wDe={card:SDe},CDe={actions:{addToContacts:{inContacts:"Personal",add:"Add",organization:"Organization"}}},EDe={card:CDe},MDe={ru:{notifications:SMe,dictionary:hDe,contact:wDe},en:{notifications:aDe,dictionary:xDe,contact:EDe}},DDe={type:"3rdParty",init(t){setTimeout(()=>{try{let e=null;if(t.resourceStore&&t.resourceStore.addResourceBundle?e=t.resourceStore.addResourceBundle.bind(t.resourceStore):t.addResourceBundle&&(e=t.addResourceBundle.bind(t)),!e){console.error("No resource add method available");return}Object.entries(MDe).forEach(([n,r])=>{e(n,"ds",r,!0,!0)})}catch(e){console.error("Failed to add UI Kit translations:",e)}},100)}},kDe={type:"formatter",init(t){var e;try{(e=t==null?void 0:t.services)!=null&&e.formatter&&(t.services.formatter.add("duration",n=>Fne(n,t==null?void 0:t.t)),t.services.formatter.add("upper",n=>n&&n.toUpperCase()),t.services.formatter.add("defaultValue",(n,r,s)=>Wwe(n,s)),t.services.formatter.add("eventStatusDescription",n=>Ywe(n,t==null?void 0:t.t)))}catch(n){console.error("Failed to register UI Kit formatters:",n)}}},TDe={type:"3rdParty",init(t){DDe.init(t),kDe.init(t)}},ADe=JSON.parse(`{"translation":{"documentTitle":"R7-Calendar","buttons":{"save":"Save","cancel":"Cancel","add":"Add","create":"Create","otherParams":"Other parameters","createEvent":"Create event","clear":"Clear","delete":"Delete","cancelAndDelete":"Cancel and Delete","edit":"Edit","change":"Change","apply":"Apply","today":"Today","calendars":"Calendars","allDay":"All day","loadFile":"Load file","showMore":"Show more","hide":"Hide","changeOwner":"Change owner","more":"More","update":"Update","thisDay":"In this day","startTime":"When the event starts","for":"for","For":"For","in":"in","print":"Print","loadMore":"Load more"},"notifications":{"beforeEvent":"in","notification":"Notification","onMail":"On mail","letter":"letter","addNotification":"Add notification","validation":{"typeRequired":"Type is required","intervalTypeRequired":"Interval type is required","intervalCountRange":"Interval value must be between {{min}} and {{max}}","selectTime":"Select time"}},"recurringEvents":{"edit":"Edit","oneEvent":"One event","thisAndNext":"This and next","allRecurring":"All recurring"},"errorPage":{"title":"Something went wrong","description":"The page you are trying to open does not exist. It may have been moved or it doesn't exist at all","returnToHome":"Return to home"},"timezoneModal":{"title":"Timezone","dontAskAgain":"Don't ask again","changeTo":"Change timezone to","settings":"Settings","no":"No","yes":"Yes"},"eventStatus":{"canceled":"Canceled"},"eventDetails":{"author":"Author","yourAnswer":"Your answer","withoutCategory":"Without category","giveAccess":"Give access to users","restrictAccess":"Restrict access","setupAccess":"Set up access","filesAccess":{"read":"Read","comment":"Comment","write":"Write","full":"Full access"},"pluralGuests":{"one":"guest","few":"guests","other":"guests"},"answers":{"0":"Not going","1":"Yes","2":"No","3":"Go on all","4":"Maybe"},"private":"Private","allDay":"All day","until":"Until"},"calendarViews":{"month":"Month","workingWeek":"Working week","week":"Week","day":"Day","year":"Year","schedule":"Agenda"},"copyrightModal":{"firstParagraph":"R7-Office is a cross-platform package of applications for working with office documents.","secondParagraph":"Included in the unified registry of Russian programs for computers and databases.","thirdParagraph":"Available in cloud, local and mobile versions, supports deployment in a private cloud and many solutions for working together.","button":"Read more on the site","rights":"© R7. All rights reserved"},"navBar":{"myCalendars":"My calendars","otherCalendars":"Other calendars"},"calendarOptions":{"showOnlyThis":"Display this only","hideFromList":"Hide from list","restoreToList":"Restore to list","settings":"Settings","clear":"Clear","delete":"Delete"},"validations":{"calendarName":"At least 2 characters and no more than 50","categoryName":"Category name must contain from 2 to 50 characters.","login":"This field is required","password":"This field is required","descriptionLengthError":{"title":"Maximum length exceeded","message":"Content exceeds the maximum allowed length. Please shorten your content."}},"feedBacks":{"nothingFound":"Nothing found","search":"Search","addContact":"Add contact","copied":"Copied","contactNotFound":"Contact not found","notValidEmail":"Not valid email"},"placeholders":{"location":"Enter location","search":"Search","description":"Description","selectCategory":"Select category","organizer":"Organizer","defaultEventTitle":"(No title)","newOwner":"New Owner","myCalendar":"My calendar"},"settings":{"title":"Settings","navBar":{"general":"General","myCalendars":"Settings of my calendars","otherCalendars":"Settings of other calendars","printCalendar":"Print calendar","print":"Print"},"generalSettings":{"timeZoneSection":{"label":"Time zones","mainTimeZoneLabel":"Main time zone","timezoneInfo":"Affects the displayed time across all modules","description":"The main time zone can be changed from the profile.","showAdditionalTimeZoneLabel":"Show additional time zone","additionalTimeZonesLabel":"Additional time zone","askAboutTimeZone":"Ask about time zone mismatch"},"categorySection":{"label":"Categories","action":"Add category","emptyState":"There are no categories to display","categoryModal":{"editCategory":"Edit category","categoryName":"Category name"}},"appearanceSection":{"label":"Appearance","description":"Reduce event brightness"}},"calendarSettings":{"calendarInputLabel":"Calendar name","calendarOwnerLabel":"Calendar owner","calendarColorLabel":"Calendar color","accessSettingsLabel":"Access settings","accessSettingsHolder":"Add users","accessOwner":"Owner","notifications":{"title":"Notifications","allDayNotificationsTitle":"Notifications for all-day events","simpleNotificationsTitle":"Default notifications for events in this calendar"},"clearCalendar":{"label":"Clear calendar","description":"When clearing the calendar, all events in this calendar will be deleted."},"deleteCalendar":{"label":"Delete calendar","description":"The calendar will be permanently deleted."}}},"eventSearch":{"table":{"date":"Date","calendar":"Calendar","time":"Time","name":"Name","itemMenu":{"edit":"Edit","delete":"Delete"}}},"errorBoundary":{"title":"Oops!","description":"Something went wrong","button":"Back to home"},"recurringModal":{"title":"Event replay","repeatWith":"Repeat at intervals","repeatTypes":{"day":{"1":"day","2":"days","3":"days"},"week":{"1":"week","2":"weeks","3":"weeks"},"month":{"1":"month","2":"months","3":"months"},"year":{"1":"year","2":"years","3":"years"}},"radioGroup":{"label":"Ends","repeats":{"1":"repeat","2":"repeats"},"variants":{"never":"Never","date":"Date","after":"After"}},"weekVariant":{"label":"Repeat days","weekDays":["Mn","Tu","We","Th","Fr","Sa","Su"]},"monthVariant":{"lastMonthDay":"Last day of month","dateNumber":"of the month"}},"recurringActions":{"labels":{"moved":"Edit recurring event","deleted":"Delete recurring event","applyParticipants":"Answer on recurring event"},"options":{"thisEvent":"This event","thisAndNext":"This and next events","allSeries":"All series"}},"notesActions":{"title":"Add note","edit":"Edit note","placeholder":"Add note","willBe":"Will you come?","options":{"yes":"Yes","no":"No","mayBe":"Maybe","noAnswer":"No answer"}},"eventList":{"noEvents":"No events","loading":"Loading..."},"permissionsOptionsLabels":{"label":"Permissions for guests","read":"Read","write":"Edit","full":"Full access","freeBusy":"Free busy"},"freeBusy":{"free":"Free","busy":"Busy","freeMessage":"Free","who_created":"Who created"},"confirmations":{"eventDelete":{"label":"Event delete","description":"The event will be permanently deleted."},"eventCancelAndDelete":{"label":"Cancel and delete event","description":"The event will be permanently deleted and marked as canceled for all guests."},"resetTimeZone":{"label":"Reset timezone","description":"You want to reset the event time zone to the time zone"},"addToAddressBook":{"label":"Add to address book","description":"Add the entered address to the address book."},"categoryDelete":{"label":"Category delete","description":"The category will be permanently deleted. All events in this category will also be deleted."},"organizatorDelete":{"label":"Delete organizer","description":"Are you sure you want to remove the organizer from the event?"}},"fileModal":{"title":"Upload","description":"Drag and drop files here or click to select files","info":"Max file size","sizeType":"MB","error":"File was not uploaded","errorMessageInvalidType":"File «{{fileName}}» has unsupported extension","errorMessageTooLarge":"File «{{fileName}}» exceeds maximum size of {{maxSizeMb}} MB"},"fullEventPage":{"createLabel":"Create event","shortCreateLabel":"Create","editLabel":"Edit event","shortEditLabel":"Edit","cloneLabel":"Clone event","shortCloneLabel":"Clone","namePlaceholder":"Event name","repeats":"Repeat","noFilesInEvent":"No files in event","filePermissionsSettings":"File permissions settings","deleteAttachments":"Delete attachments","doubleNot":"Duplicate notification","noteForms":{"minuteError":"Allowed value: from {{min}} to {{max}} minutes","dayError":"Allowed value: from {{min}} to {{max}} days","hourError":"Allowed value: from {{min}} to {{max}} hours","weekError":"Allowed value: from {{min}} to {{max}} weeks","allDayTimeError":"Select a time"},"repeatTypes":{"daily":"Every day","weekly":"Every week","monthly":"Every month","yearly":"Every year","week":"week","month":"month","year":"year","until":"until","onWeekends":"on weekends","onWorkingDays":"on working days","allDays":"all days","everyDay":"Every","everyWeek":"Every","everyMonth":"Every","everyYear":"Every","everyMonthLastDay":"Monthly, last day of the month","day":"day","lastDay":"Last day","declinations":{"1":"st","2":"nd","3":"rd","4":"th","init":"last"},"weekDays":{"Mn":"Mn","Tu":"Tu","We":"We","Th":"Th","Fr":"Fr","Sa":"Sa","Su":"Su"},"fullWeekDays":{"Mn":"Monday","Tu":"Tuesday","We":"Wednesday","Th":"Thursday","Fr":"Friday","Sa":"Saturday","Su":"Sunday"},"plurals":{"one":"time","other":"times","zero":"times"}},"labels":{"startCalendar":"Start","endCalendar":"End","repeat":"Repeat","place":"Place","calendar":"Calendar","category":"Category","attachments":"Attachments","timezone":"Timezone","availability":"Availability"},"recurringOptions":{"dontRepeat":"Don't repeat","daily":"By days","weekly":"By weeks","monthly":"By months","yearly":"By years"},"sections":{"eventSettings":"Event settings","guests":"Guests","cooperativeCalendar":"Cooperative calendar"}},"timeIndicators":{"minutes":"minutes","minutes_one":"minute","minutes_few":"minutes","minutes_many":"minutes","minutes_accusative":"minute","hours":"hours","hours_one":"hour","hours_few":"hours","hours_many":"hours","days":"days","days_one":"day","days_few":"days","days_many":"days","weeks":"weeks","weeks_one":"week","weeks_few":"weeks","weeks_many":"weeks"},"eventOptions":{"print":"Print","createCopy":"Create copy","changeOwner":"Change owner","delete":"Delete"},"errorsCatch":{"title":"Error","default":"Unknown error, please try again later.","serverErrors":{"unauthorized":"-","unauthorizedPublic":"-","forbidden":"-","forbiddenPublic":"-","badRequest":"-","notFound":"-","internalServerError":"-","badGateway":"-","serviceUnavailable":"-","gatewayTimeout":"-","networkAuthenticationRequired":"-","tooManyRequests":"-","notAcceptable":"-","notAcceptablePublic":"-"},"otherErrors":{"noRights":"You don't have permission to edit","eventNotFound":"Event not found"},"errorPage":{"title":"Something went wrong","description_500":"Try reloading the page or come back later","description_404":"The page you are trying to open does not exist. You may have made a mistake in the address or the page has been moved to a different URL"}},"warning":{"title":"Warning","message_access":"You do not have permission to edit this event","message_access_delete":"You do not have permission to delete this event","message_access_file":"Current permissions of users and groups differ, new settings will be applied to all files and users"},"userMenuItems":{"main":"Home","profile":"Profile","subscribe":"Subscribe","download":"Download","report":"Report a bug","logout":"Logout"},"successMessages":{"title":"Success","eventCreated":"Event created","eventEdited":"Event edited","eventCopied":"Event copied","eventDeleted":"Event deleted","calendarCleared":"Calendar cleared","deleted":"Deleted","moved":"Moved","edited":"Edited","answerSaved":"Answer saved","materialsAdded":"Materials added","materialsDeleted":"Materials deleted","ownerChanged":"Owner changed","timeZoneChanged":"Time zone changed","contactAdded":"Contact added","accessSettingsEdited":"Access settings edited","fileUploaded":"File «{{fileName}}» has been successfully uploaded","fileNotUploaded":"File «{{fileName}}» has not been added","categoryEdited":"Category edited","categoryCreated":"Category created","categoryDeleted":"Category deleted","calendarDeleted":"Calendar deleted","calendarEdited":"Calendar edited","calendarAdded":"Calendar added","calendarHidden":"Calendar hidden from list","calendarRestored":"Calendar restored to list","settingSaved":"Setting saved","reduceEventBrightnessChanged":"Event brightness changed"},"footer":{"text":"Works on P7-Office","agendaUntil":"Agenda until"},"timezones":{"Africa/Abidjan":"Abidjan","Africa/Algiers":"Algiers","Africa/Bissau":"Bissau","Africa/Cairo":"Cairo","Africa/Casablanca":"Casablanca","Africa/Ceuta":"Ceuta","Africa/El_Aaiun":"El Aaiun","Africa/Johannesburg":"Johannesburg","Africa/Juba":"Juba","Africa/Khartoum":"Khartoum","Africa/Lagos":"Lagos","Africa/Maputo":"Maputo","Africa/Monrovia":"Monrovia","Africa/Nairobi":"Nairobi","Africa/Ndjamena":"Ndjamena","Africa/Sao_Tome":"Sao Tome","Africa/Tripoli":"Tripoli","Africa/Tunis":"Tunis","Africa/Windhoek":"Windhoek","America/Adak":"Adak","America/Anchorage":"Anchorage","America/Araguaina":"Araguaina","America/Argentina/Buenos_Aires":"Buenos Aires","America/Argentina/Catamarca":"Catamarca","America/Argentina/Cordoba":"Cordoba","America/Argentina/Jujuy":"Jujuy","America/Argentina/La_Rioja":"La Rioja","America/Argentina/Mendoza":"Mendoza","America/Argentina/Rio_Gallegos":"Rio Gallegos","America/Argentina/Salta":"Salta","America/Argentina/San_Juan":"San Juan","America/Argentina/San_Luis":"San Luis","America/Argentina/Tucuman":"Tucuman","America/Argentina/Ushuaia":"Ushuaia","America/Asuncion":"Asuncion","America/Bahia":"Bahia","America/Bahia_Banderas":"Bahia Banderas","America/Barbados":"Barbados","America/Belem":"Belem","America/Belize":"Belize","America/Boa_Vista":"Boa Vista","America/Bogota":"Bogota","America/Boise":"Boise","America/Cambridge_Bay":"Cambridge Bay","America/Campo_Grande":"Campo Grande","America/Cancun":"Cancun","America/Caracas":"Caracas","America/Cayenne":"Cayenne","America/Chicago":"Chicago","America/Chihuahua":"Chihuahua","America/Ciudad_Juarez":"Ciudad Juarez","America/Costa_Rica":"Costa Rica","America/Cuiaba":"Cuiaba","America/Danmarkshavn":"Danmarkshavn","America/Dawson":"Dawson","America/Dawson_Creek":"Dawson Creek","America/Denver":"Denver","America/Detroit":"Detroit","America/Edmonton":"Edmonton","America/Eirunepe":"Eirunepe","America/El_Salvador":"El Salvador","America/Fort_Nelson":"Fort Nelson","America/Fortaleza":"Fortaleza","America/Glace_Bay":"Glace Bay","America/Goose_Bay":"Goose Bay","America/Grand_Turk":"Grand Turk","America/Guatemala":"Guatemala","America/Guayaquil":"Guayaquil","America/Guyana":"Guyana","America/Halifax":"Halifax","America/Havana":"Havana","America/Hermosillo":"Hermosillo","America/Indiana/Indianapolis":"Indianapolis","America/Indiana/Knox":"Knox","America/Indiana/Marengo":"Marengo","America/Indiana/Petersburg":"Petersburg","America/Indiana/Tell_City":"Tell City","America/Indiana/Vevay":"Vevay","America/Indiana/Vincennes":"Vincennes","America/Indiana/Winamac":"Winamac","America/Inuvik":"Inuvik","America/Iqaluit":"Iqaluit","America/Jamaica":"Jamaica","America/Juneau":"Juneau","America/Kentucky/Louisville":"Louisville","America/Kentucky/Monticello":"Monticello","America/La_Paz":"La Paz","America/Lima":"Lima","America/Los_Angeles":"Los Angeles","America/Maceio":"Maceio","America/Managua":"Managua","America/Manaus":"Manaus","America/Martinique":"Martinique","America/Matamoros":"Matamoros","America/Mazatlan":"Mazatlan","America/Menominee":"Menominee","America/Merida":"Merida","America/Metlakatla":"Metlakatla","America/Mexico_City":"Mexico City","America/Miquelon":"Miquelon","America/Moncton":"Moncton","America/Monterrey":"Monterrey","America/Montevideo":"Montevideo","America/New_York":"New York","America/Nipigon":"Nipigon","America/Nome":"Nome","America/Noronha":"Noronha","America/North_Dakota/Beulah":"Beulah","America/North_Dakota/Center":"Center","America/North_Dakota/New_Salem":"New Salem","America/Nuuk":"Nuuk","America/Ojinaga":"Ojinaga","America/Panama":"Panama","America/Pangnirtung":"Pangnirtung","America/Paramaribo":"Paramaribo","America/Phoenix":"Phoenix","America/Port-au-Prince":"Port-au-Prince","America/Porto_Velho":"Porto Velho","America/Puerto_Rico":"Puerto Rico","America/Punta_Arenas":"Punta Arenas","America/Rainy_River":"Rainy River","America/Rankin_Inlet":"Rankin Inlet","America/Recife":"Recife","America/Regina":"Regina","America/Resolute":"Resolute","America/Rio_Branco":"Rio Branco","America/Santarem":"Santarem","America/Santiago":"Santiago","America/Santo_Domingo":"Santo Domingo","America/Sao_Paulo":"Sao Paulo","America/Scoresbysund":"Scoresbysund","America/Sitka":"Sitka","America/St_Johns":"St. Johns","America/Swift_Current":"Swift Current","America/Tegucigalpa":"Tegucigalpa","America/Thule":"Thule","America/Thunder_Bay":"Thunder Bay","America/Tijuana":"Tijuana","America/Toronto":"Toronto","America/Vancouver":"Vancouver","America/Whitehorse":"Whitehorse","America/Winnipeg":"Winnipeg","America/Yakutat":"Yakutat","America/Yellowknife":"Yellowknife","Antarctica/Casey":"Casey","Antarctica/Davis":"Davis","Antarctica/Macquarie":"Macquarie","Antarctica/Mawson":"Mawson","Antarctica/Palmer":"Palmer","Antarctica/Rothera":"Rothera","Antarctica/Troll":"Troll","Antarctica/Vostok":"Vostok","Asia/Almaty":"Almaty","Asia/Amman":"Amman","Asia/Anadyr":"Anadyr","Asia/Aqtau":"Aqtau","Asia/Aqtobe":"Aqtobe","Asia/Ashgabat":"Ashgabat","Asia/Atyrau":"Atyrau","Asia/Baghdad":"Baghdad","Asia/Baku":"Baku","Asia/Bangkok":"Bangkok","Asia/Barnaul":"Barnaul","Asia/Beirut":"Beirut","Asia/Bishkek":"Bishkek","Asia/Brunei":"Brunei","Asia/Chita":"Chita","Asia/Choibalsan":"Choibalsan","Asia/Colombo":"Colombo","Asia/Damascus":"Damascus","Asia/Dhaka":"Dhaka","Asia/Dili":"Dili","Asia/Dubai":"Dubai","Asia/Dushanbe":"Dushanbe","Asia/Famagusta":"Famagusta","Asia/Gaza":"Gaza","Asia/Hebron":"Hebron","Asia/Ho_Chi_Minh":"Ho Chi Minh","Asia/Hong_Kong":"Hong Kong","Asia/Hovd":"Hovd","Asia/Irkutsk":"Irkutsk","Asia/Jakarta":"Jakarta","Asia/Jayapura":"Jayapura","Asia/Jerusalem":"Jerusalem","Asia/Kabul":"Kabul","Asia/Kamchatka":"Kamchatka","Asia/Karachi":"Karachi","Asia/Kathmandu":"Kathmandu","Asia/Khandyga":"Khandyga","Asia/Kolkata":"Kolkata","Asia/Krasnoyarsk":"Krasnoyarsk","Asia/Kuala_Lumpur":"Kuala Lumpur","Asia/Kuching":"Kuching","Asia/Macau":"Macau","Asia/Magadan":"Magadan","Asia/Makassar":"Makassar","Asia/Manila":"Manila","Asia/Nicosia":"Nicosia","Asia/Novokuznetsk":"Novokuznetsk","Asia/Novosibirsk":"Novosibirsk","Asia/Omsk":"Omsk","Asia/Oral":"Oral","Asia/Pontianak":"Pontianak","Asia/Pyongyang":"Pyongyang","Asia/Qatar":"Qatar","Asia/Qostanay":"Qostanay","Asia/Qyzylorda":"Qyzylorda","Asia/Riyadh":"Riyadh","Asia/Sakhalin":"Sakhalin","Asia/Samarkand":"Samarkand","Asia/Seoul":"Seoul","Asia/Shanghai":"Shanghai","Asia/Singapore":"Singapore","Asia/Srednekolymsk":"Srednekolymsk","Asia/Taipei":"Taipei","Asia/Tashkent":"Tashkent","Asia/Tbilisi":"Tbilisi","Asia/Tehran":"Tehran","Asia/Thimphu":"Thimphu","Asia/Tokyo":"Tokyo","Asia/Tomsk":"Tomsk","Asia/Ulaanbaatar":"Ulaanbaatar","Asia/Urumqi":"Urumqi","Asia/Ust-Nera":"Ust-Nera","Asia/Vladivostok":"Vladivostok","Asia/Yakutsk":"Yakutsk","Asia/Yangon":"Yangon","Asia/Yekaterinburg":"Yekaterinburg","Asia/Yerevan":"Yerevan","Atlantic/Azores":"Azores","Atlantic/Bermuda":"Bermuda","Atlantic/Canary":"Canary Islands","Atlantic/Cape_Verde":"Cape Verde","Atlantic/Faroe":"Faroe Islands","Atlantic/Madeira":"Madeira","Atlantic/Reykjavik":"Reykjavik","Atlantic/South_Georgia":"South Georgia","Atlantic/Stanley":"Stanley","Australia/Adelaide":"Adelaide","Australia/Brisbane":"Brisbane","Australia/Broken_Hill":"Broken Hill","Australia/Darwin":"Darwin","Australia/Eucla":"Eucla","Australia/Hobart":"Hobart","Australia/Lindeman":"Lindeman","Australia/Lord_Howe":"Lord Howe","Australia/Melbourne":"Melbourne","Australia/Perth":"Perth","Australia/Sydney":"Sydney","Etc/UTC":"Coordinated Universal Time","Europe/Amsterdam":"Amsterdam","Europe/Andorra":"Andorra","Europe/Astrakhan":"Astrakhan","Europe/Athens":"Athens","Europe/Belgrade":"Belgrade","Europe/Berlin":"Berlin","Europe/Brussels":"Brussels","Europe/Bucharest":"Bucharest","Europe/Budapest":"Budapest","Europe/Chisinau":"Chisinau","Europe/Copenhagen":"Copenhagen","Europe/Dublin":"Dublin","Europe/Gibraltar":"Gibraltar","Europe/Helsinki":"Helsinki","Europe/Istanbul":"Istanbul","Europe/Kaliningrad":"Kaliningrad","Europe/Kyiv":"Kyiv","Europe/Kirov":"Kirov","Europe/Lisbon":"Lisbon","Europe/London":"London","Europe/Luxembourg":"Luxembourg","Europe/Madrid":"Madrid","Europe/Malta":"Malta","Europe/Minsk":"Minsk","Europe/Monaco":"Monaco","Europe/Moscow":"Moscow","Europe/Oslo":"Oslo","Europe/Paris":"Paris","Europe/Prague":"Prague","Europe/Riga":"Riga","Europe/Rome":"Rome","Europe/Samara":"Samara","Europe/Saratov":"Saratov","Europe/Simferopol":"Simferopol","Europe/Sofia":"Sofia","Europe/Stockholm":"Stockholm","Europe/Tallinn":"Tallinn","Europe/Tirane":"Tirana","Europe/Ulyanovsk":"Ulyanovsk","Europe/Vienna":"Vienna","Europe/Vilnius":"Vilnius","Europe/Volgograd":"Volgograd","Europe/Warsaw":"Warsaw","Europe/Zurich":"Zurich","Indian/Chagos":"Chagos","Indian/Christmas":"Christmas Island","Indian/Cocos":"Cocos Islands","Indian/Kerguelen":"Kerguelen","Indian/Mahe":"Mahe","Indian/Maldives":"Maldives","Indian/Mauritius":"Mauritius","Indian/Reunion":"Reunion","Pacific/Apia":"Apia","Pacific/Auckland":"Auckland","Pacific/Bougainville":"Bougainville","Pacific/Chatham":"Chatham","Pacific/Enderbury":"Enderbury","Pacific/Fakaofo":"Fakaofo","Pacific/Fiji":"Fiji","Pacific/Funafuti":"Funafuti","Pacific/Galapagos":"Galapagos","Pacific/Gambier":"Gambier","Pacific/Guadalcanal":"Guadalcanal","Pacific/Guam":"Guam","Pacific/Honolulu":"Honolulu","Pacific/Marquesas":"Marquesas","Pacific/Efate":"Efate","Pacific/Easter":"Easter Island","Pacific/Port_Moresby":"Port Moresby","Pacific/Noumea":"Noumea","Pacific/Chuuk":"Chuuk","Pacific/Pohnpei":"Pohnpei","Pacific/Majuro":"Majuro","Pacific/Kanton":"Kanton","Pacific/Kwajalein":"Kwajalein","Pacific/Johnston":"Johnston","Pacific/Kiritimati":"Kiritimati","Pacific/Kosrae":"Kosrae","Pacific/Nauru":"Nauru","Pacific/Niue":"Niue","Pacific/Norfolk":"Norfolk Island","Pacific/Pago_Pago":"Pago Pago","Pacific/Palau":"Palau","Pacific/Pitcairn":"Pitcairn Islands","Pacific/Rarotonga":"Rarotonga","Pacific/Saipan":"Saipan","Pacific/Tahiti":"Tahiti","Pacific/Tarawa":"Tarawa","Pacific/Tongatapu":"Tongatapu","Pacific/Wake":"Wake Island","Pacific/Wallis":"Wallis","Pacific/Whangarei":"Whangarei"},"printEvent":{"preview":"Print Preview","printRange":"Print Range","viewMode":"View Mode","autoView":"Automatic","orientation":"Orientation","landscape":"Landscape","portrait":"Portrait","colorStyle":"Color and Style","defaultStyle":"Default","contours":"Contours","blackWhite":"Black and White","timeRange":"Time Range","pages":"Total Pages:"},"appsMenu":{"links":"Links"}}}`),_De={en:ADe},ODe=JSON.parse('{"translation":{"documentTitle":"Р7-Календарь","buttons":{"save":"Сохранить","cancel":"Отмена","add":"Добавить","create":"Создать","otherParams":"Другие параметры","createEvent":"Создать событие","clear":"Очистить","delete":"Удалить","cancelAndDelete":"Отменить и удалить","edit":"Редактировать","change":"Изменить","apply":"Применить","today":"Сегодня","calendars":"Календари","allDay":"Весь день","loadFile":"Загрузить файл","showMore":"Показать подробнее","hide":"Скрыть","changeOwner":"Изменить владельца","more":"Еще","update":"Обновить","thisDay":"В этот же день","startTime":"Когда мероприятие начинается","for":"за","For":"За","in":"в","print":"Распечатать","loadMore":"Показать ещё"},"notifications":{"beforeEvent":"в","notification":"Уведомление","onMail":"Письмо на почту","letter":"письмом","addNotification":"Добавить уведомление","validation":{"typeRequired":"Тип обязателен","intervalTypeRequired":"Тип интервала обязателен","intervalCountRange":"Значение интервала должно быть от {{min}} до {{max}}","selectTime":"Выберите время"}},"recurringEvents":{"edit":"Редактировать","oneEvent":"Одно событие","thisAndNext":"Это событие и последующие","allRecurring":"Всю серию"},"errorPage":{"title":"Что-то пошло не так","description":"Страница, которую вы пытаетесь открыть, не существует. Возможно, вы ошиблись в адресе или страница была перемещена на другой URL","returnToHome":"Вернуться на главную"},"timezoneModal":{"title":"Часовой пояс","dontAskAgain":"Больше не спрашивать","changeTo":"Изменить часовой пояс на","settings":"Настройки","no":"Нет","yes":"Да"},"eventStatus":{"canceled":"Отменено"},"eventDetails":{"author":"Автор","yourAnswer":"Ваш ответ","withoutCategory":"Без категории","giveAccess":"Предоставить доступ пользователям","restrictAccess":"Не открывать доступ","setupAccess":"Настроить доступ","filesAccess":{"read":"Чтение","comment":"Комментирование","write":"Запись","full":"Полный доступ"},"pluralGuests":{"one":"гость","few":"гостя","other":"гостей"},"answers":{"0":"Не прийду","1":"Да","2":"Нет","3":"Пойду на все","4":"Возможно приду"},"private":"Частное","allDay":"Весь день","until":"До"},"calendarViews":{"month":"Месяц","workingWeek":"Рабочая неделя","week":"Неделя","day":"День","year":"Год","schedule":"Расписание"},"copyrightModal":{"firstParagraph":"Р7-Офис — российский кроссплатформенный пакет приложений для совместной работы с офисными документами.","secondParagraph":"Входит в единый реестр российских программ для ЭВМ и баз данных.","thirdParagraph":"Доступен в облачной, локальной и мобильной версиях, поддерживает развертывание в частном облаке и ряд решений для совместной работы.","button":"Узнать больше на сайте","rights":"© АО «Р7». Все права защищены"},"navBar":{"myCalendars":"Мои календари","otherCalendars":"Другие календари"},"calendarOptions":{"showOnlyThis":"Показать только этот","hideFromList":"Скрыть из списка","restoreToList":"Вернуть в список","settings":"Настройки","clear":"Очистить","delete":"Удалить"},"validations":{"calendarName":"Введите не менее 2-х символов и не более 50-ти","categoryName":"Название категории должно содержать от 2 до 50 символов.","login":"Поле обязательно для заполнения","password":"Поле обязательно для заполнения","descriptionLengthError":{"title":"Превышена максимальная длина текста","message":"Контент превышает максимально допустимую длину. Пожалуйста, сократите ваш контент."}},"feedBacks":{"nothingFound":"Ничего не найдено","search":"Поиск","addContact":"Добавить контакт","copied":"Скопировано","contactNotFound":"Контакт не найден","notValidEmail":"Почта не валидна"},"placeholders":{"location":"Укажите локацию","search":"Поиск","description":"Описание","selectCategory":"Выберите категорию","organizer":"Организатор","defaultEventTitle":"(Нет заголовка)","newOwner":"Новый владелец","myCalendar":"Мой календарь"},"settings":{"title":"Настройки","navBar":{"general":"Основное","myCalendars":"Настройки моих календарей","otherCalendars":"Настройки других календарей","printCalendar":"Печать календаря","print":"Распечатать"},"generalSettings":{"timeZoneSection":{"label":"Часовые пояса","mainTimeZoneLabel":"Часовой пояс","description":"Основной часовой пояс можно поменять из профиля.","timezoneInfo":"Влияет на отображаемое время по всем модулям","showAdditionalTimeZoneLabel":"Отображать дополнительный часовой пояс","additionalTimeZonesLabel":"Дополнительный часовой пояс","askAboutTimeZone":"Спрашивать при несовпадении с часовым поясом операционной системы"},"categorySection":{"label":"Категории","action":"Добавить категорию","emptyState":"Список категорий пуст","categoryModal":{"editCategory":"Редактировать категорию","categoryName":"Название категории"}},"appearanceSection":{"label":"Настройки внешнего вида","description":"Уменьшать яркость прошедших событий"}},"calendarSettings":{"calendarInputLabel":"Название календаря","calendarOwnerLabel":"Владелец календаря","calendarColorLabel":"Цвет календаря","accessSettingsLabel":"Настройки доступа","accessSettingsHolder":"Добавить пользователей","accessOwner":"Владелец","notifications":{"title":"Уведомления","allDayNotificationsTitle":"Уведомления для событий на весь день","simpleNotificationsTitle":"Уведомления по умолчанию для событий в этом календаре"},"clearCalendar":{"label":"Очистка календаря","description":"При очистке календаря будут удалены все события этого календаря."},"deleteCalendar":{"label":"Удаление календаря","description":"Календарь будет безвозвратно удален."}}},"eventSearch":{"table":{"date":"Дата","calendar":"Календарь","time":"Время","name":"Название","itemMenu":{"edit":"Редактировать","delete":"Удалить"}}},"errorBoundary":{"title":"Ой!","description":"Что-то пошло не так","button":"Вернуться на главную"},"recurringModal":{"title":"Повтор мероприятия","repeatWith":"Повторять с интервалом","repeatTypes":{"day":{"1":"день","2":"дня","3":"дней"},"week":{"1":"неделя","2":"недели","3":"недель"},"month":{"1":"месяц","2":"месяца","3":"месяцев"},"year":{"1":"год","2":"года","3":"лет"}},"radioGroup":{"label":"Окончание","repeats":{"1":"повтора","2":"повторов"},"variants":{"never":"Никогда","date":"Дата","after":"После"}},"weekVariant":{"label":"Дни повторения","weekDays":["Пн","Вт","Ср","Чт","Пт","Сб","Вс"]},"monthVariant":{"lastMonthDay":"Последний день месяца","dateNumber":"число"}},"recurringActions":{"labels":{"moved":"Изменение повторяющегося события","deleted":"Удаление повторяющегося события","applyParticipants":"Ответ на повторяющееся мероприятия"},"options":{"thisEvent":"Это событие","thisAndNext":"Это и последующие событие","allSeries":"Всю серию"}},"notesActions":{"title":"Добавить примечание","edit":"Редактировать примечание","placeholder":"Добавьте примечание","willBe":"Придете?","options":{"yes":"Да","no":"Нет","mayBe":"Возможно приду","noAnswer":"Нет ответа"}},"eventList":{"noEvents":"События отсутствуют","loading":"Загрузка..."},"permissionsOptionsLabels":{"label":"Разрешение для гостей","read":"Просмотр","write":"Редактирование","full":"Полный доступ","freeBusy":"Просмотр занятости"},"freeBusy":{"free":"Свободен","busy":"Занят","freeMessage":"Свободен/свободна","who_created":"Кто создал"},"confirmations":{"eventDelete":{"label":"Удаление события","description":"Событие будет безвозвратно удалено."},"eventCancelAndDelete":{"label":"Отмена и удаление события","description":"Событие будет безвозвратно удалено и помечено как отмененное для всех гостей."},"resetTimeZone":{"label":"Сброс часовых поясов","description":"Вы хотите сбросить часовой пояс события к поясу"},"addToAddressBook":{"label":"Добавление в адресную книгу","description":"Добавить введенный адрес в адресную книгу."},"categoryDelete":{"label":"Удаление категории","description":"В результате удаления категории, она удаляется так же у событий, в которые она была добавлена, но сами события не удаляются."},"organizatorDelete":{"label":"Удаление организатора","description":"Вы действительно хотите удалить организатора из события?"}},"fileModal":{"title":"Загрузить","description":"Перетащите файлы сюда или нажмите, чтобы выбрать файлы","info":"Максимальный размер каждого файла","sizeType":"Мб","error":"Файл не был загружен","errorMessageInvalidType":"Файл \\"{{fileName}}\\" имеет неподдерживаемое расширение","errorMessageTooLarge":"Файл \\"{{fileName}}\\" превышает максимальный допустимый размер {{maxSizeMb}} Мб"},"fullEventPage":{"createLabel":"Создание события","shortCreateLabel":"Создание","editLabel":"Редактирование события","shortEditLabel":"Редактирование","cloneLabel":"Копирование события","shortCloneLabel":"Копирование","namePlaceholder":"Название События","repeats":"Повторяется","noFilesInEvent":"В событии нет ваших файлов","filePermissionsSettings":"Настройка доступа к файлам","deleteAttachments":"Удалить вложение","doubleNot":"Дубликат уведомление","noteForms":{"minuteError":"Допустимое значение: от {{min}} до {{max}} минут","dayError":"Допустимое значение: от {{min}} до {{max}} дней","hourError":"Допустимое значение: от {{min}} до {{max}} часов","weekError":"Допустимое значение: от {{min}} до {{max}} недель","allDayTimeError":"Выберите время"},"repeatTypes":{"daily":"Ежедневно","weekly":"Еженедельно","monthly":"Ежемесячно","yearly":"Ежегодно","week":"неделю","month":"месяц","year":"год","until":"до","onWeekends":"по выходным дням","onWorkingDays":"по рабочим дням","allDays":"все дни","everyDay":"Каждый","everyWeek":"Каждую","everyMonth":"Каждый","everyYear":"Каждый","everyMonthLastDay":"Ежемесячно, последний день месяца","day":"день","lastDay":"Последний день","declinations":{"1":"ий","2":"яя","3":"ее","init":"последн"},"weekDays":{"Mn":"Пн","Tu":"Вт","We":"Ср","Th":"Чт","Fr":"Пт","Sa":"Сб","Su":"Вс"},"fullWeekDays":{"Mn":"Понедельник","Tu":"Вторник","We":"Среда","Th":"Четверг","Fr":"Пятница","Sa":"Суббота","Su":"Воскресенье"},"plurals":{"one":"раз","other":"раза","zero":"раз"}},"labels":{"startCalendar":"Начало","endCalendar":"Конец","repeat":"Повторение","place":"Место","calendar":"Календарь","category":"Категория","attachments":"Файлы","timezone":"Часовые пояса","availability":"Занятость"},"recurringOptions":{"dontRepeat":"Не повторять","daily":"По дням","weekly":"По неделям","monthly":"По месяцам","yearly":"По годам"},"sections":{"eventSettings":"Настройки события","guests":"Гости","cooperativeCalendar":"Совместный календарь"}},"timeIndicators":{"minutes":"минут","minutes_one":"минута","minutes_few":"минуты","minutes_many":"минут","minutes_accusative":"минуту","hours":"часов","hours_one":"час","hours_few":"часа","hours_many":"часов","days":"дней","days_one":"день","days_few":"дня","days_many":"дней","weeks":"недель","weeks_one":"неделю","weeks_few":"недели","weeks_many":"недель"},"eventOptions":{"print":"Распечатать","createCopy":"Создать копию","changeOwner":"Сменить владельца","delete":"Удалить"},"errorsCatch":{"title":"Ошибка","default":"Неизвестная ошибка, пожалуйста, повторите попытку позже.","serverErrors":{"unauthorized":"Отсутствует токен авторизации. Необходимо выполнить вход в систему заново.","unauthorizedPublic":"Неверное имя пользователя, пароль или код подразделения.","forbidden":"Учетная запись заблокирована.","forbiddenPublic":"Учетная запись заблокирована.","badRequest":"Неверный запрос. Пожалуйста, повторите попытку позже.","notFound":"Ресурс не найден. Пожалуйста, повторите попытку позже.","internalServerError":"Внутренняя ошибка сервера. Пожалуйста, повторите попытку позже.","badGateway":"Технические работы на сервере. Пожалуйста, повторите попытку позже.","serviceUnavailable":"Сервер недоступен. Пожалуйста, повторите попытку позже.","gatewayTimeout":"Сервер не отвечает. Пожалуйста, повторите попытку позже.","networkAuthenticationRequired":"Нет соединения с сервером. Пожалуйста, повторите попытку позже.","tooManyRequests":"Исчерпан лимит попыток.","notAcceptable":"Нет доступа к ресурсу.","notAcceptablePublic":"Неверное имя пользователя или пароль."},"otherErrors":{"noRights":"У вас нет прав для редактирования","eventNotFound":"Событие не найдено"},"errorPage":{"title":"Что-то пошло не так","description_500":"Попробуйте перезагрузить страницу или зайдите позже","description_404":"Страница, которую вы пытаетесь открыть не существует. Возможно, вы ошиблись в адресе или страница была перемещена на другой URL"}},"warning":{"title":"Предупреждение","message_access":"У вас нет прав для редактирования","message_access_delete":"У вас нет прав для удаления","message_access_file":"Текущие права пользователей к вложениям различаются, новые настройки будут применены ко всем перечисленным файлам и пользователям"},"userMenuItems":{"main":"Главная","profile":"Профиль","subscribe":"Подписка","download":"Скачать","report":"Сообщить об ошибке","logout":"Выйти"},"successMessages":{"title":"Успешно","eventCreated":"Событие создано","eventEdited":"Событие изменено","eventCopied":"Событие скопировано","eventDeleted":"Событие удалено","calendarCleared":"Календарь очищен","deleted":"Удалено","moved":"Перемещено","edited":"Изменено","answerSaved":"Ответ сохранен","materialsAdded":"Материалы добавлены","materialsDeleted":"Материалы удалены","ownerChanged":"Владелец события изменен","timeZoneChanged":"Часовой пояс изменен","contactAdded":"Контакт добавлен","accessSettingsEdited":"Настройки доступа изменены","fileUploaded":"Файл «{{fileName}}» успешно загружен","fileNotUploaded":"Файл «{{fileName}}» не был загружен","categoryEdited":"Категория изменена","categoryCreated":"Категория создана","categoryDeleted":"Категория удалена","calendarDeleted":"Календарь удален","calendarEdited":"Календарь изменен","calendarAdded":"Календарь добавлен","calendarHidden":"Календарь скрыт из списка","calendarRestored":"Календарь возвращён в список","settingSaved":"Настройка сохранена","reduceEventBrightnessChanged":"Яркость события изменена"},"footer":{"text":"Работает на Р7-Офис","agendaUntil":"Расписание до"},"timezones":{"Africa/Abidjan":"Абиджан","Africa/Algiers":"Алжир","Africa/Bissau":"Бисау","Africa/Cairo":"Каир","Africa/Casablanca":"Касабланка","Africa/Ceuta":"Сеута","Africa/El_Aaiun":"Эль-Аюн","Africa/Johannesburg":"Йоханнесбург","Africa/Juba":"Джуба","Africa/Khartoum":"Хартум","Africa/Lagos":"Лагос","Africa/Maputo":"Мапуту","Africa/Monrovia":"Монровия","Africa/Nairobi":"Найроби","Africa/Ndjamena":"Нджамена","Africa/Sao_Tome":"Сан-Томе","Africa/Tripoli":"Триполи","Africa/Tunis":"Тунис","Africa/Windhoek":"Виндхук","America/Adak":"Адак","America/Anchorage":"Анкоридж","America/Araguaina":"Арагуайна","America/Argentina/Buenos_Aires":"Буэнос-Айрес","America/Argentina/Catamarca":"Катамарка","America/Argentina/Cordoba":"Кордова","America/Argentina/Jujuy":"Жужуй","America/Argentina/La_Rioja":"Ла-Риоха","America/Argentina/Mendoza":"Мендоса","America/Argentina/Rio_Gallegos":"Рио-Гальегос","America/Argentina/Salta":"Сальта","America/Argentina/San_Juan":"Сан-Хуан","America/Argentina/San_Luis":"Сан-Луис","America/Argentina/Tucuman":"Тукуман","America/Argentina/Ushuaia":"Ушуая","America/Asuncion":"Асунсьон","America/Bahia":"Баия","America/Bahia_Banderas":"Баия-де-Бандерас","America/Barbados":"Барбадос","America/Belem":"Белен","America/Belize":"Белиз","America/Boa_Vista":"Боа-Виста","America/Bogota":"Богота","America/Boise":"Бойсе","America/Cambridge_Bay":"Кембридж-Бей","America/Campo_Grande":"Кампу-Гранди","America/Cancun":"Канкун","America/Caracas":"Каракас","America/Cayenne":"Кайенна","America/Chicago":"Чикаго","America/Chihuahua":"Чиуауа","America/Ciudad_Juarez":"Сьюдад-Хуарес","America/Costa_Rica":"Коста-Рика","America/Cuiaba":"Куяба","America/Danmarkshavn":"Данмарксхавн","America/Dawson":"Доусон","America/Dawson_Creek":"Доусон-Крик","America/Denver":"Денвер","America/Detroit":"Детройт","America/Edmonton":"Эдмонтон","America/Eirunepe":"Эйрунепе","America/El_Salvador":"Сальвадор","America/Fort_Nelson":"Форт-Нельсон","America/Fortaleza":"Форталеза","America/Glace_Bay":"Глейс-Бей","America/Goose_Bay":"Гус-Бей","America/Grand_Turk":"Гранд-Терк","America/Guatemala":"Гватемала","America/Guayaquil":"Гуаякиль","America/Guyana":"Гайана","America/Halifax":"Галифакс","America/Havana":"Гавана","America/Hermosillo":"Эрмосильо","America/Indiana/Indianapolis":"Индианаполис","America/Indiana/Knox":"Нокс","America/Indiana/Marengo":"Маренго","America/Indiana/Petersburg":"Петерсбург","America/Indiana/Tell_City":"Тэлл-Сити","America/Indiana/Vevay":"Вивей","America/Indiana/Vincennes":"Винсеннес","America/Indiana/Winamac":"Уинамак","America/Inuvik":"Инувик","America/Iqaluit":"Икалуит","America/Jamaica":"Ямайка","America/Juneau":"Джуно","America/Kentucky/Louisville":"Луисвилл","America/Kentucky/Monticello":"Монтечелло","America/La_Paz":"Ла-Пас","America/Lima":"Лима","America/Los_Angeles":"Лос-Анджелес","America/Maceio":"Масейо","America/Managua":"Манагуа","America/Manaus":"Манаус","America/Martinique":"Мартиника","America/Matamoros":"Матаморос","America/Mazatlan":"Масатлан","America/Menominee":"Меномини","America/Merida":"Мерида","America/Metlakatla":"Метлакатла","America/Mexico_City":"Мехико","America/Miquelon":"Микелон","America/Moncton":"Монктон","America/Monterrey":"Монтеррей","America/Montevideo":"Монтевидео","America/New_York":"Нью-Йорк","America/Nipigon":"Нипигон","America/Nome":"Ном","America/Noronha":"Норонья","America/North_Dakota/Beulah":"Бьюла","America/North_Dakota/Center":"Центр","America/North_Dakota/New_Salem":"Нью-Сейлем","America/Nuuk":"Нуук","America/Ojinaga":"Охинага","America/Panama":"Панама","America/Pangnirtung":"Пангниртанг","America/Paramaribo":"Парамарибо","America/Phoenix":"Финикс","America/Port-au-Prince":"Порт-о-Пренс","America/Porto_Velho":"Порту-Велью","America/Puerto_Rico":"Пуэрто-Рико","America/Punta_Arenas":"Пунта-Аренас","America/Rainy_River":"Рэйнривер","America/Rankin_Inlet":"Ранкин-Инлет","America/Recife":"Ресифи","America/Regina":"Реджайна","America/Resolute":"Резольют","America/Rio_Branco":"Рио-Бранко","America/Santarem":"Сантарем","America/Santiago":"Сантьяго","America/Santo_Domingo":"Санто-Доминго","America/Sao_Paulo":"Сан-Паулу","America/Scoresbysund":"Скорсбисунд","America/Sitka":"Ситка","America/St_Johns":"Сент-Джонс","America/Swift_Current":"Свифт-Каррент","America/Tegucigalpa":"Тегусигальпа","America/Thule":"Туле","America/Thunder_Bay":"Тандер-Бей","America/Tijuana":"Тихуана","America/Toronto":"Торонто","America/Vancouver":"Ванкувер","America/Whitehorse":"Уайтхорс","America/Winnipeg":"Виннипег","America/Yakutat":"Якутат","America/Yellowknife":"Йеллоунайф","Antarctica/Casey":"Кейси","Antarctica/Davis":"Дэвис","Antarctica/Macquarie":"Маккуори","Antarctica/Mawson":"Моусон","Antarctica/Palmer":"Палмер","Antarctica/Rothera":"Ротера","Antarctica/Troll":"Тролль","Antarctica/Vostok":"Восток","Asia/Almaty":"Алматы","Asia/Amman":"Амман","Asia/Anadyr":"Анадырь","Asia/Aqtau":"Актау","Asia/Aqtobe":"Актобе","Asia/Ashgabat":"Ашхабад","Asia/Atyrau":"Атырау","Asia/Baghdad":"Багдад","Asia/Baku":"Баку","Asia/Bangkok":"Бангкок","Asia/Barnaul":"Барнаул","Asia/Beirut":"Бейрут","Asia/Bishkek":"Бишкек","Asia/Brunei":"Бруней","Asia/Chita":"Чита","Asia/Choibalsan":"Чойбалсан","Asia/Colombo":"Коломбо","Asia/Damascus":"Дамаск","Asia/Dhaka":"Дакка","Asia/Dili":"Дили","Asia/Dubai":"Дубай","Asia/Dushanbe":"Душанбе","Asia/Famagusta":"Фамагуста","Asia/Gaza":"Газа","Asia/Hebron":"Хеврон","Asia/Ho_Chi_Minh":"Хошимин","Asia/Hong_Kong":"Гонконг","Asia/Hovd":"Ховд","Asia/Irkutsk":"Иркутск","Asia/Jakarta":"Джакарта","Asia/Jayapura":"Джаяпура","Asia/Jerusalem":"Иерусалим","Asia/Kabul":"Кабул","Asia/Kamchatka":"Камчатка","Asia/Karachi":"Карачи","Asia/Kathmandu":"Катманду","Asia/Khandyga":"Хандыга","Asia/Kolkata":"Калькутта","Asia/Krasnoyarsk":"Красноярск","Asia/Kuala_Lumpur":"Куала-Лумпур","Asia/Kuching":"Кучинг","Asia/Macau":"Макао","Asia/Magadan":"Магадан","Asia/Makassar":"Макассар","Asia/Manila":"Манила","Asia/Nicosia":"Никосия","Asia/Novokuznetsk":"Новокузнецк","Asia/Novosibirsk":"Новосибирск","Asia/Omsk":"Омск","Asia/Oral":"Орал","Asia/Pontianak":"Понтианак","Asia/Pyongyang":"Пхеньян","Asia/Qatar":"Катар","Asia/Qostanay":"Костанай","Asia/Qyzylorda":"Кызылорда","Asia/Riyadh":"Эр-Рияд","Asia/Sakhalin":"Сахалин","Asia/Samarkand":"Самарканд","Asia/Seoul":"Сеул","Asia/Shanghai":"Шанхай","Asia/Singapore":"Сингапур","Asia/Srednekolymsk":"Среднеколымск","Asia/Taipei":"Тайбэй","Asia/Tashkent":"Ташкент","Asia/Tbilisi":"Тбилиси","Asia/Tehran":"Тегеран","Asia/Thimphu":"Тхимпху","Asia/Tokyo":"Токио","Asia/Tomsk":"Томск","Asia/Ulaanbaatar":"Улан-Батор","Asia/Urumqi":"Урумчи","Asia/Ust-Nera":"Усть-Нера","Asia/Vladivostok":"Владивосток","Asia/Yakutsk":"Якутск","Asia/Yangon":"Янгон","Asia/Yekaterinburg":"Екатеринбург","Asia/Yerevan":"Ереван","Atlantic/Azores":"Азоры","Atlantic/Bermuda":"Бермуды","Atlantic/Canary":"Канары","Atlantic/Cape_Verde":"Кабо-Верде","Atlantic/Faroe":"Фареры","Atlantic/Madeira":"Мадейра","Atlantic/Reykjavik":"Рейкьявик","Atlantic/South_Georgia":"Южная Георгия","Atlantic/Stanley":"Стэнли","Australia/Adelaide":"Аделаида","Australia/Brisbane":"Брисбен","Australia/Broken_Hill":"Брокен-Хилл","Australia/Darwin":"Дарвин","Australia/Eucla":"Юкла","Australia/Hobart":"Хобарт","Australia/Lindeman":"Линдеман","Australia/Lord_Howe":"Лорд-Хау","Australia/Melbourne":"Мельбурн","Australia/Perth":"Перт","Australia/Sydney":"Сидней","Etc/UTC":"Всемирное координированное время","Europe/Amsterdam":"Амстердам","Europe/Andorra":"Андорра","Europe/Astrakhan":"Астрахань","Europe/Athens":"Афины","Europe/Belgrade":"Белград","Europe/Berlin":"Берлин","Europe/Brussels":"Брюссель","Europe/Bucharest":"Бухарест","Europe/Budapest":"Будапешт","Europe/Chisinau":"Кишинёв","Europe/Copenhagen":"Копенгаген","Europe/Dublin":"Дублин","Europe/Gibraltar":"Гибралтар","Europe/Helsinki":"Хельсинки","Europe/Istanbul":"Стамбул","Europe/Kaliningrad":"Калининград","Europe/Kyiv":"Киев","Europe/Kiyv":"Киев","Europe/Kirov":"Киров","Europe/Lisbon":"Лиссабон","Europe/London":"Лондон","Europe/Luxembourg":"Люксембург","Europe/Madrid":"Мадрид","Europe/Malta":"Мальта","Europe/Minsk":"Минск","Europe/Monaco":"Монако","Europe/Moscow":"Москва","Europe/Oslo":"Осло","Europe/Paris":"Париж","Europe/Prague":"Прага","Europe/Riga":"Рига","Europe/Rome":"Рим","Europe/Samara":"Самара","Europe/Saratov":"Саратов","Europe/Simferopol":"Симферополь","Europe/Sofia":"София","Europe/Stockholm":"Стокгольм","Europe/Tallinn":"Таллин","Europe/Tirane":"Тирана","Europe/Ulyanovsk":"Ульяновск","Europe/Vienna":"Вена","Europe/Vilnius":"Вильнюс","Europe/Volgograd":"Волгоград","Europe/Warsaw":"Варшава","Europe/Zurich":"Цюрих","Indian/Chagos":"Чагос","Indian/Christmas":"Рождество","Indian/Cocos":"Кокосовые острова","Indian/Kerguelen":"Кергелен","Indian/Mahe":"Маэ","Indian/Maldives":"Мальдивы","Indian/Mauritius":"Маврикий","Indian/Reunion":"Реюньон","Pacific/Apia":"Апиа","Pacific/Auckland":"Окленд","Pacific/Bougainville":"Бугенвиль","Pacific/Chatham":"Чатем","Pacific/Enderbury":"Эндербери","Pacific/Fakaofo":"Факаофо","Pacific/Fiji":"Фиджи","Pacific/Funafuti":"Фунафути","Pacific/Galapagos":"Галапагос","Pacific/Gambier":"Гамбиер","Pacific/Guadalcanal":"Гуадалканал","Pacific/Guam":"Гуам","Pacific/Honolulu":"Гаваи","Pacific/Marquesas":"Маркезас","Pacific/Porto_Velho":"Порту-Велью","Pacific/Efate":"Эфат","Pacific/Easter":"Эстер","Pacific/Port_Moresby":"Порт Морсби","Pacific/Noumea":"Нумеа","Pacific/Chuuk":"Чуук","Pacific/Pohnpei":"Понпеи","Pacific/Majuro":"Маджуро","Pacific/Kanton":"Кантон","Pacific/Kwajalein":"Квайалайин","Pacific/Johnston":"Джонстон","Pacific/Kiritimati":"Киритимати","Pacific/Kosrae":"Косрей","Pacific/Nauru":"Науру","Pacific/Niue":"Ниуэ","Pacific/Norfolk":"Норфолк","Pacific/Pago_Pago":"Пагопаго","Pacific/Palau":"Палау","Pacific/Pitcairn":"Питкерн","Pacific/Rarotonga":"Раротонга","Pacific/Saipan":"Сайпан","Pacific/Tahiti":"Таити","Pacific/Tarawa":"Тарава","Pacific/Tongatapu":"Тонгатапу","Pacific/Wake":"Уэйк","Pacific/Wallis":"Уоллис","Pacific/Whangarei":"Фангарею"},"printEvent":{"preview":"Предварительный просмотр печати","printRange":"Диапазон печати","viewMode":"Режим просмотра","autoView":"Автоматически","orientation":"Ориентация","landscape":"Альбомная","portrait":"Книжная","colorStyle":"Цвет и стиль","defaultStyle":"По умолчанию","contours":"Контуры","blackWhite":"Черно-белая печать","timeRange":"Диапазон времени","pages":"Всего страниц:"},"appsMenu":{"links":"Ссылки"}}}'),RDe={ru:ODe};Ln.use(oSe).use(TDe).init({resources:{..._De,...RDe},lng:"ru",fallbackLng:"ru",interpolation:{escapeValue:!1}});const NDe="modulepreload",jDe=function(t){return"/"+t},KH={},of=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=o(n.map(c=>{if(c=jDe(c),c in KH)return;KH[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":NDe,d||(p.as="script"),p.crossOrigin="",p.href=c,l&&p.setAttribute("nonce",l),document.head.appendChild(p),d)return new Promise((m,v)=>{p.addEventListener("load",m),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return e().catch(i)})};var s4={exports:{}},i4={};/**
 * @license React
 * react-compiler-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ZH;function IDe(){if(ZH)return i4;ZH=1;var t=vi().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return i4.c=function(e){return t.H.useMemoCache(e)},i4}var JH;function LDe(){return JH||(JH=1,s4.exports=IDe()),s4.exports}var Ve=LDe();function Oi(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var PDe=typeof Symbol=="function"&&Symbol.observable||"@@observable",XH=PDe,o4=()=>Math.random().toString(36).substring(7).split("").join("."),$De={INIT:`@@redux/INIT${o4()}`,REPLACE:`@@redux/REPLACE${o4()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o4()}`},Xk=$De;function Q8(t){if(typeof t!="object"||t===null)return!1;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e||Object.getPrototypeOf(t)===null}function ere(t,e,n){if(typeof t!="function")throw new Error(Oi(2));if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Oi(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Oi(1));return n(ere)(t,e)}let r=t,s=e,i=new Map,o=i,a=0,l=!1;function c(){o===i&&(o=new Map,i.forEach((x,w)=>{o.set(w,x)}))}function d(){if(l)throw new Error(Oi(3));return s}function f(x){if(typeof x!="function")throw new Error(Oi(4));if(l)throw new Error(Oi(5));let w=!0;c();const C=a++;return o.set(C,x),function(){if(w){if(l)throw new Error(Oi(6));w=!1,c(),o.delete(C),i=null}}}function p(x){if(!Q8(x))throw new Error(Oi(7));if(typeof x.type>"u")throw new Error(Oi(8));if(typeof x.type!="string")throw new Error(Oi(17));if(l)throw new Error(Oi(9));try{l=!0,s=r(s,x)}finally{l=!1}return(i=o).forEach(C=>{C()}),x}function m(x){if(typeof x!="function")throw new Error(Oi(10));r=x,p({type:Xk.REPLACE})}function v(){const x=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(Oi(11));function C(){const D=w;D.next&&D.next(d())}return C(),{unsubscribe:x(C)}},[XH](){return this}}}return p({type:Xk.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[XH]:v}}function zDe(t){Object.keys(t).forEach(e=>{const n=t[e];if(typeof n(void 0,{type:Xk.INIT})>"u")throw new Error(Oi(12));if(typeof n(void 0,{type:Xk.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Oi(13))})}function tre(t){const e=Object.keys(t),n={};for(let i=0;i<e.length;i++){const o=e[i];typeof t[o]=="function"&&(n[o]=t[o])}const r=Object.keys(n);let s;try{zDe(n)}catch(i){s=i}return function(o={},a){if(s)throw s;let l=!1;const c={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],m=o[f],v=p(m,a);if(typeof v>"u")throw a&&a.type,new Error(Oi(14));c[f]=v,l=l||v!==m}return l=l||r.length!==Object.keys(o).length,l?c:o}}function Qk(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function FDe(...t){return e=>(n,r)=>{const s=e(n,r);let i=()=>{throw new Error(Oi(15))};const o={getState:s.getState,dispatch:(l,...c)=>i(l,...c)},a=t.map(l=>l(o));return i=Qk(...a)(s.dispatch),{...s,dispatch:i}}}function BDe(t){return Q8(t)&&"type"in t&&typeof t.type=="string"}var nre=Symbol.for("immer-nothing"),QH=Symbol.for("immer-draftable"),Ho=Symbol.for("immer-state");function uc(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Va=Object,e1=Va.getPrototypeOf,eT="constructor",D_="prototype",aL="configurable",tT="enumerable",HD="writable",MS="value",Wd=t=>!!t&&!!t[Ho];function Cc(t){var e;return t?rre(t)||T_(t)||!!t[QH]||!!((e=t[eT])!=null&&e[QH])||A_(t)||__(t):!1}var HDe=Va[D_][eT].toString(),eq=new WeakMap;function rre(t){if(!t||!e$(t))return!1;const e=e1(t);if(e===null||e===Va[D_])return!0;const n=Va.hasOwnProperty.call(e,eT)&&e[eT];if(n===Object)return!0;if(!Cy(n))return!1;let r=eq.get(n);return r===void 0&&(r=Function.toString.call(n),eq.set(n,r)),r===HDe}function k_(t,e,n=!0){Aw(t)===0?(n?Reflect.ownKeys(t):Va.keys(t)).forEach(s=>{e(s,t[s],t)}):t.forEach((r,s)=>e(s,r,t))}function Aw(t){const e=t[Ho];return e?e.type_:T_(t)?1:A_(t)?2:__(t)?3:0}var tq=(t,e,n=Aw(t))=>n===2?t.has(e):Va[D_].hasOwnProperty.call(t,e),lL=(t,e,n=Aw(t))=>n===2?t.get(e):t[e],nT=(t,e,n,r=Aw(t))=>{r===2?t.set(e,n):r===3?t.add(n):t[e]=n};function qDe(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}var T_=Array.isArray,A_=t=>t instanceof Map,__=t=>t instanceof Set,e$=t=>typeof t=="object",Cy=t=>typeof t=="function",a4=t=>typeof t=="boolean";function UDe(t){const e=+t;return Number.isInteger(e)&&String(e)===t}var Td=t=>t.copy_||t.base_,t$=t=>t.modified_?t.copy_:t.base_;function cL(t,e){if(A_(t))return new Map(t);if(__(t))return new Set(t);if(T_(t))return Array[D_].slice.call(t);const n=rre(t);if(e===!0||e==="class_only"&&!n){const r=Va.getOwnPropertyDescriptors(t);delete r[Ho];let s=Reflect.ownKeys(r);for(let i=0;i<s.length;i++){const o=s[i],a=r[o];a[HD]===!1&&(a[HD]=!0,a[aL]=!0),(a.get||a.set)&&(r[o]={[aL]:!0,[HD]:!0,[tT]:a[tT],[MS]:t[o]})}return Va.create(e1(t),r)}else{const r=e1(t);if(r!==null&&n)return{...t};const s=Va.create(r);return Va.assign(s,t)}}function n$(t,e=!1){return O_(t)||Wd(t)||!Cc(t)||(Aw(t)>1&&Va.defineProperties(t,{set:qM,add:qM,clear:qM,delete:qM}),Va.freeze(t),e&&k_(t,(n,r)=>{n$(r,!0)},!1)),t}function VDe(){uc(2)}var qM={[MS]:VDe};function O_(t){return t===null||!e$(t)?!0:Va.isFrozen(t)}var rT="MapSet",uL="Patches",nq="ArrayMethods",sre={};function qg(t){const e=sre[t];return e||uc(0,t),e}var rq=t=>!!sre[t],DS,ire=()=>DS,WDe=(t,e)=>({drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:rq(rT)?qg(rT):void 0,arrayMethodsPlugin_:rq(nq)?qg(nq):void 0});function sq(t,e){e&&(t.patchPlugin_=qg(uL),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function dL(t){fL(t),t.drafts_.forEach(YDe),t.drafts_=null}function fL(t){t===DS&&(DS=t.parent_)}var iq=t=>DS=WDe(DS,t);function YDe(t){const e=t[Ho];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function oq(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];if(t!==void 0&&t!==n){n[Ho].modified_&&(dL(e),uc(4)),Cc(t)&&(t=aq(e,t));const{patchPlugin_:s}=e;s&&s.generateReplacementPatches_(n[Ho].base_,t,e)}else t=aq(e,n);return GDe(e,t,!0),dL(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==nre?t:void 0}function aq(t,e){if(O_(e))return e;const n=e[Ho];if(!n)return sT(e,t.handledSet_,t);if(!R_(n,t))return e;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(t);lre(n,t)}return n.copy_}function GDe(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&n$(e,n)}function ore(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var R_=(t,e)=>t.scope_===e,KDe=[];function are(t,e,n,r){const s=Td(t),i=t.type_;if(r!==void 0&&lL(s,r,i)===e){nT(s,r,n,i);return}if(!t.draftLocations_){const a=t.draftLocations_=new Map;k_(s,(l,c)=>{if(Wd(c)){const d=a.get(c)||[];d.push(l),a.set(c,d)}})}const o=t.draftLocations_.get(e)??KDe;for(const a of o)nT(s,a,n,i)}function ZDe(t,e,n){t.callbacks_.push(function(s){var a;const i=e;if(!i||!R_(i,s))return;(a=s.mapSetPlugin_)==null||a.fixSetContents(i);const o=t$(i);are(t,i.draft_??i,o,n),lre(i,s)})}function lre(t,e){var r;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((r=t.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:s}=e;if(s){const i=s.getPath(t);i&&s.generatePatches_(t,i,e)}ore(t)}}function JDe(t,e,n){const{scope_:r}=t;if(Wd(n)){const s=n[Ho];R_(s,r)&&s.callbacks_.push(function(){qD(t);const o=t$(s);are(t,n,o,e)})}else Cc(n)&&t.callbacks_.push(function(){const i=Td(t);t.type_===3?i.has(n)&&sT(n,r.handledSet_,r):lL(i,e,t.type_)===n&&r.drafts_.length>1&&(t.assigned_.get(e)??!1)===!0&&t.copy_&&sT(lL(t.copy_,e,t.type_),r.handledSet_,r)})}function sT(t,e,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Wd(t)||e.has(t)||!Cc(t)||O_(t)||(e.add(t),k_(t,(r,s)=>{if(Wd(s)){const i=s[Ho];if(R_(i,n)){const o=t$(i);nT(t,r,o,t.type_),ore(i)}}else Cc(s)&&sT(s,e,n)})),t}function XDe(t,e){const n=T_(t),r={type_:n?1:0,scope_:e?e.scope_:ire(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let s=r,i=iT;n&&(s=[r],i=kS);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,[a,r]}var iT={get(t,e){if(e===Ho)return t;let n=t.scope_.arrayMethodsPlugin_;const r=t.type_===1&&typeof e=="string";if(r&&n!=null&&n.isArrayOperationMethod(e))return n.createMethodInterceptor(t,e);const s=Td(t);if(!tq(s,e,t.type_))return QDe(t,s,e);const i=s[e];if(t.finalized_||!Cc(i)||r&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&UDe(e))return i;if(i===l4(t.base_,e)){qD(t);const o=t.type_===1?+e:e,a=hL(t.scope_,i,t,o);return t.copy_[o]=a}return i},has(t,e){return e in Td(t)},ownKeys(t){return Reflect.ownKeys(Td(t))},set(t,e,n){const r=cre(Td(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const s=l4(Td(t),e),i=s==null?void 0:s[Ho];if(i&&i.base_===n)return t.copy_[e]=n,t.assigned_.set(e,!1),!0;if(qDe(n,s)&&(n!==void 0||tq(t.base_,e,t.type_)))return!0;qD(t),pL(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_.set(e,!0),JDe(t,e,n)),!0},deleteProperty(t,e){return qD(t),l4(t.base_,e)!==void 0||e in t.base_?(t.assigned_.set(e,!1),pL(t)):t.assigned_.delete(e),t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Td(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{[HD]:!0,[aL]:t.type_!==1||e!=="length",[tT]:r[tT],[MS]:n[e]}},defineProperty(){uc(11)},getPrototypeOf(t){return e1(t.base_)},setPrototypeOf(){uc(12)}},kS={};for(let t in iT){let e=iT[t];kS[t]=function(){const n=arguments;return n[0]=n[0][0],e.apply(this,n)}}kS.deleteProperty=function(t,e){return kS.set.call(this,t,e,void 0)};kS.set=function(t,e,n){return iT.set.call(this,t[0],e,n,t[0])};function l4(t,e){const n=t[Ho];return(n?Td(n):t)[e]}function QDe(t,e,n){var s;const r=cre(e,n);return r?MS in r?r[MS]:(s=r.get)==null?void 0:s.call(t.draft_):void 0}function cre(t,e){if(!(e in t))return;let n=e1(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=e1(n)}}function pL(t){t.modified_||(t.modified_=!0,t.parent_&&pL(t.parent_))}function qD(t){t.copy_||(t.assigned_=new Map,t.copy_=cL(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var eke=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,n,r)=>{if(Cy(e)&&!Cy(n)){const i=n;n=e;const o=this;return function(l=i,...c){return o.produce(l,d=>n.call(this,d,...c))}}Cy(n)||uc(6),r!==void 0&&!Cy(r)&&uc(7);let s;if(Cc(e)){const i=iq(this),o=hL(i,e,void 0);let a=!0;try{s=n(o),a=!1}finally{a?dL(i):fL(i)}return sq(i,r),oq(s,i)}else if(!e||!e$(e)){if(s=n(e),s===void 0&&(s=e),s===nre&&(s=void 0),this.autoFreeze_&&n$(s,!0),r){const i=[],o=[];qg(uL).generateReplacementPatches_(e,s,{patches_:i,inversePatches_:o}),r(i,o)}return s}else uc(1,e)},this.produceWithPatches=(e,n)=>{if(Cy(e))return(o,...a)=>this.produceWithPatches(o,l=>e(l,...a));let r,s;return[this.produce(e,n,(o,a)=>{r=o,s=a}),r,s]},a4(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),a4(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),a4(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Cc(t)||uc(8),Wd(t)&&(t=ag(t));const e=iq(this),n=hL(e,t,void 0);return n[Ho].isManual_=!0,fL(e),n}finishDraft(t,e){const n=t&&t[Ho];(!n||!n.isManual_)&&uc(9);const{scope_:r}=n;return sq(r,e),oq(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const s=e[n];if(s.path.length===0&&s.op==="replace"){t=s.value;break}}n>-1&&(e=e.slice(n+1));const r=qg(uL).applyPatches_;return Wd(t)?r(t,e):this.produce(t,s=>r(s,e))}};function hL(t,e,n,r){const[s,i]=A_(e)?qg(rT).proxyMap_(e,n):__(e)?qg(rT).proxySet_(e,n):XDe(e,n);return((n==null?void 0:n.scope_)??ire()).drafts_.push(s),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?ZDe(n,i,r):i.callbacks_.push(function(l){var d;(d=l.mapSetPlugin_)==null||d.fixSetContents(i);const{patchPlugin_:c}=l;i.modified_&&c&&c.generatePatches_(i,[],l)}),s}function ag(t){return Wd(t)||uc(10,t),ure(t)}function ure(t){if(!Cc(t)||O_(t))return t;const e=t[Ho];let n,r=!0;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=cL(t,e.scope_.immer_.useStrictShallowCopy_),r=e.scope_.immer_.shouldUseStrictIteration()}else n=cL(t,!0);return k_(n,(s,i)=>{nT(n,s,ure(i))},r),e&&(e.finalized_=!1),n}var tke=new eke,dre=tke.produce;function fre(t){return({dispatch:n,getState:r})=>s=>i=>typeof i=="function"?i(n,r,t):s(i)}var nke=fre(),rke=fre,ske=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qk:Qk.apply(null,arguments)},ike=t=>t&&typeof t.match=="function";function Bx(t,e){function n(...r){if(e){let s=e(...r);if(!s)throw new Error(Pd(0));return{type:t,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>BDe(r)&&r.type===t,n}var pre=class Mx extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,Mx.prototype)}static get[Symbol.species](){return Mx}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new Mx(...e[0].concat(this)):new Mx(...e.concat(this))}};function lq(t){return Cc(t)?dre(t,()=>{}):t}function UM(t,e,n){return t.has(e)?t.get(e):t.set(e,n(e)).get(e)}function oke(t){return typeof t=="boolean"}var ake=()=>function(e){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:s=!0,actionCreatorCheck:i=!0}=e??{};let o=new pre;return n&&(oke(n)?o.push(nke):o.push(rke(n.extraArgument))),o},lke="RTK_autoBatch",cq=t=>e=>{setTimeout(e,t)},cke=(t={type:"raf"})=>e=>(...n)=>{const r=e(...n);let s=!0,i=!1,o=!1;const a=new Set,l=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cq(10):t.type==="callback"?t.queueNotification:cq(t.timeout),c=()=>{o=!1,i&&(i=!1,a.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>s&&d(),p=r.subscribe(f);return a.add(d),()=>{p(),a.delete(d)}},dispatch(d){var f;try{return s=!((f=d==null?void 0:d.meta)!=null&&f[lke]),i=!s,i&&(o||(o=!0,l(c))),r.dispatch(d)}finally{s=!0}}})},uke=t=>function(n){const{autoBatch:r=!0}=n??{};let s=new pre(t);return r&&s.push(cke(typeof r=="object"?r:void 0)),s};function dke(t){const e=ake(),{reducer:n=void 0,middleware:r,devTools:s=!0,preloadedState:i=void 0,enhancers:o=void 0}=t||{};let a;if(typeof n=="function")a=n;else if(Q8(n))a=tre(n);else throw new Error(Pd(1));let l;typeof r=="function"?l=r(e):l=e();let c=Qk;s&&(c=ske({trace:!1,...typeof s=="object"&&s}));const d=FDe(...l),f=uke(d);let p=typeof o=="function"?o(f):f();const m=c(...p);return ere(a,i,m)}function hre(t){const e={},n=[];let r;const s={addCase(i,o){const a=typeof i=="string"?i:i.type;if(!a)throw new Error(Pd(28));if(a in e)throw new Error(Pd(29));return e[a]=o,s},addAsyncThunk(i,o){return o.pending&&(e[i.pending.type]=o.pending),o.rejected&&(e[i.rejected.type]=o.rejected),o.fulfilled&&(e[i.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:i.settled,reducer:o.settled}),s},addMatcher(i,o){return n.push({matcher:i,reducer:o}),s},addDefaultCase(i){return r=i,s}};return t(s),[e,n,r]}function fke(t){return typeof t=="function"}function pke(t,e){let[n,r,s]=hre(e),i;if(fke(t))i=()=>lq(t());else{const a=lq(t);i=()=>a}function o(a=i(),l){let c=[n[l.type],...r.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return c.filter(d=>!!d).length===0&&(c=[s]),c.reduce((d,f)=>{if(f)if(Wd(d)){const m=f(d,l);return m===void 0?d:m}else{if(Cc(d))return dre(d,p=>f(p,l));{const p=f(d,l);if(p===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return d},a)}return o.getInitialState=i,o}var hke=(t,e)=>ike(t)?t.match(e):t(e);function mke(...t){return e=>t.some(n=>hke(n,e))}var gke="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vke=(t=21)=>{let e="",n=t;for(;n--;)e+=gke[Math.random()*64|0];return e},yke=["name","message","stack","code"],c4=class{constructor(t,e){op(this,"_type");this.payload=t,this.meta=e}},uq=class{constructor(t,e){op(this,"_type");this.payload=t,this.meta=e}},bke=t=>{if(typeof t=="object"&&t!==null){const e={};for(const n of yke)typeof t[n]=="string"&&(e[n]=t[n]);return e}return{message:String(t)}},dq="External signal was aborted",sn=(()=>{function t(e,n,r){const s=Bx(e+"/fulfilled",(l,c,d,f)=>({payload:l,meta:{...f||{},arg:d,requestId:c,requestStatus:"fulfilled"}})),i=Bx(e+"/pending",(l,c,d)=>({payload:void 0,meta:{...d||{},arg:c,requestId:l,requestStatus:"pending"}})),o=Bx(e+"/rejected",(l,c,d,f,p)=>({payload:f,error:(r&&r.serializeError||bke)(l||"Rejected"),meta:{...p||{},arg:d,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function a(l,{signal:c}={}){return(d,f,p)=>{const m=r!=null&&r.idGenerator?r.idGenerator(l):vke(),v=new AbortController;let y,x;function w(E){x=E,v.abort()}c&&(c.aborted?w(dq):c.addEventListener("abort",()=>w(dq),{once:!0}));const C=(async function(){var T,A;let E;try{let _=(T=r==null?void 0:r.condition)==null?void 0:T.call(r,l,{getState:f,extra:p});if(xke(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const R=new Promise((N,I)=>{y=()=>{I({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",y,{once:!0})});d(i(m,l,(A=r==null?void 0:r.getPendingMeta)==null?void 0:A.call(r,{requestId:m,arg:l},{getState:f,extra:p}))),E=await Promise.race([R,Promise.resolve(n(l,{dispatch:d,getState:f,extra:p,requestId:m,signal:v.signal,abort:w,rejectWithValue:(N,I)=>new c4(N,I),fulfillWithValue:(N,I)=>new uq(N,I)})).then(N=>{if(N instanceof c4)throw N;return N instanceof uq?s(N.payload,m,l,N.meta):s(N,m,l)})])}catch(_){E=_ instanceof c4?o(null,m,l,_.payload,_.meta):o(_,m,l)}finally{y&&v.signal.removeEventListener("abort",y)}return r&&!r.dispatchConditionRejection&&o.match(E)&&E.meta.condition||d(E),E})();return Object.assign(C,{abort:w,requestId:m,arg:l,unwrap(){return C.then(r$)}})}}return Object.assign(a,{pending:i,rejected:o,fulfilled:s,settled:mke(o,s),typePrefix:e})}return t.withTypes=()=>t,t})();function r$(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function xke(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var Ske=Symbol.for("rtk-slice-createasyncthunk");function wke(t,e){return`${t}/${e}`}function Cke({creators:t}={}){var n;const e=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[Ske];return function(s){const{name:i,reducerPath:o=i}=s;if(!i)throw new Error(Pd(11));const a=(typeof s.reducers=="function"?s.reducers(Mke()):s.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(D,T){const A=typeof D=="string"?D:D.type;if(!A)throw new Error(Pd(12));if(A in c.sliceCaseReducersByType)throw new Error(Pd(13));return c.sliceCaseReducersByType[A]=T,d},addMatcher(D,T){return c.sliceMatchers.push({matcher:D,reducer:T}),d},exposeAction(D,T){return c.actionCreators[D]=T,d},exposeCaseReducer(D,T){return c.sliceCaseReducersByName[D]=T,d}};l.forEach(D=>{const T=a[D],A={reducerName:D,type:wke(i,D),createNotation:typeof s.reducers=="function"};kke(T)?Ake(A,T,d,e):Dke(A,T,d)});function f(){const[D={},T=[],A=void 0]=typeof s.extraReducers=="function"?hre(s.extraReducers):[s.extraReducers],_={...D,...c.sliceCaseReducersByType};return pke(s.initialState,R=>{for(let N in _)R.addCase(N,_[N]);for(let N of c.sliceMatchers)R.addMatcher(N.matcher,N.reducer);for(let N of T)R.addMatcher(N.matcher,N.reducer);A&&R.addDefaultCase(A)})}const p=D=>D,m=new Map,v=new WeakMap;let y;function x(D,T){return y||(y=f()),y(D,T)}function w(){return y||(y=f()),y.getInitialState()}function C(D,T=!1){function A(R){let N=R[D];return typeof N>"u"&&T&&(N=UM(v,A,w)),N}function _(R=p){const N=UM(m,T,()=>new WeakMap);return UM(N,R,()=>{const I={};for(const[$,L]of Object.entries(s.selectors??{}))I[$]=Eke(L,R,()=>UM(v,R,w),T);return I})}return{reducerPath:D,getSelectors:_,get selectors(){return _(A)},selectSlice:A}}const E={name:i,reducer:x,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:w,...C(o),injectInto(D,{reducerPath:T,...A}={}){const _=T??o;return D.inject({reducerPath:_,reducer:x},A),{...E,...C(_,!0)}}};return E}}function Eke(t,e,n,r){function s(i,...o){let a=e(i);return typeof a>"u"&&r&&(a=n()),t(a,...o)}return s.unwrapped=t,s}var $1=Cke();function Mke(){function t(e,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...n}}return t.withTypes=()=>t,{reducer(e){return Object.assign({[e.name](...n){return e(...n)}}[e.name],{_reducerDefinitionType:"reducer"})},preparedReducer(e,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:n}},asyncThunk:t}}function Dke({type:t,reducerName:e,createNotation:n},r,s){let i,o;if("reducer"in r){if(n&&!Tke(r))throw new Error(Pd(17));i=r.reducer,o=r.prepare}else i=r;s.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,o?Bx(t,o):Bx(t))}function kke(t){return t._reducerDefinitionType==="asyncThunk"}function Tke(t){return t._reducerDefinitionType==="reducerWithPrepare"}function Ake({type:t,reducerName:e},n,r,s){if(!s)throw new Error(Pd(18));const{payloadCreator:i,fulfilled:o,pending:a,rejected:l,settled:c,options:d}=n,f=s(t,i,d);r.exposeAction(e,f),o&&r.addCase(f.fulfilled,o),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(e,{fulfilled:o||VM,pending:a||VM,rejected:l||VM,settled:c||VM})}function VM(){}function Pd(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var Rd=(t=>(t[t.Busy=0]="Busy",t[t.Free=1]="Free",t))(Rd||{});let _ke={AccessType:0,Id:0,Name:"",Description:"",StartDate:"2024-02-13T08:00:00Z",EndDate:"2024-02-13T09:00:00Z",CalendarId:0,CategoryId:0,OwnerId:0,Type:0,Status:11,Address:"",Place:null,IsPrivate:!1,IsAllDay:!1,HasMaterials:!1,HasParticipant:!1,Recurring:null,GroupParticipants:null,Participants:null,ParticipantInfo:{AccessType:512,AttendingType:null,Description:null},IsFree:Rd.Busy,SaveType:0,Parent:null,Notifications:void 0};const Oke=t=>{let e=[];return t.forEach(n=>{n.Items&&n.Items.forEach(r=>{const s={..._ke,...r,Name:r.Name||"",CalendarId:n.ContactId};e=[...e,s]})}),e};var u4,fq;function Rke(){return fq||(fq=1,u4=function(e){e=Math.abs(e);var n=e%100;if(n>=10&&n<=20)return"th";var r=e%10;return r===1?"st":r===2?"nd":r===3?"rd":"th"}),u4}var d4,pq;function Nke(){if(pq)return d4;pq=1;var t=Rke();function e(n){if(typeof n!="number")throw new TypeError("Expected Number, got "+typeof n+" "+n);return Number.isFinite(n)?n+t(n):n}return e.indicator=t,d4=e,d4}var jke=Nke();const Ike=Mr(jke),s$={1:"Mn",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa",7:"Su"},gl=(t,e,n,r="ru",s)=>{let i="";return r==="ru"?[1,2,4].includes(t)?i=n("fullEventPage.repeatTypes.declinations.1"):[3,5,6].includes(t)?i=n("fullEventPage.repeatTypes.declinations.2"):i=n("fullEventPage.repeatTypes.declinations.4"):r==="en"&&s&&([4,5,6].includes(s)?i=n("fullEventPage.repeatTypes.declinations.4"):[3].includes(s)?i=n("fullEventPage.repeatTypes.declinations.3"):[2].includes(s)?i=n("fullEventPage.repeatTypes.declinations.2"):i=n("fullEventPage.repeatTypes.declinations.1")),e&&r==="ru"?i.slice(-1):e&&r==="en"?i.slice(-2):i},lu=(t,e,n="й")=>e==="ru"?`${t}-${n}`:Ike(t),Lke=t=>t===0?6:t-1;class lv extends Error{}class Pke extends lv{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class $ke extends lv{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class zke extends lv{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Ry extends lv{}class mre extends lv{constructor(e){super(`Invalid unit ${e}`)}}class fa extends lv{}class cp extends lv{constructor(){super("Zone is an abstract class")}}const Et="numeric",Ec="short",Ya="long",oT={year:Et,month:Et,day:Et},gre={year:Et,month:Ec,day:Et},Fke={year:Et,month:Ec,day:Et,weekday:Ec},vre={year:Et,month:Ya,day:Et},yre={year:Et,month:Ya,day:Et,weekday:Ya},bre={hour:Et,minute:Et},xre={hour:Et,minute:Et,second:Et},Sre={hour:Et,minute:Et,second:Et,timeZoneName:Ec},wre={hour:Et,minute:Et,second:Et,timeZoneName:Ya},Cre={hour:Et,minute:Et,hourCycle:"h23"},Ere={hour:Et,minute:Et,second:Et,hourCycle:"h23"},Mre={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:Ec},Dre={hour:Et,minute:Et,second:Et,hourCycle:"h23",timeZoneName:Ya},kre={year:Et,month:Et,day:Et,hour:Et,minute:Et},Tre={year:Et,month:Et,day:Et,hour:Et,minute:Et,second:Et},Are={year:Et,month:Ec,day:Et,hour:Et,minute:Et},_re={year:Et,month:Ec,day:Et,hour:Et,minute:Et,second:Et},Bke={year:Et,month:Ec,day:Et,weekday:Ec,hour:Et,minute:Et},Ore={year:Et,month:Ya,day:Et,hour:Et,minute:Et,timeZoneName:Ec},Rre={year:Et,month:Ya,day:Et,hour:Et,minute:Et,second:Et,timeZoneName:Ec},Nre={year:Et,month:Ya,day:Et,weekday:Ya,hour:Et,minute:Et,timeZoneName:Ya},jre={year:Et,month:Ya,day:Et,weekday:Ya,hour:Et,minute:Et,second:Et,timeZoneName:Ya};class _w{get type(){throw new cp}get name(){throw new cp}get ianaName(){return this.name}get isUniversal(){throw new cp}offsetName(e,n){throw new cp}formatOffset(e,n){throw new cp}offset(e){throw new cp}equals(e){throw new cp}get isValid(){throw new cp}}let f4=null;class N_ extends _w{static get instance(){return f4===null&&(f4=new N_),f4}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return qre(e,n,r)}formatOffset(e,n){return Hx(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let UD={};function Hke(t){return UD[t]||(UD[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),UD[t]}const qke={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Uke(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,i,o,a,l,c,d]=r;return[o,s,i,a,l,c,d]}function Vke(t,e){const n=t.formatToParts(e),r=[];for(let s=0;s<n.length;s++){const{type:i,value:o}=n[s],a=qke[i];i==="era"?r[a]=o:fn(a)||(r[a]=parseInt(o,10))}return r}let WM={};class Yd extends _w{static create(e){return WM[e]||(WM[e]=new Yd(e)),WM[e]}static resetCache(){WM={},UD={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Yd.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return qre(e,n,r,this.name)}formatOffset(e,n){return Hx(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=Hke(this.name);let[s,i,o,a,l,c,d]=r.formatToParts?Vke(r,n):Uke(r,n);a==="BC"&&(s=-Math.abs(s)+1);const p=I_({year:s,month:i,day:o,hour:l===24?0:l,minute:c,second:d,millisecond:0});let m=+n;const v=m%1e3;return m-=v>=0?v:1e3+v,(p-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let hq={};function Wke(t,e={}){const n=JSON.stringify([t,e]);let r=hq[n];return r||(r=new Intl.ListFormat(t,e),hq[n]=r),r}let mL={};function gL(t,e={}){const n=JSON.stringify([t,e]);let r=mL[n];return r||(r=new Intl.DateTimeFormat(t,e),mL[n]=r),r}let vL={};function Yke(t,e={}){const n=JSON.stringify([t,e]);let r=vL[n];return r||(r=new Intl.NumberFormat(t,e),vL[n]=r),r}let yL={};function Gke(t,e={}){const{base:n,...r}=e,s=JSON.stringify([t,r]);let i=yL[s];return i||(i=new Intl.RelativeTimeFormat(t,e),yL[s]=i),i}let Dx=null;function Kke(){return Dx||(Dx=new Intl.DateTimeFormat().resolvedOptions().locale,Dx)}let mq={};function Zke(t){let e=mq[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,mq[t]=e}return e}function Jke(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,s;try{r=gL(t).resolvedOptions(),s=t}catch{const l=t.substring(0,n);r=gL(l).resolvedOptions(),s=l}const{numberingSystem:i,calendar:o}=r;return[s,i,o]}}function Xke(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Qke(t){const e=[];for(let n=1;n<=12;n++){const r=nt.utc(2009,n,1);e.push(t(r))}return e}function eTe(t){const e=[];for(let n=1;n<=7;n++){const r=nt.utc(2016,11,13+n);e.push(t(r))}return e}function YM(t,e,n,r){const s=t.listingMode();return s==="error"?null:s==="en"?n(e):r(e)}function tTe(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class nTe{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...o}=r;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=Yke(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):l$(e,3);return Fs(n,this.padTo)}}}class rTe{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Yd.create(a).valid?(s=a,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=gL(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class sTe{constructor(e,n,r){this.opts={style:"long",...r},!n&&Bre()&&(this.rtf=Gke(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ETe(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const iTe={firstDay:1,minimalDays:4,weekend:[6,7]};class Sr{static fromOpts(e){return Sr.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,s,i=!1){const o=e||ws.defaultLocale,a=o||(i?"en-US":Kke()),l=n||ws.defaultNumberingSystem,c=r||ws.defaultOutputCalendar,d=bL(s)||ws.defaultWeekSettings;return new Sr(a,l,c,d,o)}static resetCache(){Dx=null,mL={},vL={},yL={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:s}={}){return Sr.create(e,n,r,s)}constructor(e,n,r,s,i){const[o,a,l]=Jke(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=r||l||null,this.weekSettings=s,this.intl=Xke(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=tTe(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Sr.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,bL(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return YM(this,e,Wre,()=>{const r=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=Qke(i=>this.extract(i,r,"month"))),this.monthsCache[s][e]})}weekdays(e,n=!1){return YM(this,e,Kre,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=eTe(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return YM(this,void 0,()=>Zre,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[nt.utc(2016,11,13,9),nt.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return YM(this,e,Jre,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[nt.utc(-40,1,1),nt.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const s=this.dtFormatter(e,n),i=s.formatToParts(),o=i.find(a=>a.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new nTe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new rTe(e,this.intl,n)}relFormatter(e={}){return new sTe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Wke(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Hre()?Zke(this.locale):iTe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let p4=null;class $o extends _w{static get utcInstance(){return p4===null&&(p4=new $o(0)),p4}static instance(e){return e===0?$o.utcInstance:new $o(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new $o(L_(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Hx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Hx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Hx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class oTe extends _w{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ap(t,e){if(fn(t)||t===null)return e;if(t instanceof _w)return t;if(cTe(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?N_.instance:n==="utc"||n==="gmt"?$o.utcInstance:$o.parseSpecifier(n)||Yd.create(t)}else return Eg(t)?$o.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new oTe(t)}let gq=()=>Date.now(),vq="system",yq=null,bq=null,xq=null,Sq=60,wq,Cq=null,ws=class{static get now(){return gq}static set now(e){gq=e}static set defaultZone(e){vq=e}static get defaultZone(){return Ap(vq,N_.instance)}static get defaultLocale(){return yq}static set defaultLocale(e){yq=e}static get defaultNumberingSystem(){return bq}static set defaultNumberingSystem(e){bq=e}static get defaultOutputCalendar(){return xq}static set defaultOutputCalendar(e){xq=e}static get defaultWeekSettings(){return Cq}static set defaultWeekSettings(e){Cq=bL(e)}static get twoDigitCutoffYear(){return Sq}static set twoDigitCutoffYear(e){Sq=e%100}static get throwOnInvalid(){return wq}static set throwOnInvalid(e){wq=e}static resetCaches(){Sr.resetCache(),Yd.resetCache()}};class hc{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ire=[0,31,59,90,120,151,181,212,243,273,304,334],Lre=[0,31,60,91,121,152,182,213,244,274,305,335];function Sl(t,e){return new hc("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function i$(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Pre(t,e,n){return n+(Ow(t)?Lre:Ire)[e-1]}function $re(t,e){const n=Ow(t)?Lre:Ire,r=n.findIndex(i=>i<e),s=e-n[r];return{month:r+1,day:s}}function o$(t,e){return(t-e+7)%7+1}function aT(t,e=4,n=1){const{year:r,month:s,day:i}=t,o=Pre(r,s,i),a=o$(i$(r,s,i),n);let l=Math.floor((o-a+14-e)/7),c;return l<1?(c=r-1,l=TS(c,e,n)):l>TS(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:a,...P_(t)}}function Eq(t,e=4,n=1){const{weekYear:r,weekNumber:s,weekday:i}=t,o=o$(i$(r,1,e),n),a=By(r);let l=s*7+i-o-7+e,c;l<1?(c=r-1,l+=By(c)):l>a?(c=r+1,l-=By(r)):c=r;const{month:d,day:f}=$re(c,l);return{year:c,month:d,day:f,...P_(t)}}function h4(t){const{year:e,month:n,day:r}=t,s=Pre(e,n,r);return{year:e,ordinal:s,...P_(t)}}function Mq(t){const{year:e,ordinal:n}=t,{month:r,day:s}=$re(e,n);return{year:e,month:r,day:s,...P_(t)}}function Dq(t,e){if(!fn(t.localWeekday)||!fn(t.localWeekNumber)||!fn(t.localWeekYear)){if(!fn(t.weekday)||!fn(t.weekNumber)||!fn(t.weekYear))throw new Ry("Cannot mix locale-based week fields with ISO-based week fields");return fn(t.localWeekday)||(t.weekday=t.localWeekday),fn(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),fn(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function aTe(t,e=4,n=1){const r=j_(t.weekYear),s=wl(t.weekNumber,1,TS(t.weekYear,e,n)),i=wl(t.weekday,1,7);return r?s?i?!1:Sl("weekday",t.weekday):Sl("week",t.weekNumber):Sl("weekYear",t.weekYear)}function lTe(t){const e=j_(t.year),n=wl(t.ordinal,1,By(t.year));return e?n?!1:Sl("ordinal",t.ordinal):Sl("year",t.year)}function zre(t){const e=j_(t.year),n=wl(t.month,1,12),r=wl(t.day,1,lT(t.year,t.month));return e?n?r?!1:Sl("day",t.day):Sl("month",t.month):Sl("year",t.year)}function Fre(t){const{hour:e,minute:n,second:r,millisecond:s}=t,i=wl(e,0,23)||e===24&&n===0&&r===0&&s===0,o=wl(n,0,59),a=wl(r,0,59),l=wl(s,0,999);return i?o?a?l?!1:Sl("millisecond",s):Sl("second",r):Sl("minute",n):Sl("hour",e)}function fn(t){return typeof t>"u"}function Eg(t){return typeof t=="number"}function j_(t){return typeof t=="number"&&t%1===0}function cTe(t){return typeof t=="string"}function uTe(t){return Object.prototype.toString.call(t)==="[object Date]"}function Bre(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Hre(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function dTe(t){return Array.isArray(t)?t:[t]}function kq(t,e,n){if(t.length!==0)return t.reduce((r,s)=>{const i=[e(s),s];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function fTe(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function t1(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function bL(t){if(t==null)return null;if(typeof t!="object")throw new fa("Week settings must be an object");if(!wl(t.firstDay,1,7)||!wl(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!wl(e,1,7)))throw new fa("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function wl(t,e,n){return j_(t)&&t>=e&&t<=n}function pTe(t,e){return t-e*Math.floor(t/e)}function Fs(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function xp(t){if(!(fn(t)||t===null||t===""))return parseInt(t,10)}function Km(t){if(!(fn(t)||t===null||t===""))return parseFloat(t)}function a$(t){if(!(fn(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function l$(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function Ow(t){return t%4===0&&(t%100!==0||t%400===0)}function By(t){return Ow(t)?366:365}function lT(t,e){const n=pTe(e-1,12)+1,r=t+(e-n)/12;return n===2?Ow(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function I_(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Tq(t,e,n){return-o$(i$(t,1,e),n)+e-1}function TS(t,e=4,n=1){const r=Tq(t,e,n),s=Tq(t+1,e,n);return(By(t)-r+s)/7}function xL(t){return t>99?t:t>ws.twoDigitCutoffYear?1900+t:2e3+t}function qre(t,e,n,r=null){const s=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function L_(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,s=n<0||Object.is(n,-0)?-r:r;return n*60+s}function Ure(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new fa(`Invalid unit value ${t}`);return e}function cT(t,e){const n={};for(const r in t)if(t1(t,r)){const s=t[r];if(s==null)continue;n[e(r)]=Ure(s)}return n}function Hx(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),s=t>=0?"+":"-";switch(e){case"short":return`${s}${Fs(n,2)}:${Fs(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Fs(n,2)}${Fs(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function P_(t){return fTe(t,["hour","minute","second","millisecond"])}const hTe=["January","February","March","April","May","June","July","August","September","October","November","December"],Vre=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mTe=["J","F","M","A","M","J","J","A","S","O","N","D"];function Wre(t){switch(t){case"narrow":return[...mTe];case"short":return[...Vre];case"long":return[...hTe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Yre=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Gre=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gTe=["M","T","W","T","F","S","S"];function Kre(t){switch(t){case"narrow":return[...gTe];case"short":return[...Gre];case"long":return[...Yre];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Zre=["AM","PM"],vTe=["Before Christ","Anno Domini"],yTe=["BC","AD"],bTe=["B","A"];function Jre(t){switch(t){case"narrow":return[...bTe];case"short":return[...yTe];case"long":return[...vTe];default:return null}}function xTe(t){return Zre[t.hour<12?0:1]}function STe(t,e){return Kre(e)[t.weekday-1]}function wTe(t,e){return Wre(e)[t.month-1]}function CTe(t,e){return Jre(e)[t.year<0?0:1]}function ETe(t,e,n="always",r=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){const f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${s[t][0]}`;case-1:return f?"yesterday":`last ${s[t][0]}`;case 0:return f?"today":`this ${s[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,c=s[t],d=r?l?c[1]:c[2]||c[1]:l?s[t][0]:t;return o?`${a} ${d} ago`:`in ${a} ${d}`}function Aq(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const MTe={D:oT,DD:gre,DDD:vre,DDDD:yre,t:bre,tt:xre,ttt:Sre,tttt:wre,T:Cre,TT:Ere,TTT:Mre,TTTT:Dre,f:kre,ff:Are,fff:Ore,ffff:Nre,F:Tre,FF:_re,FFF:Rre,FFFF:jre};class oo{static create(e,n={}){return new oo(e,n)}static parseFormat(e){let n=null,r="",s=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),n=null,r="",s=!s):s||a===n?r+=a:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=a,n=a)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return MTe[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Fs(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(m,v)=>this.loc.extract(e,m,v),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",a=()=>r?xTe(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(m,v)=>r?wTe(e,m):i(v?{month:m}:{month:m,day:"numeric"},"month"),c=(m,v)=>r?STe(e,m):i(v?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),d=m=>{const v=oo.macroTokenToFormatOpts(m);return v?this.formatWithSystemDefault(e,v):m},f=m=>r?CTe(e,m):i({era:m},"era"),p=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(m)}};return Aq(oo.parseFormat(n),p)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=l=>c=>{const d=r(c);return d?this.num(l.get(d),c.length):c},i=oo.parseFormat(n),o=i.reduce((l,{literal:c,val:d})=>c?l:l.concat(d),[]),a=e.shiftTo(...o.map(r).filter(l=>l));return Aq(i,s(a))}}const Xre=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function z1(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function F1(...t){return e=>t.reduce(([n,r,s],i)=>{const[o,a,l]=i(e,s);return[{...n,...o},a||r,l]},[{},null,1]).slice(0,2)}function B1(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const s=n.exec(t);if(s)return r(s)}return[null,null]}function Qre(...t){return(e,n)=>{const r={};let s;for(s=0;s<t.length;s++)r[t[s]]=xp(e[n+s]);return[r,null,n+s]}}const ese=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,DTe=`(?:${ese.source}?(?:\\[(${Xre.source})\\])?)?`,c$=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,tse=RegExp(`${c$.source}${DTe}`),u$=RegExp(`(?:T${tse.source})?`),kTe=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,TTe=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ATe=/(\d{4})-?(\d{3})/,_Te=Qre("weekYear","weekNumber","weekDay"),OTe=Qre("year","ordinal"),RTe=/(\d{4})-(\d\d)-(\d\d)/,nse=RegExp(`${c$.source} ?(?:${ese.source}|(${Xre.source}))?`),NTe=RegExp(`(?: ${nse.source})?`);function Hy(t,e,n){const r=t[e];return fn(r)?n:xp(r)}function jTe(t,e){return[{year:Hy(t,e),month:Hy(t,e+1,1),day:Hy(t,e+2,1)},null,e+3]}function H1(t,e){return[{hours:Hy(t,e,0),minutes:Hy(t,e+1,0),seconds:Hy(t,e+2,0),milliseconds:a$(t[e+3])},null,e+4]}function Rw(t,e){const n=!t[e]&&!t[e+1],r=L_(t[e+1],t[e+2]),s=n?null:$o.instance(r);return[{},s,e+3]}function Nw(t,e){const n=t[e]?Yd.create(t[e]):null;return[{},n,e+1]}const ITe=RegExp(`^T?${c$.source}$`),LTe=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function PTe(t){const[e,n,r,s,i,o,a,l,c]=t,d=e[0]==="-",f=l&&l[0]==="-",p=(m,v=!1)=>m!==void 0&&(v||m&&d)?-m:m;return[{years:p(Km(n)),months:p(Km(r)),weeks:p(Km(s)),days:p(Km(i)),hours:p(Km(o)),minutes:p(Km(a)),seconds:p(Km(l),l==="-0"),milliseconds:p(a$(c),f)}]}const $Te={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function d$(t,e,n,r,s,i,o){const a={year:e.length===2?xL(xp(e)):xp(e),month:Vre.indexOf(n)+1,day:xp(r),hour:xp(s),minute:xp(i)};return o&&(a.second=xp(o)),t&&(a.weekday=t.length>3?Yre.indexOf(t)+1:Gre.indexOf(t)+1),a}const zTe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function FTe(t){const[,e,n,r,s,i,o,a,l,c,d,f]=t,p=d$(e,s,r,n,i,o,a);let m;return l?m=$Te[l]:c?m=0:m=L_(d,f),[p,new $o(m)]}function BTe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const HTe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,qTe=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,UTe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function _q(t){const[,e,n,r,s,i,o,a]=t;return[d$(e,s,r,n,i,o,a),$o.utcInstance]}function VTe(t){const[,e,n,r,s,i,o,a]=t;return[d$(e,a,n,r,s,i,o),$o.utcInstance]}const WTe=z1(kTe,u$),YTe=z1(TTe,u$),GTe=z1(ATe,u$),KTe=z1(tse),rse=F1(jTe,H1,Rw,Nw),ZTe=F1(_Te,H1,Rw,Nw),JTe=F1(OTe,H1,Rw,Nw),XTe=F1(H1,Rw,Nw);function QTe(t){return B1(t,[WTe,rse],[YTe,ZTe],[GTe,JTe],[KTe,XTe])}function eAe(t){return B1(BTe(t),[zTe,FTe])}function tAe(t){return B1(t,[HTe,_q],[qTe,_q],[UTe,VTe])}function nAe(t){return B1(t,[LTe,PTe])}const rAe=F1(H1);function sAe(t){return B1(t,[ITe,rAe])}const iAe=z1(RTe,NTe),oAe=z1(nse),aAe=F1(H1,Rw,Nw);function lAe(t){return B1(t,[iAe,rse],[oAe,aAe])}const Oq="Invalid Duration",sse={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},cAe={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...sse},fl=146097/400,py=146097/4800,uAe={years:{quarters:4,months:12,weeks:fl/7,days:fl,hours:fl*24,minutes:fl*24*60,seconds:fl*24*60*60,milliseconds:fl*24*60*60*1e3},quarters:{months:3,weeks:fl/28,days:fl/4,hours:fl*24/4,minutes:fl*24*60/4,seconds:fl*24*60*60/4,milliseconds:fl*24*60*60*1e3/4},months:{weeks:py/7,days:py,hours:py*24,minutes:py*24*60,seconds:py*24*60*60,milliseconds:py*24*60*60*1e3},...sse},pg=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],dAe=pg.slice(0).reverse();function up(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Yn(r)}function ise(t,e){let n=e.milliseconds??0;for(const r of dAe.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function Rq(t,e){const n=ise(t,e)<0?-1:1;pg.reduceRight((r,s)=>{if(fn(e[s]))return r;if(r){const i=e[r]*n,o=t[s][r],a=Math.floor(i/o);e[s]+=a*n,e[r]-=a*o*n}return s},null),pg.reduce((r,s)=>{if(fn(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*t[r][s]}return s},null)}function fAe(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class Yn{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?uAe:cAe;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Sr.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Yn.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new fa(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Yn({values:cT(e,Yn.normalizeUnit),loc:Sr.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Eg(e))return Yn.fromMillis(e);if(Yn.isDuration(e))return e;if(typeof e=="object")return Yn.fromObject(e);throw new fa(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=nAe(e);return r?Yn.fromObject(r,n):Yn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=sAe(e);return r?Yn.fromObject(r,n):Yn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new fa("need to specify a reason the Duration is invalid");const r=e instanceof hc?e:new hc(e,n);if(ws.throwOnInvalid)throw new zke(r);return new Yn({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new mre(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?oo.create(this.loc,r).formatDurationFromString(this,e):Oq}toHuman(e={}){if(!this.isValid)return Oq;const n=pg.map(r=>{const s=this.values[r];return fn(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(s)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=l$(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},nt.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ise(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Yn.fromDurationLike(e),r={};for(const s of pg)(t1(n.values,s)||t1(this.values,s))&&(r[s]=n.get(s)+this.get(s));return up(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Yn.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Ure(e(this.values[r],r));return up(this,{values:n},!0)}get(e){return this[Yn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...cT(e,Yn.normalizeUnit)};return up(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:s}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:s,conversionAccuracy:r};return up(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Rq(this.matrix,e),up(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=fAe(this.normalize().shiftToAll().toObject());return up(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Yn.normalizeUnit(o));const n={},r={},s=this.toObject();let i;for(const o of pg)if(e.indexOf(o)>=0){i=o;let a=0;for(const c in r)a+=this.matrix[c][o]*r[c],r[c]=0;Eg(s[o])&&(a+=s[o]);const l=Math.trunc(a);n[o]=l,r[o]=(a*1e3-l*1e3)/1e3}else Eg(s[o])&&(r[o]=s[o]);for(const o in r)r[o]!==0&&(n[i]+=o===i?r[o]:r[o]/this.matrix[i][o]);return Rq(this.matrix,n),up(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return up(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of pg)if(!n(this.values[r],e.values[r]))return!1;return!0}}const hy="Invalid Interval";function pAe(t,e){return!t||!t.isValid?es.invalid("missing or invalid start"):!e||!e.isValid?es.invalid("missing or invalid end"):e<t?es.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class es{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new fa("need to specify a reason the Interval is invalid");const r=e instanceof hc?e:new hc(e,n);if(ws.throwOnInvalid)throw new $ke(r);return new es({invalid:r})}static fromDateTimes(e,n){const r=ix(e),s=ix(n),i=pAe(r,s);return i??new es({start:r,end:s})}static after(e,n){const r=Yn.fromDurationLike(n),s=ix(e);return es.fromDateTimes(s,s.plus(r))}static before(e,n){const r=Yn.fromDurationLike(n),s=ix(e);return es.fromDateTimes(s.minus(r),s)}static fromISO(e,n){const[r,s]=(e||"").split("/",2);if(r&&s){let i,o;try{i=nt.fromISO(r,n),o=i.isValid}catch{o=!1}let a,l;try{a=nt.fromISO(s,n),l=a.isValid}catch{l=!1}if(o&&l)return es.fromDateTimes(i,a);if(o){const c=Yn.fromISO(s,n);if(c.isValid)return es.after(i,c)}else if(l){const c=Yn.fromISO(r,n);if(c.isValid)return es.before(a,c)}}return es.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,n),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?es.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(ix).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),r=[];let{s}=this,i=0;for(;s<this.e;){const o=n[i]||this.e,a=+o>+this.e?this.e:o;r.push(es.fromDateTimes(s,a)),s=a,i+=1}return r}splitBy(e){const n=Yn.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const o=[];for(;r<this.e;){const a=this.start.plus(n.mapUnits(l=>l*s));i=+a>+this.e?this.e:a,o.push(es.fromDateTimes(r,i)),r=i,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:es.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return es.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[s,i.union(o)]:[s.concat([i]),o]:[s,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const s=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((l,c)=>l.time-c.time);for(const l of a)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&s.push(es.fromDateTimes(n,l.time)),n=null);return es.merge(s)}difference(...e){return es.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:hy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=oT,n={}){return this.isValid?oo.create(this.s.loc.clone(n),e).formatInterval(this):hy}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hy}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hy}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hy}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:hy}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Yn.invalid(this.invalidReason)}mapEndpoints(e){return es.fromDateTimes(e(this.s),e(this.e))}}class GM{static hasDST(e=ws.defaultZone){const n=nt.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Yd.isValidZone(e)}static normalizeZone(e){return Ap(e,ws.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||Sr.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||Sr.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||Sr.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||Sr.create(n,r,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||Sr.create(n,r,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||Sr.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:s=null}={}){return(s||Sr.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Sr.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Sr.create(n,null,"gregory").eras(e)}static features(){return{relative:Bre(),localeWeek:Hre()}}}function Nq(t,e){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Yn.fromMillis(r).as("days"))}function hAe(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const d=Nq(l,c);return(d-d%7)/7}],["days",Nq]],s={},i=t;let o,a;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,s[l]=c(t,e),a=i.plus(s),a>e?(s[l]--,t=i.plus(s),t>e&&(a=t,s[l]--,t=i.plus(s))):t=a);return[t,s,a,o]}function mAe(t,e,n,r){let[s,i,o,a]=hAe(t,e,n);const l=e-s,c=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(o<e&&(o=s.plus({[a]:1})),o!==s&&(i[a]=(i[a]||0)+l/(o-s)));const d=Yn.fromObject(i,r);return c.length>0?Yn.fromMillis(l,r).shiftTo(...c).plus(d):d}const f$={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[０-９]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},jq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},gAe=f$.hanidec.replace(/[\[|\]]/g,"").split("");function vAe(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(f$.hanidec)!==-1)e+=gAe.indexOf(t[n]);else for(const s in jq){const[i,o]=jq[s];r>=i&&r<=o&&(e+=r-i)}}return parseInt(e,10)}else return e}function ac({numberingSystem:t},e=""){return new RegExp(`${f$[t||"latn"]}${e}`)}const yAe="missing Intl.DateTimeFormat.formatToParts support";function nr(t,e=n=>n){return{regex:t,deser:([n])=>e(vAe(n))}}const bAe=" ",ose=`[ ${bAe}]`,ase=new RegExp(ose,"g");function xAe(t){return t.replace(/\./g,"\\.?").replace(ase,ose)}function Iq(t){return t.replace(/\./g,"").replace(ase," ").toLowerCase()}function lc(t,e){return t===null?null:{regex:RegExp(t.map(xAe).join("|")),deser:([n])=>t.findIndex(r=>Iq(n)===Iq(r))+e}}function Lq(t,e){return{regex:t,deser:([,n,r])=>L_(n,r),groups:e}}function KM(t){return{regex:t,deser:([e])=>e}}function SAe(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wAe(t,e){const n=ac(e),r=ac(e,"{2}"),s=ac(e,"{3}"),i=ac(e,"{4}"),o=ac(e,"{6}"),a=ac(e,"{1,2}"),l=ac(e,"{1,3}"),c=ac(e,"{1,6}"),d=ac(e,"{1,9}"),f=ac(e,"{2,4}"),p=ac(e,"{4,6}"),m=x=>({regex:RegExp(SAe(x.val)),deser:([w])=>w,literal:!0}),y=(x=>{if(t.literal)return m(x);switch(x.val){case"G":return lc(e.eras("short"),0);case"GG":return lc(e.eras("long"),0);case"y":return nr(c);case"yy":return nr(f,xL);case"yyyy":return nr(i);case"yyyyy":return nr(p);case"yyyyyy":return nr(o);case"M":return nr(a);case"MM":return nr(r);case"MMM":return lc(e.months("short",!0),1);case"MMMM":return lc(e.months("long",!0),1);case"L":return nr(a);case"LL":return nr(r);case"LLL":return lc(e.months("short",!1),1);case"LLLL":return lc(e.months("long",!1),1);case"d":return nr(a);case"dd":return nr(r);case"o":return nr(l);case"ooo":return nr(s);case"HH":return nr(r);case"H":return nr(a);case"hh":return nr(r);case"h":return nr(a);case"mm":return nr(r);case"m":return nr(a);case"q":return nr(a);case"qq":return nr(r);case"s":return nr(a);case"ss":return nr(r);case"S":return nr(l);case"SSS":return nr(s);case"u":return KM(d);case"uu":return KM(a);case"uuu":return nr(n);case"a":return lc(e.meridiems(),0);case"kkkk":return nr(i);case"kk":return nr(f,xL);case"W":return nr(a);case"WW":return nr(r);case"E":case"c":return nr(n);case"EEE":return lc(e.weekdays("short",!1),1);case"EEEE":return lc(e.weekdays("long",!1),1);case"ccc":return lc(e.weekdays("short",!0),1);case"cccc":return lc(e.weekdays("long",!0),1);case"Z":case"ZZ":return Lq(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return Lq(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return KM(/[a-z_+-/]{1,256}?/i);case" ":return KM(/[^\S\n\r]/);default:return m(x)}})(t)||{invalidReason:yAe};return y.token=t,y}const CAe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function EAe(t,e,n){const{type:r,value:s}=t;if(r==="literal"){const l=/^\s+$/.test(s);return{literal:!l,val:l?" ":s}}const i=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=CAe[o];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function MAe(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function DAe(t,e,n){const r=t.match(e);if(r){const s={};let i=1;for(const o in n)if(t1(n,o)){const a=n[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(r.slice(i,i+l))),i+=l}return[r,s]}else return[r,{}]}function kAe(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return fn(t.z)||(n=Yd.create(t.z)),fn(t.Z)||(n||(n=new $o(t.Z)),r=t.Z),fn(t.q)||(t.M=(t.q-1)*3+1),fn(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),fn(t.u)||(t.S=a$(t.u)),[Object.keys(t).reduce((i,o)=>{const a=e(o);return a&&(i[a]=t[o]),i},{}),n,r]}let m4=null;function TAe(){return m4||(m4=nt.fromMillis(1555555555555)),m4}function AAe(t,e){if(t.literal)return t;const n=oo.macroTokenToFormatOpts(t.val),r=use(n,e);return r==null||r.includes(void 0)?t:r}function lse(t,e){return Array.prototype.concat(...t.map(n=>AAe(n,e)))}function cse(t,e,n){const r=lse(oo.parseFormat(n),t),s=r.map(o=>wAe(o,t)),i=s.find(o=>o.invalidReason);if(i)return{input:e,tokens:r,invalidReason:i.invalidReason};{const[o,a]=MAe(s),l=RegExp(o,"i"),[c,d]=DAe(e,l,a),[f,p,m]=d?kAe(d):[null,null,void 0];if(t1(d,"a")&&t1(d,"H"))throw new Ry("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:d,result:f,zone:p,specificOffset:m}}}function _Ae(t,e,n){const{result:r,zone:s,specificOffset:i,invalidReason:o}=cse(t,e,n);return[r,s,i,o]}function use(t,e){if(!t)return null;const r=oo.create(e,t).dtFormatter(TAe()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(o=>EAe(o,t,i))}const g4="Invalid DateTime",Pq=864e13;function ZM(t){return new hc("unsupported zone",`the zone "${t.name}" is not supported`)}function v4(t){return t.weekData===null&&(t.weekData=aT(t.c)),t.weekData}function y4(t){return t.localWeekData===null&&(t.localWeekData=aT(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Zm(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new nt({...n,...e,old:n})}function dse(t,e,n){let r=t-e*60*1e3;const s=n.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=n.offset(r);return s===i?[r,s]:[t-Math.min(s,i)*60*1e3,Math.max(s,i)]}function JM(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function VD(t,e,n){return dse(I_(t),e,n)}function $q(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),s=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:r,month:s,day:Math.min(t.c.day,lT(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Yn.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=I_(i);let[l,c]=dse(a,n,t.zone);return o!==0&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function sx(t,e,n,r,s,i){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const l=e||a,c=nt.fromObject(t,{...n,zone:l,specificOffset:i});return o?c:c.setZone(a)}else return nt.invalid(new hc("unparsable",`the input "${s}" can't be parsed as ${r}`))}function XM(t,e,n=!0){return t.isValid?oo.create(Sr.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function b4(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Fs(t.c.year,n?6:4),e?(r+="-",r+=Fs(t.c.month),r+="-",r+=Fs(t.c.day)):(r+=Fs(t.c.month),r+=Fs(t.c.day)),r}function zq(t,e,n,r,s,i){let o=Fs(t.c.hour);return e?(o+=":",o+=Fs(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Fs(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Fs(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=Fs(t.c.millisecond,3))),s&&(t.isOffsetFixed&&t.offset===0&&!i?o+="Z":t.o<0?(o+="-",o+=Fs(Math.trunc(-t.o/60)),o+=":",o+=Fs(Math.trunc(-t.o%60))):(o+="+",o+=Fs(Math.trunc(t.o/60)),o+=":",o+=Fs(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const fse={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},OAe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},RAe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},pse=["year","month","day","hour","minute","second","millisecond"],NAe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],jAe=["year","ordinal","hour","minute","second","millisecond"];function IAe(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new mre(t);return e}function Fq(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return IAe(t)}}function Bq(t,e){const n=Ap(e.zone,ws.defaultZone),r=Sr.fromObject(e),s=ws.now();let i,o;if(fn(t.year))i=s;else{for(const c of pse)fn(t[c])&&(t[c]=fse[c]);const a=zre(t)||Fre(t);if(a)return nt.invalid(a);const l=n.offset(s);[i,o]=VD(t,l,n)}return new nt({ts:i,zone:n,loc:r,o})}function Hq(t,e,n){const r=fn(n.round)?!0:n.round,s=(o,a)=>(o=l$(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,a)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return s(i(n.unit),n.unit);for(const o of n.units){const a=i(o);if(Math.abs(a)>=1)return s(a,o)}return s(t>e?-0:0,n.units[n.units.length-1])}function qq(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class nt{constructor(e){const n=e.zone||ws.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new hc("invalid input"):null)||(n.isValid?null:ZM(n));this.ts=fn(e.ts)?ws.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[s,i]=[e.old.c,e.old.o];else{const a=n.offset(this.ts);s=JM(this.ts,a),r=Number.isNaN(s.year)?new hc("invalid input"):null,s=r?null:s,i=r?null:a}this._zone=n,this.loc=e.loc||Sr.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new nt({})}static local(){const[e,n]=qq(arguments),[r,s,i,o,a,l,c]=n;return Bq({year:r,month:s,day:i,hour:o,minute:a,second:l,millisecond:c},e)}static utc(){const[e,n]=qq(arguments),[r,s,i,o,a,l,c]=n;return e.zone=$o.utcInstance,Bq({year:r,month:s,day:i,hour:o,minute:a,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=uTe(e)?e.valueOf():NaN;if(Number.isNaN(r))return nt.invalid("invalid input");const s=Ap(n.zone,ws.defaultZone);return s.isValid?new nt({ts:r,zone:s,loc:Sr.fromObject(n)}):nt.invalid(ZM(s))}static fromMillis(e,n={}){if(Eg(e))return e<-Pq||e>Pq?nt.invalid("Timestamp out of range"):new nt({ts:e,zone:Ap(n.zone,ws.defaultZone),loc:Sr.fromObject(n)});throw new fa(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Eg(e))return new nt({ts:e*1e3,zone:Ap(n.zone,ws.defaultZone),loc:Sr.fromObject(n)});throw new fa("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=Ap(n.zone,ws.defaultZone);if(!r.isValid)return nt.invalid(ZM(r));const s=Sr.fromObject(n),i=cT(e,Fq),{minDaysInFirstWeek:o,startOfWeek:a}=Dq(i,s),l=ws.now(),c=fn(n.specificOffset)?r.offset(l):n.specificOffset,d=!fn(i.ordinal),f=!fn(i.year),p=!fn(i.month)||!fn(i.day),m=f||p,v=i.weekYear||i.weekNumber;if((m||d)&&v)throw new Ry("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&d)throw new Ry("Can't mix ordinal dates with month/day");const y=v||i.weekday&&!m;let x,w,C=JM(l,c);y?(x=NAe,w=OAe,C=aT(C,o,a)):d?(x=jAe,w=RAe,C=h4(C)):(x=pse,w=fse);let E=!1;for(const I of x){const $=i[I];fn($)?E?i[I]=w[I]:i[I]=C[I]:E=!0}const D=y?aTe(i,o,a):d?lTe(i):zre(i),T=D||Fre(i);if(T)return nt.invalid(T);const A=y?Eq(i,o,a):d?Mq(i):i,[_,R]=VD(A,c,r),N=new nt({ts:_,zone:r,o:R,loc:s});return i.weekday&&m&&e.weekday!==N.weekday?nt.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${N.toISO()}`):N}static fromISO(e,n={}){const[r,s]=QTe(e);return sx(r,s,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,s]=eAe(e);return sx(r,s,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,s]=tAe(e);return sx(r,s,n,"HTTP",n)}static fromFormat(e,n,r={}){if(fn(e)||fn(n))throw new fa("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,o=Sr.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[a,l,c,d]=_Ae(o,e,n);return d?nt.invalid(d):sx(a,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return nt.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,s]=lAe(e);return sx(r,s,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new fa("need to specify a reason the DateTime is invalid");const r=e instanceof hc?e:new hc(e,n);if(ws.throwOnInvalid)throw new Pke(r);return new nt({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=use(e,Sr.fromObject(n));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,n={}){return lse(oo.parseFormat(e),Sr.fromObject(n)).map(s=>s.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?v4(this).weekYear:NaN}get weekNumber(){return this.isValid?v4(this).weekNumber:NaN}get weekday(){return this.isValid?v4(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?y4(this).weekday:NaN}get localWeekNumber(){return this.isValid?y4(this).weekNumber:NaN}get localWeekYear(){return this.isValid?y4(this).weekYear:NaN}get ordinal(){return this.isValid?h4(this.c).ordinal:NaN}get monthShort(){return this.isValid?GM.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?GM.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?GM.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?GM.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=I_(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),o=this.zone.offset(r-s*n),a=this.zone.offset(r-i*n);if(o===a)return[this];const l=r-o*n,c=r-a*n,d=JM(l,o),f=JM(c,a);return d.hour===f.hour&&d.minute===f.minute&&d.second===f.second&&d.millisecond===f.millisecond?[Zm(this,{ts:l}),Zm(this,{ts:c})]:[this]}get isInLeapYear(){return Ow(this.year)}get daysInMonth(){return lT(this.year,this.month)}get daysInYear(){return this.isValid?By(this.year):NaN}get weeksInWeekYear(){return this.isValid?TS(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?TS(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:s}=oo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:s}}toUTC(e=0,n={}){return this.setZone($o.instance(e),n)}toLocal(){return this.setZone(ws.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Ap(e,ws.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(n||r){const i=e.offset(this.ts),o=this.toObject();[s]=VD(o,i,e)}return Zm(this,{ts:s,zone:e})}else return nt.invalid(ZM(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Zm(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=cT(e,Fq),{minDaysInFirstWeek:r,startOfWeek:s}=Dq(n,this.loc),i=!fn(n.weekYear)||!fn(n.weekNumber)||!fn(n.weekday),o=!fn(n.ordinal),a=!fn(n.year),l=!fn(n.month)||!fn(n.day),c=a||l,d=n.weekYear||n.weekNumber;if((c||o)&&d)throw new Ry("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Ry("Can't mix ordinal dates with month/day");let f;i?f=Eq({...aT(this.c,r,s),...n},r,s):fn(n.ordinal)?(f={...this.toObject(),...n},fn(n.day)&&(f.day=Math.min(lT(f.year,f.month),f.day))):f=Mq({...h4(this.c),...n});const[p,m]=VD(f,this.o,this.zone);return Zm(this,{ts:p,o:m})}plus(e){if(!this.isValid)return this;const n=Yn.fromDurationLike(e);return Zm(this,$q(this,n))}minus(e){if(!this.isValid)return this;const n=Yn.fromDurationLike(e).negate();return Zm(this,$q(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},s=Yn.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:o}=this;o<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?oo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):g4}toLocaleString(e=oT,n={}){return this.isValid?oo.create(this.loc.clone(n),e).formatDateTime(this):g4}toLocaleParts(e={}){return this.isValid?oo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=e==="extended";let a=b4(this,o);return a+="T",a+=zq(this,o,n,r,s,i),a}toISODate({format:e="extended"}={}){return this.isValid?b4(this,e==="extended"):null}toISOWeekDate(){return XM(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+zq(this,o==="extended",n,e,r,i):null}toRFC2822(){return XM(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return XM(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?b4(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(n||e)&&(r&&(s+=" "),n?s+="z":e&&(s+="ZZ")),XM(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():g4}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Yn.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=dTe(n).map(Yn.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,l=o?e:this,c=mAe(a,l,i,s);return o?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(nt.now(),e,n)}until(e){return this.isValid?es.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,r)<=s&&s<=i.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||nt.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),Hq(n,this.plus(r),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?Hq(e.base||nt.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(nt.isDateTime))throw new fa("min requires all arguments be DateTimes");return kq(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(nt.isDateTime))throw new fa("max requires all arguments be DateTimes");return kq(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:s=null,numberingSystem:i=null}=r,o=Sr.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return cse(o,e,n)}static fromStringExplain(e,n,r={}){return nt.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return oT}static get DATE_MED(){return gre}static get DATE_MED_WITH_WEEKDAY(){return Fke}static get DATE_FULL(){return vre}static get DATE_HUGE(){return yre}static get TIME_SIMPLE(){return bre}static get TIME_WITH_SECONDS(){return xre}static get TIME_WITH_SHORT_OFFSET(){return Sre}static get TIME_WITH_LONG_OFFSET(){return wre}static get TIME_24_SIMPLE(){return Cre}static get TIME_24_WITH_SECONDS(){return Ere}static get TIME_24_WITH_SHORT_OFFSET(){return Mre}static get TIME_24_WITH_LONG_OFFSET(){return Dre}static get DATETIME_SHORT(){return kre}static get DATETIME_SHORT_WITH_SECONDS(){return Tre}static get DATETIME_MED(){return Are}static get DATETIME_MED_WITH_SECONDS(){return _re}static get DATETIME_MED_WITH_WEEKDAY(){return Bke}static get DATETIME_FULL(){return Ore}static get DATETIME_FULL_WITH_SECONDS(){return Rre}static get DATETIME_HUGE(){return Nre}static get DATETIME_HUGE_WITH_SECONDS(){return jre}}function ix(t){if(nt.isDateTime(t))return t;if(t&&t.valueOf&&Eg(t.valueOf()))return nt.fromJSDate(t);if(t&&typeof t=="object")return nt.fromObject(t);throw new fa(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const uT=(t,e)=>nt.fromFormat(t,e).toJSDate(),LAe=(t,e)=>{const n=Math.abs(e.getTime()-t.getTime()),r=Math.floor(n/(1e3*60*60)),s=Math.floor(n%(1e3*60*60)/(1e3*60));return r>23?{hour:23,minute:s}:{hour:r,minute:s}},PAe=(t,e,n,r)=>{const s=nt.fromJSDate(t).startOf("day"),i=nt.local().zoneName||"UTC",o=nt.fromObject({year:e,month:n,day:r},{zone:i}).startOf("day");return s.equals(o)},Ca=t=>{const e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),s=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0");return e+"-"+n+"-"+r+"T"+s+":"+i+":"+o},xr=(t,e)=>new Date(nt.fromISO(Ca(t)).set(e).toFormat("MM/dd/yyyy hh:mm:ss a")),rr=(t,e)=>e==="dayOfWeek"?Number(nt.fromISO(Ca(t)).toFormat("E"))-1:e==="week"?0:nt.fromISO(Ca(t))[e],Es=(t,e)=>new Date(nt.fromISO(Ca(t)).plus(e).toFormat("MM/dd/yyyy hh:mm:ss a")),cv=(t,e)=>new Date(nt.fromISO(Ca(t)).minus(e).toFormat("MM/dd/yyyy hh:mm:ss a")),Lt=(t,e)=>e?new Date(nt.fromJSDate(t,{zone:e}).toFormat("MM/dd/yyyy hh:mm:ss a")):new Date(nt.fromJSDate(t).toFormat("MM/dd/yyyy hh:mm:ss a")),_n=(t,e)=>e?nt.fromISO(Ca(t),{zone:e}).toJSDate():nt.fromISO(Ca(t)).toJSDate(),ga=(t,e)=>nt.fromJSDate(t)<=nt.fromJSDate(e),q1=(t,e)=>nt.fromJSDate(t)>nt.fromJSDate(e),Uet=(t,e,n)=>nt.fromJSDate(n)<=nt.fromJSDate(e)&&nt.fromJSDate(n)>=nt.fromJSDate(t),kl=(t,e)=>new Date(nt.fromISO(Ca(t)).startOf(e).toFormat("MM/dd/yyyy hh:mm:ss a")),Iu=(t,e)=>new Date(nt.fromISO(Ca(t)).endOf(e).toFormat("MM/dd/yyyy hh:mm:ss a")),p$=(t,e,n)=>es.fromDateTimes(nt.fromJSDate(t),nt.fromJSDate(e)).length(n),Pp=t=>t?new Date(t):null,AS=t=>e=>t(Pp(e)),$Ae=t=>e=>{e==null?t(null):typeof e=="string"?t(Pp(e)):Array.isArray(e)?e.length===2?t([Pp(e[0]),Pp(e[1])]):t(e.map(Pp)):t(e)},St=(t,e,n,r="ru")=>n?nt.fromJSDate(t).toUTC().toFormat(e,{locale:r}):nt.fromJSDate(t).toFormat(e,{locale:r}),co=(t,e,n)=>nt.fromISO(Ca(t)).hasSame(nt.fromISO(Ca(e)),n),zAe=t=>nt.fromJSDate(t).toISODate()===nt.local().toISODate(),qx=t=>{const e=Iu(t,"month");return rr(e,"day")===rr(t,"day")},Ug=t=>{const n=nt.fromJSDate(_n(t)).day;return Math.floor((n-1)/7)+1},$_=(t,e)=>nt.fromJSDate(e).diff(nt.fromJSDate(t),["years","months","days","hours","minute","second"]).toObject(),hse=t=>nt.fromISO(Ca(t),{zone:"UTC-00:00"}).startOf("day").toISO(),mse=t=>nt.fromISO(Ca(t),{zone:"UTC-00:00"}).endOf("day").toISO(),Uq=(t,e=!1)=>{const n=nt.fromISO(t,{zone:"UTC"});return e?new Date(n.year,n.month-1,n.day,23,59,59,999):new Date(n.year,n.month-1,n.day,12,0,0)},SL=t=>nt.fromObject({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},{zone:"UTC"}).toISO()??"",gse=t=>nt.fromObject({year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},{zone:"UTC"}).endOf("day").toISO()??"",Vq=(t,e,n)=>new Date(nt.fromJSDate(t,{zone:e}).toFormat("MM/dd/yyyy hh:mm:ss a")),FAe=t=>{const e=nt.fromJSDate(_n(t)),n=e.plus({days:7});return e.month!==n.month};var mt=(t=>(t[t.Deny=-4096]="Deny",t[t.Read=0]="Read",t[t.Comment=1]="Comment",t[t.Write=4]="Write",t[t.Delete=8]="Delete",t[t.Full=512]="Full",t[t.OnlyUpload=-1024]="OnlyUpload",t[t.FreeBusy=-64]="FreeBusy",t[t.Upload=2]="Upload",t[t.Sharing=3]="Sharing",t[t.Save=16]="Save",t[t.EditRights=32]="EditRights",t[t.Lock=4096]="Lock",t))(mt||{}),vse=(t=>(t[t.Active=0]="Active",t[t.Deleted=1]="Deleted",t[t.Canceled=2]="Canceled",t))(vse||{}),rs=(t=>(t[t.Save=0]="Save",t[t.DoNotSaveParticipants=1]="DoNotSaveParticipants",t[t.Duplicate=2]="Duplicate",t))(rs||{});const BAe=t=>t===0?"never":t===1?"days":t===2?"weeks":t===3?"months":"years",HAe=(t,e)=>!t&&e?"date":t?"after":"never",qAe=t=>{if(!t)return null;const e={};let n=t;for(let r=6;r>=0;r--){const s=2**r;if(s<=n&&(e[s]=s$[r+1],n=n-s),n===0)break}return e},Sp=(t,e,n,r=!1)=>t.length?t.filter(s=>{var i,o;return!(((i=e[s.CalendarId])==null?void 0:i.accessType)===mt.FreeBusy&&s.IsFree||((o=e[s.CalendarId])==null?void 0:o.accessType)===mt.Read&&s.IsFree&&s.IsPrivate)}).map(s=>{var z,F,q,H,B,V;let i=!1;const{Count:o,DayNumber:a,DayOfWeek:l,EndDate:c,StartDate:d,Interval:f,Id:p,WeekNumber:m}=s.Recurring||{},{AttendingType:v,Description:y,AccessType:x}=s.ParticipantInfo||{},{color:w}=e[s.CalendarId]||{color:"#000"},C=p$(new Date(s.StartDate),new Date(s.EndDate),"hour"),E=s.TimeZoneId||null,D=s.EndTimeZoneId||null,T=E&&n?(z=n[E])==null?void 0:z.tzName:"",A=D&&n?(F=n[D])==null?void 0:F.tzName:"";(Number(C)>=23.99||s.IsAllDay)&&(i=!0);let _,R;s.IsAllDay&&typeof s.StartDate=="string"&&typeof s.EndDate=="string"?(_=Uq(s.StartDate),R=Uq(s.EndDate,!0)):(_=new Date(s.StartDate),R=new Date(s.EndDate));const N=BAe(s.Type),I=(q=e[s.CalendarId])==null?void 0:q.accessType,$=!s.IsFree&&(I===mt.FreeBusy||I===mt.Read&&s.IsPrivate)?ct("freeBusy.busy"):s.Name,L=structuredClone(s.Notifications||[]).map(Y=>({id:Y.Id,type:Number(Y.Type),intervalType:Number(Y.IntervalType),intervalCount:Number(Y.IntervalCount),order:Number(Y.Order),source:Number(Y.Source),allDayInterval:i?Y.AllDayInterval:"",notificationTime:Y.NotificationTime}));return{allDay:i,start:_,end:R,title:$,resource:{accessType:x??I??s.AccessType,isFree:s.IsFree||Rd.Busy,ownerId:s.OwnerId||null,organizerId:((H=s.Organizer)==null?void 0:H.ContactId)||s.OrganizerId||null,mainColor:w,location:s.Address,categoryId:s.CategoryId||0,calendarId:s.CalendarId,author:{name:((B=s.Organizer)==null?void 0:B.Name)||"",email:((V=s.Organizer)==null?void 0:V.Email)||""},saveType:s.SaveType,simpleNotifications:s.IsAllDay?[]:L,allDayNotifications:s.IsAllDay?L:[],isBusyMode:r,startTimeZoneId:E,endTimeZoneId:D,startTimeZoneTzName:T,endTimeZoneTzName:A,isPrivate:s.IsPrivate,isCanceled:s.Status===vse.Canceled,isRecurringSeriesCanceled:s.IsRecurrenceCanceled||!1,participantInfo:{attendingType:v,accessTypeGuests:s.AccessType??0,accessType:x??I??mt.Full,description:y||""},hasMaterials:!!s.HasMaterials,hasParticipant:!!s.HasParticipant,documents:[],documentsPermissions:null,description:s.Description,isAllDayWithoutTime:s.IsAllDay,contactParticipants:s.Participants?s.Participants.map(Y=>({id:Y.ContactId,email:Y.Email||"",name:Y.Name||"",userId:Y.UserId||0,attendingType:Y.AttendingType||null,description:Y.Description||"",hasAvatar:Y.HasAvatar})):[],recurring:{endEventRecurring:HAe(o||null,c||null),repeatPeriod:N,repeatValue:f||null,endDateEventRecurring:c?new Date(c):null,startDateEventRecurring:d?new Date(d):null,endEventRecurringAfter:o||null,choosedWeekDays:qAe(l||null),weekNumber:m||null,dayOfWeek:l||null,dayNumber:a||null,monthNumber:null,recurringId:p||null}},id:String(s.Id)}}):[],UAe=(t,e,n=null)=>typeof t=="number"||t===null?t:e==="months"?n:e==="weeks"||e==="years"?Object.keys(t).map(r=>Number(r)).reduce((r,s)=>r+s):null,VAe=t=>t==="days"?1:t==="weeks"?2:t==="months"?3:t==="years"?4:0,h$=t=>{const{resource:e,allDay:n}=t,{accessType:r,categoryId:s,location:i,isAllDayWithoutTime:o,calendarId:a,recurring:l,contactParticipants:c,description:d,participantInfo:f,ownerId:p,simpleNotifications:m,allDayNotifications:v,saveType:y,hasMaterials:x,startTimeZoneId:w,endTimeZoneId:C}=e;let E=t.start,D=t.end;o&&(E=SL(t.start),D=gse(t.end));const{repeatValue:T,repeatPeriod:A,endEventRecurring:_,endDateEventRecurring:R,endEventRecurringAfter:N,choosedWeekDays:I,dayNumber:$,monthNumber:L,recurringId:z,weekNumber:F,dayOfWeek:q}=l,{attendingType:H,accessTypeGuests:B,accessType:V,description:Y}=f;let G={},W={};z&&(G={Id:z}),p&&(W={OwnerId:p});const Z=n?v:m;return{AccessType:r,Name:t.title,Description:d||"",StartDate:E,EndDate:D,IsAllDay:o,IsFree:Number(t.resource.isFree),CalendarId:Number(a)||1,CategoryId:s||0,Type:VAe(A),Notifications:(Z==null?void 0:Z.map(Q=>({Id:Q.id,Type:Q.type,Order:Q.order,Source:Q.source,IntervalType:Q.intervalType,IntervalCount:Q.intervalCount,NotificationTime:Q.notificationTime,AllDayInterval:Q.allDayInterval})))||[],Status:1,Address:i||"",Place:null,IsPrivate:e.isPrivate,HasMaterials:x,SaveType:y??rs.Save,TimeZoneId:w,EndTimeZoneId:C,ParticipantInfo:{AttendingType:H,AccessType:V,Description:Y},Recurring:A===null||A==="never"?null:{StartDate:E,EndDate:_==="date"?_n(Iu(R||new Date,"day")):null,Count:_==="after"?N||5:null,Interval:T||1,Hours:typeof E=="string"?new Date(E).getUTCHours():rr(Lt(t.start),"hour"),Minutes:typeof E=="string"?new Date(E).getUTCMinutes():rr(Lt(t.start),"minute"),Seconds:0,DayNumber:A==="months"||A==="years"?$:null,MonthNumber:A==="years"?Number(L):null,WeekNumber:F,DayOfWeek:UAe(I,A,q),...G},Participants:(c||[]).map(Q=>({ContactId:Q.id,AccessType:B||0})),GroupParticipants:null,...W}},m$=(t,e,n)=>{const r=e!=="Deleted"?h$(t):null,{toDateTo:s,startDate:i,endDate:o}=n||{startDate:t.start,endDate:t.end};let a,l,c;return r&&(r.Id=Number(t.id)),a=i,l=o||null,c=s||null,t.resource.isAllDayWithoutTime&&(a instanceof Date&&(a=SL(a)),c instanceof Date&&(c=SL(c)),l instanceof Date&&(l=gse(l))),{EventId:Number(t.id||1),StartDate:a,EndDate:l,ToDate:c,Status:e,event:r}},yse="/api/",Vet=1,Ja="sm";function bse(t,e){return function(){return t.apply(e,arguments)}}const{toString:WAe}=Object.prototype,{getPrototypeOf:g$}=Object,{iterator:z_,toStringTag:xse}=Symbol,F_=(t=>e=>{const n=WAe.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kc=t=>(t=t.toLowerCase(),e=>F_(e)===t),B_=t=>e=>typeof e===t,{isArray:U1}=Array,n1=B_("undefined");function jw(t){return t!==null&&!n1(t)&&t.constructor!==null&&!n1(t.constructor)&&va(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Sse=kc("ArrayBuffer");function YAe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Sse(t.buffer),e}const GAe=B_("string"),va=B_("function"),wse=B_("number"),Iw=t=>t!==null&&typeof t=="object",KAe=t=>t===!0||t===!1,WD=t=>{if(F_(t)!=="object")return!1;const e=g$(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(xse in t)&&!(z_ in t)},ZAe=t=>{if(!Iw(t)||jw(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},JAe=kc("Date"),XAe=kc("File"),QAe=kc("Blob"),e_e=kc("FileList"),t_e=t=>Iw(t)&&va(t.pipe),n_e=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||va(t.append)&&((e=F_(t))==="formdata"||e==="object"&&va(t.toString)&&t.toString()==="[object FormData]"))},r_e=kc("URLSearchParams"),[s_e,i_e,o_e,a_e]=["ReadableStream","Request","Response","Headers"].map(kc),l_e=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lw(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),U1(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(jw(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function Cse(t,e){if(jw(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const hg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ese=t=>!n1(t)&&t!==hg;function wL(){const{caseless:t,skipUndefined:e}=Ese(this)&&this||{},n={},r=(s,i)=>{const o=t&&Cse(n,i)||i;WD(n[o])&&WD(s)?n[o]=wL(n[o],s):WD(s)?n[o]=wL({},s):U1(s)?n[o]=s.slice():(!e||!n1(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&Lw(arguments[s],r);return n}const c_e=(t,e,n,{allOwnKeys:r}={})=>(Lw(e,(s,i)=>{n&&va(s)?t[i]=bse(s,n):t[i]=s},{allOwnKeys:r}),t),u_e=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),d_e=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},f_e=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&g$(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},p_e=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},h_e=t=>{if(!t)return null;if(U1(t))return t;let e=t.length;if(!wse(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},m_e=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&g$(Uint8Array)),g_e=(t,e)=>{const r=(t&&t[z_]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},v_e=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},y_e=kc("HTMLFormElement"),b_e=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Wq=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),x_e=kc("RegExp"),Mse=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Lw(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},S_e=t=>{Mse(t,(e,n)=>{if(va(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(va(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},w_e=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return U1(t)?r(t):r(String(t).split(e)),n},C_e=()=>{},E_e=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function M_e(t){return!!(t&&va(t.append)&&t[xse]==="FormData"&&t[z_])}const D_e=t=>{const e=new Array(10),n=(r,s)=>{if(Iw(r)){if(e.indexOf(r)>=0)return;if(jw(r))return r;if(!("toJSON"in r)){e[s]=r;const i=U1(r)?[]:{};return Lw(r,(o,a)=>{const l=n(o,s+1);!n1(l)&&(i[a]=l)}),e[s]=void 0,i}}return r};return n(t,0)},k_e=kc("AsyncFunction"),T_e=t=>t&&(Iw(t)||va(t))&&va(t.then)&&va(t.catch),Dse=((t,e)=>t?setImmediate:e?((n,r)=>(hg.addEventListener("message",({source:s,data:i})=>{s===hg&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),hg.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",va(hg.postMessage)),A_e=typeof queueMicrotask<"u"?queueMicrotask.bind(hg):typeof process<"u"&&process.nextTick||Dse,__e=t=>t!=null&&va(t[z_]),$e={isArray:U1,isArrayBuffer:Sse,isBuffer:jw,isFormData:n_e,isArrayBufferView:YAe,isString:GAe,isNumber:wse,isBoolean:KAe,isObject:Iw,isPlainObject:WD,isEmptyObject:ZAe,isReadableStream:s_e,isRequest:i_e,isResponse:o_e,isHeaders:a_e,isUndefined:n1,isDate:JAe,isFile:XAe,isBlob:QAe,isRegExp:x_e,isFunction:va,isStream:t_e,isURLSearchParams:r_e,isTypedArray:m_e,isFileList:e_e,forEach:Lw,merge:wL,extend:c_e,trim:l_e,stripBOM:u_e,inherits:d_e,toFlatObject:f_e,kindOf:F_,kindOfTest:kc,endsWith:p_e,toArray:h_e,forEachEntry:g_e,matchAll:v_e,isHTMLForm:y_e,hasOwnProperty:Wq,hasOwnProp:Wq,reduceDescriptors:Mse,freezeMethods:S_e,toObjectSet:w_e,toCamelCase:b_e,noop:C_e,toFiniteNumber:E_e,findKey:Cse,global:hg,isContextDefined:Ese,isSpecCompliantForm:M_e,toJSONObject:D_e,isAsyncFn:k_e,isThenable:T_e,setImmediate:Dse,asap:A_e,isIterable:__e};function yn(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}$e.inherits(yn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:$e.toJSONObject(this.config),code:this.code,status:this.status}}});const kse=yn.prototype,Tse={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Tse[t]={value:t}});Object.defineProperties(yn,Tse);Object.defineProperty(kse,"isAxiosError",{value:!0});yn.from=(t,e,n,r,s,i)=>{const o=Object.create(kse);$e.toFlatObject(t,o,function(d){return d!==Error.prototype},c=>c!=="isAxiosError");const a=t&&t.message?t.message:"Error",l=e==null&&t?t.code:e;return yn.call(o,a,l,n,r,s),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",i&&Object.assign(o,i),o};const O_e=null;function CL(t){return $e.isPlainObject(t)||$e.isArray(t)}function Ase(t){return $e.endsWith(t,"[]")?t.slice(0,-2):t}function Yq(t,e,n){return t?t.concat(e).map(function(s,i){return s=Ase(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function R_e(t){return $e.isArray(t)&&!t.some(CL)}const N_e=$e.toFlatObject($e,{},null,function(e){return/^is[A-Z]/.test(e)});function H_(t,e,n){if(!$e.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=$e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,x){return!$e.isUndefined(x[y])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&$e.isSpecCompliantForm(e);if(!$e.isFunction(s))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if($e.isDate(v))return v.toISOString();if($e.isBoolean(v))return v.toString();if(!l&&$e.isBlob(v))throw new yn("Blob is not supported. Use a Buffer instead.");return $e.isArrayBuffer(v)||$e.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,y,x){let w=v;if(v&&!x&&typeof v=="object"){if($e.endsWith(y,"{}"))y=r?y:y.slice(0,-2),v=JSON.stringify(v);else if($e.isArray(v)&&R_e(v)||($e.isFileList(v)||$e.endsWith(y,"[]"))&&(w=$e.toArray(v)))return y=Ase(y),w.forEach(function(E,D){!($e.isUndefined(E)||E===null)&&e.append(o===!0?Yq([y],D,i):o===null?y:y+"[]",c(E))}),!1}return CL(v)?!0:(e.append(Yq(x,y,i),c(v)),!1)}const f=[],p=Object.assign(N_e,{defaultVisitor:d,convertValue:c,isVisitable:CL});function m(v,y){if(!$e.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(v),$e.forEach(v,function(w,C){(!($e.isUndefined(w)||w===null)&&s.call(e,w,$e.isString(C)?C.trim():C,y,p))===!0&&m(w,y?y.concat(C):[C])}),f.pop()}}if(!$e.isObject(t))throw new TypeError("data must be an object");return m(t),e}function Gq(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function v$(t,e){this._pairs=[],t&&H_(t,this,e)}const _se=v$.prototype;_se.append=function(e,n){this._pairs.push([e,n])};_se.toString=function(e){const n=e?function(r){return e.call(this,r,Gq)}:Gq;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function j_e(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ose(t,e,n){if(!e)return t;const r=n&&n.encode||j_e;$e.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(e,n):i=$e.isURLSearchParams(e)?e.toString():new v$(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Kq{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){$e.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Rse={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},I_e=typeof URLSearchParams<"u"?URLSearchParams:v$,L_e=typeof FormData<"u"?FormData:null,P_e=typeof Blob<"u"?Blob:null,$_e={isBrowser:!0,classes:{URLSearchParams:I_e,FormData:L_e,Blob:P_e},protocols:["http","https","file","blob","url","data"]},y$=typeof window<"u"&&typeof document<"u",EL=typeof navigator=="object"&&navigator||void 0,z_e=y$&&(!EL||["ReactNative","NativeScript","NS"].indexOf(EL.product)<0),F_e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",B_e=y$&&window.location.href||"http://localhost",H_e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:y$,hasStandardBrowserEnv:z_e,hasStandardBrowserWebWorkerEnv:F_e,navigator:EL,origin:B_e},Symbol.toStringTag,{value:"Module"})),ao={...H_e,...$_e};function q_e(t,e){return H_(t,new ao.classes.URLSearchParams,{visitor:function(n,r,s,i){return ao.isNode&&$e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function U_e(t){return $e.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function V_e(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function Nse(t){function e(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&$e.isArray(s)?s.length:o,l?($e.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!$e.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&$e.isArray(s[o])&&(s[o]=V_e(s[o])),!a)}if($e.isFormData(t)&&$e.isFunction(t.entries)){const n={};return $e.forEachEntry(t,(r,s)=>{e(U_e(r),s,n,0)}),n}return null}function W_e(t,e,n){if($e.isString(t))try{return(e||JSON.parse)(t),$e.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Pw={transitional:Rse,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=$e.isObject(e);if(i&&$e.isHTMLForm(e)&&(e=new FormData(e)),$e.isFormData(e))return s?JSON.stringify(Nse(e)):e;if($e.isArrayBuffer(e)||$e.isBuffer(e)||$e.isStream(e)||$e.isFile(e)||$e.isBlob(e)||$e.isReadableStream(e))return e;if($e.isArrayBufferView(e))return e.buffer;if($e.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return q_e(e,this.formSerializer).toString();if((a=$e.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return H_(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),W_e(e)):e}],transformResponse:[function(e){const n=this.transitional||Pw.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if($e.isResponse(e)||$e.isReadableStream(e))return e;if(e&&$e.isString(e)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?yn.from(a,yn.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ao.classes.FormData,Blob:ao.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$e.forEach(["delete","get","head","post","put","patch"],t=>{Pw.headers[t]={}});const Y_e=$e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),G_e=t=>{const e={};let n,r,s;return t&&t.split(`
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||e[n]&&Y_e[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Zq=Symbol("internals");function ox(t){return t&&String(t).trim().toLowerCase()}function YD(t){return t===!1||t==null?t:$e.isArray(t)?t.map(YD):String(t)}function K_e(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Z_e=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function x4(t,e,n,r,s){if($e.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!$e.isString(e)){if($e.isString(r))return e.indexOf(r)!==-1;if($e.isRegExp(r))return r.test(e)}}function J_e(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function X_e(t,e){const n=$e.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,o){return this[r].call(this,e,s,i,o)},configurable:!0})})}let ya=class{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(a,l,c){const d=ox(l);if(!d)throw new Error("header name must be a non-empty string");const f=$e.findKey(s,d);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=YD(a))}const o=(a,l)=>$e.forEach(a,(c,d)=>i(c,d,l));if($e.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if($e.isString(e)&&(e=e.trim())&&!Z_e(e))o(G_e(e),n);else if($e.isObject(e)&&$e.isIterable(e)){let a={},l,c;for(const d of e){if(!$e.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[c=d[0]]=(l=a[c])?$e.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=ox(e),e){const r=$e.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return K_e(s);if($e.isFunction(n))return n.call(this,s,r);if($e.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ox(e),e){const r=$e.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||x4(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(o){if(o=ox(o),o){const a=$e.findKey(r,o);a&&(!n||x4(r,r[a],a,n))&&(delete r[a],s=!0)}}return $e.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||x4(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return $e.forEach(this,(s,i)=>{const o=$e.findKey(r,i);if(o){n[o]=YD(s),delete n[i];return}const a=e?J_e(i):String(i).trim();a!==i&&delete n[i],n[a]=YD(s),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return $e.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&$e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[Zq]=this[Zq]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=ox(o);r[a]||(X_e(s,o),r[a]=!0)}return $e.isArray(e)?e.forEach(i):i(e),this}};ya.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);$e.reduceDescriptors(ya.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});$e.freezeMethods(ya);function S4(t,e){const n=this||Pw,r=e||n,s=ya.from(r.headers);let i=r.data;return $e.forEach(t,function(a){i=a.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function jse(t){return!!(t&&t.__CANCEL__)}function V1(t,e,n){yn.call(this,t??"canceled",yn.ERR_CANCELED,e,n),this.name="CanceledError"}$e.inherits(V1,yn,{__CANCEL__:!0});function Ise(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new yn("Request failed with status code "+n.status,[yn.ERR_BAD_REQUEST,yn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Q_e(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function e3e(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=r[i];o||(o=c),n[s]=l,r[s]=c;let f=i,p=0;for(;f!==s;)p+=n[f++],f=f%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),c-o<e)return;const m=d&&c-d;return m?Math.round(p*1e3/m):void 0}}function t3e(t,e){let n=0,r=1e3/e,s,i;const o=(c,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),t(...c)};return[(...c)=>{const d=Date.now(),f=d-n;f>=r?o(c,d):(s=c,i||(i=setTimeout(()=>{i=null,o(s)},r-f)))},()=>s&&o(s)]}const dT=(t,e,n=3)=>{let r=0;const s=e3e(50,250);return t3e(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,c=s(l),d=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&d?(a-o)/c:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},Jq=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Xq=t=>(...e)=>$e.asap(()=>t(...e)),n3e=ao.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ao.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ao.origin),ao.navigator&&/(msie|trident)/i.test(ao.navigator.userAgent)):()=>!0,r3e=ao.hasStandardBrowserEnv?{write(t,e,n,r,s,i,o){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];$e.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),$e.isString(r)&&a.push(`path=${r}`),$e.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),$e.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function s3e(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function i3e(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Lse(t,e,n){let r=!s3e(e);return t&&(r||n==!1)?i3e(t,e):e}const Qq=t=>t instanceof ya?{...t}:t;function Vg(t,e){e=e||{};const n={};function r(c,d,f,p){return $e.isPlainObject(c)&&$e.isPlainObject(d)?$e.merge.call({caseless:p},c,d):$e.isPlainObject(d)?$e.merge({},d):$e.isArray(d)?d.slice():d}function s(c,d,f,p){if($e.isUndefined(d)){if(!$e.isUndefined(c))return r(void 0,c,f,p)}else return r(c,d,f,p)}function i(c,d){if(!$e.isUndefined(d))return r(void 0,d)}function o(c,d){if($e.isUndefined(d)){if(!$e.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c,d,f){if(f in e)return r(c,d);if(f in t)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,d,f)=>s(Qq(c),Qq(d),f,!0)};return $e.forEach(Object.keys({...t,...e}),function(d){const f=l[d]||s,p=f(t[d],e[d],d);$e.isUndefined(p)&&f!==a||(n[d]=p)}),n}const Pse=t=>{const e=Vg({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;if(e.headers=o=ya.from(o),e.url=Ose(Lse(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),$e.isFormData(n)){if(ao.hasStandardBrowserEnv||ao.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if($e.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([d,f])=>{c.includes(d.toLowerCase())&&o.set(d,f)})}}if(ao.hasStandardBrowserEnv&&(r&&$e.isFunction(r)&&(r=r(e)),r||r!==!1&&n3e(e.url))){const l=s&&i&&r3e.read(i);l&&o.set(s,l)}return e},o3e=typeof XMLHttpRequest<"u",a3e=o3e&&function(t){return new Promise(function(n,r){const s=Pse(t);let i=s.data;const o=ya.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=s,d,f,p,m,v;function y(){m&&m(),v&&v(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let x=new XMLHttpRequest;x.open(s.method.toUpperCase(),s.url,!0),x.timeout=s.timeout;function w(){if(!x)return;const E=ya.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:E,config:t,request:x};Ise(function(_){n(_),y()},function(_){r(_),y()},T),x=null}"onloadend"in x?x.onloadend=w:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(w)},x.onabort=function(){x&&(r(new yn("Request aborted",yn.ECONNABORTED,t,x)),x=null)},x.onerror=function(D){const T=D&&D.message?D.message:"Network Error",A=new yn(T,yn.ERR_NETWORK,t,x);A.event=D||null,r(A),x=null},x.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||Rse;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new yn(D,T.clarifyTimeoutError?yn.ETIMEDOUT:yn.ECONNABORTED,t,x)),x=null},i===void 0&&o.setContentType(null),"setRequestHeader"in x&&$e.forEach(o.toJSON(),function(D,T){x.setRequestHeader(T,D)}),$e.isUndefined(s.withCredentials)||(x.withCredentials=!!s.withCredentials),a&&a!=="json"&&(x.responseType=s.responseType),c&&([p,v]=dT(c,!0),x.addEventListener("progress",p)),l&&x.upload&&([f,m]=dT(l),x.upload.addEventListener("progress",f),x.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(d=E=>{x&&(r(!E||E.type?new V1(null,t,x):E),x.abort(),x=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const C=Q_e(s.url);if(C&&ao.protocols.indexOf(C)===-1){r(new yn("Unsupported protocol "+C+":",yn.ERR_BAD_REQUEST,t));return}x.send(i||null)})},l3e=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(c){if(!s){s=!0,a();const d=c instanceof Error?c:this.reason;r.abort(d instanceof yn?d:new V1(d instanceof Error?d.message:d))}};let o=e&&setTimeout(()=>{o=null,i(new yn(`timeout ${e} of ms exceeded`,yn.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),t=null)};t.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>$e.asap(a),l}},c3e=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},u3e=async function*(t,e){for await(const n of d3e(t))yield*c3e(n,e)},d3e=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},eU=(t,e,n,r)=>{const s=u3e(t,e);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:d}=await s.next();if(c){a(),l.close();return}let f=d.byteLength;if(n){let p=i+=f;n(p)}l.enqueue(new Uint8Array(d))}catch(c){throw a(c),c}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},tU=64*1024,{isFunction:QM}=$e,f3e=(({Request:t,Response:e})=>({Request:t,Response:e}))($e.global),{ReadableStream:nU,TextEncoder:rU}=$e.global,sU=(t,...e)=>{try{return!!t(...e)}catch{return!1}},p3e=t=>{t=$e.merge.call({skipUndefined:!0},f3e,t);const{fetch:e,Request:n,Response:r}=t,s=e?QM(e):typeof fetch=="function",i=QM(n),o=QM(r);if(!s)return!1;const a=s&&QM(nU),l=s&&(typeof rU=="function"?(v=>y=>v.encode(y))(new rU):async v=>new Uint8Array(await new n(v).arrayBuffer())),c=i&&a&&sU(()=>{let v=!1;const y=new n(ao.origin,{body:new nU,method:"POST",get duplex(){return v=!0,"half"}}).headers.has("Content-Type");return v&&!y}),d=o&&a&&sU(()=>$e.isReadableStream(new r("").body)),f={stream:d&&(v=>v.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(v=>{!f[v]&&(f[v]=(y,x)=>{let w=y&&y[v];if(w)return w.call(y);throw new yn(`Response type '${v}' is not supported`,yn.ERR_NOT_SUPPORT,x)})});const p=async v=>{if(v==null)return 0;if($e.isBlob(v))return v.size;if($e.isSpecCompliantForm(v))return(await new n(ao.origin,{method:"POST",body:v}).arrayBuffer()).byteLength;if($e.isArrayBufferView(v)||$e.isArrayBuffer(v))return v.byteLength;if($e.isURLSearchParams(v)&&(v=v+""),$e.isString(v))return(await l(v)).byteLength},m=async(v,y)=>{const x=$e.toFiniteNumber(v.getContentLength());return x??p(y)};return async v=>{let{url:y,method:x,data:w,signal:C,cancelToken:E,timeout:D,onDownloadProgress:T,onUploadProgress:A,responseType:_,headers:R,withCredentials:N="same-origin",fetchOptions:I}=Pse(v),$=e||fetch;_=_?(_+"").toLowerCase():"text";let L=l3e([C,E&&E.toAbortSignal()],D),z=null;const F=L&&L.unsubscribe&&(()=>{L.unsubscribe()});let q;try{if(A&&c&&x!=="get"&&x!=="head"&&(q=await m(R,w))!==0){let W=new n(y,{method:"POST",body:w,duplex:"half"}),Z;if($e.isFormData(w)&&(Z=W.headers.get("content-type"))&&R.setContentType(Z),W.body){const[Q,X]=Jq(q,dT(Xq(A)));w=eU(W.body,tU,Q,X)}}$e.isString(N)||(N=N?"include":"omit");const H=i&&"credentials"in n.prototype,B={...I,signal:L,method:x.toUpperCase(),headers:R.normalize().toJSON(),body:w,duplex:"half",credentials:H?N:void 0};z=i&&new n(y,B);let V=await(i?$(z,I):$(y,B));const Y=d&&(_==="stream"||_==="response");if(d&&(T||Y&&F)){const W={};["status","statusText","headers"].forEach(re=>{W[re]=V[re]});const Z=$e.toFiniteNumber(V.headers.get("content-length")),[Q,X]=T&&Jq(Z,dT(Xq(T),!0))||[];V=new r(eU(V.body,tU,Q,()=>{X&&X(),F&&F()}),W)}_=_||"text";let G=await f[$e.findKey(f,_)||"text"](V,v);return!Y&&F&&F(),await new Promise((W,Z)=>{Ise(W,Z,{data:G,headers:ya.from(V.headers),status:V.status,statusText:V.statusText,config:v,request:z})})}catch(H){throw F&&F(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new yn("Network Error",yn.ERR_NETWORK,v,z),{cause:H.cause||H}):yn.from(H,H&&H.code,v,z)}}},h3e=new Map,$se=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:s}=e,i=[r,s,n];let o=i.length,a=o,l,c,d=h3e;for(;a--;)l=i[a],c=d.get(l),c===void 0&&d.set(l,c=a?new Map:p3e(e)),d=c;return c};$se();const b$={http:O_e,xhr:a3e,fetch:{get:$se}};$e.forEach(b$,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const iU=t=>`- ${t}`,m3e=t=>$e.isFunction(t)||t===null||t===!1;function g3e(t,e){t=$e.isArray(t)?t:[t];const{length:n}=t;let r,s;const i={};for(let o=0;o<n;o++){r=t[o];let a;if(s=r,!m3e(r)&&(s=b$[(a=String(r)).toLowerCase()],s===void 0))throw new yn(`Unknown adapter '${a}'`);if(s&&($e.isFunction(s)||(s=s.get(e))))break;i[a||"#"+o]=s}if(!s){const o=Object.entries(i).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since :
`+o.map(iU).join(`
`):" "+iU(o[0]):"as no adapter specified";throw new yn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const zse={getAdapter:g3e,adapters:b$};function w4(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new V1(null,t)}function oU(t){return w4(t),t.headers=ya.from(t.headers),t.data=S4.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),zse.getAdapter(t.adapter||Pw.adapter,t)(t).then(function(r){return w4(t),r.data=S4.call(t,t.transformResponse,r),r.headers=ya.from(r.headers),r},function(r){return jse(r)||(w4(t),r&&r.response&&(r.response.data=S4.call(t,t.transformResponse,r.response),r.response.headers=ya.from(r.response.headers))),Promise.reject(r)})}const Fse="1.13.2",q_={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{q_[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const aU={};q_.transitional=function(e,n,r){function s(i,o){return"[Axios v"+Fse+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new yn(s(o," has been removed"+(n?" in "+n:"")),yn.ERR_DEPRECATED);return n&&!aU[o]&&(aU[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};q_.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function v3e(t,e,n){if(typeof t!="object")throw new yn("options must be an object",yn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const a=t[i],l=a===void 0||o(a,i,t);if(l!==!0)throw new yn("option "+i+" must be "+l,yn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new yn("Unknown option "+i,yn.ERR_BAD_OPTION)}}const GD={assertOptions:v3e,validators:q_},cu=GD.validators;let Mg=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Kq,response:new Kq}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Vg(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&GD.assertOptions(r,{silentJSONParsing:cu.transitional(cu.boolean),forcedJSONParsing:cu.transitional(cu.boolean),clarifyTimeoutError:cu.transitional(cu.boolean)},!1),s!=null&&($e.isFunction(s)?n.paramsSerializer={serialize:s}:GD.assertOptions(s,{encode:cu.function,serialize:cu.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),GD.assertOptions(n,{baseUrl:cu.spelling("baseURL"),withXsrfToken:cu.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&$e.merge(i.common,i[n.method]);i&&$e.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=ya.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!l){const v=[oU.bind(this),void 0];for(v.unshift(...a),v.push(...c),p=v.length,d=Promise.resolve(n);f<p;)d=d.then(v[f++],v[f++]);return d}p=a.length;let m=n;for(;f<p;){const v=a[f++],y=a[f++];try{m=v(m)}catch(x){y.call(this,x);break}}try{d=oU.call(this,m)}catch(v){return Promise.reject(v)}for(f=0,p=c.length;f<p;)d=d.then(c[f++],c[f++]);return d}getUri(e){e=Vg(this.defaults,e);const n=Lse(e.baseURL,e.url,e.allowAbsoluteUrls);return Ose(n,e.params,e.paramsSerializer)}};$e.forEach(["delete","get","head","options"],function(e){Mg.prototype[e]=function(n,r){return this.request(Vg(r||{},{method:e,url:n,data:(r||{}).data}))}});$e.forEach(["post","put","patch"],function(e){function n(r){return function(i,o,a){return this.request(Vg(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Mg.prototype[e]=n(),Mg.prototype[e+"Form"]=n(!0)});let y3e=class Bse{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,a){r.reason||(r.reason=new V1(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Bse(function(s){e=s}),cancel:e}}};function b3e(t){return function(n){return t.apply(null,n)}}function x3e(t){return $e.isObject(t)&&t.isAxiosError===!0}const ML={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ML).forEach(([t,e])=>{ML[e]=t});function Hse(t){const e=new Mg(t),n=bse(Mg.prototype.request,e);return $e.extend(n,Mg.prototype,e,{allOwnKeys:!0}),$e.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Hse(Vg(t,s))},n}const Kr=Hse(Pw);Kr.Axios=Mg;Kr.CanceledError=V1;Kr.CancelToken=y3e;Kr.isCancel=jse;Kr.VERSION=Fse;Kr.toFormData=H_;Kr.AxiosError=yn;Kr.Cancel=Kr.CanceledError;Kr.all=function(e){return Promise.all(e)};Kr.spread=b3e;Kr.isAxiosError=x3e;Kr.mergeConfig=Vg;Kr.AxiosHeaders=ya;Kr.formToJSON=t=>Nse($e.isHTMLForm(t)?new FormData(t):t);Kr.getAdapter=zse.getAdapter;Kr.HttpStatusCode=ML;Kr.default=Kr;const{Axios:Get,AxiosError:S3e,CanceledError:Ket,isCancel:Zet,CancelToken:Jet,VERSION:Xet,all:Qet,Cancel:ett,isAxiosError:ttt,spread:ntt,toFormData:rtt,AxiosHeaders:stt,HttpStatusCode:ci,formToJSON:itt,getAdapter:ott,mergeConfig:att}=Kr;function w3e(t){let e=t,n=!1;const r=new Set;return{getState(){return e},updateState(s){e=typeof s=="function"?s(e):s},setState(s){this.updateState(s),r.forEach(i=>i(e))},initialize(s){n||(e=s,n=!0)},subscribe(s){return r.add(s),()=>r.delete(s)}}}function C3e(t){return O.useSyncExternalStore(t.subscribe,()=>t.getState(),()=>t.getState())}function E3e(t,e,n){const r=[],s=[],i={};for(const o of t){const a=o.position||e;i[a]=i[a]||0,i[a]+=1,i[a]<=n?s.push(o):r.push(o)}return{notifications:s,queue:r}}const M3e=()=>w3e({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),uv=M3e(),D3e=(t=uv)=>C3e(t);function W1(t,e){const n=t.getState(),r=e([...n.notifications,...n.queue]),s=E3e(r,n.defaultPosition,n.limit);t.setState({notifications:s.notifications,queue:s.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function KD(t,e=uv){const n=t.id||Sg();return W1(e,r=>t.id&&r.some(s=>s.id===t.id)?r:[...r,{...t,id:n}]),n}function qse(t,e=uv){return W1(e,n=>n.filter(r=>{var s;return r.id===t?((s=r.onClose)==null||s.call(r,r),!1):!0})),t}function k3e(t,e=uv){return W1(e,n=>n.map(r=>r.id===t.id?{...r,...t}:r)),t.id}function T3e(t=uv){W1(t,()=>[])}function A3e(t=uv){W1(t,e=>e.slice(0,t.getState().limit))}const dv={show:KD,hide:qse,update:k3e,clean:T3e,cleanQueue:A3e,updateState:W1};function fT(t,e){return fT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fT(t,e)}function U_(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,fT(t,e)}var C4={exports:{}},E4,lU;function _3e(){if(lU)return E4;lU=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return E4=t,E4}var M4,cU;function O3e(){if(cU)return M4;cU=1;var t=_3e();function e(){}function n(){}return n.resetWarningCache=e,M4=function(){function r(o,a,l,c,d,f){if(f!==t){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function s(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:e};return i.PropTypes=i,i},M4}var uU;function V_(){return uU||(uU=1,C4.exports=O3e()()),C4.exports}var R3e=V_();const tt=Mr(R3e);function W_(t,e){return t.classList?!!e&&t.classList.contains(e):(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+e+" ")!==-1}function Y_(t,e){t.classList?t.classList.add(e):W_(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function dU(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function G_(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=dU(t.className,e):t.setAttribute("class",dU(t.className&&t.className.baseVal||"",e))}const fU={disabled:!1},pT=xe.createContext(null);var N3e=function(e){return e.scrollTop},kx="unmounted",rg="exited",sg="entering",Ey="entered",DL="exiting",af=(function(t){U_(e,t);function e(r,s){var i;i=t.call(this,r,s)||this;var o=s,a=o&&!o.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?a?(l=rg,i.appearStatus=sg):l=Ey:r.unmountOnExit||r.mountOnEnter?l=kx:l=rg,i.state={status:l},i.nextCallback=null,i}e.getDerivedStateFromProps=function(s,i){var o=s.in;return o&&i.status===kx?{status:rg}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var i=null;if(s!==this.props){var o=this.state.status;this.props.in?o!==sg&&o!==Ey&&(i=sg):(o===sg||o===Ey)&&(i=DL)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,i,o,a;return i=o=a=s,s!=null&&typeof s!="number"&&(i=s.exit,o=s.enter,a=s.appear!==void 0?s.appear:o),{exit:i,enter:o,appear:a}},n.updateStatus=function(s,i){if(s===void 0&&(s=!1),i!==null)if(this.cancelNextCallback(),i===sg){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:jp.findDOMNode(this);o&&N3e(o)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===rg&&this.setState({status:kx})},n.performEnter=function(s){var i=this,o=this.props.enter,a=this.context?this.context.isMounting:s,l=this.props.nodeRef?[a]:[jp.findDOMNode(this),a],c=l[0],d=l[1],f=this.getTimeouts(),p=a?f.appear:f.enter;if(!s&&!o||fU.disabled){this.safeSetState({status:Ey},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:sg},function(){i.props.onEntering(c,d),i.onTransitionEnd(p,function(){i.safeSetState({status:Ey},function(){i.props.onEntered(c,d)})})})},n.performExit=function(){var s=this,i=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:jp.findDOMNode(this);if(!i||fU.disabled){this.safeSetState({status:rg},function(){s.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:DL},function(){s.props.onExiting(a),s.onTransitionEnd(o.exit,function(){s.safeSetState({status:rg},function(){s.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,i){i=this.setNextCallback(i),this.setState(s,i)},n.setNextCallback=function(s){var i=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,i.nextCallback=null,s(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(s,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:jp.findDOMNode(this),a=s==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===kx)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var a=Ud(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return xe.createElement(pT.Provider,{value:null},typeof o=="function"?o(s,a):xe.cloneElement(xe.Children.only(o),a))},e})(xe.Component);af.contextType=pT;af.propTypes={};function my(){}af.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:my,onEntering:my,onEntered:my,onExit:my,onExiting:my,onExited:my};af.UNMOUNTED=kx;af.EXITED=rg;af.ENTERING=sg;af.ENTERED=Ey;af.EXITING=DL;function _S(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function x$(t,e){var n=function(i){return e&&O.isValidElement(i)?e(i):i},r=Object.create(null);return t&&O.Children.map(t,function(s){return s}).forEach(function(s){r[s.key]=n(s)}),r}function j3e(t,e){t=t||{},e=e||{};function n(d){return d in e?e[d]:t[d]}var r=Object.create(null),s=[];for(var i in t)i in e?s.length&&(r[i]=s,s=[]):s.push(i);var o,a={};for(var l in e){if(r[l])for(o=0;o<r[l].length;o++){var c=r[l][o];a[r[l][o]]=n(c)}a[l]=n(l)}for(o=0;o<s.length;o++)a[s[o]]=n(s[o]);return a}function mg(t,e,n){return n[e]!=null?n[e]:t.props[e]}function I3e(t,e){return x$(t.children,function(n){return O.cloneElement(n,{onExited:e.bind(null,n),in:!0,appear:mg(n,"appear",t),enter:mg(n,"enter",t),exit:mg(n,"exit",t)})})}function L3e(t,e,n){var r=x$(t.children),s=j3e(e,r);return Object.keys(s).forEach(function(i){var o=s[i];if(O.isValidElement(o)){var a=i in e,l=i in r,c=e[i],d=O.isValidElement(c)&&!c.props.in;l&&(!a||d)?s[i]=O.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:mg(o,"exit",t),enter:mg(o,"enter",t)}):!l&&a&&!d?s[i]=O.cloneElement(o,{in:!1}):l&&a&&O.isValidElement(c)&&(s[i]=O.cloneElement(o,{onExited:n.bind(null,o),in:c.props.in,exit:mg(o,"exit",t),enter:mg(o,"enter",t)}))}}),s}var P3e=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},$3e={component:"div",childFactory:function(e){return e}},wp=(function(t){U_(e,t);function e(r,s){var i;i=t.call(this,r,s)||this;var o=i.handleExited.bind(_S(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,i){var o=i.children,a=i.handleExited,l=i.firstRender;return{children:l?I3e(s,a):L3e(s,o,a),firstRender:!1}},n.handleExited=function(s,i){var o=x$(this.props.children);s.key in o||(s.props.onExited&&s.props.onExited(i),this.mounted&&this.setState(function(a){var l=wr({},a.children);return delete l[s.key],{children:l}}))},n.render=function(){var s=this.props,i=s.component,o=s.childFactory,a=Ud(s,["component","childFactory"]),l=this.state.contextValue,c=P3e(this.state.children).map(o);return delete a.appear,delete a.enter,delete a.exit,i===null?xe.createElement(pT.Provider,{value:l},c):xe.createElement(pT.Provider,{value:l},xe.createElement(i,a,c))},e})(xe.Component);wp.propTypes={};wp.defaultProps=$3e;const Use=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function z3e(t,e){return t.reduce((n,r)=>(n[r.position||e].push(r),n),Use.reduce((n,r)=>(n[r]=[],n),{}))}const pU={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},F3e={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function B3e({state:t,maxHeight:e,position:n,transitionDuration:r}){const[s,i]=n.split("-"),o=i==="center"?`${s}-center`:i,a={opacity:0,maxHeight:e,transform:pU[o],transitionDuration:`${r}ms, ${r}ms, ${r}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:F3e[o]},c={opacity:0,maxHeight:0,transform:pU[o]};return{...a,...{entering:l,entered:l,exiting:c,exited:c}[t]}}function H3e(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}const Vse=O.forwardRef(({data:t,onHide:e,autoClose:n,...r},s)=>{const{autoClose:i,message:o,...a}=t,l=H3e(n,t.autoClose),c=O.useRef(-1),d=()=>window.clearTimeout(c.current),f=()=>{e(t.id),d()},p=()=>{typeof l=="number"&&(c.current=window.setTimeout(f,l))};return O.useEffect(()=>{var m;(m=t.onOpen)==null||m.call(t,t)},[]),O.useEffect(()=>(p(),d),[l]),g.jsx(h_,{...r,...a,onClose:f,ref:s,onMouseEnter:d,onMouseLeave:p,children:o})});Vse.displayName="@mantine/notifications/NotificationContainer";var Wse={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const q3e=af,U3e={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:yi("overlay"),store:uv,withinPortal:!0},V3e=(t,{zIndex:e,containerWidth:n})=>({root:{"--notifications-z-index":e==null?void 0:e.toString(),"--notifications-container-width":Ee(n)}}),lf=Fe((t,e)=>{const n=Ce("Notifications",U3e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,position:c,autoClose:d,transitionDuration:f,containerWidth:p,notificationMaxHeight:m,limit:v,zIndex:y,store:x,portalProps:w,withinPortal:C,...E}=n,D=Dr(),T=D3e(x),A=Khe(),_=RA(),R=O.useRef({}),N=O.useRef(0),$=(D.respectReducedMotion?_:!1)?1:f,L=bt({name:"Notifications",classes:Wse,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,vars:l,varsResolver:V3e});O.useEffect(()=>{x==null||x.updateState(q=>({...q,limit:v||5,defaultPosition:c}))},[v,c]),Ru(()=>{T.notifications.length>N.current&&setTimeout(()=>A(),0),N.current=T.notifications.length},[T.notifications]);const z=z3e(T.notifications,c),F=Use.reduce((q,H)=>(q[H]=z[H].map(({style:B,...V})=>g.jsx(q3e,{timeout:$,onEnter:()=>R.current[V.id].offsetHeight,nodeRef:{current:R.current[V.id]},children:Y=>g.jsx(Vse,{ref:G=>{G&&(R.current[V.id]=G)},data:V,onHide:G=>qse(G,x),autoClose:d,...L("notification",{style:{...B3e({state:Y,position:H,transitionDuration:$,maxHeight:m}),...B}})})},V.id)),q),{});return g.jsxs(Hd,{withinPortal:C,...w,children:[g.jsx(le,{...L("root"),"data-position":"top-center",ref:e,...E,children:g.jsx(wp,{children:F["top-center"]})}),g.jsx(le,{...L("root"),"data-position":"top-left",...E,children:g.jsx(wp,{children:F["top-left"]})}),g.jsx(le,{...L("root",{className:Ig.classNames.fullWidth}),"data-position":"top-right",...E,children:g.jsx(wp,{children:F["top-right"]})}),g.jsx(le,{...L("root",{className:Ig.classNames.fullWidth}),"data-position":"bottom-right",...E,children:g.jsx(wp,{children:F["bottom-right"]})}),g.jsx(le,{...L("root"),"data-position":"bottom-left",...E,children:g.jsx(wp,{children:F["bottom-left"]})}),g.jsx(le,{...L("root"),"data-position":"bottom-center",...E,children:g.jsx(wp,{children:F["bottom-center"]})})]})});lf.classes=Wse;lf.displayName="@mantine/notifications/Notifications";lf.show=dv.show;lf.hide=dv.hide;lf.update=dv.update;lf.clean=dv.clean;lf.cleanQueue=dv.cleanQueue;lf.updateState=dv.updateState;const W3e=t=>{const e=Math.floor(Math.random()*t.length);return t[e]},$n={showSuccess:(t,e=ct("successMessages.title"))=>{KD({title:e,message:t,color:"green"})},showError:(t,e=ct("errorsCatch.title"))=>{KD({title:e,message:t,color:"red"})},showWarning:(t,e=ct("warning.title"))=>{KD({title:e,message:t,color:"orange"})}};var hT=(t=>(t[t.Module=0]="Module",t[t.Integration=1]="Integration",t[t.Link=2]="Link",t))(hT||{});const Y3e=()=>bn.get("v1/user"),G3e=t=>bn.post("v1/user/get",{Ids:t}),K3e=()=>bn.get("v1/settings"),Z3e=t=>bn.post("v1/settings",{Timezone:t}),J3e=t=>bn.post("v1/settings",t),X3e=t=>bn.post("v1/settings",{ReduceEventBrightness:t}),Q3e=(t,e)=>bn.post("v1/Contacts/search",t,e),eOe=(t,e)=>bn.post("v1/User/search",t,e),tOe=t=>bn.post("v1/addressbook/SaveLink",t);let yu=null;const ZD=sn("user/getCurrentUserThunk",async()=>(await Y3e()).data),kL=sn("user/getUsersInfoThunk",async t=>await G3e(t.userIds).then(({data:e})=>e)),JD=sn("user/getSettingsThunk",async()=>(await K3e()).data),Yse=sn("user/postSettingsTimeZoneThunk",async({data:t,showNotification:e=!0})=>(await Z3e(t),e&&$n.showSuccess(ct("successMessages.timeZoneChanged")),t)),XD=sn("user/postSettingsAskTimezoneChange",async({data:t,showNotification:e=!0})=>(await J3e(t),e&&$n.showSuccess(ct("successMessages.settingSaved")),t)),nOe=sn("user/postSettingsReduceEventBrightnessThunk",async t=>(await X3e(t),$n.showSuccess(ct("successMessages.reduceEventBrightnessChanged")),t)),QD=sn("user/addContactThunk",async t=>{const e=await tOe(t);return $n.showSuccess(ct("successMessages.contactAdded")),e.data}),Ux=sn("user/searchContactsThunk",async t=>{const e={Query:t,SortOrder:0,SortOrderField:"Email",Size:10,Offset:0};yu&&(yu.abort(),yu=null),yu=new AbortController;const n={signal:yu.signal};return(await Q3e(e,n)).data}),ek=sn("user/searchUsersThunk",async t=>{const e={Query:t,SortOrder:0,SortOrderField:"Email",Size:20,Offset:0};yu&&(yu.abort(),yu=null),yu=new AbortController;const n={signal:yu.signal};return(await eOe(e,n)).data}),hU={currentUser:null,currentUserStatus:"initial",currentSettingsUserStatus:"initial",addConfigStatus:"initial",contacts:[],users:[],settings:{UserId:-1,AskTimezoneChange:null,ReduceEventBrightness:!0,Culture:"ru",AppType:""},askTimezoneChangeStatus:"initial"},Gse=$1({name:"user",initialState:hU,reducers:{setCurrentUser:(t,e)=>{t.currentUser=e.payload},setSettings:(t,e)=>{t.settings=e.payload},removeCurrentUser:t=>({...hU,settings:{...t.settings,UserId:-1},currentSettingsUserStatus:t.currentSettingsUserStatus})},extraReducers:t=>t.addCase(ZD.pending,e=>{e.currentUserStatus="pending"}).addCase(ZD.fulfilled,(e,n)=>{e.currentUserStatus="fulfilled",e.currentUser=n.payload}).addCase(ZD.rejected,e=>{e.currentUserStatus="rejected"}).addCase(Ux.pending,e=>{e.contacts=[]}).addCase(Ux.fulfilled,(e,n)=>{e.contacts=n.payload}).addCase(Ux.rejected,e=>{e.contacts=[]}).addCase(ek.pending,e=>{e.users=[]}).addCase(ek.fulfilled,(e,n)=>{e.users=n.payload}).addCase(ek.rejected,e=>{e.users=[]}).addCase(JD.pending,e=>{e.currentSettingsUserStatus="pending"}).addCase(JD.fulfilled,(e,n)=>{e.settings=n.payload,e.currentSettingsUserStatus="fulfilled"}).addCase(JD.rejected,e=>{e.currentSettingsUserStatus="rejected"}).addCase(XD.pending,e=>{e.askTimezoneChangeStatus="pending"}).addCase(XD.fulfilled,(e,n)=>{e.settings.AskTimezoneChange=n.payload.AskTimezoneChange,e.askTimezoneChangeStatus="fulfilled"}).addCase(XD.rejected,e=>{e.askTimezoneChangeStatus="rejected"}).addCase(QD.pending,e=>{e.addConfigStatus="pending"}).addCase(QD.fulfilled,(e,n)=>{e.addConfigStatus="fulfilled"}).addCase(QD.rejected,e=>{e.addConfigStatus="rejected"}).addCase(nOe.fulfilled,(e,n)=>{e.settings.ReduceEventBrightness=n.payload})}),rOe=Gse.reducer,{setCurrentUser:ltt,removeCurrentUser:TL,setSettings:Kse}=Gse.actions,kr=t=>t.user.currentUser,sOe=t=>t.user.currentUserStatus,iOe=t=>t.user.contacts,oOe=t=>t.user.users,oh=t=>t.user.settings,Zse=t=>t.user.settings.Timezone,$w=t=>t.user.settings.ModuleSettings,aOe=t=>t.user.settings,zw=t=>t.user.settings.ReduceEventBrightness,lOe=t=>t.user.currentSettingsUserStatus,ctt=t=>t.user.addConfigStatus,cOe=t=>t.user.settings.AskTimezoneChange,utt=t=>t.user.askTimezoneChangeStatus,Jse=()=>({[ci.Unauthorized]:ct("errorsCatch.serverErrors.unauthorized"),[ci.Forbidden]:ct("errorsCatch.serverErrors.forbidden"),[ci.BadRequest]:ct("errorsCatch.serverErrors.badRequest"),[ci.NotFound]:ct("errorsCatch.serverErrors.notFound"),[ci.InternalServerError]:ct("errorsCatch.serverErrors.internalServerError"),[ci.BadGateway]:ct("errorsCatch.serverErrors.badGateway"),[ci.ServiceUnavailable]:ct("errorsCatch.serverErrors.serviceUnavailable"),[ci.GatewayTimeout]:ct("errorsCatch.serverErrors.gatewayTimeout"),[ci.NetworkAuthenticationRequired]:ct("errorsCatch.serverErrors.networkAuthenticationRequired"),[ci.TooManyRequests]:ct("errorsCatch.serverErrors.tooManyRequests"),[ci.NotAcceptable]:ct("errorsCatch.serverErrors.notAcceptable")}),uOe=new Set([ci.PayloadTooLarge]),dOe=(t,e,n)=>{if(!t.response)return;const r=t.response.status;if(!uOe.has(r)){const i=Jse()[r]||ct("errorsCatch.default");$n.showError(i)}r===ci.Unauthorized&&(e("/login"),n(TL()))},fOe=t=>{if(!t.response)return;const n={...Jse(),[ci.Unauthorized]:ct("errorsCatch.serverErrors.unauthorizedPublic"),[ci.NotAcceptable]:ct("errorsCatch.serverErrors.notAcceptablePublic"),[ci.Forbidden]:ct("errorsCatch.serverErrors.forbiddenPublic")},r=t.response.status,s=n[r]||ct("errorsCatch.default");$n.showError(s)};Kr.defaults.withCredentials=!0;const pOe=Kr.create({baseURL:yse,headers:{"Access-Control-Allow-Origin":"*","Content-Type":"application/json"}}),hOe=()=>{pOe.interceptors.response.use(t=>t,t=>{throw fOe(t),t})},bn=Kr.create({baseURL:yse,headers:{"Access-Control-Allow-Origin":"*","Content-Type":"application/json"}});Kr.defaults.withCredentials=!0;const mOe=(t,e)=>{bn.interceptors.response.use(n=>n,n=>{throw dOe(n,t,e),n})},gOe=t=>bn.post("v1/events/isBusy",t),Vx=sn("busy/getEventsBusyThunk",async({body:t})=>(await gOe(t)).data),vOe={eventsBusy:[]},yOe=$1({name:"busy",initialState:vOe,reducers:{},extraReducers:t=>t.addCase(Vx.pending,()=>{}).addCase(Vx.fulfilled,(e,n)=>{const{calendarsGroup:r,timeZones:s}=n.meta.arg,i=Oke(n.payload),o=!0;e.eventsBusy=Sp(i,r,s,o)}).addCase(Vx.rejected,()=>{})}),bOe=yOe.reducer,xOe=t=>t.busy.eventsBusy;var Wp=(t=>(t.desktop="Desktop",t.tablet="Tablet",t.mobile="Mobile",t))(Wp||{});const SOe=()=>bn("v1/calendars"),wOe=()=>bn("v1/Calendars/connected"),COe=(t,e)=>bn.patch(`v1/Calendars/connected/${t}/list-visibility`,{IsHiddenInList:e}),EOe=()=>bn("v1/events/Categories"),MOe=t=>bn.post("v1/calendars/save",t),DOe=t=>bn.delete(`v1/Calendars?Id=${t}`),kOe=(t,e)=>(bn.post("v1/Calendars/Activate",{ids:[e]}),bn.post("v1/Calendars/Activate",t)),TOe=()=>bn("v1/calendars/timezones"),AOe=t=>bn.post("v1/events/Categories",t),_Oe=t=>bn.delete(`v1/events/categories?id=${t}`),OOe=t=>bn.put(`v1/Calendars/View?viewPeriod=${t}`);var Cn=(t=>(t.Initial="initial",t.Pending="pending",t.Fulfilled="fulfilled",t.Rejected="rejected",t))(Cn||{});let eD;const ROe=new Uint8Array(16);function NOe(){if(!eD&&(eD=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!eD))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return eD(ROe)}const _i=[];for(let t=0;t<256;++t)_i.push((t+256).toString(16).slice(1));function jOe(t,e=0){return(_i[t[e+0]]+_i[t[e+1]]+_i[t[e+2]]+_i[t[e+3]]+"-"+_i[t[e+4]]+_i[t[e+5]]+"-"+_i[t[e+6]]+_i[t[e+7]]+"-"+_i[t[e+8]]+_i[t[e+9]]+"-"+_i[t[e+10]]+_i[t[e+11]]+_i[t[e+12]]+_i[t[e+13]]+_i[t[e+14]]+_i[t[e+15]]).toLowerCase()}const IOe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mU={randomUUID:IOe};function LOe(t,e,n){if(mU.randomUUID&&!t)return mU.randomUUID();t=t||{};const r=t.random||(t.rng||NOe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,jOe(r)}const POe=0,gU=(t,e,n)=>q1(t,e)&&ga(t,n),Xse=new Date,$Oe=xr(Xse,{hour:10,minute:0}),zOe=xr(Xse,{hour:11,minute:0}),Cp={allDay:!1,start:$Oe,end:zOe,title:"",resource:{accessType:0,mainColor:"#000",startTimeZoneId:null,endTimeZoneId:null,startTimeZoneTzName:"",endTimeZoneTzName:"",location:"",allDayNotifications:[],simpleNotifications:[],categoryId:POe,calendarId:null,description:"",isAllDayWithoutTime:!1,contactParticipants:[],documents:[],documentsPermissions:null,hasMaterials:!1,hasParticipant:!1,saveType:rs.Save,author:{name:""},isFree:Rd.Busy,isBusyMode:!1,participantInfo:{attendingType:1,accessType:512,description:"",accessTypeGuests:0},isPrivate:!1,isCanceled:!1,recurring:{endEventRecurring:null,repeatPeriod:"never",repeatValue:null,endDateEventRecurring:null,endEventRecurringAfter:null,choosedWeekDays:null,dayNumber:null,monthNumber:null,recurringId:null,weekNumber:null,dayOfWeek:null}},id:"1"};var Tx={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */var FOe=Tx.exports,vU;function BOe(){return vU||(vU=1,(function(t,e){(function(){var n,r="4.17.21",s=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",f=1,p=2,m=4,v=1,y=2,x=1,w=2,C=4,E=8,D=16,T=32,A=64,_=128,R=256,N=512,I=30,$="...",L=800,z=16,F=1,q=2,H=3,B=1/0,V=9007199254740991,Y=17976931348623157e292,G=NaN,W=4294967295,Z=W-1,Q=W>>>1,X=[["ary",_],["bind",x],["bindKey",w],["curry",E],["curryRight",D],["flip",N],["partial",T],["partialRight",A],["rearg",R]],re="[object Arguments]",ne="[object Array]",ee="[object AsyncFunction]",oe="[object Boolean]",ce="[object Date]",ue="[object DOMException]",pe="[object Error]",de="[object Function]",me="[object GeneratorFunction]",Se="[object Map]",De="[object Number]",Ae="[object Null]",fe="[object Object]",Te="[object Promise]",Ne="[object Proxy]",Ue="[object RegExp]",rt="[object Set]",ot="[object String]",Je="[object Symbol]",je="[object Undefined]",We="[object WeakMap]",Le="[object WeakSet]",_e="[object ArrayBuffer]",Be="[object DataView]",ut="[object Float32Array]",lt="[object Float64Array]",At="[object Int8Array]",jt="[object Int16Array]",Ot="[object Int32Array]",Pt="[object Uint8Array]",Rt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Fn="[object Uint32Array]",pn=/\b__p \+= '';/g,hn=/\b(__p \+=) '' \+/g,On=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,an=/[&<>"']/g,xn=RegExp(Vt.source),Ts=RegExp(an.source),Hr=/<%-([\s\S]+?)%>/g,As=/<%([\s\S]+?)%>/g,Rr=/<%=([\s\S]+?)%>/g,ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xt=/^\w*$/,st=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ht=RegExp(it.source),kt=/^\s+/,Hn=/\s/,qr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gn=/\{\n\/\* \[wrapped with (.+)\] \*/,Bt=/,? & /,Vn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wt=/[()=,{}\[\]\/\s]/,Kn=/\\(\\)?/g,Nr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ci=/\w*$/,el=/^[-+]0x[0-9a-f]+$/i,Bi=/^0b[01]+$/i,ho=/^\[object .+?Constructor\]$/,ri=/^0o[0-7]+$/i,tl=/^(?:0|[1-9]\d*)$/,mo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,si=/($^)/,Go=/['\n\r\u2028\u2029\\]/g,ii="\\ud800-\\udfff",Tr="\\u0300-\\u036f",$l="\\ufe20-\\ufe2f",zl="\\u20d0-\\u20ff",Ei=Tr+$l+zl,Hi="\\u2700-\\u27bf",Gu="a-z\\xdf-\\xf6\\xf8-\\xff",gC="\\xac\\xb1\\xd7\\xf7",vC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",aO="\\u2000-\\u206f",Mv=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ph="A-Z\\xc0-\\xd6\\xd8-\\xde",nl="\\ufe0e\\ufe0f",go=gC+vC+aO+Mv,Dv="['’]",lO="["+ii+"]",kv="["+go+"]",$h="["+Ei+"]",zh="\\d+",cO="["+Hi+"]",vo="["+Gu+"]",Tv="[^"+ii+go+zh+Hi+Gu+Ph+"]",Av="\\ud83c[\\udffb-\\udfff]",rb="(?:"+$h+"|"+Av+")",Ku="[^"+ii+"]",_v="(?:\\ud83c[\\udde6-\\uddff]){2}",Ov="[\\ud800-\\udbff][\\udc00-\\udfff]",Da="["+Ph+"]",yC="\\u200d",sb="(?:"+vo+"|"+Tv+")",bC="(?:"+Da+"|"+Tv+")",Rv="(?:"+Dv+"(?:d|ll|m|re|s|t|ve))?",xC="(?:"+Dv+"(?:D|LL|M|RE|S|T|VE))?",SC=rb+"?",Fh="["+nl+"]?",Fl="(?:"+yC+"(?:"+[Ku,_v,Ov].join("|")+")"+Fh+SC+")*",ib="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ob="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zu=Fh+SC+Fl,ff="(?:"+[cO,_v,Ov].join("|")+")"+Zu,wC="(?:"+[Ku+$h+"?",$h,_v,Ov,lO].join("|")+")",ab=RegExp(Dv,"g"),CC=RegExp($h,"g"),Ju=RegExp(Av+"(?="+Av+")|"+wC+Zu,"g"),Bl=RegExp([Da+"?"+vo+"+"+Rv+"(?="+[kv,Da,"$"].join("|")+")",bC+"+"+xC+"(?="+[kv,Da+sb,"$"].join("|")+")",Da+"?"+sb+"+"+Rv,Da+"+"+xC,ob,ib,zh,ff].join("|"),"g"),lb=RegExp("["+yC+ii+Ei+nl+"]"),Bh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],cb=-1,cr={};cr[ut]=cr[lt]=cr[At]=cr[jt]=cr[Ot]=cr[Pt]=cr[Rt]=cr[Nt]=cr[Fn]=!0,cr[re]=cr[ne]=cr[_e]=cr[oe]=cr[Be]=cr[ce]=cr[pe]=cr[de]=cr[Se]=cr[De]=cr[fe]=cr[Ue]=cr[rt]=cr[ot]=cr[We]=!1;var mr={};mr[re]=mr[ne]=mr[_e]=mr[Be]=mr[oe]=mr[ce]=mr[ut]=mr[lt]=mr[At]=mr[jt]=mr[Ot]=mr[Se]=mr[De]=mr[fe]=mr[Ue]=mr[rt]=mr[ot]=mr[Je]=mr[Pt]=mr[Rt]=mr[Nt]=mr[Fn]=!0,mr[pe]=mr[de]=mr[We]=!1;var Nv={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},jv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},EC={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xu=parseFloat,Iv=parseInt,pf=typeof Rp=="object"&&Rp&&Rp.Object===Object&&Rp,uO=typeof self=="object"&&self&&self.Object===Object&&self,_s=pf||uO||Function("return this")(),Hh=e&&!e.nodeType&&e,ka=Hh&&!0&&t&&!t.nodeType&&t,qh=ka&&ka.exports===Hh,Lv=qh&&pf.process,Ko=(function(){try{var we=ka&&ka.require&&ka.require("util").types;return we||Lv&&Lv.binding&&Lv.binding("util")}catch{}})(),MC=Ko&&Ko.isArrayBuffer,DC=Ko&&Ko.isDate,Pv=Ko&&Ko.isMap,kC=Ko&&Ko.isRegExp,TC=Ko&&Ko.isSet,AC=Ko&&Ko.isTypedArray;function yo(we,Ye,Pe){switch(Pe.length){case 0:return we.call(Ye);case 1:return we.call(Ye,Pe[0]);case 2:return we.call(Ye,Pe[0],Pe[1]);case 3:return we.call(Ye,Pe[0],Pe[1],Pe[2])}return we.apply(Ye,Pe)}function dO(we,Ye,Pe,Dt){for(var tn=-1,Dn=we==null?0:we.length;++tn<Dn;){var Ir=we[tn];Ye(Dt,Ir,Pe(Ir),we)}return Dt}function bo(we,Ye){for(var Pe=-1,Dt=we==null?0:we.length;++Pe<Dt&&Ye(we[Pe],Pe,we)!==!1;);return we}function fO(we,Ye){for(var Pe=we==null?0:we.length;Pe--&&Ye(we[Pe],Pe,we)!==!1;);return we}function _C(we,Ye){for(var Pe=-1,Dt=we==null?0:we.length;++Pe<Dt;)if(!Ye(we[Pe],Pe,we))return!1;return!0}function Nc(we,Ye){for(var Pe=-1,Dt=we==null?0:we.length,tn=0,Dn=[];++Pe<Dt;){var Ir=we[Pe];Ye(Ir,Pe,we)&&(Dn[tn++]=Ir)}return Dn}function $v(we,Ye){var Pe=we==null?0:we.length;return!!Pe&&hf(we,Ye,0)>-1}function Uh(we,Ye,Pe){for(var Dt=-1,tn=we==null?0:we.length;++Dt<tn;)if(Pe(Ye,we[Dt]))return!0;return!1}function jr(we,Ye){for(var Pe=-1,Dt=we==null?0:we.length,tn=Array(Dt);++Pe<Dt;)tn[Pe]=Ye(we[Pe],Pe,we);return tn}function jc(we,Ye){for(var Pe=-1,Dt=Ye.length,tn=we.length;++Pe<Dt;)we[tn+Pe]=Ye[Pe];return we}function ub(we,Ye,Pe,Dt){var tn=-1,Dn=we==null?0:we.length;for(Dt&&Dn&&(Pe=we[++tn]);++tn<Dn;)Pe=Ye(Pe,we[tn],tn,we);return Pe}function OC(we,Ye,Pe,Dt){var tn=we==null?0:we.length;for(Dt&&tn&&(Pe=we[--tn]);tn--;)Pe=Ye(Pe,we[tn],tn,we);return Pe}function db(we,Ye){for(var Pe=-1,Dt=we==null?0:we.length;++Pe<Dt;)if(Ye(we[Pe],Pe,we))return!0;return!1}var pO=Qu("length");function hO(we){return we.split("")}function mO(we){return we.match(Vn)||[]}function RC(we,Ye,Pe){var Dt;return Pe(we,function(tn,Dn,Ir){if(Ye(tn,Dn,Ir))return Dt=Dn,!1}),Dt}function zv(we,Ye,Pe,Dt){for(var tn=we.length,Dn=Pe+(Dt?1:-1);Dt?Dn--:++Dn<tn;)if(Ye(we[Dn],Dn,we))return Dn;return-1}function hf(we,Ye,Pe){return Ye===Ye?bO(we,Ye,Pe):zv(we,NC,Pe)}function gO(we,Ye,Pe,Dt){for(var tn=Pe-1,Dn=we.length;++tn<Dn;)if(Dt(we[tn],Ye))return tn;return-1}function NC(we){return we!==we}function Fv(we,Ye){var Pe=we==null?0:we.length;return Pe?Bv(we,Ye)/Pe:G}function Qu(we){return function(Ye){return Ye==null?n:Ye[we]}}function fb(we){return function(Ye){return we==null?n:we[Ye]}}function pb(we,Ye,Pe,Dt,tn){return tn(we,function(Dn,Ir,Qn){Pe=Dt?(Dt=!1,Dn):Ye(Pe,Dn,Ir,Qn)}),Pe}function jC(we,Ye){var Pe=we.length;for(we.sort(Ye);Pe--;)we[Pe]=we[Pe].value;return we}function Bv(we,Ye){for(var Pe,Dt=-1,tn=we.length;++Dt<tn;){var Dn=Ye(we[Dt]);Dn!==n&&(Pe=Pe===n?Dn:Pe+Dn)}return Pe}function Hv(we,Ye){for(var Pe=-1,Dt=Array(we);++Pe<we;)Dt[Pe]=Ye(Pe);return Dt}function IC(we,Ye){return jr(Ye,function(Pe){return[Pe,we[Pe]]})}function ed(we){return we&&we.slice(0,gf(we)+1).replace(kt,"")}function xo(we){return function(Ye){return we(Ye)}}function hb(we,Ye){return jr(Ye,function(Pe){return we[Pe]})}function Vh(we,Ye){return we.has(Ye)}function mb(we,Ye){for(var Pe=-1,Dt=we.length;++Pe<Dt&&hf(Ye,we[Pe],0)>-1;);return Pe}function gb(we,Ye){for(var Pe=we.length;Pe--&&hf(Ye,we[Pe],0)>-1;);return Pe}function Wh(we,Ye){for(var Pe=we.length,Dt=0;Pe--;)we[Pe]===Ye&&++Dt;return Dt}var Yh=fb(Nv),vO=fb(jv);function qv(we){return"\\"+qi[we]}function LC(we,Ye){return we==null?n:we[Ye]}function td(we){return lb.test(we)}function vb(we){return Bh.test(we)}function yb(we){for(var Ye,Pe=[];!(Ye=we.next()).done;)Pe.push(Ye.value);return Pe}function Uv(we){var Ye=-1,Pe=Array(we.size);return we.forEach(function(Dt,tn){Pe[++Ye]=[tn,Dt]}),Pe}function bb(we,Ye){return function(Pe){return we(Ye(Pe))}}function Hl(we,Ye){for(var Pe=-1,Dt=we.length,tn=0,Dn=[];++Pe<Dt;){var Ir=we[Pe];(Ir===Ye||Ir===d)&&(we[Pe]=d,Dn[tn++]=Pe)}return Dn}function Vv(we){var Ye=-1,Pe=Array(we.size);return we.forEach(function(Dt){Pe[++Ye]=Dt}),Pe}function yO(we){var Ye=-1,Pe=Array(we.size);return we.forEach(function(Dt){Pe[++Ye]=[Dt,Dt]}),Pe}function bO(we,Ye,Pe){for(var Dt=Pe-1,tn=we.length;++Dt<tn;)if(we[Dt]===Ye)return Dt;return-1}function xO(we,Ye,Pe){for(var Dt=Pe+1;Dt--;)if(we[Dt]===Ye)return Dt;return Dt}function mf(we){return td(we)?$C(we):pO(we)}function Ur(we){return td(we)?zC(we):hO(we)}function gf(we){for(var Ye=we.length;Ye--&&Hn.test(we.charAt(Ye)););return Ye}var PC=fb(EC);function $C(we){for(var Ye=Ju.lastIndex=0;Ju.test(we);)++Ye;return Ye}function zC(we){return we.match(Ju)||[]}function FC(we){return we.match(Bl)||[]}var xb=(function we(Ye){Ye=Ye==null?_s:vf.defaults(_s.Object(),Ye,vf.pick(_s,Rc));var Pe=Ye.Array,Dt=Ye.Date,tn=Ye.Error,Dn=Ye.Function,Ir=Ye.Math,Qn=Ye.Object,Wv=Ye.RegExp,nd=Ye.String,So=Ye.TypeError,Gh=Pe.prototype,BC=Dn.prototype,yf=Qn.prototype,Yv=Ye["__core-js_shared__"],Gv=BC.toString,Zn=yf.hasOwnProperty,HC=0,Kv=(function(){var S=/[^.]+$/.exec(Yv&&Yv.keys&&Yv.keys.IE_PROTO||"");return S?"Symbol(src)_1."+S:""})(),Ui=yf.toString,Zv=Gv.call(Qn),Zo=_s._,bf=Wv("^"+Gv.call(Zn).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xf=qh?Ye.Buffer:n,Ta=Ye.Symbol,rd=Ye.Uint8Array,Jv=xf?xf.allocUnsafe:n,rl=bb(Qn.getPrototypeOf,Qn),Sb=Qn.create,Kh=yf.propertyIsEnumerable,ql=Gh.splice,qC=Ta?Ta.isConcatSpreadable:n,Gs=Ta?Ta.iterator:n,Ul=Ta?Ta.toStringTag:n,Jo=(function(){try{var S=Yc(Qn,"defineProperty");return S({},"",{}),S}catch{}})(),UC=Ye.clearTimeout!==_s.clearTimeout&&Ye.clearTimeout,Xv=Dt&&Dt.now!==_s.Date.now&&Dt.now,sd=Ye.setTimeout!==_s.setTimeout&&Ye.setTimeout,Sf=Ir.ceil,Zh=Ir.floor,Jh=Qn.getOwnPropertySymbols,VC=xf?xf.isBuffer:n,wo=Ye.isFinite,wf=Gh.join,Cf=bb(Qn.keys,Qn),Zr=Ir.max,vs=Ir.min,Xo=Dt.now,Qo=Ye.parseInt,Vl=Ir.random,sl=Gh.reverse,ea=Yc(Ye,"DataView"),Co=Yc(Ye,"Map"),Qv=Yc(Ye,"Promise"),Ic=Yc(Ye,"Set"),id=Yc(Ye,"WeakMap"),Ef=Yc(Qn,"create"),ys=id&&new id,Jn={},jn=li(ea),Lc=li(Co),ta=li(Qv),wb=li(Ic),Pc=li(id),Xh=Ta?Ta.prototype:n,Mf=Xh?Xh.valueOf:n,od=Xh?Xh.toString:n;function ie(S){if(Qr(S)&&!nn(S)&&!(S instanceof ln)){if(S instanceof Vi)return S;if(Zn.call(S,"__wrapped__"))return _0(S)}return new Vi(S)}var $c=(function(){function S(){}return function(k){if(!Pr(k))return{};if(Sb)return Sb(k);S.prototype=k;var P=new S;return S.prototype=n,P}})();function zc(){}function Vi(S,k){this.__wrapped__=S,this.__actions__=[],this.__chain__=!!k,this.__index__=0,this.__values__=n}ie.templateSettings={escape:Hr,evaluate:As,interpolate:Rr,variable:"",imports:{_:ie}},ie.prototype=zc.prototype,ie.prototype.constructor=ie,Vi.prototype=$c(zc.prototype),Vi.prototype.constructor=Vi;function ln(S){this.__wrapped__=S,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=W,this.__views__=[]}function Wl(){var S=new ln(this.__wrapped__);return S.__actions__=Di(this.__actions__),S.__dir__=this.__dir__,S.__filtered__=this.__filtered__,S.__iteratees__=Di(this.__iteratees__),S.__takeCount__=this.__takeCount__,S.__views__=Di(this.__views__),S}function Fc(){if(this.__filtered__){var S=new ln(this);S.__dir__=-1,S.__filtered__=!0}else S=this.clone(),S.__dir__*=-1;return S}function Yl(){var S=this.__wrapped__.value(),k=this.__dir__,P=nn(S),K=k<0,te=P?S.length:0,ae=AO(0,te,this.__views__),he=ae.start,ye=ae.end,ke=ye-he,Xe=K?ye:he-1,et=this.__iteratees__,at=et.length,Ct=0,$t=vs(ke,this.__takeCount__);if(!P||!K&&te==ke&&$t==ke)return Pb(S,this.__actions__);var Jt=[];e:for(;ke--&&Ct<$t;){Xe+=k;for(var Sn=-1,Xt=S[Xe];++Sn<at;){var In=et[Sn],Bn=In.iteratee,Fa=In.type,Io=Bn(Xt);if(Fa==q)Xt=Io;else if(!Io){if(Fa==F)continue e;break e}}Jt[Ct++]=Xt}return Jt}ln.prototype=$c(zc.prototype),ln.prototype.constructor=ln;function Gl(S){var k=-1,P=S==null?0:S.length;for(this.clear();++k<P;){var K=S[k];this.set(K[0],K[1])}}function Cb(){this.__data__=Ef?Ef(null):{},this.size=0}function Df(S){var k=this.has(S)&&delete this.__data__[S];return this.size-=k?1:0,k}function e0(S){var k=this.__data__;if(Ef){var P=k[S];return P===l?n:P}return Zn.call(k,S)?k[S]:n}function ad(S){var k=this.__data__;return Ef?k[S]!==n:Zn.call(k,S)}function Ks(S,k){var P=this.__data__;return this.size+=this.has(S)?0:1,P[S]=Ef&&k===n?l:k,this}Gl.prototype.clear=Cb,Gl.prototype.delete=Df,Gl.prototype.get=e0,Gl.prototype.has=ad,Gl.prototype.set=Ks;function na(S){var k=-1,P=S==null?0:S.length;for(this.clear();++k<P;){var K=S[k];this.set(K[0],K[1])}}function WC(){this.__data__=[],this.size=0}function SO(S){var k=this.__data__,P=il(k,S);if(P<0)return!1;var K=k.length-1;return P==K?k.pop():ql.call(k,P,1),--this.size,!0}function wO(S){var k=this.__data__,P=il(k,S);return P<0?n:k[P][1]}function CO(S){return il(this.__data__,S)>-1}function bs(S,k){var P=this.__data__,K=il(P,S);return K<0?(++this.size,P.push([S,k])):P[K][1]=k,this}na.prototype.clear=WC,na.prototype.delete=SO,na.prototype.get=wO,na.prototype.has=CO,na.prototype.set=bs;function Aa(S){var k=-1,P=S==null?0:S.length;for(this.clear();++k<P;){var K=S[k];this.set(K[0],K[1])}}function Qh(){this.size=0,this.__data__={hash:new Gl,map:new(Co||na),string:new Gl}}function em(S){var k=ym(this,S).delete(S);return this.size-=k?1:0,k}function Eb(S){return ym(this,S).get(S)}function kf(S){return ym(this,S).has(S)}function Tf(S,k){var P=ym(this,S),K=P.size;return P.set(S,k),this.size+=P.size==K?0:1,this}Aa.prototype.clear=Qh,Aa.prototype.delete=em,Aa.prototype.get=Eb,Aa.prototype.has=kf,Aa.prototype.set=Tf;function ld(S){var k=-1,P=S==null?0:S.length;for(this.__data__=new Aa;++k<P;)this.add(S[k])}function YC(S){return this.__data__.set(S,l),this}function EO(S){return this.__data__.has(S)}ld.prototype.add=ld.prototype.push=YC,ld.prototype.has=EO;function ra(S){var k=this.__data__=new na(S);this.size=k.size}function cd(){this.__data__=new na,this.size=0}function Mb(S){var k=this.__data__,P=k.delete(S);return this.size=k.size,P}function t0(S){return this.__data__.get(S)}function GC(S){return this.__data__.has(S)}function Af(S,k){var P=this.__data__;if(P instanceof na){var K=P.__data__;if(!Co||K.length<s-1)return K.push([S,k]),this.size=++P.size,this;P=this.__data__=new Aa(K)}return P.set(S,k),this.size=P.size,this}ra.prototype.clear=cd,ra.prototype.delete=Mb,ra.prototype.get=t0,ra.prototype.has=GC,ra.prototype.set=Af;function n0(S,k){var P=nn(S),K=!P&&vd(S),te=!P&&!K&&eu(S),ae=!P&&!K&&!te&&tu(S),he=P||K||te||ae,ye=he?Hv(S.length,nd):[],ke=ye.length;for(var Xe in S)(k||Zn.call(S,Xe))&&!(he&&(Xe=="length"||te&&(Xe=="offset"||Xe=="parent")||ae&&(Xe=="buffer"||Xe=="byteLength"||Xe=="byteOffset")||La(Xe,ke)))&&ye.push(Xe);return ye}function tm(S){var k=S.length;return k?S[Pf(0,k-1)]:n}function r0(S,k){return Dm(Di(S),Oa(k,0,S.length))}function KC(S){return Dm(Di(S))}function s0(S,k,P){(P!==n&&!Ro(S[k],P)||P===n&&!(k in S))&&Eo(S,k,P)}function _a(S,k,P){var K=S[k];(!(Zn.call(S,k)&&Ro(K,P))||P===n&&!(k in S))&&Eo(S,k,P)}function il(S,k){for(var P=S.length;P--;)if(Ro(S[P][0],k))return P;return-1}function ZC(S,k,P,K){return ol(S,function(te,ae,he){k(K,te,P(te),he)}),K}function Db(S,k){return S&&aa(k,zs(k),S)}function _f(S,k){return S&&aa(k,to(k),S)}function Eo(S,k,P){k=="__proto__"&&Jo?Jo(S,k,{configurable:!0,enumerable:!0,value:P,writable:!0}):S[k]=P}function Of(S,k){for(var P=-1,K=k.length,te=Pe(K),ae=S==null;++P<K;)te[P]=ae?n:nu(S,k[P]);return te}function Oa(S,k,P){return S===S&&(P!==n&&(S=S<=P?S:P),k!==n&&(S=S>=k?S:k)),S}function Mi(S,k,P,K,te,ae){var he,ye=k&f,ke=k&p,Xe=k&m;if(P&&(he=te?P(S,K,te,ae):P(S)),he!==n)return he;if(!Pr(S))return S;var et=nn(S);if(et){if(he=pE(S),!ye)return Di(S,he)}else{var at=Js(S),Ct=at==de||at==me;if(eu(S))return Fb(S,ye);if(at==fe||at==re||Ct&&!te){if(he=ke||Ct?{}:e2(S),!ye)return ke?lE(S,_f(he,S)):aE(S,Db(he,S))}else{if(!mr[at])return te?S:{};he=hE(S,at,ye)}}ae||(ae=new ra);var $t=ae.get(S);if($t)return $t;ae.set(S,he),Hm(S)?S.forEach(function(Xt){he.add(Mi(Xt,k,P,Xt,S,ae))}):ZE(S)&&S.forEach(function(Xt,In){he.set(In,Mi(Xt,k,P,In,S,ae))});var Jt=Xe?ke?Qb:w0:ke?to:zs,Sn=et?n:Jt(S);return bo(Sn||S,function(Xt,In){Sn&&(In=Xt,Xt=S[In]),_a(he,In,Mi(Xt,k,P,In,S,ae))}),he}function JC(S){var k=zs(S);return function(P){return Bc(P,S,k)}}function Bc(S,k,P){var K=P.length;if(S==null)return!K;for(S=Qn(S);K--;){var te=P[K],ae=k[te],he=S[te];if(he===n&&!(te in S)||!ae(he))return!1}return!0}function kb(S,k,P){if(typeof S!="function")throw new So(o);return Mm(function(){S.apply(n,P)},k)}function sa(S,k,P,K){var te=-1,ae=$v,he=!0,ye=S.length,ke=[],Xe=k.length;if(!ye)return ke;P&&(k=jr(k,xo(P))),K?(ae=Uh,he=!1):k.length>=s&&(ae=Vh,he=!1,k=new ld(k));e:for(;++te<ye;){var et=S[te],at=P==null?et:P(et);if(et=K||et!==0?et:0,he&&at===at){for(var Ct=Xe;Ct--;)if(k[Ct]===at)continue e;ke.push(et)}else ae(k,at,K)||ke.push(et)}return ke}var ol=Ub(Na),i0=Ub(a0,!0);function Hc(S,k){var P=!0;return ol(S,function(K,te,ae){return P=!!k(K,te,ae),P}),P}function Ra(S,k,P){for(var K=-1,te=S.length;++K<te;){var ae=S[K],he=k(ae);if(he!=null&&(ye===n?he===he&&!eo(he):P(he,ye)))var ye=he,ke=ae}return ke}function nm(S,k,P,K){var te=S.length;for(P=Zt(P),P<0&&(P=-P>te?0:te+P),K=K===n||K>te?te:Zt(K),K<0&&(K+=te),K=P>K?0:z2(K);P<K;)S[P++]=k;return S}function o0(S,k){var P=[];return ol(S,function(K,te,ae){k(K,te,ae)&&P.push(K)}),P}function Os(S,k,P,K,te){var ae=-1,he=S.length;for(P||(P=n2),te||(te=[]);++ae<he;){var ye=S[ae];k>0&&P(ye)?k>1?Os(ye,k-1,P,K,te):jc(te,ye):K||(te[te.length]=ye)}return te}var ud=Vb(),Rf=Vb(!0);function Na(S,k){return S&&ud(S,k,zs)}function a0(S,k){return S&&Rf(S,k,zs)}function Kl(S,k){return Nc(k,function(P){return No(S[P])})}function al(S,k){k=To(k,S);for(var P=0,K=k.length;S!=null&&P<K;)S=S[Gi(k[P++])];return P&&P==K?S:n}function Tb(S,k,P){var K=k(S);return nn(S)?K:jc(K,P(S))}function Zs(S){return S==null?S===n?je:Ae:Ul&&Ul in Qn(S)?bm(S):s2(S)}function rm(S,k){return S>k}function Mo(S,k){return S!=null&&Zn.call(S,k)}function ia(S,k){return S!=null&&k in Qn(S)}function qc(S,k,P){return S>=vs(k,P)&&S<Zr(k,P)}function sm(S,k,P){for(var K=P?Uh:$v,te=S[0].length,ae=S.length,he=ae,ye=Pe(ae),ke=1/0,Xe=[];he--;){var et=S[he];he&&k&&(et=jr(et,xo(k))),ke=vs(et.length,ke),ye[he]=!P&&(k||te>=120&&et.length>=120)?new ld(he&&et):n}et=S[0];var at=-1,Ct=ye[0];e:for(;++at<te&&Xe.length<ke;){var $t=et[at],Jt=k?k($t):$t;if($t=P||$t!==0?$t:0,!(Ct?Vh(Ct,Jt):K(Xe,Jt,P))){for(he=ae;--he;){var Sn=ye[he];if(!(Sn?Vh(Sn,Jt):K(S[he],Jt,P)))continue e}Ct&&Ct.push(Jt),Xe.push($t)}}return Xe}function XC(S,k,P,K){return Na(S,function(te,ae,he){k(K,P(te),ae,he)}),K}function oa(S,k,P){k=To(k,S),S=Cm(S,k);var K=S==null?S:S[Gi(_r(k))];return K==null?n:yo(K,S,P)}function Wi(S){return Qr(S)&&Zs(S)==re}function as(S){return Qr(S)&&Zs(S)==_e}function l0(S){return Qr(S)&&Zs(S)==ce}function Do(S,k,P,K,te){return S===k?!0:S==null||k==null||!Qr(S)&&!Qr(k)?S!==S&&k!==k:cn(S,k,P,K,Do,te)}function cn(S,k,P,K,te,ae){var he=nn(S),ye=nn(k),ke=he?ne:Js(S),Xe=ye?ne:Js(k);ke=ke==re?fe:ke,Xe=Xe==re?fe:Xe;var et=ke==fe,at=Xe==fe,Ct=ke==Xe;if(Ct&&eu(S)){if(!eu(k))return!1;he=!0,et=!1}if(Ct&&!et)return ae||(ae=new ra),he||tu(S)?gm(S,k,P,K,te,ae):fE(S,k,ke,P,K,te,ae);if(!(P&v)){var $t=et&&Zn.call(S,"__wrapped__"),Jt=at&&Zn.call(k,"__wrapped__");if($t||Jt){var Sn=$t?S.value():S,Xt=Jt?k.value():k;return ae||(ae=new ra),te(Sn,Xt,P,K,ae)}}return Ct?(ae||(ae=new ra),Xb(S,k,P,K,te,ae)):!1}function ur(S){return Qr(S)&&Js(S)==Se}function Jr(S,k,P,K){var te=P.length,ae=te,he=!K;if(S==null)return!ae;for(S=Qn(S);te--;){var ye=P[te];if(he&&ye[2]?ye[1]!==S[ye[0]]:!(ye[0]in S))return!1}for(;++te<ae;){ye=P[te];var ke=ye[0],Xe=S[ke],et=ye[1];if(he&&ye[2]){if(Xe===n&&!(ke in S))return!1}else{var at=new ra;if(K)var Ct=K(Xe,et,ke,S,k,at);if(!(Ct===n?Do(et,Xe,v|y,K,at):Ct))return!1}}return!0}function im(S){if(!Pr(S)||mE(S))return!1;var k=No(S)?bf:ho;return k.test(li(S))}function Nf(S){return Qr(S)&&Zs(S)==Ue}function dd(S){return Qr(S)&&Js(S)==rt}function c0(S){return Qr(S)&&q0(S.length)&&!!cr[Zs(S)]}function jf(S){return typeof S=="function"?S:S==null?Ti:typeof S=="object"?nn(S)?Ab(S[0],S[1]):d0(S):se(S)}function Uc(S){if(!Hf(S))return Cf(S);var k=[];for(var P in Qn(S))Zn.call(S,P)&&P!="constructor"&&k.push(P);return k}function MO(S){if(!Pr(S))return Jl(S);var k=Hf(S),P=[];for(var K in S)K=="constructor"&&(k||!Zn.call(S,K))||P.push(K);return P}function Lr(S,k){return S<k}function u0(S,k){var P=-1,K=Qi(S)?Pe(S.length):[];return ol(S,function(te,ae,he){K[++P]=k(te,ae,he)}),K}function d0(S){var k=C0(S);return k.length==1&&k[0][2]?T0(k[0][0],k[0][1]):function(P){return P===S||Jr(P,S,k)}}function Ab(S,k){return Sm(S)&&cl(k)?T0(Gi(S),k):function(P){var K=nu(P,S);return K===n&&K===k?B2(P,S):Do(k,K,v|y)}}function om(S,k,P,K,te){S!==k&&ud(k,function(ae,he){if(te||(te=new ra),Pr(ae))DO(S,k,he,P,om,K,te);else{var ye=K?K(gr(S,he),ae,he+"",S,k,te):n;ye===n&&(ye=ae),s0(S,he,ye)}},to)}function DO(S,k,P,K,te,ae,he){var ye=gr(S,P),ke=gr(k,P),Xe=he.get(ke);if(Xe){s0(S,P,Xe);return}var et=ae?ae(ye,ke,P+"",S,k,he):n,at=et===n;if(at){var Ct=nn(ke),$t=!Ct&&eu(ke),Jt=!Ct&&!$t&&tu(ke);et=ke,Ct||$t||Jt?nn(ye)?et=ye:cs(ye)?et=Di(ye):$t?(at=!1,et=Fb(ke,!0)):Jt?(at=!1,et=Bb(ke,!0)):et=[]:Fm(ke)||vd(ke)?(et=ye,vd(ye)?et=U0(ye):(!Pr(ye)||No(ye))&&(et=e2(ke))):at=!1}at&&(he.set(ke,et),te(et,ke,K,ae,he),he.delete(ke)),s0(S,P,et)}function f0(S,k){var P=S.length;if(P)return k+=k<0?P:0,La(k,P)?S[k]:n}function p0(S,k,P){k.length?k=jr(k,function(ae){return nn(ae)?function(he){return al(he,ae.length===1?ae[0]:ae)}:ae}):k=[Ti];var K=-1;k=jr(k,xo(Ht()));var te=u0(S,function(ae,he,ye){var ke=jr(k,function(Xe){return Xe(ae)});return{criteria:ke,index:++K,value:ae}});return jC(te,function(ae,he){return oE(ae,he,P)})}function _b(S,k){return oi(S,k,function(P,K){return B2(S,K)})}function oi(S,k,P){for(var K=-1,te=k.length,ae={};++K<te;){var he=k[K],ye=al(S,he);P(ye,he)&&$f(ae,To(he,S),ye)}return ae}function ls(S){return function(k){return al(k,S)}}function If(S,k,P,K){var te=K?gO:hf,ae=-1,he=k.length,ye=S;for(S===k&&(k=Di(k)),P&&(ye=jr(S,xo(P)));++ae<he;)for(var ke=0,Xe=k[ae],et=P?P(Xe):Xe;(ke=te(ye,et,ke,K))>-1;)ye!==S&&ql.call(ye,ke,1),ql.call(S,ke,1);return S}function Lf(S,k){for(var P=S?k.length:0,K=P-1;P--;){var te=k[P];if(P==K||te!==ae){var ae=te;La(te)?ql.call(S,te,1):am(S,te)}}return S}function Pf(S,k){return S+Zh(Vl()*(k-S+1))}function Ob(S,k,P,K){for(var te=-1,ae=Zr(Sf((k-S)/(P||1)),0),he=Pe(ae);ae--;)he[K?ae:++te]=S,S+=P;return he}function ja(S,k){var P="";if(!S||k<1||k>V)return P;do k%2&&(P+=S),k=Zh(k/2),k&&(S+=S);while(k);return P}function un(S,k){return A0(i2(S,k,Ti),S+"")}function Rb(S){return tm(np(S))}function Nb(S,k){var P=np(S);return Dm(P,Oa(k,0,P.length))}function $f(S,k,P,K){if(!Pr(S))return S;k=To(k,S);for(var te=-1,ae=k.length,he=ae-1,ye=S;ye!=null&&++te<ae;){var ke=Gi(k[te]),Xe=P;if(ke==="__proto__"||ke==="constructor"||ke==="prototype")return S;if(te!=he){var et=ye[ke];Xe=K?K(et,ke,ye):n,Xe===n&&(Xe=Pr(et)?et:La(k[te+1])?[]:{})}_a(ye,ke,Xe),ye=ye[ke]}return S}var jb=ys?function(S,k){return ys.set(S,k),S}:Ti,QC=Jo?function(S,k){return Jo(S,"toString",{configurable:!0,enumerable:!1,value:sp(k),writable:!0})}:Ti;function eE(S){return Dm(np(S))}function ko(S,k,P){var K=-1,te=S.length;k<0&&(k=-k>te?0:te+k),P=P>te?te:P,P<0&&(P+=te),te=k>P?0:P-k>>>0,k>>>=0;for(var ae=Pe(te);++K<te;)ae[K]=S[K+k];return ae}function tE(S,k){var P;return ol(S,function(K,te,ae){return P=k(K,te,ae),!P}),!!P}function zf(S,k,P){var K=0,te=S==null?K:S.length;if(typeof k=="number"&&k===k&&te<=Q){for(;K<te;){var ae=K+te>>>1,he=S[ae];he!==null&&!eo(he)&&(P?he<=k:he<k)?K=ae+1:te=ae}return te}return h0(S,k,Ti,P)}function h0(S,k,P,K){var te=0,ae=S==null?0:S.length;if(ae===0)return 0;k=P(k);for(var he=k!==k,ye=k===null,ke=eo(k),Xe=k===n;te<ae;){var et=Zh((te+ae)/2),at=P(S[et]),Ct=at!==n,$t=at===null,Jt=at===at,Sn=eo(at);if(he)var Xt=K||Jt;else Xe?Xt=Jt&&(K||Ct):ye?Xt=Jt&&Ct&&(K||!$t):ke?Xt=Jt&&Ct&&!$t&&(K||!Sn):$t||Sn?Xt=!1:Xt=K?at<=k:at<k;Xt?te=et+1:ae=et}return vs(ae,Z)}function nE(S,k){for(var P=-1,K=S.length,te=0,ae=[];++P<K;){var he=S[P],ye=k?k(he):he;if(!P||!Ro(ye,ke)){var ke=ye;ae[te++]=he===0?0:he}}return ae}function Ib(S){return typeof S=="number"?S:eo(S)?G:+S}function Yi(S){if(typeof S=="string")return S;if(nn(S))return jr(S,Yi)+"";if(eo(S))return od?od.call(S):"";var k=S+"";return k=="0"&&1/S==-B?"-0":k}function Zl(S,k,P){var K=-1,te=$v,ae=S.length,he=!0,ye=[],ke=ye;if(P)he=!1,te=Uh;else if(ae>=s){var Xe=k?null:uE(S);if(Xe)return Vv(Xe);he=!1,te=Vh,ke=new ld}else ke=k?[]:ye;e:for(;++K<ae;){var et=S[K],at=k?k(et):et;if(et=P||et!==0?et:0,he&&at===at){for(var Ct=ke.length;Ct--;)if(ke[Ct]===at)continue e;k&&ke.push(at),ye.push(et)}else te(ke,at,P)||(ke!==ye&&ke.push(at),ye.push(et))}return ye}function am(S,k){return k=To(k,S),S=Cm(S,k),S==null||delete S[Gi(_r(k))]}function Lb(S,k,P,K){return $f(S,k,P(al(S,k)),K)}function lm(S,k,P,K){for(var te=S.length,ae=K?te:-1;(K?ae--:++ae<te)&&k(S[ae],ae,S););return P?ko(S,K?0:ae,K?ae+1:te):ko(S,K?ae+1:0,K?te:ae)}function Pb(S,k){var P=S;return P instanceof ln&&(P=P.value()),ub(k,function(K,te){return te.func.apply(te.thisArg,jc([K],te.args))},P)}function m0(S,k,P){var K=S.length;if(K<2)return K?Zl(S[0]):[];for(var te=-1,ae=Pe(K);++te<K;)for(var he=S[te],ye=-1;++ye<K;)ye!=te&&(ae[te]=sa(ae[te]||he,S[ye],k,P));return Zl(Os(ae,1),k,P)}function $b(S,k,P){for(var K=-1,te=S.length,ae=k.length,he={};++K<te;){var ye=K<ae?k[K]:n;P(he,S[K],ye)}return he}function zb(S){return cs(S)?S:[]}function g0(S){return typeof S=="function"?S:Ti}function To(S,k){return nn(S)?S:Sm(S,k)?[S]:o2(Xn(S))}var rE=un;function Ia(S,k,P){var K=S.length;return P=P===n?K:P,!k&&P>=K?S:ko(S,k,P)}var cm=UC||function(S){return _s.clearTimeout(S)};function Fb(S,k){if(k)return S.slice();var P=S.length,K=Jv?Jv(P):new S.constructor(P);return S.copy(K),K}function um(S){var k=new S.constructor(S.byteLength);return new rd(k).set(new rd(S)),k}function kO(S,k){var P=k?um(S.buffer):S.buffer;return new S.constructor(P,S.byteOffset,S.byteLength)}function sE(S){var k=new S.constructor(S.source,Ci.exec(S));return k.lastIndex=S.lastIndex,k}function iE(S){return Mf?Qn(Mf.call(S)):{}}function Bb(S,k){var P=k?um(S.buffer):S.buffer;return new S.constructor(P,S.byteOffset,S.length)}function Hb(S,k){if(S!==k){var P=S!==n,K=S===null,te=S===S,ae=eo(S),he=k!==n,ye=k===null,ke=k===k,Xe=eo(k);if(!ye&&!Xe&&!ae&&S>k||ae&&he&&ke&&!ye&&!Xe||K&&he&&ke||!P&&ke||!te)return 1;if(!K&&!ae&&!Xe&&S<k||Xe&&P&&te&&!K&&!ae||ye&&P&&te||!he&&te||!ke)return-1}return 0}function oE(S,k,P){for(var K=-1,te=S.criteria,ae=k.criteria,he=te.length,ye=P.length;++K<he;){var ke=Hb(te[K],ae[K]);if(ke){if(K>=ye)return ke;var Xe=P[K];return ke*(Xe=="desc"?-1:1)}}return S.index-k.index}function v0(S,k,P,K){for(var te=-1,ae=S.length,he=P.length,ye=-1,ke=k.length,Xe=Zr(ae-he,0),et=Pe(ke+Xe),at=!K;++ye<ke;)et[ye]=k[ye];for(;++te<he;)(at||te<ae)&&(et[P[te]]=S[te]);for(;Xe--;)et[ye++]=S[te++];return et}function qb(S,k,P,K){for(var te=-1,ae=S.length,he=-1,ye=P.length,ke=-1,Xe=k.length,et=Zr(ae-ye,0),at=Pe(et+Xe),Ct=!K;++te<et;)at[te]=S[te];for(var $t=te;++ke<Xe;)at[$t+ke]=k[ke];for(;++he<ye;)(Ct||te<ae)&&(at[$t+P[he]]=S[te++]);return at}function Di(S,k){var P=-1,K=S.length;for(k||(k=Pe(K));++P<K;)k[P]=S[P];return k}function aa(S,k,P,K){var te=!P;P||(P={});for(var ae=-1,he=k.length;++ae<he;){var ye=k[ae],ke=K?K(P[ye],S[ye],ye,P,S):n;ke===n&&(ke=S[ye]),te?Eo(P,ye,ke):_a(P,ye,ke)}return P}function aE(S,k){return aa(S,E0(S),k)}function lE(S,k){return aa(S,xm(S),k)}function y0(S,k){return function(P,K){var te=nn(P)?dO:ZC,ae=k?k():{};return te(P,S,Ht(K,2),ae)}}function Vc(S){return un(function(k,P){var K=-1,te=P.length,ae=te>1?P[te-1]:n,he=te>2?P[2]:n;for(ae=S.length>3&&typeof ae=="function"?(te--,ae):n,he&&ai(P[0],P[1],he)&&(ae=te<3?n:ae,te=1),k=Qn(k);++K<te;){var ye=P[K];ye&&S(k,ye,K,ae)}return k})}function Ub(S,k){return function(P,K){if(P==null)return P;if(!Qi(P))return S(P,K);for(var te=P.length,ae=k?te:-1,he=Qn(P);(k?ae--:++ae<te)&&K(he[ae],ae,he)!==!1;);return P}}function Vb(S){return function(k,P,K){for(var te=-1,ae=Qn(k),he=K(k),ye=he.length;ye--;){var ke=he[S?ye:++te];if(P(ae[ke],ke,ae)===!1)break}return k}}function Wb(S,k,P){var K=k&x,te=dm(S);function ae(){var he=this&&this!==_s&&this instanceof ae?te:S;return he.apply(K?P:this,arguments)}return ae}function Yb(S){return function(k){k=Xn(k);var P=td(k)?Ur(k):n,K=P?P[0]:k.charAt(0),te=P?Ia(P,1).join(""):k.slice(1);return K[S]()+te}}function fd(S){return function(k){return ub(CM(rp(k).replace(ab,"")),S,"")}}function dm(S){return function(){var k=arguments;switch(k.length){case 0:return new S;case 1:return new S(k[0]);case 2:return new S(k[0],k[1]);case 3:return new S(k[0],k[1],k[2]);case 4:return new S(k[0],k[1],k[2],k[3]);case 5:return new S(k[0],k[1],k[2],k[3],k[4]);case 6:return new S(k[0],k[1],k[2],k[3],k[4],k[5]);case 7:return new S(k[0],k[1],k[2],k[3],k[4],k[5],k[6])}var P=$c(S.prototype),K=S.apply(P,k);return Pr(K)?K:P}}function TO(S,k,P){var K=dm(S);function te(){for(var ae=arguments.length,he=Pe(ae),ye=ae,ke=Xr(te);ye--;)he[ye]=arguments[ye];var Xe=ae<3&&he[0]!==ke&&he[ae-1]!==ke?[]:Hl(he,ke);if(ae-=Xe.length,ae<P)return S0(S,k,Bf,te.placeholder,n,he,Xe,n,n,P-ae);var et=this&&this!==_s&&this instanceof te?K:S;return yo(et,this,he)}return te}function Gb(S){return function(k,P,K){var te=Qn(k);if(!Qi(k)){var ae=Ht(P,3);k=zs(k),P=function(ye){return ae(te[ye],ye,te)}}var he=S(k,P,K);return he>-1?te[ae?k[he]:he]:n}}function Ff(S){return ll(function(k){var P=k.length,K=P,te=Vi.prototype.thru;for(S&&k.reverse();K--;){var ae=k[K];if(typeof ae!="function")throw new So(o);if(te&&!he&&Vr(ae)=="wrapper")var he=new Vi([],!0)}for(K=he?K:P;++K<P;){ae=k[K];var ye=Vr(ae),ke=ye=="wrapper"?vm(ae):n;ke&&wm(ke[0])&&ke[1]==(_|E|T|R)&&!ke[4].length&&ke[9]==1?he=he[Vr(ke[0])].apply(he,ke[3]):he=ae.length==1&&wm(ae)?he[ye]():he.thru(ae)}return function(){var Xe=arguments,et=Xe[0];if(he&&Xe.length==1&&nn(et))return he.plant(et).value();for(var at=0,Ct=P?k[at].apply(this,Xe):et;++at<P;)Ct=k[at].call(this,Ct);return Ct}})}function Bf(S,k,P,K,te,ae,he,ye,ke,Xe){var et=k&_,at=k&x,Ct=k&w,$t=k&(E|D),Jt=k&N,Sn=Ct?n:dm(S);function Xt(){for(var In=arguments.length,Bn=Pe(In),Fa=In;Fa--;)Bn[Fa]=arguments[Fa];if($t)var Io=Xr(Xt),Ba=Wh(Bn,Io);if(K&&(Bn=v0(Bn,K,te,$t)),ae&&(Bn=qb(Bn,ae,he,$t)),In-=Ba,$t&&In<Xe){var Ns=Hl(Bn,Io);return S0(S,k,Bf,Xt.placeholder,P,Bn,Ns,ye,ke,Xe-In)}var oc=at?P:this,bd=Ct?oc[S]:S;return In=Bn.length,ye?Bn=Em(Bn,ye):Jt&&In>1&&Bn.reverse(),et&&ke<In&&(Bn.length=ke),this&&this!==_s&&this instanceof Xt&&(bd=Sn||dm(bd)),bd.apply(oc,Bn)}return Xt}function fm(S,k){return function(P,K){return XC(P,S,k(K),{})}}function pm(S,k){return function(P,K){var te;if(P===n&&K===n)return k;if(P!==n&&(te=P),K!==n){if(te===n)return K;typeof P=="string"||typeof K=="string"?(P=Yi(P),K=Yi(K)):(P=Ib(P),K=Ib(K)),te=S(P,K)}return te}}function b0(S){return ll(function(k){return k=jr(k,xo(Ht())),un(function(P){var K=this;return S(k,function(te){return yo(te,K,P)})})})}function Wc(S,k){k=k===n?" ":Yi(k);var P=k.length;if(P<2)return P?ja(k,S):k;var K=ja(k,Sf(S/mf(k)));return td(k)?Ia(Ur(K),0,S).join(""):K.slice(0,S)}function cE(S,k,P,K){var te=k&x,ae=dm(S);function he(){for(var ye=-1,ke=arguments.length,Xe=-1,et=K.length,at=Pe(et+ke),Ct=this&&this!==_s&&this instanceof he?ae:S;++Xe<et;)at[Xe]=K[Xe];for(;ke--;)at[Xe++]=arguments[++ye];return yo(Ct,te?P:this,at)}return he}function x0(S){return function(k,P,K){return K&&typeof K!="number"&&ai(k,P,K)&&(P=K=n),k=sc(k),P===n?(P=k,k=0):P=sc(P),K=K===n?k<P?1:-1:sc(K),Ob(k,P,K,S)}}function hm(S){return function(k,P){return typeof k=="string"&&typeof P=="string"||(k=jo(k),P=jo(P)),S(k,P)}}function S0(S,k,P,K,te,ae,he,ye,ke,Xe){var et=k&E,at=et?he:n,Ct=et?n:he,$t=et?ae:n,Jt=et?n:ae;k|=et?T:A,k&=~(et?A:T),k&C||(k&=-4);var Sn=[S,k,te,$t,at,Jt,Ct,ye,ke,Xe],Xt=P.apply(n,Sn);return wm(S)&&vE(Xt,Sn),Xt.placeholder=K,qf(Xt,S,k)}function mm(S){var k=Ir[S];return function(P,K){if(P=jo(P),K=K==null?0:vs(Zt(K),292),K&&wo(P)){var te=(Xn(P)+"e").split("e"),ae=k(te[0]+"e"+(+te[1]+K));return te=(Xn(ae)+"e").split("e"),+(te[0]+"e"+(+te[1]-K))}return k(P)}}var uE=Ic&&1/Vv(new Ic([,-0]))[1]==B?function(S){return new Ic(S)}:b;function Kb(S){return function(k){var P=Js(k);return P==Se?Uv(k):P==rt?yO(k):IC(k,S(k))}}function ki(S,k,P,K,te,ae,he,ye){var ke=k&w;if(!ke&&typeof S!="function")throw new So(o);var Xe=K?K.length:0;if(Xe||(k&=-97,K=te=n),he=he===n?he:Zr(Zt(he),0),ye=ye===n?ye:Zt(ye),Xe-=te?te.length:0,k&A){var et=K,at=te;K=te=n}var Ct=ke?n:vm(S),$t=[S,k,P,K,te,et,at,ae,he,ye];if(Ct&&gE($t,Ct),S=$t[0],k=$t[1],P=$t[2],K=$t[3],te=$t[4],ye=$t[9]=$t[9]===n?ke?0:S.length:Zr($t[9]-Xe,0),!ye&&k&(E|D)&&(k&=-25),!k||k==x)var Jt=Wb(S,k,P);else k==E||k==D?Jt=TO(S,k,ye):(k==T||k==(x|T))&&!te.length?Jt=cE(S,k,P,K):Jt=Bf.apply(n,$t);var Sn=Ct?jb:vE;return qf(Sn(Jt,$t),S,k)}function Zb(S,k,P,K){return S===n||Ro(S,yf[P])&&!Zn.call(K,P)?k:S}function Jb(S,k,P,K,te,ae){return Pr(S)&&Pr(k)&&(ae.set(k,S),om(S,k,n,Jb,ae),ae.delete(k)),S}function dE(S){return Fm(S)?n:S}function gm(S,k,P,K,te,ae){var he=P&v,ye=S.length,ke=k.length;if(ye!=ke&&!(he&&ke>ye))return!1;var Xe=ae.get(S),et=ae.get(k);if(Xe&&et)return Xe==k&&et==S;var at=-1,Ct=!0,$t=P&y?new ld:n;for(ae.set(S,k),ae.set(k,S);++at<ye;){var Jt=S[at],Sn=k[at];if(K)var Xt=he?K(Sn,Jt,at,k,S,ae):K(Jt,Sn,at,S,k,ae);if(Xt!==n){if(Xt)continue;Ct=!1;break}if($t){if(!db(k,function(In,Bn){if(!Vh($t,Bn)&&(Jt===In||te(Jt,In,P,K,ae)))return $t.push(Bn)})){Ct=!1;break}}else if(!(Jt===Sn||te(Jt,Sn,P,K,ae))){Ct=!1;break}}return ae.delete(S),ae.delete(k),Ct}function fE(S,k,P,K,te,ae,he){switch(P){case Be:if(S.byteLength!=k.byteLength||S.byteOffset!=k.byteOffset)return!1;S=S.buffer,k=k.buffer;case _e:return!(S.byteLength!=k.byteLength||!ae(new rd(S),new rd(k)));case oe:case ce:case De:return Ro(+S,+k);case pe:return S.name==k.name&&S.message==k.message;case Ue:case ot:return S==k+"";case Se:var ye=Uv;case rt:var ke=K&v;if(ye||(ye=Vv),S.size!=k.size&&!ke)return!1;var Xe=he.get(S);if(Xe)return Xe==k;K|=y,he.set(S,k);var et=gm(ye(S),ye(k),K,te,ae,he);return he.delete(S),et;case Je:if(Mf)return Mf.call(S)==Mf.call(k)}return!1}function Xb(S,k,P,K,te,ae){var he=P&v,ye=w0(S),ke=ye.length,Xe=w0(k),et=Xe.length;if(ke!=et&&!he)return!1;for(var at=ke;at--;){var Ct=ye[at];if(!(he?Ct in k:Zn.call(k,Ct)))return!1}var $t=ae.get(S),Jt=ae.get(k);if($t&&Jt)return $t==k&&Jt==S;var Sn=!0;ae.set(S,k),ae.set(k,S);for(var Xt=he;++at<ke;){Ct=ye[at];var In=S[Ct],Bn=k[Ct];if(K)var Fa=he?K(Bn,In,Ct,k,S,ae):K(In,Bn,Ct,S,k,ae);if(!(Fa===n?In===Bn||te(In,Bn,P,K,ae):Fa)){Sn=!1;break}Xt||(Xt=Ct=="constructor")}if(Sn&&!Xt){var Io=S.constructor,Ba=k.constructor;Io!=Ba&&"constructor"in S&&"constructor"in k&&!(typeof Io=="function"&&Io instanceof Io&&typeof Ba=="function"&&Ba instanceof Ba)&&(Sn=!1)}return ae.delete(S),ae.delete(k),Sn}function ll(S){return A0(i2(S,n,Ar),S+"")}function w0(S){return Tb(S,zs,E0)}function Qb(S){return Tb(S,to,xm)}var vm=ys?function(S){return ys.get(S)}:b;function Vr(S){for(var k=S.name+"",P=Jn[k],K=Zn.call(Jn,k)?P.length:0;K--;){var te=P[K],ae=te.func;if(ae==null||ae==S)return te.name}return k}function Xr(S){var k=Zn.call(ie,"placeholder")?ie:S;return k.placeholder}function Ht(){var S=ie.iteratee||Gm;return S=S===Gm?jf:S,arguments.length?S(arguments[0],arguments[1]):S}function ym(S,k){var P=S.__data__;return k0(k)?P[typeof k=="string"?"string":"hash"]:P.map}function C0(S){for(var k=zs(S),P=k.length;P--;){var K=k[P],te=S[K];k[P]=[K,te,cl(te)]}return k}function Yc(S,k){var P=LC(S,k);return im(P)?P:n}function bm(S){var k=Zn.call(S,Ul),P=S[Ul];try{S[Ul]=n;var K=!0}catch{}var te=Ui.call(S);return K&&(k?S[Ul]=P:delete S[Ul]),te}var E0=Jh?function(S){return S==null?[]:(S=Qn(S),Nc(Jh(S),function(k){return Kh.call(S,k)}))}:Ze,xm=Jh?function(S){for(var k=[];S;)jc(k,E0(S)),S=rl(S);return k}:Ze,Js=Zs;(ea&&Js(new ea(new ArrayBuffer(1)))!=Be||Co&&Js(new Co)!=Se||Qv&&Js(Qv.resolve())!=Te||Ic&&Js(new Ic)!=rt||id&&Js(new id)!=We)&&(Js=function(S){var k=Zs(S),P=k==fe?S.constructor:n,K=P?li(P):"";if(K)switch(K){case jn:return Be;case Lc:return Se;case ta:return Te;case wb:return rt;case Pc:return We}return k});function AO(S,k,P){for(var K=-1,te=P.length;++K<te;){var ae=P[K],he=ae.size;switch(ae.type){case"drop":S+=he;break;case"dropRight":k-=he;break;case"take":k=vs(k,S+he);break;case"takeRight":S=Zr(S,k-he);break}}return{start:S,end:k}}function M0(S){var k=S.match(Gn);return k?k[1].split(Bt):[]}function D0(S,k,P){k=To(k,S);for(var K=-1,te=k.length,ae=!1;++K<te;){var he=Gi(k[K]);if(!(ae=S!=null&&P(S,he)))break;S=S[he]}return ae||++K!=te?ae:(te=S==null?0:S.length,!!te&&q0(te)&&La(he,te)&&(nn(S)||vd(S)))}function pE(S){var k=S.length,P=new S.constructor(k);return k&&typeof S[0]=="string"&&Zn.call(S,"index")&&(P.index=S.index,P.input=S.input),P}function e2(S){return typeof S.constructor=="function"&&!Hf(S)?$c(rl(S)):{}}function hE(S,k,P){var K=S.constructor;switch(k){case _e:return um(S);case oe:case ce:return new K(+S);case Be:return kO(S,P);case ut:case lt:case At:case jt:case Ot:case Pt:case Rt:case Nt:case Fn:return Bb(S,P);case Se:return new K;case De:case ot:return new K(S);case Ue:return sE(S);case rt:return new K;case Je:return iE(S)}}function t2(S,k){var P=k.length;if(!P)return S;var K=P-1;return k[K]=(P>1?"& ":"")+k[K],k=k.join(P>2?", ":" "),S.replace(qr,`{
/* [wrapped with `+k+`] */
`)}function n2(S){return nn(S)||vd(S)||!!(qC&&S&&S[qC])}function La(S,k){var P=typeof S;return k=k??V,!!k&&(P=="number"||P!="symbol"&&tl.test(S))&&S>-1&&S%1==0&&S<k}function ai(S,k,P){if(!Pr(P))return!1;var K=typeof k;return(K=="number"?Qi(P)&&La(k,P.length):K=="string"&&k in P)?Ro(P[k],S):!1}function Sm(S,k){if(nn(S))return!1;var P=typeof S;return P=="number"||P=="symbol"||P=="boolean"||S==null||eo(S)?!0:xt.test(S)||!ft.test(S)||k!=null&&S in Qn(k)}function k0(S){var k=typeof S;return k=="string"||k=="number"||k=="symbol"||k=="boolean"?S!=="__proto__":S===null}function wm(S){var k=Vr(S),P=ie[k];if(typeof P!="function"||!(k in ln.prototype))return!1;if(S===P)return!0;var K=vm(P);return!!K&&S===K[0]}function mE(S){return!!Kv&&Kv in S}var r2=Yv?No:Ie;function Hf(S){var k=S&&S.constructor,P=typeof k=="function"&&k.prototype||yf;return S===P}function cl(S){return S===S&&!Pr(S)}function T0(S,k){return function(P){return P==null?!1:P[S]===k&&(k!==n||S in Qn(P))}}function _O(S){var k=Lm(S,function(K){return P.size===c&&P.clear(),K}),P=k.cache;return k}function gE(S,k){var P=S[1],K=k[1],te=P|K,ae=te<(x|w|_),he=K==_&&P==E||K==_&&P==R&&S[7].length<=k[8]||K==(_|R)&&k[7].length<=k[8]&&P==E;if(!(ae||he))return S;K&x&&(S[2]=k[2],te|=P&x?0:C);var ye=k[3];if(ye){var ke=S[3];S[3]=ke?v0(ke,ye,k[4]):ye,S[4]=ke?Hl(S[3],d):k[4]}return ye=k[5],ye&&(ke=S[5],S[5]=ke?qb(ke,ye,k[6]):ye,S[6]=ke?Hl(S[5],d):k[6]),ye=k[7],ye&&(S[7]=ye),K&_&&(S[8]=S[8]==null?k[8]:vs(S[8],k[8])),S[9]==null&&(S[9]=k[9]),S[0]=k[0],S[1]=te,S}function Jl(S){var k=[];if(S!=null)for(var P in Qn(S))k.push(P);return k}function s2(S){return Ui.call(S)}function i2(S,k,P){return k=Zr(k===n?S.length-1:k,0),function(){for(var K=arguments,te=-1,ae=Zr(K.length-k,0),he=Pe(ae);++te<ae;)he[te]=K[k+te];te=-1;for(var ye=Pe(k+1);++te<k;)ye[te]=K[te];return ye[k]=P(he),yo(S,this,ye)}}function Cm(S,k){return k.length<2?S:al(S,ko(k,0,-1))}function Em(S,k){for(var P=S.length,K=vs(k.length,P),te=Di(S);K--;){var ae=k[K];S[K]=La(ae,P)?te[ae]:n}return S}function gr(S,k){if(!(k==="constructor"&&typeof S[k]=="function")&&k!="__proto__")return S[k]}var vE=Xl(jb),Mm=sd||function(S,k){return _s.setTimeout(S,k)},A0=Xl(QC);function qf(S,k,P){var K=k+"";return A0(S,t2(K,yE(M0(K),P)))}function Xl(S){var k=0,P=0;return function(){var K=Xo(),te=z-(K-P);if(P=K,te>0){if(++k>=L)return arguments[0]}else k=0;return S.apply(n,arguments)}}function Dm(S,k){var P=-1,K=S.length,te=K-1;for(k=k===n?K:k;++P<k;){var ae=Pf(P,te),he=S[ae];S[ae]=S[P],S[P]=he}return S.length=k,S}var o2=_O(function(S){var k=[];return S.charCodeAt(0)===46&&k.push(""),S.replace(st,function(P,K,te,ae){k.push(te?ae.replace(Kn,"$1"):K||P)}),k});function Gi(S){if(typeof S=="string"||eo(S))return S;var k=S+"";return k=="0"&&1/S==-B?"-0":k}function li(S){if(S!=null){try{return Gv.call(S)}catch{}try{return S+""}catch{}}return""}function yE(S,k){return bo(X,function(P){var K="_."+P[0];k&P[1]&&!$v(S,K)&&S.push(K)}),S.sort()}function _0(S){if(S instanceof ln)return S.clone();var k=new Vi(S.__wrapped__,S.__chain__);return k.__actions__=Di(S.__actions__),k.__index__=S.__index__,k.__values__=S.__values__,k}function bE(S,k,P){(P?ai(S,k,P):k===n)?k=1:k=Zr(Zt(k),0);var K=S==null?0:S.length;if(!K||k<1)return[];for(var te=0,ae=0,he=Pe(Sf(K/k));te<K;)he[ae++]=ko(S,te,te+=k);return he}function a2(S){for(var k=-1,P=S==null?0:S.length,K=0,te=[];++k<P;){var ae=S[k];ae&&(te[K++]=ae)}return te}function l2(){var S=arguments.length;if(!S)return[];for(var k=Pe(S-1),P=arguments[0],K=S;K--;)k[K-1]=arguments[K];return jc(nn(P)?Di(P):[P],Os(k,1))}var O0=un(function(S,k){return cs(S)?sa(S,Os(k,1,cs,!0)):[]}),xE=un(function(S,k){var P=_r(k);return cs(P)&&(P=n),cs(S)?sa(S,Os(k,1,cs,!0),Ht(P,2)):[]}),Ql=un(function(S,k){var P=_r(k);return cs(P)&&(P=n),cs(S)?sa(S,Os(k,1,cs,!0),n,P):[]});function xs(S,k,P){var K=S==null?0:S.length;return K?(k=P||k===n?1:Zt(k),ko(S,k<0?0:k,K)):[]}function c2(S,k,P){var K=S==null?0:S.length;return K?(k=P||k===n?1:Zt(k),k=K-k,ko(S,0,k<0?0:k)):[]}function SE(S,k){return S&&S.length?lm(S,Ht(k,3),!0,!0):[]}function $s(S,k){return S&&S.length?lm(S,Ht(k,3),!0):[]}function OO(S,k,P,K){var te=S==null?0:S.length;return te?(P&&typeof P!="number"&&ai(S,k,P)&&(P=0,K=te),nm(S,k,P,K)):[]}function u2(S,k,P){var K=S==null?0:S.length;if(!K)return-1;var te=P==null?0:Zt(P);return te<0&&(te=Zr(K+te,0)),zv(S,Ht(k,3),te)}function d2(S,k,P){var K=S==null?0:S.length;if(!K)return-1;var te=K-1;return P!==n&&(te=Zt(P),te=P<0?Zr(K+te,0):vs(te,K-1)),zv(S,Ht(k,3),te,!0)}function Ar(S){var k=S==null?0:S.length;return k?Os(S,1):[]}function Ki(S){var k=S==null?0:S.length;return k?Os(S,B):[]}function ec(S,k){var P=S==null?0:S.length;return P?(k=k===n?1:Zt(k),Os(S,k)):[]}function wE(S){for(var k=-1,P=S==null?0:S.length,K={};++k<P;){var te=S[k];K[te[0]]=te[1]}return K}function f2(S){return S&&S.length?S[0]:n}function CE(S,k,P){var K=S==null?0:S.length;if(!K)return-1;var te=P==null?0:Zt(P);return te<0&&(te=Zr(K+te,0)),hf(S,k,te)}function RO(S){var k=S==null?0:S.length;return k?ko(S,0,-1):[]}var R0=un(function(S){var k=jr(S,zb);return k.length&&k[0]===S[0]?sm(k):[]}),Zi=un(function(S){var k=_r(S),P=jr(S,zb);return k===_r(P)?k=n:P.pop(),P.length&&P[0]===S[0]?sm(P,Ht(k,2)):[]}),Pa=un(function(S){var k=_r(S),P=jr(S,zb);return k=typeof k=="function"?k:n,k&&P.pop(),P.length&&P[0]===S[0]?sm(P,n,k):[]});function EE(S,k){return S==null?"":wf.call(S,k)}function _r(S){var k=S==null?0:S.length;return k?S[k-1]:n}function ME(S,k,P){var K=S==null?0:S.length;if(!K)return-1;var te=K;return P!==n&&(te=Zt(P),te=te<0?Zr(K+te,0):vs(te,K-1)),k===k?xO(S,k,te):zv(S,NC,te,!0)}function tc(S,k){return S&&S.length?f0(S,Zt(k)):n}var pd=un(ul);function ul(S,k){return S&&S.length&&k&&k.length?If(S,k):S}function p2(S,k,P){return S&&S.length&&k&&k.length?If(S,k,Ht(P,2)):S}function h2(S,k,P){return S&&S.length&&k&&k.length?If(S,k,n,P):S}var $a=ll(function(S,k){var P=S==null?0:S.length,K=Of(S,k);return Lf(S,jr(k,function(te){return La(te,P)?+te:te}).sort(Hb)),K});function DE(S,k){var P=[];if(!(S&&S.length))return P;var K=-1,te=[],ae=S.length;for(k=Ht(k,3);++K<ae;){var he=S[K];k(he,K,S)&&(P.push(he),te.push(K))}return Lf(S,te),P}function Gc(S){return S==null?S:sl.call(S)}function km(S,k,P){var K=S==null?0:S.length;return K?(P&&typeof P!="number"&&ai(S,k,P)?(k=0,P=K):(k=k==null?0:Zt(k),P=P===n?K:Zt(P)),ko(S,k,P)):[]}function Tm(S,k){return zf(S,k)}function Uf(S,k,P){return h0(S,k,Ht(P,2))}function kE(S,k){var P=S==null?0:S.length;if(P){var K=zf(S,k);if(K<P&&Ro(S[K],k))return K}return-1}function TE(S,k){return zf(S,k,!0)}function Am(S,k,P){return h0(S,k,Ht(P,2),!0)}function AE(S,k){var P=S==null?0:S.length;if(P){var K=zf(S,k,!0)-1;if(Ro(S[K],k))return K}return-1}function N0(S){return S&&S.length?nE(S):[]}function _E(S,k){return S&&S.length?nE(S,Ht(k,2)):[]}function NO(S){var k=S==null?0:S.length;return k?ko(S,1,k):[]}function jO(S,k,P){return S&&S.length?(k=P||k===n?1:Zt(k),ko(S,0,k<0?0:k)):[]}function Wn(S,k,P){var K=S==null?0:S.length;return K?(k=P||k===n?1:Zt(k),k=K-k,ko(S,k<0?0:k,K)):[]}function vr(S,k){return S&&S.length?lm(S,Ht(k,3),!1,!0):[]}function kn(S,k){return S&&S.length?lm(S,Ht(k,3)):[]}var Rn=un(function(S){return Zl(Os(S,1,cs,!0))}),er=un(function(S){var k=_r(S);return cs(k)&&(k=n),Zl(Os(S,1,cs,!0),Ht(k,2))}),Ao=un(function(S){var k=_r(S);return k=typeof k=="function"?k:n,Zl(Os(S,1,cs,!0),n,k)});function Kc(S){return S&&S.length?Zl(S):[]}function Vf(S,k){return S&&S.length?Zl(S,Ht(k,2)):[]}function m2(S,k){return k=typeof k=="function"?k:n,S&&S.length?Zl(S,n,k):[]}function za(S){if(!(S&&S.length))return[];var k=0;return S=Nc(S,function(P){if(cs(P))return k=Zr(P.length,k),!0}),Hv(k,function(P){return jr(S,Qu(P))})}function Wr(S,k){if(!(S&&S.length))return[];var P=za(S);return k==null?P:jr(P,function(K){return yo(k,n,K)})}var Zc=un(function(S,k){return cs(S)?sa(S,k):[]}),hd=un(function(S){return m0(Nc(S,cs))}),g2=un(function(S){var k=_r(S);return cs(k)&&(k=n),m0(Nc(S,cs),Ht(k,2))}),_o=un(function(S){var k=_r(S);return k=typeof k=="function"?k:n,m0(Nc(S,cs),n,k)}),Wf=un(za);function _m(S,k){return $b(S||[],k||[],_a)}function Ji(S,k){return $b(S||[],k||[],$f)}var v2=un(function(S){var k=S.length,P=k>1?S[k-1]:n;return P=typeof P=="function"?(S.pop(),P):n,Wr(S,P)});function Om(S){var k=ie(S);return k.__chain__=!0,k}function OE(S,k){return k(S),S}function md(S,k){return k(S)}var j0=ll(function(S){var k=S.length,P=k?S[0]:0,K=this.__wrapped__,te=function(ae){return Of(ae,S)};return k>1||this.__actions__.length||!(K instanceof ln)||!La(P)?this.thru(te):(K=K.slice(P,+P+(k?1:0)),K.__actions__.push({func:md,args:[te],thisArg:n}),new Vi(K,this.__chain__).thru(function(ae){return k&&!ae.length&&ae.push(n),ae}))});function Jc(){return Om(this)}function Rs(){return new Vi(this.value(),this.__chain__)}function Xc(){this.__values__===n&&(this.__values__=tM(this.value()));var S=this.__index__>=this.__values__.length,k=S?n:this.__values__[this.__index__++];return{done:S,value:k}}function Yf(){return this}function nc(S){for(var k,P=this;P instanceof zc;){var K=_0(P);K.__index__=0,K.__values__=n,k?te.__wrapped__=K:k=K;var te=K;P=P.__wrapped__}return te.__wrapped__=S,k}function y2(){var S=this.__wrapped__;if(S instanceof ln){var k=S;return this.__actions__.length&&(k=new ln(this)),k=k.reverse(),k.__actions__.push({func:md,args:[Gc],thisArg:n}),new Vi(k,this.__chain__)}return this.thru(Gc)}function b2(){return Pb(this.__wrapped__,this.__actions__)}var RE=y0(function(S,k,P){Zn.call(S,P)?++S[P]:Eo(S,P,1)});function Rm(S,k,P){var K=nn(S)?_C:Hc;return P&&ai(S,k,P)&&(k=n),K(S,Ht(k,3))}function x2(S,k){var P=nn(S)?Nc:o0;return P(S,Ht(k,3))}var Oo=Gb(u2),NE=Gb(d2);function Xi(S,k){return Os(Nm(S,k),1)}function jE(S,k){return Os(Nm(S,k),B)}function IE(S,k,P){return P=P===n?1:Zt(P),Os(Nm(S,k),P)}function LE(S,k){var P=nn(S)?bo:ol;return P(S,Ht(k,3))}function rc(S,k){var P=nn(S)?fO:i0;return P(S,Ht(k,3))}var I0=y0(function(S,k,P){Zn.call(S,P)?S[P].push(k):Eo(S,P,[k])});function S2(S,k,P,K){S=Qi(S)?S:np(S),P=P&&!K?Zt(P):0;var te=S.length;return P<0&&(P=Zr(te+P,0)),qm(S)?P<=te&&S.indexOf(k,P)>-1:!!te&&hf(S,k,P)>-1}var Gf=un(function(S,k,P){var K=-1,te=typeof k=="function",ae=Qi(S)?Pe(S.length):[];return ol(S,function(he){ae[++K]=te?yo(k,he,P):oa(he,k,P)}),ae}),PE=y0(function(S,k,P){Eo(S,P,k)});function Nm(S,k){var P=nn(S)?jr:u0;return P(S,Ht(k,3))}function $E(S,k,P,K){return S==null?[]:(nn(k)||(k=k==null?[]:[k]),P=K?n:P,nn(P)||(P=P==null?[]:[P]),p0(S,k,P))}var zE=y0(function(S,k,P){S[P?0:1].push(k)},function(){return[[],[]]});function L0(S,k,P){var K=nn(S)?ub:pb,te=arguments.length<3;return K(S,Ht(k,4),P,te,ol)}function w2(S,k,P){var K=nn(S)?OC:pb,te=arguments.length<3;return K(S,Ht(k,4),P,te,i0)}function IO(S,k){var P=nn(S)?Nc:o0;return P(S,z0(Ht(k,3)))}function LO(S){var k=nn(S)?tm:Rb;return k(S)}function PO(S,k,P){(P?ai(S,k,P):k===n)?k=1:k=Zt(k);var K=nn(S)?r0:Nb;return K(S,k)}function FE(S){var k=nn(S)?KC:eE;return k(S)}function BE(S){if(S==null)return 0;if(Qi(S))return qm(S)?mf(S):S.length;var k=Js(S);return k==Se||k==rt?S.size:Uc(S).length}function Kf(S,k,P){var K=nn(S)?db:tE;return P&&ai(S,k,P)&&(k=n),K(S,Ht(k,3))}var P0=un(function(S,k){if(S==null)return[];var P=k.length;return P>1&&ai(S,k[0],k[1])?k=[]:P>2&&ai(k[0],k[1],k[2])&&(k=[k[0]]),p0(S,Os(k,1),[])}),jm=Xv||function(){return _s.Date.now()};function HE(S,k){if(typeof k!="function")throw new So(o);return S=Zt(S),function(){if(--S<1)return k.apply(this,arguments)}}function C2(S,k,P){return k=P?n:k,k=S&&k==null?S.length:k,ki(S,_,n,n,n,n,k)}function E2(S,k){var P;if(typeof k!="function")throw new So(o);return S=Zt(S),function(){return--S>0&&(P=k.apply(this,arguments)),S<=1&&(k=n),P}}var $0=un(function(S,k,P){var K=x;if(P.length){var te=Hl(P,Xr($0));K|=T}return ki(S,K,k,P,te)}),M2=un(function(S,k,P){var K=x|w;if(P.length){var te=Hl(P,Xr(M2));K|=T}return ki(k,K,S,P,te)});function Im(S,k,P){k=P?n:k;var K=ki(S,E,n,n,n,n,n,k);return K.placeholder=Im.placeholder,K}function D2(S,k,P){k=P?n:k;var K=ki(S,D,n,n,n,n,n,k);return K.placeholder=D2.placeholder,K}function k2(S,k,P){var K,te,ae,he,ye,ke,Xe=0,et=!1,at=!1,Ct=!0;if(typeof S!="function")throw new So(o);k=jo(k)||0,Pr(P)&&(et=!!P.leading,at="maxWait"in P,ae=at?Zr(jo(P.maxWait)||0,k):ae,Ct="trailing"in P?!!P.trailing:Ct);function $t(Ns){var oc=K,bd=te;return K=te=n,Xe=Ns,he=S.apply(bd,oc),he}function Jt(Ns){return Xe=Ns,ye=Mm(In,k),et?$t(Ns):he}function Sn(Ns){var oc=Ns-ke,bd=Ns-Xe,uF=k-oc;return at?vs(uF,ae-bd):uF}function Xt(Ns){var oc=Ns-ke,bd=Ns-Xe;return ke===n||oc>=k||oc<0||at&&bd>=ae}function In(){var Ns=jm();if(Xt(Ns))return Bn(Ns);ye=Mm(In,Sn(Ns))}function Bn(Ns){return ye=n,Ct&&K?$t(Ns):(K=te=n,he)}function Fa(){ye!==n&&cm(ye),Xe=0,K=ke=te=ye=n}function Io(){return ye===n?he:Bn(jm())}function Ba(){var Ns=jm(),oc=Xt(Ns);if(K=arguments,te=this,ke=Ns,oc){if(ye===n)return Jt(ke);if(at)return cm(ye),ye=Mm(In,k),$t(ke)}return ye===n&&(ye=Mm(In,k)),he}return Ba.cancel=Fa,Ba.flush=Io,Ba}var tr=un(function(S,k){return kb(S,1,k)}),T2=un(function(S,k,P){return kb(S,jo(k)||0,P)});function $O(S){return ki(S,N)}function Lm(S,k){if(typeof S!="function"||k!=null&&typeof k!="function")throw new So(o);var P=function(){var K=arguments,te=k?k.apply(this,K):K[0],ae=P.cache;if(ae.has(te))return ae.get(te);var he=S.apply(this,K);return P.cache=ae.set(te,he)||ae,he};return P.cache=new(Lm.Cache||Aa),P}Lm.Cache=Aa;function z0(S){if(typeof S!="function")throw new So(o);return function(){var k=arguments;switch(k.length){case 0:return!S.call(this);case 1:return!S.call(this,k[0]);case 2:return!S.call(this,k[0],k[1]);case 3:return!S.call(this,k[0],k[1],k[2])}return!S.apply(this,k)}}function zO(S){return E2(2,S)}var FO=rE(function(S,k){k=k.length==1&&nn(k[0])?jr(k[0],xo(Ht())):jr(Os(k,1),xo(Ht()));var P=k.length;return un(function(K){for(var te=-1,ae=vs(K.length,P);++te<ae;)K[te]=k[te].call(this,K[te]);return yo(S,this,K)})}),Zf=un(function(S,k){var P=Hl(k,Xr(Zf));return ki(S,T,n,k,P)}),gd=un(function(S,k){var P=Hl(k,Xr(gd));return ki(S,A,n,k,P)}),A2=ll(function(S,k){return ki(S,R,n,n,n,k)});function F0(S,k){if(typeof S!="function")throw new So(o);return k=k===n?k:Zt(k),un(S,k)}function _2(S,k){if(typeof S!="function")throw new So(o);return k=k==null?0:Zr(Zt(k),0),un(function(P){var K=P[k],te=Ia(P,0,k);return K&&jc(te,K),yo(S,this,te)})}function Qc(S,k,P){var K=!0,te=!0;if(typeof S!="function")throw new So(o);return Pr(P)&&(K="leading"in P?!!P.leading:K,te="trailing"in P?!!P.trailing:te),k2(S,k,{leading:K,maxWait:k,trailing:te})}function dl(S){return C2(S,1)}function Pm(S,k){return Zf(g0(k),S)}function BO(){if(!arguments.length)return[];var S=arguments[0];return nn(S)?S:[S]}function qE(S){return Mi(S,m)}function UE(S,k){return k=typeof k=="function"?k:n,Mi(S,m,k)}function VE(S){return Mi(S,f|m)}function WE(S,k){return k=typeof k=="function"?k:n,Mi(S,f|m,k)}function HO(S,k){return k==null||Bc(S,k,zs(k))}function Ro(S,k){return S===k||S!==S&&k!==k}var YE=hm(rm),GE=hm(function(S,k){return S>=k}),vd=Wi((function(){return arguments})())?Wi:function(S){return Qr(S)&&Zn.call(S,"callee")&&!Kh.call(S,"callee")},nn=Pe.isArray,O2=MC?xo(MC):as;function Qi(S){return S!=null&&q0(S.length)&&!No(S)}function cs(S){return Qr(S)&&Qi(S)}function $m(S){return S===!0||S===!1||Qr(S)&&Zs(S)==oe}var eu=VC||Ie,KE=DC?xo(DC):l0;function Tn(S){return Qr(S)&&S.nodeType===1&&!Fm(S)}function R2(S){if(S==null)return!0;if(Qi(S)&&(nn(S)||typeof S=="string"||typeof S.splice=="function"||eu(S)||tu(S)||vd(S)))return!S.length;var k=Js(S);if(k==Se||k==rt)return!S.size;if(Hf(S))return!Uc(S).length;for(var P in S)if(Zn.call(S,P))return!1;return!0}function B0(S,k){return Do(S,k)}function N2(S,k,P){P=typeof P=="function"?P:n;var K=P?P(S,k):n;return K===n?Do(S,k,n,P):!!K}function H0(S){if(!Qr(S))return!1;var k=Zs(S);return k==pe||k==ue||typeof S.message=="string"&&typeof S.name=="string"&&!Fm(S)}function j2(S){return typeof S=="number"&&wo(S)}function No(S){if(!Pr(S))return!1;var k=Zs(S);return k==de||k==me||k==ee||k==Ne}function zm(S){return typeof S=="number"&&S==Zt(S)}function q0(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=V}function Pr(S){var k=typeof S;return S!=null&&(k=="object"||k=="function")}function Qr(S){return S!=null&&typeof S=="object"}var ZE=Pv?xo(Pv):ur;function JE(S,k){return S===k||Jr(S,k,C0(k))}function XE(S,k,P){return P=typeof P=="function"?P:n,Jr(S,k,C0(k),P)}function dr(S){return L2(S)&&S!=+S}function I2(S){if(r2(S))throw new tn(i);return im(S)}function Xs(S){return S===null}function qO(S){return S==null}function L2(S){return typeof S=="number"||Qr(S)&&Zs(S)==De}function Fm(S){if(!Qr(S)||Zs(S)!=fe)return!1;var k=rl(S);if(k===null)return!0;var P=Zn.call(k,"constructor")&&k.constructor;return typeof P=="function"&&P instanceof P&&Gv.call(P)==Zv}var Bm=kC?xo(kC):Nf;function P2(S){return zm(S)&&S>=-V&&S<=V}var Hm=TC?xo(TC):dd;function qm(S){return typeof S=="string"||!nn(S)&&Qr(S)&&Zs(S)==ot}function eo(S){return typeof S=="symbol"||Qr(S)&&Zs(S)==Je}var tu=AC?xo(AC):c0;function $2(S){return S===n}function UO(S){return Qr(S)&&Js(S)==We}function QE(S){return Qr(S)&&Zs(S)==Le}var VO=hm(Lr),eM=hm(function(S,k){return S<=k});function tM(S){if(!S)return[];if(Qi(S))return qm(S)?Ur(S):Di(S);if(Gs&&S[Gs])return yb(S[Gs]());var k=Js(S),P=k==Se?Uv:k==rt?Vv:np;return P(S)}function sc(S){if(!S)return S===0?S:0;if(S=jo(S),S===B||S===-B){var k=S<0?-1:1;return k*Y}return S===S?S:0}function Zt(S){var k=sc(S),P=k%1;return k===k?P?k-P:k:0}function z2(S){return S?Oa(Zt(S),0,W):0}function jo(S){if(typeof S=="number")return S;if(eo(S))return G;if(Pr(S)){var k=typeof S.valueOf=="function"?S.valueOf():S;S=Pr(k)?k+"":k}if(typeof S!="string")return S===0?S:+S;S=ed(S);var P=Bi.test(S);return P||ri.test(S)?Iv(S.slice(2),P?2:8):el.test(S)?G:+S}function U0(S){return aa(S,to(S))}function WO(S){return S?Oa(Zt(S),-V,V):S===0?S:0}function Xn(S){return S==null?"":Yi(S)}var nM=Vc(function(S,k){if(Hf(k)||Qi(k)){aa(k,zs(k),S);return}for(var P in k)Zn.call(k,P)&&_a(S,P,k[P])}),V0=Vc(function(S,k){aa(k,to(k),S)}),Jf=Vc(function(S,k,P,K){aa(k,to(k),S,K)}),YO=Vc(function(S,k,P,K){aa(k,zs(k),S,K)}),la=ll(Of);function F2(S,k){var P=$c(S);return k==null?P:Db(P,k)}var rM=un(function(S,k){S=Qn(S);var P=-1,K=k.length,te=K>2?k[2]:n;for(te&&ai(k[0],k[1],te)&&(K=1);++P<K;)for(var ae=k[P],he=to(ae),ye=-1,ke=he.length;++ye<ke;){var Xe=he[ye],et=S[Xe];(et===n||Ro(et,yf[Xe])&&!Zn.call(S,Xe))&&(S[Xe]=ae[Xe])}return S}),sM=un(function(S){return S.push(n,Jb),yo(Qf,n,S)});function iM(S,k){return RC(S,Ht(k,3),Na)}function Um(S,k){return RC(S,Ht(k,3),a0)}function ca(S,k){return S==null?S:ud(S,Ht(k,3),to)}function oM(S,k){return S==null?S:Rf(S,Ht(k,3),to)}function W0(S,k){return S&&Na(S,Ht(k,3))}function ic(S,k){return S&&a0(S,Ht(k,3))}function GO(S){return S==null?[]:Kl(S,zs(S))}function KO(S){return S==null?[]:Kl(S,to(S))}function nu(S,k,P){var K=S==null?n:al(S,k);return K===n?P:K}function aM(S,k){return S!=null&&D0(S,k,Mo)}function B2(S,k){return S!=null&&D0(S,k,ia)}var ZO=fm(function(S,k,P){k!=null&&typeof k.toString!="function"&&(k=Ui.call(k)),S[k]=P},sp(Ti)),JO=fm(function(S,k,P){k!=null&&typeof k.toString!="function"&&(k=Ui.call(k)),Zn.call(S,k)?S[k].push(P):S[k]=[P]},Ht),XO=un(oa);function zs(S){return Qi(S)?n0(S):Uc(S)}function to(S){return Qi(S)?n0(S,!0):MO(S)}function QO(S,k){var P={};return k=Ht(k,3),Na(S,function(K,te,ae){Eo(P,k(K,te,ae),K)}),P}function lM(S,k){var P={};return k=Ht(k,3),Na(S,function(K,te,ae){Eo(P,te,k(K,te,ae))}),P}var Xf=Vc(function(S,k,P){om(S,k,P)}),Qf=Vc(function(S,k,P,K){om(S,k,P,K)}),cM=ll(function(S,k){var P={};if(S==null)return P;var K=!1;k=jr(k,function(ae){return ae=To(ae,S),K||(K=ae.length>1),ae}),aa(S,Qb(S),P),K&&(P=Mi(P,f|p|m,dE));for(var te=k.length;te--;)am(P,k[te]);return P});function eR(S,k){return tp(S,z0(Ht(k)))}var ep=ll(function(S,k){return S==null?{}:_b(S,k)});function tp(S,k){if(S==null)return{};var P=jr(Qb(S),function(K){return[K]});return k=Ht(k),oi(S,P,function(K,te){return k(K,te[0])})}function uM(S,k,P){k=To(k,S);var K=-1,te=k.length;for(te||(te=1,S=n);++K<te;){var ae=S==null?n:S[Gi(k[K])];ae===n&&(K=te,ae=P),S=No(ae)?ae.call(S):ae}return S}function Y0(S,k,P){return S==null?S:$f(S,k,P)}function H2(S,k,P,K){return K=typeof K=="function"?K:n,S==null?S:$f(S,k,P,K)}var G0=Kb(zs),Vm=Kb(to);function dM(S,k,P){var K=nn(S),te=K||eu(S)||tu(S);if(k=Ht(k,4),P==null){var ae=S&&S.constructor;te?P=K?new ae:[]:Pr(S)?P=No(ae)?$c(rl(S)):{}:P={}}return(te?bo:Na)(S,function(he,ye,ke){return k(P,he,ye,ke)}),P}function fM(S,k){return S==null?!0:am(S,k)}function tR(S,k,P){return S==null?S:Lb(S,k,g0(P))}function pM(S,k,P,K){return K=typeof K=="function"?K:n,S==null?S:Lb(S,k,g0(P),K)}function np(S){return S==null?[]:hb(S,zs(S))}function q2(S){return S==null?[]:hb(S,to(S))}function nR(S,k,P){return P===n&&(P=k,k=n),P!==n&&(P=jo(P),P=P===P?P:0),k!==n&&(k=jo(k),k=k===k?k:0),Oa(jo(S),k,P)}function K0(S,k,P){return k=sc(k),P===n?(P=k,k=0):P=sc(P),S=jo(S),qc(S,k,P)}function Z0(S,k,P){if(P&&typeof P!="boolean"&&ai(S,k,P)&&(k=P=n),P===n&&(typeof k=="boolean"?(P=k,k=n):typeof S=="boolean"&&(P=S,S=n)),S===n&&k===n?(S=0,k=1):(S=sc(S),k===n?(k=S,S=0):k=sc(k)),S>k){var K=S;S=k,k=K}if(P||S%1||k%1){var te=Vl();return vs(S+te*(k-S+Xu("1e-"+((te+"").length-1))),k)}return Pf(S,k)}var J0=fd(function(S,k,P){return k=k.toLowerCase(),S+(P?hM(k):k)});function hM(S){return yd(Xn(S).toLowerCase())}function rp(S){return S=Xn(S),S&&S.replace(mo,Yh).replace(CC,"")}function rR(S,k,P){S=Xn(S),k=Yi(k);var K=S.length;P=P===n?K:Oa(Zt(P),0,K);var te=P;return P-=k.length,P>=0&&S.slice(P,te)==k}function mM(S){return S=Xn(S),S&&Ts.test(S)?S.replace(an,vO):S}function gM(S){return S=Xn(S),S&&ht.test(S)?S.replace(it,"\\$&"):S}var vM=fd(function(S,k,P){return S+(P?"-":"")+k.toLowerCase()}),yM=fd(function(S,k,P){return S+(P?" ":"")+k.toLowerCase()}),U2=Yb("toLowerCase");function bM(S,k,P){S=Xn(S),k=Zt(k);var K=k?mf(S):0;if(!k||K>=k)return S;var te=(k-K)/2;return Wc(Zh(te),P)+S+Wc(Sf(te),P)}function xM(S,k,P){S=Xn(S),k=Zt(k);var K=k?mf(S):0;return k&&K<k?S+Wc(k-K,P):S}function X0(S,k,P){S=Xn(S),k=Zt(k);var K=k?mf(S):0;return k&&K<k?Wc(k-K,P)+S:S}function sR(S,k,P){return P||k==null?k=0:k&&(k=+k),Qo(Xn(S).replace(kt,""),k||0)}function iR(S,k,P){return(P?ai(S,k,P):k===n)?k=1:k=Zt(k),ja(Xn(S),k)}function V2(){var S=arguments,k=Xn(S[0]);return S.length<3?k:k.replace(S[1],S[2])}var W2=fd(function(S,k,P){return S+(P?"_":"")+k.toLowerCase()});function Q0(S,k,P){return P&&typeof P!="number"&&ai(S,k,P)&&(k=P=n),P=P===n?W:P>>>0,P?(S=Xn(S),S&&(typeof k=="string"||k!=null&&!Bm(k))&&(k=Yi(k),!k&&td(S))?Ia(Ur(S),0,P):S.split(k,P)):[]}var Y2=fd(function(S,k,P){return S+(P?" ":"")+yd(k)});function SM(S,k,P){return S=Xn(S),P=P==null?0:Oa(Zt(P),0,S.length),k=Yi(k),S.slice(P,P+k.length)==k}function G2(S,k,P){var K=ie.templateSettings;P&&ai(S,k,P)&&(k=n),S=Xn(S),k=Jf({},k,K,Zb);var te=Jf({},k.imports,K.imports,Zb),ae=zs(te),he=hb(te,ae),ye,ke,Xe=0,et=k.interpolate||si,at="__p += '",Ct=Wv((k.escape||si).source+"|"+et.source+"|"+(et===Rr?Nr:si).source+"|"+(k.evaluate||si).source+"|$","g"),$t="//# sourceURL="+(Zn.call(k,"sourceURL")?(k.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++cb+"]")+`
`;S.replace(Ct,function(Xt,In,Bn,Fa,Io,Ba){return Bn||(Bn=Fa),at+=S.slice(Xe,Ba).replace(Go,qv),In&&(ye=!0,at+=`' +
__e(`+In+`) +
'`),Io&&(ke=!0,at+=`';
`+Io+`;
__p += '`),Bn&&(at+=`' +
((__t = (`+Bn+`)) == null ? '' : __t) +
'`),Xe=Ba+Xt.length,Xt}),at+=`';
`;var Jt=Zn.call(k,"variable")&&k.variable;if(!Jt)at=`with (obj) {
`+at+`
}
`;else if(Wt.test(Jt))throw new tn(a);at=(ke?at.replace(pn,""):at).replace(hn,"$1").replace(On,"$1;"),at="function("+(Jt||"obj")+`) {
`+(Jt?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(ye?", __e = _.escape":"")+(ke?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+at+`return __p
}`;var Sn=K2(function(){return Dn(ae,$t+"return "+at).apply(n,he)});if(Sn.source=at,H0(Sn))throw Sn;return Sn}function ru(S){return Xn(S).toLowerCase()}function su(S){return Xn(S).toUpperCase()}function iu(S,k,P){if(S=Xn(S),S&&(P||k===n))return ed(S);if(!S||!(k=Yi(k)))return S;var K=Ur(S),te=Ur(k),ae=mb(K,te),he=gb(K,te)+1;return Ia(K,ae,he).join("")}function Wm(S,k,P){if(S=Xn(S),S&&(P||k===n))return S.slice(0,gf(S)+1);if(!S||!(k=Yi(k)))return S;var K=Ur(S),te=gb(K,Ur(k))+1;return Ia(K,0,te).join("")}function Ym(S,k,P){if(S=Xn(S),S&&(P||k===n))return S.replace(kt,"");if(!S||!(k=Yi(k)))return S;var K=Ur(S),te=mb(K,Ur(k));return Ia(K,te).join("")}function ou(S,k){var P=I,K=$;if(Pr(k)){var te="separator"in k?k.separator:te;P="length"in k?Zt(k.length):P,K="omission"in k?Yi(k.omission):K}S=Xn(S);var ae=S.length;if(td(S)){var he=Ur(S);ae=he.length}if(P>=ae)return S;var ye=P-mf(K);if(ye<1)return K;var ke=he?Ia(he,0,ye).join(""):S.slice(0,ye);if(te===n)return ke+K;if(he&&(ye+=ke.length-ye),Bm(te)){if(S.slice(ye).search(te)){var Xe,et=ke;for(te.global||(te=Wv(te.source,Xn(Ci.exec(te))+"g")),te.lastIndex=0;Xe=te.exec(et);)var at=Xe.index;ke=ke.slice(0,at===n?ye:at)}}else if(S.indexOf(Yi(te),ye)!=ye){var Ct=ke.lastIndexOf(te);Ct>-1&&(ke=ke.slice(0,Ct))}return ke+K}function oR(S){return S=Xn(S),S&&xn.test(S)?S.replace(Vt,PC):S}var wM=fd(function(S,k,P){return S+(P?" ":"")+k.toUpperCase()}),yd=Yb("toUpperCase");function CM(S,k,P){return S=Xn(S),k=P?n:k,k===n?vb(S)?FC(S):mO(S):S.match(k)||[]}var K2=un(function(S,k){try{return yo(S,n,k)}catch(P){return H0(P)?P:new tn(P)}}),ey=ll(function(S,k){return bo(k,function(P){P=Gi(P),Eo(S,P,$0(S[P],S))}),S});function EM(S){var k=S==null?0:S.length,P=Ht();return S=k?jr(S,function(K){if(typeof K[1]!="function")throw new So(o);return[P(K[0]),K[1]]}):[],un(function(K){for(var te=-1;++te<k;){var ae=S[te];if(yo(ae[0],this,K))return yo(ae[1],this,K)}})}function aR(S){return JC(Mi(S,f))}function sp(S){return function(){return S}}function ty(S,k){return S==null||S!==S?k:S}var MM=Ff(),ip=Ff(!0);function Ti(S){return S}function Gm(S){return jf(typeof S=="function"?S:Mi(S,f))}function ny(S){return d0(Mi(S,f))}function DM(S,k){return Ab(S,Mi(k,f))}var lR=un(function(S,k){return function(P){return oa(P,S,k)}}),ry=un(function(S,k){return function(P){return oa(S,P,k)}});function u(S,k,P){var K=zs(k),te=Kl(k,K);P==null&&!(Pr(k)&&(te.length||!K.length))&&(P=k,k=S,S=this,te=Kl(k,zs(k)));var ae=!(Pr(P)&&"chain"in P)||!!P.chain,he=No(S);return bo(te,function(ye){var ke=k[ye];S[ye]=ke,he&&(S.prototype[ye]=function(){var Xe=this.__chain__;if(ae||Xe){var et=S(this.__wrapped__),at=et.__actions__=Di(this.__actions__);return at.push({func:ke,args:arguments,thisArg:S}),et.__chain__=Xe,et}return ke.apply(S,jc([this.value()],arguments))})}),S}function h(){return _s._===this&&(_s._=Zo),this}function b(){}function M(S){return S=Zt(S),un(function(k){return f0(k,S)})}var j=b0(jr),U=b0(_C),J=b0(db);function se(S){return Sm(S)?Qu(Gi(S)):ls(S)}function ge(S){return function(k){return S==null?n:al(S,k)}}var Re=x0(),Ge=x0(!0);function Ze(){return[]}function Ie(){return!1}function ze(){return{}}function _t(){return""}function Ut(){return!0}function fr(S,k){if(S=Zt(S),S<1||S>V)return[];var P=W,K=vs(S,W);k=Ht(k),S-=W;for(var te=Hv(K,k);++P<S;)k(P);return te}function Me(S){return nn(S)?jr(S,Gi):eo(S)?[S]:Di(o2(Xn(S)))}function be(S){var k=++HC;return Xn(S)+k}var Oe=pm(function(S,k){return S+k},0),Ke=mm("ceil"),zt=pm(function(S,k){return S/k},1),qn=mm("floor");function It(S){return S&&S.length?Ra(S,Ti,rm):n}function mn(S,k){return S&&S.length?Ra(S,Ht(k,2),rm):n}function Nn(S){return Fv(S,Ti)}function Un(S,k){return Fv(S,Ht(k,2))}function au(S){return S&&S.length?Ra(S,Ti,Lr):n}function cR(S,k){return S&&S.length?Ra(S,Ht(k,2),Lr):n}var mfe=pm(function(S,k){return S*k},1),gfe=mm("round"),vfe=pm(function(S,k){return S-k},0);function yfe(S){return S&&S.length?Bv(S,Ti):0}function bfe(S,k){return S&&S.length?Bv(S,Ht(k,2)):0}return ie.after=HE,ie.ary=C2,ie.assign=nM,ie.assignIn=V0,ie.assignInWith=Jf,ie.assignWith=YO,ie.at=la,ie.before=E2,ie.bind=$0,ie.bindAll=ey,ie.bindKey=M2,ie.castArray=BO,ie.chain=Om,ie.chunk=bE,ie.compact=a2,ie.concat=l2,ie.cond=EM,ie.conforms=aR,ie.constant=sp,ie.countBy=RE,ie.create=F2,ie.curry=Im,ie.curryRight=D2,ie.debounce=k2,ie.defaults=rM,ie.defaultsDeep=sM,ie.defer=tr,ie.delay=T2,ie.difference=O0,ie.differenceBy=xE,ie.differenceWith=Ql,ie.drop=xs,ie.dropRight=c2,ie.dropRightWhile=SE,ie.dropWhile=$s,ie.fill=OO,ie.filter=x2,ie.flatMap=Xi,ie.flatMapDeep=jE,ie.flatMapDepth=IE,ie.flatten=Ar,ie.flattenDeep=Ki,ie.flattenDepth=ec,ie.flip=$O,ie.flow=MM,ie.flowRight=ip,ie.fromPairs=wE,ie.functions=GO,ie.functionsIn=KO,ie.groupBy=I0,ie.initial=RO,ie.intersection=R0,ie.intersectionBy=Zi,ie.intersectionWith=Pa,ie.invert=ZO,ie.invertBy=JO,ie.invokeMap=Gf,ie.iteratee=Gm,ie.keyBy=PE,ie.keys=zs,ie.keysIn=to,ie.map=Nm,ie.mapKeys=QO,ie.mapValues=lM,ie.matches=ny,ie.matchesProperty=DM,ie.memoize=Lm,ie.merge=Xf,ie.mergeWith=Qf,ie.method=lR,ie.methodOf=ry,ie.mixin=u,ie.negate=z0,ie.nthArg=M,ie.omit=cM,ie.omitBy=eR,ie.once=zO,ie.orderBy=$E,ie.over=j,ie.overArgs=FO,ie.overEvery=U,ie.overSome=J,ie.partial=Zf,ie.partialRight=gd,ie.partition=zE,ie.pick=ep,ie.pickBy=tp,ie.property=se,ie.propertyOf=ge,ie.pull=pd,ie.pullAll=ul,ie.pullAllBy=p2,ie.pullAllWith=h2,ie.pullAt=$a,ie.range=Re,ie.rangeRight=Ge,ie.rearg=A2,ie.reject=IO,ie.remove=DE,ie.rest=F0,ie.reverse=Gc,ie.sampleSize=PO,ie.set=Y0,ie.setWith=H2,ie.shuffle=FE,ie.slice=km,ie.sortBy=P0,ie.sortedUniq=N0,ie.sortedUniqBy=_E,ie.split=Q0,ie.spread=_2,ie.tail=NO,ie.take=jO,ie.takeRight=Wn,ie.takeRightWhile=vr,ie.takeWhile=kn,ie.tap=OE,ie.throttle=Qc,ie.thru=md,ie.toArray=tM,ie.toPairs=G0,ie.toPairsIn=Vm,ie.toPath=Me,ie.toPlainObject=U0,ie.transform=dM,ie.unary=dl,ie.union=Rn,ie.unionBy=er,ie.unionWith=Ao,ie.uniq=Kc,ie.uniqBy=Vf,ie.uniqWith=m2,ie.unset=fM,ie.unzip=za,ie.unzipWith=Wr,ie.update=tR,ie.updateWith=pM,ie.values=np,ie.valuesIn=q2,ie.without=Zc,ie.words=CM,ie.wrap=Pm,ie.xor=hd,ie.xorBy=g2,ie.xorWith=_o,ie.zip=Wf,ie.zipObject=_m,ie.zipObjectDeep=Ji,ie.zipWith=v2,ie.entries=G0,ie.entriesIn=Vm,ie.extend=V0,ie.extendWith=Jf,u(ie,ie),ie.add=Oe,ie.attempt=K2,ie.camelCase=J0,ie.capitalize=hM,ie.ceil=Ke,ie.clamp=nR,ie.clone=qE,ie.cloneDeep=VE,ie.cloneDeepWith=WE,ie.cloneWith=UE,ie.conformsTo=HO,ie.deburr=rp,ie.defaultTo=ty,ie.divide=zt,ie.endsWith=rR,ie.eq=Ro,ie.escape=mM,ie.escapeRegExp=gM,ie.every=Rm,ie.find=Oo,ie.findIndex=u2,ie.findKey=iM,ie.findLast=NE,ie.findLastIndex=d2,ie.findLastKey=Um,ie.floor=qn,ie.forEach=LE,ie.forEachRight=rc,ie.forIn=ca,ie.forInRight=oM,ie.forOwn=W0,ie.forOwnRight=ic,ie.get=nu,ie.gt=YE,ie.gte=GE,ie.has=aM,ie.hasIn=B2,ie.head=f2,ie.identity=Ti,ie.includes=S2,ie.indexOf=CE,ie.inRange=K0,ie.invoke=XO,ie.isArguments=vd,ie.isArray=nn,ie.isArrayBuffer=O2,ie.isArrayLike=Qi,ie.isArrayLikeObject=cs,ie.isBoolean=$m,ie.isBuffer=eu,ie.isDate=KE,ie.isElement=Tn,ie.isEmpty=R2,ie.isEqual=B0,ie.isEqualWith=N2,ie.isError=H0,ie.isFinite=j2,ie.isFunction=No,ie.isInteger=zm,ie.isLength=q0,ie.isMap=ZE,ie.isMatch=JE,ie.isMatchWith=XE,ie.isNaN=dr,ie.isNative=I2,ie.isNil=qO,ie.isNull=Xs,ie.isNumber=L2,ie.isObject=Pr,ie.isObjectLike=Qr,ie.isPlainObject=Fm,ie.isRegExp=Bm,ie.isSafeInteger=P2,ie.isSet=Hm,ie.isString=qm,ie.isSymbol=eo,ie.isTypedArray=tu,ie.isUndefined=$2,ie.isWeakMap=UO,ie.isWeakSet=QE,ie.join=EE,ie.kebabCase=vM,ie.last=_r,ie.lastIndexOf=ME,ie.lowerCase=yM,ie.lowerFirst=U2,ie.lt=VO,ie.lte=eM,ie.max=It,ie.maxBy=mn,ie.mean=Nn,ie.meanBy=Un,ie.min=au,ie.minBy=cR,ie.stubArray=Ze,ie.stubFalse=Ie,ie.stubObject=ze,ie.stubString=_t,ie.stubTrue=Ut,ie.multiply=mfe,ie.nth=tc,ie.noConflict=h,ie.noop=b,ie.now=jm,ie.pad=bM,ie.padEnd=xM,ie.padStart=X0,ie.parseInt=sR,ie.random=Z0,ie.reduce=L0,ie.reduceRight=w2,ie.repeat=iR,ie.replace=V2,ie.result=uM,ie.round=gfe,ie.runInContext=we,ie.sample=LO,ie.size=BE,ie.snakeCase=W2,ie.some=Kf,ie.sortedIndex=Tm,ie.sortedIndexBy=Uf,ie.sortedIndexOf=kE,ie.sortedLastIndex=TE,ie.sortedLastIndexBy=Am,ie.sortedLastIndexOf=AE,ie.startCase=Y2,ie.startsWith=SM,ie.subtract=vfe,ie.sum=yfe,ie.sumBy=bfe,ie.template=G2,ie.times=fr,ie.toFinite=sc,ie.toInteger=Zt,ie.toLength=z2,ie.toLower=ru,ie.toNumber=jo,ie.toSafeInteger=WO,ie.toString=Xn,ie.toUpper=su,ie.trim=iu,ie.trimEnd=Wm,ie.trimStart=Ym,ie.truncate=ou,ie.unescape=oR,ie.uniqueId=be,ie.upperCase=wM,ie.upperFirst=yd,ie.each=LE,ie.eachRight=rc,ie.first=f2,u(ie,(function(){var S={};return Na(ie,function(k,P){Zn.call(ie.prototype,P)||(S[P]=k)}),S})(),{chain:!1}),ie.VERSION=r,bo(["bind","bindKey","curry","curryRight","partial","partialRight"],function(S){ie[S].placeholder=ie}),bo(["drop","take"],function(S,k){ln.prototype[S]=function(P){P=P===n?1:Zr(Zt(P),0);var K=this.__filtered__&&!k?new ln(this):this.clone();return K.__filtered__?K.__takeCount__=vs(P,K.__takeCount__):K.__views__.push({size:vs(P,W),type:S+(K.__dir__<0?"Right":"")}),K},ln.prototype[S+"Right"]=function(P){return this.reverse()[S](P).reverse()}}),bo(["filter","map","takeWhile"],function(S,k){var P=k+1,K=P==F||P==H;ln.prototype[S]=function(te){var ae=this.clone();return ae.__iteratees__.push({iteratee:Ht(te,3),type:P}),ae.__filtered__=ae.__filtered__||K,ae}}),bo(["head","last"],function(S,k){var P="take"+(k?"Right":"");ln.prototype[S]=function(){return this[P](1).value()[0]}}),bo(["initial","tail"],function(S,k){var P="drop"+(k?"":"Right");ln.prototype[S]=function(){return this.__filtered__?new ln(this):this[P](1)}}),ln.prototype.compact=function(){return this.filter(Ti)},ln.prototype.find=function(S){return this.filter(S).head()},ln.prototype.findLast=function(S){return this.reverse().find(S)},ln.prototype.invokeMap=un(function(S,k){return typeof S=="function"?new ln(this):this.map(function(P){return oa(P,S,k)})}),ln.prototype.reject=function(S){return this.filter(z0(Ht(S)))},ln.prototype.slice=function(S,k){S=Zt(S);var P=this;return P.__filtered__&&(S>0||k<0)?new ln(P):(S<0?P=P.takeRight(-S):S&&(P=P.drop(S)),k!==n&&(k=Zt(k),P=k<0?P.dropRight(-k):P.take(k-S)),P)},ln.prototype.takeRightWhile=function(S){return this.reverse().takeWhile(S).reverse()},ln.prototype.toArray=function(){return this.take(W)},Na(ln.prototype,function(S,k){var P=/^(?:filter|find|map|reject)|While$/.test(k),K=/^(?:head|last)$/.test(k),te=ie[K?"take"+(k=="last"?"Right":""):k],ae=K||/^find/.test(k);te&&(ie.prototype[k]=function(){var he=this.__wrapped__,ye=K?[1]:arguments,ke=he instanceof ln,Xe=ye[0],et=ke||nn(he),at=function(In){var Bn=te.apply(ie,jc([In],ye));return K&&Ct?Bn[0]:Bn};et&&P&&typeof Xe=="function"&&Xe.length!=1&&(ke=et=!1);var Ct=this.__chain__,$t=!!this.__actions__.length,Jt=ae&&!Ct,Sn=ke&&!$t;if(!ae&&et){he=Sn?he:new ln(this);var Xt=S.apply(he,ye);return Xt.__actions__.push({func:md,args:[at],thisArg:n}),new Vi(Xt,Ct)}return Jt&&Sn?S.apply(this,ye):(Xt=this.thru(at),Jt?K?Xt.value()[0]:Xt.value():Xt)})}),bo(["pop","push","shift","sort","splice","unshift"],function(S){var k=Gh[S],P=/^(?:push|sort|unshift)$/.test(S)?"tap":"thru",K=/^(?:pop|shift)$/.test(S);ie.prototype[S]=function(){var te=arguments;if(K&&!this.__chain__){var ae=this.value();return k.apply(nn(ae)?ae:[],te)}return this[P](function(he){return k.apply(nn(he)?he:[],te)})}}),Na(ln.prototype,function(S,k){var P=ie[k];if(P){var K=P.name+"";Zn.call(Jn,K)||(Jn[K]=[]),Jn[K].push({name:k,func:P})}}),Jn[Bf(n,w).name]=[{name:"wrapper",func:n}],ln.prototype.clone=Wl,ln.prototype.reverse=Fc,ln.prototype.value=Yl,ie.prototype.at=j0,ie.prototype.chain=Jc,ie.prototype.commit=Rs,ie.prototype.next=Xc,ie.prototype.plant=nc,ie.prototype.reverse=y2,ie.prototype.toJSON=ie.prototype.valueOf=ie.prototype.value=b2,ie.prototype.first=ie.prototype.head,Gs&&(ie.prototype[Gs]=Yf),ie}),vf=xb();ka?((ka.exports=vf)._=vf,Hh._=vf):_s._=vf}).call(FOe)})(Tx,Tx.exports)),Tx.exports}var qe=BOe();function S$(t){return qe.isNil(t)?null:`${t.start.toISOString()};${t.end.toISOString()}`}var Fw=(t=>(t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Document=2]="Document",t[t.Directory=3]="Directory",t[t.Customer=4]="Customer",t[t.User=5]="User",t[t.Favorite=6]="Favorite",t[t.Event=7]="Event",t[t.Call=8]="Call",t[t.Visitor=9]="Visitor",t[t.Reception=10]="Reception",t[t.Birthday=11]="Birthday",t[t.Meeting=12]="Meeting",t[t.Calendar=14]="Calendar",t[t.Contact=15]="Contact",t[t.Application=16]="Application",t[t.UserGroup=17]="UserGroup",t[t.ClientApplication=18]="ClientApplication",t[t.OfflineDocument=30]="OfflineDocument",t[t.EmailFolder=31]="EmailFolder",t[t.EmailMessage=32]="EmailMessage",t[t.EmailAttachment=33]="EmailAttachment",t))(Fw||{});const Qse=t=>({id:t.Id,fileId:t.FileId,name:t.Name,size:t.Size,mimeType:t.MimeType,ownerId:t.OwnerId}),HOe=t=>({AccessType:t.accessType,Ids:t.documentIds??[],ToUserIds:t.userIds??[],ToRoleIds:t.roleIds??[],Recursive:t.recursive??!1}),qOe=(t,e)=>bn.get(`v1/share?entityId=${t}&entityType=${e}`),UOe=(t,e,n,r)=>bn.post("v1/share",{Ids:t,UserIds:e,Type:n,EntityType:r});function eie(t,e){const n=e.UserAccessRights.find(({PrincipalId:r})=>r===t);return qe.isNil(n)?mt.Deny:n==null?void 0:n.Type}const w$=sn("getShareInfoThunk",async({entityId:t,entityType:e})=>await qOe(t,e).then(({data:n})=>n)),VOe=sn("shareThunk",async({entityIds:t,userIds:e,accessType:n,entityType:r})=>{const s=await UOe(t,e,n,r);return $n.showSuccess(ct("successMessages.accessSettingsEdited")),s});sn("getUserCalendarAccessType",async({entityId:t,userId:e},{dispatch:n})=>await n(w$({entityId:t,entityType:Fw.Calendar})).unwrap().then(eie.bind(null,e)));const WOe=(t,e="")=>bn.get(`v1/Events?id=${t}${e}`),C$=t=>bn.post("v1/events",t),Bw=t=>bn.post("v1/events/Save",t),YOe=t=>bn.delete(`v1/events?id=${t}`),GOe=t=>bn.get(`v1/Calendars/Clear?id=${t}`),E$=t=>bn.post("v1/Events/AddException",t),KOe=t=>bn.post("v1/EventParticipants/Apply",t),ZOe=t=>bn.get(`v1/Events/Materials?id=${t}`),JOe=t=>bn.post("v1/Events/AddMaterial",t),XOe=t=>bn.post("v1/Events/DeleteMaterial",t),QOe=(t,e)=>bn.put(`v1/Events/ChangeOwner?id=${t}&userId=${e}`),eRe=t=>bn.get(`v1/email/GetEvent${t}`),Dg=sn("events/getEventsThunk",async t=>{const{body:e}=t,n={...e,StartDate:hse(Lt(cv(e.StartDate,{day:1}))),EndDate:e.EndDate?mse(Lt(Es(e.EndDate,{day:1}))):void 0};return(await C$(n)).data}),tk=sn("events/loadMoreEventsThunk",async t=>{const{body:e}=t,n={...e,StartDate:hse(Lt(cv(e.StartDate,{day:1}))),EndDate:e.EndDate?mse(Lt(Es(e.EndDate,{day:1}))):void 0};return(await C$(n)).data}),Tu=sn("events/getEventThunk",async({id:t,startDate:e,isUtc:n,isAllDay:r})=>{const s=St(e,"yyyy-MM-dd'T'HH:mm:ss'Z'",r?!1:n);return(await WOe(t,`&Date=${s}`)).data}),Wx=sn("events/addEventThunk",async t=>{const{body:e}=t,n=h$(e);try{const r=await Bw(n);return $n.showSuccess(ct("successMessages.eventCreated")),r.data}catch(r){console.log("e",r)}}),Nd=sn("events/editEventThunk",async t=>{const e=h$(t),n=await Bw({...e,Id:Number(t.id)});return $n.showSuccess(t.resource.saveType===rs.Duplicate?ct("successMessages.eventCopied"):ct("successMessages.eventEdited")),n.data}),Yp=sn("events/deleteEventThunk",async t=>{const e=await YOe(t);return $n.showSuccess(ct("successMessages.eventDeleted")),e.data}),Yx=sn("events/deleteEventsThunk",async t=>{const e=await GOe(t);return $n.showSuccess(ct("successMessages.calendarCleared")),e.data}),AL=sn("events/addException",async t=>{var c;const{event:e,exception:n,calendarsGroup:r}=t,s=(c=r[e.resource.calendarId||0])==null?void 0:c.accessType,i=e.resource.accessType,o=s===mt.Read||i===mt.Read,a=m$(e,"Deleted",n),l=o?await Bw({...a.event,Id:Number(e.id)}):await E$(a);return $n.showSuccess(ct("successMessages.deleted")),l.data}),_L=sn("events/addExceptionMoved",async t=>{var c;const{event:e,exception:n,calendarsGroup:r}=t,s=(c=r[e.resource.calendarId||0])==null?void 0:c.accessType,i=e.resource.accessType,o=s===mt.Read||i===mt.Read,a=m$(e,"Moved",n),l=o?await Bw({...a.event,Id:Number(e.id)}):await E$(a);return $n.showSuccess(ct("successMessages.moved")),l.data}),tRe=sn("events/addExceptionEditedThunk",async t=>{var c;const{event:e,exception:n,calendarsGroup:r}=t,s=(c=r[e.resource.calendarId||0])==null?void 0:c.accessType,i=e.resource.accessType,o=s===mt.Read||i===mt.Read,a=m$(e,"Edited",n),l=o?await Bw({...a.event,Id:Number(e.id)}):await E$(a);return $n.showSuccess(ct("successMessages.edited")),l.data}),kg=sn("events/applyParticipantsThunk",async t=>(await KOe(t)).data),nRe=sn("events/addEventMaterialsThunk",async({data:t,showSuccessMessage:e})=>{const n=await JOe(t);return e&&$n.showSuccess(ct("successMessages.materialsAdded")),n.data}),tie=sn("events/deleteEventMaterialsThunk",async({data:t,showSuccessMessage:e})=>{const n=await XOe(t);return e&&$n.showSuccess(ct("successMessages.materialsDeleted")),n.data}),$d=sn("events/getEventMaterialsThunk",async t=>await ZOe(t).then(e=>e.data.map(Qse))),dtt=sn("events/changeOwner",async({eventId:t,userId:e})=>{const n=await QOe(t,e);return $n.showSuccess(ct("successMessages.ownerChanged")),n.data}),D4=sn("event/getEventFromIcs",async t=>{const{search:e}=t;return(await eRe(e)).data}),rRe=sn("events/getEventMaterialsPermissionsThunk",async(t,{dispatch:e})=>{const n=t.map(r=>e(w$({entityId:r,entityType:Fw.Document})));return await Promise.all(n).then(r=>r.reduce((s,i)=>[...s,...i.payload.UserAccessRights],[]))}),yU={currentEventStatus:Cn.Initial,currentEventsStatus:Cn.Initial,eventsSearchStatus:Cn.Initial,events:[],currentEvent:Cp,openedEventContextMenu:!1,openedCreateEventModal:!1,openedMovedRecurringActionModal:!1,openedDeletedRecurringActionModal:!1,openedApplyParticipantsActionModal:!1,foundEvents:[],eventSearchValue:"",isShowEventSearchList:!1,keyUpdateEvents:null,createEventModalCoords:{left:0,top:0},isDifferentDocumentsPermissions:!1,contextMenuModalCoords:{left:0,top:0},timeZones:{},openGlobalDeleteEventModal:{opened:!1,event:Cp},lastFetchedEventsDatesRange:null,lastFetchedEventsCalendarIds:[],eventMaterialsStatus:Cn.Initial,eventSubmit:!1},nie=$1({name:"events",initialState:yU,reducers:{setEventSearchValue:(t,e)=>{t.eventSearchValue=e.payload},toggleShowSearchList:(t,e)=>{t.isShowEventSearchList=e.payload},showGlobalDeleteEventModal:(t,e)=>{const{event:n,opened:r}=e.payload;t.openGlobalDeleteEventModal={opened:r,event:n||Cp}},showCreateEvent:(t,e)=>{const{opened:n,event:r,coords:s}=e.payload;t.openedCreateEventModal=n,t.createEventModalCoords=s,t.currentEvent=r,t.isDifferentDocumentsPermissions=!1},showContextMenuModal:(t,e)=>{const{opened:n,event:r,coords:s}=e.payload;t.openedEventContextMenu=n,t.contextMenuModalCoords=s,t.currentEvent=r||Cp},closeCreateEvent:t=>{t.openedCreateEventModal=!1,t.currentEvent=Cp},closeCreateEventFull:t=>{t.currentEvent=Cp,t.currentEventStatus=Cn.Initial},openRecurringActionModal:(t,e)=>{e.payload==="Moved"?t.openedMovedRecurringActionModal=!0:e.payload==="ApplyParticipant"?t.openedApplyParticipantsActionModal=!0:t.openedDeletedRecurringActionModal=!0},closeRecurringActionModal:(t,e)=>{const{status:n,dropEventToDefault:r}=e.payload;switch(n==="Moved"?t.openedMovedRecurringActionModal=!1:n==="ApplyParticipant"?t.openedApplyParticipantsActionModal=!1:t.openedDeletedRecurringActionModal=!1,n){case"Moved":t.openedMovedRecurringActionModal=!1;break;case"Deleted":t.openedDeletedRecurringActionModal=!1;break;case"ApplyParticipant":t.openedApplyParticipantsActionModal=!1;break;case"Canceled":t.openedApplyParticipantsActionModal=!1,t.openedDeletedRecurringActionModal=!1,t.openedMovedRecurringActionModal=!1}r&&(t.currentEvent=Cp)},setCurrentEvent:(t,e)=>{t.currentEvent=e.payload},resetEventsSlice:()=>yU,resetEventMaterialsStatus:t=>{t.eventMaterialsStatus=Cn.Initial},clearfoundEvents:t=>{t.foundEvents=[]},updateEvents:t=>{t.keyUpdateEvents=LOe()},resetCurrentEventStatus:t=>{t.currentEventStatus=Cn.Initial},resetCurrentEvent:t=>{t.currentEvent=Cp},getTimeZones:(t,e)=>{t.timeZones=e.payload},setEventSubmit:(t,e)=>{t.eventSubmit=e.payload}},extraReducers:t=>t.addCase(Dg.pending,(e,n)=>{e.eventsSearchStatus=Cn.Pending}).addCase(Dg.fulfilled,(e,n)=>{const{calendarsGroup:r,body:{CalendarIds:s,EndDate:i,StartDate:o,query:a},isEdit:l}=n.meta.arg;l||(e.currentEventsStatus=Cn.Fulfilled),e.eventsSearchStatus=Cn.Fulfilled;const c=s.length?n.payload:[],d=ag(e).timeZones;a?e.foundEvents=Sp(c,r,d):e.events=Sp(c,r,d),e.lastFetchedEventsCalendarIds=s,e.lastFetchedEventsDatesRange=S$({start:o,end:i??o})}).addCase(Dg.rejected,e=>{e.eventsSearchStatus=Cn.Rejected,e.currentEventsStatus=Cn.Rejected}).addCase(tk.pending,(e,n)=>{e.eventsSearchStatus=Cn.Pending}).addCase(tk.fulfilled,(e,n)=>{const{calendarsGroup:r,body:{CalendarIds:s}}=n.meta.arg;e.eventsSearchStatus=Cn.Fulfilled;const i=s.length?n.payload:[],o=ag(e).timeZones;e.events=[...e.events,...Sp(i,r,o)],e.currentEventStatus=Cn.Fulfilled}).addCase(tk.rejected,e=>{e.eventsSearchStatus=Cn.Rejected,e.currentEventsStatus=Cn.Rejected}).addCase(Tu.pending,e=>{e.currentEventStatus=Cn.Pending}).addCase(Tu.fulfilled,(e,n)=>{const{calendarsGroup:r}=n.meta.arg,s=ag(e).timeZones,i=Sp([n.payload],r,s)[0]||{};e.currentEventStatus=Cn.Fulfilled,e.currentEvent=i,e.isDifferentDocumentsPermissions=!1}).addCase(Tu.rejected,e=>{e.currentEventStatus=Cn.Rejected}).addCase(Wx.pending,e=>{e.currentEventStatus=Cn.Pending}).addCase(Wx.fulfilled,(e,n)=>{const{calendarsGroup:r}=n.meta.arg,s=ag(e).timeZones;e.events=[...e.events,Sp([n.payload],r,s)[0]],e.currentEventStatus=Cn.Fulfilled}).addCase(Wx.rejected,e=>{e.currentEventStatus=Cn.Rejected}).addCase(Nd.pending,(e,n)=>{const r=n.meta.arg;e.currentEventStatus=Cn.Pending,e.events=e.events.map(s=>{if(s.id===r.id){let i,o;return r.resource.isAllDayWithoutTime?(i=_n(r.start),o=_n(r.end)):(i=r.start,o=r.end),{...r,start:i,end:o}}else return s})}).addCase(Nd.fulfilled,(e,n)=>{e.currentEventStatus=Cn.Fulfilled}).addCase(Nd.rejected,e=>{e.currentEventStatus=Cn.Rejected}).addCase(Yp.pending,(e,n)=>{const r=n.meta.arg;e.events=e.events.filter(s=>Number(s.id)!==Number(r)),e.foundEvents=e.foundEvents.filter(s=>Number(s.id)!==Number(r))}).addCase(Yp.fulfilled,e=>{}).addCase(Yp.rejected,e=>{}).addCase(D4.pending,e=>{e.currentEventStatus=Cn.Pending}).addCase(D4.fulfilled,(e,n)=>{const{calendarsGroup:r}=n.meta.arg,s=ag(e).timeZones,i=Sp([{...n.payload,Id:"1",ParticipantInfo:{AccessType:512,AttendingType:null,Description:null}}],r,s)[0];e.currentEventStatus=Cn.Fulfilled,e.currentEvent=i}).addCase(D4.rejected,(e,n)=>{e.currentEventStatus=Cn.Rejected}).addCase(Yx.pending,(e,n)=>{const r=n.meta.arg;e.events=e.events.filter(s=>s.resource.calendarId!==r||s.resource.participantInfo.accessType===0),e.foundEvents=e.foundEvents.filter(s=>s.resource.calendarId!==r||s.resource.participantInfo.accessType===0)}).addCase(Yx.fulfilled,e=>{}).addCase(Yx.rejected,e=>{}).addCase(AL.fulfilled,(e,n)=>{const{event:r}=n.meta.arg,{StartDate:s,EndDate:i}=n.payload,o=kl(s?new Date(s):r.start,"day"),a=i||Es(new Date,{year:1});e.events=e.events.filter(l=>l.id!==r.id||!gU(l.start,new Date(o),new Date(a))),e.foundEvents=e.foundEvents.filter(l=>l.id!==r.id||!gU(l.start,new Date(o),new Date(a)))}).addCase($d.pending,e=>{e.eventMaterialsStatus=Cn.Pending}).addCase($d.fulfilled,(e,n)=>{e.currentEvent={...e.currentEvent,resource:{...e.currentEvent.resource,documents:n.payload}},e.eventMaterialsStatus=Cn.Fulfilled}).addCase($d.rejected,e=>{e.eventMaterialsStatus=Cn.Rejected}).addCase(rRe.fulfilled,(e,n)=>{const s=e.currentEvent.resource.contactParticipants.filter(c=>c.userId!==e.currentEvent.resource.ownerId).map(({userId:c})=>c),i=n.payload.filter(c=>s.includes(c.PrincipalId)).map(({Type:c})=>c),o=new Set(i),a=o.size!==1?null:Array.from(o)[0],l=qe.isNil(a)?null:{accessType:a};e.isDifferentDocumentsPermissions=qe.isNil(a),e.currentEvent={...e.currentEvent,resource:{...e.currentEvent.resource,documentsPermissions:l}}})}),sRe=nie.reducer,{showCreateEvent:$p,closeCreateEvent:rie,resetEventsSlice:iRe,closeCreateEventFull:oRe,toggleShowSearchList:qy,clearfoundEvents:bU,openRecurringActionModal:Wg,closeRecurringActionModal:sie,updateEvents:Gp,setCurrentEvent:Hw,resetCurrentEventStatus:aRe,resetCurrentEvent:lRe,showContextMenuModal:OL,showGlobalDeleteEventModal:M$,setEventSearchValue:iie,resetEventMaterialsStatus:K_,getTimeZones:cRe,setEventSubmit:oie}=nie.actions,aie=t=>t.events.foundEvents,lie=t=>t.events.events,uRe=t=>t.events.currentEventsStatus,cie=t=>t.events.eventsSearchStatus,uie=t=>t.events.currentEventStatus,cf=t=>t.events.currentEvent,fv=t=>t.events.isShowEventSearchList,dRe=t=>t.events.openedMovedRecurringActionModal,fRe=t=>t.events.openedDeletedRecurringActionModal,pRe=t=>t.events.openedApplyParticipantsActionModal,hRe=t=>t.events.openedCreateEventModal,mRe=t=>t.events.keyUpdateEvents,gRe=t=>t.events.createEventModalCoords,vRe=t=>t.events.isDifferentDocumentsPermissions,yRe=t=>t.events.openedEventContextMenu,bRe=t=>t.events.contextMenuModalCoords,die=t=>t.events.openGlobalDeleteEventModal,D$=t=>t.events.eventSearchValue,xRe=t=>t.events.lastFetchedEventsDatesRange,fie=t=>t.events.eventMaterialsStatus,ftt=t=>t.events.eventSubmit,Yt=()=>{const t=Ve.c(4),e=ve(uJe),n=e===Wp.mobile,r=e===Wp.tablet,s=e===Wp.desktop;let i;return t[0]!==s||t[1]!==n||t[2]!==r?(i={isMobile:n,isTablet:r,isDesktop:s},t[0]=s,t[1]=n,t[2]=r,t[3]=i):i=t[3],i},SRe=20,k$=(t,e)=>{const{height:n}=YP(),[r,s]=O.useState(0),{isMobile:i}=Yt();return O.useEffect(()=>{var o;s(n-Number(((o=t.current)==null?void 0:o.getBoundingClientRect().top)||0)-SRe)},[t.current,n,e]),i?{computedHeight:"auto"}:{computedHeight:r||"100%"}},wRe=()=>{const t=Ve.c(4),[e,n]=O.useState(!1);let r,s;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=()=>{n(!0)};if(document.readyState==="complete")o();else return window.addEventListener("load",o),()=>window.removeEventListener("load",o)},s=[],t[0]=r,t[1]=s):(r=t[0],s=t[1]),O.useEffect(r,s);let i;return t[2]!==e?(i=[e],t[2]=e,t[3]=i):i=t[3],i};var js=(t=>(t.ThisEvent="thisEvent",t.ThisNextEvents="thisNextEvents",t.AllEvents="allEvents",t))(js||{});function Yg(t){if(qe.isNil(t))return null;const[e,n]=t.split(";");return{start:new Date(e),end:new Date(n)}}const CRe="data:image/svg+xml,%3csvg%20width='270'%20height='242'%20viewBox='0%200%20270%20242'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M135.009%20238.485C181.425%20238.485%20219.052%20236.138%20219.052%20233.243C219.052%20230.347%20181.425%20228%20135.009%20228C88.5925%20228%2050.9648%20230.347%2050.9648%20233.243C50.9648%20236.138%2088.5925%20238.485%20135.009%20238.485Z'%20fill='%23F2F2F2'/%3e%3cpath%20d='M239.885%2031.4638C241.124%2031.4638%20242.129%2030.4593%20242.129%2029.2202C242.129%2027.9811%20241.124%2026.9766%20239.885%2026.9766C238.646%2026.9766%20237.642%2027.9811%20237.642%2029.2202C237.642%2030.4593%20238.646%2031.4638%20239.885%2031.4638Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M90.6411%2012.6708C91.8802%2012.6708%2092.8847%2011.6663%2092.8847%2010.4272C92.8847%209.1881%2091.8802%208.18359%2090.6411%208.18359C89.402%208.18359%2088.3975%209.1881%2088.3975%2010.4272C88.3975%2011.6663%2089.402%2012.6708%2090.6411%2012.6708Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M114.244%20218.487C115.483%20218.487%20116.487%20217.483%20116.487%20216.244C116.487%20215.004%20115.483%20214%20114.244%20214C113.005%20214%20112%20215.004%20112%20216.244C112%20217.483%20113.005%20218.487%20114.244%20218.487Z'%20fill='%23CFCFCF'/%3e%3cpath%20d='M177.659%201.99805V11.8425'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M172.738%206.92188H182.583'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M16.9453%2029V38.8444'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12%2033.918H21.8673'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M24.6836%20180.594V190.461'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M19.7383%20185.518H29.6056'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M243.921%2068V77.8444'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M239%2072.9219H248.844'%20stroke='%23BABABA'%20stroke-width='2.2894'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M181.899%2098.5964C162.715%2098.5964%20143.233%2097.818%20124.987%2092.7358C107.085%2087.768%2090.6477%2078.13%2075.9962%2066.9811C66.3811%2059.724%2057.6818%2053.9321%2045.2051%2054.802C33.0198%2055.4777%2021.3744%2060.0523%2011.9873%2067.8511C-3.87759%2081.7242%20-1.47382%20107.387%204.84466%20125.427C14.391%20152.601%2043.3507%20171.488%2068.0065%20183.781C96.4625%20197.998%20127.712%20206.194%20159.075%20211.001C186.547%20215.191%20221.825%20218.212%20245.633%20200.287C267.519%20183.804%20273.517%20146.145%20268.16%20120.734C266.853%20113.224%20262.847%20106.451%20256.897%20101.687C241.536%2090.4465%20218.62%2097.9554%20201.358%2098.3217C194.948%2098.5964%20188.447%2098.5964%20181.899%2098.5964Z'%20fill='%23F2F2F2'/%3e%3cpath%20d='M226.483%2051H44.5169C39.8131%2051%2036%2054.8171%2036%2059.5257V184.474C36%20189.183%2039.8131%20193%2044.5169%20193H226.483C231.187%20193%20235%20189.183%20235%20184.474V59.5257C235%2054.8171%20231.187%2051%20226.483%2051Z'%20fill='white'%20stroke='%23BABABA'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M100.598%20129.52H107.798V134.8H100.598V146H94.9984V134.8H65.3984V129.52L86.1984%2090H92.3584L71.5584%20129.52H94.9984V112.4H100.598V129.52ZM150.605%20139.12C146.925%20144.347%20141.725%20146.96%20135.005%20146.96C128.338%20146.96%20123.111%20144.347%20119.325%20139.12C115.645%20133.84%20113.805%20126.8%20113.805%20118C113.805%20109.147%20115.645%20102.133%20119.325%2096.96C123.111%2091.68%20128.338%2089.04%20135.005%2089.04C141.725%2089.04%20146.925%2091.68%20150.605%2096.96C154.338%20102.133%20156.205%20109.147%20156.205%20118C156.205%20126.853%20154.338%20133.893%20150.605%20139.12ZM123.485%20135.36C126.311%20139.467%20130.151%20141.52%20135.005%20141.52C139.911%20141.52%20143.725%20139.467%20146.445%20135.36C149.218%20131.307%20150.605%20125.52%20150.605%20118C150.605%20110.48%20149.218%20104.693%20146.445%20100.64C143.725%2096.5333%20139.911%2094.48%20135.005%2094.48C130.151%2094.48%20126.311%2096.5333%20123.485%20100.64C120.765%20104.747%20119.405%20110.533%20119.405%20118C119.405%20125.467%20120.765%20131.253%20123.485%20135.36ZM197.395%20129.52H204.595V134.8H197.395V146H191.795V134.8H162.195V129.52L182.995%2090H189.155L168.355%20129.52H191.795V112.4H197.395V129.52Z'%20fill='%23D2D2D2'/%3e%3c/svg%3e",ERe="/assets/500-DuPOfkFJ.svg",MRe="_root_1efb7_1",DRe="_inner_1efb7_13",kRe="_description_1efb7_20",TRe="_title_1efb7_27",ARe="_image_1efb7_34",_Re="_content_1efb7_39",gy={root:MRe,inner:DRe,description:kRe,title:TRe,image:ARe,content:_Re},pie=t=>{const e=Ve.c(28),{error:n}=t,r=Br(),{t:s}=yt();let i;e[0]!==n?(i=n||{title:"",description:"",status:""},e[0]=n,e[1]=i):i=e[1];const{title:o,description:a,status:l}=i;let c;e[2]!==r?(c=()=>{r("/")},e[2]=r,e[3]=c):c=e[3];const d=c,f=l===500?ERe:CRe;let p;e[4]!==f?(p=g.jsx(ov,{className:gy.image,w:270,src:f}),e[4]=f,e[5]=p):p=e[5];let m;e[6]!==s||e[7]!==o?(m=o||s("errorPage.title"),e[6]=s,e[7]=o,e[8]=m):m=e[8];let v;e[9]!==m?(v=g.jsx($g,{className:gy.title,children:m}),e[9]=m,e[10]=v):v=e[10];let y;e[11]!==a||e[12]!==s?(y=a||s("errorPage.description"),e[11]=a,e[12]=s,e[13]=y):y=e[13];let x;e[14]!==y?(x=g.jsx(He,{fz:16,c:"dimmed",ta:"center",className:gy.description,children:y}),e[14]=y,e[15]=x):x=e[15];let w;e[16]!==s?(w=s("errorPage.returnToHome"),e[16]=s,e[17]=w):w=e[17];let C;e[18]!==d||e[19]!==w?(C=g.jsx(wt,{justify:"center",children:g.jsx(en,{size:"sm",onClick:d,children:w})}),e[18]=d,e[19]=w,e[20]=C):C=e[20];let E;e[21]!==C||e[22]!==v||e[23]!==x?(E=g.jsxs("div",{className:gy.content,children:[v,x,C]}),e[21]=C,e[22]=v,e[23]=x,e[24]=E):E=e[24];let D;return e[25]!==E||e[26]!==p?(D=g.jsx(o8,{className:gy.root,children:g.jsxs("div",{className:gy.inner,children:[p,E]})}),e[25]=E,e[26]=p,e[27]=D):D=e[27],D},ORe=Object.freeze(Object.defineProperty({__proto__:null,default:pie},Symbol.toStringTag,{value:"Module"}));/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */var RRe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const on=(t,e,n,r)=>{const s=O.forwardRef(({color:i="currentColor",size:o=24,stroke:a=2,title:l,className:c,children:d,...f},p)=>O.createElement("svg",{ref:p,...RRe[t],width:o,height:o,className:["tabler-icon",`tabler-icon-${e}`,c].join(" "),...t==="filled"?{fill:i}:{strokeWidth:a,stroke:i},...f},[l&&O.createElement("title",{key:"svg-title"},l),...r.map(([m,v])=>O.createElement(m,v)),...Array.isArray(d)?d:[d]]));return s.displayName=`${n}`,s};/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const NRe=[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l12 0",key:"svg-2"}]],hie=on("outline","align-justified","AlignJustified",NRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const jRe=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],T$=on("outline","arrow-left","ArrowLeft",jRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const IRe=[["path",{d:"M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6",key:"svg-0"}],["path",{d:"M9 17v1a3 3 0 0 0 6 0v-1",key:"svg-1"}]],A$=on("outline","bell","Bell",IRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const LRe=[["path",{d:"M3 9a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9",key:"svg-0"}],["path",{d:"M8 7v-2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v2",key:"svg-1"}]],PRe=on("outline","briefcase-2","Briefcase2",LRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $Re=[["path",{d:"M3 9a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -9",key:"svg-0"}],["path",{d:"M8 7v-2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v2",key:"svg-1"}],["path",{d:"M12 12l0 .01",key:"svg-2"}],["path",{d:"M3 13a20 20 0 0 0 18 0",key:"svg-3"}]],zRe=on("outline","briefcase","Briefcase",$Re);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const FRe=[["path",{d:"M9 9v-1a3 3 0 0 1 6 0v1",key:"svg-0"}],["path",{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3",key:"svg-1"}],["path",{d:"M3 13l4 0",key:"svg-2"}],["path",{d:"M17 13l4 0",key:"svg-3"}],["path",{d:"M12 20l0 -6",key:"svg-4"}],["path",{d:"M4 19l3.35 -2",key:"svg-5"}],["path",{d:"M20 19l-3.35 -2",key:"svg-6"}],["path",{d:"M4 7l3.75 2.4",key:"svg-7"}],["path",{d:"M20 7l-3.75 2.4",key:"svg-8"}]],BRe=on("outline","bug","Bug",FRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const HRe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M16 3l0 4",key:"svg-1"}],["path",{d:"M8 3l0 4",key:"svg-2"}],["path",{d:"M4 11l16 0",key:"svg-3"}],["path",{d:"M8 15h2v2h-2l0 -2",key:"svg-4"}]],mie=on("outline","calendar-event","CalendarEvent",HRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const qRe=[["path",{d:"M12.5 21h-6.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v5",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M16 19h6",key:"svg-4"}],["path",{d:"M19 16v6",key:"svg-5"}]],gie=on("outline","calendar-plus","CalendarPlus",qRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const URe=[["path",{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12",key:"svg-0"}],["path",{d:"M16 3v4",key:"svg-1"}],["path",{d:"M8 3v4",key:"svg-2"}],["path",{d:"M4 11h16",key:"svg-3"}],["path",{d:"M11 15h1",key:"svg-4"}],["path",{d:"M12 15v3",key:"svg-5"}]],Z_=on("outline","calendar","Calendar",URe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const VRe=[["path",{d:"M12 15a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-0"}],["path",{d:"M13 17.5v4.5l2 -1.5l2 1.5v-4.5",key:"svg-1"}],["path",{d:"M10 19h-5a2 2 0 0 1 -2 -2v-10c0 -1.1 .9 -2 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -1 1.73",key:"svg-2"}],["path",{d:"M6 9l12 0",key:"svg-3"}],["path",{d:"M6 12l3 0",key:"svg-4"}],["path",{d:"M6 15l2 0",key:"svg-5"}]],WRe=on("outline","certificate","Certificate",VRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const YRe=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],vie=on("outline","check","Check",YRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const GRe=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],_$=on("outline","chevron-down","ChevronDown",GRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const KRe=[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]],yie=on("outline","chevron-left","ChevronLeft",KRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZRe=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],O$=on("outline","chevron-right","ChevronRight",ZRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const JRe=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],XRe=on("outline","chevron-up","ChevronUp",JRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const QRe=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 12h3.5",key:"svg-1"}],["path",{d:"M12 7v5",key:"svg-2"}]],R$=on("outline","clock-hour-3","ClockHour3",QRe);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const e4e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 7v5l3 3",key:"svg-1"}]],t4e=on("outline","clock","Clock",e4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const n4e=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],r4e=on("outline","copy","Copy",n4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const s4e=[["path",{d:"M3 19l18 0",key:"svg-0"}],["path",{d:"M5 7a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1l0 -8",key:"svg-1"}]],i4e=on("outline","device-laptop","DeviceLaptop",s4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const o4e=[["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],bie=on("outline","dots-vertical","DotsVertical",o4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const a4e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 9v4",key:"svg-1"}],["path",{d:"M12 16v.01",key:"svg-2"}]],l4e=on("outline","exclamation-circle","ExclamationCircle",a4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const c4e=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],u4e=on("outline","eye-off","EyeOff",c4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const d4e=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],f4e=on("outline","eye","Eye",d4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const p4e=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}],["path",{d:"M9 10h.01",key:"svg-4"}],["path",{d:"M15 10h.01",key:"svg-5"}],["path",{d:"M9.5 15.05a3.5 3.5 0 0 1 5 0",key:"svg-6"}]],h4e=on("outline","face-id-error","FaceIdError",p4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const m4e=[["path",{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5",key:"svg-0"}],["path",{d:"M19 22v-6",key:"svg-1"}],["path",{d:"M22 19l-3 -3l-3 3",key:"svg-2"}]],xU=on("outline","folder-up","FolderUp",m4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const g4e=[["path",{d:"M4 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}],["path",{d:"M4 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-6"}],["path",{d:"M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-7"}],["path",{d:"M18 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-8"}]],v4e=on("outline","grid-dots","GridDots",g4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const y4e=[["path",{d:"M19 8.268a2 2 0 0 1 1 1.732v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-8a2 2 0 0 1 2 -2h3",key:"svg-0"}],["path",{d:"M5 15.734a2 2 0 0 1 -1 -1.734v-8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-3",key:"svg-1"}]],b4e=on("outline","layers-linked","LayersLinked",y4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const x4e=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],S4e=on("outline","lock","Lock",x4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const w4e=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],C4e=on("outline","logout","Logout",w4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const E4e=[["path",{d:"M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-0"}],["path",{d:"M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0",key:"svg-1"}]],N$=on("outline","map-pin","MapPin",E4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const M4e=[["path",{d:"M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5",key:"svg-0"}]],xie=on("outline","paperclip","Paperclip",M4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const D4e=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Sie=on("outline","pencil","Pencil",D4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const k4e=[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]],T4e=on("outline","photo","Photo",k4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const A4e=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],_4e=on("outline","plus","Plus",A4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const O4e=[["path",{d:"M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4",key:"svg-0"}],["path",{d:"M12 19l0 .01",key:"svg-1"}]],wie=on("outline","question-mark","QuestionMark",O4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const R4e=[["path",{d:"M4 12v-3a3 3 0 0 1 3 -3h13m-3 -3l3 3l-3 3",key:"svg-0"}],["path",{d:"M20 12v3a3 3 0 0 1 -3 3h-13m3 3l-3 -3l3 -3",key:"svg-1"}]],J_=on("outline","repeat","Repeat",R4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const N4e=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],Cie=on("outline","search","Search",N4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const j4e=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],Eie=on("outline","settings","Settings",j4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const I4e=[["path",{d:"M19 8.71l-5.333 -4.148a2.666 2.666 0 0 0 -3.274 0l-5.334 4.148a2.665 2.665 0 0 0 -1.029 2.105v7.2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-7.2c0 -.823 -.38 -1.6 -1.03 -2.105",key:"svg-0"}],["path",{d:"M16 15c-2.21 1.333 -5.792 1.333 -8 0",key:"svg-1"}]],L4e=on("outline","smart-home","SmartHome",I4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const P4e=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Mie=on("outline","trash","Trash",P4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const $4e=[["path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M7 9l5 -5l5 5",key:"svg-1"}],["path",{d:"M12 4l0 12",key:"svg-2"}]],z4e=on("outline","upload","Upload",$4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const F4e=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 10a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]],B4e=on("outline","user-circle","UserCircle",F4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const H4e=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],q4e=on("outline","user","User",H4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const U4e=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],j$=on("outline","users","Users",U4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const V4e=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Tc=on("outline","x","X",V4e);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const W4e=[["path",{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",key:"svg-0"}]],ah=on("filled","circle-filled","CircleFilled",W4e),Y4e=t=>{const e=Ve.c(17),{miw:n}=t,{t:r}=yt();let s,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(le,{className:"error-icon-container",children:g.jsx(h4e,{size:100,stroke:1})}),i=g.jsx(vn,{h:"md"}),e[0]=s,e[1]=i):(s=e[0],i=e[1]);let o;e[2]!==r?(o=r("errorBoundary.title"),e[2]=r,e[3]=o):o=e[3];let a;e[4]!==o?(a=g.jsx($g,{className:"error-title",children:o}),e[4]=o,e[5]=a):a=e[5];let l;e[6]!==r?(l=r("errorBoundary.description"),e[6]=r,e[7]=l):l=e[7];let c;e[8]!==l?(c=g.jsx($g,{className:"error-title",children:l}),e[8]=l,e[9]=c):c=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(vn,{h:"md"}),e[10]=d):d=e[10];let f;e[11]!==a||e[12]!==c?(f=g.jsxs(le,{className:"error-container",children:[s,i,g.jsxs(le,{children:[a,c,d]})]}),e[11]=a,e[12]=c,e[13]=f):f=e[13];let p;return e[14]!==n||e[15]!==f?(p=g.jsx(le,{mih:300,miw:n,className:"container",children:f}),e[14]=n,e[15]=f,e[16]=p):p=e[16],p};class fi extends O.Component{constructor(){super(...arguments);op(this,"state",{hasError:!1})}static getDerivedStateFromError(n){return{hasError:!0}}componentDidCatch(n,r){console.error("Uncaught error:",n,r)}render(){return this.state.hasError||this.props.additionalError?this.props.withFullPage?g.jsx(pie,{error:{title:ct("errorsCatch.errorPage.title"),description:ct("errorsCatch.errorPage.description_404"),status:500}}):g.jsx(Y4e,{miw:this.props.miw}):this.props.children}}op(fi,"defaultProps",{miw:300});var k4={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/var SU;function G4e(){return SU||(SU=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(i=s(i,r(a)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var a in i)e.call(i,a)&&i[a]&&(o=s(o,a));return o}function s(i,o){return o?i?i+" "+o:i+o:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(k4)),k4.exports}var K4e=G4e();const ti=Mr(K4e);var ax={exports:{}},wU;function Z4e(){if(wU)return ax.exports;wU=1;var t=Array.prototype.slice;function e(i){var o=t.call(arguments,1),a;switch(o.length){case 1:throw new Error("Not enough forms");case 2:a=i>1?o[1]:o[0];break;default:a=o[s(i)];break}return a.replace(/%d/g,i)}function n(i){var o=t.call(arguments,1),a=o[r(i)];return a.replace(/%d/g,i)}function r(i){return i>1e6?2:(i>1e3&&i<1e6&&/000$/.test(i)&&(i/=1e3),i%10===1&&i%100!==11||/1000$/.test(i.toString())?0:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?1:2)}function s(i){return i%10===1&&i%100!==11?0:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?1:2}return ax.exports=e,ax.exports.noun=e,ax.exports.verb=n,ax.exports}var J4e=Z4e();const lg=Mr(J4e),X4e=/^([a-zA-Z0-9._%+-]*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})?$/;var Wa=(t=>(t[t.None=0]="None",t[t.WillVisit=1]="WillVisit",t[t.NotVisit=2]="NotVisit",t[t.VisitAll=3]="VisitAll",t[t.Maybe=4]="Maybe",t))(Wa||{});function RL(t){return`/api/v2/profile/getAvatar?id=${t}`}const T4=16,Q4e=t=>{switch(t){case Wa.Maybe:return{icon:g.jsx(wie,{size:T4,color:"var(--mantine-color-gray-6)"}),color:"var(--mantine-color-gray-1)"};case Wa.WillVisit:return{icon:g.jsx(vie,{size:T4,color:"var(--mantine-color-green-6)"}),color:"var(--mantine-color-green-0)"};case Wa.NotVisit:return{icon:g.jsx(Tc,{size:T4,color:"var(--mantine-color-red-6)"}),color:"var(--mantine-color-red-0)"};case Wa.None:default:return{icon:null,color:"var(--mantine-color-green-0)"}}},eNe=(t,e,n)=>{const r=n===t.userId?e.attendingType:t.attendingType,{icon:s,color:i}=Q4e(r);return s&&g.jsx(b_,{size:"xs",color:i,radius:"xl",variant:"filled",children:s})},tNe=t=>{var n;const e=(n=t.name)==null?void 0:n.split(/\s/);return{Id:t.userId,Avatar:t.hasAvatar?RL(t.userId):null,FirstName:(e==null?void 0:e[1])??"",Surname:(e==null?void 0:e[0])??"",Email:t.email,Name:t.name}},CU=["#FFA94D","#FFD43B","#A9E34B","#69DB7C","#38D9A9","#3BC9DB","#4DABF7","#748FFC","#9775FA","#DA77F2","#F783AC","#FF8787"],nNe=t=>{if(typeof t!="string")throw new Error("Input must be a string");const e=n=>n.trim()===""?0:Array.from(n).reduce((r,s)=>r+s.charCodeAt(0),0)%CU.length;return(()=>{try{const n=e(t);return CU[n]}catch(n){return console.error("Error generating color:",n),"#FFFFFF"}})()},OS=t=>{var x,w,C,E,D,T,A;const e=Ve.c(22);let n,r,s,i;e[0]!==t?({user:i,size:s,ref:r,...n}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=i):(n=e[1],r=e[2],s=e[3],i=e[4]);const o=(i==null?void 0:i.Avatar)??null;let a;e[5]!==(i==null?void 0:i.Id)?(a=((x=i==null?void 0:i.Id)==null?void 0:x.toString())??"",e[5]=i==null?void 0:i.Id,e[6]=a):a=e[6];const l=nNe(a);let c;e:{if(!qe.isNil(o)){c="";break e}const _=(w=i==null?void 0:i.Surname)==null?void 0:w[0],R=(C=i==null?void 0:i.FirstName)==null?void 0:C[0];if(!qe.isNil(_)&&!qe.isNil(R)){const $=`${_}${R}`;let L;e[7]!==$?(L=$.toUpperCase(),e[7]=$,e[8]=L):L=e[8],c=L;break e}let N;e[9]!==((E=i==null?void 0:i.Email)==null?void 0:E[0])?(N=(T=(D=i==null?void 0:i.Email)==null?void 0:D[0])==null?void 0:T.toUpperCase(),e[9]=(A=i==null?void 0:i.Email)==null?void 0:A[0],e[10]=N):N=e[10],c=N??""}const d=c,f=i==null?void 0:i.Name,p=i==null?void 0:i.Name,m=s??"md";let v;e[11]!==l?(v={root:{"--avatar-bg":l,"--avatar-color":"white"}},e[11]=l,e[12]=v):v=e[12];let y;return e[13]!==n||e[14]!==r||e[15]!==f||e[16]!==p||e[17]!==m||e[18]!==v||e[19]!==o||e[20]!==d?(y=g.jsx(O1,{alt:f,...n,ref:r,name:p,src:o,size:m,radius:"xl",lh:"var(--avatar-size)",styles:v,children:d}),e[13]=n,e[14]=r,e[15]=f,e[16]=p,e[17]=m,e[18]=v,e[19]=o,e[20]=d,e[21]=y):y=e[21],y},X_=t=>{const e=Ve.c(14);let n,r,s,i,o;e[0]!==t?({user:o,size:s,hoverCardProps:i,ref:r,...n}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=o):(n=e[1],r=e[2],s=e[3],i=e[4],o=e[5]);let a;e[6]!==i?(a=i===void 0?{}:i,e[6]=i,e[7]=a):a=e[7];const l=a;let c;return e[8]!==l||e[9]!==n||e[10]!==r||e[11]!==s||e[12]!==o?(c=o?g.jsx(Qne,{email:o.Email||void 0,name:o.Name,hoverCardProps:l,children:g.jsx(OS,{user:o,size:s,ref:r,alt:"",...n})}):g.jsx(OS,{size:s,ref:r,alt:"",...n}),e[8]=l,e[9]=n,e[10]=r,e[11]=s,e[12]=o,e[13]=c):c=e[13],c},Die=t=>{const e=Ve.c(63),{onDelete:n,guest:r,participantInfo:s,isDeleteActionVisible:i,currentUserId:o,organizerId:a,avatarSize:l,hideAttendingType:c,isShowCheckbox:d,onChangeCalendarBusy:f,calendarsBusy:p,index:m}=t,{hovered:v,ref:y}=wQ(),{t:x}=yt(),{isMobile:w}=Yt(),C=p?p[Number(m)]:null;let E;e[0]!==r?(E=tNe(r),e[0]=r,e[1]=E):E=e[1];const D=E,T=y,A=`item-with-custom-checkbox ${i?"":"not-active"}`,_=C==null?void 0:C.color;let R;e[2]!==_?(R={"--item-color":_},e[2]=_,e[3]=R):R=e[3];const N=R;let I;e[4]!==p||e[5]!==r.id||e[6]!==d||e[7]!==(C==null?void 0:C.isDisable)||e[8]!==f?(I=()=>{d&&f&&p&&!(C!=null&&C.isDisable)&&f(Number(r.id))},e[4]=p,e[5]=r.id,e[6]=d,e[7]=C==null?void 0:C.isDisable,e[8]=f,e[9]=I):I=e[9];const $=d?"pointer":"default";let L;e[10]!==$?(L={cursor:$},e[10]=$,e[11]=L):L=e[11];let z;e[12]!==l||e[13]!==p||e[14]!==o||e[15]!==r||e[16]!==c||e[17]!==d||e[18]!==(C==null?void 0:C.color)||e[19]!==(C==null?void 0:C.isActive)||e[20]!==(C==null?void 0:C.isDisable)||e[21]!==s||e[22]!==D?(z=g.jsx(vt,{align:"start",children:d&&p?g.jsx(nf,{w:20,py:"sm",mr:"sm",onChange:rNe,disabled:(C==null?void 0:C.isDisable)||!1,checked:(C==null?void 0:C.isActive)||!1,color:C==null?void 0:C.color}):g.jsxs(le,{className:"avatarWrapper",children:[g.jsx(X_,{user:D,size:l}),!c&&g.jsx(le,{className:"avatarAction",children:eNe(r,s,o)})]})}),e[12]=l,e[13]=p,e[14]=o,e[15]=r,e[16]=c,e[17]=d,e[18]=C==null?void 0:C.color,e[19]=C==null?void 0:C.isActive,e[20]=C==null?void 0:C.isDisable,e[21]=s,e[22]=D,e[23]=z):z=e[23];let F;e[24]===Symbol.for("react.memo_cache_sentinel")?(F={md:200,xs:150},e[24]=F):F=e[24];const q=r.email||r.name;let H;e[25]!==q?(H=g.jsx(He,{w:"100%",truncate:!0,fz:12,children:q}),e[25]=q,e[26]=H):H=e[26];let B;e[27]!==r.id||e[28]!==a||e[29]!==x?(B=r.id===a&&g.jsx(He,{c:"gray",fz:12,children:x("placeholders.organizer")}),e[27]=r.id,e[28]=a,e[29]=x,e[30]=B):B=e[30];let V;e[31]!==o||e[32]!==r.description||e[33]!==r.userId||e[34]!==s||e[35]!==x?(V=(!!r.description||!!s.description)&&g.jsx(_8,{maxHeight:38,showLabel:x("buttons.showMore"),hideLabel:x("buttons.hide"),transitionDuration:0,styles:{control:{fontSize:12}},children:g.jsx(He,{c:"grey",fz:12,children:o===r.userId?s.description:r.description})}),e[31]=o,e[32]=r.description,e[33]=r.userId,e[34]=s,e[35]=x,e[36]=V):V=e[36];let Y;e[37]!==H||e[38]!==B||e[39]!==V?(Y=g.jsxs(vt,{align:"start",justify:"center",w:F,direction:"column",children:[H,B,V]}),e[37]=H,e[38]=B,e[39]=V,e[40]=Y):Y=e[40];let G;e[41]!==z||e[42]!==Y?(G=g.jsxs(vt,{children:[z,Y]}),e[41]=z,e[42]=Y,e[43]=G):G=e[43];let W;e[44]!==l||e[45]!==r.id||e[46]!==v||e[47]!==i||e[48]!==w||e[49]!==n?(W=i&&g.jsx(Sc,{mounted:v||w,transition:"fade",children:re=>g.jsx(gn,{size:l??"md",style:re,styles:{icon:{justifyContent:"center"}},onClick:ne=>{ne.stopPropagation(),n==null||n(r.id)},children:g.jsx(Tc,{size:"1em"})})}),e[44]=l,e[45]=r.id,e[46]=v,e[47]=i,e[48]=w,e[49]=n,e[50]=W):W=e[50];let Z;e[51]!==W?(Z=g.jsx(wt,{children:W}),e[51]=W,e[52]=Z):Z=e[52];let Q;e[53]!==G||e[54]!==Z||e[55]!==I||e[56]!==L?(Q=g.jsxs(vt,{onClick:I,w:"100%",justify:"space-between",align:"center",style:L,children:[G,Z]}),e[53]=G,e[54]=Z,e[55]=I,e[56]=L,e[57]=Q):Q=e[57];let X;return e[58]!==T||e[59]!==Q||e[60]!==A||e[61]!==N?(X=g.jsx(Fi.Item,{p:5,ref:T,display:"flex",className:A,style:N,children:Q}),e[58]=T,e[59]=Q,e[60]=A,e[61]=N,e[62]=X):X=e[62],X};function rNe(){}const kie=()=>{const t=Ve.c(6);let e,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs(le,{mb:5,children:[g.jsx(br,{mb:10,h:15,w:50}),g.jsx(br,{h:15,w:200})]}),n=g.jsx(vn,{h:"lg"}),t[0]=e,t[1]=n):(e=t[0],n=t[1]);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx(br,{height:40,circle:!0}),t[2]=r):r=t[2];let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsxs(vt,{align:"center",gap:10,mb:10,h:38,children:[r,g.jsxs(le,{children:[g.jsx(br,{mb:5,h:10,w:200,visible:!0}),g.jsx(br,{h:10,w:200,visible:!0})]})]}),t[3]=s):s=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(br,{height:40,circle:!0}),t[4]=i):i=t[4];let o;return t[5]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsxs(le,{h:148,children:[e,n,g.jsxs(le,{children:[s,g.jsxs(vt,{h:38,align:"center",gap:10,children:[i,g.jsxs(le,{children:[g.jsx(br,{mb:5,h:10,w:200,visible:!0}),g.jsx(br,{h:10,w:200,visible:!0})]})]})]})]}),t[5]=o):o=t[5],o},sNe=t=>new RegExp(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/).test(t),iNe=t=>t===4?{icon:g.jsx(wie,{size:"16"}),color:"gray"}:t===2?{icon:g.jsx(Tc,{size:"16"}),color:"red"}:t===1?{icon:g.jsx(vie,{size:"16"}),color:"green"}:{icon:null,color:"green"},Tie=t=>({...Oie(t)?{id:t.Id,userId:t.Id,hasAvatar:!qe.isNil(t.Avatar)}:{id:t.Id,userId:t.UserId,hasAvatar:t.HasAvatar},name:t.Name,email:t.Email??"",attendingType:null,description:""}),oNe=t=>({...Oie(t)?{Id:t.Id,Avatar:qe.isNil(t.Avatar)?null:RL(t.Id)}:{Id:t.Id,Avatar:t.HasAvatar?RL(t.UserId):null},FirstName:t.FirstName,Surname:t.Surname,Email:t.Email??"",Name:t.Name}),Aie=(t,e,n)=>{const r={AddressBookId:0,Contact:{Email:n}};(async()=>{try{const{payload:i}=await e(QD(r)),{Contact:o}=i;t(o)}catch{}})()};function aNe(t){return qe.isEmpty(t)||t.some(_ie)}function _ie(t){return"UserId"in t}function Oie(t){return!_ie(t)}const lNe=t=>{const e=Ve.c(16),{value:n,handlePickItem:r,data:s,isLoading:i}=t,o=Kt(),{t:a}=yt(),l=s.some(w=>w.Email===n);let c;e[0]!==o||e[1]!==r||e[2]!==n?(c=()=>Aie(r,o,n),e[0]=o,e[1]=r,e[2]=n,e[3]=c):c=e[3];const d=c;if(l||i)return null;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={backgroundColor:"#E7F5FF"},e[4]=f):f=e[4];let p;e[5]!==a?(p=a("feedBacks.addContact"),e[5]=a,e[6]=p):p=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsx(OS,{}),e[7]=m):m=e[7];let v;e[8]!==n?(v=g.jsx(wt,{gap:4,children:g.jsxs(vt,{align:"center",children:[m,g.jsx(le,{maw:300,children:g.jsx(He,{className:"user-name",truncate:!0,ml:"xs",children:n})})]})}),e[8]=n,e[9]=v):v=e[9];let y;e[10]!==p||e[11]!==v?(y=g.jsx(ss,{label:p,children:v}),e[10]=p,e[11]=v,e[12]=y):y=e[12];let x;return e[13]!==d||e[14]!==y?(x=g.jsx(Fi.Item,{px:10,py:5,className:"single-menu-item",onClick:d,style:f,children:y}),e[13]=d,e[14]=y,e[15]=x):x=e[15],x},cNe=t=>{const e=Ve.c(24),{data:n,index:r,targetRef:s,handlePickItem:i,selectedItemIndex:o}=t,a=n.Name===n.Email?"":n.Name;let l;e[0]!==n||e[1]!==i?(l=()=>i(n),e[0]=n,e[1]=i,e[2]=l):l=e[2];const c=l;let d;e[3]!==n?(d=oNe(n),e[3]=n,e[4]=d):d=e[4];const f=d,p=r===o?"#E7F5FF":void 0;let m;e[5]!==p?(m={backgroundColor:p,marginTop:0},e[5]=p,e[6]=m):m=e[6];let v;e[7]!==f?(v=g.jsx(X_,{user:f}),e[7]=f,e[8]=v):v=e[8];let y;e[9]!==a?(y=g.jsx(He,{className:"user-name",truncate:!0,children:a}),e[9]=a,e[10]=y):y=e[10];const x=n.Email??"";let w;e[11]!==x?(w=g.jsx(He,{className:"user-email",truncate:!0,children:x}),e[11]=x,e[12]=w):w=e[12];let C;e[13]!==y||e[14]!==w?(C=g.jsxs(le,{maw:250,ml:"xs",children:[y,w]}),e[13]=y,e[14]=w,e[15]=C):C=e[15];let E;e[16]!==v||e[17]!==C?(E=g.jsxs(wt,{gap:4,children:[v,C]}),e[16]=v,e[17]=C,e[18]=E):E=e[18];let D;return e[19]!==c||e[20]!==E||e[21]!==m||e[22]!==s?(D=g.jsx(Fi.Item,{ref:s,px:10,py:5,className:"menu-item",style:m,onClick:c,children:E}),e[19]=c,e[20]=E,e[21]=m,e[22]=s,e[23]=D):D=e[23],D},Rie=({handlePickContact:t,isAddContactEnabled:e,isFillInputOnPick:n,resetContact:r,placeholder:s,accessType:i,searchType:o})=>{var H;const a=Kt(),l=ve(oOe),c=ve(iOe),d=ve(kr),[f,p]=O.useState(!1),[m,v]=O.useState(""),[y]=OA(m,500),x=sNe(m),[w,C]=O.useState(!1),E=O.useRef(null),D=i===mt.Read||i===mt.Write,[T,A]=O.useState(0),_=O.useRef(null),N=(o??"contacts")==="contacts",I=O.useMemo(()=>{var Y;const B=N?c:l,V=(Y=d==null?void 0:d.Email)==null?void 0:Y.toLowerCase();return V?B.filter(G=>{var W;return((W=G.Email)==null?void 0:W.toLowerCase())!==V}):B},[N,c,l,d==null?void 0:d.Email]),$=ow(()=>{p(!1)});O.useEffect(()=>{y&&(C(!0),(async()=>{N?await a(Ux(y)):await a(ek(y))})().then(()=>C(!1)))},[y,a]);const L=B=>{const V=Tie(B);t(V),p(!1);const Y=n?V.name??V.email:"";v(Y)};O.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[T]);const z=B=>{I.length&&(B.code==="ArrowDown"&&(T===I.length-1?A(0):A(V=>V+1)),B.code==="ArrowUp"&&A(T===0?I.length-1:V=>V-1)),B.code==="Enter"&&(I.length&&f?L(I[T]):e&&x&&Aie(L,a,m))};O.useEffect(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[I,T,f,m]),O.useEffect(()=>{A(0)},[I]);const F=()=>!w&&m&&I.length||e&&x?g.jsx(Qs.Autosize,{mah:300,children:g.jsx(Fi,{spacing:6,px:0,children:!I.length&&x&&aNe(I)?g.jsx(lNe,{isLoading:w,handlePickItem:L,data:I,value:m}):I.map((B,V)=>g.jsx(cNe,{handlePickItem:L,data:B,selectedItemIndex:T,index:V,targetRef:V===T?_:null},B.Id+B.Name))})}):!w&&I.length===0&&m?g.jsx(le,{p:"xs",children:g.jsx(He,{ta:"center",fz:12,c:"g.7",children:ct("feedBacks.nothingFound")})}):g.jsx(vt,{p:16,justify:"center",align:"center",children:g.jsx(zi,{size:"sm",color:"gray",type:"dots"})}),q=O.useMemo(()=>E!=null&&E.current?E.current.offsetWidth:"auto",[(H=E==null?void 0:E.current)==null?void 0:H.offsetWidth]);return g.jsx("div",{ref:$,children:g.jsxs(Mn,{width:q,styles:{dropdown:{padding:0}},opened:f&&!!y,shadow:"md",children:[g.jsx(Mn.Target,{children:g.jsx(Pn,{ref:E,w:"100%",className:"search-events-inputs",placeholder:s??ct("feedBacks.search"),radius:"sm",disabled:D,onClick:()=>p(!0),value:m,onChange:B=>{f||p(!0),r==null||r(),v(B.target.value)}})}),g.jsx(Mn.Dropdown,{miw:340,children:F()})]})})},Il=t=>{const e=ve(kr);e==null||e.Id,t==null||t.accessType;let n;e:{if(!t){n=mt.Read;break e}if(!t.organizerId){n=mt.Full;break e}if((e==null?void 0:e.ContactId)===t.organizerId){n=mt.Full;break e}n=t.accessType}return n},Q_=t=>{const e=Ve.c(6),{children:n,opened:r}=t,[s,i]=O.useState(!1);let o,a;e[0]!==r?(o=()=>(r&&setTimeout(()=>{i(!0)},200),()=>{i(!1)}),a=[r],e[0]=r,e[1]=o,e[2]=a):(o=e[1],a=e[2]),O.useEffect(o,a);let l;return e[3]!==n||e[4]!==s?(l=g.jsx(cw,{active:s,children:n}),e[3]=n,e[4]=s,e[5]=l):l=e[5],l},Eh=t=>{const e=Ve.c(33),{handleCancel:n,handleConfirm:r,opened:s,data:i,blockSaveButton:o}=t,{title:a,textConfirmButton:l,text:c}=i,{t:d}=yt(),{isMobile:f}=Yt(),p=!f;let m;e[0]!==d||e[1]!==a?(m=d(a),e[0]=d,e[1]=a,e[2]=m):m=e[2];let v;e[3]!==d||e[4]!==c?(v=d(c),e[3]=d,e[4]=c,e[5]=v):v=e[5];let y;e[6]!==v?(y=g.jsx(le,{mt:10,children:v}),e[6]=v,e[7]=y):y=e[7];let x;e[8]!==d?(x=d("buttons.cancel"),e[8]=d,e[9]=x):x=e[9];let w;e[10]!==n||e[11]!==x?(w=g.jsx(en,{variant:"default",onClick:n,children:x}),e[10]=n,e[11]=x,e[12]=w):w=e[12];let C;e[13]!==d||e[14]!==l?(C=d(l),e[13]=d,e[14]=l,e[15]=C):C=e[15];let E;e[16]!==o||e[17]!==r||e[18]!==C?(E=g.jsx(en,{disabled:o,color:"red.8","data-autofocus":!0,onClick:r,children:C}),e[16]=o,e[17]=r,e[18]=C,e[19]=E):E=e[19];let D;e[20]!==w||e[21]!==E?(D=g.jsxs(wt,{mt:20,justify:"flex-end",children:[w,E]}),e[20]=w,e[21]=E,e[22]=D):D=e[22];let T;e[23]!==s||e[24]!==D?(T=g.jsx(Q_,{opened:s,children:D}),e[23]=s,e[24]=D,e[25]=T):T=e[25];let A;return e[26]!==n||e[27]!==s||e[28]!==p||e[29]!==T||e[30]!==m||e[31]!==y?(A=g.jsx(g.Fragment,{children:g.jsxs(ks,{centered:p,opened:s,onClose:n,withCloseButton:!0,title:m,children:[y,T]})}),e[26]=n,e[27]=s,e[28]=p,e[29]=T,e[30]=m,e[31]=y,e[32]=A):A=e[32],A};var Ac=(t=>(t[t.CONFIRM_MODAL_DETAILS_DELETE=0]="CONFIRM_MODAL_DETAILS_DELETE",t[t.CONFIRM_MODAL_DETAILS_CANCEL_AND_DELETE=1]="CONFIRM_MODAL_DETAILS_CANCEL_AND_DELETE",t[t.CONFIRM_MODAL_CALENDAR_DELETE=2]="CONFIRM_MODAL_CALENDAR_DELETE",t[t.CONFIRM_MODAL_DETAILS_CLEAR=3]="CONFIRM_MODAL_DETAILS_CLEAR",t[t.CONFIRM_MODAL_ADD_ADDRESS_BOOK=4]="CONFIRM_MODAL_ADD_ADDRESS_BOOK",t[t.CONFIRM_MODAL_DELETE_CATEGORY=5]="CONFIRM_MODAL_DELETE_CATEGORY",t[t.CONFIRM_MODAL_RESET_TIMEZONE=6]="CONFIRM_MODAL_RESET_TIMEZONE",t[t.CONFIRM_MODAL_DELETE_ORGANIZER=7]="CONFIRM_MODAL_DELETE_ORGANIZER",t))(Ac||{});const e3={actionType:Ac.CONFIRM_MODAL_DETAILS_DELETE,title:"confirmations.eventDelete.label",text:"confirmations.eventDelete.description",textConfirmButton:"buttons.delete"},I$={actionType:Ac.CONFIRM_MODAL_DETAILS_CANCEL_AND_DELETE,title:"confirmations.eventCancelAndDelete.label",text:"confirmations.eventCancelAndDelete.description",textConfirmButton:"buttons.cancelAndDelete"},Nie={actionType:Ac.CONFIRM_MODAL_CALENDAR_DELETE,title:"settings.calendarSettings.deleteCalendar.label",text:"settings.calendarSettings.deleteCalendar.description",textConfirmButton:"buttons.delete"},jie={actionType:Ac.CONFIRM_MODAL_DETAILS_CLEAR,title:"settings.calendarSettings.clearCalendar.label",text:"settings.calendarSettings.clearCalendar.description",textConfirmButton:"buttons.clear"};Ac.CONFIRM_MODAL_ADD_ADDRESS_BOOK;const ptt={actionType:Ac.CONFIRM_MODAL_DELETE_CATEGORY,title:"confirmations.categoryDelete.label",text:"confirmations.categoryDelete.description",textConfirmButton:"buttons.delete"},uNe={actionType:Ac.CONFIRM_MODAL_RESET_TIMEZONE,title:"confirmations.resetTimeZone.label",text:"confirmations.resetTimeZone.description",textConfirmButton:"buttons.apply"},dNe={actionType:Ac.CONFIRM_MODAL_DELETE_ORGANIZER,title:"confirmations.organizatorDelete.label",text:"confirmations.organizatorDelete.description",textConfirmButton:"buttons.delete"},Iie=({event:t,handleSetEvent:e,currentUserContactId:n,currentUserId:r,calendarsBusy:s,onChangeCalendarBusy:i,isShowCheckbox:o})=>{const{contactParticipants:a,participantInfo:l,organizerId:c}=t.resource,d=Il(t.resource),{t:f}=yt(),{isMobile:p}=Yt(),m=ve(kr),v=d===mt.Read||d===mt.Write,y=a.length,x=!qe.isNil(e)&&!v,[w]=Wpe(),C=Kt(),[E,D]=O.useState(!1),[T,A]=O.useState(null),[_,{open:R,close:N}]=Ps(!1),{willVisit:I,notVisit:$,myabeVisit:L,withoutAnswer:z}=O.useMemo(()=>{let W=0,Z=0,Q=0,X=0;return a.forEach(re=>{const ee=r===re.userId?l.attendingType:re.attendingType;ee===4?Q++:ee===2?Z++:ee===1?W++:X++}),{willVisit:W,notVisit:Z,myabeVisit:Q,withoutAnswer:X}},[y,n,l.attendingType]),F=async W=>{await D(!0);const Z=await C(Ux(W)).unwrap();if(Z.length){const Q=Z.find(X=>{var re;return((re=X.Email)==null?void 0:re.toLowerCase())===W.toLowerCase()});if(Q){const X=Tie(Q);Y(X)}else $n.showError(f("feedBacks.contactNotFound"))}else $n.showError(f("feedBacks.contactNotFound"));D(!1)};O.useEffect(()=>{const W=w.get("add");W&&t.resource.calendarId&&(X4e.test(W)?F(W):$n.showError(f("feedBacks.notValidEmail")))},[w,t.resource.calendarId]);const q=W=>{if(e){if(W===c){A(W),R();return}H(W)}},H=W=>{if(!e)return;let Z={...t.resource.participantInfo};const Q=[...a].filter(re=>(W===n&&(Z.attendingType=null),W!==re.id)),X={...t,resource:{...t.resource,participantInfo:Z,contactParticipants:Q}};e(X)},B=()=>{T!==null&&H(T),N(),A(null)},V=()=>{N(),A(null)},Y=W=>{const{contactParticipants:Z}=t.resource;if(!e)return;let Q=[],X={...t.resource.participantInfo};Z.length===0&&!qe.isNil(m)?(Q=[...Z,{email:m.Email??"",id:m.ContactId,name:m.Name,attendingType:1,userId:m.Id,description:"",hasAvatar:!qe.isNil(m.Avatar)},W],X.attendingType=1):Q=[...Z,W];const re=qe.uniqWith(Q,(ee,oe)=>ee.id===oe.id),ne={...t,resource:{...t.resource,contactParticipants:re,participantInfo:X}};e(ne)};if(E)return g.jsx(kie,{});const G=[I>0?`"${f("notesActions.options.yes")}": ${I}`:null,$>0?`"${f("notesActions.options.no")}": ${$}`:null,L>0?`"${f("notesActions.options.mayBe")}": ${L}`:null,z>0?`"${f("notesActions.options.noAnswer")}": ${z}`:null].filter(Boolean).join(", ");return g.jsxs(g.Fragment,{children:[y>0&&g.jsxs(g.Fragment,{children:[g.jsxs(le,{mb:5,children:[g.jsxs(He,{fz:14,children:[y," ",lg(y,f("eventDetails.pluralGuests.one"),f("eventDetails.pluralGuests.few"),f("eventDetails.pluralGuests.other"))]}),g.jsx(He,{fz:13,c:"grey",children:G})]}),g.jsx(vn,{h:"md"})]}),e&&g.jsxs(g.Fragment,{children:[g.jsxs(wt,{gap:"xs",wrap:"nowrap",children:[!p&&g.jsx(j$,{size:"1em"}),g.jsx(le,{w:"100%",children:g.jsx(Rie,{accessType:d,handlePickContact:Y,isAddContactEnabled:!0})})]}),g.jsx(vn,{h:"md"})]}),g.jsx(wt,{w:"100%",children:!qe.isEmpty(a)&&g.jsx(Fi,{w:"100%",size:"xs",center:!0,styles:{itemWrapper:{width:"100%",display:"flex"},itemLabel:{width:"100%"}},children:a.map((W,Z)=>g.jsx(Die,{isShowCheckbox:o,calendarsBusy:s,onChangeCalendarBusy:i,participantInfo:l,currentUserId:r,organizerId:c,guest:W,isDeleteActionVisible:x,onDelete:q,index:Z},W.id||W.userId))})}),g.jsx(Eh,{opened:_,handleConfirm:B,handleCancel:V,data:dNe})]})};var lh=(t=>(t[t.Mail=0]="Mail",t[t.Bell=1]="Bell",t))(lh||{}),gt=(t=>(t[t.Minute=0]="Minute",t[t.Hour=1]="Hour",t[t.Day=2]="Day",t[t.Weeks=3]="Weeks",t))(gt||{});const qa=t=>{const e=Ve.c(16),{icon:n,children:r,align:s,topSpacing:i,isMobile:o,additionalClassname:a}=t,l=s===void 0?"center":s,c=i===void 0?"xs":i;let d;e[0]!==c?(d=g.jsx(vn,{h:c}),e[0]=c,e[1]=d):d=e[1];const f=a||"";let p;e[2]!==f?(p=ti("row-full-modal",f),e[2]=f,e[3]=p):p=e[3];const m=o?void 0:"sm";let v;e[4]!==n||e[5]!==o?(v=!o&&g.jsx(vt,{align:"flex-start",w:"1em",children:n&&n}),e[4]=n,e[5]=o,e[6]=v):v=e[6];let y;e[7]!==l||e[8]!==r||e[9]!==p||e[10]!==m||e[11]!==v?(y=g.jsxs(vt,{className:p,gap:m,align:l,children:[v,r]}),e[7]=l,e[8]=r,e[9]=p,e[10]=m,e[11]=v,e[12]=y):y=e[12];let x;return e[13]!==d||e[14]!==y?(x=g.jsxs(g.Fragment,{children:[d,y]}),e[13]=d,e[14]=y,e[15]=x):x=e[15],x},t3=({withAutoWidth:t,additionalStyles:e={},...n})=>{var c;const[r,s]=O.useState({x:0}),i=O.useRef(null),o=(c=i.current)==null?void 0:c.offsetWidth,a=O.useMemo(()=>{const d={minWidth:"fit-content",left:r.x},f="dropdown"in e?e.dropdown:{};return{...e,dropdown:{...f,...t?d:{}}}},[o,r]),l=O.useCallback(()=>{if(i.current&&t){const{x:d}=i.current.getBoundingClientRect();s({x:d})}},[i,t]);return g.jsx(uo,{ref:i,styles:a,onDropdownOpen:l,...n})},fNe=t=>{const e=Ve.c(7),{option:n}=t;let r;e[0]!==n.color?(r=g.jsx(ah,{style:{color:n.color},size:16}),e[0]=n.color,e[1]=r):r=e[1];let s;e[2]!==n.label?(s=g.jsx(le,{pl:5,children:g.jsx(He,{size:"sm",children:n.label})}),e[2]=n.label,e[3]=s):s=e[3];let i;return e[4]!==r||e[5]!==s?(i=g.jsx(le,{w:"100%",children:g.jsxs(vt,{align:"center",children:[r,s]})}),e[4]=r,e[5]=s,e[6]=i):i=e[6],i},n3=t=>{var B;const e=Ve.c(38),n=ve(cf),r=(B=n==null?void 0:n.resource)==null?void 0:B.calendarId,s=ve(df),i=ve(Yo),{isMobile:o,isDesktop:a}=Yt(),{event:l,handleSetEvent:c,edit:d,disabled:f,full:p}=t,{calendarId:m,saveType:v}=l.resource,[y,x]=O.useState(null);let w;e[0]!==i||e[1]!==y?(w=i[y||0]||{color:""},e[0]=i,e[1]=y,e[2]=w):w=e[2];const{color:C}=w;let E;e[3]!==m||e[4]!==s||e[5]!==r||e[6]!==d||e[7]!==v?(E=()=>{if(d&&r&&v!==2)x(r);else if(v===2)x(Number(s[0].id));else if(m)x(m);else{const V=s.find(pNe);x(Number(V?V.id:s[0].id))}},e[3]=m,e[4]=s,e[5]=r,e[6]=d,e[7]=v,e[8]=E):E=e[8];let D;e[9]!==r||e[10]!==v?(D=[r,v],e[9]=r,e[10]=v,e[11]=D):D=e[11],O.useEffect(E,D);let T;e[12]!==C||e[13]!==l||e[14]!==c||e[15]!==y?(T=()=>{c({...l,resource:{...l.resource,calendarId:y,mainColor:C}})},e[12]=C,e[13]=l,e[14]=c,e[15]=y,e[16]=T):T=e[16];let A;e[17]!==y?(A=[y],e[17]=y,e[18]=A):A=e[18],O.useEffect(T,A);let _;if(e[19]!==m||e[20]!==s){let V;e[22]!==m?(V=Y=>![mt.Read,mt.FreeBusy].includes(Y.accessType||0)||m===Y.id,e[22]=m,e[23]=V):V=e[23],_=s.filter(V).map(hNe),e[19]=m,e[20]=s,e[21]=_}else _=e[21];const R=_;let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=V=>{qe.isNil(V)||x(Number(V))},e[24]=N):N=e[24];const I=N,$=o||!p?void 0:220,L=o?1:"";let z;e[25]!==L||e[26]!==$?(z={root:{width:$,flex:L}},e[25]=L,e[26]=$,e[27]=z):z=e[27];const F=z;let q;e[28]!==m||e[29]!==C||e[30]!==f||e[31]!==o||e[32]!==R||e[33]!==F||e[34]!==y?(q=y&&m&&g.jsx(t3,{withAutoWidth:!o,additionalStyles:F,size:Ja,disabled:f,renderOption:fNe,value:String(y),onChange:I,data:R,leftSection:g.jsx(ah,{style:{color:C},size:16})}),e[28]=m,e[29]=C,e[30]=f,e[31]=o,e[32]=R,e[33]=F,e[34]=y,e[35]=q):q=e[35];let H;return e[36]!==q?(H=g.jsx(g.Fragment,{children:q}),e[36]=q,e[37]=H):H=e[37],H};function pNe(t){return t.isActive&&t.accessType!==mt.Read&&t.accessType!==mt.FreeBusy}function hNe(t){return{value:String(t.id),label:t.name,color:t.color}}const A4=t=>t?"blue.5":"",Lie=t=>{const e=Ve.c(82),{modeEditEvents:n,disabled:r,setModeEditEvents:s}=t,{isMobile:i,isTablet:o}=Yt(),{t:a}=yt();let l;e[0]!==a?(l=a("recurringEvents.oneEvent"),e[0]=a,e[1]=l):l=e[1];let c;e[2]!==l?(c={value:js.ThisEvent,label:l},e[2]=l,e[3]=c):c=e[3];let d;e[4]!==a?(d=a("recurringEvents.thisAndNext"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==d?(f={value:js.ThisNextEvents,label:d},e[6]=d,e[7]=f):f=e[7];let p;e[8]!==a?(p=a("recurringEvents.allRecurring"),e[8]=a,e[9]=p):p=e[9];let m;e[10]!==p?(m={value:js.AllEvents,label:p},e[10]=p,e[11]=m):m=e[11];let v;e[12]!==c||e[13]!==f||e[14]!==m?(v=[c,f,m],e[12]=c,e[13]=f,e[14]=m,e[15]=v):v=e[15];const y=v;if(r)return null;if(i||o){let Q;e[16]!==i||e[17]!==a?(Q=i&&g.jsx(He,{fz:14,children:a("recurringEvents.edit")}),e[16]=i,e[17]=a,e[18]=Q):Q=e[18];const X=i?0:5;let re;e[19]!==s?(re=ce=>s(ce),e[19]=s,e[20]=re):re=e[20];let ne;e[21]!==y||e[22]!==r||e[23]!==n||e[24]!==re?(ne=g.jsx(t3,{disabled:r,value:n,data:y,onChange:re}),e[21]=y,e[22]=r,e[23]=n,e[24]=re,e[25]=ne):ne=e[25];let ee;e[26]!==ne||e[27]!==X?(ee=g.jsx(le,{pl:X,children:ne}),e[26]=ne,e[27]=X,e[28]=ee):ee=e[28];let oe;return e[29]!==ee||e[30]!==Q?(oe=g.jsxs(g.Fragment,{children:[Q,ee]}),e[29]=ee,e[30]=Q,e[31]=oe):oe=e[31],oe}let x;e[32]!==a?(x=a("recurringEvents.edit"),e[32]=a,e[33]=x):x=e[33];let w;e[34]!==x?(w=g.jsxs(He,{size:"md",children:[x,":"]}),e[34]=x,e[35]=w):w=e[35];let C;e[36]!==s?(C=()=>{s(js.ThisEvent)},e[36]=s,e[37]=C):C=e[37];const E=n===js.ThisEvent;let D;e[38]!==E?(D=A4(E),e[38]=E,e[39]=D):D=e[39];let T;e[40]!==a?(T=a("recurringEvents.oneEvent"),e[40]=a,e[41]=T):T=e[41];let A;e[42]!==D||e[43]!==T?(A=g.jsx(He,{size:"md",c:D,children:T}),e[42]=D,e[43]=T,e[44]=A):A=e[44];let _;e[45]!==r||e[46]!==C||e[47]!==A?(_=g.jsx(or,{disabled:r,onClick:C,style:mNe,children:A}),e[45]=r,e[46]=C,e[47]=A,e[48]=_):_=e[48];let R;e[49]===Symbol.for("react.memo_cache_sentinel")?(R=g.jsx(Bo,{orientation:"vertical"}),e[49]=R):R=e[49];let N;e[50]!==s?(N=()=>{s(js.AllEvents)},e[50]=s,e[51]=N):N=e[51];const I=n===js.AllEvents;let $;e[52]!==I?($=A4(I),e[52]=I,e[53]=$):$=e[53];let L;e[54]!==a?(L=a("recurringEvents.allRecurring"),e[54]=a,e[55]=L):L=e[55];let z;e[56]!==$||e[57]!==L?(z=g.jsx(He,{size:"md",c:$,children:L}),e[56]=$,e[57]=L,e[58]=z):z=e[58];let F;e[59]!==r||e[60]!==N||e[61]!==z?(F=g.jsx(or,{disabled:r,onClick:N,style:gNe,children:z}),e[59]=r,e[60]=N,e[61]=z,e[62]=F):F=e[62];let q;e[63]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(Bo,{orientation:"vertical"}),e[63]=q):q=e[63];let H;e[64]!==s?(H=()=>{s(js.ThisNextEvents)},e[64]=s,e[65]=H):H=e[65];const B=n===js.ThisNextEvents;let V;e[66]!==B?(V=A4(B),e[66]=B,e[67]=V):V=e[67];let Y;e[68]!==a?(Y=a("recurringEvents.thisAndNext"),e[68]=a,e[69]=Y):Y=e[69];let G;e[70]!==V||e[71]!==Y?(G=g.jsx(He,{size:"md",c:V,children:Y}),e[70]=V,e[71]=Y,e[72]=G):G=e[72];let W;e[73]!==r||e[74]!==H||e[75]!==G?(W=g.jsx(or,{disabled:r,style:vNe,onClick:H,children:G}),e[73]=r,e[74]=H,e[75]=G,e[76]=W):W=e[76];let Z;return e[77]!==_||e[78]!==F||e[79]!==W||e[80]!==w?(Z=g.jsx(qa,{children:g.jsxs(wt,{gap:10,children:[w,_,R,F,q,W]})}),e[77]=_,e[78]=F,e[79]=W,e[80]=w,e[81]=Z):Z=e[81],Z};function mNe(t){return{"&:hover":{color:t.colors.blue[5]}}}function gNe(t){return{"&:hover":{color:t.colors.blue[5]}}}function vNe(t){return{"&:hover":{color:t.colors.blue[5]}}}const EU=t=>{const e=Ve.c(9),{edit:n,event:r,modeEditEvents:s,isCountEventsDisabled:i,setModeEditEvents:o}=t,a=r.resource.recurring.repeatPeriod!=="never"||!!r.resource.recurring.recurringId;let l;e[0]!==n||e[1]!==r.resource.saveType||e[2]!==i||e[3]!==a||e[4]!==s||e[5]!==o?(l=n&&a&&s&&o&&r.resource.saveType!==rs.Duplicate&&g.jsx(Lie,{disabled:i,modeEditEvents:s,setModeEditEvents:o}),e[0]=n,e[1]=r.resource.saveType,e[2]=i,e[3]=a,e[4]=s,e[5]=o,e[6]=l):l=e[6];let c;return e[7]!==l?(c=g.jsx(g.Fragment,{children:l}),e[7]=l,e[8]=c):c=e[8],c};var nk={exports:{}},yNe=nk.exports,MU;function Pie(){return MU||(MU=1,(function(t,e){(function(n,r){t.exports=r()})(yNe,(function(){var n=1e3,r=6e4,s=36e5,i="millisecond",o="second",a="minute",l="hour",c="day",d="week",f="month",p="quarter",m="year",v="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var F=["th","st","nd","rd"],q=z%100;return"["+z+(F[(q-20)%10]||F[q]||F[0])+"]"}},E=function(z,F,q){var H=String(z);return!H||H.length>=F?z:""+Array(F+1-H.length).join(q)+z},D={s:E,z:function(z){var F=-z.utcOffset(),q=Math.abs(F),H=Math.floor(q/60),B=q%60;return(F<=0?"+":"-")+E(H,2,"0")+":"+E(B,2,"0")},m:function z(F,q){if(F.date()<q.date())return-z(q,F);var H=12*(q.year()-F.year())+(q.month()-F.month()),B=F.clone().add(H,f),V=q-B<0,Y=F.clone().add(H+(V?-1:1),f);return+(-(H+(q-B)/(V?B-Y:Y-B))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:m,w:d,d:c,D:v,h:l,m:a,s:o,ms:i,Q:p}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},T="en",A={};A[T]=C;var _=function(z){return z instanceof $},R=function z(F,q,H){var B;if(!F)return T;if(typeof F=="string"){var V=F.toLowerCase();A[V]&&(B=V),q&&(A[V]=q,B=V);var Y=F.split("-");if(!B&&Y.length>1)return z(Y[0])}else{var G=F.name;A[G]=F,B=G}return!H&&B&&(T=B),B||!H&&T},N=function(z,F){if(_(z))return z.clone();var q=typeof F=="object"?F:{};return q.date=z,q.args=arguments,new $(q)},I=D;I.l=R,I.i=_,I.w=function(z,F){return N(z,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var $=(function(){function z(q){this.$L=R(q.locale,null,!0),this.parse(q)}var F=z.prototype;return F.parse=function(q){this.$d=(function(H){var B=H.date,V=H.utc;if(B===null)return new Date(NaN);if(I.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var Y=B.match(x);if(Y){var G=Y[2]-1||0,W=(Y[7]||"0").substring(0,3);return V?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,W)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,W)}}return new Date(B)})(q),this.$x=q.x||{},this.init()},F.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},F.$utils=function(){return I},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(q,H){var B=N(q);return this.startOf(H)<=B&&B<=this.endOf(H)},F.isAfter=function(q,H){return N(q)<this.startOf(H)},F.isBefore=function(q,H){return this.endOf(H)<N(q)},F.$g=function(q,H,B){return I.u(q)?this[H]:this.set(B,q)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(q,H){var B=this,V=!!I.u(H)||H,Y=I.p(q),G=function(oe,ce){var ue=I.w(B.$u?Date.UTC(B.$y,ce,oe):new Date(B.$y,ce,oe),B);return V?ue:ue.endOf(c)},W=function(oe,ce){return I.w(B.toDate()[oe].apply(B.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ce)),B)},Z=this.$W,Q=this.$M,X=this.$D,re="set"+(this.$u?"UTC":"");switch(Y){case m:return V?G(1,0):G(31,11);case f:return V?G(1,Q):G(0,Q+1);case d:var ne=this.$locale().weekStart||0,ee=(Z<ne?Z+7:Z)-ne;return G(V?X-ee:X+(6-ee),Q);case c:case v:return W(re+"Hours",0);case l:return W(re+"Minutes",1);case a:return W(re+"Seconds",2);case o:return W(re+"Milliseconds",3);default:return this.clone()}},F.endOf=function(q){return this.startOf(q,!1)},F.$set=function(q,H){var B,V=I.p(q),Y="set"+(this.$u?"UTC":""),G=(B={},B[c]=Y+"Date",B[v]=Y+"Date",B[f]=Y+"Month",B[m]=Y+"FullYear",B[l]=Y+"Hours",B[a]=Y+"Minutes",B[o]=Y+"Seconds",B[i]=Y+"Milliseconds",B)[V],W=V===c?this.$D+(H-this.$W):H;if(V===f||V===m){var Z=this.clone().set(v,1);Z.$d[G](W),Z.init(),this.$d=Z.set(v,Math.min(this.$D,Z.daysInMonth())).$d}else G&&this.$d[G](W);return this.init(),this},F.set=function(q,H){return this.clone().$set(q,H)},F.get=function(q){return this[I.p(q)]()},F.add=function(q,H){var B,V=this;q=Number(q);var Y=I.p(H),G=function(Q){var X=N(V);return I.w(X.date(X.date()+Math.round(Q*q)),V)};if(Y===f)return this.set(f,this.$M+q);if(Y===m)return this.set(m,this.$y+q);if(Y===c)return G(1);if(Y===d)return G(7);var W=(B={},B[a]=r,B[l]=s,B[o]=n,B)[Y]||1,Z=this.$d.getTime()+q*W;return I.w(Z,this)},F.subtract=function(q,H){return this.add(-1*q,H)},F.format=function(q){var H=this,B=this.$locale();if(!this.isValid())return B.invalidDate||y;var V=q||"YYYY-MM-DDTHH:mm:ssZ",Y=I.z(this),G=this.$H,W=this.$m,Z=this.$M,Q=B.weekdays,X=B.months,re=function(ce,ue,pe,de){return ce&&(ce[ue]||ce(H,V))||pe[ue].slice(0,de)},ne=function(ce){return I.s(G%12||12,ce,"0")},ee=B.meridiem||function(ce,ue,pe){var de=ce<12?"AM":"PM";return pe?de.toLowerCase():de},oe={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Z+1,MM:I.s(Z+1,2,"0"),MMM:re(B.monthsShort,Z,X,3),MMMM:re(X,Z),D:this.$D,DD:I.s(this.$D,2,"0"),d:String(this.$W),dd:re(B.weekdaysMin,this.$W,Q,2),ddd:re(B.weekdaysShort,this.$W,Q,3),dddd:Q[this.$W],H:String(G),HH:I.s(G,2,"0"),h:ne(1),hh:ne(2),a:ee(G,W,!0),A:ee(G,W,!1),m:String(W),mm:I.s(W,2,"0"),s:String(this.$s),ss:I.s(this.$s,2,"0"),SSS:I.s(this.$ms,3,"0"),Z:Y};return V.replace(w,(function(ce,ue){return ue||oe[ce]||Y.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(q,H,B){var V,Y=I.p(H),G=N(q),W=(G.utcOffset()-this.utcOffset())*r,Z=this-G,Q=I.m(this,G);return Q=(V={},V[m]=Q/12,V[f]=Q,V[p]=Q/3,V[d]=(Z-W)/6048e5,V[c]=(Z-W)/864e5,V[l]=Z/s,V[a]=Z/r,V[o]=Z/n,V)[Y]||Z,B?Q:I.a(Q)},F.daysInMonth=function(){return this.endOf(f).$D},F.$locale=function(){return A[this.$L]},F.locale=function(q,H){if(!q)return this.$L;var B=this.clone(),V=R(q,H,!0);return V&&(B.$L=V),B},F.clone=function(){return I.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},z})(),L=$.prototype;return N.prototype=L,[["$ms",i],["$s",o],["$m",a],["$H",l],["$W",c],["$M",f],["$y",m],["$D",v]].forEach((function(z){L[z[1]]=function(F){return this.$g(F,z[0],z[1])}})),N.extend=function(z,F){return z.$i||(z(F,$,N),z.$i=!0),N},N.locale=R,N.isDayjs=_,N.unix=function(z){return N(1e3*z)},N.en=A[T],N.Ls=A,N.p={},N}))})(nk)),nk.exports}var bNe=Pie();const Qe=Mr(bNe);function xNe({type:t,date:e,locale:n,format:r,labelSeparator:s}){const i=o=>Qe(o).locale(n).format(r);return t==="default"?e===null?"":i(e):t==="multiple"?e.map(i).join(", "):t==="range"&&Array.isArray(e)?e[0]&&e[1]?`${i(e[0])} ${s} ${i(e[1])}`:e[0]?`${i(e[0])} ${s} `:"":""}function SNe({formatter:t,...e}){return(t||xNe)(e)}function wNe({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:s}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=s[e-1][s[e-1].length-1]-1?s[e-1].length-1:s[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===s[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===s[e].length-2&&r>=s[e][s[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:s[e-1].length-1,cellIndex:s[e-1][s[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:s[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===s[e].length-1&&r===s[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===s[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function $ie({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:s,size:i}){var l,c,d;const o=wNe({direction:e,size:i,rowIndex:r,cellIndex:s,levelIndex:n});if(!o)return;const a=(d=(c=(l=t.current)==null?void 0:l[o.levelIndex])==null?void 0:c[o.rowIndex])==null?void 0:d[o.cellIndex];a&&(a.disabled||a.getAttribute("data-hidden")||a.getAttribute("data-outside")?$ie({controlsRef:t,direction:e,levelIndex:o.levelIndex,cellIndex:o.cellIndex,rowIndex:o.rowIndex,size:i}):a.focus())}function CNe(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function ENe(t){var e;return(e=t.current)==null?void 0:e.map(n=>n.map(r=>r.length))}function L$({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:s}){const i=CNe(s.key);if(i){s.preventDefault();const o=ENe(t);$ie({controlsRef:t,direction:i,levelIndex:e,rowIndex:n,cellIndex:r,size:o})}}function lo(t){return t==null||t===""?t:Qe(t).format("YYYY-MM-DD")}function zie(t){return t==null||t===""?t:Qe(t).format("YYYY-MM-DD HH:mm:ss")}function MNe({minDate:t,maxDate:e}){const n=Qe();return!t&&!e?lo(n):t&&Qe(n).isBefore(t)?lo(t):e&&Qe(n).isAfter(e)?lo(e):lo(n)}const Fie={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},Bie=O.createContext(Fie);function Hie({settings:t,children:e}){return g.jsx(Bie.Provider,{value:{...Fie,...t},children:e})}function Mh(){const t=O.useContext(Bie),e=O.useCallback(i=>i||t.locale,[t.locale]),n=O.useCallback(i=>typeof i=="number"?i:t.firstDayOfWeek,[t.firstDayOfWeek]),r=O.useCallback(i=>Array.isArray(i)?i:t.weekendDays,[t.weekendDays]),s=O.useCallback(i=>typeof i=="string"?i:t.labelSeparator,[t.labelSeparator]);return{...t,getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:s}}function DNe({value:t,type:e,withTime:n}){const r=n?zie:lo;if(e==="range"&&Array.isArray(t)){const s=r(t[0]),i=r(t[1]);return s?i?`${s} – ${i}`:`${s} –`:""}return e==="multiple"&&Array.isArray(t)?t.filter(Boolean).join(", "):!Array.isArray(t)&&t?r(t):""}function qie({value:t,type:e,name:n,form:r,withTime:s=!1}){return g.jsx("input",{type:"hidden",value:DNe({value:t,type:e,withTime:s}),name:n,form:r})}qie.displayName="@mantine/dates/HiddenDatesInput";function Uie(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=Uie(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Vie(){for(var t,e,n=0,r="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Uie(t))&&(r&&(r+=" "),r+=e);return r}var kNe={input:"m_468e7eda"};const P$=Fe((t,e)=>{const n=Ce("TimeInput",null,t),{classNames:r,styles:s,unstyled:i,vars:o,withSeconds:a,minTime:l,maxTime:c,value:d,onChange:f,step:p,...m}=n,{resolvedClassNames:v,resolvedStyles:y}=Ma({classNames:r,styles:s,props:n}),x=C=>{if(l!==void 0||c!==void 0){const[E,D,T]=C.split(":").map(Number);if(l){const[A,_,R]=l.split(":").map(Number);if(E<A||E===A&&D<_||a&&E===A&&D===_&&T<R)return-1}if(c){const[A,_,R]=c.split(":").map(Number);if(E>A||E===A&&D>_||a&&E===A&&D===_&&T>R)return 1}}return 0},w=C=>{var E,D,T;if((E=n.onBlur)==null||E.call(n,C),l!==void 0||c!==void 0){const A=C.currentTarget.value;if(A){const _=x(A);_===1?(c&&(C.currentTarget.value=c),(D=n.onChange)==null||D.call(n,C)):_===-1&&(l&&(C.currentTarget.value=l),(T=n.onChange)==null||T.call(n,C))}}};return g.jsx(Rl,{classNames:{...v,input:Vie(kNe.input,v==null?void 0:v.input)},styles:y,unstyled:i,ref:e,value:d,step:p??(a?1:60),...m,onChange:f,onBlur:w,type:"time",__staticSelector:"TimeInput"})});P$.classes=Rl.classes;P$.displayName="@mantine/dates/TimeInput";var Wie={day:"m_396ce5cb"};const TNe=(t,{size:e})=>({day:{"--day-size":Qt(e,"day-size")}}),$$=Fe((t,e)=>{const n=Ce("Day",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,date:c,disabled:d,__staticSelector:f,weekend:p,outside:m,selected:v,renderDay:y,inRange:x,firstInRange:w,lastInRange:C,hidden:E,static:D,highlightToday:T,attributes:A,..._}=n,R=bt({name:f||"Day",classes:Wie,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:A,vars:l,varsResolver:TNe,rootSelector:"day"});return g.jsx(or,{...R("day",{style:E?{display:"none"}:void 0}),component:D?"div":"button",ref:e,disabled:d,"data-today":Qe(c).isSame(new Date,"day")||void 0,"data-hidden":E||void 0,"data-highlight-today":T||void 0,"data-disabled":d||void 0,"data-weekend":!d&&!m&&p||void 0,"data-outside":!d&&m||void 0,"data-selected":!d&&v||void 0,"data-in-range":x&&!d||void 0,"data-first-in-range":w&&!d||void 0,"data-last-in-range":C&&!d||void 0,"data-static":D||void 0,unstyled:a,..._,children:(y==null?void 0:y(c))||Qe(c).date()})});$$.classes=Wie;$$.displayName="@mantine/dates/Day";function ANe({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=Qe().day(n),s=[];for(let i=0;i<7;i+=1)typeof e=="string"?s.push(Qe(r).add(i,"days").locale(t).format(e)):s.push(e(Qe(r).add(i,"days").format("YYYY-MM-DD")));return s}var Yie={weekday:"m_18a3eca"};const _Ne=(t,{size:e})=>({weekdaysRow:{"--wr-fz":hs(e),"--wr-spacing":Er(e)}}),z$=Fe((t,e)=>{const n=Ce("WeekdaysRow",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,locale:c,firstDayOfWeek:d,weekdayFormat:f,cellComponent:p="th",__staticSelector:m,withWeekNumbers:v,attributes:y,...x}=n,w=bt({name:m||"WeekdaysRow",classes:Yie,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,vars:l,varsResolver:_Ne,rootSelector:"weekdaysRow"}),C=Mh(),E=ANe({locale:C.getLocale(c),format:f,firstDayOfWeek:C.getFirstDayOfWeek(d)}).map((D,T)=>g.jsx(p,{...w("weekday"),children:D},T));return g.jsxs(le,{component:"tr",ref:e,...w("weekdaysRow"),...x,children:[v&&g.jsx(p,{...w("weekday"),children:"#"}),E]})});z$.classes=Yie;z$.displayName="@mantine/dates/WeekdaysRow";function ONe(t,e=1){let n=Qe(t);if(!n.isValid())return n;const r=e===0?6:e-1;for(;n.day()!==r;)n=n.add(1,"day");return n.format("YYYY-MM-DD")}function RNe(t,e=1){let n=Qe(t);for(;n.day()!==e;)n=n.subtract(1,"day");return n.format("YYYY-MM-DD")}function NNe({month:t,firstDayOfWeek:e=1,consistentWeeks:n}){const r=Qe(t).subtract(Qe(t).date()-1,"day"),s=Qe(r.format("YYYY-M-D")),i=s.format("YYYY-MM-DD"),o=s.add(+s.daysInMonth()-1,"day").format("YYYY-MM-DD"),a=ONe(o,e),l=[];let c=Qe(RNe(i,e));for(;Qe(c).isBefore(a,"day");){const d=[];for(let f=0;f<7;f+=1)d.push(c.format("YYYY-MM-DD")),c=c.add(1,"day");l.push(d)}if(n&&l.length<6){const d=l[l.length-1],f=d[d.length-1];let p=Qe(f).add(1,"day");for(;l.length<6;){const m=[];for(let v=0;v<7;v+=1)m.push(p.format("YYYY-MM-DD")),p=p.add(1,"day");l.push(m)}}return l}function F$(t,e){return Qe(t).format("YYYY-MM")===Qe(e).format("YYYY-MM")}function Gie(t,e){return e?Qe(t).isAfter(Qe(e).subtract(1,"day"),"day"):!0}function Kie(t,e){return e?Qe(t).isBefore(Qe(e).add(1,"day"),"day"):!0}function jNe({dates:t,minDate:e,maxDate:n,getDayProps:r,excludeDate:s,hideOutsideDates:i,month:o}){const a=t.flat().filter(d=>{var f;return Kie(d,n)&&Gie(d,e)&&!(s!=null&&s(d))&&!((f=r==null?void 0:r(d))!=null&&f.disabled)&&(!i||F$(d,o))}),l=a.find(d=>{var f;return(f=r==null?void 0:r(d))==null?void 0:f.selected});if(l)return l;const c=a.find(d=>Qe().isSame(d,"date"));return c||a[0]}var rk={exports:{}},INe=rk.exports,DU;function LNe(){return DU||(DU=1,(function(t,e){(function(n,r){t.exports=r()})(INe,(function(){var n="day";return function(r,s,i){var o=function(c){return c.add(4-c.isoWeekday(),n)},a=s.prototype;a.isoWeekYear=function(){return o(this).year()},a.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),n);var d,f,p,m,v=o(this),y=(d=this.isoWeekYear(),f=this.$u,p=(f?i.utc:i)().year(d).startOf("year"),m=4-p.isoWeekday(),p.isoWeekday()>4&&(m+=7),p.add(m,n));return v.diff(y,"week")+1},a.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var l=a.startOf;a.startOf=function(c,d){var f=this.$utils(),p=!!f.u(d)||d;return f.p(c)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):l.bind(this)(c,d)}}}))})(rk)),rk.exports}var PNe=LNe();const $Ne=Mr(PNe);Qe.extend($Ne);function zNe(t){const e=t.find(n=>Qe(n).day()===1);return Qe(e).isoWeek()}var Zie={month:"m_cc9820d3",monthCell:"m_8f457cd5",weekNumber:"m_6cff9dea"};const FNe={withCellSpacing:!0},BNe=(t,{size:e})=>({weekNumber:{"--wn-fz":hs(e),"--wn-size":Qt(e,"wn-size")}}),r3=Fe((t,e)=>{const n=Ce("Month",FNe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,__staticSelector:c,locale:d,firstDayOfWeek:f,weekdayFormat:p,month:m,weekendDays:v,getDayProps:y,excludeDate:x,minDate:w,maxDate:C,renderDay:E,hideOutsideDates:D,hideWeekdays:T,getDayAriaLabel:A,static:_,__getDayRef:R,__onDayKeyDown:N,__onDayClick:I,__onDayMouseEnter:$,__preventFocus:L,__stopPropagation:z,withCellSpacing:F,size:q,highlightToday:H,withWeekNumbers:B,attributes:V,...Y}=n,G=bt({name:c||"Month",classes:Zie,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:V,vars:l,varsResolver:BNe,rootSelector:"month"}),W=Mh(),Z=NNe({month:m,firstDayOfWeek:W.getFirstDayOfWeek(f),consistentWeeks:W.consistentWeeks}),Q=jNe({dates:Z,minDate:lo(w),maxDate:lo(C),getDayProps:y,excludeDate:x,hideOutsideDates:D,month:m}),{resolvedClassNames:X,resolvedStyles:re}=Ma({classNames:r,styles:o,props:n}),ne=Z.map((ee,oe)=>{const ce=ee.map((ue,pe)=>{const de=!F$(ue,m),me=(A==null?void 0:A(ue))||Qe(ue).locale(d||W.locale).format("D MMMM YYYY"),Se=y==null?void 0:y(ue),De=Qe(ue).isSame(Q,"date");return g.jsx("td",{...G("monthCell"),"data-with-spacing":F||void 0,children:g.jsx($$,{__staticSelector:c||"Month",classNames:X,styles:re,unstyled:a,"data-mantine-stop-propagation":z||void 0,highlightToday:H,renderDay:E,date:ue,size:q,weekend:W.getWeekendDays(v).includes(Qe(ue).get("day")),outside:de,hidden:D?de:!1,"aria-label":me,static:_,disabled:(x==null?void 0:x(ue))||!Kie(ue,lo(C))||!Gie(ue,lo(w)),ref:Ae=>{Ae&&(R==null||R(oe,pe,Ae))},...Se,onKeyDown:Ae=>{var fe;(fe=Se==null?void 0:Se.onKeyDown)==null||fe.call(Se,Ae),N==null||N(Ae,{rowIndex:oe,cellIndex:pe,date:ue})},onMouseEnter:Ae=>{var fe;(fe=Se==null?void 0:Se.onMouseEnter)==null||fe.call(Se,Ae),$==null||$(Ae,ue)},onClick:Ae=>{var fe;(fe=Se==null?void 0:Se.onClick)==null||fe.call(Se,Ae),I==null||I(Ae,ue)},onMouseDown:Ae=>{var fe;(fe=Se==null?void 0:Se.onMouseDown)==null||fe.call(Se,Ae),L&&Ae.preventDefault()},tabIndex:L||!De?-1:0})},ue.toString())});return g.jsxs("tr",{...G("monthRow"),children:[B&&g.jsx("td",{...G("weekNumber"),children:zNe(ee)}),ce]},oe)});return g.jsxs(le,{component:"table",...G("month"),size:q,ref:e,...Y,children:[!T&&g.jsx("thead",{...G("monthThead"),children:g.jsx(z$,{__staticSelector:c||"Month",locale:d,firstDayOfWeek:f,weekdayFormat:p,size:q,classNames:X,styles:re,unstyled:a,withWeekNumbers:B})}),g.jsx("tbody",{...G("monthTbody"),children:ne})]})});r3.classes=Zie;r3.displayName="@mantine/dates/Month";var Jie={pickerControl:"m_dc6a3c71"};const HNe=(t,{size:e})=>({pickerControl:{"--dpc-fz":hs(e),"--dpc-size":Qt(e,"dpc-size")}}),s3=Fe((t,e)=>{const n=Ce("PickerControl",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,firstInRange:c,lastInRange:d,inRange:f,__staticSelector:p,selected:m,disabled:v,attributes:y,...x}=n,w=bt({name:p||"PickerControl",classes:Jie,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,vars:l,varsResolver:HNe,rootSelector:"pickerControl"});return g.jsx(or,{...w("pickerControl"),ref:e,unstyled:a,"data-picker-control":!0,"data-selected":m&&!v||void 0,"data-disabled":v||void 0,"data-in-range":f&&!v&&!m||void 0,"data-first-in-range":c&&!v||void 0,"data-last-in-range":d&&!v||void 0,disabled:v,...x})});s3.classes=Jie;s3.displayName="@mantine/dates/PickerControl";function Xie({year:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Qe(t).isBefore(e,"year")||n&&Qe(t).isAfter(n,"year"))}function qNe({years:t,minDate:e,maxDate:n,getYearControlProps:r}){const s=t.flat().filter(a=>{var l;return!Xie({year:a,minDate:e,maxDate:n})&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),i=s.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(i)return i;const o=s.find(a=>Qe().isSame(a,"year"));return o||s[0]}function Qie(t){const e=Qe(t).year(),n=e-e%10;let r=0;const s=[[],[],[],[]];for(let i=0;i<4;i+=1){const o=i===3?1:3;for(let a=0;a<o;a+=1)s[i].push(Qe(new Date(n+r,0)).format("YYYY-MM-DD")),r+=1}return s}var eoe={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const UNe={yearsListFormat:"YYYY",withCellSpacing:!0},i3=Fe((t,e)=>{const n=Ce("YearsList",UNe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,decade:c,yearsListFormat:d,locale:f,minDate:p,maxDate:m,getYearControlProps:v,__staticSelector:y,__getControlRef:x,__onControlKeyDown:w,__onControlClick:C,__onControlMouseEnter:E,__preventFocus:D,__stopPropagation:T,withCellSpacing:A,size:_,attributes:R,...N}=n,I=bt({name:y||"YearsList",classes:eoe,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:R,vars:l,rootSelector:"yearsList"}),$=Mh(),L=Qie(c),z=qNe({years:L,minDate:p,maxDate:m,getYearControlProps:v}),F=L.map((q,H)=>{const B=q.map((V,Y)=>{const G=v==null?void 0:v(V),W=Qe(V).isSame(z,"year");return g.jsx("td",{...I("yearsListCell"),"data-with-spacing":A||void 0,children:g.jsx(s3,{...I("yearsListControl"),size:_,unstyled:a,"data-mantine-stop-propagation":T||void 0,disabled:Xie({year:V,minDate:p,maxDate:m}),ref:Z=>{Z&&(x==null||x(H,Y,Z))},...G,onKeyDown:Z=>{var Q;(Q=G==null?void 0:G.onKeyDown)==null||Q.call(G,Z),w==null||w(Z,{rowIndex:H,cellIndex:Y,date:V})},onClick:Z=>{var Q;(Q=G==null?void 0:G.onClick)==null||Q.call(G,Z),C==null||C(Z,V)},onMouseEnter:Z=>{var Q;(Q=G==null?void 0:G.onMouseEnter)==null||Q.call(G,Z),E==null||E(Z,V)},onMouseDown:Z=>{var Q;(Q=G==null?void 0:G.onMouseDown)==null||Q.call(G,Z),D&&Z.preventDefault()},tabIndex:D||!W?-1:0,children:(G==null?void 0:G.children)??Qe(V).locale($.getLocale(f)).format(d)})},Y)});return g.jsx("tr",{...I("yearsListRow"),children:B},H)});return g.jsx(le,{component:"table",ref:e,size:_,...I("yearsList"),...N,children:g.jsx("tbody",{children:F})})});i3.classes=eoe;i3.displayName="@mantine/dates/YearsList";function toe({month:t,minDate:e,maxDate:n}){return!e&&!n?!1:!!(e&&Qe(t).isBefore(e,"month")||n&&Qe(t).isAfter(n,"month"))}function VNe({months:t,minDate:e,maxDate:n,getMonthControlProps:r}){const s=t.flat().filter(a=>{var l;return!toe({month:a,minDate:e,maxDate:n})&&!((l=r==null?void 0:r(a))!=null&&l.disabled)}),i=s.find(a=>{var l;return(l=r==null?void 0:r(a))==null?void 0:l.selected});if(i)return i;const o=s.find(a=>Qe().isSame(a,"month"));return o||s[0]}function WNe(t){const e=Qe(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let s=0;s<4;s+=1)for(let i=0;i<3;i+=1)n[s].push(Qe(e).add(r,"months").format("YYYY-MM-DD")),r+=1;return n}var noe={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const YNe={monthsListFormat:"MMM",withCellSpacing:!0},o3=Fe((t,e)=>{const n=Ce("MonthsList",YNe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,__staticSelector:c,year:d,monthsListFormat:f,locale:p,minDate:m,maxDate:v,getMonthControlProps:y,__getControlRef:x,__onControlKeyDown:w,__onControlClick:C,__onControlMouseEnter:E,__preventFocus:D,__stopPropagation:T,withCellSpacing:A,size:_,attributes:R,...N}=n,I=bt({name:c||"MonthsList",classes:noe,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:R,vars:l,rootSelector:"monthsList"}),$=Mh(),L=WNe(d),z=VNe({months:L,minDate:lo(m),maxDate:lo(v),getMonthControlProps:y}),F=L.map((q,H)=>{const B=q.map((V,Y)=>{const G=y==null?void 0:y(V),W=Qe(V).isSame(z,"month");return g.jsx("td",{...I("monthsListCell"),"data-with-spacing":A||void 0,children:g.jsx(s3,{...I("monthsListControl"),size:_,unstyled:a,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":T||void 0,disabled:toe({month:V,minDate:lo(m),maxDate:lo(v)}),ref:Z=>{Z&&(x==null||x(H,Y,Z))},...G,onKeyDown:Z=>{var Q;(Q=G==null?void 0:G.onKeyDown)==null||Q.call(G,Z),w==null||w(Z,{rowIndex:H,cellIndex:Y,date:V})},onClick:Z=>{var Q;(Q=G==null?void 0:G.onClick)==null||Q.call(G,Z),C==null||C(Z,V)},onMouseEnter:Z=>{var Q;(Q=G==null?void 0:G.onMouseEnter)==null||Q.call(G,Z),E==null||E(Z,V)},onMouseDown:Z=>{var Q;(Q=G==null?void 0:G.onMouseDown)==null||Q.call(G,Z),D&&Z.preventDefault()},tabIndex:D||!W?-1:0,children:(G==null?void 0:G.children)??Qe(V).locale($.getLocale(p)).format(f)})},Y)});return g.jsx("tr",{...I("monthsListRow"),children:B},H)});return g.jsx(le,{component:"table",ref:e,size:_,...I("monthsList"),...N,children:g.jsx("tbody",{children:F})})});o3.classes=noe;o3.displayName="@mantine/dates/MonthsList";var roe={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const GNe={hasNextLevel:!0,withNext:!0,withPrevious:!0,headerControlsOrder:["previous","level","next"]},KNe=(t,{size:e})=>({calendarHeader:{"--dch-control-size":Qt(e,"dch-control-size"),"--dch-fz":hs(e)}}),Dh=Fe((t,e)=>{const n=Ce("CalendarHeader",GNe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,nextIcon:c,previousIcon:d,nextLabel:f,previousLabel:p,onNext:m,onPrevious:v,onLevelClick:y,label:x,nextDisabled:w,previousDisabled:C,hasNextLevel:E,levelControlAriaLabel:D,withNext:T,withPrevious:A,headerControlsOrder:_,__staticSelector:R,__preventFocus:N,__stopPropagation:I,attributes:$,...L}=n,z=bt({name:R||"CalendarHeader",classes:roe,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:$,vars:l,varsResolver:KNe,rootSelector:"calendarHeader"}),F=N?Y=>Y.preventDefault():void 0,q=A&&O.createElement(or,{...z("calendarHeaderControl"),key:"previous","data-direction":"previous","aria-label":p,onClick:v,unstyled:a,onMouseDown:F,disabled:C,"data-disabled":C||void 0,tabIndex:N||C?-1:0,"data-mantine-stop-propagation":I||void 0},d||g.jsx(rh,{...z("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})),H=O.createElement(or,{component:E?"button":"div",...z("calendarHeaderLevel"),key:"level",onClick:E?y:void 0,unstyled:a,onMouseDown:E?F:void 0,disabled:!E,"data-static":!E||void 0,"aria-label":D,tabIndex:N||!E?-1:0,"data-mantine-stop-propagation":I||void 0},x),B=T&&O.createElement(or,{...z("calendarHeaderControl"),key:"next","data-direction":"next","aria-label":f,onClick:m,unstyled:a,onMouseDown:F,disabled:w,"data-disabled":w||void 0,tabIndex:N||w?-1:0,"data-mantine-stop-propagation":I||void 0},c||g.jsx(rh,{...z("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})),V=_.map(Y=>Y==="previous"?q:Y==="level"?H:Y==="next"?B:null);return g.jsx(le,{...z("calendarHeader"),ref:e,...L,children:V})});Dh.classes=roe;Dh.displayName="@mantine/dates/CalendarHeader";function ZNe(t){const e=Qie(t);return[e[0][0],e[3][0]]}const JNe={decadeLabelFormat:"YYYY"},a3=Fe((t,e)=>{const n=Ce("DecadeLevel",JNe,t),{decade:r,locale:s,minDate:i,maxDate:o,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:p,withCellSpacing:m,__preventFocus:v,nextIcon:y,previousIcon:x,nextLabel:w,previousLabel:C,onNext:E,onPrevious:D,nextDisabled:T,previousDisabled:A,levelControlAriaLabel:_,withNext:R,withPrevious:N,headerControlsOrder:I,decadeLabelFormat:$,classNames:L,styles:z,unstyled:F,__staticSelector:q,__stopPropagation:H,size:B,attributes:V,...Y}=n,G=Mh(),[W,Z]=ZNe(r),Q={__staticSelector:q||"DecadeLevel",classNames:L,styles:z,unstyled:F,size:B,attributes:V},X=typeof T=="boolean"?T:o?!Qe(Z).endOf("year").isBefore(o):!1,re=typeof A=="boolean"?A:i?!Qe(W).startOf("year").isAfter(i):!1,ne=(ee,oe)=>Qe(ee).locale(s||G.locale).format(oe);return g.jsxs(le,{"data-decade-level":!0,size:B,ref:e,...Y,children:[g.jsx(Dh,{label:typeof $=="function"?$(W,Z):`${ne(W,$)} – ${ne(Z,$)}`,__preventFocus:v,__stopPropagation:H,nextIcon:y,previousIcon:x,nextLabel:w,previousLabel:C,onNext:E,onPrevious:D,nextDisabled:X,previousDisabled:re,hasNextLevel:!1,levelControlAriaLabel:_,withNext:R,withPrevious:N,headerControlsOrder:I,...Q}),g.jsx(i3,{decade:r,locale:s,minDate:i,maxDate:o,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:p,__preventFocus:v,__stopPropagation:H,withCellSpacing:m,...Q})]})});a3.classes={...i3.classes,...Dh.classes};a3.displayName="@mantine/dates/DecadeLevel";const XNe={yearLabelFormat:"YYYY"},l3=Fe((t,e)=>{const n=Ce("YearLevel",XNe,t),{year:r,locale:s,minDate:i,maxDate:o,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:p,withCellSpacing:m,__preventFocus:v,nextIcon:y,previousIcon:x,nextLabel:w,previousLabel:C,onNext:E,onPrevious:D,onLevelClick:T,nextDisabled:A,previousDisabled:_,hasNextLevel:R,levelControlAriaLabel:N,withNext:I,withPrevious:$,headerControlsOrder:L,yearLabelFormat:z,__staticSelector:F,__stopPropagation:q,size:H,classNames:B,styles:V,unstyled:Y,attributes:G,...W}=n,Z=Mh(),Q={__staticSelector:F||"YearLevel",classNames:B,styles:V,unstyled:Y,size:H,attributes:G},X=typeof A=="boolean"?A:o?!Qe(r).endOf("year").isBefore(o):!1,re=typeof _=="boolean"?_:i?!Qe(r).startOf("year").isAfter(i):!1;return g.jsxs(le,{"data-year-level":!0,size:H,ref:e,...W,children:[g.jsx(Dh,{label:typeof z=="function"?z(r):Qe(r).locale(s||Z.locale).format(z),__preventFocus:v,__stopPropagation:q,nextIcon:y,previousIcon:x,nextLabel:w,previousLabel:C,onNext:E,onPrevious:D,onLevelClick:T,nextDisabled:X,previousDisabled:re,hasNextLevel:R,levelControlAriaLabel:N,withNext:I,withPrevious:$,headerControlsOrder:L,...Q}),g.jsx(o3,{year:r,locale:s,minDate:i,maxDate:o,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:d,__onControlClick:f,__onControlMouseEnter:p,__preventFocus:v,__stopPropagation:q,withCellSpacing:m,...Q})]})});l3.classes={...Dh.classes,...o3.classes};l3.displayName="@mantine/dates/YearLevel";const QNe={monthLabelFormat:"MMMM YYYY"},c3=Fe((t,e)=>{const n=Ce("MonthLevel",QNe,t),{month:r,locale:s,firstDayOfWeek:i,weekdayFormat:o,weekendDays:a,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:p,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:y,__getDayRef:x,__onDayKeyDown:w,__onDayClick:C,__onDayMouseEnter:E,withCellSpacing:D,highlightToday:T,withWeekNumbers:A,__preventFocus:_,__stopPropagation:R,nextIcon:N,previousIcon:I,nextLabel:$,previousLabel:L,onNext:z,onPrevious:F,onLevelClick:q,nextDisabled:H,previousDisabled:B,hasNextLevel:V,levelControlAriaLabel:Y,withNext:G,withPrevious:W,headerControlsOrder:Z,monthLabelFormat:Q,classNames:X,styles:re,unstyled:ne,__staticSelector:ee,size:oe,static:ce,attributes:ue,...pe}=n,de=Mh(),me={__staticSelector:ee||"MonthLevel",classNames:X,styles:re,unstyled:ne,size:oe,attributes:ue},Se=typeof H=="boolean"?H:f?!Qe(r).endOf("month").isBefore(f):!1,De=typeof B=="boolean"?B:d?!Qe(r).startOf("month").isAfter(d):!1;return g.jsxs(le,{"data-month-level":!0,size:oe,ref:e,...pe,children:[g.jsx(Dh,{label:typeof Q=="function"?Q(r):Qe(r).locale(s||de.locale).format(Q),__preventFocus:_,__stopPropagation:R,nextIcon:N,previousIcon:I,nextLabel:$,previousLabel:L,onNext:z,onPrevious:F,onLevelClick:q,nextDisabled:Se,previousDisabled:De,hasNextLevel:V,levelControlAriaLabel:Y,withNext:G,withPrevious:W,headerControlsOrder:Z,...me}),g.jsx(r3,{month:r,locale:s,firstDayOfWeek:i,weekdayFormat:o,weekendDays:a,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:p,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:y,__getDayRef:x,__onDayKeyDown:w,__onDayClick:C,__onDayMouseEnter:E,__preventFocus:_,__stopPropagation:R,static:ce,withCellSpacing:D,highlightToday:T,withWeekNumbers:A,...me})]})});c3.classes={...r3.classes,...Dh.classes};c3.displayName="@mantine/dates/MonthLevel";var soe={levelsGroup:"m_30b26e33"};const kh=Fe((t,e)=>{const n=Ce("LevelsGroup",null,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,__staticSelector:c,attributes:d,...f}=n,p=bt({name:c||"LevelsGroup",classes:soe,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:d,vars:l,rootSelector:"levelsGroup"});return g.jsx(le,{ref:e,...p("levelsGroup"),...f})});kh.classes=soe;kh.displayName="@mantine/dates/LevelsGroup";const eje={numberOfColumns:1},u3=Fe((t,e)=>{const n=Ce("DecadeLevelGroup",eje,t),{decade:r,locale:s,minDate:i,maxDate:o,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:x,onNext:w,onPrevious:C,nextDisabled:E,previousDisabled:D,headerControlsOrder:T,classNames:A,styles:_,unstyled:R,__staticSelector:N,__stopPropagation:I,numberOfColumns:$,levelControlAriaLabel:L,decadeLabelFormat:z,size:F,vars:q,attributes:H,...B}=n,V=O.useRef([]),Y=Array($).fill(0).map((G,W)=>{const Z=Qe(r).add(W*10,"years").format("YYYY-MM-DD");return g.jsx(a3,{size:F,yearsListFormat:a,decade:Z,withNext:W===$-1,withPrevious:W===0,decadeLabelFormat:z,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:(Q,X)=>L$({levelIndex:W,rowIndex:X.rowIndex,cellIndex:X.cellIndex,event:Q,controlsRef:V}),__getControlRef:(Q,X,re)=>{Array.isArray(V.current[W])||(V.current[W]=[]),Array.isArray(V.current[W][Q])||(V.current[W][Q]=[]),V.current[W][Q][X]=re},levelControlAriaLabel:typeof L=="function"?L(Z):L,locale:s,minDate:i,maxDate:o,__preventFocus:p,__stopPropagation:I,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:x,onNext:w,onPrevious:C,nextDisabled:E,previousDisabled:D,getYearControlProps:l,__staticSelector:N||"DecadeLevelGroup",classNames:A,styles:_,unstyled:R,withCellSpacing:f,headerControlsOrder:T,attributes:H},W)});return g.jsx(kh,{classNames:A,styles:_,__staticSelector:N||"DecadeLevelGroup",ref:e,size:F,unstyled:R,attributes:H,...B,children:Y})});u3.classes={...kh.classes,...a3.classes};u3.displayName="@mantine/dates/DecadeLevelGroup";const tje={numberOfColumns:1},d3=Fe((t,e)=>{const n=Ce("YearLevelGroup",tje,t),{year:r,locale:s,minDate:i,maxDate:o,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:d,withCellSpacing:f,__preventFocus:p,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:x,onNext:w,onPrevious:C,onLevelClick:E,nextDisabled:D,previousDisabled:T,hasNextLevel:A,headerControlsOrder:_,classNames:R,styles:N,unstyled:I,__staticSelector:$,__stopPropagation:L,numberOfColumns:z,levelControlAriaLabel:F,yearLabelFormat:q,size:H,vars:B,attributes:V,...Y}=n,G=O.useRef([]),W=Array(z).fill(0).map((Z,Q)=>{const X=Qe(r).add(Q,"years").format("YYYY-MM-DD");return g.jsx(l3,{size:H,monthsListFormat:a,year:X,withNext:Q===z-1,withPrevious:Q===0,yearLabelFormat:q,__stopPropagation:L,__onControlClick:c,__onControlMouseEnter:d,__onControlKeyDown:(re,ne)=>L$({levelIndex:Q,rowIndex:ne.rowIndex,cellIndex:ne.cellIndex,event:re,controlsRef:G}),__getControlRef:(re,ne,ee)=>{Array.isArray(G.current[Q])||(G.current[Q]=[]),Array.isArray(G.current[Q][re])||(G.current[Q][re]=[]),G.current[Q][re][ne]=ee},levelControlAriaLabel:typeof F=="function"?F(X):F,locale:s,minDate:i,maxDate:o,__preventFocus:p,nextIcon:m,previousIcon:v,nextLabel:y,previousLabel:x,onNext:w,onPrevious:C,onLevelClick:E,nextDisabled:D,previousDisabled:T,hasNextLevel:A,getMonthControlProps:l,classNames:R,styles:N,unstyled:I,__staticSelector:$||"YearLevelGroup",withCellSpacing:f,headerControlsOrder:_,attributes:V},Q)});return g.jsx(kh,{classNames:R,styles:N,__staticSelector:$||"YearLevelGroup",ref:e,size:H,unstyled:I,attributes:V,...Y,children:W})});d3.classes={...l3.classes,...kh.classes};d3.displayName="@mantine/dates/YearLevelGroup";const nje={numberOfColumns:1},f3=Fe((t,e)=>{const n=Ce("MonthLevelGroup",nje,t),{month:r,locale:s,firstDayOfWeek:i,weekdayFormat:o,weekendDays:a,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:p,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:y,__onDayClick:x,__onDayMouseEnter:w,withCellSpacing:C,highlightToday:E,withWeekNumbers:D,__preventFocus:T,nextIcon:A,previousIcon:_,nextLabel:R,previousLabel:N,onNext:I,onPrevious:$,onLevelClick:L,nextDisabled:z,previousDisabled:F,hasNextLevel:q,headerControlsOrder:H,classNames:B,styles:V,unstyled:Y,numberOfColumns:G,levelControlAriaLabel:W,monthLabelFormat:Z,__staticSelector:Q,__stopPropagation:X,size:re,static:ne,vars:ee,attributes:oe,...ce}=n,ue=O.useRef([]),pe=Array(G).fill(0).map((de,me)=>{const Se=Qe(r).add(me,"months").format("YYYY-MM-DD");return g.jsx(c3,{month:Se,withNext:me===G-1,withPrevious:me===0,monthLabelFormat:Z,__stopPropagation:X,__onDayClick:x,__onDayMouseEnter:w,__onDayKeyDown:(De,Ae)=>L$({levelIndex:me,rowIndex:Ae.rowIndex,cellIndex:Ae.cellIndex,event:De,controlsRef:ue}),__getDayRef:(De,Ae,fe)=>{Array.isArray(ue.current[me])||(ue.current[me]=[]),Array.isArray(ue.current[me][De])||(ue.current[me][De]=[]),ue.current[me][De][Ae]=fe},levelControlAriaLabel:typeof W=="function"?W(Se):W,locale:s,firstDayOfWeek:i,weekdayFormat:o,weekendDays:a,getDayProps:l,excludeDate:c,minDate:d,maxDate:f,renderDay:p,hideOutsideDates:m,hideWeekdays:v,getDayAriaLabel:y,__preventFocus:T,nextIcon:A,previousIcon:_,nextLabel:R,previousLabel:N,onNext:I,onPrevious:$,onLevelClick:L,nextDisabled:z,previousDisabled:F,hasNextLevel:q,classNames:B,styles:V,unstyled:Y,__staticSelector:Q||"MonthLevelGroup",size:re,static:ne,withCellSpacing:C,highlightToday:E,withWeekNumbers:D,headerControlsOrder:H,attributes:oe},me)});return g.jsx(kh,{classNames:B,styles:V,__staticSelector:Q||"MonthLevelGroup",ref:e,size:re,attributes:oe,...ce,children:pe})});f3.classes={...kh.classes,...c3.classes};f3.displayName="@mantine/dates/MonthLevelGroup";var ioe={input:"m_6fa5e2aa"};const p3=Fe((t,e)=>{const{inputProps:n,wrapperProps:r,placeholder:s,classNames:i,styles:o,unstyled:a,popoverProps:l,modalProps:c,dropdownType:d,children:f,formattedValue:p,dropdownHandlers:m,dropdownOpened:v,onClick:y,clearable:x,onClear:w,clearButtonProps:C,rightSection:E,shouldClear:D,readOnly:T,disabled:A,value:_,name:R,form:N,type:I,onDropdownClose:$,withTime:L,...z}=zee("PickerInputBase",{size:"sm"},t),F=g.jsx(Pn.ClearButton,{onClick:w,unstyled:a,...C}),q=()=>{I==="range"&&Array.isArray(_)&&_[0]&&!_[1]&&w(),m.close()};return g.jsxs(g.Fragment,{children:[d==="modal"&&!T&&g.jsx(ks,{opened:v,onClose:q,withCloseButton:!1,size:"auto","data-dates-modal":!0,unstyled:a,...c,children:f}),g.jsx(Pn.Wrapper,{...r,children:g.jsxs(Mn,{position:"bottom-start",opened:v,trapFocus:!0,returnFocus:!1,unstyled:a,onClose:$,...l,disabled:(l==null?void 0:l.disabled)||d==="modal"||T,onChange:H=>{var B;H||((B=l==null?void 0:l.onClose)==null||B.call(l),q())},children:[g.jsx(Mn.Target,{children:g.jsx(Pn,{"data-dates-input":!0,"data-read-only":T||void 0,disabled:A,component:"button",type:"button",multiline:!0,onClick:H=>{y==null||y(H),m.toggle()},__clearSection:F,__clearable:x&&D&&!T&&!A,rightSection:E,...n,ref:e,classNames:{...i,input:Vie(ioe.input,i==null?void 0:i.input)},...z,children:p||g.jsx(Pn.Placeholder,{error:n.error,unstyled:a,classNames:i,styles:o,__staticSelector:n.__staticSelector,children:s})})}),g.jsx(Mn.Dropdown,{"data-dates-dropdown":!0,children:f})]})}),g.jsx(qie,{value:_,name:R,form:N,type:I,withTime:L})]})});p3.classes=ioe;p3.displayName="@mantine/dates/PickerInputBase";const kU=t=>t==="range"?[null,null]:t==="multiple"?[]:null,TU=(t,e)=>{const n=e?zie:lo;return Array.isArray(t)?t.map(n):n(t)};function B$({type:t,value:e,defaultValue:n,onChange:r,withTime:s=!1}){const i=O.useRef(t),[o,a,l]=gi({value:TU(e,s),defaultValue:TU(n,s),finalValue:kU(t),onChange:r});let c=o;return i.current!==t&&(i.current=t,e===void 0&&(c=n!==void 0?n:kU(t),a(c))),[c,a,l]}function _4(t,e){return t?t==="month"?0:t==="year"?1:2:e||0}function rje(t){return t===0?"month":t===1?"year":"decade"}function lx(t,e,n){return rje(Eu(_4(t,0),_4(e,0),_4(n,2)))}const sje={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0,enableKeyboardNavigation:!0},Y1=Fe((t,e)=>{const n=Ce("Calendar",sje,t),{vars:r,maxLevel:s,minLevel:i,defaultLevel:o,level:a,onLevelChange:l,date:c,defaultDate:d,onDateChange:f,numberOfColumns:p,columnsToScroll:m,ariaLabels:v,nextLabel:y,previousLabel:x,onYearSelect:w,onMonthSelect:C,onYearMouseEnter:E,onMonthMouseEnter:D,headerControlsOrder:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:_,__setDateRef:R,__setLevelRef:N,firstDayOfWeek:I,weekdayFormat:$,weekendDays:L,getDayProps:z,excludeDate:F,renderDay:q,hideOutsideDates:H,hideWeekdays:B,getDayAriaLabel:V,monthLabelFormat:Y,nextIcon:G,previousIcon:W,__onDayClick:Z,__onDayMouseEnter:Q,withCellSpacing:X,highlightToday:re,withWeekNumbers:ne,monthsListFormat:ee,getMonthControlProps:oe,yearLabelFormat:ce,yearsListFormat:ue,getYearControlProps:pe,decadeLabelFormat:de,classNames:me,styles:Se,unstyled:De,minDate:Ae,maxDate:fe,locale:Te,__staticSelector:Ne,size:Ue,__preventFocus:rt,__stopPropagation:ot,onNextDecade:Je,onPreviousDecade:je,onNextYear:We,onPreviousYear:Le,onNextMonth:_e,onPreviousMonth:Be,static:ut,enableKeyboardNavigation:lt,attributes:At,...jt}=n,{resolvedClassNames:Ot,resolvedStyles:Pt}=Ma({classNames:me,styles:Se,props:n}),[Rt,Nt]=gi({value:a?lx(a,i,s):void 0,defaultValue:o?lx(o,i,s):void 0,finalValue:lx(void 0,i,s),onChange:l}),[Fn,pn]=B$({type:"default",value:lo(c),defaultValue:lo(d),onChange:f});O.useImperativeHandle(R,()=>ht=>{pn(ht)}),O.useImperativeHandle(N,()=>ht=>{Nt(ht)});const hn={__staticSelector:Ne||"Calendar",styles:Pt,classNames:Ot,unstyled:De,size:Ue,attributes:At},On=m||p||1,Vt=new Date,an=Ae&&Qe(Vt).isAfter(Ae)?Ae:Qe(Vt).format("YYYY-MM-DD"),xn=Fn||an,Ts=()=>{const ht=Qe(xn).add(On,"month").format("YYYY-MM-DD");_e==null||_e(ht),pn(ht)},Hr=()=>{const ht=Qe(xn).subtract(On,"month").format("YYYY-MM-DD");Be==null||Be(ht),pn(ht)},As=()=>{const ht=Qe(xn).add(On,"year").format("YYYY-MM-DD");We==null||We(ht),pn(ht)},Rr=()=>{const ht=Qe(xn).subtract(On,"year").format("YYYY-MM-DD");Le==null||Le(ht),pn(ht)},ft=()=>{const ht=Qe(xn).add(10*On,"year").format("YYYY-MM-DD");Je==null||Je(ht),pn(ht)},xt=()=>{const ht=Qe(xn).subtract(10*On,"year").format("YYYY-MM-DD");je==null||je(ht),pn(ht)},st=O.useRef(null);O.useEffect(()=>{if(!lt||ut)return;const ht=kt=>{var Gn;if(!((Gn=st.current)!=null&&Gn.contains(document.activeElement)))return;const Hn=kt.ctrlKey||kt.metaKey,qr=kt.shiftKey;switch(kt.key){case"ArrowUp":Hn&&qr?(kt.preventDefault(),xt()):Hn&&(kt.preventDefault(),Rr());break;case"ArrowDown":Hn&&qr?(kt.preventDefault(),ft()):Hn&&(kt.preventDefault(),As());break;case"y":case"Y":Rt==="month"&&(kt.preventDefault(),Nt("year"));break}};return document.addEventListener("keydown",ht),()=>{document.removeEventListener("keydown",ht)}},[lt,ut,Rt,As,Rr,ft,xt]);const it=ht=>{st.current=ht,typeof e=="function"?e(ht):e&&(e.current=ht)};return g.jsxs(le,{ref:it,size:Ue,"data-calendar":!0,...jt,children:[Rt==="month"&&g.jsx(f3,{month:xn,minDate:Ae,maxDate:fe,firstDayOfWeek:I,weekdayFormat:$,weekendDays:L,getDayProps:z,excludeDate:F,renderDay:q,hideOutsideDates:H,hideWeekdays:B,getDayAriaLabel:V,onNext:Ts,onPrevious:Hr,hasNextLevel:s!=="month",onLevelClick:()=>Nt("year"),numberOfColumns:p,locale:Te,levelControlAriaLabel:v==null?void 0:v.monthLevelControl,nextLabel:(v==null?void 0:v.nextMonth)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousMonth)??x,previousIcon:W,monthLabelFormat:Y,__onDayClick:Z,__onDayMouseEnter:Q,__preventFocus:rt,__stopPropagation:ot,static:ut,withCellSpacing:X,highlightToday:re,withWeekNumbers:ne,headerControlsOrder:T,...hn}),Rt==="year"&&g.jsx(d3,{year:xn,numberOfColumns:p,minDate:Ae,maxDate:fe,monthsListFormat:ee,getMonthControlProps:oe,locale:Te,onNext:As,onPrevious:Rr,hasNextLevel:s!=="month"&&s!=="year",onLevelClick:()=>Nt("decade"),levelControlAriaLabel:v==null?void 0:v.yearLevelControl,nextLabel:(v==null?void 0:v.nextYear)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousYear)??x,previousIcon:W,yearLabelFormat:ce,__onControlMouseEnter:D,__onControlClick:(ht,kt)=>{_&&pn(kt),Nt(lx("month",i,s)),C==null||C(kt)},__preventFocus:rt,__stopPropagation:ot,withCellSpacing:X,headerControlsOrder:T,...hn}),Rt==="decade"&&g.jsx(u3,{decade:xn,minDate:Ae,maxDate:fe,yearsListFormat:ue,getYearControlProps:pe,locale:Te,onNext:ft,onPrevious:xt,numberOfColumns:p,nextLabel:(v==null?void 0:v.nextDecade)??y,nextIcon:G,previousLabel:(v==null?void 0:v.previousDecade)??x,previousIcon:W,decadeLabelFormat:de,__onControlMouseEnter:E,__onControlClick:(ht,kt)=>{A&&pn(kt),Nt(lx("year",i,s)),w==null||w(kt)},__preventFocus:rt,__stopPropagation:ot,withCellSpacing:X,headerControlsOrder:T,...hn})]})});Y1.classes={...u3.classes,...d3.classes,...f3.classes};Y1.displayName="@mantine/dates/Calendar";function ooe(t){const{maxLevel:e,minLevel:n,defaultLevel:r,level:s,onLevelChange:i,nextIcon:o,previousIcon:a,date:l,defaultDate:c,onDateChange:d,numberOfColumns:f,columnsToScroll:p,ariaLabels:m,nextLabel:v,previousLabel:y,onYearSelect:x,onMonthSelect:w,onYearMouseEnter:C,onMonthMouseEnter:E,onNextMonth:D,onPreviousMonth:T,onNextYear:A,onPreviousYear:_,onNextDecade:R,onPreviousDecade:N,withCellSpacing:I,highlightToday:$,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:z,__setDateRef:F,__setLevelRef:q,withWeekNumbers:H,headerControlsOrder:B,firstDayOfWeek:V,weekdayFormat:Y,weekendDays:G,getDayProps:W,excludeDate:Z,renderDay:Q,hideOutsideDates:X,hideWeekdays:re,getDayAriaLabel:ne,monthLabelFormat:ee,monthsListFormat:oe,getMonthControlProps:ce,yearLabelFormat:ue,yearsListFormat:pe,getYearControlProps:de,decadeLabelFormat:me,allowSingleDateInRange:Se,allowDeselect:De,minDate:Ae,maxDate:fe,locale:Te,...Ne}=t;return{calendarProps:{maxLevel:e,minLevel:n,defaultLevel:r,level:s,onLevelChange:i,nextIcon:o,previousIcon:a,date:l,defaultDate:c,onDateChange:d,numberOfColumns:f,columnsToScroll:p,ariaLabels:m,nextLabel:v,previousLabel:y,onYearSelect:x,onMonthSelect:w,onYearMouseEnter:C,onMonthMouseEnter:E,onNextMonth:D,onPreviousMonth:T,onNextYear:A,onPreviousYear:_,onNextDecade:R,onPreviousDecade:N,withCellSpacing:I,highlightToday:$,__updateDateOnYearSelect:L,__updateDateOnMonthSelect:z,__setDateRef:F,withWeekNumbers:H,headerControlsOrder:B,firstDayOfWeek:V,weekdayFormat:Y,weekendDays:G,getDayProps:W,excludeDate:Z,renderDay:Q,hideOutsideDates:X,hideWeekdays:re,getDayAriaLabel:ne,monthLabelFormat:ee,monthsListFormat:oe,getMonthControlProps:ce,yearLabelFormat:ue,yearsListFormat:pe,getYearControlProps:de,decadeLabelFormat:me,allowSingleDateInRange:Se,allowDeselect:De,minDate:Ae,maxDate:fe,locale:Te},others:Ne}}function AU(t,e){const n=[...e].sort((r,s)=>Qe(r).isAfter(Qe(s))?1:-1);return Qe(n[0]).startOf("day").subtract(1,"ms").isBefore(t)&&Qe(n[1]).endOf("day").add(1,"ms").isAfter(t)}function aoe({type:t,level:e,value:n,defaultValue:r,onChange:s,allowSingleDateInRange:i,allowDeselect:o,onMouseLeave:a}){const[l,c]=B$({type:t,value:n,defaultValue:r,onChange:s}),[d,f]=O.useState(t==="range"&&l[0]&&!l[1]?l[0]:null),[p,m]=O.useState(null),v=T=>{if(t==="range"){if(d&&!l[1]){if(Qe(T).isSame(d,e)&&!i){f(null),m(null),c([null,null]);return}const A=[T,d];A.sort((_,R)=>Qe(_).isAfter(Qe(R))?1:-1),c(A),m(null),f(null);return}if(l[0]&&!l[1]&&Qe(T).isSame(l[0],e)&&!i){f(null),m(null),c([null,null]);return}c([T,null]),m(null),f(T);return}if(t==="multiple"){l.some(A=>Qe(A).isSame(T,e))?c(l.filter(A=>!Qe(A).isSame(T,e))):c([...l,T]);return}l&&o&&Qe(T).isSame(l,e)?c(null):c(T)},y=T=>d&&p?AU(T,[p,d]):l[0]&&l[1]?AU(T,l):!1,x=t==="range"?T=>{a==null||a(T),m(null)}:a,w=T=>l[0]&&Qe(T).isSame(l[0],e)?!(p&&Qe(p).isBefore(l[0])):!1,C=T=>l[1]?Qe(T).isSame(l[1],e):!l[0]||!p?!1:Qe(p).isBefore(l[0])&&Qe(T).isSame(l[0],e),E=T=>{if(t==="range")return{selected:l.some(_=>_&&Qe(_).isSame(T,e)),inRange:y(T),firstInRange:w(T),lastInRange:C(T),"data-autofocus":!!l[0]&&Qe(l[0]).isSame(T,e)||void 0};if(t==="multiple")return{selected:l.some(_=>_&&Qe(_).isSame(T,e)),"data-autofocus":!!l[0]&&Qe(l[0]).isSame(T,e)||void 0};const A=Qe(l).isSame(T,e);return{selected:A,"data-autofocus":A||void 0}},D=t==="range"&&d?m:()=>{};return O.useEffect(()=>{if(t==="range")if(l[0]&&!l[1])f(l[0]);else{const T=l[0]==null&&l[1]==null,A=l[0]!=null&&l[1]!=null;(T||A)&&(f(null),m(null))}},[l]),{onDateChange:v,onRootMouseLeave:x,onHoveredDateChange:D,getControlProps:E,_value:l,setValue:c}}const ije={type:"default"},H$=Fe((t,e)=>{const n=Ce("MonthPicker",ije,t),{classNames:r,styles:s,vars:i,type:o,defaultValue:a,value:l,onChange:c,__staticSelector:d,getMonthControlProps:f,allowSingleDateInRange:p,allowDeselect:m,onMouseLeave:v,onMonthSelect:y,__updateDateOnMonthSelect:x,onLevelChange:w,...C}=n,{onDateChange:E,onRootMouseLeave:D,onHoveredDateChange:T,getControlProps:A}=aoe({type:o,level:"month",allowDeselect:m,allowSingleDateInRange:p,value:l,defaultValue:a,onChange:c,onMouseLeave:v}),{resolvedClassNames:_,resolvedStyles:R}=Ma({classNames:r,styles:s,props:n});return g.jsx(Y1,{ref:e,minLevel:"year",__updateDateOnMonthSelect:x??!1,__staticSelector:d||"MonthPicker",onMouseLeave:D,onMonthMouseEnter:(N,I)=>T(I),onMonthSelect:N=>{E(N),y==null||y(N)},getMonthControlProps:N=>({...A(N),...f==null?void 0:f(N)}),classNames:_,styles:R,onLevelChange:w,...C})});H$.classes=Y1.classes;H$.displayName="@mantine/dates/MonthPicker";var oje={datePickerRoot:"m_765a40cf",presetsList:"m_d6a681e1",presetButton:"m_acd30b22"};const aje=(t,{size:e})=>({datePickerRoot:{"--preset-font-size":hs(e)}}),lje={type:"default",defaultLevel:"month",numberOfColumns:1,size:"sm"},pv=Fe((t,e)=>{const n=Ce("DatePicker",lje,t),{allowDeselect:r,allowSingleDateInRange:s,value:i,defaultValue:o,onChange:a,onMouseLeave:l,classNames:c,styles:d,__staticSelector:f,__onDayClick:p,__onDayMouseEnter:m,__onPresetSelect:v,__stopPropagation:y,presets:x,className:w,style:C,unstyled:E,size:D,vars:T,attributes:A,..._}=n,{calendarProps:R,others:N}=ooe(_),I=O.useRef(null),$=O.useRef(null),L=bt({name:f||"DatePicker",classes:oje,props:n,className:w,style:C,classNames:c,styles:d,unstyled:E,attributes:A,rootSelector:x?"datePickerRoot":void 0,varsResolver:aje,vars:T}),{onDateChange:z,onRootMouseLeave:F,onHoveredDateChange:q,getControlProps:H,_value:B,setValue:V}=aoe({type:N.type,level:"day",allowDeselect:r,allowSingleDateInRange:s,value:i,defaultValue:o,onChange:a,onMouseLeave:l}),{resolvedClassNames:Y,resolvedStyles:G}=Ma({classNames:c,styles:d,props:n}),W=g.jsx(Y1,{ref:e,classNames:Y,styles:G,__staticSelector:f||"DatePicker",onMouseLeave:F,size:D,...R,...x?{}:N,__stopPropagation:y,__setDateRef:I,__setLevelRef:$,minLevel:R.minLevel||"month",__onDayMouseEnter:(X,re)=>{q(re),m==null||m(X,re)},__onDayClick:(X,re)=>{z(re),p==null||p(X,re)},getDayProps:X=>{var re;return{...H(X),...(re=R.getDayProps)==null?void 0:re.call(R,X)}},getMonthControlProps:X=>{var re;return{selected:typeof B=="string"?F$(X,B):!1,...(re=R.getMonthControlProps)==null?void 0:re.call(R,X)}},getYearControlProps:X=>{var re;return{selected:typeof B=="string"?Qe(X).isSame(B,"year"):!1,...(re=R.getYearControlProps)==null?void 0:re.call(R,X)}},hideOutsideDates:R.hideOutsideDates??R.numberOfColumns!==1,...x?{}:{className:w,style:C,attributes:A}});if(!x)return W;const Z=X=>{var ne,ee;const re=Array.isArray(X)?X[0]:X;re!==void 0&&((ne=I.current)==null||ne.call(I,re),(ee=$.current)==null||ee.call($,"month"),v?v(re):V(X))},Q=x.map((X,re)=>g.jsx(or,{...L("presetButton"),onClick:()=>Z(X.value),onMouseDown:ne=>ne.preventDefault(),"data-mantine-stop-propagation":y||void 0,children:X.label},re));return g.jsxs(le,{...L("datePickerRoot"),size:D,...N,children:[g.jsx("div",{...L("presetsList"),children:Q}),W]})});pv.classes=Y1.classes;pv.displayName="@mantine/dates/DatePicker";function cje({type:t,value:e,defaultValue:n,onChange:r,locale:s,format:i,closeOnChange:o,sortDates:a,labelSeparator:l,valueFormatter:c}){const d=Mh(),[f,p]=Ps(!1),[m,v]=B$({type:t,value:e,defaultValue:n,onChange:r}),y=SNe({type:t,date:m,locale:d.getLocale(s),format:i,labelSeparator:d.getLabelSeparator(l),formatter:c}),x=E=>{o&&(t==="default"&&p.close(),t==="range"&&E[0]&&E[1]&&p.close()),v(a&&t==="multiple"?[...E].sort((D,T)=>Qe(D).isAfter(Qe(T))?1:-1):E)},w=()=>x(t==="range"?[null,null]:t==="multiple"?[]:null),C=t==="range"?!!m[0]:t==="multiple"?m.length>0:m!==null;return{_value:m,setValue:x,onClear:w,shouldClear:C,formattedValue:y,dropdownOpened:f,dropdownHandlers:p}}const uje={type:"default",valueFormat:"MMMM D, YYYY",closeOnChange:!0,sortDates:!0,dropdownType:"popover"},h3=Fe((t,e)=>{const n=Ce("DatePickerInput",uje,t),{type:r,value:s,defaultValue:i,onChange:o,valueFormat:a,labelSeparator:l,locale:c,classNames:d,styles:f,unstyled:p,closeOnChange:m,size:v,variant:y,dropdownType:x,sortDates:w,minDate:C,maxDate:E,vars:D,defaultDate:T,valueFormatter:A,presets:_,attributes:R,...N}=n,{resolvedClassNames:I,resolvedStyles:$}=Ma({classNames:d,styles:f,props:n}),{calendarProps:L,others:z}=ooe(N),{_value:F,setValue:q,formattedValue:H,dropdownHandlers:B,dropdownOpened:V,onClear:Y,shouldClear:G}=cje({type:r,value:s,defaultValue:i,onChange:o,locale:c,format:a,labelSeparator:l,closeOnChange:m,sortDates:w,valueFormatter:A}),W=Array.isArray(F)?F[0]||T:F||T;return g.jsx(p3,{formattedValue:H,dropdownOpened:V,dropdownHandlers:B,classNames:I,styles:$,unstyled:p,ref:e,onClear:Y,shouldClear:G,value:F,size:v,variant:y,dropdownType:x,...z,type:r,__staticSelector:"DatePickerInput",attributes:R,children:g.jsx(pv,{...L,size:v,variant:y,type:r,value:F,defaultDate:W||MNe({maxDate:E,minDate:C}),onChange:q,locale:c,classNames:I,styles:$,unstyled:p,__staticSelector:"DatePickerInput",__stopPropagation:x==="popover",minDate:C,maxDate:E,presets:_,attributes:R})})});h3.classes={...p3.classes,...pv.classes};h3.displayName="@mantine/dates/DatePickerInput";const dje=({onChange:t,eventStart:e,dayNumber:n,dayOfWeek:r,weekNumber:s})=>{const{t:i,i18n:o}=yt(),a=d=>{const f=Lt(e),p=rr(f,"dayOfWeek");if(d==="date"){const m=rr(f,"day");t({dayNumber:m,choosedWeekDays:null,dayOfWeek:null,weekNumber:null})}else t(d==="everySpecificDayInMonth"?{dayNumber:null,dayOfWeek:2**p,choosedWeekDays:null,weekNumber:Ug(f)}:d==="lastWeekInMonth"?{dayNumber:null,dayOfWeek:2**p,weekNumber:-1,choosedWeekDays:{[2**p]:""}}:{dayNumber:-1,choosedWeekDays:-1,weekNumber:null})},l=O.useMemo(()=>{const d=St(e,"d"),f=Ug(Lt(e)),p=qx(Lt(e)),m=[{value:"date",label:`${d} ${i("recurringModal.monthVariant.dateNumber")}`}];return f!==5&&m.push({value:"everySpecificDayInMonth",label:`${f}-${gl(Number(St(e,"E")),!0,i,o.language,f)} ${St(e,"EEEE",!1,o.language)}`}),co(Lt(e),Es(Lt(e),{week:1}),"month")||m.push({value:"lastWeekInMonth",label:`${i("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(e,"E")),!1,i,o.language)} ${St(e,"EEEE",!1,o.language)}`}),p&&m.push({value:"lastDay",label:i("recurringModal.monthVariant.lastMonthDay")}),m},[e]),c=()=>Number(n)>0?"date":Number(r)>0&&Number(s)>0?"everySpecificDayInMonth":n===-1?"lastDay":"lastWeekInMonth";return g.jsx(uo,{onChange:a,w:220,mt:20,value:c(),data:l})},fje=({onChange:t,choosedWeekDays:e,eventStart:n})=>{const r=Dr(),s=["Mn","Tu","We","Th","Fr","Sa","Su"],i=(o,a)=>{if(e[o]){const l={...e};if(delete l[o],Object.keys(l).length===0){const c=rr(n,"dayOfWeek");t({[2**c]:s$[c+1]})}else t(l)}else t({...e,[o]:a})};return g.jsxs(le,{mt:10,children:[g.jsx(He,{fz:"sm",children:ct("recurringModal.weekVariant.label")}),g.jsx(wt,{mt:5,children:s.map((o,a)=>{const l=2**a,c=e[l];return g.jsx(qd,{component:"button",color:c===o?r.colors.blue[6]:r.colors.gray[2],onClick:()=>i(l,o),style:{color:c===o?"#fff":"#000",cursor:"pointer"},children:g.jsx(He,{fz:"xs",children:ct(`fullEventPage.repeatTypes.weekDays.${o}`)})},o)})})]})},pje=({onChange:t,eventStart:e,dayNumber:n,choosedWeekDays:r})=>{const s=Ln.language,i=O.useRef(null),{t:o}=yt(),a=d=>{const f=Lt(e),p=rr(f,"day"),m=rr(f,"dayOfWeek");t(d==="date"?{dayNumber:Number(p),choosedWeekDays:null,monthNumber:rr(e,"month")}:d==="everySpecificDayInMonth"?{dayNumber:Ug(f),choosedWeekDays:{[2**m]:""},monthNumber:rr(e,"month")}:d==="lastWeekInMonth"?{dayNumber:null,choosedWeekDays:{[2**m]:""},monthNumber:rr(f,"month")}:d==="lastDay"?{dayNumber:-1,choosedWeekDays:null,monthNumber:rr(f,"month")}:{dayNumber:-1,choosedWeekDays:-1,monthNumber:rr(f,"month")})},l=O.useMemo(()=>{const d=St(e,"dd MMMM",!1,s),f=Ug(Lt(e)),p=qx(Lt(e)),m=[{value:"date",label:`${d}`}];return f!==5&&m.push({value:"everySpecificDayInMonth",label:`${f}-${gl(Number(St(e,"E")),!0,o,s,f)} ${St(e,"EEEE MMMM",!1,s)}`}),co(Lt(e),Es(Lt(e),{week:1}),"month")||m.push({value:"lastWeekInMonth",label:`${o("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(e,"E")),!1,o,s)} ${St(e,"EEEE",!1,s)} ${St(e,"MMMM",!1,s)}`}),p&&rr(Lt(e),"month")===2&&m.push({value:"lastDay",label:`${o("fullEventPage.repeatTypes.lastDay")} ${St(e,"MMMM",!1,s)}`}),m},[e]),c=()=>Number(n)===-1?"lastDay":n&&!r?"date":Number(n)>0&&r?"everySpecificDayInMonth":"lastWeekInMonth";return g.jsx(uo,{ref:i,onChange:a,w:220,mt:20,value:c(),data:l})},hje=({opened:t,close:e,setRecurring:n,event:r,repeatPeriodValue:s})=>{const{resource:{recurring:i}}=r,{isMobile:o}=Yt(),[a,l]=O.useState(i),[c,d]=O.useState(i.endEventRecurringAfter||"5"),[f,p]=O.useState(!0),{t:m,i18n:v}=yt(),{repeatValue:y,repeatPeriod:x,endEventRecurring:w,endEventRecurringAfter:C,choosedWeekDays:E,dayNumber:D,weekNumber:T,dayOfWeek:A}=a,_=()=>{n({...a})},R=()=>{n({...i}),e()},N=(L,z)=>{const{repeatValue:F,endEventRecurring:q,endDateEventRecurring:H,endEventRecurringAfter:B,dayNumber:V,weekNumber:Y,dayOfWeek:G}=L,W={...L,endEventRecurring:q||"never",repeatPeriod:String(z),repeatValue:F,endDateEventRecurring:H,endEventRecurringAfter:B};if(z==="months")l({...W,choosedWeekDays:null,dayNumber:!V&&!Y&&!G?rr(r.start,"day"):V});else if(z==="weeks"){const Z=rr(r.start,"dayOfWeek"),Q={[2**Z]:s$[Z+1]};l({...W,choosedWeekDays:W.choosedWeekDays?W.choosedWeekDays:Q})}else if(z==="years"){const Z=rr(r.start,"day");l({...W,dayNumber:Number(Z),choosedWeekDays:null,monthNumber:rr(r.start,"month")})}else l({...W})};O.useEffect(()=>{s&&a.repeatPeriod!==s&&N(a,s)},[s]);const I=(L,z)=>{setTimeout(()=>{p(L)},z)},$=L=>{L.key==="Enter"&&(_(),e())};return g.jsx(g.Fragment,{children:g.jsxs(ks,{title:m("recurringModal.title"),opened:t,centered:!0,shadow:"lg",withOverlay:!0,closeOnClickOutside:f,closeOnEscape:!1,onClose:()=>{R()},children:[g.jsxs(vt,{align:"center",children:[g.jsx(He,{children:m("recurringModal.repeatWith")}),g.jsx(Jy,{mx:20,maw:400,w:60,onChange:L=>l({...a,repeatValue:Number(L)}),value:y||1,min:1,hideControls:o,size:"xs",max:400,clampBehavior:"strict",onKeyUp:$}),g.jsx(uo,{size:"xs",w:100,onChange:L=>N(a,L),value:x,data:[{value:"days",label:lg(y||1,m("recurringModal.repeatTypes.day.1"),m("recurringModal.repeatTypes.day.2"),m("recurringModal.repeatTypes.day.3"))},{value:"weeks",label:lg(y||1,m("recurringModal.repeatTypes.week.1"),m("recurringModal.repeatTypes.week.2"),m("recurringModal.repeatTypes.week.3"))},{value:"months",label:lg(y||1,m("recurringModal.repeatTypes.month.1"),m("recurringModal.repeatTypes.month.2"),m("recurringModal.repeatTypes.month.3"))},{value:"years",label:lg(y||1,m("recurringModal.repeatTypes.year.1"),m("recurringModal.repeatTypes.year.2"),m("recurringModal.repeatTypes.year.3"))}]})]}),x==="weeks"&&g.jsx(fje,{onChange:L=>{l({...a,choosedWeekDays:L})},eventStart:r.start,choosedWeekDays:E}),x==="months"&&g.jsx(dje,{onChange:L=>{l({...a,...L})},eventStart:_n(r.start),dayNumber:D,choosedWeekDays:E,weekNumber:T,dayOfWeek:A}),x==="years"&&g.jsx(pje,{onChange:L=>{l({...a,...L})},eventStart:_n(r.start),dayNumber:D,choosedWeekDays:E,weekNumber:T,dayOfWeek:A}),g.jsxs(qs.Group,{value:w||"never",onChange:L=>{l(L==="date"?{...a,endEventRecurring:L,endDateEventRecurring:a.endDateEventRecurring||Es(r.start,{month:1})}:{...a,endEventRecurring:L})},mt:20,name:"favoriteFramework",label:m("recurringModal.radioGroup.label"),children:[g.jsx(vt,{align:"center",my:10,children:g.jsx(qs,{onKeyUp:$,size:"sm",value:"never",label:m("recurringModal.radioGroup.variants.never")})}),g.jsxs(vt,{justify:"space-between",align:"center",my:10,w:200,children:[g.jsx(qs,{onKeyUp:$,size:"sm",value:"date",label:m("recurringModal.radioGroup.variants.date")}),g.jsx(h3,{popoverProps:{withinPortal:!0,onChange:()=>{I(!0,200)}},onClickCapture:()=>{I(!f,0)},value:a.endDateEventRecurring||Es(r.start,{month:1}),onChange:L=>{l({...a,endDateEventRecurring:Pp(L)}),I(!0,200)},maw:400,w:110,minDate:r.start,size:"xs",valueFormat:"DD MMM YYYY",locale:v.language,disabled:w!=="date"})]}),g.jsxs(vt,{align:"center",my:10,children:[g.jsxs(vt,{w:200,align:"center",mr:10,justify:"space-between",children:[g.jsx(qs,{onKeyUp:$,size:"sm",value:"after",label:m("recurringModal.radioGroup.variants.after")}),g.jsx(Jy,{disabled:w!=="after",onChange:L=>{l({...a,endEventRecurringAfter:Number(L)}),d(String(L))},onKeyUp:$,maw:400,w:110,value:Number(c),min:1,allowNegative:!1,hideControls:o,size:"xs",max:100,clampBehavior:"strict"})]}),g.jsx(He,{children:lg(C||5,m("recurringModal.radioGroup.repeats.1"),m("recurringModal.radioGroup.repeats.2"),m("recurringModal.radioGroup.repeats.2"))})]})]}),g.jsx(Q_,{opened:!0,children:g.jsxs(wt,{justify:"flex-end",mt:"lg",gap:10,children:[g.jsx(en,{variant:"outline",onClick:R,children:m("buttons.cancel")}),g.jsx(en,{onClick:()=>{_(),e()},children:m("buttons.apply")})]})})]})})},cg={never:"never",days:"days",weeks:"weeks",months:"months",years:"years"},mje=t=>{const{setRecurring:e,event:n,open:r,close:s,opened:i,disabled:o}=t,{resource:{recurring:a}}=n,{repeatPeriod:l}=a,[c,d]=O.useState(null),{isMobile:f}=Yt(),{t:p}=yt();O.useEffect(()=>{if(l!==c&&d(l),l==="months")if(Number(a.dayNumber)>0){const y=rr(Lt(n.start),"day"),x=(a.dayNumber||0)<0&&qx(Lt(_n(n.start)));e({...a,dayNumber:y,choosedWeekDays:x?a.choosedWeekDays:null})}else{const y=Lt(n.start),x=2**rr(y,"dayOfWeek"),w=a.dayNumber===-1&&qx(Lt(_n(n.start))),C=a.weekNumber===-1&&FAe(y)?a.weekNumber:Ug(y);e({...a,dayNumber:w?a.dayNumber:null,dayOfWeek:w?a.dayOfWeek:x,weekNumber:w?a.weekNumber:C,choosedWeekDays:{[2**x]:""}})}if(l==="years")if(Number(a.dayNumber)>=0&&a.choosedWeekDays){const y=Lke(rr(n.start,"day"));e({...a,dayNumber:Ug(n.start),choosedWeekDays:{[2**y]:""},monthNumber:rr(n.start,"month")})}else{const y=St(n.start,"d"),x=(a.dayNumber||0)<0&&qx(Lt(_n(n.start)));e({...a,dayNumber:x?a.dayNumber:Number(y),choosedWeekDays:null,monthNumber:rr(n.start,"month")})}},[n.start,n.resource.recurring.repeatPeriod]);const m=y=>{y!=="never"?(r(),d(y)):e({...a,repeatPeriod:"never"})},v=()=>{d(l),s()};return g.jsx(sr,{className:ti({"date-timepicker-grid":f}),children:g.jsxs(sr.Col,{span:{lg:12,md:12,sm:12,xs:12},children:[g.jsx(uo,{miw:f?void 0:285,onChange:y=>{m(y)},disabled:o,value:l||"never",size:Ja,leftSection:g.jsx(J_,{size:"1em"}),data:[{value:cg.never,label:p("fullEventPage.recurringOptions.dontRepeat")},{value:cg.days,label:p("fullEventPage.recurringOptions.daily")},{value:cg.weeks,label:p("fullEventPage.recurringOptions.weekly")},{value:cg.months,label:p("fullEventPage.recurringOptions.monthly")},{value:cg.years,label:p("fullEventPage.recurringOptions.yearly")}]}),i&&g.jsx(hje,{repeatPeriodValue:c,setRecurring:e,close:v,opened:i,event:n})]})})},_U=t=>{const e=Ve.c(18),{event:n,opened:r,full:s,edit:i,disabled:o,modeEditEvents:a,openedTimeZone:l,setRecurring:c,open:d,close:f}=t,{t:p}=yt(),{isMobile:m}=Yt(),v=o||!1;let y;e[0]!==f||e[1]!==n||e[2]!==d||e[3]!==r||e[4]!==c||e[5]!==v?(y=g.jsx(mje,{event:n,setRecurring:c,open:d,close:f,opened:r,disabled:v}),e[0]=f,e[1]=n,e[2]=d,e[3]=r,e[4]=c,e[5]=v,e[6]=y):y=e[6];const x=y;let w;e[7]!==i||e[8]!==n||e[9]!==s||e[10]!==m||e[11]!==a||e[12]!==l||e[13]!==x||e[14]!==p?(w=s&&(i&&n.resource.recurring.recurringId&&a===js.AllEvents||!i||i&&!n.resource.recurring.recurringId?g.jsx(g.Fragment,{children:m?g.jsxs(g.Fragment,{children:[g.jsx(He,{size:"sm",children:p("fullEventPage.labels.repeat")}),x]}):g.jsx(sr.Col,{span:{lg:l||!s?8:6,md:12},children:x})}):null),e[7]=i,e[8]=n,e[9]=s,e[10]=m,e[11]=a,e[12]=l,e[13]=x,e[14]=p,e[15]=w):w=e[15];let C;return e[16]!==w?(C=g.jsx(g.Fragment,{children:w}),e[16]=w,e[17]=C):C=e[17],C},OU=t=>{const e=Object.values(t);let n="";return e.length===7?ct("fullEventPage.repeatTypes.allDays"):(Object.values(e).forEach(r=>{n+=ct(`fullEventPage.repeatTypes.fullWeekDays.${r}`)+", "}),n=n.slice(0,-2),n==="Суббота, Воскресенье"||n==="Saturday, Sunday"?ct("fullEventPage.repeatTypes.onWeekends"):n==="Понедельник, Вторник, Среда, Четверг, Пятница"||n==="Monday, Tuesday, Wednesday, Thursday, Friday"?ct("fullEventPage.repeatTypes.onWorkingDays"):n)},RU=(t,e,n,r,s,i,o,a,l)=>{if(t==="days"&&e===1)return a("fullEventPage.repeatTypes.daily");if(t==="days"&&e>1)return`${a("fullEventPage.repeatTypes.everyDay")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.day")}`;if(t==="weeks"&&e===1&&n&&typeof n=="object")return`${a("fullEventPage.repeatTypes.weekly")} - ${OU(n)}`;if(t==="weeks"&&e>1&&n&&typeof n=="object")return`${a("fullEventPage.repeatTypes.everyWeek")} ${lu(e,Ln.language,"ю")} ${a("fullEventPage.repeatTypes.week")} - ${OU(n)}`;const c=Ug(Lt(r));return t==="months"&&e===1?Number(s)===-1?a("fullEventPage.repeatTypes.everyMonthLastDay"):Number(o)>=0&&i===-1?`${a("fullEventPage.repeatTypes.monthly")}, ${a("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(r,"E",!1,l)),!1,a)} ${St(r,"EEEE",!1,l)}`:Number(o)>=0&&Number(i)>0?`${a("fullEventPage.repeatTypes.monthly")}, ${c}-${gl(Number(St(r,"E",!1,l)),!0,a)} ${St(r,"EEEE",!1,l)}`:`${a("fullEventPage.repeatTypes.monthly")} ${St(r,"dd MMMM",!1,l)}`:t==="months"&&e>1?s===-1?`${a("fullEventPage.repeatTypes.everyMonth")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.month")}, ${a("fullEventPage.repeatTypes.lastDay")} ${St(r,"MMMM",!1,l)}`:Number(o)>=0&&i===-1?`${a("fullEventPage.repeatTypes.everyMonth")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.month")}, ${a("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(r,"E",!1,l)),!1,a)} ${St(r,"EEEE",!1,l)}`:Number(o)>=0&&Number(i)>0?`${a("fullEventPage.repeatTypes.everyMonth")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.month")}, ${c}-${gl(Number(St(r,"E")),!0,a)} ${St(r,"EEEE")}`:`${a("fullEventPage.repeatTypes.everyMonth")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.month")}, ${St(r,"dd MMMM",!1,l)}`:t==="years"&&e===1?Number(s)===-1&&n===null?`${a("fullEventPage.repeatTypes.yearly")}, ${a("fullEventPage.repeatTypes.lastDay")} ${St(r,"MMMM",!1,l)}`:s>0&&n?`${a("fullEventPage.repeatTypes.yearly")}, ${c}-${gl(Number(St(r,"E")),!0,a)} ${St(r,"EEEE")} ${St(r,"MMMM")}`:n?`${a("fullEventPage.repeatTypes.yearly")}, ${a("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(r,"E",!1,l)),!1,a)} ${St(r,"EEEE MMMM",!1,l)}`:`${a("fullEventPage.repeatTypes.yearly")} ${St(r,"dd MMMM",!1,l)}`:t==="years"&&e>1?s===-1&&n===null?`${a("fullEventPage.repeatTypes.everyYear")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.year")}, ${a("fullEventPage.repeatTypes.lastDay")} ${St(r,"MMMM",!1,l)}`:n&&s>0?`${a("fullEventPage.repeatTypes.everyYear")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.year")}, ${c}-${gl(Number(St(r,"E",!1,l)),!0,a)} ${St(r,"EEEE MMMM",!1,l)}`:n?`${a("fullEventPage.repeatTypes.everyYear")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.year")}, ${a("fullEventPage.repeatTypes.declinations.init")}${gl(Number(St(r,"E",!1,l)),!1,a)} ${St(r,"EEEE MMMM",!1,l)}`:`${a("fullEventPage.repeatTypes.everyYear")} ${lu(e,Ln.language)} ${a("fullEventPage.repeatTypes.year")}, ${St(r,"dd MMMM",!1,l)}`:""},NU=(t,e,n,r,s)=>t==="date"?`, ${r("fullEventPage.repeatTypes.until")} ${St(_n(e),"dd MMM yyyy",!1,s)}`:t==="after"?`, ${lg(n,`%d ${r("fullEventPage.repeatTypes.plurals.one")}`,`%d ${r("fullEventPage.repeatTypes.plurals.other")}`,`%d ${r("fullEventPage.repeatTypes.plurals.zero")}`)}`:"",loe=t=>{const e=Ve.c(49),{event:n,open:r,isInfo:s}=t,{resource:i}=n,{recurring:o}=i,{isMobile:a}=Yt(),{t:l,i18n:c}=yt(),{repeatValue:d,repeatPeriod:f,endEventRecurring:p,endDateEventRecurring:m,endEventRecurringAfter:v,choosedWeekDays:y,dayNumber:x,weekNumber:w,dayOfWeek:C}=o;if(f===null||f==="never")return null;const E=a?"sm":"md";let D;e[0]!==l?(D=l("fullEventPage.repeats"),e[0]=l,e[1]=D):D=e[1];const T=`${D}${a?"":":"}`;let A;e[2]!==E||e[3]!==T?(A=g.jsx(He,{size:E,children:T}),e[2]=E,e[3]=T,e[4]=A):A=e[4];const _=a?"sm":"md",R=d||1;let N;e[5]!==y||e[6]!==x||e[7]!==C||e[8]!==n.start||e[9]!==c.language||e[10]!==f||e[11]!==l||e[12]!==R||e[13]!==w?(N=RU(f,R,y,_n(n.start),Number(x),w,C,l,c.language),e[5]=y,e[6]=x,e[7]=C,e[8]=n.start,e[9]=c.language,e[10]=f,e[11]=l,e[12]=R,e[13]=w,e[14]=N):N=e[14];let I;e[15]!==m?(I=m||new Date,e[15]=m,e[16]=I):I=e[16];const $=v||5;let L;e[17]!==p||e[18]!==c.language||e[19]!==l||e[20]!==$||e[21]!==I?(L=NU(p,I,$,l,c.language),e[17]=p,e[18]=c.language,e[19]=l,e[20]=$,e[21]=I,e[22]=L):L=e[22];let z;e[23]!==L||e[24]!==_||e[25]!==N?(z=g.jsxs(He,{c:"blue.5",size:_,children:[N,L]}),e[23]=L,e[24]=_,e[25]=N,e[26]=z):z=e[26];let F;e[27]!==r||e[28]!==z?(F=g.jsx(or,{onClick:r,children:z}),e[27]=r,e[28]=z,e[29]=F):F=e[29];let q;e[30]!==F||e[31]!==A?(q=g.jsxs(g.Fragment,{children:[A,F]}),e[30]=F,e[31]=A,e[32]=q):q=e[32];const H=q;let B;return e[33]!==y||e[34]!==x||e[35]!==C||e[36]!==m||e[37]!==p||e[38]!==v||e[39]!==n.start||e[40]!==c.language||e[41]!==s||e[42]!==a||e[43]!==H||e[44]!==f||e[45]!==d||e[46]!==l||e[47]!==w?(B=s?g.jsx(wt,{w:300,children:g.jsxs(He,{children:[RU(f,d||1,y,n.start,Number(x),w,C,l,c.language),NU(p,m||Es(new Date,{month:1}),v||5,l,c.language)]})}):g.jsx(g.Fragment,{children:a?H:g.jsx(wt,{gap:"xs",children:H})}),e[33]=y,e[34]=x,e[35]=C,e[36]=m,e[37]=p,e[38]=v,e[39]=n.start,e[40]=c.language,e[41]=s,e[42]=a,e[43]=H,e[44]=f,e[45]=d,e[46]=l,e[47]=w,e[48]=B):B=e[48],B},jU=t=>{const e=Ve.c(11),{event:n,disabled:r,open:s,modeEditEvents:i,edit:o}=t,{isMobile:a}=Yt();let l;e[0]!==n||e[1]!==s?(l=g.jsx(loe,{open:s,event:n}),e[0]=n,e[1]=s,e[2]=l):l=e[2];const c=l;let d;e[3]!==r||e[4]!==o||e[5]!==a||e[6]!==i||e[7]!==c?(d=(!r&&o&&i===js.AllEvents||!r&&!o)&&g.jsx(g.Fragment,{children:a?c:g.jsx(sr.Col,{span:12,children:c})}),e[3]=r,e[4]=o,e[5]=a,e[6]=i,e[7]=c,e[8]=d):d=e[8];let f;return e[9]!==d?(f=g.jsx(g.Fragment,{children:d}),e[9]=d,e[10]=f):f=e[10],f},IU=t=>{const e=Ve.c(10),{openedTimeZone:n,isAllDay:r,disabled:s,full:i,event:o,setIsAllDay:a,timezoneToggle:l}=t,{t:c}=yt(),{isMobile:d}=Yt(),{resource:f}=o,{isAllDayWithoutTime:p}=f;let m;return e[0]!==s||e[1]!==i||e[2]!==r||e[3]!==p||e[4]!==d||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==l?(m=g.jsx(g.Fragment,{children:d?g.jsxs(g.Fragment,{children:[!n&&g.jsxs(g.Fragment,{children:[g.jsx(He,{size:"sm",children:c("buttons.allDay")}),g.jsx("div",{className:"switch-mobile",children:g.jsx(Lp,{size:"md",checked:r,onChange:v=>a(v.currentTarget.checked),disabled:s})})]}),!r&&i&&g.jsxs(g.Fragment,{children:[g.jsx(He,{size:"sm",children:c("fullEventPage.labels.timezone")}),g.jsx("div",{className:"switch-mobile",children:g.jsx(Lp,{size:"md",checked:n,onChange:l,disabled:s})})]})]}):g.jsxs("div",{className:"switches-wrapper",children:[!n&&g.jsx(Lp,{size:"sm",checked:p||!1,onChange:v=>a(v.currentTarget.checked),label:c("buttons.allDay"),disabled:s}),!p&&i&&g.jsx(Lp,{size:"sm",checked:n,onChange:l,label:c("fullEventPage.labels.timezone"),disabled:s})]})}),e[0]=s,e[1]=i,e[2]=r,e[3]=p,e[4]=d,e[5]=n,e[6]=a,e[7]=c,e[8]=l,e[9]=m):m=e[9],m},gje=({value:t,disabled:e,onChange:n,placeholder:r,description:s="",withAutoWidth:i})=>{const o=ve(Cv),{isMobile:a}=Yt(),l=O.useMemo(()=>Object.values(o).sort((d,f)=>d.utcOffsetMinutes-f.utcOffsetMinutes),[]);return g.jsx(t3,{searchable:!a,disabled:e||!1,placeholder:r,description:s,rightSection:g.jsx(_$,{size:"1em"}),rightSectionWidth:30,onChange:n,value:t,data:l,withAutoWidth:a?!1:i})},vje=t=>{const e=Ve.c(7),{option:n}=t;let r;e[0]!==n.label?(r=g.jsx(He,{size:"sm",children:n.label}),e[0]=n.label,e[1]=r):r=e[1];let s;e[2]!==n.duration?(s=n.duration&&g.jsxs(He,{size:"sm",style:{whiteSpace:"nowrap"},children:["(",n.duration,")"]}),e[2]=n.duration,e[3]=s):s=e[3];let i;return e[4]!==r||e[5]!==s?(i=g.jsx(le,{w:"50px",children:g.jsxs(wt,{wrap:"nowrap",children:[r,s]})}),e[4]=r,e[5]=s,e[6]=i):i=e[6],i},yje=(t,e)=>{const n=Object.keys(e);if(e[t]||!n.length)return t;const[r]=t.split(":"),[,s]=n[0].split(":");return`${r}:${String(s).padStart(2,"0")}`},bje=(t,e)=>t?t&&!e?`${t} ${ct("timeIndicators.hours")}`:`${t},5 ${ct("timeIndicators.hours")}`:`${e} ${ct("timeIndicators.minutes")}`,xje=(t=new Date,e)=>{const{dataSelect:n,keys:r}=O.useMemo(()=>{const s=[];let i={};if(!e){const o=["00","15","30","45"];for(let a=0;a<24;a++)for(let l=0;l<o.length;l++){const c=`${String(a).padStart(2,"0")}:${o[l]}`;s.push({label:c,value:c}),i[c]=!0}}if(e&&t instanceof Date){const o=rr(t,"hour");let l=rr(t,"minute"),c=0,d=new Date(t);for(let f=o;f<24;f++){let p=f===o;for(let m=0;m<(p?4:2);m++){m===0&&o-f===o&&(p=!0),d=Es(d,{minute:c});const v=d.getHours(),y=`${String(v).padStart(2,"0")}:${String(l).padStart(2,"0")}`,x=$_(t,d);if(v===0&&o)break;s.push({label:y,value:y,duration:bje(Number(x.hours),Number(x.minutes))}),i[y]=!0,p?(c=15,l<45?l+=15:l=l-45):(c=30,l<30?l+=30:l=l-30)}}}return{dataSelect:s,keys:i}},[t,e]);return{dataSelect:n,keys:r}},Sje=()=>{const t=navigator.userAgent.toLowerCase(),e=t.includes("safari")&&!t.includes("chrome"),n=t.includes("firefox");return{mainAxis:0,crossAxis:e||n?-33:-25}},wje=Sje(),q$=t=>{const[e,n]=O.useState(t.time),r=O.useRef(null),{isMobile:s}=Yt(),{start:i,end:o,disabled:a,startTimeZone:l,endTimeZone:c,size:d=Ja,offset:f=wje}=t;let p=!1,m="",v=i;if(i&&o&&c&&l){const{hours:w,minutes:C}=$_(Vq(new Date,c),Vq(new Date,l));v=cv(i,{hour:w,minute:C})}i instanceof Date&&v instanceof Date&&(p=co(i,o??i,"day"));const{dataSelect:y,keys:x}=xje(v,p);return O.useEffect(()=>{n(t.time)},[t.time]),g.jsxs(vt,{px:10,className:`time-picker-wrapper ${a&&"disabledTimePiker"}`,style:{background:a?"#f7f8f9":"transparent",position:"relative",height:d==="xs"?30:"unset"},align:"center",justify:"space-between",pr:0,children:[g.jsx(P$,{miw:55,ta:"center",variant:"unstyled",classNames:{input:"timePickerInput"},disabled:a,value:e,onChange:w=>{if(!w.target.value){const[C,E]=e.split(":");m==="minutes"&&n(`${C}:00`),m==="hours"&&n(`00:${E}`);return}n(w.target.value)},onBlur:()=>t.setTime(e),onClick:w=>{var C;s?w.nativeEvent.offsetX<25||w.nativeEvent.offsetX>44?m="hours":m="minutes":(C=r.current)==null||C.click()},step:900,min:"00:00",max:"23:59",pattern:"[0-9]{2}:[0-9]{2}",size:d,inputSize:d,required:!0}),!s&&g.jsx(uo,{width:100,ref:r,w:20,disabled:a,renderOption:vje,value:yje(e,x),onChange:t.setTime,rightSection:g.jsx(t4e,{size:16,stroke:1.5}),comboboxProps:{width:p?"150px !important":"100px !important",position:"bottom",offset:f},data:y})]})},LU=t=>{var W,Z;const e=Ve.c(44),{time:n,date:r,setDate:s,setTime:i,isAllDay:o,end:a,start:l,disabled:c,handleSetTimeZone:d,timeZoneId:f,full:p,openedTimeZone:m,timeZones:v,event:y}=t,{resource:x}=y,{startTimeZoneId:w,endTimeZoneId:C}=x,{isMobile:E}=Yt(),{i18n:D}=yt(),T=m?8:12;let A;e[0]!==E?(A=ti({"date-timepicker-grid":E}),e[0]=E,e[1]=A):A=e[1];const _=E&&m?0:void 0;let R;e[2]!==T?(R={lg:T,md:T,sm:T,xs:12},e[2]=T,e[3]=R):R=e[3];const N=E?100:160,I=D.language;let $;e[4]===Symbol.for("react.memo_cache_sentinel")?($={withinPortal:!0},e[4]=$):$=e[4];let L;e[5]===Symbol.for("react.memo_cache_sentinel")?(L={flex:1},e[5]=L):L=e[5];let z;e[6]!==s?(z=AS(s),e[6]=s,e[7]=z):z=e[7];let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(mie,{size:"1em"}),e[8]=F):F=e[8];let q;e[9]!==r||e[10]!==c||e[11]!==D.language||e[12]!==N||e[13]!==z?(q=g.jsx(h3,{w:"webkit-fill-available",miw:N,h:36,locale:I,popoverProps:$,value:r,style:L,onChange:z,rightSection:F,rightSectionPointerEvents:"none",pointer:!0,valueFormat:"dd DD.MM.YYYY",disabled:c}),e[9]=r,e[10]=c,e[11]=D.language,e[12]=N,e[13]=z,e[14]=q):q=e[14];let H;e[15]!==c||e[16]!==a||e[17]!==C||e[18]!==o||e[19]!==i||e[20]!==l||e[21]!==w||e[22]!==n||e[23]!==v?(H=!o&&g.jsx(q$,{disabled:c,time:n,end:a,setTime:i,start:l,startTimeZone:(W=v[w||1])==null?void 0:W.tzName,endTimeZone:(Z=v[C||1])==null?void 0:Z.tzName}),e[15]=c,e[16]=a,e[17]=C,e[18]=o,e[19]=i,e[20]=l,e[21]=w,e[22]=n,e[23]=v,e[24]=H):H=e[24];let B;e[25]!==q||e[26]!==H?(B=g.jsxs(vt,{w:"100%",wrap:"nowrap",gap:10,children:[q,H]}),e[25]=q,e[26]=H,e[27]=B):B=e[27];let V;e[28]!==B||e[29]!==_||e[30]!==R?(V=g.jsx(sr.Col,{pb:_,span:R,children:B}),e[28]=B,e[29]=_,e[30]=R,e[31]=V):V=e[31];let Y;e[32]!==c||e[33]!==p||e[34]!==d||e[35]!==o||e[36]!==E||e[37]!==m||e[38]!==f?(Y=!o&&p&&m&&g.jsx(sr.Col,{pl:E?void 0:2,span:{lg:4,md:4,sm:4,xs:12},children:g.jsx(gje,{withAutoWidth:!0,disabled:c,placeholder:"",onChange:d,value:String(f)})}),e[32]=c,e[33]=p,e[34]=d,e[35]=o,e[36]=E,e[37]=m,e[38]=f,e[39]=Y):Y=e[39];let G;return e[40]!==A||e[41]!==V||e[42]!==Y?(G=g.jsxs(sr,{className:A,children:[V,Y]}),e[40]=A,e[41]=V,e[42]=Y,e[43]=G):G=e[43],G},PU=t=>{const e=Ve.c(48),{event:n,timeStart:r,timeEnd:s,full:i,openedTimeZone:o,edit:a,disabled:l,modeEditEvents:c,setIsAllDay:d,handleSetStart:f,handleSetTimeStart:p,handleSetTimeZoneStart:m,handleSetEvent:v,setRecurring:y,handleSetEnd:x,handleSetTimeEnd:w,handleSetTimeZoneEnd:C,timeZones:E}=t,{start:D,end:T,resource:A}=n,{startTimeZoneId:_,endTimeZoneId:R,isAllDayWithoutTime:N}=A,{t:I}=yt(),{isMobile:$}=Yt();let L;e[0]!==$||e[1]!==I?(L=$&&g.jsx(He,{size:"sm",children:I("fullEventPage.labels.startCalendar")}),e[0]=$,e[1]=I,e[2]=L):L=e[2];const z=D,F=N||!1,q=l||!1;let H;e[3]!==a||e[4]!==n||e[5]!==i||e[6]!==v||e[7]!==f||e[8]!==p||e[9]!==m||e[10]!==c||e[11]!==o||e[12]!==d||e[13]!==y||e[14]!==_||e[15]!==z||e[16]!==F||e[17]!==q||e[18]!==r||e[19]!==E?(H=g.jsx(LU,{time:r,date:z,setDate:f,setTime:p,isSwitch:!0,handleSetTimeZone:m,handleSetEvent:v,setRecurring:y,setIsAllDay:d,full:i,isAllDay:F,openedTimeZone:o,event:n,edit:a,disabled:q,modeEditEvents:c,timeZoneId:_,timeZones:E}),e[3]=a,e[4]=n,e[5]=i,e[6]=v,e[7]=f,e[8]=p,e[9]=m,e[10]=c,e[11]=o,e[12]=d,e[13]=y,e[14]=_,e[15]=z,e[16]=F,e[17]=q,e[18]=r,e[19]=E,e[20]=H):H=e[20];let B;e[21]!==$||e[22]!==I?(B=$&&g.jsx(He,{size:"sm",children:I("fullEventPage.labels.endCalendar")}),e[21]=$,e[22]=I,e[23]=B):B=e[23];const V=N||!1,Y=T,G=D,W=T,Z=l||!1;let Q;e[24]!==a||e[25]!==R||e[26]!==n||e[27]!==i||e[28]!==x||e[29]!==v||e[30]!==w||e[31]!==C||e[32]!==c||e[33]!==o||e[34]!==y||e[35]!==Z||e[36]!==V||e[37]!==Y||e[38]!==G||e[39]!==W||e[40]!==s||e[41]!==E?(Q=g.jsx(LU,{handleSetEvent:v,isAllDay:V,time:s,date:Y,setDate:x,setTime:w,handleSetTimeZone:C,start:G,end:W,setRecurring:y,full:i,event:n,timeZoneId:R,openedTimeZone:o,edit:a,disabled:Z,modeEditEvents:c,timeZones:E}),e[24]=a,e[25]=R,e[26]=n,e[27]=i,e[28]=x,e[29]=v,e[30]=w,e[31]=C,e[32]=c,e[33]=o,e[34]=y,e[35]=Z,e[36]=V,e[37]=Y,e[38]=G,e[39]=W,e[40]=s,e[41]=E,e[42]=Q):Q=e[42];let X;return e[43]!==L||e[44]!==Q||e[45]!==H||e[46]!==B?(X=g.jsxs(g.Fragment,{children:[L,H,B,Q]}),e[43]=L,e[44]=Q,e[45]=H,e[46]=B,e[47]=X):X=e[47],X},coe=({startTimeZoneId:t,start:e,end:n,TimeZones:r,endTimeZoneId:s})=>{var a,l;const i=t?_n(e,(a=r[t])==null?void 0:a.tzName):e,o=s?_n(n,(l=r[s])==null?void 0:l.tzName):n;return[i,o]},Cje=({startTimeZoneId:t,start:e,end:n,TimeZones:r,endTimeZoneId:s})=>{const[i,o]=coe({startTimeZoneId:t,start:e,end:n,TimeZones:r,endTimeZoneId:s});return q1(i,o)?t:s},Eje=({startTimeZoneId:t,start:e,end:n,TimeZones:r,endTimeZoneId:s})=>{const[i,o]=coe({startTimeZoneId:t,start:e,end:n,TimeZones:r,endTimeZoneId:s});return ga(i,o)?t:s},tD=t=>`${t<10?"0":""}${t}`,Mje=t=>{var ce;const{event:e,handleSetEvent:n,full:r,edit:s,disabled:i=!1,modeEditEvents:o,setModeEditEvents:a}=t,{start:l,end:c,resource:d}=e,{isAllDayWithoutTime:f,startTimeZoneId:p,endTimeZoneId:m}=d,v=ve(Cv),y=ve(Zse),[x,{open:w,close:C}]=Ps(!1),[E,D]=O.useState(!1),[T,A]=O.useState({hour:1,minute:0}),{t:_}=yt(),{isMobile:R,isTablet:N}=Yt(),I=rr(l,"minute"),$=rr(c,"minute"),L=rr(l,"hour"),z=rr(c,"hour"),F=`${tD(L)}:${tD(I)}`,q=`${tD(z)}:${tD($)}`,[H,{toggle:B}]=Ps(!1);O.useEffect(()=>{const ue=p!==(y==null?void 0:y.Id)||m!==(y==null?void 0:y.Id);p&&m&&ue&&!H&&r&&(B(),D(!0))},[p,m,r]);const V=O.useCallback(ue=>{qe.isNil(ue)||(q1(ue,c)?n({...e,start:xr(ue,{hour:L,minute:I}),end:xr(ue,{hour:L+1,minute:I})}):n("start",xr(ue,{hour:L,minute:I})))},[n,c,L,I,e]),Y=O.useCallback(ue=>{qe.isNil(ue)||(ga(ue,l)?n({...e,start:xr(ue,{hour:z-1,minute:$}),end:xr(ue,{hour:z,minute:$})}):n("end",xr(ue,{hour:z,minute:$})))},[n,l,z,$,e]),G=O.useCallback(ue=>{if(qe.isNil(ue))return;const[pe,de]=ue.split(":"),me=xr(l,{hour:Number(pe),minute:Number(de)}),Se=l.getHours(),De=l.getMinutes();if(Number(pe)!==Se||Number(de)!==De)if(co(l,c,"day"))n({...e,start:me,end:Es(me,T)});else{const Ae=xr(c,{hour:Number(pe),minute:Number(de)});n({...e,start:me,end:Es(Ae,T)})}},[n,c,z,$,l,e,T]),W=O.useCallback(ue=>{if(qe.isNil(ue))return;const[pe,de]=ue.split(":"),me=xr(c,{hour:Number(pe),minute:Number(de)});if(co(l,c,"day")&&(Number(pe)<L||Number(pe)===L&&Number(de)<I)){const Se=xr(c,{hour:Number(pe),minute:Number(de)});n({...e,start:Se,end:xr(Se,{minute:30})})}else if(co(l,c,"day")){const Se=LAe(l,me);A(Se),n({...e,end:Es(l,Se)})}else n({...e,end:me})},[n,c,l,L,I,e]),Z=O.useCallback(ue=>{const pe=Cje({startTimeZoneId:Number(ue),start:l,end:c,TimeZones:v,endTimeZoneId:m});n({...e,resource:{...e.resource,startTimeZoneId:Number(ue),endTimeZoneId:pe}})},[e]),Q=O.useCallback(ue=>{const pe=Eje({startTimeZoneId:p,start:l,end:c,TimeZones:v,endTimeZoneId:Number(ue)});n({...e,resource:{...e.resource,startTimeZoneId:pe,endTimeZoneId:Number(ue)}})},[e]),X=O.useCallback(ue=>{n("resource",{...d,recurring:{...ue}})},[n,d]),re=ue=>{const pe={...e,resource:{...e.resource,isAllDayWithoutTime:ue}};if(ue)n(pe);else{const de=e.allDay?xr(l,{hour:10,minute:0}):l,me=e.allDay?xr(c,{hour:11,minute:0}):c;n({...pe,allDay:!1,end:me,start:de})}},ne=O.useMemo(()=>!H||!f&&r,[H,f]),ee=()=>{n({...e,resource:{...e.resource,startTimeZoneId:(y==null?void 0:y.Id)||1,endTimeZoneId:(y==null?void 0:y.Id)||1}}),D(!1)},oe=!1;return g.jsxs("div",{className:R?"datepicker-container-mobile":void 0,children:[R&&g.jsx(IU,{event:e,openedTimeZone:H,isAllDay:f||!1,disabled:i,full:r,setIsAllDay:re,timezoneToggle:B}),R?g.jsxs(g.Fragment,{children:[g.jsx(PU,{event:e,full:r,timeStart:F,timeEnd:q,handleSetStart:V,handleSetTimeStart:G,handleSetTimeZoneStart:Z,setRecurring:X,handleSetEvent:n,setIsAllDay:re,handleSetEnd:Y,handleSetTimeEnd:W,handleSetTimeZoneEnd:Q,openedTimeZone:H,modeEditEvents:o,disabled:i,edit:s,timeZones:v}),!r&&g.jsxs(g.Fragment,{children:[g.jsx(He,{size:"sm",children:_("fullEventPage.labels.place")}),g.jsx(Pn,{onChange:ue=>{n({...e,resource:{...d,location:ue.target.value}})},size:Ja,value:d.location||"",disabled:i,placeholder:_("placeholders.location")}),g.jsx(He,{size:"sm",children:_("fullEventPage.labels.calendar")}),g.jsx(n3,{disabled:i,edit:s,event:e,full:!1,handleSetEvent:n})]}),g.jsx(_U,{close:C,open:w,event:e,setRecurring:X,opened:x,disabled:i,full:r,edit:s,modeEditEvents:o,openedTimeZone:H}),g.jsx(jU,{open:w,event:e,opened:x,disabled:i,edit:s}),g.jsx(EU,{isCountEventsDisabled:oe,event:e,opened:x,edit:s,modeEditEvents:o,setModeEditEvents:a})]}):g.jsxs(g.Fragment,{children:[g.jsx(qa,{isMobile:R,additionalClassname:r&&s?"datetimepicker-row":void 0,align:"flex-start",icon:g.jsx(le,{pt:9,children:g.jsx(R$,{className:"icon",size:"1em"})}),children:g.jsxs(sr,{gutter:"xs",w:"100%",children:[g.jsx(sr.Col,{span:{xs:r?12:8,md:H||!r?8:6},children:g.jsx(PU,{event:e,timeStart:F,timeEnd:q,full:r,handleSetStart:V,handleSetEnd:Y,handleSetTimeStart:G,handleSetTimeZoneStart:Z,setRecurring:X,handleSetEvent:n,setIsAllDay:re,handleSetTimeEnd:W,handleSetTimeZoneEnd:Q,openedTimeZone:H,modeEditEvents:o,disabled:i,edit:s,timeZones:v})}),ne&&!R&&g.jsx(sr.Col,{span:{xs:r?12:4,md:H||!r?4:6},children:g.jsx(IU,{event:e,openedTimeZone:H,isAllDay:f||!1,disabled:i,full:r,setIsAllDay:re,timezoneToggle:B})}),g.jsx(_U,{close:C,open:w,event:e,setRecurring:X,opened:x,disabled:i,full:r,edit:s,modeEditEvents:o,openedTimeZone:H}),g.jsx(jU,{open:w,event:e,opened:x,disabled:i,edit:s,modeEditEvents:o}),N&&g.jsx(EU,{isCountEventsDisabled:oe,event:e,opened:x,edit:s,modeEditEvents:o,setModeEditEvents:a})]})}),!r&&g.jsx(qa,{icon:g.jsx(le,{pt:9,children:g.jsx(N$,{className:"icon",size:"1em"})}),align:"flex-start",topSpacing:0,children:g.jsx(sr,{w:"100%",children:g.jsx(sr.Col,{pr:"6",span:8,children:g.jsx(Pn,{onChange:ue=>{n({...e,resource:{...d,location:ue.target.value}})},size:Ja,value:d.location||"",disabled:i,placeholder:_("placeholders.location")})})})})]}),g.jsx(Eh,{opened:!H&&E,handleConfirm:ee,handleCancel:B,data:{...uNe,text:`${_("confirmations.resetTimeZone.description")} "${(ce=v[(y==null?void 0:y.Id)||1])==null?void 0:ce.label}"`}})]})};function uoe(t){const e=Ve.c(35),{event:n,handleSetEvent:r,full:s,hasError:i,edit:o,modeEditEvents:a,setModeEditEvents:l,handleSubmitEvent:c}=t,{isMobile:d}=Yt(),f=Il(n.resource),{t:p}=yt(),m=f===mt.Read||f===mt.FreeBusy;if(!n.start)return null;let v;e[0]!==c||e[1]!==i?(v=R=>{i||R.key==="Enter"&&c()},e[0]=c,e[1]=i,e[2]=v):v=e[2];const y=v,x=n.title||"";let w;e[3]!==r?(w=R=>{r("title",R.target.value)},e[3]=r,e[4]=w):w=e[4];let C;e[5]!==p?(C=p("fullEventPage.namePlaceholder"),e[5]=p,e[6]=C):C=e[6];let E;e[7]!==m||e[8]!==y||e[9]!==x||e[10]!==w||e[11]!==C?(E=g.jsx(Q_,{opened:!0,children:g.jsx(Pn,{size:Ja,disabled:m,value:x,onChange:w,onKeyUp:y,placeholder:C,maxLength:200,"data-autofocus":!0})}),e[7]=m,e[8]=y,e[9]=x,e[10]=w,e[11]=C,e[12]=E):E=e[12];let D;e[13]!==d||e[14]!==E?(D=g.jsx(qa,{isMobile:d,align:"center",topSpacing:0,children:E}),e[13]=d,e[14]=E,e[15]=D):D=e[15];let T;e[16]!==m||e[17]!==o||e[18]!==n||e[19]!==s||e[20]!==r||e[21]!==a||e[22]!==l?(T=g.jsx(Mje,{disabled:m,edit:o,full:s,handleSetEvent:r,event:n,modeEditEvents:a,setModeEditEvents:l}),e[16]=m,e[17]=o,e[18]=n,e[19]=s,e[20]=r,e[21]=a,e[22]=l,e[23]=T):T=e[23];let A;e[24]!==m||e[25]!==o||e[26]!==n||e[27]!==s||e[28]!==r||e[29]!==d?(A=!s&&!d&&g.jsx(qa,{icon:g.jsx(le,{pt:9,children:g.jsx(Z_,{className:"icon",size:16})}),align:"flex-start",topSpacing:8,children:g.jsx(sr,{w:"100%",children:g.jsx(sr.Col,{pr:"6",span:8,children:g.jsx(n3,{disabled:m,edit:o,event:n,full:!1,handleSetEvent:r})})})}),e[24]=m,e[25]=o,e[26]=n,e[27]=s,e[28]=r,e[29]=d,e[30]=A):A=e[30];let _;return e[31]!==D||e[32]!==T||e[33]!==A?(_=g.jsxs(le,{className:"create-event-modal-wrapper",children:[D,T,A]}),e[31]=D,e[32]=T,e[33]=A,e[34]=_):_=e[34],_}var U$=(t=>(t[t.Asc=0]="Asc",t[t.Desc=1]="Desc",t))(U$||{});const doe=async(t,e,n,r,s)=>{const i=t().calendar.calendarsIds,o=t().calendar.calendarsGroupById,l=await C$({CalendarIds:i,StartDate:e,EndDate:n,Count:r,Order:s}).then(({data:c})=>c);return{calendarsIds:i,calendarsGroupById:o,startDate:e,endDate:n,response:l,count:r,order:s}},qw=sn("events/getEventListEventsPrevThunk",async(t=void 0,{getState:e})=>{const n=e().eventList.loadedRangeStartDate;if(qe.isNil(n))return console.error("Missing date range"),null;const r=new Date(n),s=cv(r,{seconds:1}),i=qe.isNil(t)?null:t,o=qe.isNil(t)?25:void 0;return doe(e,i,s,o,U$.Desc)}),Uw=sn("events/getEventListEventsNextThunk",async(t=void 0,{getState:e})=>{const n=e().eventList.loadedRangeEndDate;if(qe.isNil(n))return console.error("Missing date range"),null;const r=new Date(n),s=Es(r,{seconds:1}),i=qe.isNil(t)?null:t,o=qe.isNil(t)?25:void 0;return doe(e,s,i,o)}),Lu={yyyyMMdd:"yyyyMMdd",yyyyMM:"yyyyMM"};function V$(t){return St(t,Lu.yyyyMMdd)}function foe(t){return`${t.id}__${t.start.toISOString()}__${t.end.toISOString()}`}function NL(t,e){return Sp(t,e,null).reduce((s,i)=>{const o=nt.fromJSDate(i.start),a=nt.fromJSDate(i.end),l=a.diff(o.startOf("day"),"days").toObject().days??1;if(l<=1)return[...s,i];const c=[...Array(Math.ceil(l))].map((d,f)=>{const p=JSON.parse(JSON.stringify(i));return p.start=o.plus({days:f}).toJSDate(),p.end=a.minus({days:f}).toJSDate(),p.allDay=!0,p});return[...s,...c]},[])}class Dje{constructor(e,n,r,s){this.isBeforeEventTimeLineDisplayed=e,this.isAfterEventTimeLineDisplayed=n,this.isConnectingLineVisible=r,this.event=s}}class Gg{constructor(e,n,r){op(this,"heightPx",W$.month);this.value=e,this.label=n,this.monthIndex=r}}class r1{constructor(e,n,r,s,i,o){op(this,"heightPx",W$.event);this.value=e,this.date=n,this.day=r,this.weekday=s,this.isCurrentDayToday=i,this.isFirstEventOfDay=o}}class s1{constructor(e,n,r,s,i,o){op(this,"heightPx",W$.event);this.value=e,this.date=n,this.day=r,this.weekday=s,this.isCurrentDayToday=i,this.isFirstEventOfDay=o}}const bu={month:{heightPx:112,marginBottomPx:10,paddingTopPx:12},event:{heightPx:30,marginBottomPx:8}},W$={month:bu.month.heightPx+bu.month.marginBottomPx+bu.month.paddingTopPx,event:bu.event.heightPx+bu.event.marginBottomPx};function kje(t){const e={};return t.forEach(n=>{const r=V$(n.start),s=r.substring(0,6);qe.isNil(e[s])&&(e[s]={datesOrder:[],eventsByDate:{}}),qe.isNil(e[s].eventsByDate[r])&&(e[s].eventsByDate[r]=[],e[s].datesOrder.push(r)),e[s].eventsByDate[r].push(n)}),e}function Y$(t,e){const n=ag(t),r=[];qe.isEmpty(n.months)||(n.months.forEach(s=>{r.push(s);const i=n.eventsByMonth[s.value];qe.isEmpty(i)||i.datesOrder.forEach(o=>{const a=uT(o,Lu.yyyyMMdd),l=o.substring(o.length-2),c=qe.capitalize(St(a,"EEE",!1,e.payload)),d=zAe(a),f=i.eventsByDate[o],p=f.filter(({allDay:y})=>y),m=f.filter(({allDay:y})=>!y),v=Tje(m,d);p.forEach((y,x)=>{const w=x===0,C=new r1(y,o,l,c,d,w);r.push(C)}),v.forEach((y,x)=>{const w=qe.isEmpty(p)&&x===0,C=new s1(y,o,l,c,d,w);r.push(C)})})}),t.rows=r)}function Tje(t,e){return t.map((n,r)=>{const s=t[r-1],i=t[r+1];let o=!1,a=!1;if(e){const c=ga(n.end,new Date),d=!qe.isNil(i)&&ga(i.end,new Date),f=!qe.isNil(s)&&ga(s.end,new Date);o=(qe.isNil(s)||f)&&!c,a=c&&qe.isNil(i)&&!d}const l=!qe.isNil(i);return new Dje(o,a,l,n)})}const poe=(t,e)=>{t.events=e,t.eventsByMonth=kje(t.events)};function Aje(t,e){var p;if(qe.isNil(e.payload))return;const{calendarsIds:n,calendarsGroupById:r,response:s,count:i,order:o,startDate:a}=e.payload,l=n.length?s:[],c=o===U$.Desc?NL(l.reverse(),r):NL(l,r),d=qe.uniqBy([...c,...t.events],foe),f=((p=c[0])==null?void 0:p.start)??a;qe.isNil(f)||(t.loadedRangeStartDate=new Date(f).toISOString()),t.loadedCalendarsIds=qe.isEmpty(n)?null:n.toString(),t.noPrevEvents=qe.isEmpty(c)||!qe.isNil(i)&&i>c.length,poe(t,d),Y$(t,{payload:t.locale})}function _je(t,e){var f;if(qe.isNil(e.payload))return;const{calendarsIds:n,calendarsGroupById:r,response:s,count:i,endDate:o}=e.payload,a=n.length?s:[],l=NL(a,r),c=qe.uniqBy([...t.events,...l],foe),d=((f=l[l.length-1])==null?void 0:f.end)??o;qe.isNil(d)||(t.loadedRangeEndDate=new Date(d).toISOString()),t.loadedCalendarsIds=qe.isEmpty(n)?null:n.toString(),t.noNextEvents=qe.isEmpty(l)||!qe.isNil(i)&&i>l.length,poe(t,c),Y$(t,{payload:t.locale})}const mT=12;function G$(t,e,n="ru"){return es.fromDateTimes(t,e).splitBy({months:1}).map(s=>{const i=s.start.toFormat(Lu.yyyyMM),o=qe.capitalize(s.start.toFormat("LLLL yyyy",{locale:n}));return new Gg(i,o,s.start.month)})}function Oje(t,e){const n=nt.fromJSDate(e.payload.date).startOf("month"),r=n.minus({month:mT}),s=n.plus({months:mT}),i=G$(r,s,e.payload.locale);t.months=i,t.locale=e.payload.locale}function Rje(t,e){const n=qe.isNil(e==null?void 0:e.payload)?null:nt.fromJSDate(e.payload).startOf("month"),r=t.months[0].value,s=nt.fromFormat(r,Lu.yyyyMM),i=(n??s).minus({months:mT}),a=[...G$(i,s),...t.months];t.months=a}function Nje(t,e){const n=qe.isNil(e==null?void 0:e.payload)?null:nt.fromJSDate(e.payload).startOf("month"),r=t.months[t.months.length-1].value,s=nt.fromFormat(r,Lu.yyyyMM),i=s.plus({month:1}),o=(n??s).plus({months:mT}),a=G$(i,o),l=[...t.months,...a];t.months=l}const $U={loadedCalendarsIds:null,loadedRangeStartDate:null,loadedRangeEndDate:null,noPrevEvents:!1,noNextEvents:!1,scrollToDate:null,isOpen:!1,isRequestsBlocked:!1,isStickyDateDetectionBlocked:!0,isInitialLoadComplete:!1,shouldKeepTopPosition:!1,reloadTrigger:null,months:[],events:[],eventsByMonth:{},rows:[],locale:"ru"},K$=[qw,Uw],jje=new Set(K$.map(t=>t.pending.type)),Ije=new Set(K$.map(t=>t.rejected.type)),Lje=new Set(K$.map(t=>t.fulfilled.type));function Pje(t){return jje.has(t.type)}function $je(t){return Ije.has(t.type)}function zje(t){return Lje.has(t.type)}const hoe=$1({name:"eventList",initialState:$U,reducers:{updateEventListRows:Y$,addEventListInitialMonths:Oje,addEventListPrevMonths:Rje,addEventListNextMonths:Nje,toggleEventsListVisibility:t=>{t.isOpen=!t.isOpen},setEventsListVisibility:(t,e)=>{t.isOpen=e.payload},setEventListScrollToDate:(t,e)=>{t.scrollToDate=e.payload},setShouldKeepTopPosition:(t,e)=>{t.shouldKeepTopPosition=e.payload},setIsStickyDateDetectionBlocked:(t,e)=>{t.isStickyDateDetectionBlocked=e.payload},setIsInitialLoadComplete:(t,e)=>{t.isInitialLoadComplete=e.payload},updateEventsListState:(t,e)=>({...t,...e.payload}),reloadEventsList:t=>{t.reloadTrigger=Math.random()},resetEventList:(t,e)=>{var n,r;return{...$U,isOpen:(n=e.payload)!=null&&n.keepIsOpen?t.isOpen:!1,loadedCalendarsIds:(r=e.payload)!=null&&r.keepLoadedCalendarsIds?t.loadedCalendarsIds:null}}},extraReducers:t=>t.addCase(qw.fulfilled,Aje).addCase(Uw.fulfilled,_je).addMatcher(Pje,e=>{e.isRequestsBlocked=!0}).addMatcher($je,e=>{e.isRequestsBlocked=!1}).addMatcher(zje,e=>{e.isRequestsBlocked=!1})}),Fje=hoe.reducer,{setIsStickyDateDetectionBlocked:Z$,setIsInitialLoadComplete:Bje,toggleEventsListVisibility:Hje,setEventsListVisibility:J$,setEventListScrollToDate:wu,setShouldKeepTopPosition:zp,updateEventsListState:zU,updateEventListRows:RS,addEventListInitialMonths:qje,addEventListNextMonths:moe,addEventListPrevMonths:goe,reloadEventsList:_c,resetEventList:jL}=hoe.actions,zr={loadedCalendarsIds:t=>t.eventList.loadedCalendarsIds,loadedRangeStartDate:t=>t.eventList.loadedRangeStartDate,loadedRangeEndDate:t=>t.eventList.loadedRangeEndDate,isRequestsBlocked:t=>t.eventList.isRequestsBlocked,isInitialLoadComplete:t=>t.eventList.isInitialLoadComplete,noPrevEvents:t=>t.eventList.noPrevEvents,noNextEvents:t=>t.eventList.noNextEvents,scrollToDate:t=>t.eventList.scrollToDate,isOpen:t=>t.eventList.isOpen,months:t=>t.eventList.months,reloadTrigger:t=>t.eventList.reloadTrigger,eventsByMonth:t=>t.eventList.eventsByMonth,shouldKeepTopPosition:t=>t.eventList.shouldKeepTopPosition,isStickyDateDetectionBlocked:t=>t.eventList.isStickyDateDetectionBlocked,rows:t=>t.eventList.rows},Uje=(t,e)=>{switch(t){case"Moved":return e("recurringActions.labels.moved");case"Deleted":return e("recurringActions.labels.deleted");case"ApplyParticipant":return e("recurringActions.labels.applyParticipants");default:return""}},Vje=(t,e)=>{switch(t){case"Moved":return e("buttons.change");case"Deleted":return e("buttons.delete");case"ApplyParticipant":return e("buttons.save");default:return""}},sk=t=>{const e=Ve.c(87),{event:n,close:r,status:s}=t,[i,o]=O.useState("thisEvent"),[a,l]=O.useState(!1),c=Kt(),{t:d}=yt(),{isMobile:f}=Yt(),p=ve(Yo);let m;e[0]!==p||e[1]!==r||e[2]!==c||e[3]!==n||e[4]!==s||e[5]!==i?(m=async()=>{l(!0),i==="thisEvent"?await c(AL({event:n,type:"thisEvent",calendarsGroup:p})):i==="thisNextEvents"?await c(AL({event:n,type:"thisNextEvents",exception:{toDateFrom:n.start,toDateTo:null,startDate:n.start,endDate:null},calendarsGroup:p})):await c(Yp(Number(n.id))),c(_c()),c(Gp()),l(!1),r(s)},e[0]=p,e[1]=r,e[2]=c,e[3]=n,e[4]=s,e[5]=i,e[6]=m):m=e[6];const v=m;let y;e[7]!==p||e[8]!==r||e[9]!==c||e[10]!==n||e[11]!==s||e[12]!==i?(y=async()=>{const{exception:ee}=n.resource;ee&&(l(!0),i==="thisEvent"?await c(_L({event:n,type:"thisEvent",exception:ee,calendarsGroup:p})):await c(_L({event:n,type:"thisNextEvents",exception:{...ee,endDate:n.resource.recurring.endDateEventRecurring},calendarsGroup:p})),c(Gp()),l(!1),r(s))},e[7]=p,e[8]=r,e[9]=c,e[10]=n,e[11]=s,e[12]=i,e[13]=y):y=e[13];const x=y;let w;e[14]!==p||e[15]!==r||e[16]!==c||e[17]!==n.allDay||e[18]!==n.end||e[19]!==n.id||e[20]!==n.resource.participantInfo.attendingType||e[21]!==n.resource.participantInfo.description||e[22]!==n.resource.recurring||e[23]!==n.start||e[24]!==s||e[25]!==i?(w=async()=>{var ce,ue,pe,de,me,Se,De,Ae,fe,Te;l(!0);const ee=(ue=(ce=n.resource)==null?void 0:ce.recurring)!=null&&ue.endDateEventRecurring?Iu((de=(pe=n.resource)==null?void 0:pe.recurring)==null?void 0:de.endDateEventRecurring,"day"):null,oe=n!=null&&n.allDay?nt.fromJSDate(n.start).toISODate()??n.start:n.start;if(i==="thisEvent"){const Ne=n!=null&&n.allDay?nt.fromJSDate(n.end).toISODate()??n.end:n.end;await c(kg({EventId:Number(n.id),StartDate:oe,EndDate:Ne,Type:((Se=(me=n.resource)==null?void 0:me.participantInfo)==null?void 0:Se.attendingType)||null,Description:n.resource.participantInfo.description||""}))}else if(i==="thisNextEvents")await c(kg({EventId:Number(n.id),StartDate:oe,EndDate:ee,Type:((Ae=(De=n.resource)==null?void 0:De.participantInfo)==null?void 0:Ae.attendingType)||null,Description:n.resource.participantInfo.description||""}));else{const{startDateEventRecurring:Ne}=n.resource.recurring,Ue=Ne&&nt.fromJSDate(Ne).toISODate()||oe;await c(kg({EventId:Number(n.id),StartDate:Ue,EndDate:ee,Type:((Te=(fe=n.resource)==null?void 0:fe.participantInfo)==null?void 0:Te.attendingType)||null,Description:n.resource.participantInfo.description||""}))}c(Gp()),l(!1),r(s),await c(Tu({id:Number(n.id),calendarsGroup:p,startDate:n.start,isAllDay:n.allDay,isUtc:!0}))},e[14]=p,e[15]=r,e[16]=c,e[17]=n.allDay,e[18]=n.end,e[19]=n.id,e[20]=n.resource.participantInfo.attendingType,e[21]=n.resource.participantInfo.description,e[22]=n.resource.recurring,e[23]=n.start,e[24]=s,e[25]=i,e[26]=w):w=e[26];const C=w;let E;e[27]!==C||e[28]!==v||e[29]!==x||e[30]!==s?(E=()=>{s==="Deleted"?v():s==="ApplyParticipant"?C():x()},e[27]=C,e[28]=v,e[29]=x,e[30]=s,e[31]=E):E=e[31];const D=E;let T;e[32]!==D?(T=ee=>{ee.key==="Enter"&&D()},e[32]=D,e[33]=T):T=e[33];const A=T;let _;e[34]!==s?(_=()=>{if(s==="Deleted")return"red.8"},e[34]=s,e[35]=_):_=e[35];const R=_;let N;e[36]!==s||e[37]!==d?(N=Uje(s,d),e[36]=s,e[37]=d,e[38]=N):N=e[38];let I;e[39]!==r||e[40]!==s?(I=()=>r(s),e[39]=r,e[40]=s,e[41]=I):I=e[41];const $=!f;let L;e[42]!==d?(L=d("recurringActions.options.thisEvent"),e[42]=d,e[43]=L):L=e[43];let z;e[44]!==A||e[45]!==L?(z=g.jsx(qs,{onKeyUp:A,mt:"xs",value:"thisEvent",label:L}),e[44]=A,e[45]=L,e[46]=z):z=e[46];let F;e[47]!==d?(F=d("recurringActions.options.thisAndNext"),e[47]=d,e[48]=F):F=e[48];let q;e[49]!==A||e[50]!==F?(q=g.jsx(qs,{onKeyUp:A,mt:"xs",value:"thisNextEvents",label:F}),e[49]=A,e[50]=F,e[51]=q):q=e[51];let H;e[52]!==A||e[53]!==s||e[54]!==d?(H=(s==="Deleted"||s==="ApplyParticipant")&&g.jsx(qs,{onKeyUp:A,mt:"xs",value:"allEvents",label:d("recurringActions.options.allSeries")}),e[52]=A,e[53]=s,e[54]=d,e[55]=H):H=e[55];let B;e[56]!==z||e[57]!==q||e[58]!==H?(B=g.jsxs(vt,{direction:"column",children:[z,q,H]}),e[56]=z,e[57]=q,e[58]=H,e[59]=B):B=e[59];let V;e[60]!==B||e[61]!==i?(V=g.jsx(qs.Group,{value:i,onChange:o,name:"favoriteFramework",children:B}),e[60]=B,e[61]=i,e[62]=V):V=e[62];let Y;e[63]!==r?(Y=()=>r("Canceled"),e[63]=r,e[64]=Y):Y=e[64];let G;e[65]!==d?(G=d("buttons.cancel"),e[65]=d,e[66]=G):G=e[66];let W;e[67]!==Y||e[68]!==G?(W=g.jsx(en,{variant:"outline",onClick:Y,children:G}),e[67]=Y,e[68]=G,e[69]=W):W=e[69];const Z=R();let Q;e[70]!==s||e[71]!==d?(Q=Vje(s,d),e[70]=s,e[71]=d,e[72]=Q):Q=e[72];let X;e[73]!==a||e[74]!==D||e[75]!==Z||e[76]!==Q?(X=g.jsx(en,{disabled:a,color:Z,onClick:D,children:Q}),e[73]=a,e[74]=D,e[75]=Z,e[76]=Q,e[77]=X):X=e[77];let re;e[78]!==W||e[79]!==X?(re=g.jsx(Q_,{opened:!0,children:g.jsxs(wt,{mt:"lg",gap:"xs",justify:"flex-end",children:[W,X]})}),e[78]=W,e[79]=X,e[80]=re):re=e[80];let ne;return e[81]!==V||e[82]!==re||e[83]!==N||e[84]!==I||e[85]!==$?(ne=g.jsx(g.Fragment,{children:g.jsxs(ks,{opened:!0,title:N,onClose:I,centered:$,children:[V,re]})}),e[81]=V,e[82]=re,e[83]=N,e[84]=I,e[85]=$,e[86]=ne):ne=e[86],ne};function FU(t){return qe.isNil(t)?[]:t.resource.documents.map(({id:e})=>e)}function m3(t,e){const n=t.ownerId??(e==null?void 0:e.Id);return t.contactParticipants.filter(({userId:r})=>!qe.isNil(r)&&r!==n)}function BU(t,e){return qe.isNil(t)?[]:m3(t.resource,e).map(({userId:n})=>n)}const Wje=({currentUser:t,permissionsModalHandlers:e,updateEventMaterialsPermissions:n,newEvent:r,prevEvent:s})=>{if(qe.isEmpty(r.resource.documents)||qe.isEmpty(r.resource.contactParticipants))return!1;const i=BU(r,t),o=BU(s,t),a=FU(r),l=FU(s),c=i.filter(v=>!o.includes(v)),d=a.filter(v=>!l.includes(v)),{documentsPermissions:f}=r.resource;if(qe.isNil(f)&&qe.isEmpty(c)&&qe.isEmpty(d))return!1;const p=c.some(v=>{var y;return!((y=f==null?void 0:f.userIds)!=null&&y.includes(v))}),m=d.some(v=>{var y;return!((y=f==null?void 0:f.documentIds)!=null&&y.includes(v))});return!p&&!m?(n(r),!1):(e.open(),!0)},voe=(t,e,n,r)=>{var c,d,f;const{startDateEventRecurring:s}=(c=t==null?void 0:t.resource)==null?void 0:c.recurring,{isAllDayWithoutTime:i}=t.resource,o=i?"UTC+00:00":(d=t.resource)==null?void 0:d.startTimeZoneTzName,a=Es(s||new Date,{day:e||0,hour:n||0,minute:r||0}),l=i?"UTC+00:00":(f=t.resource)==null?void 0:f.endTimeZoneTzName;return{start:t.allDay?xr(Lt(s||new Date,"UTC+00:00"),{hour:10,minute:0}):Lt(s||new Date,o),end:t.allDay?xr(Lt(a||new Date,"UTC+00:00"),{hour:11,minute:0}):Lt(a,l)}},Yje=({currentEventStatus:t,modeEditEvents:e,event:n,dates:r,handleSetEvent:s,initialEvent:i,currentEvent:o})=>{if(t===Cn.Pending||t===Cn.Initial)return;const a=n.allDay?xr(r.start,{hour:10,minute:0}):r.start,l=n.allDay?xr(r.end,{hour:11,minute:0}):r.end;if(e===js.ThisEvent)s({...n,start:a,end:l,resource:{...n.resource}});else{let c={...n};if(e===js.AllEvents){const{days:d,hours:f,minutes:p}=$_(i.start,i.end),m=voe(n,d,f,p);c={...n,start:m.start,end:m.end}}else c={...n,start:a,end:l};c={...c,resource:{...n.resource,recurring:{...o.resource.recurring}}},s(c)}};function X$(t,e){return t.filter(n=>n.ownerId===(e==null?void 0:e.Id))}const IL=async t=>{const{calendarList:e,event:n,dispatch:r}=t,s=e.find(i=>i.id===n.resource.calendarId);s!=null&&s.isActive?await r(Gp()):await r(pC({...s,isActive:!0}))};var ik={exports:{}},Gje=ik.exports,HU;function Kje(){return HU||(HU=1,(function(t,e){(function(n,r){t.exports=r()})(Gje,(function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(i,o,a){var l=o.prototype;a.utc=function(y){var x={date:y,utc:!0,args:arguments};return new o(x)},l.utc=function(y){var x=a(this.toDate(),{locale:this.$L,utc:!0});return y?x.add(this.utcOffset(),n):x},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=l.parse;l.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),c.call(this,y)};var d=l.init;l.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else d.call(this)};var f=l.utcOffset;l.utcOffset=function(y,x){var w=this.$utils().u;if(w(y))return this.$u?0:w(this.$offset)?f.call(this):this.$offset;if(typeof y=="string"&&(y=(function(T){T===void 0&&(T="");var A=T.match(r);if(!A)return null;var _=(""+A[0]).match(s)||["-",0,0],R=_[0],N=60*+_[1]+ +_[2];return N===0?0:R==="+"?N:-N})(y),y===null))return this;var C=Math.abs(y)<=16?60*y:y,E=this;if(x)return E.$offset=C,E.$u=y===0,E;if(y!==0){var D=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(E=this.local().add(C+D,n)).$offset=C,E.$x.$localOffset=D}else E=this.utc();return E};var p=l.format;l.format=function(y){var x=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,x)},l.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var m=l.toDate;l.toDate=function(y){return y==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var v=l.diff;l.diff=function(y,x,w){if(y&&this.$u===y.$u)return v.call(this,y,x,w);var C=this.local(),E=a(y).local();return v.call(C,E,x,w)}}}))})(ik)),ik.exports}var Zje=Kje();const g3=Mr(Zje);Qe.extend(g3);const Jm=(t,e)=>{if(t&&typeof t=="object"&&"error"in t)throw e&&e("/"),new Error},xd=(t,e)=>{if(!t)throw e&&e("/"),new Error};function yoe(t){return Qe(t).isValid()?Qe(t).utc().format("HH:mm:ss"):t}const Jje=async({event:t,checkEventMaterialsPermissions:e,currentEvent:n,initialEvent:r,dispatch:s,notifications:i,edit:o,modeEditEvents:a,updateEventMaterials:l,calendarsGroup:c,navigate:d,setIsLoaderSave:f,calendarList:p,timeZones:m})=>{var D,T,A,_,R,N,I,$,L,z,F,q,H,B;f(!0);let v={...t,resource:{...t.resource,allDayNotifications:i.map(V=>({...V,type:Number(V.type),intervalType:Number(V.intervalType),intervalCount:Number(V.intervalCount),allDayInterval:V.allDayInterval?yoe(V.allDayInterval):""})),simpleNotifications:i.map(V=>({...V,type:Number(V.type),intervalType:Number(V.intervalType),intervalCount:Number(V.intervalCount),allDayInterval:null}))}};if(v.title=t.title.trim(),v.resource.isAllDayWithoutTime)v.start=t.start,v.end=t.end;else{const{startTimeZoneId:V,endTimeZoneId:Y}=t.resource,G=V?(D=m[V])==null?void 0:D.tzName:void 0,W=Y?(T=m[Y])==null?void 0:T.tzName:void 0;G&&W?(v.start=_n(t.start,G),v.end=_n(t.end,W)):(v.start=_n(t.start),v.end=_n(t.end))}if((p$(t.start,t.end,"day")>=1||t.resource.isAllDayWithoutTime)&&(v.allDay=!0),await e(v,n))return;let w=!0,C=!0,E=!1;v.resource.saveType!==rs.Duplicate&&(E=!qe.isEqualWith(v.resource.participantInfo,r.resource.participantInfo),w=!qe.isEqualWith(qe.omit(v,["resource.participantInfo.attendingType","resource.documents"]),qe.omit(r,["resource.participantInfo.attendingType","resource.documents"])),C=!qe.isEqualWith(qe.pick(v,["resource.documents"]),qe.pick(r,["resource.documents"])));try{if(o){if(!w&&!E&&!C){f(!1),d("/");return}if(!v.resource.recurring.recurringId||a===js.AllEvents){let Y={};if(w){const{payload:G}=await s(Nd(v));if(Y=G,!G)throw new Error}if(C){const G=!w&&!E,W=await l(Number(Y.Id)||Number(t.id),G);Jm(W)}if(E){const{startDateEventRecurring:G}=t.resource.recurring,W=(A=Y==null?void 0:Y.Recurring)==null?void 0:A.EndDate;let Z=G||kl(t.start,"day");t.allDay&&Z&&(Z=nt.fromJSDate(Z).toISODate()??Z);let Q=W||null;t.allDay&&Q&&(Q=nt.fromJSDate(Q).toISODate()??Q);const{payload:X}=await s(kg({EventId:Number(Y.Id)||Number(t.id),StartDate:Z,EndDate:Q,Type:((R=(_=t.resource)==null?void 0:_.participantInfo)==null?void 0:R.attendingType)||0,Description:t.resource.participantInfo.description||""}));xd(X)}}else if(a===js.ThisNextEvents){if(w||C)if(v.resource.saveType===rs.Duplicate){const{payload:Y}=await s(Nd(v));xd(Y);const G=await l(Y.DetailId,!1);Jm(G)}else{const{payload:Y}=await s(_L({event:v,type:a,exception:{toDateFrom:r.start,toDateTo:v.start,startDate:r.start,endDate:((I=(N=t.resource)==null?void 0:N.recurring)==null?void 0:I.endDateEventRecurring)||null},calendarsGroup:c}));xd(Y);const G=await l(Y.DetailId,!1);Jm(G)}if(E){const Y=v!=null&&v.allDay?nt.fromJSDate(v.start).toISODate()??v.start:v.start;let G=((L=($=t.resource)==null?void 0:$.recurring)==null?void 0:L.endDateEventRecurring)||null;v.allDay&&G&&(G=nt.fromJSDate(G).toISODate()??G);const{payload:W}=await s(kg({EventId:Number(t.id),StartDate:Y,EndDate:G,Type:(F=(z=t.resource)==null?void 0:z.participantInfo)==null?void 0:F.attendingType,Description:t.resource.participantInfo.description||""}));xd(W)}}else{if(w||C)if(v.resource.saveType===rs.Duplicate){const{payload:Y}=await s(Nd(v));xd(Y);const G=l(Y.DetailId,!1);Jm(G)}else{const Y=(q=c[v.resource.calendarId||0])==null?void 0:q.accessType,G=v.resource.accessType;if(Y===mt.Read||G===mt.Read){const{payload:Z}=await s(Nd(v));xd(Z);const Q=l(Z.DetailId||Number(t.id),!1);Jm(Q)}else{const{payload:Z}=await s(tRe({event:v,type:a,exception:{toDateFrom:r.start,toDateTo:v.start,startDate:r.start,endDate:r.end||null},calendarsGroup:c}));xd(Z);const Q=l(Z.DetailId,!1);Jm(Q)}}if(E){const Y=v!=null&&v.allDay?nt.fromJSDate(v.start).toISODate()??v.start:v.start,G=v!=null&&v.allDay?nt.fromJSDate(v.end).toISODate()??v.end:v.end,{payload:W}=await s(kg({EventId:Number(t.id),StartDate:Y,EndDate:G,Type:(B=(H=t.resource)==null?void 0:H.participantInfo)==null?void 0:B.attendingType,Description:t.resource.participantInfo.description||""}));xd(W)}}await IL({calendarList:p,event:t,dispatch:s}),f(!1);const V=_n(t.start);s(gc(V)),d("/")}else{const{payload:V}=await s(Wx({body:v,calendarsGroup:c})),{Id:Y}=V;if(xd(V,d),await IL({calendarList:p,event:t,dispatch:s}),!qe.isEmpty(v.resource.documents)){const W=await l(Y,!1);Jm(W,d)}f(!1);const G=_n(t.start);s(gc(G)),d("/")}}catch{f(!1),$n.showError(ct("errorsCatch.default"))}},Xje=({currentEvent:t,currentEventStatus:e,saveType:n,setSaveType:r,currentUser:s,calendarList:i,setEvent:o,timeZoneId:a,timeZones:l,edit:c})=>{var p,m,v;if(!c){o({...t,resource:{...t.resource,startTimeZoneId:a,endTimeZoneId:a}});return}if(e===Cn.Pending||e===Cn.Initial)return;const{participantInfo:d}=t.resource;let f={};if(t.resource.saveType===rs.Duplicate)f={...t,start:t.start,end:t.end};else{const{startTimeZoneId:y,endTimeZoneId:x,isAllDayWithoutTime:w}=t.resource,C=y?(p=l[y])==null?void 0:p.tzName:void 0,E=x?(m=l[x])==null?void 0:m.tzName:void 0;C&&E&&!w?f={...t,start:Lt(t.start,C),end:Lt(t.end,E)}:f={...t,start:w?t.start:Lt(t.start),end:w?t.end:Lt(t.end),resource:{...t.resource,startTimeZoneId:a,endTimeZoneId:a}}}if(n===rs.Duplicate||t.resource.saveType===rs.Duplicate){r(rs.Duplicate);const{days:y,hours:x,minutes:w}=$_(t.start,t.end),C=t.resource.recurring.repeatPeriod!=="never"?voe(t,y,x,w):{start:t.start,end:t.end};f={...f,resource:{...f.resource,saveType:rs.Duplicate},...C},s&&(f={...f,resource:{...f.resource,author:{name:s==null?void 0:s.Name},ownerId:s==null?void 0:s.Id,participantInfo:{...d,accessType:512},accessType:512,calendarId:((v=i[0])==null?void 0:v.id)||1}})}o(f)},Qje=async({currentEvent:t,event:e,dispatch:n,eventId:r,showSuccessMessage:s})=>{const i=t.resource.documents.map(({id:c})=>c),o=e.resource.documents.map(({id:c})=>c),a=o.filter(c=>!i.includes(c)),l=i.filter(c=>!o.includes(c));if(!qe.isEmpty(a))return await n(nRe({data:{EventId:r,DocumentIds:a},showSuccessMessage:s}));if(!qe.isEmpty(l))return await n(tie({data:{EventId:r,DocumentIds:l},showSuccessMessage:s}))},boe=25;var xoe=(t=>(t[t.Default=0]="Default",t[t.Public=1]="Public",t[t.Private=2]="Private",t[t.Common=4]="Common",t[t.SharedAccess=8]="SharedAccess",t[t.MyDocument=16]="MyDocument",t[t.Photo=32]="Photo",t[t.Video=64]="Video",t[t.Audio=128]="Audio",t[t.Virtual=256]="Virtual",t[t.Favorite=512]="Favorite",t[t.InProject=1024]="InProject",t[t.LastDocuments=2048]="LastDocuments",t[t.Trash=134217728]="Trash",t))(xoe||{});const e5e=t=>bn.post("v1/documents/share",t),t5e=(t,e=xoe.MyDocument,n,r)=>bn.postForm("v1/documents/upload",{File:t,DirectoryType:e.toString()},{signal:n==null?void 0:n.signal,onUploadProgress:s=>{if(qe.isNil(s.total))return;const i=s.loaded/s.total*100;r(i)}});function Ny(t){return[t.name,t.type,t.size].join(",")}const qU={uploadFiles:[],uploadProgress:{},uploadStatus:{}},Soe=$1({name:"documentsUpload",initialState:qU,reducers:{addFile:(t,e)=>{const{payload:n}=e;t.uploadFiles.push(n),t.uploadStatus[Ny(n)]="pending"},updateUploadProgress:(t,e)=>{const{file:n,progress:r}=e.payload;t.uploadProgress[Ny(n)]=r},updateUploadStatus:(t,e)=>{const{file:n,status:r}=e.payload;t.uploadStatus[Ny(n)]=r},cancelUpload:(t,e)=>{const{file:n}=e.payload;t.uploadStatus[Ny(n)]="canceled"},reset:()=>qU}}),n5e=Soe.reducer,{addFile:r5e,updateUploadProgress:s5e,updateUploadStatus:UU,cancelUpload:htt,reset:woe}=Soe.actions,Coe=t=>t.documentsUpload.uploadFiles,i5e=t=>e=>e.documentsUpload.uploadProgress[Ny(t)],o5e=t=>e=>e.documentsUpload.uploadStatus[Ny(t)];let gg=null;const a5e=sn("documents/startUploadingDocumentThunk",async(t,{getState:e,dispatch:n})=>{const{file:r,directoryType:s}=t;return await t5e(r,s,gg,i=>n(s5e({file:r,progress:i}))).then(i=>i.status===ci.Ok?(n(UU({file:r,status:"completed"})),i.data[0]):i).catch(i=>{const o=Kr.isCancel(i)?"canceled":"error";throw n(UU({file:r,status:o})),i})}),l5e=sn("documents/uploadDocumentsThunk",async(t,{dispatch:e})=>{const n=[];gg=new AbortController;for(const r of t)e(r5e(r));try{for(const r of t)await e(a5e({file:r})).then(r$).then(s=>{n.push(Qse(s)),$n.showSuccess(ct("successMessages.fileUploaded",{fileName:s.Name}))}).catch(s=>{if(s.code===S3e.ERR_CANCELED)throw s;if(s!=null&&s.message.includes(ci.PayloadTooLarge)){$n.showError(ct("fileModal.errorMessageTooLarge",{fileName:r.name,maxSizeMb:boe}));return}$n.showError(ct("successMessages.fileNotUploaded",{fileName:r.name}))})}catch{}return e(woe()),gg=null,n}),c5e=()=>{gg==null||gg.abort(),gg=null},u5e=sn("documents/shareDocumentThunk",async t=>{const e=HOe(t);return await e5e(e)}),d5e=async({dispatch:t,currentUser:e,event:n})=>{const r=m3(n.resource,e).map(({userId:o})=>o),s=X$(n.resource.documents,e).map(({id:o})=>o),i={...n.resource.documentsPermissions,documentIds:s,userIds:r};await t(u5e(i))},gT=t=>{const e=Ve.c(34),{handleSetEvent:n,event:r}=t,{t:s}=yt(),{resource:i}=r,{participantInfo:o}=i,a=!(r.resource.contactParticipants.length>0),{attendingType:l}=o;let c;e[0]!==r||e[1]!==n?(c=()=>{n({...r,resource:{...r.resource,participantInfo:{...r.resource.participantInfo,attendingType:1}}})},e[0]=r,e[1]=n,e[2]=c):c=e[2];const d=l===1?"light":"default";let f;e[3]!==s?(f=s("notesActions.options.yes"),e[3]=s,e[4]=f):f=e[4];let p;e[5]!==a||e[6]!==c||e[7]!==d||e[8]!==f?(p=g.jsx(en,{disabled:a,onClick:c,size:"compact-sm",variant:d,radius:"xl",children:f}),e[5]=a,e[6]=c,e[7]=d,e[8]=f,e[9]=p):p=e[9];let m;e[10]!==r||e[11]!==n?(m=()=>{n({...r,resource:{...r.resource,participantInfo:{...r.resource.participantInfo,attendingType:2}}})},e[10]=r,e[11]=n,e[12]=m):m=e[12];const v=l===2?"light":"default";let y;e[13]!==s?(y=s("notesActions.options.no"),e[13]=s,e[14]=y):y=e[14];let x;e[15]!==a||e[16]!==m||e[17]!==v||e[18]!==y?(x=g.jsx(en,{disabled:a,onClick:m,size:"compact-sm",variant:v,radius:"xl",children:y}),e[15]=a,e[16]=m,e[17]=v,e[18]=y,e[19]=x):x=e[19];let w;e[20]!==r||e[21]!==n?(w=()=>{n({...r,resource:{...r.resource,participantInfo:{...r.resource.participantInfo,attendingType:4}}})},e[20]=r,e[21]=n,e[22]=w):w=e[22];const C=l===4?"light":"default";let E;e[23]!==s?(E=s("notesActions.options.mayBe"),e[23]=s,e[24]=E):E=e[24];let D;e[25]!==a||e[26]!==C||e[27]!==E||e[28]!==w?(D=g.jsx(en,{disabled:a,onClick:w,size:"compact-sm",variant:C,radius:"xl",children:E}),e[25]=a,e[26]=C,e[27]=E,e[28]=w,e[29]=D):D=e[29];let T;return e[30]!==D||e[31]!==p||e[32]!==x?(T=g.jsxs(g.Fragment,{children:[p,x,D]}),e[30]=D,e[31]=p,e[32]=x,e[33]=T):T=e[33],T},f5e=({event:t,handleSubmit:e,handleClose:n,handleSetEvent:r,close:s})=>{const{resource:i}=t,{participantInfo:{description:o,attendingType:a}}=i,l=O.useRef(null),{initialAttendingType:c,initialDescription:d}=O.useMemo(()=>({initialAttendingType:a,initialDescription:o}),[o,a]),{t:f}=yt(),[p,m]=O.useState(o||"");O.useEffect(()=>{const w=l.current;if(w){var C=w.value.length;w.focus(),w.setSelectionRange(C,C)}},[]);const v=()=>{n({...t,resource:{...t.resource,participantInfo:{...t.resource.participantInfo,description:d,attendingType:c}}}),m(d),s()},y=()=>{e({...t,resource:{...t.resource,participantInfo:{...t.resource.participantInfo,description:p}}}),s()},x=w=>{w.key==="Enter"&&y()};return g.jsxs(g.Fragment,{children:[g.jsx(p8,{ref:l,mt:10,placeholder:f("notesActions.placeholder"),onChange:w=>{m(w.target.value)},value:p,autosize:!0,minRows:5,maxRows:10,maxLength:1024,onKeyUp:x,"data-autofocus":!0}),g.jsx(wt,{my:15,gap:6,justify:"flex-start",children:g.jsx(gT,{handleSetEvent:r,event:t})}),g.jsxs(wt,{mt:20,gap:8,justify:"flex-end",children:[g.jsx(en,{onClick:v,variant:"default",children:f("buttons.cancel")}),g.jsx(en,{onClick:y,children:f("buttons.apply")})]})]})},Eoe=t=>{const e=Ve.c(15),{opened:n,event:r,handleSubmit:s,handleClose:i,handleSetEvent:o,close:a}=t,{t:l}=yt(),{resource:c}=r,{participantInfo:d}=c,{description:f}=d,{isMobile:p}=Yt(),m=!p;let v;e[0]!==f||e[1]!==l?(v=l(f?"notesActions.edit":"notesActions.title"),e[0]=f,e[1]=l,e[2]=v):v=e[2];let y;e[3]!==a||e[4]!==r||e[5]!==i||e[6]!==o||e[7]!==s?(y=g.jsx(f5e,{event:r,handleSubmit:s,handleClose:i,handleSetEvent:o,close:a}),e[3]=a,e[4]=r,e[5]=i,e[6]=o,e[7]=s,e[8]=y):y=e[8];let x;return e[9]!==a||e[10]!==n||e[11]!==m||e[12]!==v||e[13]!==y?(x=g.jsx(ks,{opened:n,onClose:a,centered:m,withOverlay:!0,closeOnClickOutside:!1,title:v,children:y}),e[9]=a,e[10]=n,e[11]=m,e[12]=v,e[13]=y,e[14]=x):x=e[14],x},p5e=t=>{const e=Ve.c(27),{handleSetEvent:n,event:r}=t,{resource:s}=r,{t:i}=yt(),{accessType:o,contactParticipants:a,participantInfo:l}=s,{accessTypeGuests:c}=l,d=a.length>0?c:o,f=String(d);let p;e[0]!==r||e[1]!==n?(p=R=>{n({...r,resource:{...r.resource,participantInfo:{...r.resource.participantInfo,accessTypeGuests:Number(R)},accessType:Number(R)}})},e[0]=r,e[1]=n,e[2]=p):p=e[2];let m;e[3]!==i?(m=i("permissionsOptionsLabels.label"),e[3]=i,e[4]=m):m=e[4];let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(vn,{h:"xs"}),e[5]=v):v=e[5];let y;e[6]!==i?(y=i("permissionsOptionsLabels.read"),e[6]=i,e[7]=y):y=e[7];let x;e[8]!==y?(x=g.jsx(qs,{value:"0",label:y}),e[8]=y,e[9]=x):x=e[9];let w;e[10]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(vn,{h:"xs"}),e[10]=w):w=e[10];let C;e[11]!==i?(C=i("permissionsOptionsLabels.write"),e[11]=i,e[12]=C):C=e[12];let E;e[13]!==C?(E=g.jsx(qs,{value:"4",label:C}),e[13]=C,e[14]=E):E=e[14];let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=g.jsx(vn,{h:"xs"}),e[15]=D):D=e[15];let T;e[16]!==i?(T=i("permissionsOptionsLabels.full"),e[16]=i,e[17]=T):T=e[17];let A;e[18]!==T?(A=g.jsx(qs,{value:"512",label:T}),e[18]=T,e[19]=A):A=e[19];let _;return e[20]!==E||e[21]!==A||e[22]!==f||e[23]!==p||e[24]!==m||e[25]!==x?(_=g.jsxs(qs.Group,{value:f,onChange:p,name:"permission",label:m,children:[v,x,w,E,D,A]}),e[20]=E,e[21]=A,e[22]=f,e[23]=p,e[24]=m,e[25]=x,e[26]=_):_=e[26],_},h5e=t=>{const e=Ve.c(7),{option:n}=t;let r;e[0]!==n.color?(r=g.jsx(ah,{style:{color:n.color},size:"1em"}),e[0]=n.color,e[1]=r):r=e[1];let s;e[2]!==n.label?(s=g.jsx("div",{children:g.jsx(He,{size:"sm",children:n.label})}),e[2]=n.label,e[3]=s):s=e[3];let i;return e[4]!==r||e[5]!==s?(i=g.jsx(le,{w:"100%",children:g.jsxs(wt,{wrap:"nowrap",children:[r,s]})}),e[4]=r,e[5]=s,e[6]=i):i=e[6],i},Moe=t=>{const e=ve(Gde),n=ve(wv),r=ve(Yo),{event:s,handleSetEvent:i,disabled:o}=t,{t:a}=yt(),{isMobile:l,isTablet:c}=Yt(),{resource:d}=s,{categoryId:f}=d,{color:p}=d.calendarId?r[d.calendarId]:{color:""},m=O.useMemo(()=>e.map(x=>({label:x.Name,value:String(x.Id),color:x.Color})),[e]),v=O.useCallback(x=>{i({...s,resource:{...d,categoryId:Number(x)}})},[i]),y=O.useMemo(()=>o||e.length===0,[o,e.length]);return g.jsx(uo,{w:l||c?"auto":242,style:{flex:l?1:""},size:Ja,disabled:y,renderOption:h5e,value:String(f),onChange:v,data:m,leftSection:g.jsx(ah,{style:{color:n[f]||p},size:"1em"}),allowDeselect:!0,clearable:f!==0,placeholder:a("placeholders.selectCategory")})};function Ri(t){this.content=t}Ri.prototype={constructor:Ri,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,s=r.find(t),i=r.content.slice();return s==-1?i.push(n||t,e):(i[s+1]=e,n&&(i[s]=n)),new Ri(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Ri(n)},addToStart:function(t,e){return new Ri([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Ri(n)},addBefore:function(t,e,n){var r=this.remove(e),s=r.content.slice(),i=r.find(t);return s.splice(i==-1?s.length:i,0,e,n),new Ri(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Ri.from(t),t.size?new Ri(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Ri.from(t),t.size?new Ri(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Ri.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Ri.from=function(t){if(t instanceof Ri)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Ri(e)};function Doe(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(r),i=e.child(r);if(s==i){n+=s.nodeSize;continue}if(!s.sameMarkup(i))return n;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)n++;return n}if(s.content.size||i.content.size){let o=Doe(s.content,i.content,n+1);if(o!=null)return o}n+=s.nodeSize}}function koe(t,e,n,r){for(let s=t.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:n,b:r};let o=t.child(--s),a=e.child(--i),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let c=0,d=Math.min(o.text.length,a.text.length);for(;c<d&&o.text[o.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let c=koe(o.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class dt{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,s=0,i){for(let o=0,a=0;a<n;o++){let l=this.content[o],c=a+l.nodeSize;if(c>e&&r(l,s+a,i||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,s+d)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,s){let i="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(s[s.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new dt(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],s=0;if(n>e)for(let i=0,o=0;o<n;i++){let a=this.content[i],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),s+=a.nodeSize),o=l}return new dt(r,s)}cutByIndex(e,n){return e==n?dt.empty:e==0&&n==this.content.length?this:new dt(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let s=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return s[e]=n,new dt(s,i)}addToStart(e){return new dt([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new dt(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let s=this.content[n];e(s,r,n),r+=s.nodeSize}}findDiffStart(e,n=0){return Doe(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return koe(this,e,n,r)}findIndex(e){if(e==0)return nD(0,e);if(e==this.size)return nD(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),i=r+s.nodeSize;if(i>=e)return i==e?nD(n+1,i):nD(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return dt.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new dt(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return dt.empty;let n,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(n||(n=e.slice(0,s)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new dt(n||e,r)}static from(e){if(!e)return dt.empty;if(e instanceof dt)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new dt([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}dt.empty=new dt([],0);const O4={index:0,offset:0};function nD(t,e){return O4.index=t,O4.offset=e,O4}function vT(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!vT(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!vT(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Or=class LL{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&vT(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=r.create(n.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return LL.none;if(e instanceof LL)return[e];let n=e.slice();return n.sort((r,s)=>r.type.rank-s.type.rank),n}};Or.none=[];class yT extends Error{}class Tt{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Aoe(this.content,e+this.openStart,n);return r&&new Tt(r,this.openStart,this.openEnd)}removeBetween(e,n){return new Tt(Toe(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return Tt.empty;let r=n.openStart||0,s=n.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Tt(dt.fromJSON(e,n.content),r,s)}static maxOpen(e,n=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)s++;return new Tt(e,r,s)}}Tt.empty=new Tt(dt.empty,0,0);function Toe(t,e,n){let{index:r,offset:s}=t.findIndex(e),i=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(s==e||i.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(Toe(i.content,e-s-1,n-s-1)))}function Aoe(t,e,n,r){let{index:s,offset:i}=t.findIndex(e),o=t.maybeChild(s);if(i==e||o.isText)return r&&!r.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=Aoe(o.content,e-i-1,n,o);return a&&t.replaceChild(s,o.copy(a))}function m5e(t,e,n){if(n.openStart>t.depth)throw new yT("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new yT("Inconsistent open depths");return _oe(t,e,n,0)}function _oe(t,e,n,r){let s=t.index(r),i=t.node(r);if(s==e.index(r)&&r<t.depth-n.openStart){let o=_oe(t,e,n,r+1);return i.copy(i.content.replaceChild(s,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return Ag(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=g5e(n,t);return Ag(i,Roe(t,o,a,e,r))}else return Ag(i,bT(t,e,r))}function Ooe(t,e){if(!e.type.compatibleContent(t.type))throw new yT("Cannot join "+e.type.name+" onto "+t.type.name)}function PL(t,e,n){let r=t.node(n);return Ooe(r,e.node(n)),r}function Tg(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Gx(t,e,n,r){let s=(e||t).node(n),i=0,o=e?e.index(n):s.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Tg(t.nodeAfter,r),i++));for(let a=i;a<o;a++)Tg(s.child(a),r);e&&e.depth==n&&e.textOffset&&Tg(e.nodeBefore,r)}function Ag(t,e){return t.type.checkContent(e),t.copy(e)}function Roe(t,e,n,r,s){let i=t.depth>s&&PL(t,e,s+1),o=r.depth>s&&PL(n,r,s+1),a=[];return Gx(null,t,s,a),i&&o&&e.index(s)==n.index(s)?(Ooe(i,o),Tg(Ag(i,Roe(t,e,n,r,s+1)),a)):(i&&Tg(Ag(i,bT(t,e,s+1)),a),Gx(e,n,s,a),o&&Tg(Ag(o,bT(n,r,s+1)),a)),Gx(r,null,s,a),new dt(a)}function bT(t,e,n){let r=[];if(Gx(null,t,n,r),t.depth>n){let s=PL(t,e,n+1);Tg(Ag(s,bT(t,e,n+1)),r)}return Gx(e,null,n,r),new dt(r)}function g5e(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)s=e.node(i).copy(dt.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class NS{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(n);return r?e.child(n).cut(r):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Or.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),s=e.maybeChild(n);if(!r){let a=r;r=s,s=a}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new xT(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],s=0,i=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(i),c=i-l;if(r.push(o,a,s+l),!c||(o=o.child(a),o.isText))break;i=c-1,s+=l+1}return new NS(n,r,i)}static resolveCached(e,n){let r=VU.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==n)return o}else VU.set(e,r=new v5e);let s=r.elts[r.i]=NS.resolve(e,n);return r.i=(r.i+1)%y5e,s}}class v5e{constructor(){this.elts=[],this.i=0}}const y5e=12,VU=new WeakMap;class xT{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const b5e=Object.create(null);let Kp=class $L{constructor(e,n,r,s=Or.none){this.type=e,this.attrs=n,this.marks=s,this.content=r||dt.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,s=0){this.content.nodesBetween(e,n,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,s){return this.content.textBetween(e,n,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&vT(this.attrs,n||e.defaultAttrs||b5e)&&Or.sameSet(this.marks,r||Or.none)}copy(e=null){return e==this.content?this:new $L(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new $L(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return Tt.empty;let s=this.resolve(e),i=this.resolve(n),o=r?0:s.sharedDepth(n),a=s.start(o),c=s.node(o).content.cut(s.pos-a,i.pos-a);return new Tt(c,s.depth-o,i.depth-o)}replace(e,n,r){return m5e(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let s=this.content.child(n-1);return{node:s,index:n-1,offset:r-s.nodeSize}}resolve(e){return NS.resolveCached(this,e)}resolveNoCache(e){return NS.resolve(this,e)}rangeHasMark(e,n,r){let s=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Noe(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=dt.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Or.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Or.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let s=dt.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Kp.prototype.text=void 0;class ST extends Kp{constructor(e,n,r,s){if(super(e,n,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Noe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ST(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ST(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Noe(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Kg{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new x5e(e,n);if(r.next==null)return Kg.empty;let s=joe(r);r.next&&r.err("Unexpected trailing text");let i=k5e(D5e(s));return T5e(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let s=this;for(let i=n;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let s=[this];function i(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return dt.from(a.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:d,next:f}=o.next[c];if(!(d.isText||d.hasRequiredAttrs())&&s.indexOf(f)==-1){s.push(f);let p=i(f,a.concat(d));if(p)return p}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let a=s;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:a,next:l}=i.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&n(r.next[s].next)}return n(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
`)}}Kg.empty=new Kg(!0);class x5e{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function joe(t){let e=[];do e.push(S5e(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function S5e(t){let e=[];do e.push(w5e(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function w5e(t){let e=M5e(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=C5e(t,e);else break;return e}function WU(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function C5e(t,e){let n=WU(t),r=n;return t.eat(",")&&(t.next!="}"?r=WU(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function E5e(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let s=[];for(let i in n){let o=n[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function M5e(t){if(t.eat("(")){let e=joe(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=E5e(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function D5e(t){let e=[[]];return s(i(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let c={term:l,to:a};return e[o].push(c),c}function s(o,a){o.forEach(l=>l.to=a)}function i(o,a){if(o.type=="choice")return o.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(o.type=="seq")for(let l=0;;l++){let c=i(o.exprs[l],a);if(l==o.exprs.length-1)return c;s(c,a=n())}else if(o.type=="star"){let l=n();return r(a,l),s(i(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return s(i(o.expr,a),l),s(i(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(i(o.expr,a));if(o.type=="range"){let l=a;for(let c=0;c<o.min;c++){let d=n();s(i(o.expr,l),d),l=d}if(o.max==-1)s(i(o.expr,l),l);else for(let c=o.min;c<o.max;c++){let d=n();r(l,d),s(i(o.expr,l),d),l=d}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Ioe(t,e){return e-t}function YU(t,e){let n=[];return r(e),n.sort(Ioe);function r(s){let i=t[s];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(s);for(let o=0;o<i.length;o++){let{term:a,to:l}=i[o];!a&&n.indexOf(l)==-1&&r(l)}}}function k5e(t){let e=Object.create(null);return n(YU(t,0));function n(r){let s=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d<s.length;d++)s[d][0]==a&&(c=s[d][1]);YU(t,l).forEach(d=>{c||s.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Kg(r.indexOf(t.length-1)>-1);for(let o=0;o<s.length;o++){let a=s[o][1].sort(Ioe);i.next.push({type:s[o][0],next:e[a.join(",")]||n(a)})}return i}}function T5e(t,e){for(let n=0,r=[t];n<r.length;n++){let s=r[n],i=!s.validEnd,o=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];o.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Loe(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Poe(t,e){let n=Object.create(null);for(let r in t){let s=e&&e[r];if(s===void 0){let i=t[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=s}return n}function $oe(t,e,n,r){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let i=t[s];i.validate&&i.validate(e[s])}}function zoe(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new _5e(t,r,e[r]);return n}let GU=class Foe{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zoe(e,r.attrs),this.defaultAttrs=Loe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Kg.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Poe(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Kp(this,this.computeAttrs(e),dt.from(n),Or.setFrom(r))}createChecked(e=null,n,r){return n=dt.from(n),this.checkContent(n),new Kp(this,this.computeAttrs(e),n,Or.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=dt.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let s=this.contentMatch.matchFragment(n),i=s&&s.fillBefore(dt.empty,!0);return i?new Kp(this,e,n.append(i),Or.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){$oe(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Or.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Foe(i,n,o));let s=n.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function A5e(t,e,n){let r=n.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class _5e{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?A5e(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class v3{constructor(e,n,r,s){this.name=e,this.rank=n,this.schema=r,this.spec=s,this.attrs=zoe(e,s.attrs),this.excluded=null;let i=Loe(this.attrs);this.instance=i?new Or(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Or(this,Poe(this.attrs,e))}static compile(e,n){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new v3(i,s++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){$oe(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Boe{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Ri.from(e.nodes),n.marks=Ri.from(e.marks||{}),this.nodes=GU.compile(this.spec.nodes,this),this.marks=v3.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Kg.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?KU(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:KU(this,o.split(" "))}this.nodeFromJSON=s=>Kp.fromJSON(this,s),this.markFromJSON=s=>Or.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof GU){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,s)}text(e,n){let r=this.nodes.text;return new ST(r,r.defaultAttrs,e,Or.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function KU(t,e){let n=[];for(let r=0;r<e.length;r++){let s=e[r],i=t.marks[s],o=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function O5e(t){return t.tag!=null}function R5e(t){return t.style!=null}class Zp{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(s=>{if(O5e(s))this.tags.push(s);else if(R5e(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new JU(this,n,!1);return r.addAll(e,Or.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new JU(this,n,!0);return r.addAll(e,Or.none,n.from,n.to),Tt.maxOpen(r.finish())}matchTag(e,n,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(I5e(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,n,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<i)break}n.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=XU(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=XU(o)),o.node||o.ignore||o.mark||(o.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Zp(e,Zp.schemaRules(e)))}}const Hoe={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},N5e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},qoe={ol:!0,ul:!0},jS=1,zL=2,Kx=4;function ZU(t,e,n){return e!=null?(e?jS:0)|(e==="full"?zL:0):t&&t.whitespace=="pre"?jS|zL:n&~Kx}class rD{constructor(e,n,r,s,i,o){this.type=e,this.attrs=n,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=Or.none,this.match=i||(o&Kx?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(dt.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&jS)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let n=dt.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(dt.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Hoe.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class JU{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=n.topNode,i,o=ZU(null,n.preserveWhitespace,0)|(r?Kx:0);s?i=new rD(s.type,s.attrs,Or.none,!0,n.topMatch||s.type.contentMatch,o):r?i=new rD(null,null,Or.none,!0,null,o):i=new rD(e.schema.topNodeType,null,Or.none,!0,null,o),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,s=this.top,i=s.options&zL?"full":this.localPreserveWS||(s.options&jS)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
`);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(o.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=s.content[s.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;qoe.hasOwnProperty(o)&&this.parser.normalizeLists&&j5e(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:N5e.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(Hoe.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=l&&l.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=s}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(i,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,s){let i,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=s==null?null:e.childNodes[s];o!=a;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,n);this.findAtPoint(e,i)}findPlace(e,n,r){let s,i;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],c=l.findWrapping(e);if(c&&(!s||s.length>c.length+a)&&(s=c,i=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=Or.none;for(let a of s.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):QU(a.type,e.type))&&(o=a.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,s){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,s)),i}enterInner(e,n,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=ZU(e,i,o.options);o.options&Kx&&o.content.length==0&&(a|=Kx);let l=Or.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):QU(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new rD(e,n,l,s,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=jS)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(o(a-1,l))return!0;return!1}else{let d=l>0||l==0&&s?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function j5e(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&qoe.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function I5e(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function XU(t){let e={};for(let n in t)e[n]=t[n];return e}function QU(t,e){let n=e.schema.nodes;for(let r in n){let s=n[r];if(!s.allowsMarkType(t))continue;let i=[],o=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:d}=a.edge(l);if(c==e||i.indexOf(d)<0&&o(d))return!0}};if(o(s.contentMatch))return!0}}class hv{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=R4(n).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let a=0,l=0;for(;a<i.length&&l<o.marks.length;){let c=o.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)s=i.pop()[1];for(;l<o.marks.length;){let c=o.marks[l++],d=this.serializeMark(c,o.isInline,n);d&&(i.push([c,s]),s.appendChild(d.dom),s=d.contentDOM||d.dom)}}s.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:s}=ok(R4(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let s=this.marks[e.type.name];return s&&ok(R4(r),s(e,n),null,e.attrs)}static renderSpec(e,n,r=null,s){return ok(e,n,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new hv(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=eV(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return eV(e.marks)}}function eV(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function R4(t){return t.document||window.document}const tV=new WeakMap;function L5e(t){let e=tV.get(t);return e===void 0&&tV.set(t,e=P5e(t)),e}function P5e(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)n(r[s]);else for(let s in r)n(r[s])}return n(t),e}function ok(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=L5e(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(n=s.slice(0,o),s=s.slice(o+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let p=f.indexOf(" ");p>0?l.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):f=="style"&&l.style?l.style.cssText=c[f]:l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let p=e[f];if(p===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:v}=ok(t,p,n,r);if(l.appendChild(m),v){if(a)throw new RangeError("Multiple content holes");a=v}}}return{dom:l,contentDOM:a}}const Uoe=65535,Voe=Math.pow(2,16);function $5e(t,e){return t+e*Voe}function nV(t){return t&Uoe}function z5e(t){return(t-(t&Uoe))/Voe}const Woe=1,Yoe=2,ak=4,Goe=8;class FL{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Goe)>0}get deletedBefore(){return(this.delInfo&(Woe|ak))>0}get deletedAfter(){return(this.delInfo&(Yoe|ak))>0}get deletedAcross(){return(this.delInfo&ak)>0}}class Ua{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Ua.empty)return Ua.empty}recover(e){let n=0,r=nV(e);if(!this.inverted)for(let s=0;s<r;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+n+z5e(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+i],d=this.ranges[a+o],f=l+c;if(e<=f){let p=c?e==l?-1:e==f?1:n:n,m=l+s+(p<0?0:d);if(r)return m;let v=e==(n<0?l:f)?null:$5e(a/3,e-l),y=e==l?Yoe:e==f?Woe:ak;return(n<0?e!=l:e!=f)&&(y|=Goe),new FL(m,y,v)}s+=d-c}return r?e+s:new FL(e+s,0,null)}touches(e,n){let r=0,s=nV(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+i],d=l+c;if(e<=d&&a==s*3)return!0;r+=this.ranges[a+o]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],a=o-(this.inverted?i:0),l=o+(this.inverted?0:i),c=this.ranges[s+n],d=this.ranges[s+r];e(a,a+c,l,l+d),i+=d-c}}invert(){return new Ua(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ua.empty:new Ua(e<0?[0,-e,0]:[0,0,e])}}Ua.empty=new Ua([]);class IS{constructor(e,n,r=0,s=e?e.length:0){this.mirror=n,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new IS(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let s=e.getMirror(n);this.appendMap(e._maps[n],s!=null&&s<n?r+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e._maps[n].invert(),s!=null&&s>n?r-s-1:void 0)}}invert(){let e=new IS;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return r?e:new FL(e,s,null)}}const N4=Object.create(null);class fo{getMap(){return Ua.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=N4[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in N4)throw new RangeError("Duplicate use of step JSON ID "+e);return N4[e]=n,n.prototype.jsonID=e,n}}class Us{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Us(e,null)}static fail(e){return new Us(null,e)}static fromReplace(e,n,r,s){try{return Us.ok(e.replace(n,r,s))}catch(i){if(i instanceof yT)return Us.fail(i.message);throw i}}}function Q$(t,e,n){let r=[];for(let s=0;s<t.childCount;s++){let i=t.child(s);i.content.size&&(i=i.copy(Q$(i.content,e,i))),i.isInline&&(i=e(i,n,s)),r.push(i)}return dt.fromArray(r)}class Fp extends fo{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new Tt(Q$(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),n.openStart,n.openEnd);return Us.fromReplace(e,this.from,this.to,i)}invert(){return new mc(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Fp(n.pos,r.pos,this.mark)}merge(e){return e instanceof Fp&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Fp(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Fp(n.from,n.to,e.markFromJSON(n.mark))}}fo.jsonID("addMark",Fp);class mc extends fo{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new Tt(Q$(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Us.fromReplace(e,this.from,this.to,r)}invert(){return new Fp(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mc(n.pos,r.pos,this.mark)}merge(e){return e instanceof mc&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mc(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new mc(n.from,n.to,e.markFromJSON(n.mark))}}fo.jsonID("removeMark",mc);class Bp extends fo{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Us.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Us.fromReplace(e,this.pos,this.pos+1,new Tt(dt.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(r))return new Bp(this.pos,n.marks[s]);return new Bp(this.pos,this.mark)}}return new Zg(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Bp(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Bp(n.pos,e.markFromJSON(n.mark))}}fo.jsonID("addNodeMark",Bp);class Zg extends fo{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Us.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Us.fromReplace(e,this.pos,this.pos+1,new Tt(dt.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Bp(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Zg(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Zg(n.pos,e.markFromJSON(n.mark))}}fo.jsonID("removeNodeMark",Zg);class ui extends fo{constructor(e,n,r,s=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=s}apply(e){return this.structure&&BL(e,this.from,this.to)?Us.fail("Structure replace would overwrite content"):Us.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ua([this.from,this.to-this.from,this.slice.size])}invert(e){return new ui(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new ui(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ui)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?Tt.empty:new Tt(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ui(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?Tt.empty:new Tt(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ui(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ui(n.from,n.to,Tt.fromJSON(e,n.slice),!!n.structure)}}fo.jsonID("replace",ui);class pi extends fo{constructor(e,n,r,s,i,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(BL(e,this.from,this.gapFrom)||BL(e,this.gapTo,this.to)))return Us.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Us.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Us.fromReplace(e,this.from,this.to,r):Us.fail("Content does not fit in gap")}getMap(){return new Ua([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new pi(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||s<n.pos||i>r.pos?null:new pi(n.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new pi(n.from,n.to,n.gapFrom,n.gapTo,Tt.fromJSON(e,n.slice),n.insert,!!n.structure)}}fo.jsonID("replaceAround",pi);function BL(t,e,n){let r=t.resolve(e),s=n-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function F5e(t,e,n,r){let s=[],i=[],o,a;t.doc.nodesBetween(e,n,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let p=Math.max(c,e),m=Math.min(c+l.nodeSize,n),v=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(v)||(o&&o.to==p&&o.mark.eq(f[y])?o.to=m:s.push(o=new mc(p,m,f[y])));a&&a.to==p?a.to=m:i.push(a=new Fp(p,m,r))}}),s.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function B5e(t,e,n,r){let s=[],i=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;i++;let l=null;if(r instanceof v3){let c=o.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let c=Math.min(a+o.nodeSize,n);for(let d=0;d<l.length;d++){let f=l[d],p;for(let m=0;m<s.length;m++){let v=s[m];v.step==i-1&&f.eq(s[m].style)&&(p=v)}p?(p.to=c,p.step=i):s.push({style:f,from:Math.max(a,e),to:c,step:i})}}}),s.forEach(o=>t.step(new mc(o.from,o.to,o.style)))}function e7(t,e,n,r=n.contentMatch,s=!0){let i=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),d=a+c.nodeSize,f=r.matchType(c.type);if(!f)o.push(new ui(a,d,Tt.empty));else{r=f;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||t.step(new mc(a,d,c.marks[p]));if(s&&c.isText&&n.whitespace!="pre"){let p,m=/\r?\n|\r/g,v;for(;p=m.exec(c.text);)v||(v=new Tt(dt.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),o.push(new ui(a+p.index,a+p.index+p[0].length,v))}}a=d}if(!r.validEnd){let l=r.fillBefore(dt.empty,!0);t.replace(a,a,new Tt(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function H5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function G1(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,s=0,i=0;;--r){let o=t.$from.node(r),a=t.$from.index(r)+s,l=t.$to.indexAfter(r)-i;if(r<t.depth&&o.canReplace(a,l,n))return r;if(r==0||o.type.spec.isolating||!H5e(o,a,l))break;a&&(s=1),l<o.childCount&&(i=1)}return null}function q5e(t,e,n){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),a=s.after(i+1),l=o,c=a,d=dt.empty,f=0;for(let v=i,y=!1;v>n;v--)y||r.index(v)>0?(y=!0,d=dt.from(r.node(v).copy(d)),f++):l--;let p=dt.empty,m=0;for(let v=i,y=!1;v>n;v--)y||s.after(v+1)<s.end(v)?(y=!0,p=dt.from(s.node(v).copy(p)),m++):c++;t.step(new pi(l,c,o,a,new Tt(d.append(p),f,m),d.size-f,!0))}function t7(t,e,n=null,r=t){let s=U5e(t,e),i=s&&V5e(r,e);return i?s.map(rV).concat({type:e,attrs:n}).concat(i.map(rV)):null}function rV(t){return{type:t,attrs:null}}function U5e(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return n.canReplaceWith(r,s,o)?i:null}function V5e(t,e){let{parent:n,startIndex:r,endIndex:s}=t,i=n.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:o}function W5e(t,e,n){let r=dt.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=dt.from(n[o].type.create(n[o].attrs,r))}let s=e.start,i=e.end;t.step(new pi(s,i,s,i,new Tt(r,0,0),n.length,!0))}function Y5e(t,e,n,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,l)&&G5e(t.doc,t.mapping.slice(i).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",v=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!v?c=!1:!m&&v&&(c=!0)}c===!1&&Zoe(t,o,a,i),e7(t,t.mapping.slice(i).map(a,1),r,void 0,c===null);let d=t.mapping.slice(i),f=d.map(a,1),p=d.map(a+o.nodeSize,1);return t.step(new pi(f,p,f+1,p-1,new Tt(dt.from(r.create(l,null,o.marks)),0,0),1,!0)),c===!0&&Koe(t,o,a,i),!1}})}function Koe(t,e,n,r){e.forEach((s,i)=>{if(s.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(s.text);){let l=t.mapping.slice(r).map(n+1+i+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Zoe(t,e,n,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text(`
`))}})}function G5e(t,e,n){let r=t.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,n)}function K5e(t,e,n,r,s){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let o=n.create(r,null,s||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,o);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new pi(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new Tt(dt.from(o),0,0),1,!0))}function zd(t,e,n=1,r){let s=t.resolve(e),i=s.depth-n,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,d=n-2;c>i;c--,d--){let f=s.node(c),p=s.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(p,f.childCount),v=r&&r[d+1];v&&(m=m.replaceChild(0,v.type.create(v.attrs)));let y=r&&r[d]||f;if(!f.canReplace(p+1,f.childCount)||!y.type.validContent(m))return!1}let a=s.indexAfter(i),l=r&&r[0];return s.node(i).canReplaceWith(a,a,l?l.type:s.node(i+1).type)}function Z5e(t,e,n=1,r){let s=t.doc.resolve(e),i=dt.empty,o=dt.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){i=dt.from(s.node(a).copy(i));let d=r&&r[c];o=dt.from(d?d.type.create(d.attrs,o):s.node(a).copy(o))}t.step(new ui(e,e,new Tt(i.append(o),n,n),!0))}function Th(t,e){let n=t.resolve(e),r=n.index();return Joe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function J5e(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),o=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function Joe(t,e){return!!(t&&e&&!t.isLeaf&&J5e(t,e))}function y3(t,e,n=-1){let r=t.resolve(e);for(let s=r.depth;;s--){let i,o,a=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(s+1),a++,o=r.node(s).maybeChild(a)):(i=r.node(s).maybeChild(a-1),o=r.node(s+1)),i&&!i.isTextblock&&Joe(i,o)&&r.node(s).canReplace(a,a+1))return e;if(s==0)break;e=n<0?r.before(s):r.after(s)}}function X5e(t,e,n){let r=null,{linebreakReplacement:s}=t.doc.type.schema,i=t.doc.resolve(e-n),o=i.node().type;if(s&&o.inlineContent){let d=o.whitespace=="pre",f=!!o.contentMatch.matchType(s);d&&!f?r=!1:!d&&f&&(r=!0)}let a=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);Zoe(t,d.node(),d.before(),a)}o.inlineContent&&e7(t,e+n-1,o,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),c=l.map(e-n);if(t.step(new ui(c,l.map(e+n,-1),Tt.empty,!0)),r===!0){let d=t.doc.resolve(c);Koe(t,d.node(),d.before(),t.steps.length)}return t}function Q5e(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,n))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,n))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function Xoe(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let i=0;i<n.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),c=r.node(o),d=!1;if(i==1)d=c.canReplace(l,l,s);else{let f=c.contentMatchAt(l).findWrapping(s.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function b3(t,e,n=e,r=Tt.empty){if(e==n&&!r.size)return null;let s=t.resolve(e),i=t.resolve(n);return Qoe(s,i,r)?new ui(e,n,r):new e6e(s,i,r).fit()}function Qoe(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class e6e{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=dt.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=dt.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,o=r.depth,a=s.depth;for(;o&&a&&i.childCount==1;)i=i.firstChild.content,o--,a--;let l=new Tt(i,o,a);return e>-1?new pi(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new ui(r.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=j4(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],d,f=null;if(n==1&&(o?c.matchType(o.type)||(f=c.fillBefore(dt.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:f};if(n==2&&o&&(d=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:d};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=j4(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new Tt(e,n+1,Math.max(r,s.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,s=j4(e,n);if(s.childCount<=1&&n>0){let i=e.size-n<=n+s.size;this.unplaced=new Tt(Ax(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new Tt(Ax(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:s,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let y=0;y<i.length;y++)this.openFrontierNode(i[y]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,c=0,d=[],{match:f,type:p}=this.frontier[n];if(s){for(let y=0;y<s.childCount;y++)d.push(s.child(y));f=f.matchFragment(s)}let m=a.size+e-(o.content.size-o.openEnd);for(;c<a.childCount;){let y=a.child(c),x=f.matchType(y.type);if(!x)break;c++,(c>1||l==0||y.content.size)&&(f=x,d.push(eae(y.mark(p.allowedMarks(y.marks)),c==1?l:0,c==a.childCount?m:-1)))}let v=c==a.childCount;v||(m=-1),this.placed=_x(this.placed,n,dt.from(d)),this.frontier[n].match=f,v&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,x=a;y<m;y++){let w=x.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),x=w.content}this.unplaced=v?e==0?Tt.empty:new Tt(Ax(o.content,e-1,1),e-1,m<0?o.openEnd:e-1):new Tt(Ax(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!I4(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:s}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=I4(e,n,s,r,i);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],d=I4(e,a,c,l,!0);if(!d||d.childCount)continue e}return{depth:n,fit:o,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=_x(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,n=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=_x(this.placed,this.depth,dt.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(dt.empty,!0);n.childCount&&(this.placed=_x(this.placed,this.frontier.length,n))}}function Ax(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Ax(t.firstChild.content,e-1,n)))}function _x(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(_x(t.lastChild.content,e-1,n)))}function j4(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function eae(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,eae(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(dt.empty,!0)))),t.copy(r)}function I4(t,e,n,r,s){let i=t.node(e),o=s?t.indexAfter(e):t.index(e);if(o==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,o);return a&&!t6e(n,i.content,o)?a:null}function t6e(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function n6e(t){return t.spec.defining||t.spec.definingForContent}function r6e(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),i=t.doc.resolve(n);if(Qoe(s,i,r))return t.step(new ui(e,n,r));let o=nae(s,i);o[o.length-1]==0&&o.pop();let a=-(s.depth+1);o.unshift(a);for(let p=s.depth,m=s.pos-1;p>0;p--,m--){let v=s.node(p).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;o.indexOf(p)>-1?a=p:s.before(p)==m&&o.splice(1,0,-p)}let l=o.indexOf(a),c=[],d=r.openStart;for(let p=r.content,m=0;;m++){let v=p.firstChild;if(c.push(v),m==r.openStart)break;p=v.content}for(let p=d-1;p>=0;p--){let m=c[p],v=n6e(m.type);if(v&&!m.sameMarkup(s.node(Math.abs(a)-1)))d=p;else if(v||!m.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let m=(p+d+1)%(r.openStart+1),v=c[m];if(v)for(let y=0;y<o.length;y++){let x=o[(y+l)%o.length],w=!0;x<0&&(w=!1,x=-x);let C=s.node(x-1),E=s.index(x-1);if(C.canReplaceWith(E,E,v.type,v.marks))return t.replace(s.before(x),w?i.after(x):n,new Tt(tae(r.content,0,r.openStart,m),m,r.openEnd))}}let f=t.steps.length;for(let p=o.length-1;p>=0&&(t.replace(e,n,r),!(t.steps.length>f));p--){let m=o[p];m<0||(e=s.before(m),n=i.after(m))}}function tae(t,e,n,r,s){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(tae(i.content,e+1,n,r,i)))}if(e>r){let i=s.contentMatchAt(0),o=i.fillBefore(t).append(t);t=o.append(i.matchFragment(o).fillBefore(dt.empty,!0))}return t}function s6e(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=Q5e(t.doc,e,r.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new Tt(dt.from(r),0,0))}function i6e(t,e,n){let r=t.doc.resolve(e),s=t.doc.resolve(n),i=nae(r,s);for(let o=0;o<i.length;o++){let a=i[o],l=o==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),s.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),s.indexAfter(a-1))))return t.delete(r.before(a),s.after(a))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&s.end(o)-n!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function nae(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let s=r;s>=0;s--){let i=t.start(s);if(i<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&n.push(s)}return n}class Uy extends fo{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Us.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let s=n.type.create(r,null,n.marks);return Us.fromReplace(e,this.pos,this.pos+1,new Tt(dt.from(s),0,n.isLeaf?0:1))}getMap(){return Ua.empty}invert(e){return new Uy(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Uy(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Uy(n.pos,n.attr,n.value)}}fo.jsonID("attr",Uy);class LS extends fo{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Us.ok(r)}getMap(){return Ua.empty}invert(e){return new LS(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new LS(n.attr,n.value)}}fo.jsonID("docAttr",LS);let i1=class extends Error{};i1=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};i1.prototype=Object.create(Error.prototype);i1.prototype.constructor=i1;i1.prototype.name="TransformError";class rae{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new IS}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new i1(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let s=this.mapping.maps[r];r&&(e=s.map(e,1),n=s.map(n,-1)),s.forEach((i,o,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=Tt.empty){let s=b3(this.doc,e,n,r);return s&&this.step(s),this}replaceWith(e,n,r){return this.replace(e,n,new Tt(dt.from(r),0,0))}delete(e,n){return this.replace(e,n,Tt.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return r6e(this,e,n,r),this}replaceRangeWith(e,n,r){return s6e(this,e,n,r),this}deleteRange(e,n){return i6e(this,e,n),this}lift(e,n){return q5e(this,e,n),this}join(e,n=1){return X5e(this,e,n),this}wrap(e,n){return W5e(this,e,n),this}setBlockType(e,n=e,r,s=null){return Y5e(this,e,n,r,s),this}setNodeMarkup(e,n,r=null,s){return K5e(this,e,n,r,s),this}setNodeAttribute(e,n,r){return this.step(new Uy(e,n,r)),this}setDocAttribute(e,n){return this.step(new LS(e,n)),this}addNodeMark(e,n){return this.step(new Bp(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Or)n.isInSet(r.marks)&&this.step(new Zg(e,n));else{let s=r.marks,i,o=[];for(;i=n.isInSet(s);)o.push(new Zg(e,i)),s=i.removeFromSet(s);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return Z5e(this,e,n,r),this}addMark(e,n,r){return F5e(this,e,n,r),this}removeMark(e,n,r){return B5e(this,e,n,r),this}clearIncompatible(e,n,r){return e7(this,e,n,r),this}}const L4=Object.create(null);let En=class{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new o6e(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=Tt.empty){let r=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:c}=o[a],d=e.mapping.slice(i);e.replaceRange(d.map(l.pos),d.map(c.pos),a?Tt.empty:n),a==0&&oV(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:a}=s[i],l=e.mapping.slice(r),c=l.map(o.pos),d=l.map(a.pos);i?e.deleteRange(c,d):(e.replaceRangeWith(c,d,n),oV(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let s=e.parent.inlineContent?new rn(e):My(e.node(0),e.parent,e.pos,e.index(),n,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let o=n<0?My(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):My(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Ga(e.node(0))}static atStart(e){return My(e,e,0,0,1)||new Ga(e)}static atEnd(e){return My(e,e,e.content.size,e.childCount,-1)||new Ga(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=L4[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in L4)throw new RangeError("Duplicate use of selection JSON ID "+e);return L4[e]=n,n.prototype.jsonID=e,n}getBookmark(){return rn.between(this.$anchor,this.$head).getBookmark()}};En.prototype.visible=!0;class o6e{constructor(e,n){this.$from=e,this.$to=n}}let sV=!1;function iV(t){!sV&&!t.parent.inlineContent&&(sV=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class rn extends En{constructor(e,n=e){iV(e),iV(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return En.near(r);let s=e.resolve(n.map(this.anchor));return new rn(s.parent.inlineContent?s:r,r)}replace(e,n=Tt.empty){if(super.replace(e,n),n==Tt.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof rn&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new x3(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new rn(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let s=e.resolve(n);return new this(s,r==n?s:e.resolve(r))}static between(e,n,r){let s=e.pos-n.pos;if((!r||s)&&(r=s>=0?1:-1),!n.parent.inlineContent){let i=En.findFrom(n,r,!0)||En.findFrom(n,-r,!0);if(i)n=i.$head;else return En.near(n,r)}return e.parent.inlineContent||(s==0?e=n:(e=(En.findFrom(e,-r,!0)||En.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new rn(e,n)}}En.jsonID("text",rn);class x3{constructor(e,n){this.anchor=e,this.head=n}map(e){return new x3(e.map(this.anchor),e.map(this.head))}resolve(e){return rn.between(e.resolve(this.anchor),e.resolve(this.head))}}class qt extends En{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:s}=n.mapResult(this.anchor),i=e.resolve(s);return r?En.near(i):new qt(i)}content(){return new Tt(dt.from(this.node),0,0)}eq(e){return e instanceof qt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new n7(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new qt(e.resolve(n.anchor))}static create(e,n){return new qt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}qt.prototype.visible=!1;En.jsonID("node",qt);class n7{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new x3(r,r):new n7(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&qt.isSelectable(r)?new qt(n):En.near(n)}}class Ga extends En{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=Tt.empty){if(n==Tt.empty){e.delete(0,e.doc.content.size);let r=En.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Ga(e)}map(e){return new Ga(e)}eq(e){return e instanceof Ga}getBookmark(){return a6e}}En.jsonID("all",Ga);const a6e={map(){return this},resolve(t){return new Ga(t)}};function My(t,e,n,r,s,i=!1){if(e.inlineContent)return rn.create(t,n);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let a=e.child(o);if(a.isAtom){if(!i&&qt.isSelectable(a))return qt.create(t,n-(s<0?a.nodeSize:0))}else{let l=My(t,a,n+s,s<0?a.childCount:0,s,i);if(l)return l}n+=a.nodeSize*s}return null}function oV(t,e,n){let r=t.steps.length-1;if(r<e)return;let s=t.steps[r];if(!(s instanceof ui||s instanceof pi))return;let i=t.mapping.maps[r],o;i.forEach((a,l,c,d)=>{o==null&&(o=d)}),t.setSelection(En.near(t.doc.resolve(o),n))}const aV=1,sD=2,lV=4;class l6e extends rae{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|aV)&~sD,this.storedMarks=null,this}get selectionSet(){return(this.updated&aV)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=sD,this}ensureMarks(e){return Or.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&sD)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~sD,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Or.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(n);i=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,s.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(En.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=lV,this}get scrolledIntoView(){return(this.updated&lV)>0}}function cV(t,e){return!e||!t?t:t.bind(e)}class Ox{constructor(e,n,r){this.name=e,this.init=cV(n.init,r),this.apply=cV(n.apply,r)}}const c6e=[new Ox("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Ox("selection",{init(t,e){return t.selection||En.atStart(e.doc)},apply(t){return t.selection}}),new Ox("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Ox("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class P4{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=c6e.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ox(r.key,r.spec.state,r))})}}class jy{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=s?s[o].n:0,c=s?s[o].state:this,d=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(d&&r.filterTransaction(d,o)){if(d.setMeta("appendedTransaction",e),!s){s=[];for(let f=0;f<this.config.plugins.length;f++)s.push(f<o?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),i=!0}s&&(s[o]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new jy(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new l6e(this)}static create(e){let n=new P4(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new jy(n);for(let s=0;s<n.fields.length;s++)r[n.fields[s].name]=n.fields[s].init(e,r);return r}reconfigure(e){let n=new P4(this.schema,e.plugins),r=n.fields,s=new jy(n);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new P4(e.schema,e.plugins),i=new jy(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=Kp.fromJSON(e.schema,n.doc);else if(o.name=="selection")i.selection=En.fromJSON(i.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[o.name]=c.fromJSON.call(l,e,n[a],i);return}}i[o.name]=o.init(e,i)}}),i}}function sae(t,e,n){for(let r in t){let s=t[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=sae(s,e,{})),n[r]=s}return n}class is{constructor(e){this.spec=e,this.props={},e.props&&sae(e.props,this,this.props),this.key=e.key?e.key.key:iae("plugin")}getState(e){return e[this.key]}}const $4=Object.create(null);function iae(t){return t in $4?t+"$"+ ++$4[t]:($4[t]=0,t+"$")}class ni{constructor(e="key"){this.key=iae(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const r7=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function oae(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const aae=(t,e,n)=>{let r=oae(t,n);if(!r)return!1;let s=s7(r);if(!s){let o=r.blockRange(),a=o&&G1(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let i=s.nodeBefore;if(gae(t,s,e,-1))return!0;if(r.parent.content.size==0&&(o1(i,"end")||qt.isSelectable(i)))for(let o=r.depth;;o--){let a=b3(t.doc,r.before(o),r.after(o),Tt.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(o1(i,"end")?En.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):qt.create(l.doc,s.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},u6e=(t,e,n)=>{let r=oae(t,n);if(!r)return!1;let s=s7(r);return s?lae(t,s,e):!1},d6e=(t,e,n)=>{let r=uae(t,n);if(!r)return!1;let s=i7(r);return s?lae(t,s,e):!1};function lae(t,e,n){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let d=s.lastChild;if(!d)return!1;s=d}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let c=b3(t.doc,i,l,Tt.empty);if(!c||c.from!=i||c instanceof ui&&c.slice.size>=l-i)return!1;if(n){let d=t.tr.step(c);d.setSelection(rn.create(d.doc,i)),n(d.scrollIntoView())}return!0}function o1(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const cae=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=s7(r)}let o=i&&i.nodeBefore;return!o||!qt.isSelectable(o)?!1:(e&&e(t.tr.setSelection(qt.create(t.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function s7(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function uae(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const dae=(t,e,n)=>{let r=uae(t,n);if(!r)return!1;let s=i7(r);if(!s)return!1;let i=s.nodeAfter;if(gae(t,s,e,1))return!0;if(r.parent.content.size==0&&(o1(i,"start")||qt.isSelectable(i))){let o=b3(t.doc,r.before(),r.after(),Tt.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection(o1(i,"start")?En.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):qt.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},fae=(t,e,n)=>{let{$head:r,empty:s}=t.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=i7(r)}let o=i&&i.nodeAfter;return!o||!qt.isSelectable(o)?!1:(e&&e(t.tr.setSelection(qt.create(t.doc,i.pos)).scrollIntoView()),!0)};function i7(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const f6e=(t,e)=>{let n=t.selection,r=n instanceof qt,s;if(r){if(n.node.isTextblock||!Th(t.doc,n.from))return!1;s=n.from}else if(s=y3(t.doc,n.from,-1),s==null)return!1;if(e){let i=t.tr.join(s);r&&i.setSelection(qt.create(i.doc,s-t.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},p6e=(t,e)=>{let n=t.selection,r;if(n instanceof qt){if(n.node.isTextblock||!Th(t.doc,n.to))return!1;r=n.to}else if(r=y3(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},h6e=(t,e)=>{let{$from:n,$to:r}=t.selection,s=n.blockRange(r),i=s&&G1(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)},pae=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function o7(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const m6e=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let s=n.node(-1),i=n.indexAfter(-1),o=o7(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(En.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},hae=(t,e)=>{let n=t.selection,{$from:r,$to:s}=n;if(n instanceof Ga||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=o7(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,a=t.tr.insert(o,i.createAndFill());a.setSelection(rn.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},mae=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(zd(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),s=r&&G1(r);return s==null?!1:(e&&e(t.tr.lift(r,s).scrollIntoView()),!0)};function g6e(t){return(e,n)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof qt&&e.selection.node.isBlock)return!r.parentOffset||!zd(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],o,a,l=!1,c=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),c=r.start(m)==r.pos-(r.depth-m),a=o7(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),i.unshift(l&&a?{type:a}:null),o=m;break}else{if(m==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof rn||e.selection instanceof Ga)&&d.deleteSelection();let f=d.mapping.map(r.pos),p=zd(d.doc,f,i.length,i);if(p||(i[0]=a?{type:a}:null,p=zd(d.doc,f,i.length,i)),!p)return!1;if(d.split(f,i.length,i),!l&&c&&r.node(o).type!=a){let m=d.mapping.map(r.before(o)),v=d.doc.resolve(m);a&&r.node(o-1).canReplaceWith(v.index(),v.index()+1,a)&&d.setNodeMarkup(d.mapping.map(r.before(o)),a)}return n&&n(d.scrollIntoView()),!0}}const v6e=g6e(),y6e=(t,e)=>{let{$from:n,to:r}=t.selection,s,i=n.sharedDepth(r);return i==0?!1:(s=n.before(i),e&&e(t.tr.setSelection(qt.create(t.doc,s))),!0)};function b6e(t,e,n){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||Th(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function gae(t,e,n,r){let s=e.nodeBefore,i=e.nodeAfter,o,a,l=s.type.spec.isolating||i.type.spec.isolating;if(!l&&b6e(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(a=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let m=e.pos+i.nodeSize,v=dt.empty;for(let w=o.length-1;w>=0;w--)v=dt.from(o[w].create(null,v));v=dt.from(s.copy(v));let y=t.tr.step(new pi(e.pos-1,m,e.pos,m,new Tt(v,1,0),o.length,!0)),x=y.doc.resolve(m+2*o.length);x.nodeAfter&&x.nodeAfter.type==s.type&&Th(y.doc,x.pos)&&y.join(x.pos),n(y.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&l?null:En.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),p=f&&G1(f);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(f,p).scrollIntoView()),!0;if(c&&o1(i,"start",!0)&&o1(s,"end")){let m=s,v=[];for(;v.push(m),!m.isTextblock;)m=m.lastChild;let y=i,x=1;for(;!y.isTextblock;y=y.firstChild)x++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(n){let w=dt.empty;for(let E=v.length-1;E>=0;E--)w=dt.from(v[E].copy(w));let C=t.tr.step(new pi(e.pos-v.length,e.pos+i.nodeSize,e.pos+x,e.pos+i.nodeSize-x,new Tt(w,v.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function vae(t){return function(e,n){let r=e.selection,s=t<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(n&&n(e.tr.setSelection(rn.create(e.doc,t<0?s.start(i):s.end(i)))),!0):!1}}const x6e=vae(-1),S6e=vae(1);function w6e(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i),a=o&&t7(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function uV(t,e=null){return function(n,r){let s=!1;for(let i=0;i<n.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(o,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let d=n.doc.resolve(c),f=d.index();s=d.parent.canReplaceWith(f,f+1,t)}})}if(!s)return!1;if(r){let i=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}function a7(...t){return function(e,n,r){for(let s=0;s<t.length;s++)if(t[s](e,n,r))return!0;return!1}}a7(r7,aae,cae);a7(r7,dae,fae);a7(pae,hae,mae,v6e);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function C6e(t,e=null){return function(n,r){let{$from:s,$to:i}=n.selection,o=s.blockRange(i);if(!o)return!1;let a=r?n.tr:null;return E6e(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function E6e(t,e,n,r=null){let s=!1,i=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);i=new xT(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new xT(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),s=!0}let a=t7(i,n,r,e);return a?(t&&M6e(t,e,a,s,n),!0):!1}function M6e(t,e,n,r,s){let i=dt.empty;for(let d=n.length-1;d>=0;d--)i=dt.from(n[d].type.create(n[d].attrs,i));t.step(new pi(e.start-(r?2:0),e.end,e.start,e.end,new Tt(i,0,0),n.length,!0));let o=0;for(let d=0;d<n.length;d++)n[d].type==s&&(o=d+1);let a=n.length-o,l=e.start+n.length-(r?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,p=!0;d<f;d++,p=!1)!p&&zd(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(d).nodeSize;return t}function D6e(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?k6e(e,n,t,i):T6e(e,n,i):!0:!1}}function k6e(t,e,n,r){let s=t.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new pi(i-1,o,i,o,new Tt(dt.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new xT(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const a=G1(r);if(a==null)return!1;s.lift(r,a);let l=s.doc.resolve(s.mapping.map(i,-1)-1);return Th(s.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&s.join(l.pos),e(s.scrollIntoView()),!0}function T6e(t,e,n){let r=t.tr,s=n.parent;for(let m=n.end,v=n.endIndex-1,y=n.startIndex;v>y;v--)m-=s.child(v).nodeSize,r.delete(m-1,m+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(a?0:1),d+1,o.content.append(l?dt.empty:dt.from(s))))return!1;let f=i.pos,p=f+o.nodeSize;return r.step(new pi(f-(a?1:0),p+(l?1:0),f+1,p-1,new Tt((a?dt.empty:dt.from(s.copy(dt.empty))).append(l?dt.empty:dt.from(s.copy(dt.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function A6e(t){return function(e,n){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let a=i.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,d=dt.from(c?t.create():null),f=new Tt(dt.from(t.create(null,dt.from(a.type.create(null,d)))),c?3:1,0),p=i.start,m=i.end;n(e.tr.step(new pi(p-(c?3:1),m,p,m,f,1,!0)).scrollIntoView())}return!0}}const Ni=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},a1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let HL=null;const Dd=function(t,e,n){let r=HL||(HL=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},_6e=function(){HL=null},Jg=function(t,e,n,r){return n&&(dV(t,e,n,r,-1)||dV(t,e,n,r,1))},O6e=/^(img|br|input|textarea|hr)$/i;function dV(t,e,n,r,s){for(var i;;){if(t==n&&e==r)return!0;if(e==(s<0?0:bl(t))){let o=t.parentNode;if(!o||o.nodeType!=1||Vw(t)||O6e.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ni(t)+(s<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(s<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=s;else return!1;else t=o,e=s<0?bl(t):0}else return!1}}function bl(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function R6e(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=bl(t)}else if(t.parentNode&&!Vw(t))e=Ni(t),t=t.parentNode;else return null}}function N6e(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Vw(t))e=Ni(t)+1,t=t.parentNode;else return null}}function j6e(t,e,n){for(let r=e==0,s=e==bl(t);r||s;){if(t==n)return!0;let i=Ni(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,s=s&&i==bl(t)}}function Vw(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const S3=function(t){return t.focusNode&&Jg(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ug(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function I6e(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function L6e(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(bl(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(bl(r.startContainer),r.startOffset)}}}const Pu=typeof navigator<"u"?navigator:null,fV=typeof document<"u"?document:null,Ah=Pu&&Pu.userAgent||"",qL=/Edge\/(\d+)/.exec(Ah),yae=/MSIE \d/.exec(Ah),UL=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ah),ba=!!(yae||UL||qL),Jp=yae?document.documentMode:UL?+UL[1]:qL?+qL[1]:0,Cl=!ba&&/gecko\/(\d+)/i.test(Ah);Cl&&+(/Firefox\/(\d+)/.exec(Ah)||[0,0])[1];const VL=!ba&&/Chrome\/(\d+)/.exec(Ah),di=!!VL,bae=VL?+VL[1]:0,$i=!ba&&!!Pu&&/Apple Computer/.test(Pu.vendor),l1=$i&&(/Mobile\/\w+/.test(Ah)||!!Pu&&Pu.maxTouchPoints>2),vl=l1||(Pu?/Mac/.test(Pu.platform):!1),xae=Pu?/Win/.test(Pu.platform):!1,jd=/Android \d/.test(Ah),Ww=!!fV&&"webkitFontSmoothing"in fV.documentElement.style,P6e=Ww?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function $6e(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Sd(t,e){return typeof t=="number"?t:t[e]}function z6e(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function pV(t,e,n){let r=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=a1(o);continue}let a=o,l=a==i.body,c=l?$6e(i):z6e(a),d=0,f=0;if(e.top<c.top+Sd(r,"top")?f=-(c.top-e.top+Sd(s,"top")):e.bottom>c.bottom-Sd(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+Sd(s,"top")-c.top:e.bottom-c.bottom+Sd(s,"bottom")),e.left<c.left+Sd(r,"left")?d=-(c.left-e.left+Sd(s,"left")):e.right>c.right-Sd(r,"right")&&(d=e.right-c.right+Sd(s,"right")),d||f)if(l)i.defaultView.scrollBy(d,f);else{let m=a.scrollLeft,v=a.scrollTop;f&&(a.scrollTop+=f),d&&(a.scrollLeft+=d);let y=a.scrollLeft-m,x=a.scrollTop-v;e={left:e.left-y,top:e.top-x,right:e.right-y,bottom:e.bottom-x}}let p=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(p))break;o=p=="absolute"?o.offsetParent:a1(o)}}function F6e(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(i,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,s=l.top;break}}return{refDOM:r,refTop:s,stack:Sae(t.dom)}}function Sae(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=a1(r));return e}function B6e({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;wae(n,r==0?0:r-e)}function wae(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:s,left:i}=t[n];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let vy=null;function H6e(t){if(t.setActive)return t.setActive();if(vy)return t.focus(vy);let e=Sae(t);t.focus(vy==null?{get preventScroll(){return vy={preventScroll:!0},!0}}:void 0),vy||(vy=!1,wae(e,0))}function Cae(t,e){let n,r=2e8,s,i=0,o=e.top,a=e.top,l,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=Dd(d).getClientRects();else continue;for(let m=0;m<p.length;m++){let v=p[m];if(v.top<=o&&v.bottom>=a){o=Math.max(v.bottom,o),a=Math.min(v.top,a);let y=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(y<r){n=d,r=y,s=y&&n.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,d.nodeType==1&&y&&(i=f+(e.left>=(v.left+v.right)/2?1:0));continue}}else v.top>e.top&&!l&&v.left<=e.left&&v.right>=e.left&&(l=d,c={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!n&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(i=f+1)}}return!n&&l&&(n=l,s=c,r=0),n&&n.nodeType==3?q6e(n,s):!n||r&&n.nodeType==1?{node:t,offset:i}:Cae(n,s)}function q6e(t,e){let n=t.nodeValue.length,r=document.createRange(),s;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let o=bp(r,1);if(o.top!=o.bottom&&l7(e,o)){s={node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)};break}}return r.detach(),s||{node:t,offset:0}}function l7(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function U6e(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function V6e(t,e,n){let{node:r,offset:s}=Cae(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,s,i)}function W6e(t,e,n,r){let s=-1;for(let i=e,o=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?s=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(s=a.posAfter),o=!0),!a.contentDOM&&s<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function Eae(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=s;;){let o=t.childNodes[i];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l7(e,c))return Eae(o,e,c)}}if((i=(i+1)%r)==s)break}return t}function Y6e(t,e){let n=t.dom.ownerDocument,r,s=0,i=L6e(n,e.left,e.top);i&&({node:r,offset:s}=i);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=t.dom.getBoundingClientRect();if(!l7(e,c)||(o=Eae(t.dom,e,c),!o))return null}if($i)for(let c=o;r&&c;c=a1(c))c.draggable&&(r=void 0);if(o=U6e(o,e),r){if(Cl&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let d=r.childNodes[s],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&s++}let c;Ww&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==t.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(a=W6e(t,r,s,e))}a==null&&(a=V6e(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function hV(t){return t.top<t.bottom||t.left<t.right}function bp(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(hV(r))return r}return Array.prototype.find.call(n,hV)||t.getBoundingClientRect()}const G6e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Mae(t,e,n){let{node:r,offset:s,atom:i}=t.docView.domFromPos(e,n<0?-1:1),o=Ww||Cl;if(r.nodeType==3)if(o&&(G6e.test(r.nodeValue)||(n<0?!s:s==r.nodeValue.length))){let l=bp(Dd(r,s,s),n);if(Cl&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=bp(Dd(r,s-1,s-1),-1);if(c.top==l.top){let d=bp(Dd(r,s,s+1),-1);if(d.top!=l.top)return cx(d,d.left<c.left)}}return l}else{let l=s,c=s,d=n<0?1:-1;return n<0&&!s?(c++,d=-1):n>=0&&s==r.nodeValue.length?(l--,d=1):n<0?l--:c++,cx(bp(Dd(r,l,c),d),d<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(n<0||s==bl(r))){let l=r.childNodes[s-1];if(l.nodeType==1)return z4(l.getBoundingClientRect(),!1)}if(i==null&&s<bl(r)){let l=r.childNodes[s];if(l.nodeType==1)return z4(l.getBoundingClientRect(),!0)}return z4(r.getBoundingClientRect(),n>=0)}if(i==null&&s&&(n<0||s==bl(r))){let l=r.childNodes[s-1],c=l.nodeType==3?Dd(l,bl(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return cx(bp(c,1),!1)}if(i==null&&s<bl(r)){let l=r.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Dd(l,0,o?0:1):l.nodeType==1?l:null:null;if(c)return cx(bp(c,-1),!0)}return cx(bp(r.nodeType==3?Dd(r):r,-n),n>=0)}function cx(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function z4(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Dae(t,e,n){let r=t.state,s=t.root.activeElement;r!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),s!=t.dom&&s&&s.focus()}}function K6e(t,e,n){let r=e.selection,s=n=="up"?r.$from:r.$to;return Dae(t,e,()=>{let{node:i}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let o=Mae(t,s.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Dd(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(n=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const Z6e=/[\u0590-\u08ac]/;function J6e(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,a=t.domSelection();return a?!Z6e.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:o:Dae(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",n,"character");let m=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:v,focusOffset:y}=t.domSelectionRange(),x=v&&!m.contains(v.nodeType==1?v:v.parentNode)||l==v&&c==y;try{a.collapse(d,f),l&&(l!=d||c!=f)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),x}):r.pos==r.start()||r.pos==r.end()}let mV=null,gV=null,vV=!1;function X6e(t,e,n){return mV==e&&gV==n?vV:(mV=e,gV=n,vV=n=="up"||n=="down"?K6e(t,e,n):J6e(t,e,n))}const El=0,yV=1,vg=2,$u=3;class Yw{constructor(e,n,r,s){this.parent=e,this.children=n,this.dom=r,this.contentDOM=s,this.dirty=El,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let s=this.children[n];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>Ni(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!n||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let s=this.children[n],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let o=0;o<s.children.length;o++){let a=s.children[o];if(a.size){s=a;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],a=i+o.size;if(a>e||o instanceof Tae){s=e-i;break}i=a}if(s)return this.children[r].domFromPos(s-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof kae&&i.side>=0;r--);if(n<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&n&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Ni(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Ni(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,a=0;;a++){let l=this.children[a],c=o+l.size;if(s==-1&&e<=c){let d=o+l.border;if(e>=d&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,d);e=o;for(let f=a;f>0;f--){let p=this.children[f-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){s=Ni(p.dom)+1;break}e-=p.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let d=a+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=Ni(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,s=!1){let i=Math.min(e,n),o=Math.max(e,n);for(let m=0,v=0;m<this.children.length;m++){let y=this.children[m],x=v+y.size;if(i>v&&o<x)return y.setSelection(e-v-y.border,n-v-y.border,r,s);v=x}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),f=!1;if((Cl||$i)&&e==n){let{node:m,offset:v}=a;if(m.nodeType==3){if(f=!!(v&&m.nodeValue[v-1]==`
`),f&&v==m.nodeValue.length)for(let y=m,x;y;y=y.parentNode){if(x=y.nextSibling){x.nodeName=="BR"&&(a=l={node:x.parentNode,offset:Ni(x)+1});break}let w=y.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let y=m.childNodes[v-1];f=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(Cl&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(s=!0)}if(!(s||f&&$i)&&Jg(a.node,a.offset,d.anchorNode,d.anchorOffset)&&Jg(l.node,l.offset,d.focusNode,d.focusOffset))return;let p=!1;if((c.extend||e==n)&&!(f&&Cl)){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(e>n){let v=a;a=l,l=v}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+i.border,l=o-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?vg:yV,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=$u:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?vg:$u}r=o}this.dirty=vg}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?vg:yV;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class kae extends Yw{constructor(e,n,r,s){let i,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==El&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Q6e extends Yw{constructor(e,n,r,s){super(e,[],n,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Xg extends Yw{constructor(e,n,r,s,i){super(e,[],r,s),this.mark=n,this.spec=i}static create(e,n,r,s){let i=s.nodeViews[n.type.name],o=i&&i(n,s,r);return(!o||!o.dom)&&(o=hv.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Xg(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&$u||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=$u&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=El){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=El}}slice(e,n,r){let s=Xg.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;n<o&&(i=YL(i,n,o,r)),e>0&&(i=YL(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Xp extends Yw{constructor(e,n,r,s,i,o,a,l,c){super(e,[],i,o),this.node=n,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=a}static create(e,n,r,s,i,o){let a=i.nodeViews[n.type.name],l,c=a&&a(n,i,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,s),d=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=hv.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let p=d;return d=Oae(d,r,n),c?l=new eIe(e,n,r,s,d,f||null,p,c,i,o+1):n.isText?new w3(e,n,r,s,d,p,i):new Xp(e,n,r,s,d,f||null,p,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>dt.empty)}return e}matchesNode(e,n,r){return this.dirty==El&&e.eq(this.node)&&wT(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,s=n,i=e.composing?this.localCompositionInfo(e,n):null,o=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new nIe(this,o&&o.node,e);iIe(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e,d):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?Or.none:this.node.child(d).marks,r,e,d),l.placeWidget(c,e,s)},(c,d,f,p)=>{l.syncToMarks(c.marks,r,e,p);let m;l.findNodeMatch(c,d,f,p)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(m=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(c,d,f,m,e)||l.updateNextNode(c,d,f,e,p,s)||l.addNode(c,d,f,e,s),s+=c.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==vg)&&(o&&this.protectLocalComposition(e,o),Aae(this.contentDOM,this.children,e),l1&&oIe(this.dom))}localCompositionInfo(e,n){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof rn)||r<n||s>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,a=aIe(this.node.content,o,r-n,s-n);return a<0?null:{node:i,pos:a,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:s}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new Q6e(this,i,n,s);e.input.compositionNodes.push(o),this.children=YL(this.children,r,r+s.length,e,o)}update(e,n,r,s){return this.dirty==$u||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,s),!0)}updateInner(e,n,r,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=El}updateOuterDeco(e){if(wT(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=_ae(this.dom,this.nodeDOM,WL(this.outerDeco,this.node,n),WL(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function bV(t,e,n,r,s){Oae(r,e,t);let i=new Xp(void 0,t,e,n,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class w3 extends Xp{constructor(e,n,r,s,i,o,a){super(e,n,r,s,i,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,s){return this.dirty==$u||this.dirty!=El&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=El||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=El,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let s=this.node.cut(e,n),i=document.createTextNode(s.text);return new w3(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=$u)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Tae extends Yw{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==El&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class eIe extends Xp{constructor(e,n,r,s,i,o,a,l,c,d){super(e,n,r,s,i,o,a,c,d),this.spec=l}update(e,n,r,s){if(this.dirty==$u)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,s){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Aae(t,e,n){let r=t.firstChild,s=!1;for(let i=0;i<e.length;i++){let o=e[i],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=xV(r),s=!0;r=r.nextSibling}else s=!0,t.insertBefore(a,r);if(o instanceof Xg){let l=r?r.previousSibling:t.lastChild;Aae(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=xV(r),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const Zx=function(t){t&&(this.nodeName=t)};Zx.prototype=Object.create(null);const yg=[new Zx];function WL(t,e,n){if(t.length==0)return yg;let r=n?yg[0]:new Zx,s=[r];for(let i=0;i<t.length;i++){let o=t[i].type.attrs;if(o){o.nodeName&&s.push(r=new Zx(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&s.length==1&&s.push(r=new Zx(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return s}function _ae(t,e,n,r){if(n==yg&&r==yg)return e;let s=e;for(let i=0;i<r.length;i++){let o=r[i],a=n[i];if(i){let l;a&&a.nodeName==o.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=yg[0]),s=l}tIe(s,a||yg[0],o)}return s}function tIe(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&t.classList.add(s[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function Oae(t,e,n){return _ae(t,t,yg,WL(e,n,t.nodeType!=1))}function wT(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function xV(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class nIe{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=rIe(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,s){let i=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;i<a&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=El,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;s<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let d=this.index;d<c;d++){let f=this.top.children[d];if(f.matchesMark(e[o])&&!this.isLocked(f.dom)){l=d;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let d=Xg.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,d),this.top=d,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))i=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,r)&&!this.preMatch.matched.has(c)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,s,i){let o=this.top.children[s];return o.dirty==$u&&o.dom==o.contentDOM&&(o.dirty=vg),o.update(e,n,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=n}}updateNextNode(e,n,r,s,i,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Xp){let c=this.preMatch.matched.get(l);if(c!=null&&c!=i)return!1;let d=l.dom,f,p=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=$u&&wT(n,l.outerDeco));if(!p&&l.update(e,n,r,s))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(f=this.recreateWrapper(l,e,n,r,s,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=vg,f.updateChildren(s,o+1),f.dirty=El),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,s,i,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!wT(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let a=Xp.create(this.top,n,r,s,i,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,s,i){let o=Xp.create(this.top,e,n,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new kae(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Xg;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof w3)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&(($i||di)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new Tae(this.top,[],r,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function rIe(t,e){let n=e,r=n.children.length,s=t.childCount,i=new Map,o=[];e:for(;s>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof Xg)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,i.set(a,s),o.push(a)}}return{index:s,matched:i,matches:o.reverse()}}function sIe(t,e){return t.type.side-e.type.side}function iIe(t,e,n,r){let s=e.locals(t),i=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);r(d,s,e.forChild(i,d),c),i+=d.nodeSize}return}let o=0,a=[],l=null;for(let c=0;;){let d,f;for(;o<s.length&&s[o].to==i;){let x=s[o++];x.widget&&(d?(f||(f=[d])).push(x):d=x)}if(d)if(f){f.sort(sIe);for(let x=0;x<f.length;x++)n(f[x],c,!!l)}else n(d,c,!!l);let p,m;if(l)m=-1,p=l,l=null;else if(c<t.childCount)m=c,p=t.child(c++);else break;for(let x=0;x<a.length;x++)a[x].to<=i&&a.splice(x--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)a.push(s[o++]);let v=i+p.nodeSize;if(p.isText){let x=v;o<s.length&&s[o].from<x&&(x=s[o].from);for(let w=0;w<a.length;w++)a[w].to<x&&(x=a[w].to);x<v&&(l=p.cut(x-i),p=p.cut(0,x-i),v=x,m=-1)}else for(;o<s.length&&s[o].to<v;)o++;let y=p.isInline&&!p.isLeaf?a.filter(x=>!x.inline):a.slice();r(p,y,e.forChild(i,p),m),i=v}}function oIe(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function aIe(t,e,n,r){for(let s=0,i=0;s<t.childCount&&i<=r;){let o=t.child(s++),a=i;if(i+=o.nodeSize,!o.isText)continue;let l=o.text;for(;s<t.childCount;){let c=t.child(s++);if(i+=c.nodeSize,!c.isText)break;l+=c.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let c=a<r?l.lastIndexOf(e,r-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function YL(t,e,n,r,s){let i=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],c=a,d=a+=l.size;c>=n||d<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),s&&(i.push(s),s=void 0),d>n&&i.push(l.slice(n-c,l.size,r)))}return i}function c7(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),i=s&&s.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,c;if(S3(n)){for(l=o;s&&!s.node;)s=s.parent;let f=s.node;if(s&&f.isAtom&&qt.isSelectable(f)&&s.parent&&!(f.isInline&&j6e(n.focusNode,n.focusOffset,s.dom))){let p=s.posBefore;c=new qt(o==p?a:r.resolve(p))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=o,p=o;for(let m=0;m<n.rangeCount;m++){let v=n.getRangeAt(m);f=Math.min(f,t.docView.posFromDOM(v.startContainer,v.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(f<0)return null;[l,o]=p==t.state.selection.anchor?[p,f]:[f,p],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let f=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;c=u7(t,d,a,f)}return c}function Rae(t){return t.editable?t.hasFocus():jae(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Fd(t,e=!1){let n=t.state.selection;if(Nae(t,n),!!Rae(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&di){let r=t.domSelectionRange(),s=t.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&Jg(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)cIe(t);else{let{anchor:r,head:s}=n,i,o;SV&&!(n instanceof rn)&&(n.$from.parent.inlineContent||(i=wV(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=wV(t,n.to))),t.docView.setSelection(r,s,t,e),SV&&(i&&CV(i),o&&CV(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&lIe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const SV=$i||di&&bae<63;function wV(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),s=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if($i&&s&&s.contentEditable=="false")return F4(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return F4(s);if(i)return F4(i)}}function F4(t){return t.contentEditable="true",$i&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function CV(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function lIe(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Rae(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function cIe(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Ni(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&ba&&Jp<=11&&(n.disabled=!0,n.disabled=!1)}function Nae(t,e){if(e instanceof qt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(EV(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else EV(t)}function EV(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function u7(t,e,n,r){return t.someProp("createSelectionBetween",s=>s(t,e,n))||rn.between(e,n,r)}function MV(t){return t.editable&&!t.hasFocus()?!1:jae(t)}function jae(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function uIe(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Jg(e.node,e.offset,n.anchorNode,n.anchorOffset)}function GL(t,e){let{$anchor:n,$head:r}=t.selection,s=e>0?n.max(r):n.min(r),i=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return i&&En.findFrom(i,e)}function Ep(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function DV(t,e,n){let r=t.state.selection;if(r instanceof rn)if(n.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=t.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return Ep(t,new rn(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=GL(t.state,e);return s&&s instanceof qt?Ep(t,s):!1}else if(!(vl&&n.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let a=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?qt.isSelectable(i)?Ep(t,new qt(e<0?t.state.doc.resolve(s.pos-i.nodeSize):s)):Ww?Ep(t,new rn(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof qt&&r.node.isInline)return Ep(t,new rn(e>0?r.$to:r.$from));{let s=GL(t.state,e);return s?Ep(t,s):!1}}}function CT(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Jx(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function yy(t,e){return e<0?dIe(t):fIe(t)}function dIe(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s,i,o=!1;for(Cl&&n.nodeType==1&&r<CT(n)&&Jx(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Jx(a,-1))s=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Iae(n))break;{let a=n.previousSibling;for(;a&&Jx(a,-1);)s=n.parentNode,i=Ni(a),a=a.previousSibling;if(a)n=a,r=CT(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?KL(t,n,r):s&&KL(t,s,i)}function fIe(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let s=CT(n),i,o;for(;;)if(r<s){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Jx(a,1))i=n,o=++r;else break}else{if(Iae(n))break;{let a=n.nextSibling;for(;a&&Jx(a,1);)i=a.parentNode,o=Ni(a)+1,a=a.nextSibling;if(a)n=a,r=0,s=CT(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}i&&KL(t,i,o)}function Iae(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function pIe(t,e){for(;t&&e==t.childNodes.length&&!Vw(t);)e=Ni(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function hIe(t,e){for(;t&&!e&&!Vw(t);)e=Ni(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function KL(t,e,n){if(e.nodeType!=3){let i,o;(o=pIe(e,n))?(e=o,n=0):(i=hIe(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(S3(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&Fd(t)},50)}function kV(t,e){let n=t.state.doc.resolve(e);if(!(di||xae)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function TV(t,e,n){let r=t.state.selection;if(r instanceof rn&&!r.empty||n.indexOf("s")>-1||vl&&n.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=GL(t.state,e);if(o&&o instanceof qt)return Ep(t,o)}if(!s.parent.inlineContent){let o=e<0?s:i,a=r instanceof Ga?En.near(o,e):En.findFrom(o,e);return a?Ep(t,a):!1}return!1}function AV(t,e){if(!(t.state.selection instanceof rn))return!0;let{$head:n,$anchor:r,empty:s}=t.state.selection;if(!n.sameParent(r))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=t.state.tr;return e<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),t.dispatch(o),!0}return!1}function _V(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function mIe(t){if(!$i||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;_V(t,r,"true"),setTimeout(()=>_V(t,r,"false"),20)}return!1}function gIe(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function vIe(t,e){let n=e.keyCode,r=gIe(e);if(n==8||vl&&n==72&&r=="c")return AV(t,-1)||yy(t,-1);if(n==46&&!e.shiftKey||vl&&n==68&&r=="c")return AV(t,1)||yy(t,1);if(n==13||n==27)return!0;if(n==37||vl&&n==66&&r=="c"){let s=n==37?kV(t,t.state.selection.from)=="ltr"?-1:1:-1;return DV(t,s,r)||yy(t,s)}else if(n==39||vl&&n==70&&r=="c"){let s=n==39?kV(t,t.state.selection.from)=="ltr"?1:-1:1;return DV(t,s,r)||yy(t,s)}else{if(n==38||vl&&n==80&&r=="c")return TV(t,-1,r)||yy(t,-1);if(n==40||vl&&n==78&&r=="c")return mIe(t)||TV(t,1,r)||yy(t,1);if(r==(vl?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function d7(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let n=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let o=t.someProp("clipboardSerializer")||hv.fromSchema(t.state.schema),a=Bae(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=Fae[c.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let v=a.createElement(d[m]);for(;l.firstChild;)v.appendChild(l.firstChild);l.appendChild(v),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let p=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:p,slice:e}}function Lae(t,e,n,r,s){let i=s.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",p=>{e=p(e,i||r,t)}),i)return a=new Tt(dt.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0),t.someProp("transformPasted",p=>{a=p(a,t,!0)}),a;let f=t.someProp("clipboardTextParser",p=>p(e,s,r,t));if(f)a=f;else{let p=s.marks(),{schema:m}=t.state,v=hv.fromSchema(m);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let x=o.appendChild(document.createElement("p"));y&&x.appendChild(v.serializeNode(m.text(y,p)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),o=SIe(n),Ww&&wIe(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let p=o.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;o=p}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Zp.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||d),context:s,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!yIe.test(p.parentNode.nodeName)?{ignore:!0}:null}})),d)a=CIe(OV(a,+d[1],+d[2]),d[4]);else if(a=Tt.maxOpen(bIe(a.content,s),!0),a.openStart||a.openEnd){let f=0,p=0;for(let m=a.content.firstChild;f<a.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=a.content.lastChild;p<a.openEnd&&!m.type.spec.isolating;p++,m=m.lastChild);a=OV(a,f,p)}return t.someProp("transformPasted",f=>{a=f(a,t,l)}),a}const yIe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function bIe(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),i,o=[];if(t.forEach(a=>{if(!o)return;let l=s.findWrapping(a.type),c;if(!l)return o=null;if(c=o.length&&i.length&&$ae(l,i,a,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=zae(o[o.length-1],i.length));let d=Pae(a,l);o.push(d),s=s.matchType(d.type),i=l}}),o)return dt.from(o)}return t}function Pae(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,dt.from(t));return t}function $ae(t,e,n,r,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let i=$ae(t,e,n,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==t.length-1?n.type:t[s+1]))return r.copy(r.content.append(dt.from(Pae(n,t,s+1))))}}function zae(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,zae(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(dt.empty,!0);return t.copy(n.append(r))}function ZL(t,e,n,r,s,i){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(i=0),s<r-1&&(a=ZL(a,e,n,r,s+1,i)),s>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,i<=s).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(dt.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function OV(t,e,n){return e<t.openStart&&(t=new Tt(ZL(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new Tt(ZL(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Fae={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let RV=null;function Bae(){return RV||(RV=document.implementation.createHTMLDocument("title"))}let B4=null;function xIe(t){let e=window.trustedTypes;return e?(B4||(B4=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),B4.createHTML(t)):t}function SIe(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Bae().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),s;if((s=r&&Fae[r[1].toLowerCase()])&&(t=s.map(i=>"<"+i+">").join("")+t+s.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=xIe(t),s)for(let i=0;i<s.length;i++)n=n.querySelector(s[i])||n;return n}function wIe(t){let e=t.querySelectorAll(di?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function CIe(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:s,openStart:i,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;s=dt.from(l.create(r[a+1],s)),i++,o++}return new Tt(s,i,o)}const qo={},Uo={},EIe={touchstart:!0,touchmove:!0};class MIe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function DIe(t){for(let e in qo){let n=qo[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{TIe(t,r)&&!f7(t,r)&&(t.editable||!(r.type in Uo))&&n(t,r)},EIe[e]?{passive:!0}:void 0)}$i&&t.dom.addEventListener("input",()=>null),JL(t)}function Hp(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function kIe(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function JL(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>f7(t,r))})}function f7(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function TIe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function AIe(t,e){!f7(t,e)&&qo[e.type]&&(t.editable||!(e.type in Uo))&&qo[e.type](t,e)}Uo.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!qae(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(jd&&di&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),l1&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",s=>s(t,ug(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||vIe(t,n)?n.preventDefault():Hp(t,"key")};Uo.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Uo.keypress=(t,e)=>{let n=e;if(qae(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||vl&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof rn)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,s,i))&&t.dispatch(i()),n.preventDefault()}};function C3(t){return{left:t.clientX,top:t.clientY}}function _Ie(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function p7(t,e,n,r,s){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(t.someProp(e,a=>o>i.depth?a(t,n,i.nodeAfter,i.before(o),s,!0):a(t,n,i.node(o),i.before(o),s,!1)))return!0;return!1}function Vy(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function OIe(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&qt.isSelectable(r)?(Vy(t,new qt(n)),!0):!1}function RIe(t,e){if(e==-1)return!1;let n=t.state.selection,r,s;n instanceof qt&&(r=n.node);let i=t.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o);if(qt.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?s=i.before(n.$from.depth):s=i.before(o);break}}return s!=null?(Vy(t,qt.create(t.state.doc,s)),!0):!1}function NIe(t,e,n,r,s){return p7(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(s?RIe(t,n):OIe(t,n))}function jIe(t,e,n,r){return p7(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",s=>s(t,e,r))}function IIe(t,e,n,r){return p7(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",s=>s(t,e,r))||LIe(t,n,r)}function LIe(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(Vy(t,rn.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),a=s.before(i);if(o.inlineContent)Vy(t,rn.create(r,a+1,a+1+o.content.size));else if(qt.isSelectable(o))Vy(t,qt.create(r,a));else continue;return!0}}function h7(t){return ET(t)}const Hae=vl?"metaKey":"ctrlKey";qo.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=h7(t),s=Date.now(),i="singleClick";s-t.input.lastClick.time<500&&_Ie(n,t.input.lastClick)&&!n[Hae]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:i,button:n.button};let o=t.posAtCoords(C3(n));o&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new PIe(t,o,n,!!r)):(i=="doubleClick"?jIe:IIe)(t,o.pos,o.inside,n)?n.preventDefault():Hp(t,"pointer"))};class PIe{constructor(e,n,r,s){this.view=e,this.pos=n,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Hae],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),o=n.inside;else{let d=e.state.doc.resolve(n.pos);i=d.parent,o=d.depth?d.before():0}const a=s?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof qt&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Cl&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Hp(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Fd(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(C3(e))),this.updateAllowDefault(e),this.allowDefault||!n?Hp(this.view,"pointer"):NIe(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||$i&&this.mightDrag&&!this.mightDrag.node.isAtom||di&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Vy(this.view,En.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Hp(this.view,"pointer")}move(e){this.updateAllowDefault(e),Hp(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}qo.touchstart=t=>{t.input.lastTouch=Date.now(),h7(t),Hp(t,"pointer")};qo.touchmove=t=>{t.input.lastTouch=Date.now(),Hp(t,"pointer")};qo.contextmenu=t=>h7(t);function qae(t,e){return t.composing?!0:$i&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const $Ie=jd?5e3:-1;Uo.compositionstart=Uo.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof rn&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||di&&xae&&zIe(t)))t.markCursor=t.state.storedMarks||n.marks(),ET(t,!0),t.markCursor=null;else if(ET(t,!e.selection.empty),Cl&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}t.input.composing=!0}Uae(t,$Ie)};function zIe(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Uo.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Uae(t,20))};function Uae(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ET(t),e))}function Vae(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=BIe());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function FIe(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=R6e(e.focusNode,e.focusOffset),r=N6e(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let s=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function BIe(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ET(t,e=!1){if(!(jd&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Vae(t),e||t.docView&&t.docView.dirty){let n=c7(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function HIe(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const PS=ba&&Jp<15||l1&&P6e<604;qo.copy=Uo.cut=(t,e)=>{let n=e,r=t.state.selection,s=n.type=="cut";if(r.empty)return;let i=PS?null:n.clipboardData,o=r.content(),{dom:a,text:l}=d7(t,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):HIe(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qIe(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function UIe(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?$S(t,r.value,null,s,e):$S(t,r.textContent,r.innerHTML,s,e)},50)}function $S(t,e,n,r,s){let i=Lae(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,i||Tt.empty)))return!0;if(!i)return!1;let o=qIe(i),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Wae(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Uo.paste=(t,e)=>{let n=e;if(t.composing&&!jd)return;let r=PS?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&$S(t,Wae(r),r.getData("text/html"),s,n)?n.preventDefault():UIe(t,n)};class Yae{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const VIe=vl?"altKey":"ctrlKey";function Gae(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[VIe]}qo.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let s=t.state.selection,i=s.empty?null:t.posAtCoords(C3(n)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof qt?s.to-1:s.to))){if(r&&r.mightDrag)o=qt.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(o=qt.create(t.state.doc,f.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:c,slice:d}=d7(t,a);(!n.dataTransfer.files.length||!di||bae>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(PS?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",PS||n.dataTransfer.setData("text/plain",c),t.dragging=new Yae(d,Gae(t,n),o)};qo.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Uo.dragover=Uo.dragenter=(t,e)=>e.preventDefault();Uo.drop=(t,e)=>{try{WIe(t,e,t.dragging)}finally{t.dragging=null}};function WIe(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(C3(e));if(!r)return;let s=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",m=>{i=m(i,t,!1)}):i=Lae(t,Wae(e.dataTransfer),PS?null:e.dataTransfer.getData("text/html"),!1,s);let o=!!(n&&Gae(t,e));if(t.someProp("handleDrop",m=>m(t,e,i||Tt.empty,o))){e.preventDefault();return}if(!i)return;e.preventDefault();let a=i?Xoe(t.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let l=t.state.tr;if(o){let{node:m}=n;m?m.replace(l):l.deleteSelection()}let c=l.mapping.map(a),d=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=l.doc;if(d?l.replaceRangeWith(c,c,i.content.firstChild):l.replaceRange(c,c,i),l.doc.eq(f))return;let p=l.doc.resolve(c);if(d&&qt.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))l.setSelection(new qt(p));else{let m=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((v,y,x,w)=>m=w),l.setSelection(u7(t,p,l.doc.resolve(m)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}qo.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Fd(t)},20))};qo.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};qo.beforeinput=(t,e)=>{if(di&&jd&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,ug(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Uo)qo[t]=Uo[t];function zS(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class MT{constructor(e,n){this.toDOM=e,this.spec=n||_g,this.side=this.spec.side||0}map(e,n,r,s){let{pos:i,deleted:o}=e.mapResult(n.from+s,this.side<0?-1:1);return o?null:new zo(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof MT&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&zS(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Qp{constructor(e,n){this.attrs=e,this.spec=n||_g}map(e,n,r,s){let i=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new zo(i,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Qp&&zS(this.attrs,e.attrs)&&zS(this.spec,e.spec)}static is(e){return e.type instanceof Qp}destroy(){}}class m7{constructor(e,n){this.attrs=e,this.spec=n||_g}map(e,n,r,s){let i=e.mapResult(n.from+s,1);if(i.deleted)return null;let o=e.mapResult(n.to+s,-1);return o.deleted||o.pos<=i.pos?null:new zo(i.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:s}=e.content.findIndex(n.from),i;return s==n.from&&!(i=e.child(r)).isText&&s+i.nodeSize==n.to}eq(e){return this==e||e instanceof m7&&zS(this.attrs,e.attrs)&&zS(this.spec,e.spec)}destroy(){}}class zo{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new zo(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new zo(e,e,new MT(n,r))}static inline(e,n,r,s){return new zo(e,n,new Qp(r,s))}static node(e,n,r,s){return new zo(e,n,new m7(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Qp}get widget(){return this.type instanceof MT}}const Dy=[],_g={};class fs{constructor(e,n){this.local=e.length?e:Dy,this.children=n.length?n:Dy}static create(e,n){return n.length?DT(n,e,0,_g):so}find(e,n,r){let s=[];return this.findInner(e??0,n??1e9,s,0,r),s}findInner(e,n,r,s,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+s,a.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,s+a,i)}}map(e,n,r){return this==so||e.maps.length==0?this:this.mapInner(e,n,0,0,r||_g)}mapInner(e,n,r,s,i){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,s);l&&l.type.valid(n,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?YIe(this.children,o||[],e,n,r,s,i):o?new fs(o.sort(Og),Dy):so}add(e,n){return n.length?this==so?fs.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let s,i=0;e.forEach((a,l)=>{let c=l+r,d;if(d=Zae(n,a,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<l;)i+=3;s[i]==l?s[i+2]=s[i+2].addInner(a,d,c+1):s.splice(i,0,l,l+a.nodeSize,DT(d,a,c+1,_g)),i+=3}});let o=Kae(i?Jae(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new fs(o.length?this.local.concat(o).sort(Og):this.local,s||this.children)}remove(e){return e.length==0||this==so?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,a=r[i]+n,l=r[i+1]+n;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>a&&f.to<l&&(e[d]=null,(o||(o=[])).push(f));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,a+1);c!=so?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let a=0;a<s.length;a++)s[a].eq(o,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new fs(s,r):so}forChild(e,n){if(this==so)return this;if(n.isLeaf)return fs.empty;let r,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,o=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>i&&l.type instanceof Qp){let c=Math.max(i,l.from)-i,d=Math.min(o,l.to)-i;c<d&&(s||(s=[])).push(l.copy(c,d))}}if(s){let a=new fs(s.sort(Og),Dy);return r?new _p([a,r]):a}return r||so}eq(e){if(this==e)return!0;if(!(e instanceof fs)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return g7(this.localsInner(e))}localsInner(e){if(this==so)return Dy;if(e.inlineContent||!this.local.some(Qp.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Qp||n.push(this.local[r]);return n}forEachSet(e){e(this)}}fs.empty=new fs([],[]);fs.removeOverlap=g7;const so=fs.empty;class _p{constructor(e){this.members=e}map(e,n){const r=this.members.map(s=>s.map(e,n,_g));return _p.from(r)}forChild(e,n){if(n.isLeaf)return fs.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,n);i!=so&&(i instanceof _p?r=r.concat(i.members):r.push(i))}return _p.from(r)}eq(e){if(!(e instanceof _p)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?g7(r?n:n.sort(Og)):Dy}static from(e){switch(e.length){case 0:return so;case 1:return e[0];default:return new _p(e.every(n=>n instanceof fs)?e:e.reduce((n,r)=>n.concat(r instanceof fs?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function YIe(t,e,n,r,s,i,o){let a=t.slice();for(let c=0,d=i;c<n.maps.length;c++){let f=0;n.maps[c].forEach((p,m,v,y)=>{let x=y-v-(m-p);for(let w=0;w<a.length;w+=3){let C=a[w+1];if(C<0||p>C+d-f)continue;let E=a[w]+d-f;m>=E?a[w+1]=p<=E?-2:-1:p>=d&&x&&(a[w]+=x,a[w+1]+=x)}f+=x}),d=n.maps[c].map(d,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let d=n.map(t[c]+i),f=d-s;if(f<0||f>=r.content.size){l=!0;continue}let p=n.map(t[c+1]+i,-1),m=p-s,{index:v,offset:y}=r.content.findIndex(f),x=r.maybeChild(v);if(x&&y==f&&y+x.nodeSize==m){let w=a[c+2].mapInner(n,x,d+1,t[c]+i+1,o);w!=so?(a[c]=f,a[c+1]=m,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=GIe(a,t,e,n,s,i,o),d=DT(c,r,0,o);e=d.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,p=0;f<d.children.length;f+=3){let m=d.children[f];for(;p<a.length&&a[p]<m;)p+=3;a.splice(p,0,d.children[f],d.children[f+1],d.children[f+2])}}return new fs(e.sort(Og),a)}function Kae(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let s=t[r];n.push(new zo(s.from+e,s.to+e,s.type))}return n}function GIe(t,e,n,r,s,i,o){function a(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(r,s,c);f?n.push(f):o.onRemove&&o.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)a(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function Zae(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,s=null;for(let i=0,o;i<t.length;i++)(o=t[i])&&o.from>n&&o.to<r&&((s||(s=[])).push(o),t[i]=null);return s}function Jae(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function DT(t,e,n,r){let s=[],i=!1;e.forEach((a,l)=>{let c=Zae(t,a,l+n);if(c){i=!0;let d=DT(c,a,n+l+1,r);d!=so&&s.push(l,l+a.nodeSize,d)}});let o=Kae(i?Jae(t):t,-n).sort(Og);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||s.length?new fs(o,s):so}function Og(t,e){return t.from-e.from||t.to-e.to}function g7(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let s=n+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[s]=i.copy(i.from,r.to),NV(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),NV(e,s,r.copy(i.from,r.to)));break}}}return e}function NV(t,e,n){for(;e<t.length&&Og(n,t[e])>0;)e++;t.splice(e,0,n)}function H4(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=so&&e.push(r)}),t.cursorWrapper&&e.push(fs.create(t.state.doc,[t.cursorWrapper.deco])),_p.from(e)}const KIe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},ZIe=ba&&Jp<=11;class JIe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class XIe{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new JIe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);ba&&Jp<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():$i&&e.composing&&r.some(s=>s.type=="childList"&&s.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),ZIe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,KIe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(MV(this.view)){if(this.suppressingSelectionUpdates)return Fd(this.view);if(ba&&Jp<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Jg(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=a1(i))n.add(i);for(let i=e.anchorNode;i;i=a1(i))if(n.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&MV(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,a=!1,l=[];if(e.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],l);f&&(i=i<0?f.from:Math.min(f.from,i),o=o<0?f.to:Math.max(f.to,o),f.typeOver&&(a=!0))}if(Cl&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,p]=d;f.parentNode&&f.parentNode.parentNode==p.parentNode?p.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let p of d){let m=p.parentNode;m&&m.nodeName=="LI"&&(!f||tLe(e,f)!=m)&&p.remove()}}}else if((di||$i)&&l.some(d=>d.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let d of l)if(d.nodeName=="BR"&&d.parentNode){let f=d.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&d.parentNode.removeChild(d)}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&S3(r)&&(c=c7(e))&&c.eq(En.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Fd(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),QIe(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,nLe(e,l)),this.handleDOMChange(i,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Fd(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(ba&&Jp<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:p}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f),(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(i=p)}let o=s&&s.parentNode==e.target?Ni(s)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?Ni(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let jV=new WeakMap,IV=!1;function QIe(t){if(!jV.has(t)&&(jV.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Cl,IV)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),IV=!0}}function LV(t,e){let n=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return Jg(o.node,o.offset,s,i)&&([n,r,s,i]=[s,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:i}}function eLe(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return LV(t,s)}let n;function r(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?LV(t,n):null}function tLe(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function nLe(t,e){var n;let{focusNode:r,focusOffset:s}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let o=i.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let a=o;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(i,a.firstChild),r==i&&t.domSelection().collapse(i,s)}else i.parentNode.removeChild(i)}}function rLe(t,e,n){let{node:r,fromOffset:s,toOffset:i,from:o,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,d=l.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],S3(l)||c.push({node:l.focusNode,offset:l.focusOffset})),di&&t.input.lastKeyCode===8)for(let x=i;x>s;x--){let w=r.childNodes[x-1],C=w.pmViewDesc;if(w.nodeName=="BR"&&!C){i=x;break}if(!C||C.size)break}let f=t.state.doc,p=t.someProp("domParser")||Zp.fromSchema(t.state.schema),m=f.resolve(o),v=null,y=p.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:s,to:i,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:sLe,context:m});if(c&&c[0].pos!=null){let x=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=x),v={anchor:x+o,head:w+o}}return{doc:y,sel:v,from:o,to:a}}function sLe(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if($i&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||$i&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const iLe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function oLe(t,e,n,r,s){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let _=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,R=c7(t,_);if(R&&!t.state.selection.eq(R)){if(di&&jd&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",I=>I(t,ug(13,"Enter"))))return;let N=t.state.tr.setSelection(R);_=="pointer"?N.setMeta("pointer",!0):_=="key"&&N.scrollIntoView(),i&&N.setMeta("composition",i),t.dispatch(N)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=rLe(t,e,n),d=t.state.doc,f=d.slice(c.from,c.to),p,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(p=t.state.selection.to,m="end"):(p=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let v=cLe(f.content,c.doc.content,c.from,p,m);if(v&&t.input.domChangeCount++,(l1&&t.input.lastIOSEnter>Date.now()-225||jd)&&s.some(_=>_.nodeType==1&&!iLe.test(_.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",_=>_(t,ug(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!v)if(r&&l instanceof rn&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))v={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let _=PV(t,t.state.doc,c.sel);if(_&&!_.eq(t.state.selection)){let R=t.state.tr.setSelection(_);i&&R.setMeta("composition",i),t.dispatch(R)}}return}t.state.selection.from<t.state.selection.to&&v.start==v.endB&&t.state.selection instanceof rn&&(v.start>t.state.selection.from&&v.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?v.start=t.state.selection.from:v.endA<t.state.selection.to&&v.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(v.endB+=t.state.selection.to-v.endA,v.endA=t.state.selection.to)),ba&&Jp<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>c.from&&c.doc.textBetween(v.start-c.from-1,v.start-c.from+1)=="  "&&(v.start--,v.endA--,v.endB--);let y=c.doc.resolveNoCache(v.start-c.from),x=c.doc.resolveNoCache(v.endB-c.from),w=d.resolve(v.start),C=y.sameParent(x)&&y.parent.inlineContent&&w.end()>=v.endA;if((l1&&t.input.lastIOSEnter>Date.now()-225&&(!C||s.some(_=>_.nodeName=="DIV"||_.nodeName=="P"))||!C&&y.pos<c.doc.content.size&&(!y.sameParent(x)||!y.parent.inlineContent)&&y.pos<x.pos&&!/\S/.test(c.doc.textBetween(y.pos,x.pos,"","")))&&t.someProp("handleKeyDown",_=>_(t,ug(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&lLe(d,v.start,v.endA,y,x)&&t.someProp("handleKeyDown",_=>_(t,ug(8,"Backspace")))){jd&&di&&t.domObserver.suppressSelectionUpdates();return}di&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),jd&&!C&&y.start()!=x.start()&&x.parentOffset==0&&y.depth==x.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==v.endA&&(v.endB-=2,x=c.doc.resolveNoCache(v.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(_){return _(t,ug(13,"Enter"))})},20));let E=v.start,D=v.endA,T=_=>{let R=_||t.state.tr.replace(E,D,c.doc.slice(v.start-c.from,v.endB-c.from));if(c.sel){let N=PV(t,R.doc,c.sel);N&&!(di&&t.composing&&N.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(N.head==E||N.head==R.mapping.map(D)-1)||ba&&N.empty&&N.head==E)&&R.setSelection(N)}return i&&R.setMeta("composition",i),R.scrollIntoView()},A;if(C)if(y.pos==x.pos){ba&&Jp<=11&&y.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fd(t),20));let _=T(t.state.tr.delete(E,D)),R=d.resolve(v.start).marksAcross(d.resolve(v.endA));R&&_.ensureMarks(R),t.dispatch(_)}else if(v.endA==v.endB&&(A=aLe(y.parent.content.cut(y.parentOffset,x.parentOffset),w.parent.content.cut(w.parentOffset,v.endA-w.start())))){let _=T(t.state.tr);A.type=="add"?_.addMark(E,D,A.mark):_.removeMark(E,D,A.mark),t.dispatch(_)}else if(y.parent.child(y.index()).isText&&y.index()==x.index()-(x.textOffset?0:1)){let _=y.parent.textBetween(y.parentOffset,x.parentOffset),R=()=>T(t.state.tr.insertText(_,E,D));t.someProp("handleTextInput",N=>N(t,E,D,_,R))||t.dispatch(R())}else t.dispatch(T());else t.dispatch(T())}function PV(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:u7(t,e.resolve(n.anchor),e.resolve(n.head))}function aLe(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,s=n,i=r,o,a,l;for(let d=0;d<r.length;d++)s=r[d].removeFromSet(s);for(let d=0;d<n.length;d++)i=n[d].removeFromSet(i);if(s.length==1&&i.length==0)a=s[0],o="add",l=d=>d.mark(a.addToSet(d.marks));else if(s.length==0&&i.length==1)a=i[0],o="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(dt.from(c).eq(t))return{mark:a,type:o}}function lLe(t,e,n,r,s){if(n-e<=s.pos-r.pos||q4(r,!0,!1)<s.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=t.resolve(q4(i,!0,!0));return!o.parent.isTextblock||o.pos>n||q4(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function q4(t,e,n){let r=t.depth,s=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,s++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function cLe(t,e,n,r,s){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:o,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let l=Math.max(0,i-Math.min(o,a));r-=o+l-i}if(o<i&&t.size<e.size){let l=r<=i&&r>=o?i-r:0;i-=l,i&&i<e.size&&$V(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-o),o=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&$V(t.textBetween(i-1,i+1))&&(i+=l?1:-1),o=i+(o-a),a=i}return{start:i,endA:o,endB:a}}function $V(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class Xae{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new MIe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(qV),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=BV(this),FV(this),this.nodeViews=HV(this),this.docView=bV(this.state.doc,zV(this),H4(this),this.dom,this),this.domObserver=new XIe(this,(r,s,i,o)=>oLe(this,r,s,i,o)),this.domObserver.start(),DIe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&JL(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(qV),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(Vae(this),o=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let m=HV(this);dLe(m,this.nodeViews)&&(this.nodeViews=m,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&JL(this),this.editable=BV(this),FV(this);let l=H4(this),c=zV(this),d=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(s.selection))&&(o=!0);let p=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&F6e(this);if(o){this.domObserver.stop();let m=f&&(ba||di)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&uLe(s.selection,e.selection);if(f){let v=di?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=FIe(this)),(i||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=bV(e.doc,c,l,this.dom,this)),v&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&uIe(this))?Fd(this,m):(Nae(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&B6e(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof qt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&pV(this,n.getBoundingClientRect(),e)}else pV(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new Yae(e.slice,e.move,s<0?void 0:qt.create(this.state.doc,s))}someProp(e,n){let r=this._props&&this._props[e],s;if(r!=null&&(s=n?n(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(s=n?n(a):a))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let a=i[o].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(ba){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&H6e(this.dom),Fd(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Y6e(this,e)}coordsAtPos(e,n=1){return Mae(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let s=this.docView.posFromDOM(e,n,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return X6e(this,n||this.state,e)}pasteHTML(e,n){return $S(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return $S(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return d7(this,e)}destroy(){this.docView&&(kIe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],H4(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,_6e())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return AIe(this,e)}domSelectionRange(){let e=this.domSelection();return e?$i&&this.root.nodeType===11&&I6e(this.dom.ownerDocument)==this.dom&&eLe(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Xae.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function zV(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[zo.node(0,t.state.doc.content.size,e)]}function FV(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:zo.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function BV(t){return!t.someProp("editable",e=>e(t.state)===!1)}function uLe(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function HV(t){let e=Object.create(null);function n(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function dLe(t,e){let n=0,r=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)r++;return n!=r}function qV(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ch={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},kT={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},fLe=typeof navigator<"u"&&/Mac/.test(navigator.platform),pLe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ji=0;ji<10;ji++)ch[48+ji]=ch[96+ji]=String(ji);for(var ji=1;ji<=24;ji++)ch[ji+111]="F"+ji;for(var ji=65;ji<=90;ji++)ch[ji]=String.fromCharCode(ji+32),kT[ji]=String.fromCharCode(ji);for(var U4 in ch)kT.hasOwnProperty(U4)||(kT[U4]=ch[U4]);function hLe(t){var e=fLe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||pLe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?kT:ch)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const mLe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),gLe=typeof navigator<"u"&&/Win/.test(navigator.platform);function vLe(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))mLe?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),s&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function yLe(t){let e=Object.create(null);for(let n in t)e[vLe(n)]=t[n];return e}function V4(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function bLe(t){return new is({props:{handleKeyDown:Qae(t)}})}function Qae(t){let e=yLe(t);return function(n,r){let s=hLe(r),i,o=e[V4(s,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let a=e[V4(s,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(gLe&&r.ctrlKey&&r.altKey)&&(i=ch[r.keyCode])&&i!=s){let a=e[V4(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var xLe=Object.defineProperty,v7=(t,e)=>{for(var n in e)xLe(t,n,{get:e[n],enumerable:!0})};function E3(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:s}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=n.selection,s=n.doc,i=n.storedMarks,n}}}var M3=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:s}=n,i=this.buildProps(s);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...c)=>{const d=a(...c)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o=[],a=!!t,l=t||s.tr,c=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),o.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(n).map(([f,p])=>[f,(...v)=>{const y=this.buildProps(l,e),x=p(...v)(y);return o.push(x),d}])),run:c};return d}createCan(t){const{rawCommands:e,state:n}=this,r=!1,s=t||n.tr,i=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...c)=>l(...c)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:s}=this,{view:i}=r,o={tr:t,editor:r,view:i,state:E3({state:s,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(o)]))}};return o}},ele={};v7(ele,{blur:()=>SLe,clearContent:()=>wLe,clearNodes:()=>CLe,command:()=>ELe,createParagraphNear:()=>MLe,cut:()=>DLe,deleteCurrentNode:()=>kLe,deleteNode:()=>TLe,deleteRange:()=>ALe,deleteSelection:()=>_Le,enter:()=>OLe,exitCode:()=>RLe,extendMarkRange:()=>NLe,first:()=>jLe,focus:()=>LLe,forEach:()=>PLe,insertContent:()=>$Le,insertContentAt:()=>BLe,joinBackward:()=>ULe,joinDown:()=>qLe,joinForward:()=>VLe,joinItemBackward:()=>WLe,joinItemForward:()=>YLe,joinTextblockBackward:()=>GLe,joinTextblockForward:()=>KLe,joinUp:()=>HLe,keyboardShortcut:()=>JLe,lift:()=>XLe,liftEmptyBlock:()=>QLe,liftListItem:()=>ePe,newlineInCode:()=>tPe,resetAttributes:()=>nPe,scrollIntoView:()=>rPe,selectAll:()=>sPe,selectNodeBackward:()=>iPe,selectNodeForward:()=>oPe,selectParentNode:()=>aPe,selectTextblockEnd:()=>lPe,selectTextblockStart:()=>cPe,setContent:()=>uPe,setMark:()=>_Pe,setMeta:()=>OPe,setNode:()=>RPe,setNodeSelection:()=>NPe,setTextDirection:()=>jPe,setTextSelection:()=>IPe,sinkListItem:()=>LPe,splitBlock:()=>PPe,splitListItem:()=>$Pe,toggleList:()=>zPe,toggleMark:()=>FPe,toggleNode:()=>BPe,toggleWrap:()=>HPe,undoInputRule:()=>qPe,unsetAllMarks:()=>UPe,unsetMark:()=>VPe,unsetTextDirection:()=>WPe,updateAttributes:()=>YPe,wrapIn:()=>GPe,wrapInList:()=>KPe});var SLe=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),wLe=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),CLe=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:s}=r;return n&&s.forEach(({$from:i,$to:o})=>{t.doc.nodesBetween(i.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),p=c.resolve(d.map(l+a.nodeSize)),m=f.blockRange(p);if(!m)return;const v=G1(m);if(a.type.isTextblock){const{defaultType:y}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(m.start,y)}(v||v===0)&&e.lift(m,v)})}),!0},ELe=t=>e=>t(e),MLe=()=>({state:t,dispatch:e})=>hae(t,e),DLe=(t,e)=>({editor:n,tr:r})=>{const{state:s}=n,i=s.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new rn(r.doc.resolve(Math.max(o-1,0)))),!0},kLe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const s=t.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const a=s.before(i),l=s.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1};function Ws(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var TLe=t=>({tr:e,state:n,dispatch:r})=>{const s=Ws(t,n.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const l=i.before(o),c=i.after(o);e.delete(l,c).scrollIntoView()}return!0}return!1},ALe=t=>({tr:e,dispatch:n})=>{const{from:r,to:s}=t;return n&&e.delete(r,s),!0},_Le=()=>({state:t,dispatch:e})=>r7(t,e),OLe=()=>({commands:t})=>t.keyboardShortcut("Enter"),RLe=()=>({state:t,dispatch:e})=>m6e(t,e);function y7(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function TT(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>n.strict?e[s]===t[s]:y7(e[s])?e[s].test(t[s]):e[s]===t[s]):!0}function tle(t,e,n={}){return t.find(r=>r.type===e&&TT(Object.fromEntries(Object.keys(n).map(s=>[s,r.attrs[s]])),n))}function UV(t,e,n={}){return!!tle(t,e,n)}function b7(t,e,n){var r;if(!t||!e)return;let s=t.parent.childAfter(t.parentOffset);if((!s.node||!s.node.marks.some(d=>d.type===e))&&(s=t.parent.childBefore(t.parentOffset)),!s.node||!s.node.marks.some(d=>d.type===e)||(n=n||((r=s.node.marks[0])==null?void 0:r.attrs),!tle([...s.node.marks],e,n)))return;let o=s.index,a=t.start()+s.offset,l=o+1,c=a+s.node.nodeSize;for(;o>0&&UV([...t.parent.child(o-1).marks],e,n);)o-=1,a-=t.parent.child(o).nodeSize;for(;l<t.parent.childCount&&UV([...t.parent.child(l).marks],e,n);)c+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function uf(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var NLe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const i=uf(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:c,to:d}=a;if(s){const f=b7(l,i,e);if(f&&f.from<=c&&f.to>=d){const p=rn.create(o,f.from,f.to);n.setSelection(p)}}return!0},jLe=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function nle(t){return t instanceof rn}function bg(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function rle(t,e=null){if(!e)return null;const n=En.atStart(t),r=En.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const s=n.from,i=r.to;return e==="all"?rn.create(t,bg(0,s,i),bg(t.content.size,s,i)):rn.create(t,bg(e,s,i),bg(e,s,i))}function VV(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function AT(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function ILe(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var LLe=(t=null,e={})=>({editor:n,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{(AT()||VV())&&r.dom.focus(),ILe()&&!AT()&&!VV()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&t===null||t===!1)return!0;if(i&&t===null&&!nle(n.state.selection))return o(),!0;const a=rle(s.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||s.setSelection(a),l&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},PLe=(t,e)=>n=>t.every((r,s)=>e(r,{...n,index:s})),$Le=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),sle=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&sle(r)}return t};function iD(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return sle(n)}function FS(t,e,n){if(t instanceof Kp||t instanceof dt)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,s=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return dt.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),FS("",e,n)}if(s){if(n.errorOnInvalidContent){let o=!1,a="";const l=new Boe({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?Zp.fromSchema(l).parseSlice(iD(t),n.parseOptions):Zp.fromSchema(l).parse(iD(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=Zp.fromSchema(e);return n.slice?i.parseSlice(iD(t),n.parseOptions).content:i.parse(iD(t),n.parseOptions)}return FS("",e,n)}function zLe(t,e,n){const r=t.steps.length-1;if(r<e)return;const s=t.steps[r];if(!(s instanceof ui||s instanceof pi))return;const i=t.mapping.maps[r];let o=0;i.forEach((a,l,c,d)=>{o===0&&(o=d)}),t.setSelection(En.near(t.doc.resolve(o),n))}var FLe=t=>!("type"in t),BLe=(t,e,n)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=x=>{i.emit("contentError",{editor:i,error:x,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{FS(e,i.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(x){l(x)}try{a=FS(e,i.schema,{parseOptions:c,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:i.options.enableContentCheck})}catch(x){return l(x),!1}let{from:d,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,m=!0;if((FLe(a)?a:[a]).forEach(x=>{x.check(),p=p?x.isText&&x.marks.length===0:!1,m=m?x.isBlock:!1}),d===f&&m){const{parent:x}=r.doc.resolve(d);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(d-=1,f+=1)}let y;if(p){if(Array.isArray(e))y=e.map(x=>x.text||"").join("");else if(e instanceof dt){let x="";e.forEach(w=>{w.text&&(x+=w.text)}),y=x}else typeof e=="object"&&e&&e.text?y=e.text:y=e;r.insertText(y,d,f)}else{y=a;const x=r.doc.resolve(d),w=x.node(),C=x.parentOffset===0,E=w.isText||w.isTextblock,D=w.content.size>0;C&&E&&D&&(d=Math.max(0,d-1)),r.replaceWith(d,f,y)}n.updateSelection&&zLe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:y}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:y})}return!0},HLe=()=>({state:t,dispatch:e})=>f6e(t,e),qLe=()=>({state:t,dispatch:e})=>p6e(t,e),ULe=()=>({state:t,dispatch:e})=>aae(t,e),VLe=()=>({state:t,dispatch:e})=>dae(t,e),WLe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=y3(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},YLe=()=>({state:t,dispatch:e,tr:n})=>{try{const r=y3(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},GLe=()=>({state:t,dispatch:e})=>u6e(t,e),KLe=()=>({state:t,dispatch:e})=>d6e(t,e);function ile(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function ZLe(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,s,i,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))AT()||ile()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),s&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var JLe=t=>({editor:e,view:n,tr:r,dispatch:s})=>{const i=ZLe(t).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&s&&r.maybeStep(d)}),!0};function uh(t,e,n={}){const{from:r,to:s,empty:i}=t.selection,o=e?Ws(e,t.schema):null,a=[];t.doc.nodesBetween(r,s,(f,p)=>{if(f.isText)return;const m=Math.max(r,p),v=Math.min(s,p+f.nodeSize);a.push({node:f,from:m,to:v})});const l=s-r,c=a.filter(f=>o?o.name===f.node.type.name:!0).filter(f=>TT(f.node.attrs,n,{strict:!1}));return i?!!c.length:c.reduce((f,p)=>f+p.to-p.from,0)>=l}var XLe=(t,e={})=>({state:n,dispatch:r})=>{const s=Ws(t,n.schema);return uh(n,s,e)?h6e(n,r):!1},QLe=()=>({state:t,dispatch:e})=>mae(t,e),ePe=t=>({state:e,dispatch:n})=>{const r=Ws(t,e.schema);return D6e(r)(e,n)},tPe=()=>({state:t,dispatch:e})=>pae(t,e);function D3(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function WV(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,s)=>(n.includes(s)||(r[s]=t[s]),r),{})}var nPe=(t,e)=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=D3(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Ws(t,r.schema)),a==="mark"&&(o=uf(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(d,f)=>{i&&i===d.type&&(l=!0,s&&n.setNodeMarkup(f,void 0,WV(d.attrs,e))),o&&d.marks.length&&d.marks.forEach(p=>{o===p.type&&(l=!0,s&&n.addMark(f,f+d.nodeSize,o.create(WV(p.attrs,e))))})})}),l},rPe=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),sPe=()=>({tr:t,dispatch:e})=>{if(e){const n=new Ga(t.doc);t.setSelection(n)}return!0},iPe=()=>({state:t,dispatch:e})=>cae(t,e),oPe=()=>({state:t,dispatch:e})=>fae(t,e),aPe=()=>({state:t,dispatch:e})=>y6e(t,e),lPe=()=>({state:t,dispatch:e})=>S6e(t,e),cPe=()=>({state:t,dispatch:e})=>x6e(t,e);function XL(t,e,n={},r={}){return FS(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var uPe=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:s,tr:i,dispatch:o,commands:a})=>{const{doc:l}=i;if(r.preserveWhitespace!=="full"){const c=XL(t,s.schema,r,{errorOnInvalidContent:e??s.options.enableContentCheck});return o&&i.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return o&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??s.options.enableContentCheck})};function ole(t,e){const n=uf(e,t.schema),{from:r,to:s,empty:i}=t.selection,o=[];i?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,s,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function ale(t,e){const n=new rae(t);return e.forEach(r=>{r.steps.forEach(s=>{n.step(s)})}),n}function dPe(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function fPe(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(s,i)=>{n(s)&&r.push({node:s,pos:i})}),r}function pPe(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function k3(t){return e=>pPe(e.$from,t)}function Ft(t,e,n){return t.config[e]===void 0&&t.parent?Ft(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ft(t.parent,e,n):null}):t.config[e]}function x7(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Ft(e,"addExtensions",n);return r?[e,...x7(r())]:e}).flat(10)}function S7(t,e){const n=hv.fromSchema(e).serializeFragment(t),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(n),s.innerHTML}function lle(t){return typeof t=="function"}function yr(t,e=void 0,...n){return lle(t)?e?t.bind(e)(...n):t(...n):t}function hPe(t={}){return Object.keys(t).length===0&&t.constructor===Object}function c1(t){const e=t.filter(s=>s.type==="extension"),n=t.filter(s=>s.type==="node"),r=t.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function cle(t){const e=[],{nodeExtensions:n,markExtensions:r}=c1(t),s=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:s},l=Ft(o,"addGlobalAttributes",a);if(!l)return;l().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([p,m])=>{e.push({type:f,name:p,attribute:{...i,...m}})})})})}),s.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=Ft(o,"addAttributes",a);if(!l)return;const c=l();Object.entries(c).forEach(([d,f])=>{const p={...i,...f};typeof(p==null?void 0:p.default)=="function"&&(p.default=p.default()),p!=null&&p.isRequired&&(p==null?void 0:p.default)===void 0&&delete p.default,e.push({type:o.name,name:d,attribute:p})})}),e}function ms(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const a=i?String(i).split(" "):[],l=r[s]?r[s].split(" "):[],c=a.filter(d=>!l.includes(d));r[s]=[...l,...c].join(" ")}else if(s==="style"){const a=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],l=r[s]?r[s].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;l.forEach(d=>{const[f,p]=d.split(":").map(m=>m.trim());c.set(f,p)}),a.forEach(d=>{const[f,p]=d.split(":").map(m=>m.trim());c.set(f,p)}),r[s]=Array.from(c.entries()).map(([d,f])=>`${d}: ${f}`).join("; ")}else r[s]=i}),r},{})}function BS(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>ms(n,r),{})}function mPe(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function YV(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const s=e.reduce((i,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):mPe(n.getAttribute(o.name));return a==null?i:{...i,[o.name]:a}},{});return{...r,...s}}}}function GV(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&hPe(n)?!1:n!=null))}function KV(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function gPe(t,e){var n;const r=cle(t),{nodeExtensions:s,markExtensions:i}=c1(t),o=(n=s.find(c=>Ft(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(s.map(c=>{const d=r.filter(w=>w.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((w,C)=>{const E=Ft(C,"extendNodeSchema",f);return{...w,...E?E(c):{}}},{}),m=GV({...p,content:yr(Ft(c,"content",f)),marks:yr(Ft(c,"marks",f)),group:yr(Ft(c,"group",f)),inline:yr(Ft(c,"inline",f)),atom:yr(Ft(c,"atom",f)),selectable:yr(Ft(c,"selectable",f)),draggable:yr(Ft(c,"draggable",f)),code:yr(Ft(c,"code",f)),whitespace:yr(Ft(c,"whitespace",f)),linebreakReplacement:yr(Ft(c,"linebreakReplacement",f)),defining:yr(Ft(c,"defining",f)),isolating:yr(Ft(c,"isolating",f)),attrs:Object.fromEntries(d.map(KV))}),v=yr(Ft(c,"parseHTML",f));v&&(m.parseDOM=v.map(w=>YV(w,d)));const y=Ft(c,"renderHTML",f);y&&(m.toDOM=w=>y({node:w,HTMLAttributes:BS(w,d)}));const x=Ft(c,"renderText",f);return x&&(m.toText=x),[c.name,m]})),l=Object.fromEntries(i.map(c=>{const d=r.filter(x=>x.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},p=t.reduce((x,w)=>{const C=Ft(w,"extendMarkSchema",f);return{...x,...C?C(c):{}}},{}),m=GV({...p,inclusive:yr(Ft(c,"inclusive",f)),excludes:yr(Ft(c,"excludes",f)),group:yr(Ft(c,"group",f)),spanning:yr(Ft(c,"spanning",f)),code:yr(Ft(c,"code",f)),attrs:Object.fromEntries(d.map(KV))}),v=yr(Ft(c,"parseHTML",f));v&&(m.parseDOM=v.map(x=>YV(x,d)));const y=Ft(c,"renderHTML",f);return y&&(m.toDOM=x=>y({mark:x,HTMLAttributes:BS(x,d)})),[c.name,m]}));return new Boe({topNode:o,nodes:a,marks:l})}function vPe(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function _T(t){return t.sort((n,r)=>{const s=Ft(n,"priority")||100,i=Ft(r,"priority")||100;return s>i?-1:s<i?1:0})}function ule(t){const e=_T(x7(t)),n=vPe(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function dle(t,e,n){const{from:r,to:s}=e,{blockSeparator:i=`

`,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,s,(l,c,d,f)=>{var p;l.isBlock&&c>r&&(a+=i);const m=o==null?void 0:o[l.type.name];if(m)return d&&(a+=m({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(a+=(p=l==null?void 0:l.text)==null?void 0:p.slice(Math.max(r,c)-c,s-c))}),a}function yPe(t,e){const n={from:0,to:t.content.size};return dle(t,n,e)}function fle(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function bPe(t,e){const n=Ws(e,t.schema),{from:r,to:s}=t.selection,i=[];t.doc.nodesBetween(r,s,a=>{i.push(a)});const o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function ple(t,e){const n=D3(typeof e=="string"?e:e.name,t.schema);return n==="node"?bPe(t,e):n==="mark"?ole(t,e):{}}function xPe(t,e=JSON.stringify){const n={};return t.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(n,s)?!1:n[s]=!0})}function SPe(t){const e=xPe(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,o)=>o!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function hle(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const c=e.slice(i).map(a,-1),d=e.slice(i).map(l),f=e.invert().map(c,-1),p=e.invert().map(d);r.push({oldRange:{from:f,to:p},newRange:{from:c,to:d}})})}),SPe(r)}function w7(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(s=>{const i=n.resolve(t),o=b7(i,s.type);o&&r.push({mark:s,...o})}):n.nodesBetween(t,e,(s,i)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}var wPe=(t,e,n,r=20)=>{const s=t.doc.resolve(n);let i=r,o=null;for(;i>0&&o===null;){const a=s.node(i);(a==null?void 0:a.type.name)===e?o=a:i-=1}return[o,i]};function oD(t,e){return e.nodes[t]||e.marks[t]||null}function lk(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const s=t.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}var CPe=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,a)=>{var l,c;const d=((c=(l=s.type.spec).toText)==null?void 0:c.call(l,{node:s,pos:i,parent:o,index:a}))||s.textContent||"%leaf%";n+=s.isAtom&&!s.isText?d:d.slice(0,Math.max(0,r-i))}),n};function QL(t,e,n={}){const{empty:r,ranges:s}=t.selection,i=e?uf(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>i?i.name===f.type.name:!0).find(f=>TT(f.attrs,n,{strict:!1}));let o=0;const a=[];if(s.forEach(({$from:f,$to:p})=>{const m=f.pos,v=p.pos;t.doc.nodesBetween(m,v,(y,x)=>{if(!y.isText&&!y.marks.length)return;const w=Math.max(m,x),C=Math.min(v,x+y.nodeSize),E=C-w;o+=E,a.push(...y.marks.map(D=>({mark:D,from:w,to:C})))})}),o===0)return!1;const l=a.filter(f=>i?i.name===f.mark.type.name:!0).filter(f=>TT(f.mark.attrs,n,{strict:!1})).reduce((f,p)=>f+p.to-p.from,0),c=a.filter(f=>i?f.mark.type!==i&&f.mark.type.excludes(i):!0).reduce((f,p)=>f+p.to-p.from,0);return(l>0?l+c:l)>=o}function EPe(t,e,n={}){if(!e)return uh(t,null,n)||QL(t,null,n);const r=D3(e,t.schema);return r==="node"?uh(t,e,n):r==="mark"?QL(t,e,n):!1}var MPe=(t,e)=>{const{$from:n,$to:r,$anchor:s}=t.selection;if(e){const i=k3(a=>a.type.name===e)(t.selection);if(!i)return!1;const o=t.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},DPe=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function ZV(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function JV(t,e){const{nodeExtensions:n}=c1(e),r=n.find(o=>o.name===t);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=yr(Ft(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function T3(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let s=!0;return t.content.forEach(i=>{s!==!1&&(T3(i,{ignoreWhitespace:n,checkChildren:e})||(s=!1))}),s}return!1}function mle(t){return t instanceof qt}var gle=class vle{constructor(e){this.position=e}static fromJSON(e){return new vle(e.position)}toJSON(){return{position:this.position}}};function kPe(t,e){const n=e.mapping.mapResult(t.position);return{position:new gle(n.pos),mapResult:n}}function TPe(t){return new gle(t)}function APe(t,e,n){var r;const{selection:s}=e;let i=null;if(nle(s)&&(i=s.$cursor),i){const a=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:o}=s;return o.some(({$from:a,$to:l})=>{let c=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(d,f,p)=>{if(c)return!1;if(d.isInline){const m=!p||p.type.allowsMarkType(n),v=!!n.isInSet(d.marks)||!d.marks.some(y=>y.type.excludes(n));c=m&&v}return!c}),c})}var _Pe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=n,{empty:o,ranges:a}=i,l=uf(t,r.schema);if(s)if(o){const c=ole(r,l);n.addStoredMark(l.create({...c,...e}))}else a.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(d,f,(p,m)=>{const v=Math.max(m,d),y=Math.min(m+p.nodeSize,f);p.marks.find(w=>w.type===l)?p.marks.forEach(w=>{l===w.type&&n.addMark(v,y,l.create({...w.attrs,...e}))}):n.addMark(v,y,l.create(e))})});return APe(r,n,l)},OPe=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),RPe=(t,e={})=>({state:n,dispatch:r,chain:s})=>{const i=Ws(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:a})=>uV(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>uV(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},NPe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,s=bg(t,0,r.content.size),i=qt.create(r,s);e.setSelection(i)}return!0},jPe=(t,e)=>({tr:n,state:r,dispatch:s})=>{const{selection:i}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),s&&n.doc.nodesBetween(o,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:t})}),!0},IPe=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:s,to:i}=typeof t=="number"?{from:t,to:t}:t,o=rn.atStart(r).from,a=rn.atEnd(r).to,l=bg(s,o,a),c=bg(i,o,a),d=rn.create(r,l,c);e.setSelection(d)}return!0},LPe=t=>({state:e,dispatch:n})=>{const r=Ws(t,e.schema);return A6e(r)(e,n)};function XV(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(s=>e==null?void 0:e.includes(s.type.name));t.tr.ensureMarks(r)}}var PPe=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:s})=>{const{selection:i,doc:o}=e,{$from:a,$to:l}=i,c=s.extensionManager.attributes,d=lk(c,a.node().type.name,a.node().attrs);if(i instanceof qt&&i.node.isBlock)return!a.parentOffset||!zd(o,a.pos)?!1:(r&&(t&&XV(n,s.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:dPe(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=f&&p?[{type:p,attrs:d}]:void 0,v=zd(e.doc,e.mapping.map(a.pos),1,m);if(!m&&!v&&zd(e.doc,e.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(v=!0,m=p?[{type:p,attrs:d}]:void 0),r){if(v&&(i instanceof rn&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,m),p&&!f&&!a.parentOffset&&a.parent.type!==p)){const y=e.mapping.map(a.before()),x=e.doc.resolve(y);a.node(-1).canReplaceWith(x.index(),x.index()+1,p)&&e.setNodeMarkup(e.mapping.map(a.before()),p)}t&&XV(n,s.extensionManager.splittableMarks),e.scrollIntoView()}return v},$Pe=(t,e={})=>({tr:n,state:r,dispatch:s,editor:i})=>{var o;const a=Ws(t,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==a)return!1;const p=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(s){let w=dt.empty;const C=l.index(-1)?1:l.index(-2)?2:3;for(let R=l.depth-C;R>=l.depth-3;R-=1)w=dt.from(l.node(R).copy(w));const E=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,D={...lk(p,l.node().type.name,l.node().attrs),...e},T=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(D))||void 0;w=w.append(dt.from(a.createAndFill(null,T)||void 0));const A=l.before(l.depth-(C-1));n.replace(A,l.after(-E),new Tt(w,4-C,0));let _=-1;n.doc.nodesBetween(A,n.doc.content.size,(R,N)=>{if(_>-1)return!1;R.isTextblock&&R.content.size===0&&(_=N+1)}),_>-1&&n.setSelection(rn.near(n.doc.resolve(_))),n.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,v={...lk(p,f.type.name,f.attrs),...e},y={...lk(p,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,c.pos);const x=m?[{type:a,attrs:v},{type:m,attrs:y}]:[{type:a,attrs:v}];if(!zd(n.doc,l.pos,2))return!1;if(s){const{selection:w,storedMarks:C}=r,{splittableMarks:E}=i.extensionManager,D=C||w.$to.parentOffset&&w.$from.marks();if(n.split(l.pos,2,x).scrollIntoView(),!D||!s)return!0;const T=D.filter(A=>E.includes(A.type.name));n.ensureMarks(T)}return!0},W4=(t,e)=>{const n=k3(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&Th(t.doc,n.pos)&&t.join(n.pos),!0},Y4=(t,e)=>{const n=k3(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const s=t.doc.nodeAt(r);return n.node.type===(s==null?void 0:s.type)&&Th(t.doc,r)&&t.join(r),!0},zPe=(t,e,n,r={})=>({editor:s,tr:i,state:o,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:p}=s.extensionManager,m=Ws(t,o.schema),v=Ws(e,o.schema),{selection:y,storedMarks:x}=o,{$from:w,$to:C}=y,E=w.blockRange(C),D=x||y.$to.parentOffset&&y.$from.marks();if(!E)return!1;const T=k3(A=>JV(A.type.name,f))(y);if(E.depth>=1&&T&&E.depth-T.depth<=1){if(T.node.type===m)return c.liftListItem(v);if(JV(T.node.type.name,f)&&m.validContent(T.node.content)&&a)return l().command(()=>(i.setNodeMarkup(T.pos,m),!0)).command(()=>W4(i,m)).command(()=>Y4(i,m)).run()}return!n||!D||!a?l().command(()=>d().wrapInList(m,r)?!0:c.clearNodes()).wrapInList(m,r).command(()=>W4(i,m)).command(()=>Y4(i,m)).run():l().command(()=>{const A=d().wrapInList(m,r),_=D.filter(R=>p.includes(R.type.name));return i.ensureMarks(_),A?!0:c.clearNodes()}).wrapInList(m,r).command(()=>W4(i,m)).command(()=>Y4(i,m)).run()},FPe=(t,e={},n={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=n,o=uf(t,r.schema);return QL(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},BPe=(t,e,n={})=>({state:r,commands:s})=>{const i=Ws(t,r.schema),o=Ws(e,r.schema),a=uh(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?s.setNode(o,l):s.setNode(i,{...l,...n})},HPe=(t,e={})=>({state:n,commands:r})=>{const s=Ws(t,n.schema);return uh(n,s,e)?r.lift(s):r.wrapIn(s,e)},qPe=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const s=n[r];let i;if(s.spec.isInputRules&&(i=s.getState(t))){if(e){const o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},UPe=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:s}=n;return r||e&&s.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},VPe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=uf(t,r.schema),{$from:c,empty:d,ranges:f}=a;if(!s)return!0;if(d&&o){let{from:p,to:m}=a;const v=(i=c.marks().find(x=>x.type===l))==null?void 0:i.attrs,y=b7(c,l,v);y&&(p=y.from,m=y.to),n.removeMark(p,m,l)}else f.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,l)});return n.removeStoredMark(l),!0},WPe=t=>({tr:e,state:n,dispatch:r})=>{const{selection:s}=n;let i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=s.from,o=s.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,e.setNodeMarkup(l,void 0,c)}),!0},YPe=(t,e={})=>({tr:n,state:r,dispatch:s})=>{let i=null,o=null;const a=D3(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Ws(t,r.schema)),a==="mark"&&(o=uf(t,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;let p,m,v,y;n.selection.empty?r.doc.nodesBetween(d,f,(x,w)=>{i&&i===x.type&&(l=!0,v=Math.max(w,d),y=Math.min(w+x.nodeSize,f),p=w,m=x)}):r.doc.nodesBetween(d,f,(x,w)=>{w<d&&i&&i===x.type&&(l=!0,v=Math.max(w,d),y=Math.min(w+x.nodeSize,f),p=w,m=x),w>=d&&w<=f&&(i&&i===x.type&&(l=!0,s&&n.setNodeMarkup(w,void 0,{...x.attrs,...e})),o&&x.marks.length&&x.marks.forEach(C=>{if(o===C.type&&(l=!0,s)){const E=Math.max(w,d),D=Math.min(w+x.nodeSize,f);n.addMark(E,D,o.create({...C.attrs,...e}))}}))}),m&&(p!==void 0&&s&&n.setNodeMarkup(p,void 0,{...m.attrs,...e}),o&&m.marks.length&&m.marks.forEach(x=>{o===x.type&&s&&n.addMark(v,y,o.create({...x.attrs,...e}))}))}),l},GPe=(t,e={})=>({state:n,dispatch:r})=>{const s=Ws(t,n.schema);return w6e(s,e)(n,r)},KPe=(t,e={})=>({state:n,dispatch:r})=>{const s=Ws(t,n.schema);return C6e(s,e)(n,r)},ZPe=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},A3=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},JPe=(t,e)=>{if(y7(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function aD(t){var e;const{editor:n,from:r,to:s,text:i,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(e=c.nodeBefore||c.nodeAfter)!=null&&e.marks.find(p=>p.type.spec.code))return!1;let d=!1;const f=CPe(c)+i;return o.forEach(p=>{if(d)return;const m=JPe(f,p.find);if(!m)return;const v=l.state.tr,y=E3({state:l.state,transaction:v}),x={from:r-(m[0].length-i.length),to:s},{commands:w,chain:C,can:E}=new M3({editor:n,state:y});p.handler({state:y,range:x,match:m,commands:w,chain:C,can:E})===null||!v.steps.length||(p.undoable&&v.setMeta(a,{transform:v,from:r,to:s,text:i}),l.dispatch(v),d=!0)}),d}function XPe(t){const{editor:e,rules:n}=t,r=new is({state:{init(){return null},apply(s,i,o){const a=s.getMeta(r);if(a)return a;const l=s.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=S7(dt.from(d),o.schema);const{from:f}=l,p=f+d.length;aD({editor:e,from:f,to:p,text:d,rules:n,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,a){return aD({editor:e,from:i,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&aD({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?aD({editor:e,from:o.pos,to:o.pos,text:`
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function QPe(t){return Object.prototype.toString.call(t).slice(8,-1)}function lD(t){return QPe(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function yle(t,e){const n={...t};return lD(t)&&lD(e)&&Object.keys(e).forEach(r=>{lD(e[r])&&lD(t[r])?n[r]=yle(t[r],e[r]):n[r]=e[r]}),n}var C7=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...yr(Ft(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...yr(Ft(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>yle(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Uu=class ble extends C7{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new ble(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=o.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function e9e(t){return typeof t=="number"}var t9e=class{constructor(t){this.find=t.find,this.handler=t.handler}},n9e=(t,e,n)=>{if(y7(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=t,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function r9e(t){const{editor:e,state:n,from:r,to:s,rule:i,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:c,can:d}=new M3({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,s,(m,v)=>{var y,x,w,C,E;if((x=(y=m.type)==null?void 0:y.spec)!=null&&x.code||!(m.isText||m.isTextblock||m.isInline))return;const D=(E=(C=(w=m.content)==null?void 0:w.size)!=null?C:m.nodeSize)!=null?E:0,T=Math.max(r,v),A=Math.min(s,v+D);if(T>=A)return;const _=m.isText?m.text||"":m.textBetween(T-v,A-v,void 0,"￼");n9e(_,i.find,o).forEach(N=>{if(N.index===void 0)return;const I=T+N.index+1,$=I+N[0].length,L={from:n.tr.mapping.map(I),to:n.tr.mapping.map($)},z=i.handler({state:n,range:L,match:N,commands:l,chain:c,can:d,pasteEvent:o,dropEvent:a});f.push(z)})}),f.every(m=>m!==null)}var cD=null,s9e=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function i9e(t){const{editor:e,rules:n}=t;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:f,to:p,rule:m,pasteEvt:v})=>{const y=d.tr,x=E3({state:d,transaction:y});if(!(!r9e({editor:e,state:x,from:Math.max(f-1,0),to:p.b-1,rule:m,pasteEvent:v,dropEvent:a})||!y.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return n.map(d=>new is({view(f){const p=v=>{var y;r=(y=f.dom.parentElement)!=null&&y.contains(v.target)?f.dom.parentElement:null,r&&(cD=e)},m=()=>{cD&&(cD=null)};return window.addEventListener("dragstart",p),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",p),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(f,p)=>{if(i=r===f.dom.parentElement,a=p,!i){const m=cD;m!=null&&m.isEditable&&setTimeout(()=>{const v=m.state.selection;v&&m.commands.deleteRange({from:v.from,to:v.to})},10)}return!1},paste:(f,p)=>{var m;const v=(m=p.clipboardData)==null?void 0:m.getData("text/html");return o=p,s=!!(v!=null&&v.includes("data-pm-slice")),!1}}},appendTransaction:(f,p,m)=>{const v=f[0],y=v.getMeta("uiEvent")==="paste"&&!s,x=v.getMeta("uiEvent")==="drop"&&!i,w=v.getMeta("applyPasteRules"),C=!!w;if(!y&&!x&&!C)return;if(C){let{text:T}=w;typeof T=="string"?T=T:T=S7(dt.from(T),m.schema);const{from:A}=w,_=A+T.length,R=s9e(T);return l({rule:d,state:m,from:A,to:{b:_},pasteEvt:R})}const E=p.doc.content.findDiffStart(m.doc.content),D=p.doc.content.findDiffEnd(m.doc.content);if(!(!e9e(E)||!D||E===D.b))return l({rule:d,state:m,from:E,to:D,pasteEvt:o})}}))}var _3=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=ule(t),this.schema=gPe(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:oD(e.name,this.schema)},r=Ft(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return _T([...this.extensions].reverse()).flatMap(r=>{const s={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:oD(r.name,this.schema)},i=[],o=Ft(r,"addKeyboardShortcuts",s);let a={};if(r.type==="mark"&&Ft(r,"exitable",s)&&(a.ArrowRight=()=>Uu.handleExit({editor:t,mark:r})),o){const p=Object.fromEntries(Object.entries(o()).map(([m,v])=>[m,()=>v({editor:t})]));a={...a,...p}}const l=bLe(a);i.push(l);const c=Ft(r,"addInputRules",s);if(ZV(r,t.options.enableInputRules)&&c){const p=c();if(p&&p.length){const m=XPe({editor:t,rules:p}),v=Array.isArray(m)?m:[m];i.push(...v)}}const d=Ft(r,"addPasteRules",s);if(ZV(r,t.options.enablePasteRules)&&d){const p=d();if(p&&p.length){const m=i9e({editor:t,rules:p});i.push(...m)}}const f=Ft(r,"addProseMirrorPlugins",s);if(f){const p=f();i.push(...p)}return i})}get attributes(){return cle(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=c1(this.extensions);return Object.fromEntries(e.filter(n=>!!Ft(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Ws(n.name,this.schema)},i=Ft(n,"addNodeView",s);if(!i)return[];const o=i();if(!o)return[];const a=(l,c,d,f,p)=>{const m=BS(l,r);return o({node:l,view:c,getPos:d,decorations:f,innerDecorations:p,editor:t,extension:n,HTMLAttributes:m})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return _T([...this.extensions].reverse()).reduceRight((r,s)=>{const i={name:s.name,options:s.options,storage:this.editor.extensionStorage[s.name],editor:e,type:oD(s.name,this.schema)},o=Ft(s,"dispatchTransaction",i);return o?a=>{o.call(i,{transaction:a,next:r})}:r},t)}get markViews(){const{editor:t}=this,{markExtensions:e}=c1(this.extensions);return Object.fromEntries(e.filter(n=>!!Ft(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:uf(n.name,this.schema)},i=Ft(n,"addMarkView",s);if(!i)return[];const o=(a,l,c)=>{const d=BS(a,r);return i()({mark:a,view:l,inline:c,editor:t,extension:n,HTMLAttributes:d,updateAttributes:f=>{b9e(a,t,f)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:oD(e.name,this.schema)};e.type==="mark"&&((n=yr(Ft(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const s=Ft(e,"onBeforeCreate",r),i=Ft(e,"onCreate",r),o=Ft(e,"onUpdate",r),a=Ft(e,"onSelectionUpdate",r),l=Ft(e,"onTransaction",r),c=Ft(e,"onFocus",r),d=Ft(e,"onBlur",r),f=Ft(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};_3.resolve=ule;_3.sort=_T;_3.flatten=x7;var o9e={};v7(o9e,{ClipboardTextSerializer:()=>Sle,Commands:()=>wle,Delete:()=>Cle,Drop:()=>Ele,Editable:()=>Mle,FocusEvents:()=>kle,Keymap:()=>Tle,Paste:()=>Ale,Tabindex:()=>_le,TextDirection:()=>Ole,focusEventsPluginKey:()=>Dle});var gs=class xle extends C7{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new xle(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},Sle=gs.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new is({key:new ni("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:s}=e,{ranges:i}=s,o=Math.min(...i.map(d=>d.$from.pos)),a=Math.max(...i.map(d=>d.$to.pos)),l=fle(n);return dle(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),wle=gs.create({name:"commands",addCommands(){return{...ele}}}),Cle=gs.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,s;const i=()=>{var o,a,l,c;if((c=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?c:t.getMeta("y-sync$"))return;const d=ale(t.before,[t,...e]);hle(d).forEach(m=>{d.mapping.mapResult(m.oldRange.from).deletedAfter&&d.mapping.mapResult(m.oldRange.to).deletedBefore&&d.before.nodesBetween(m.oldRange.from,m.oldRange.to,(v,y)=>{const x=y+v.nodeSize-2,w=m.oldRange.from<=y&&x<=m.oldRange.to;this.editor.emit("delete",{type:"node",node:v,from:y,to:x,newFrom:d.mapping.map(y),newTo:d.mapping.map(x),deletedRange:m.oldRange,newRange:m.newRange,partial:!w,editor:this.editor,transaction:t,combinedTransform:d})})});const p=d.mapping;d.steps.forEach((m,v)=>{var y,x;if(m instanceof mc){const w=p.slice(v).map(m.from,-1),C=p.slice(v).map(m.to),E=p.invert().map(w,-1),D=p.invert().map(C),T=(y=d.doc.nodeAt(w-1))==null?void 0:y.marks.some(_=>_.eq(m.mark)),A=(x=d.doc.nodeAt(C))==null?void 0:x.marks.some(_=>_.eq(m.mark));this.editor.emit("delete",{type:"mark",mark:m.mark,from:m.from,to:m.to,deletedRange:{from:E,to:D},newRange:{from:w,to:C},partial:!!(A||T),editor:this.editor,transaction:t,combinedTransform:d})}})};(s=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||s?setTimeout(i,0):i()}}),Ele=gs.create({name:"drop",addProseMirrorPlugins(){return[new is({key:new ni("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Mle=gs.create({name:"editable",addProseMirrorPlugins(){return[new is({key:new ni("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Dle=new ni("focusEvents"),kle=gs.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new is({key:Dle,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Tle=gs.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:d,$anchor:f}=l,{pos:p,parent:m}=f,v=f.parent.isTextblock&&p>0?a.doc.resolve(p-1):f,y=v.parent.type.spec.isolating,x=f.pos-f.parentOffset,w=y&&v.parent.childCount===1?x===f.pos:En.atStart(c).from===p;return!d||!m.type.isTextblock||m.textContent.length||!w||w&&f.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return AT()||ile()?i:s},addProseMirrorPlugins(){return[new is({key:new ni("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(y=>y.getMeta("composition")))return;const r=t.some(y=>y.docChanged)&&!e.doc.eq(n.doc),s=t.some(y=>y.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:a}=e.selection,l=En.atStart(e.doc).from,c=En.atEnd(e.doc).to;if(i||!(o===l&&a===c)||!T3(n.doc))return;const p=n.tr,m=E3({state:n,transaction:p}),{commands:v}=new M3({editor:this.editor,state:m});if(v.clearNodes(),!!p.steps.length)return p}})]}}),Ale=gs.create({name:"paste",addProseMirrorPlugins(){return[new is({key:new ni("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),_le=gs.create({name:"tabindex",addProseMirrorPlugins(){return[new is({key:new ni("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Ole=gs.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=c1(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new is({key:new ni("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),a9e=class ky{constructor(e,n,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=s}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new ky(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ky(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ky(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const s=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=this.pos+r+(i?0:1);if(o<0||o>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(o);if(!s&&a.depth<=this.depth)return;const l=new ky(a,this.editor,s,s?n:null);s&&(l.actualDepth=this.depth+1),e.push(new ky(a,this.editor,s,s?n:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(n).length>0){const i=s.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(i[l]!==n[l])break}}else r=s;s=s.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(n);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(l=>n[l]===o.node.attrs[l])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,n,r))))}),s}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},l9e=`.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}`;function c9e(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute("data-tiptap-style",""),s.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(s),s}var u9e=class extends ZPe{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:kPe,createMappablePosition:TPe},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:s,moved:i})=>this.options.onDrop(r,s,i)),this.on("paste",({event:r,slice:s})=>this.options.onPaste(r,s)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=rle(e,this.options.autofocus);this.editorState=jy.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=c9e(l9e,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=lle(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(s=>{const i=typeof s=="string"?`${s}$`:s.key;n=n.filter(o=>!o.key.startsWith(i))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[Mle,Sle.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),wle,kle,Tle,_le,Ele,Ale,Cle,Ole.configure({direction:this.options.textDirection})].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new _3(r,this)}createCommandManager(){this.commandManager=new M3({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=XL(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=XL(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),s=n?this.extensionManager.dispatchTransaction(r):r;this.editorView=new Xae(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.prependClass(),this.injectCSS();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(c=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(c)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),s=n.includes(t),i=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!s)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=o==null?void 0:o.getMeta("focus"),l=o==null?void 0:o.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||i.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return ple(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return EPe(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return S7(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`

`,textSerializers:n={}}=t||{};return yPe(this.state.doc,{blockSeparator:e,textSerializers:{...fle(this.schema),...n}})}get isEmpty(){return T3(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new a9e(e,this)}get $doc(){return this.$pos(0)}};function Qg(t){return new A3({find:t.find,handler:({state:e,range:n,match:r})=>{const s=yr(t.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),c=n.from+a.indexOf(o),d=c+o.length;if(w7(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===t.type&&y!==m.mark.type)).filter(m=>m.to>c).length)return null;d<n.to&&i.delete(d,n.to),c>n.from&&i.delete(n.from+l,c);const p=n.from+l+o.length;i.addMark(n.from+l,p,t.type.create(s||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function d9e(t){return new A3({find:t.find,handler:({state:e,range:n,match:r})=>{const s=yr(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from;let a=n.to;const l=t.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=o+c;d>a?d=a:a=d+r[1].length;const f=r[0][r[0].length-1];i.insertText(f,o+r[0].length-1),i.replaceWith(d,a,l)}else if(r[0]){const c=t.type.isInline?o:o-1;i.insert(c,t.type.create(s)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function eP(t){return new A3({find:t.find,handler:({state:e,range:n,match:r})=>{const s=e.doc.resolve(n.from),i=yr(t.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function u1(t){return new A3({find:t.find,handler:({state:e,range:n,match:r,chain:s})=>{const i=yr(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),c=l&&t7(l,t.type,i);if(!c)return null;if(o.wrap(l,c),t.keepMarks&&t.editor){const{selection:f,storedMarks:p}=e,{splittableMarks:m}=t.editor.extensionManager,v=p||f.$to.parentOffset&&f.$from.marks();if(v){const y=v.filter(x=>m.includes(x.type.name));o.ensureMarks(y)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(f,i).run()}const d=o.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&Th(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&o.join(n.from-1)},undoable:t.undoable})}function f9e(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof qt){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let s=r.depth;for(;s>=0;){const i=r.index(s);if(r.node(s).contentMatchAt(i).matchType(e))return!0;s-=1}return!1}var p9e={};v7(p9e,{createAtomBlockMarkdownSpec:()=>h9e,createBlockMarkdownSpec:()=>m9e,createInlineMarkdownSpec:()=>y9e,parseAttributes:()=>E7,parseIndentedBlocks:()=>tP,renderNestedMarkdownContent:()=>D7,serializeAttributes:()=>M7});function E7(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),s=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(s){const c=s.map(d=>d.trim().slice(1));e.class=c.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,c,d])=>{var f;const p=parseInt(((f=d.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),m=n[p];m&&(e[c]=m.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(e[d]=!0)}),e}function M7(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function h9e(t){const{nodeName:e,name:n,parseAttributes:r=E7,serializeAttributes:s=M7,defaultAttributes:i={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,c=d=>{if(!a)return d;const f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{const p={...i,...d.attributes};return f.createNode(e,p,[])},markdownTokenizer:{name:e,level:"block",start(d){var f;const p=new RegExp(`^:::${l}(?:\\s|$)`,"m"),m=(f=d.match(p))==null?void 0:f.index;return m!==void 0?m:-1},tokenize(d,f,p){const m=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),v=d.match(m);if(!v)return;const y=v[1]||"",x=r(y);if(!o.find(C=>!(C in x)))return{type:e,raw:v[0],attributes:x}}},renderMarkdown:d=>{const f=c(d.attrs||{}),p=s(f),m=p?` {${p}}`:"";return`:::${l}${m} :::`}}}function m9e(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=E7,serializeAttributes:i=M7,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,c=n||e,d=f=>{if(!l)return f;const p={};return l.forEach(m=>{m in f&&(p[m]=f[m])}),p};return{parseMarkdown:(f,p)=>{let m;if(r){const y=r(f);m=typeof y=="string"?[{type:"text",text:y}]:y}else a==="block"?m=p.parseChildren(f.tokens||[]):m=p.parseInline(f.tokens||[]);const v={...o,...f.attributes};return p.createNode(e,v,m)},markdownTokenizer:{name:e,level:"block",start(f){var p;const m=new RegExp(`^:::${c}`,"m"),v=(p=f.match(m))==null?void 0:p.index;return v!==void 0?v:-1},tokenize(f,p,m){var v;const y=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),x=f.match(y);if(!x)return;const[w,C=""]=x,E=s(C);let D=1;const T=w.length;let A="";const _=/^:::([\w-]*)(\s.*)?/gm,R=f.slice(T);for(_.lastIndex=0;;){const N=_.exec(R);if(N===null)break;const I=N.index,$=N[1];if(!((v=N[2])!=null&&v.endsWith(":::"))){if($)D+=1;else if(D-=1,D===0){const L=R.slice(0,I);A=L.trim();const z=f.slice(0,T+I+N[0].length);let F=[];if(A)if(a==="block")for(F=m.blockTokens(L),F.forEach(q=>{q.text&&(!q.tokens||q.tokens.length===0)&&(q.tokens=m.inlineTokens(q.text))});F.length>0;){const q=F[F.length-1];if(q.type==="paragraph"&&(!q.text||q.text.trim()===""))F.pop();else break}else F=m.inlineTokens(A);return{type:e,raw:z,attributes:E,content:A,tokens:F}}}}}},renderMarkdown:(f,p)=>{const m=d(f.attrs||{}),v=i(m),y=v?` {${v}}`:"",x=p.renderChildren(f.content||[],`

`);return`:::${c}${y}

${x}

:::`}}}function g9e(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,s,i,o]=r;e[s]=i||o,r=n.exec(t)}return e}function v9e(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function y9e(t){const{nodeName:e,name:n,getContent:r,parseAttributes:s=g9e,serializeAttributes:i=v9e,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,c=n||e,d=p=>{if(!l)return p;const m={};return l.forEach(v=>{const y=typeof v=="string"?v:v.name,x=typeof v=="string"?void 0:v.skipIfDefault;if(y in p){const w=p[y];if(x!==void 0&&w===x)return;m[y]=w}}),m},f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(p,m)=>{const v={...o,...p.attributes};if(a)return m.createNode(e,v);const y=r?r(p):p.content||"";return y?m.createNode(e,v,[m.createTextNode(y)]):m.createNode(e,v,[])},markdownTokenizer:{name:e,level:"inline",start(p){const m=a?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),v=p.match(m),y=v==null?void 0:v.index;return y!==void 0?y:-1},tokenize(p,m,v){const y=a?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),x=p.match(y);if(!x)return;let w="",C="";if(a){const[,D]=x;C=D}else{const[,D,T]=x;C=D,w=T||""}const E=s(C.trim());return{type:e,raw:x[0],content:w.trim(),attributes:E}}},renderMarkdown:p=>{let m="";r?m=r(p):p.content&&p.content.length>0&&(m=p.content.filter(w=>w.type==="text").map(w=>w.text).join(""));const v=d(p.attrs||{}),y=i(v),x=y?` ${y}`:"";return a?`[${c}${x}]`:`[${c}${x}]${m}[/${c}]`}}}function tP(t,e,n){var r,s,i,o;const a=t.split(`
`),l=[];let c="",d=0;const f=e.baseIndentSize||2;for(;d<a.length;){const p=a[d],m=p.match(e.itemPattern);if(!m){if(l.length>0)break;if(p.trim()===""){d+=1,c=`${c}${p}
`;continue}else return}const v=e.extractItemData(m),{indentLevel:y,mainContent:x}=v;c=`${c}${p}
`;const w=[x];for(d+=1;d<a.length;){const T=a[d];if(T.trim()===""){const _=a.slice(d+1).findIndex(I=>I.trim()!=="");if(_===-1)break;if((((s=(r=a[d+1+_].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:s.length)||0)>y){w.push(T),c=`${c}${T}
`,d+=1;continue}else break}if((((o=(i=T.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:o.length)||0)>y)w.push(T),c=`${c}${T}
`,d+=1;else break}let C;const E=w.slice(1);if(E.length>0){const T=E.map(A=>A.slice(y+f)).join(`
`);T.trim()&&(e.customNestedParser?C=e.customNestedParser(T):C=n.blockTokens(T))}const D=e.createToken(v,C);l.push(D)}if(l.length!==0)return{items:l,raw:c}}function D7(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const s=typeof n=="function"?n(r):n,[i,...o]=t.content,a=e.renderChildren([i]),l=[`${s}${a}`];return o&&o.length>0&&o.forEach(c=>{const d=e.renderChildren([c]);if(d){const f=d.split(`
`).map(p=>p?e.indent(p):"").join(`
`);l.push(f)}}),l.join(`
`)}function b9e(t,e,n={}){const{state:r}=e,{doc:s,tr:i}=r,o=t;s.descendants((a,l)=>{const c=i.mapping.map(l),d=i.mapping.map(l)+a.nodeSize;let f=null;if(a.marks.forEach(m=>{if(m!==o)return!1;f=m}),!f)return;let p=!1;if(Object.keys(n).forEach(m=>{n[m]!==f.attrs[m]&&(p=!0)}),p){const m=t.type.create({...t.attrs,...n});i.removeMark(c,d,t.type),i.addMark(c,d,m)}}),i.docChanged&&e.view.dispatch(i)}var Qa=class Rle extends C7{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new Rle(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function dh(t){return new t9e({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:s})=>{const i=yr(t.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let c=n.to;if(a){const d=l.search(/\S/),f=n.from+l.indexOf(a),p=f+a.length;if(w7(n.from,n.to,e.doc).filter(v=>v.mark.type.excluded.find(x=>x===t.type&&x!==v.mark.type)).filter(v=>v.to>f).length)return null;p<n.to&&o.delete(p,n.to),f>n.from&&o.delete(n.from+d,f),c=n.from+d+a.length,o.addMark(n.from+d,c,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}const x9e=" ögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",S9e="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",nP="numeric",rP="ascii",sP="alpha",Xx="asciinumeric",Rx="alphanumeric",iP="domain",Nle="emoji",w9e="scheme",C9e="slashscheme",G4="whitespace";function E9e(t,e){return t in e||(e[t]=[]),e[t]}function xg(t,e,n){e[nP]&&(e[Xx]=!0,e[Rx]=!0),e[rP]&&(e[Xx]=!0,e[sP]=!0),e[Xx]&&(e[Rx]=!0),e[sP]&&(e[Rx]=!0),e[Rx]&&(e[iP]=!0),e[Nle]&&(e[iP]=!0);for(const r in e){const s=E9e(r,n);s.indexOf(t)<0&&s.push(t)}}function M9e(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function pa(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}pa.groups={};pa.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let s=0;s<t.length;s++)this.tt(t[s],e,n,r)},tr(t,e,n,r){r=r||pa.groups;let s;return e&&e.j?s=e:(s=new pa(e),n&&r&&xg(e,n,r)),this.jr.push([t,s]),s},ts(t,e,n,r){let s=this;const i=t.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(t[o]);return s.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||pa.groups;const s=this;if(e&&e.j)return s.j[t]=e,e;const i=e;let o,a=s.go(t);if(a?(o=new pa,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new pa,i){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(M9e(o.t,r),n);xg(i,l,r)}else n&&xg(i,n,r);o.t=i}return s.j[t]=o,o}};const wn=(t,e,n,r,s)=>t.ta(e,n,r,s),Ss=(t,e,n,r,s)=>t.tr(e,n,r,s),QV=(t,e,n,r,s)=>t.ts(e,n,r,s),pt=(t,e,n,r,s)=>t.tt(e,n,r,s),Md="WORD",oP="UWORD",jle="ASCIINUMERICAL",Ile="ALPHANUMERICAL",HS="LOCALHOST",aP="TLD",lP="UTLD",ck="SCHEME",Ty="SLASH_SCHEME",k7="NUM",cP="WS",T7="NL",Qx="OPENBRACE",eS="CLOSEBRACE",OT="OPENBRACKET",RT="CLOSEBRACKET",NT="OPENPAREN",jT="CLOSEPAREN",IT="OPENANGLEBRACKET",LT="CLOSEANGLEBRACKET",PT="FULLWIDTHLEFTPAREN",$T="FULLWIDTHRIGHTPAREN",zT="LEFTCORNERBRACKET",FT="RIGHTCORNERBRACKET",BT="LEFTWHITECORNERBRACKET",HT="RIGHTWHITECORNERBRACKET",qT="FULLWIDTHLESSTHAN",UT="FULLWIDTHGREATERTHAN",VT="AMPERSAND",WT="APOSTROPHE",YT="ASTERISK",Mp="AT",GT="BACKSLASH",KT="BACKTICK",ZT="CARET",Op="COLON",A7="COMMA",JT="DOLLAR",fu="DOT",XT="EQUALS",_7="EXCLAMATION",ml="HYPHEN",tS="PERCENT",QT="PIPE",eA="PLUS",tA="POUND",nS="QUERY",O7="QUOTE",Lle="FULLWIDTHMIDDLEDOT",R7="SEMI",pu="SLASH",rS="TILDE",nA="UNDERSCORE",Ple="EMOJI",rA="SYM";var $le=Object.freeze({__proto__:null,ALPHANUMERICAL:Ile,AMPERSAND:VT,APOSTROPHE:WT,ASCIINUMERICAL:jle,ASTERISK:YT,AT:Mp,BACKSLASH:GT,BACKTICK:KT,CARET:ZT,CLOSEANGLEBRACKET:LT,CLOSEBRACE:eS,CLOSEBRACKET:RT,CLOSEPAREN:jT,COLON:Op,COMMA:A7,DOLLAR:JT,DOT:fu,EMOJI:Ple,EQUALS:XT,EXCLAMATION:_7,FULLWIDTHGREATERTHAN:UT,FULLWIDTHLEFTPAREN:PT,FULLWIDTHLESSTHAN:qT,FULLWIDTHMIDDLEDOT:Lle,FULLWIDTHRIGHTPAREN:$T,HYPHEN:ml,LEFTCORNERBRACKET:zT,LEFTWHITECORNERBRACKET:BT,LOCALHOST:HS,NL:T7,NUM:k7,OPENANGLEBRACKET:IT,OPENBRACE:Qx,OPENBRACKET:OT,OPENPAREN:NT,PERCENT:tS,PIPE:QT,PLUS:eA,POUND:tA,QUERY:nS,QUOTE:O7,RIGHTCORNERBRACKET:FT,RIGHTWHITECORNERBRACKET:HT,SCHEME:ck,SEMI:R7,SLASH:pu,SLASH_SCHEME:Ty,SYM:rA,TILDE:rS,TLD:aP,UNDERSCORE:nA,UTLD:lP,UWORD:oP,WORD:Md,WS:cP});const wd=/[a-z]/,ux=new RegExp("\\p{L}","u"),K4=new RegExp("\\p{Emoji}","u"),Cd=/\d/,Z4=/\s/,eW="\r",J4=`
`,D9e="️",k9e="‍",X4="￼";let uD=null,dD=null;function T9e(t=[]){const e={};pa.groups=e;const n=new pa;uD==null&&(uD=tW(x9e)),dD==null&&(dD=tW(S9e)),pt(n,"'",WT),pt(n,"{",Qx),pt(n,"}",eS),pt(n,"[",OT),pt(n,"]",RT),pt(n,"(",NT),pt(n,")",jT),pt(n,"<",IT),pt(n,">",LT),pt(n,"（",PT),pt(n,"）",$T),pt(n,"「",zT),pt(n,"」",FT),pt(n,"『",BT),pt(n,"』",HT),pt(n,"＜",qT),pt(n,"＞",UT),pt(n,"&",VT),pt(n,"*",YT),pt(n,"@",Mp),pt(n,"`",KT),pt(n,"^",ZT),pt(n,":",Op),pt(n,",",A7),pt(n,"$",JT),pt(n,".",fu),pt(n,"=",XT),pt(n,"!",_7),pt(n,"-",ml),pt(n,"%",tS),pt(n,"|",QT),pt(n,"+",eA),pt(n,"#",tA),pt(n,"?",nS),pt(n,'"',O7),pt(n,"/",pu),pt(n,";",R7),pt(n,"~",rS),pt(n,"_",nA),pt(n,"\\",GT),pt(n,"・",Lle);const r=Ss(n,Cd,k7,{[nP]:!0});Ss(r,Cd,r);const s=Ss(r,wd,jle,{[Xx]:!0}),i=Ss(r,ux,Ile,{[Rx]:!0}),o=Ss(n,wd,Md,{[rP]:!0});Ss(o,Cd,s),Ss(o,wd,o),Ss(s,Cd,s),Ss(s,wd,s);const a=Ss(n,ux,oP,{[sP]:!0});Ss(a,wd),Ss(a,Cd,i),Ss(a,ux,a),Ss(i,Cd,i),Ss(i,wd),Ss(i,ux,i);const l=pt(n,J4,T7,{[G4]:!0}),c=pt(n,eW,cP,{[G4]:!0}),d=Ss(n,Z4,cP,{[G4]:!0});pt(n,X4,d),pt(c,J4,l),pt(c,X4,d),Ss(c,Z4,d),pt(d,eW),pt(d,J4),Ss(d,Z4,d),pt(d,X4,d);const f=Ss(n,K4,Ple,{[Nle]:!0});pt(f,"#"),Ss(f,K4,f),pt(f,D9e,f);const p=pt(f,k9e);pt(p,"#"),Ss(p,K4,f);const m=[[wd,o],[Cd,s]],v=[[wd,null],[ux,a],[Cd,i]];for(let y=0;y<uD.length;y++)dp(n,uD[y],aP,Md,m);for(let y=0;y<dD.length;y++)dp(n,dD[y],lP,oP,v);xg(aP,{tld:!0,ascii:!0},e),xg(lP,{utld:!0,alpha:!0},e),dp(n,"file",ck,Md,m),dp(n,"mailto",ck,Md,m),dp(n,"http",Ty,Md,m),dp(n,"https",Ty,Md,m),dp(n,"ftp",Ty,Md,m),dp(n,"ftps",Ty,Md,m),xg(ck,{scheme:!0,ascii:!0},e),xg(Ty,{slashscheme:!0,ascii:!0},e),t=t.sort((y,x)=>y[0]>x[0]?1:-1);for(let y=0;y<t.length;y++){const x=t[y][0],C=t[y][1]?{[w9e]:!0}:{[C9e]:!0};x.indexOf("-")>=0?C[iP]=!0:wd.test(x)?Cd.test(x)?C[Xx]=!0:C[rP]=!0:C[nP]=!0,QV(n,x,x,C)}return QV(n,"localhost",HS,{ascii:!0}),n.jd=new pa(rA),{start:n,tokens:Object.assign({groups:e},$le)}}function zle(t,e){const n=A9e(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,s=[];let i=0,o=0;for(;o<r;){let a=t,l=null,c=0,d=null,f=-1,p=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(f=0,p=0,d=a):f>=0&&(f+=n[o].length,p++),c+=n[o].length,i+=n[o].length,o++;i-=f,o-=p,c-=f,s.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function A9e(t){const e=[],n=t.length;let r=0;for(;r<n;){let s=t.charCodeAt(r),i,o=s<55296||s>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function dp(t,e,n,r,s){let i;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new pa(r),i.jr=s.slice(),t.j[l]=i),t=i}return i=new pa(n),i.jr=s.slice(),t.j[e[o-1]]=i,i}function tW(t){const e=[],n=[];let r=0,s="0123456789";for(;r<t.length;){let i=0;for(;s.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}const qS={defaultProtocol:"http",events:null,format:nW,formatHref:nW,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function N7(t,e=null){let n=Object.assign({},qS);t&&(n=Object.assign(n,t instanceof N7?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=s}N7.prototype={o:qS,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let s=this.o[t];return s&&(typeof s=="object"?(s=n.t in s?s[n.t]:qS[t],typeof s=="function"&&r&&(s=s(e,n))):typeof s=="function"&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function nW(t){return t}function Fle(t,e){this.t="token",this.v=t,this.tk=e}Fle.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=qS.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),d=t.getObj("attributes",n,e),f=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),d&&Object.assign(o,d),{tagName:s,attributes:o,content:i,eventListeners:f}}};function O3(t,e){class n extends Fle{constructor(s,i){super(s,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const rW=O3("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),sW=O3("text"),_9e=O3("nl"),fD=O3("url",{isLink:!0,toHref(t=qS.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==HS&&t[1].t===Op}}),pl=t=>new pa(t);function O9e({groups:t}){const e=t.domain.concat([VT,YT,Mp,GT,KT,ZT,JT,XT,ml,k7,tS,QT,eA,tA,pu,rA,rS,nA]),n=[WT,Op,A7,fu,_7,tS,nS,O7,R7,IT,LT,Qx,eS,RT,OT,NT,jT,PT,$T,zT,FT,BT,HT,qT,UT],r=[VT,WT,YT,GT,KT,ZT,JT,XT,ml,Qx,eS,tS,QT,eA,tA,nS,pu,rA,rS,nA],s=pl(),i=pt(s,rS);wn(i,r,i),wn(i,t.domain,i);const o=pl(),a=pl(),l=pl();wn(s,t.domain,o),wn(s,t.scheme,a),wn(s,t.slashscheme,l),wn(o,r,i),wn(o,t.domain,o);const c=pt(o,Mp);pt(i,Mp,c),pt(a,Mp,c),pt(l,Mp,c);const d=pt(i,fu);wn(d,r,i),wn(d,t.domain,i);const f=pl();wn(c,t.domain,f),wn(f,t.domain,f);const p=pt(f,fu);wn(p,t.domain,f);const m=pl(rW);wn(p,t.tld,m),wn(p,t.utld,m),pt(c,HS,m);const v=pt(f,ml);pt(v,ml,v),wn(v,t.domain,f),wn(m,t.domain,f),pt(m,fu,p),pt(m,ml,v);const y=pt(m,Op);wn(y,t.numeric,rW);const x=pt(o,ml),w=pt(o,fu);pt(x,ml,x),wn(x,t.domain,o),wn(w,r,i),wn(w,t.domain,o);const C=pl(fD);wn(w,t.tld,C),wn(w,t.utld,C),wn(C,t.domain,o),wn(C,r,i),pt(C,fu,w),pt(C,ml,x),pt(C,Mp,c);const E=pt(C,Op),D=pl(fD);wn(E,t.numeric,D);const T=pl(fD),A=pl();wn(T,e,T),wn(T,n,A),wn(A,e,T),wn(A,n,A),pt(C,pu,T),pt(D,pu,T);const _=pt(a,Op),R=pt(l,Op),N=pt(R,pu),I=pt(N,pu);wn(a,t.domain,o),pt(a,fu,w),pt(a,ml,x),wn(l,t.domain,o),pt(l,fu,w),pt(l,ml,x),wn(_,t.domain,T),pt(_,pu,T),pt(_,nS,T),wn(I,t.domain,T),wn(I,e,T),pt(I,pu,T);const $=[[Qx,eS],[OT,RT],[NT,jT],[IT,LT],[PT,$T],[zT,FT],[BT,HT],[qT,UT]];for(let L=0;L<$.length;L++){const[z,F]=$[L],q=pt(T,z);pt(A,z,q),pt(q,F,T);const H=pl(fD);wn(q,e,H);const B=pl();wn(q,n),wn(H,e,H),wn(H,n,B),wn(B,e,H),wn(B,n,B),pt(H,F,T),pt(B,F,T)}return pt(s,HS,C),pt(s,T7,_9e),{start:s,tokens:$le}}function R9e(t,e,n){let r=n.length,s=0,i=[],o=[];for(;s<r;){let a=t,l=null,c=null,d=0,f=null,p=-1;for(;s<r&&!(l=a.go(n[s].t));)o.push(n[s++]);for(;s<r&&(c=l||a.go(n[s].t));)l=null,a=c,a.accepts()?(p=0,f=a):p>=0&&p++,s++,d++;if(p<0)s-=d,s<r&&(o.push(n[s]),s++);else{o.length>0&&(i.push(Q4(sW,e,o)),o=[]),s-=p,d-=p;const m=f.t,v=n.slice(s-d,s);i.push(Q4(m,e,v))}}return o.length>0&&i.push(Q4(sW,e,o)),i}function Q4(t,e,n){const r=n[0].s,s=n[n.length-1].e,i=e.slice(r,s);return new t(i,n)}const N9e=typeof console<"u"&&console&&console.warn||(()=>{}),j9e="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Yr={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function I9e(){return pa.groups={},Yr.scanner=null,Yr.parser=null,Yr.tokenQueue=[],Yr.pluginQueue=[],Yr.customSchemes=[],Yr.initialized=!1,Yr}function iW(t,e=!1){if(Yr.initialized&&N9e(`linkifyjs: already initialized - will not register custom scheme "${t}" ${j9e}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);Yr.customSchemes.push([t,e])}function L9e(){Yr.scanner=T9e(Yr.customSchemes);for(let t=0;t<Yr.tokenQueue.length;t++)Yr.tokenQueue[t][1]({scanner:Yr.scanner});Yr.parser=O9e(Yr.scanner.tokens);for(let t=0;t<Yr.pluginQueue.length;t++)Yr.pluginQueue[t][1]({scanner:Yr.scanner,parser:Yr.parser});return Yr.initialized=!0,Yr}function j7(t){return Yr.initialized||L9e(),R9e(Yr.parser.start,t,zle(Yr.scanner.start,t))}j7.scan=zle;function Ble(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new N7(n),s=j7(t),i=[];for(let o=0;o<s.length;o++){const a=s[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var I7="[\0-   ᠎ -\u2029 　]",P9e=new RegExp(I7),$9e=new RegExp(`${I7}$`),z9e=new RegExp(I7,"g");function F9e(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function B9e(t){return new is({key:new ni("autolink"),appendTransaction:(e,n,r)=>{const s=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,a=ale(n.doc,[...e]);if(hle(a).forEach(({newRange:c})=>{const d=fPe(r.doc,c,m=>m.isTextblock);let f,p;if(d.length>1)f=d[0],p=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(d.length){const m=r.doc.textBetween(c.from,c.to," "," ");if(!$9e.test(m))return;f=d[0],p=r.doc.textBetween(f.pos,c.to,void 0," ")}if(f&&p){const m=p.split(P9e).filter(Boolean);if(m.length<=0)return!1;const v=m[m.length-1],y=f.pos+p.lastIndexOf(v);if(!v)return!1;const x=j7(v).map(w=>w.toObject(t.defaultProtocol));if(!F9e(x))return!1;x.filter(w=>w.isLink).map(w=>({...w,from:y+w.start+1,to:y+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{w7(w.from,w.to,r.doc).some(C=>C.mark.type===t.type)||o.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!o.steps.length)return o}})}function H9e(t){return new is({key:new ni("handleClickLink"),props:{handleClick:(e,n,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const c=t.editor.view.dom;o=l.closest("a"),o&&!c.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=ple(e.state,t.type.name),c=(s=o.href)!=null?s:l.href,d=(i=o.target)!=null?i:l.target;c&&(window.open(c,d),a=!0)}return a}}})}function q9e(t){return new is({key:new ni("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:s}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const c=Ble(l,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||s!==void 0&&!s(c.value)?!1:t.editor.commands.setMark(t.type,{href:c.href})}}})}function Xm(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&n.push(s)}),!t||t.replace(z9e,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Hle=Uu.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){iW(t);return}iW(t.scheme,t.optionalSlashes)})},onDestroy(){I9e()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Xm(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const s=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(s)||!/\./.test(s))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Xm(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Xm(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",ms(this.options.HTMLAttributes,t),0]:["a",ms(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;const r=((n=t.attrs)==null?void 0:n.href)||"";return`[${e.renderChildren(t)}](${r})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Xm(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Xm(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[dh({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,s=Ble(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!Xm(o,n),protocols:n,defaultProtocol:r}));s.length&&s.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(B9e({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!Xm(s,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(H9e({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(q9e({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),U9e=Hle;const V9e=U9e.extend({addKeyboardShortcuts:()=>({"Mod-k":()=>(window.dispatchEvent(new Event("edit-link")),!0)})}).configure({openOnClick:!1});var mv={root:"m_dd3f7539",Typography:"m_f2016866",content:"m_c2204cc2",linkEditorDropdown:"m_8a991b4f",control:"m_c2207da6",controlIcon:"m_9cdfeb3f",controlsGroup:"m_2ab47ef2",linkEditor:"m_b67b711e",linkEditorInput:"m_296cf94c",linkEditorExternalControl:"m_cfef614",linkEditorSave:"m_3b28e7bb",toolbar:"m_4574a3c4",taskList:"m_8b44009a"};const qle={linkControlLabel:"Link",colorPickerControlLabel:"Text color",highlightControlLabel:"Highlight text",colorControlLabel:t=>`Set text color ${t}`,boldControlLabel:"Bold",italicControlLabel:"Italic",underlineControlLabel:"Underline",strikeControlLabel:"Strikethrough",clearFormattingControlLabel:"Clear formatting",unlinkControlLabel:"Remove link",bulletListControlLabel:"Bullet list",orderedListControlLabel:"Ordered list",sourceCodeControlLabel:"Switch between text/source code",h1ControlLabel:"Heading 1",h2ControlLabel:"Heading 2",h3ControlLabel:"Heading 3",h4ControlLabel:"Heading 4",h5ControlLabel:"Heading 5",h6ControlLabel:"Heading 6",blockquoteControlLabel:"Blockquote",alignLeftControlLabel:"Align text: left",alignCenterControlLabel:"Align text: center",alignRightControlLabel:"Align text: right",alignJustifyControlLabel:"Align text: justify",codeControlLabel:"Code",codeBlockControlLabel:"Code block",subscriptControlLabel:"Subscript",superscriptControlLabel:"Superscript",unsetColorControlLabel:"Unset color",hrControlLabel:"Horizontal line",undoControlLabel:"Undo",redoControlLabel:"Redo",tasksControlLabel:"Task list",tasksSinkLabel:"Decrease task level",tasksLiftLabel:"Increase task level",linkEditorInputLabel:"Enter URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Open link in a new tab",linkEditorInternalLink:"Open link in the same tab",linkEditorSave:"Save",colorPickerCancel:"Cancel",colorPickerClear:"Clear color",colorPickerColorPicker:"Color picker",colorPickerPalette:"Color palette",colorPickerSave:"Save",colorPickerColorLabel:t=>`Set text color ${t}`},[W9e,Vu]=Ys("RichTextEditor component was not found in tree");var eN={exports:{}},tN={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var oW;function Y9e(){if(oW)return tN;oW=1;var t=vi();function e(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,s=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function a(f,p){var m=p(),v=r({inst:{value:m,getSnapshot:p}}),y=v[0].inst,x=v[1];return i(function(){y.value=m,y.getSnapshot=p,l(y)&&x({inst:y})},[f,m,p]),s(function(){return l(y)&&x({inst:y}),f(function(){l(y)&&x({inst:y})})},[f]),o(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function c(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return tN.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,tN}var aW;function Ule(){return aW||(aW=1,eN.exports=Y9e()),eN.exports}var Vle=Ule();const{getOwnPropertyNames:G9e,getOwnPropertySymbols:K9e}=Object,{hasOwnProperty:Z9e}=Object.prototype;function nN(t,e){return function(r,s,i){return t(r,s,i)&&e(r,s,i)}}function pD(t){return function(n,r,s){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,s);const{cache:i}=s,o=i.get(n),a=i.get(r);if(o&&a)return o===r&&a===n;i.set(n,r),i.set(r,n);const l=t(n,r,s);return i.delete(n),i.delete(r),l}}function J9e(t){return t!=null?t[Symbol.toStringTag]:void 0}function lW(t){return G9e(t).concat(K9e(t))}const X9e=Object.hasOwn||((t,e)=>Z9e.call(t,e));function gv(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const Q9e="__v",e8e="__o",t8e="_owner",{getOwnPropertyDescriptor:cW,keys:uW}=Object;function n8e(t,e){return t.byteLength===e.byteLength&&sA(new Uint8Array(t),new Uint8Array(e))}function r8e(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function s8e(t,e){return t.byteLength===e.byteLength&&sA(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function i8e(t,e){return gv(t.getTime(),e.getTime())}function o8e(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function a8e(t,e){return t===e}function dW(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.entries();let o,a,l=0;for(;(o=i.next())&&!o.done;){const c=e.entries();let d=!1,f=0;for(;(a=c.next())&&!a.done;){if(s[f]){f++;continue}const p=o.value,m=a.value;if(n.equals(p[0],m[0],l,f,t,e,n)&&n.equals(p[1],m[1],p[0],m[0],t,e,n)){d=s[f]=!0;break}f++}if(!d)return!1;l++}return!0}const l8e=gv;function c8e(t,e,n){const r=uW(t);let s=r.length;if(uW(e).length!==s)return!1;for(;s-- >0;)if(!Wle(t,e,n,r[s]))return!1;return!0}function dx(t,e,n){const r=lW(t);let s=r.length;if(lW(e).length!==s)return!1;let i,o,a;for(;s-- >0;)if(i=r[s],!Wle(t,e,n,i)||(o=cW(t,i),a=cW(e,i),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function u8e(t,e){return gv(t.valueOf(),e.valueOf())}function d8e(t,e){return t.source===e.source&&t.flags===e.flags}function fW(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const s=new Array(r),i=t.values();let o,a;for(;(o=i.next())&&!o.done;){const l=e.values();let c=!1,d=0;for(;(a=l.next())&&!a.done;){if(!s[d]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=s[d]=!0;break}d++}if(!c)return!1}return!0}function sA(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function f8e(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function Wle(t,e,n,r){return(r===t8e||r===e8e||r===Q9e)&&(t.$$typeof||e.$$typeof)?!0:X9e(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const p8e="[object ArrayBuffer]",h8e="[object Arguments]",m8e="[object Boolean]",g8e="[object DataView]",v8e="[object Date]",y8e="[object Error]",b8e="[object Map]",x8e="[object Number]",S8e="[object Object]",w8e="[object RegExp]",C8e="[object Set]",E8e="[object String]",M8e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},D8e="[object URL]",k8e=Object.prototype.toString;function T8e({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:s,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:p,areUrlsEqual:m,unknownTagComparators:v}){return function(x,w,C){if(x===w)return!0;if(x==null||w==null)return!1;const E=typeof x;if(E!==typeof w)return!1;if(E!=="object")return E==="number"?a(x,w,C):E==="function"?i(x,w,C):!1;const D=x.constructor;if(D!==w.constructor)return!1;if(D===Object)return l(x,w,C);if(Array.isArray(x))return e(x,w,C);if(D===Date)return r(x,w,C);if(D===RegExp)return d(x,w,C);if(D===Map)return o(x,w,C);if(D===Set)return f(x,w,C);const T=k8e.call(x);if(T===v8e)return r(x,w,C);if(T===w8e)return d(x,w,C);if(T===b8e)return o(x,w,C);if(T===C8e)return f(x,w,C);if(T===S8e)return typeof x.then!="function"&&typeof w.then!="function"&&l(x,w,C);if(T===D8e)return m(x,w,C);if(T===y8e)return s(x,w,C);if(T===h8e)return l(x,w,C);if(M8e[T])return p(x,w,C);if(T===p8e)return t(x,w,C);if(T===g8e)return n(x,w,C);if(T===m8e||T===x8e||T===E8e)return c(x,w,C);if(v){let A=v[T];if(!A){const _=J9e(x);_&&(A=v[_])}if(A)return A(x,w,C)}return!1}}function A8e({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:n8e,areArraysEqual:n?dx:r8e,areDataViewsEqual:s8e,areDatesEqual:i8e,areErrorsEqual:o8e,areFunctionsEqual:a8e,areMapsEqual:n?nN(dW,dx):dW,areNumbersEqual:l8e,areObjectsEqual:n?dx:c8e,arePrimitiveWrappersEqual:u8e,areRegExpsEqual:d8e,areSetsEqual:n?nN(fW,dx):fW,areTypedArraysEqual:n?nN(sA,dx):sA,areUrlsEqual:f8e,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const s=pD(r.areArraysEqual),i=pD(r.areMapsEqual),o=pD(r.areObjectsEqual),a=pD(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:s,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:a})}return r}function _8e(t){return function(e,n,r,s,i,o,a){return t(e,n,a)}}function O8e({circular:t,comparator:e,createState:n,equals:r,strict:s}){if(n)return function(a,l){const{cache:c=t?new WeakMap:void 0,meta:d}=n();return e(a,l,{cache:c,equals:r,meta:d,strict:s})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:s})};const i={cache:void 0,equals:r,meta:void 0,strict:s};return function(a,l){return e(a,l,i)}}const R8e=_h();_h({strict:!0});_h({circular:!0});_h({circular:!0,strict:!0});_h({createInternalComparator:()=>gv});_h({strict:!0,createInternalComparator:()=>gv});_h({circular:!0,createInternalComparator:()=>gv});_h({circular:!0,createInternalComparator:()=>gv,strict:!0});function _h(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:s=!1}=t,i=A8e(t),o=T8e(i),a=n?n(o):_8e(o);return O8e({circular:e,comparator:o,createState:r,equals:a,strict:s})}var rN={exports:{}},sN={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var pW;function N8e(){if(pW)return sN;pW=1;var t=vi(),e=Ule();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,s=e.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,l=t.useDebugValue;return sN.useSyncExternalStoreWithSelector=function(c,d,f,p,m){var v=i(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=a(function(){function w(A){if(!C){if(C=!0,E=A,A=p(A),m!==void 0&&y.hasValue){var _=y.value;if(m(_,A))return D=_}return D=A}if(_=D,r(E,A))return _;var R=p(A);return m!==void 0&&m(_,R)?(E=A,_):(E=A,D=R)}var C=!1,E,D,T=f===void 0?null:f;return[function(){return w(d())},T===null?void 0:function(){return w(T())}]},[d,f,p,m]);var x=s(c,v[0],v[1]);return o(function(){y.hasValue=!0,y.value=x},[x]),l(x),x},sN}var hW;function j8e(){return hW||(hW=1,rN.exports=N8e()),rN.exports}var I8e=j8e(),L8e=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},P8e=({contentComponent:t})=>{const e=Vle.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return g.jsx(g.Fragment,{children:Object.values(e)})};function $8e(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:jp.createPortal(r.reactElement,r.element,n)},t.forEach(s=>s())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(s=>s())}}}var z8e=class extends xe.Component{constructor(t){var e;super(t),this.editorContentRef=xe.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((e=t.editor)!=null&&e.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=$8e(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var t;const e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:L8e(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&g.jsx(P8e,{contentComponent:t.contentComponent})]})}},F8e=O.forwardRef((t,e)=>{const n=xe.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return xe.createElement(z8e,{key:n,innerRef:e,...t})}),mW=xe.memo(F8e),B8e=typeof window<"u"?O.useLayoutEffect:O.useEffect,H8e=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function q8e(t){var e;const[n]=O.useState(()=>new H8e(t.editor)),r=I8e.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:R8e);return B8e(()=>n.watch(t.editor),[t.editor,n]),O.useDebugValue(r),r}var U8e=!1,uP=typeof window>"u",V8e=uP||!!(typeof window<"u"&&window.next),W8e=class Yle{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?uP||V8e?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onBeforeCreate)==null?void 0:i.call(s,...r)},onBlur:(...r)=>{var s,i;return(i=(s=this.options.current).onBlur)==null?void 0:i.call(s,...r)},onCreate:(...r)=>{var s,i;return(i=(s=this.options.current).onCreate)==null?void 0:i.call(s,...r)},onDestroy:(...r)=>{var s,i;return(i=(s=this.options.current).onDestroy)==null?void 0:i.call(s,...r)},onFocus:(...r)=>{var s,i;return(i=(s=this.options.current).onFocus)==null?void 0:i.call(s,...r)},onSelectionUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onSelectionUpdate)==null?void 0:i.call(s,...r)},onTransaction:(...r)=>{var s,i;return(i=(s=this.options.current).onTransaction)==null?void 0:i.call(s,...r)},onUpdate:(...r)=>{var s,i;return(i=(s=this.options.current).onUpdate)==null?void 0:i.call(s,...r)},onContentError:(...r)=>{var s,i;return(i=(s=this.options.current).onContentError)==null?void 0:i.call(s,...r)},onDrop:(...r)=>{var s,i;return(i=(s=this.options.current).onDrop)==null?void 0:i.call(s,...r)},onPaste:(...r)=>{var s,i;return(i=(s=this.options.current).onPaste)==null?void 0:i.call(s,...r)},onDelete:(...r)=>{var s,i;return(i=(s=this.options.current).onDelete)==null?void 0:i.call(s,...r)}};return new u9e(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((s,i)=>{var o;return s===((o=n.extensions)==null?void 0:o[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Yle.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,s)=>r===e[s]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Y8e(t={},e=[]){const n=O.useRef(t);n.current=t;const[r]=O.useState(()=>new W8e(n)),s=Vle.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return O.useDebugValue(s),O.useEffect(r.onRender(e)),q8e({editor:s,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),s}var G8e=O.createContext({editor:null});G8e.Consumer;var K8e=O.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Z8e=()=>O.useContext(K8e);xe.forwardRef((t,e)=>{const{onDragStart:n}=Z8e(),r=t.as||"div";return g.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});xe.createContext({markViewContentRef:()=>{}});const L7=Fe((t,e)=>{const n=Ce("RichTextEditorContent",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,...l}=n,c=Vu();return c.withTypographyStyles?g.jsx($8,{...c.getStyles("Typography",{className:s,style:i,styles:o,classNames:r}),unstyled:c.unstyled,ref:e,children:g.jsx(le,{component:mW,editor:c.editor,...c.getStyles("content",{classNames:r,styles:o}),...l})}):g.jsx(le,{component:mW,editor:c.editor,...c.getStyles("content",{classNames:r,styles:o,className:s,style:i}),...l})});L7.classes=mv;L7.displayName="@mantine/tiptap/RichTextEditorContent";function zn(t){return g.jsx("svg",{...t,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}function J8e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 5h6a3.5 3.5 0 0 1 0 7h-6z"}),g.jsx("path",{d:"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7"})]})}function X8e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 5l6 0"}),g.jsx("path",{d:"M7 19l6 0"}),g.jsx("path",{d:"M14 5l-4 14"})]})}function Q8e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 5v5a5 5 0 0 0 10 0v-5"}),g.jsx("path",{d:"M5 19h14"})]})}function e$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12l14 0"}),g.jsx("path",{d:"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5"})]})}function t$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 15l4 4m0 -4l-4 4"}),g.jsx("path",{d:"M7 6v-1h11v1"}),g.jsx("path",{d:"M7 19l4 0"}),g.jsx("path",{d:"M13 5l-4 14"})]})}function n$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 18v-8l-2 2"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function r$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function s$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 14a2 2 0 1 0 -2 -2"}),g.jsx("path",{d:"M17 16a2 2 0 1 0 2 -2"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function i$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 18v-8l-4 6h5"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function o$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function a$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z"}),g.jsx("path",{d:"M21 12a2 2 0 1 0 -4 0v4"}),g.jsx("path",{d:"M4 6v12"}),g.jsx("path",{d:"M12 6v12"}),g.jsx("path",{d:"M11 18h2"}),g.jsx("path",{d:"M3 18h2"}),g.jsx("path",{d:"M4 12h8"}),g.jsx("path",{d:"M3 6h2"}),g.jsx("path",{d:"M11 6h2"})]})}function l$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 6l11 0"}),g.jsx("path",{d:"M9 12l11 0"}),g.jsx("path",{d:"M9 18l11 0"}),g.jsx("path",{d:"M5 6l0 .01"}),g.jsx("path",{d:"M5 12l0 .01"}),g.jsx("path",{d:"M5 18l0 .01"})]})}function c$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 6h9"}),g.jsx("path",{d:"M11 12h9"}),g.jsx("path",{d:"M12 18h8"}),g.jsx("path",{d:"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4"}),g.jsx("path",{d:"M6 10v-6l-2 2"})]})}function u$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M17 22v-2"}),g.jsx("path",{d:"M9 15l6 -6"}),g.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),g.jsx("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"}),g.jsx("path",{d:"M20 17h2"}),g.jsx("path",{d:"M2 7h2"}),g.jsx("path",{d:"M7 2v2"})]})}function d$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M6 15h15"}),g.jsx("path",{d:"M21 19h-15"}),g.jsx("path",{d:"M15 11h6"}),g.jsx("path",{d:"M21 7h-6"}),g.jsx("path",{d:"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"}),g.jsx("path",{d:"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2"})]})}function f$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M4 12l10 0"}),g.jsx("path",{d:"M4 18l14 0"})]})}function p$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M10 12l10 0"}),g.jsx("path",{d:"M6 18l14 0"})]})}function h$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M8 12l8 0"}),g.jsx("path",{d:"M6 18l12 0"})]})}function m$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M4 6l16 0"}),g.jsx("path",{d:"M4 12l16 0"}),g.jsx("path",{d:"M4 18l12 0"})]})}function g$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),g.jsx("path",{d:"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function v$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 7l8 10m-8 0l8 -10"}),g.jsx("path",{d:"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2"})]})}function Gle(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M7 8l-4 4l4 4"}),g.jsx("path",{d:"M17 8l4 4l-4 4"}),g.jsx("path",{d:"M14 4l-4 16"})]})}function y$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M3 19h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"}),g.jsx("path",{d:"M12.5 5.5l4 4"}),g.jsx("path",{d:"M4.5 13.5l4 4"}),g.jsx("path",{d:"M21 15v4h-8l4 -4z"})]})}function b$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12h2"}),g.jsx("path",{d:"M17 12h2"}),g.jsx("path",{d:"M11 12h2"})]})}function Kle(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"}),g.jsx("path",{d:"M3 3l18 18"})]})}function x$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M11 7l6 6"}),g.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]})}function S$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M18 6l-12 12"}),g.jsx("path",{d:"M6 6l12 12"})]})}function w$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25"}),g.jsx("path",{d:"M8.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),g.jsx("path",{d:"M12.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}),g.jsx("path",{d:"M16.5 10.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"})]})}function C$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M5 12l5 5l10 -10"})]})}function E$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 15l6 -6"}),g.jsx("path",{d:"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464"}),g.jsx("path",{d:"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463"})]})}function M$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),g.jsx("path",{d:"M11 13l9 -9"}),g.jsx("path",{d:"M15 4h5v5"})]})}function D$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M9 14l-4 -4l4 -4"}),g.jsx("path",{d:"M5 10h11a4 4 0 1 1 0 8h-1"})]})}function k$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M15 14l4 -4l-4 -4"}),g.jsx("path",{d:"M19 10h-11a4 4 0 1 0 0 8h1"})]})}function T$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5"}),g.jsx("path",{d:"M11 6l9 0"}),g.jsx("path",{d:"M11 12l9 0"}),g.jsx("path",{d:"M11 18l9 0"})]})}function A$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 6l-11 0"}),g.jsx("path",{d:"M20 12l-7 0"}),g.jsx("path",{d:"M20 18l-11 0"}),g.jsx("path",{d:"M4 8l4 4l-4 4"})]})}function _$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:"M20 6l-7 0"}),g.jsx("path",{d:"M20 12l-9 0"}),g.jsx("path",{d:"M20 18l-7 0"}),g.jsx("path",{d:"M8 8l-4 4l4 4"})]})}function O$e(t){return g.jsxs(zn,{...t,children:[g.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),g.jsx("path",{d:`M19 3v16a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7.914
           a1 1 0 0 1 .293-.707l3.914-3.914A1 1 0 0 1 9.914 3H18
           a1 1 0 0 1 1 1Z`}),g.jsx("path",{d:"M10 11l-2 2 2 2"}),g.jsx("path",{d:"M14 11l2 2-2 2"})]})}const R$e={interactive:!0},vv=Fe((t,e)=>{const n=Ce("RichTextEditorControl",R$e,t),{classNames:r,className:s,style:i,styles:o,vars:a,interactive:l,active:c,onMouseDown:d,disabled:f,...p}=n,m=Vu();return g.jsx(or,{...p,...m.getStyles("control",{className:s,style:i,classNames:r,styles:o}),disabled:f,"data-rich-text-editor-control":!0,tabIndex:l?0:-1,"data-interactive":l||void 0,"data-disabled":f||void 0,"data-active":c||void 0,"aria-pressed":c&&l||void 0,"aria-hidden":!l||void 0,ref:e,unstyled:m.unstyled,variant:m.variant||"default",onMouseDown:v=>{v.preventDefault(),d==null||d(v)}})});vv.classes=mv;vv.displayName="@mantine/tiptap/RichTextEditorControl";const P7=O.forwardRef(({className:t,icon:e,...n},r)=>{const s=Vu();return g.jsx(vv,{ref:r,...n,children:g.jsx(e,{...s.getStyles("controlIcon")})})});P7.displayName="@mantine/tiptap/RichTextEditorControlBase";function lr({label:t,isActive:e,operation:n,icon:r,isDisabled:s}){const i=O.forwardRef((o,a)=>{const{editor:l,labels:c}=Vu(),d=c[t];return g.jsx(P7,{"aria-label":d,title:d,active:e!=null&&e.name?l==null?void 0:l.isActive(e.name,e.attributes):!1,ref:a,icon:o.icon||r,disabled:(s==null?void 0:s(l))||!1,...o,onClick:()=>l==null?void 0:l.chain().focus()[n.name](n.attributes).run()})});return i.displayName=`@mantine/tiptap/${t}`,i}const N$e=lr({label:"boldControlLabel",icon:t=>g.jsx(J8e,{...t}),isActive:{name:"bold"},operation:{name:"toggleBold"}}),j$e=lr({label:"italicControlLabel",icon:t=>g.jsx(X8e,{...t}),isActive:{name:"italic"},operation:{name:"toggleItalic"}}),I$e=lr({label:"underlineControlLabel",icon:t=>g.jsx(Q8e,{...t}),isActive:{name:"underline"},operation:{name:"toggleUnderline"}}),L$e=lr({label:"strikeControlLabel",icon:t=>g.jsx(e$e,{...t}),isActive:{name:"strike"},operation:{name:"toggleStrike"}}),P$e=lr({label:"clearFormattingControlLabel",icon:t=>g.jsx(t$e,{...t}),operation:{name:"unsetAllMarks"}}),$$e=lr({label:"unlinkControlLabel",icon:t=>g.jsx(u$e,{...t}),operation:{name:"unsetLink"}}),z$e=lr({label:"bulletListControlLabel",icon:t=>g.jsx(l$e,{...t}),isActive:{name:"bulletList"},operation:{name:"toggleBulletList"}}),F$e=lr({label:"orderedListControlLabel",icon:t=>g.jsx(c$e,{...t}),isActive:{name:"orderedList"},operation:{name:"toggleOrderedList"}}),B$e=lr({label:"h1ControlLabel",icon:t=>g.jsx(n$e,{...t}),isActive:{name:"heading",attributes:{level:1}},operation:{name:"toggleHeading",attributes:{level:1}}}),H$e=lr({label:"h2ControlLabel",icon:t=>g.jsx(r$e,{...t}),isActive:{name:"heading",attributes:{level:2}},operation:{name:"toggleHeading",attributes:{level:2}}}),q$e=lr({label:"h3ControlLabel",icon:t=>g.jsx(s$e,{...t}),isActive:{name:"heading",attributes:{level:3}},operation:{name:"toggleHeading",attributes:{level:3}}}),U$e=lr({label:"h4ControlLabel",icon:t=>g.jsx(i$e,{...t}),isActive:{name:"heading",attributes:{level:4}},operation:{name:"toggleHeading",attributes:{level:4}}}),V$e=lr({label:"h5ControlLabel",icon:t=>g.jsx(o$e,{...t}),isActive:{name:"heading",attributes:{level:5}},operation:{name:"toggleHeading",attributes:{level:5}}}),W$e=lr({label:"h6ControlLabel",icon:t=>g.jsx(a$e,{...t}),isActive:{name:"heading",attributes:{level:6}},operation:{name:"toggleHeading",attributes:{level:6}}}),Y$e=lr({label:"blockquoteControlLabel",icon:t=>g.jsx(d$e,{...t}),isActive:{name:"blockquote"},operation:{name:"toggleBlockquote"}}),G$e=lr({label:"alignLeftControlLabel",icon:t=>g.jsx(f$e,{...t}),operation:{name:"setTextAlign",attributes:"left"}}),K$e=lr({label:"alignRightControlLabel",icon:t=>g.jsx(p$e,{...t}),operation:{name:"setTextAlign",attributes:"right"}}),Z$e=lr({label:"alignCenterControlLabel",icon:t=>g.jsx(h$e,{...t}),operation:{name:"setTextAlign",attributes:"center"}}),J$e=lr({label:"alignJustifyControlLabel",icon:t=>g.jsx(m$e,{...t}),operation:{name:"setTextAlign",attributes:"justify"}}),X$e=lr({label:"subscriptControlLabel",icon:t=>g.jsx(g$e,{...t}),isActive:{name:"subscript"},operation:{name:"toggleSubscript"}}),Q$e=lr({label:"superscriptControlLabel",icon:t=>g.jsx(v$e,{...t}),isActive:{name:"superscript"},operation:{name:"toggleSuperscript"}}),e7e=lr({label:"codeControlLabel",icon:t=>g.jsx(Gle,{...t}),isActive:{name:"code"},operation:{name:"toggleCode"}}),t7e=lr({label:"codeBlockControlLabel",icon:t=>g.jsx(Gle,{...t}),isActive:{name:"codeBlock"},operation:{name:"toggleCodeBlock"}}),n7e=lr({label:"highlightControlLabel",icon:t=>g.jsx(y$e,{...t}),isActive:{name:"highlight"},operation:{name:"toggleHighlight"}}),r7e=lr({label:"hrControlLabel",icon:t=>g.jsx(b$e,{...t}),operation:{name:"setHorizontalRule"}}),s7e=lr({label:"unsetColorControlLabel",icon:t=>g.jsx(Kle,{...t}),operation:{name:"unsetColor"}}),i7e=lr({label:"undoControlLabel",icon:t=>g.jsx(D$e,{...t}),isDisabled:t=>!(t!=null&&t.can().undo()),operation:{name:"undo"}}),o7e=lr({label:"redoControlLabel",icon:t=>g.jsx(k$e,{...t}),isDisabled:t=>!(t!=null&&t.can().redo()),operation:{name:"redo"}}),a7e=lr({label:"tasksControlLabel",icon:t=>g.jsx(T$e,{...t}),isActive:{name:"taskList"},operation:{name:"toggleTaskList"}}),l7e=lr({label:"tasksSinkLabel",icon:t=>g.jsx(A$e,{...t}),operation:{name:"sinkListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().sinkListItem("taskItem"))}),c7e=lr({label:"tasksLiftLabel",icon:t=>g.jsx(_$e,{...t}),operation:{name:"liftListItem",attributes:"taskItem"},isDisabled:t=>!(t!=null&&t.can().liftListItem("taskItem"))}),u7e=t=>g.jsx(E$e,{...t}),$7=Fe((t,e)=>{var L;const n=Ce("RichTextEditorLinkControl",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,icon:l,popoverProps:c,disableTooltips:d,initialExternal:f,...p}=n,m=Vu(),v={classNames:r,styles:o},[y,x]=sme(""),[w,C]=O.useState(f),[E,{open:D,close:T}]=Ps(!1),A=()=>{var F;D();const z=(F=m.editor)==null?void 0:F.getAttributes("link");x((z==null?void 0:z.href)||""),C(z!=null&&z.href?(z==null?void 0:z.target)==="_blank":f)},_=()=>{T(),x(""),C(f)},R=()=>{var z,F;_(),y===""?(z=m.editor)==null||z.chain().focus().extendMarkRange("link").unsetLink().run():(F=m.editor)==null||F.chain().focus().extendMarkRange("link").setLink({href:y,target:w?"_blank":null}).run()},N=z=>{z.key==="Enter"&&(z.preventDefault(),R())};cS("edit-link",A,!1);const{resolvedClassNames:I,resolvedStyles:$}=Ma({classNames:r,styles:o,props:n});return g.jsxs(Mn,{trapFocus:!0,shadow:"md",withinPortal:!0,opened:E,onChange:z=>!z&&_(),offset:-44,zIndex:1e4,...c,children:[g.jsx(Mn.Target,{children:g.jsx(P7,{icon:l||u7e,...p,"aria-label":m.labels.linkControlLabel,title:m.labels.linkControlLabel,onClick:A,active:(L=m.editor)==null?void 0:L.isActive("link"),ref:e,classNames:I,styles:$,className:s,style:i,variant:m.variant})}),g.jsx(Mn.Dropdown,{...m.getStyles("linkEditorDropdown",v),children:g.jsxs("div",{...m.getStyles("linkEditor",v),children:[g.jsx(Xy,{placeholder:m.labels.linkEditorInputPlaceholder,"aria-label":m.labels.linkEditorInputLabel,type:"url",value:y,onChange:x,classNames:{input:m.getStyles("linkEditorInput",v).className},onKeyDown:N,rightSection:g.jsx(ss,{label:w?m.labels.linkEditorExternalLink:m.labels.linkEditorInternalLink,events:{hover:!0,focus:!0,touch:!0},withinPortal:!0,withArrow:!0,disabled:d,zIndex:1e4,children:g.jsx(or,{onClick:()=>C(z=>!z),"data-active":w||void 0,...m.getStyles("linkEditorExternalControl",v),children:g.jsx(M$e,{style:{width:Ee(14),height:Ee(14)}})})})}),g.jsx(en,{variant:"default",onClick:R,...m.getStyles("linkEditorSave",v),children:m.labels.linkEditorSave})]})})]})});$7.classes=mv;$7.displayName="@mantine/tiptap/RichTextEditorLinkControl";const Zle=O.forwardRef((t,e)=>{const{popoverProps:n,colors:r,colorPickerProps:s,...i}=Ce("RichTextEditorColorPickerControl",null,t),{editor:o,labels:a,getStyles:l,variant:c}=Vu(),[d,{toggle:f,close:p}]=Ps(!1),[m,v]=O.useState("palette"),y=(o==null?void 0:o.getAttributes("textStyle").color)||"var(--mantine-color-text)",x=(E,D=!0)=>{(o==null?void 0:o.chain()).focus().setColor(E).run(),D&&p()},w=()=>{(o==null?void 0:o.chain()).focus().unsetColor().run(),p()},C=r.map((E,D)=>g.jsx(qd,{component:"button",color:E,onClick:()=>x(E),size:26,radius:"xs",style:{cursor:"pointer"},title:a.colorPickerColorLabel(E),"aria-label":a.colorPickerColorLabel(E)},D));return g.jsxs(Mn,{opened:d,withinPortal:!0,trapFocus:!0,onChange:E=>!E&&p(),...n,children:[g.jsx(Mn.Target,{children:g.jsx(vv,{...i,variant:c,"aria-label":a.colorPickerControlLabel,title:a.colorPickerControlLabel,ref:e,onClick:f,children:g.jsx(qd,{color:y,size:14})})}),g.jsxs(Mn.Dropdown,{...l("linkEditorDropdown"),children:[m==="palette"&&g.jsx(A8,{cols:7,spacing:2,children:C}),m==="colorPicker"&&g.jsx(i8,{defaultValue:y,onChange:E=>x(E,!1),...s}),g.jsx(ss.Group,{closeDelay:200,children:g.jsxs(wt,{justify:"flex-end",gap:"xs",mt:"sm",children:[m==="palette"&&g.jsx(gn,{variant:"default",onClick:p,title:a.colorPickerCancel,"aria-label":a.colorPickerCancel,children:g.jsx(S$e,{style:{width:Ee(16),height:Ee(16)}})}),g.jsx(gn,{variant:"default",onClick:w,title:a.colorPickerClear,"aria-label":a.colorPickerClear,children:g.jsx(Kle,{style:{width:Ee(16),height:Ee(16)}})}),m==="palette"?g.jsx(gn,{variant:"default",onClick:()=>v("colorPicker"),title:a.colorPickerColorPicker,"aria-label":a.colorPickerColorPicker,children:g.jsx(x$e,{style:{width:Ee(16),height:Ee(16)}})}):g.jsx(gn,{variant:"default",onClick:()=>v("palette"),"aria-label":a.colorPickerPalette,title:a.colorPickerPalette,children:g.jsx(w$e,{style:{width:Ee(16),height:Ee(16)}})}),m==="colorPicker"&&g.jsx(gn,{variant:"default",onClick:p,title:a.colorPickerSave,"aria-label":a.colorPickerSave,children:g.jsx(C$e,{style:{width:Ee(16),height:Ee(16)}})})]})})]})]})});Zle.displayName="@mantine/tiptap/ColorPickerControl";const Jle=O.forwardRef((t,e)=>{const{color:n,...r}=Ce("RichTextEditorColorControl",null,t),{editor:s,labels:i,variant:o}=Vu(),a=(s==null?void 0:s.getAttributes("textStyle").color)||null,l=i.colorControlLabel(n);return g.jsx(vv,{...r,variant:o,active:a===n,"aria-label":l,title:l,onClick:()=>(s==null?void 0:s.chain()).focus().setColor(n).run(),ref:e,children:g.jsx(qd,{color:n,size:14})})});Jle.displayName="@mantine/tiptap/RichTextEditorColorControl";const d7e={},Xle=O.forwardRef((t,e)=>{const{...n}=Ce("RichTextEditorSourceCodeControl",d7e,t),{editor:r,labels:s,variant:i,onSourceCodeTextSwitch:o}=Vu(),[a,l]=O.useState(!1),c=()=>{a?r==null||r.commands.setContent(r.getText(),{emitUpdate:!0}):r==null||r.commands.setContent(`<textarea>${r.getHTML()}</textarea>`);const d=!a;l(d),o==null||o(d)};return g.jsx(vv,{...n,variant:i,active:a,"aria-label":s.sourceCodeControlLabel,title:s.sourceCodeControlLabel,onClick:()=>c(),ref:e,children:g.jsx(O$e,{style:{width:Ee(16),height:Ee(16)}})})});Xle.displayName="@mantine/tiptap/RichTextEditorSourceCodeControl";const z7=Fe((t,e)=>{const n=Ce("RichTextEditorControlsGroup",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,variant:l,...c}=n,d=Vu();return g.jsx(le,{ref:e,variant:l||d.variant,...d.getStyles("controlsGroup",{className:s,style:i,styles:o,classNames:r}),...c})});z7.classes=mv;z7.displayName="@mantine/tiptap/RichTextEditorControlsGroup";const F7=Fe((t,e)=>{const n=Ce("RichTextEditorToolbar",null,t),{classNames:r,className:s,style:i,styles:o,vars:a,sticky:l,stickyOffset:c,mod:d,variant:f,...p}=n,m=Vu();return g.jsx(le,{ref:e,mod:[{sticky:l},d],variant:f||m.variant,...m.getStyles("toolbar",{className:s,style:i,styles:o,classNames:r}),...p,__vars:{"--rte-sticky-offset":Ee(c)}})});F7.classes=mv;F7.displayName="@mantine/tiptap/RichTextEditorToolbar";const f7e={withCodeHighlightStyles:!0,withTypographyStyles:!0,variant:"default"},Mt=Fe((t,e)=>{const n=Ce("RichTextEditor",f7e,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,editor:c,withCodeHighlightStyles:d,withTypographyStyles:f,onSourceCodeTextSwitch:p,labels:m,children:v,variant:y,attributes:x,...w}=n,C=bt({name:"RichTextEditor",classes:mv,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:x,vars:l}),E=O.useMemo(()=>({...qle,...m}),[m]);return g.jsx(W9e,{value:{editor:c,getStyles:C,labels:E,withCodeHighlightStyles:d,withTypographyStyles:f,onSourceCodeTextSwitch:p,unstyled:a,variant:y},children:g.jsx(le,{...C("root"),...w,ref:e,children:v})})});Mt.classes=mv;Mt.displayName="@mantine/tiptap/RichTextEditor";Mt.Content=L7;Mt.Control=vv;Mt.Toolbar=F7;Mt.ControlsGroup=z7;Mt.Bold=N$e;Mt.Italic=j$e;Mt.Strikethrough=L$e;Mt.Underline=I$e;Mt.ClearFormatting=P$e;Mt.H1=B$e;Mt.H2=H$e;Mt.H3=q$e;Mt.H4=U$e;Mt.H5=V$e;Mt.H6=W$e;Mt.BulletList=z$e;Mt.OrderedList=F$e;Mt.Link=$7;Mt.Unlink=$$e;Mt.Blockquote=Y$e;Mt.AlignLeft=G$e;Mt.AlignRight=K$e;Mt.AlignCenter=Z$e;Mt.AlignJustify=J$e;Mt.Superscript=Q$e;Mt.Subscript=X$e;Mt.Code=e7e;Mt.CodeBlock=t7e;Mt.ColorPicker=Zle;Mt.Color=Jle;Mt.Highlight=n7e;Mt.Hr=r7e;Mt.UnsetColor=s7e;Mt.Undo=i7e;Mt.Redo=o7e;Mt.TaskList=a7e;Mt.TaskListSink=l7e;Mt.TaskListLift=c7e;Mt.SourceCode=Xle;function p7e(t={}){return new is({view(e){return new h7e(e,t)}})}class h7e{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,s=this.editorView.dom,i=s.getBoundingClientRect(),o=i.width/s.offsetWidth,a=i.height/s.offsetHeight;if(n){let f=e.nodeBefore,p=e.nodeAfter;if(f||p){let m=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(m){let v=m.getBoundingClientRect(),y=f?v.bottom:v.top;f&&p&&(y=(y+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*a;r={left:v.left,right:v.right,top:y-x,bottom:y+x}}}}if(!r){let f=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*o;r={left:f.left-p,right:f.left+p,top:f.top,bottom:f.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let c,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")c=-pageXOffset,d=-pageYOffset;else{let f=l.getBoundingClientRect(),p=f.width/l.offsetWidth,m=f.height/l.offsetHeight;c=f.left-l.scrollLeft*p,d=f.top-l.scrollTop*m}this.element.style.left=(r.left-c)/o+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,n,e):s;if(n&&!i){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Xoe(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class Cs extends En{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return Cs.valid(r)?new Cs(r):En.near(r)}content(){return Tt.empty}eq(e){return e instanceof Cs&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Cs(e.resolve(n.pos))}getBookmark(){return new B7(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!m7e(e)||!g7e(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let s=n.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&Cs.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=n;let l=e.doc.resolve(s);if(Cs.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!qt.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*n),r=!1;continue e}break}i=o,s+=n;let a=e.doc.resolve(s);if(Cs.valid(a))return a}return null}}}Cs.prototype.visible=!1;Cs.findFrom=Cs.findGapCursorFrom;En.jsonID("gapcursor",Cs);class B7{constructor(e){this.pos=e}map(e){return new B7(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return Cs.valid(n)?new Cs(n):En.near(n)}}function Qle(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function m7e(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||Qle(s.type))return!0;if(s.inlineContent)return!1}}return!0}function g7e(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(n);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||Qle(s.type))return!0;if(s.inlineContent)return!1}}return!0}function v7e(){return new is({props:{decorations:S7e,createSelectionBetween(t,e,n){return e.pos==n.pos&&Cs.valid(n)?new Cs(n):null},handleClick:b7e,handleKeyDown:y7e,handleDOMEvents:{beforeinput:x7e}}})}const y7e=Qae({ArrowLeft:hD("horiz",-1),ArrowRight:hD("horiz",1),ArrowUp:hD("vert",-1),ArrowDown:hD("vert",1)});function hD(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof rn){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let c=Cs.findGapCursorFrom(a,e,l);return c?(s&&s(r.tr.setSelection(new Cs(c))),!0):!1}}function b7e(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!Cs.valid(r))return!1;let s=t.posAtCoords({left:n.clientX,top:n.clientY});return s&&s.inside>-1&&qt.isSelectable(t.state.doc.nodeAt(s.inside))?!1:(t.dispatch(t.state.tr.setSelection(new Cs(r))),!0)}function x7e(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof Cs))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let s=dt.empty;for(let o=r.length-1;o>=0;o--)s=dt.from(r[o].createAndFill(null,s));let i=t.state.tr.replace(n.pos,n.pos,new Tt(s,0,0));return i.setSelection(rn.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function S7e(t){if(!(t.selection instanceof Cs))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",fs.create(t.doc,[zo.widget(t.selection.head,e,{key:"gapcursor"})])}var iA=200,hi=function(){};hi.prototype.append=function(e){return e.length?(e=hi.from(e),!this.length&&e||e.length<iA&&this.leafAppend(e)||this.length<iA&&e.leafPrepend(this)||this.appendInner(e)):this};hi.prototype.prepend=function(e){return e.length?hi.from(e).append(this):this};hi.prototype.appendInner=function(e){return new w7e(this,e)};hi.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?hi.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};hi.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};hi.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};hi.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},n,r),s};hi.from=function(e){return e instanceof hi?e:e&&e.length?new ece(e):hi.empty};var ece=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,a){for(var l=i;l<o;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,a){for(var l=i-1;l>=o;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=iA)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=iA)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(hi);hi.empty=new ece([]);var w7e=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var a=this.left.length;if(s<a&&this.left.forEachInner(r,s,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(s-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(r,s-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(s,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(hi);const C7e=500;class dc{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;n&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,a,l,c=[],d=[];return this.items.forEach((f,p)=>{if(!f.step){s||(s=this.remapping(r,p+1),i=s.maps.length),i--,d.push(f);return}if(s){d.push(new fp(f.map));let m=f.step.map(s.slice(i)),v;m&&o.maybeStep(m).doc&&(v=o.mapping.maps[o.mapping.maps.length-1],c.push(new fp(v,void 0,void 0,c.length+d.length))),i--,v&&s.appendMap(v,i)}else o.maybeStep(f.step);if(f.selection)return a=s?f.selection.map(s.slice(i)):f.selection,l=new dc(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,s){let i=[],o=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let d=0;d<e.steps.length;d++){let f=e.steps[d].invert(e.docs[d]),p=new fp(e.mapping.maps[d],f,n),m;(m=l&&l.merge(p))&&(p=m,d?i.pop():a=a.slice(0,a.length-1)),i.push(p),n&&(o++,n=void 0),s||(l=p)}let c=o-r.depth;return c>M7e&&(a=E7e(a,c),o-=c),new dc(a.append(i),o)}remapping(e,n){let r=new IS;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new dc(this.items.append(e.map(n=>new fp(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},s);let l=n;this.items.forEach(p=>{let m=i.getMirror(--l);if(m==null)return;o=Math.min(o,m);let v=i.maps[m];if(p.step){let y=e.steps[m].invert(e.docs[m]),x=p.selection&&p.selection.map(i.slice(l+1,m));x&&a++,r.push(new fp(v,y,x))}else r.push(new fp(v))},s);let c=[];for(let p=n;p<o;p++)c.push(new fp(i.maps[p]));let d=this.items.slice(0,s).append(c).append(r),f=new dc(d,a);return f.emptyItemCount()>C7e&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,s=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)s.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let d=o.selection&&o.selection.map(n.slice(r));d&&i++;let f=new fp(c.invert(),l,d),p,m=s.length-1;(p=s.length&&s[m].merge(f))?s[m]=p:s.push(f)}}else o.map&&r--},this.items.length,0),new dc(hi.from(s.reverse()),i)}}dc.empty=new dc(hi.empty,0);function E7e(t,e){let n;return t.forEach((r,s)=>{if(r.selection&&e--==0)return n=s,!1}),t.slice(n)}let fp=class tce{constructor(e,n,r,s){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new tce(n.getMap().invert(),n,this.selection)}}};class Dp{constructor(e,n,r,s,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const M7e=20;function D7e(t,e,n,r){let s=n.getMeta(Rg),i;if(s)return s.historyState;n.getMeta(A7e)&&(t=new Dp(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Rg))return o.getMeta(Rg).redo?new Dp(t.done.addTransform(n,void 0,r,uk(e)),t.undone,gW(n.mapping.maps),t.prevTime,t.prevComposition):new Dp(t.done,t.undone.addTransform(n,void 0,r,uk(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!k7e(n,t.prevRanges)),c=o?iN(t.prevRanges,n.mapping):gW(n.mapping.maps);return new Dp(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,uk(e)),dc.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Dp(t.done.rebased(n,i),t.undone.rebased(n,i),iN(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Dp(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),iN(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function k7e(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(n=!0)}),n}function gW(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,s,i,o)=>e.push(i,o));return e}function iN(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let s=e.map(t[r],1),i=e.map(t[r+1],-1);s<=i&&n.push(s,i)}return n}function T7e(t,e,n){let r=uk(e),s=Rg.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),l=new Dp(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(Rg,{redo:n,historyState:l})}let oN=!1,vW=null;function uk(t){let e=t.plugins;if(vW!=e){oN=!1,vW=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){oN=!0;break}}return oN}const Rg=new ni("history"),A7e=new ni("closeHistory");function _7e(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new is({key:Rg,state:{init(){return new Dp(dc.empty,dc.empty,null,0,-1)},apply(e,n,r){return D7e(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,s=r=="historyUndo"?rce:r=="historyRedo"?sce:null;return!s||!e.editable?!1:(n.preventDefault(),s(e.state,e.dispatch))}}}})}function nce(t,e){return(n,r)=>{let s=Rg.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(r){let i=T7e(s,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const rce=nce(!1,!0),sce=nce(!0,!0);var O7e=gs.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new is({key:new ni("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const s=this.options.limit;if(s==null||s===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>s){const o=i-s,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${s} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const s=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||s>r&&i>r&&i<=s)return!0;if(s>r&&i>r&&i>s||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=i-r,c=a-l,d=a;return e.deleteRange(c,d),!(this.storage.characters({node:e.doc})>r)}})]}}),R7e=gs.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[p7e(this.options)]}});gs.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new is({key:new ni("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:s}=e,i=[];if(!n||!r)return fs.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,c)=>{if(l.isText)return;if(!(s>=c&&s<=c+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,c)=>{if(l.isText||!(s>=c&&s<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(zo.node(c,c+l.nodeSize,{class:this.options.className}))}),fs.create(t,i)}}})]}});var N7e=gs.create({name:"gapCursor",addProseMirrorPlugins(){return[v7e()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=yr(Ft(t,"allowGapCursor",n)))!=null?e:null}}}),j7e=gs.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new is({key:new ni("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,s=[];if(!n)return null;const i=this.editor.isEmpty;return t.descendants((o,a)=>{const l=r>=a&&r<=a+o.nodeSize,c=!o.isLeaf&&T3(o);if((l||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const f=zo.node(a,a+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:a,hasAnchor:l}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),fs.create(t,s)}}})]}});gs.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new is({key:new ni("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||mle(n.selection)||t.view.dragging?null:fs.create(n.doc,[zo.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function yW({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var I7e=gs.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new ni(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,s])=>s).filter(s=>(this.options.notAfter||[]).concat(n).includes(s.name));return[new is({key:e,appendTransaction:(s,i,o)=>{const{doc:a,tr:l,schema:c}=o,d=e.getState(o),f=a.content.size,p=c.nodes[n];if(d)return l.insert(f,p.create())},state:{init:(s,i)=>{const o=i.tr.doc.lastChild;return!yW({node:o,types:r})},apply:(s,i)=>{if(!s.docChanged||s.getMeta("__uniqueIDTransaction"))return i;const o=s.doc.lastChild;return!yW({node:o,types:r})}}})]}}),L7e=gs.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>rce(t,e),redo:()=>({state:t,dispatch:e})=>sce(t,e)}},addProseMirrorPlugins(){return[_7e(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),P7e=O7e,$7e=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,z7e=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,F7e=Uu.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",ms(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){const s=/^(==)([^=]+)(==)/.exec(t);if(s){const i=s[2].trim(),o=n.inlineTokens(i);return{type:"highlight",raw:s[0],text:i,tokens:o}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Qg({find:$7e,type:this.type})]},addPasteRules(){return[dh({find:z7e,type:this.type})]}}),B7e=F7e,H7e=j7e,q7e=Uu.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",ms(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),U7e=q7e,V7e=Uu.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",ms(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),W7e=V7e,Y7e=gs.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),G7e=Y7e,ice=Uu.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",ms(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const s=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!s)return;const i=s[2].trim();return{type:"underline",raw:s[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),K7e=ice,oA=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Z7e=/^\s*>\s$/,J7e=Qa.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return oA("blockquote",{...ms(this.options.HTMLAttributes,t),children:oA("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(s=>{const a=e.renderChildren([s]).split(`
`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(`
`))}),r.join(`
${n}
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[u1({find:Z7e,type:this.type})]}}),X7e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Q7e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,eze=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,tze=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,nze=Uu.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return oA("strong",{...ms(this.options.HTMLAttributes,t),children:oA("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Qg({find:X7e,type:this.type}),Qg({find:eze,type:this.type})]},addPasteRules(){return[dh({find:Q7e,type:this.type}),dh({find:tze,type:this.type})]}}),rze=/(^|[^`])`([^`]+)`(?!`)$/,sze=/(^|[^`])`([^`]+)`(?!`)/g,ize=Uu.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",ms(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Qg({find:rze,type:this.type})]},addPasteRules(){return[dh({find:sze,type:this.type})]}}),aN=4,oze=/^```([a-z]+)?[\s\n]$/,aze=/^~~~([a-z]+)?[\s\n]$/,lze=Qa.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:aN,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",ms(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const s=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${s}`,e.renderChildren(t.content),"```"].join(`
`):r=`\`\`\`${s}

\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:aN,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;if(i.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:c,to:d}=s,m=r.doc.textBetween(c,d,`
`,`
`).split(`
`).map(v=>a+v).join(`
`);return l.replaceWith(c,d,r.schema.text(m)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:aN,{state:r}=t,{selection:s}=r,{$from:i,empty:o}=s;return i.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:c}=i,d=i.start(),f=i.end(),m=r.doc.textBetween(d,f,`
`,`
`).split(`
`);let v=0,y=0;const x=c-d;for(let A=0;A<m.length;A+=1){if(y+m[A].length>=x){v=A;break}y+=m[A].length+1}const C=((l=m[v].match(/^ */))==null?void 0:l[0])||"",E=Math.min(C.length,n);if(E===0)return!0;let D=d;for(let A=0;A<v;A+=1)D+=m[A].length+1;return a.delete(D,D+E),c-D<=E&&a.setSelection(rn.create(a.doc,D)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:c}=s,p=r.doc.textBetween(l,c,`
`,`
`).split(`
`).map(m=>{var v;const y=((v=m.match(/^ */))==null?void 0:v[0])||"",x=Math.min(y.length,n);return m.slice(x)}).join(`
`);return a.replaceWith(l,c,r.schema.text(p)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:s}=n;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`

`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:s,empty:i}=n;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const a=s.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:c})=>(c.setSelection(En.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[eP({find:oze,type:this.type,getAttributes:t=>({language:t[1]})}),eP({find:aze,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new is({key:new ni("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s==null?void 0:s.mode;if(!n||!i)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(rn.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),cze=Qa.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`

`):""}),uze=Qa.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",ms(this.options.HTMLAttributes,t)]},renderText(){return`
`},renderMarkdown:()=>`  
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:s,storedMarks:i}=n;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&o){const f=l.filter(p=>a.includes(p.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),dze=Qa.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,ms(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,s="#".repeat(r);return t.content?`${s} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>eP({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),fze=Qa.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",ms(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!f9e(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,s=t();return mle(n)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({state:i,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(rn.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(qt.create(o.doc,l.pos)):o.setSelection(rn.create(o.doc,l.pos));else{const d=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,f=d==null?void 0:d.create();f&&(o.insert(c,f),o.setSelection(rn.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[d9e({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),pze=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,hze=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,mze=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,gze=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,vze=Uu.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",ms(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Qg({find:pze,type:this.type}),Qg({find:mze,type:this.type})]},addPasteRules(){return[dh({find:hze,type:this.type}),dh({find:gze,type:this.type})]}}),yze=Object.defineProperty,bze=(t,e)=>{for(var n in e)yze(t,n,{get:e[n],enumerable:!0})},xze="listItem",bW="textStyle",xW=/^\s*([-+*])\s$/,oce=Qa.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",ms(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xze,this.editor.getAttributes(bW)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=u1({find:xW,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=u1({find:xW,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(bW),editor:this.editor})),[t]}}),ace=Qa.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",ms(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(s=>s.type==="paragraph"))n=e.parseChildren(t.tokens);else{const s=t.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(s.tokens)}],t.tokens.length>1){const o=t.tokens.slice(1),a=e.parseChildren(o);n.push(...a)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>D7(t,e,r=>r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${r.index+1}. `:"- ",n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Sze={};bze(Sze,{findListItemPos:()=>Gw,getNextListDepth:()=>H7,handleBackspace:()=>dP,handleDelete:()=>fP,hasListBefore:()=>lce,hasListItemAfter:()=>wze,hasListItemBefore:()=>cce,listItemHasSubList:()=>uce,nextListIsDeeper:()=>dce,nextListIsHigher:()=>fce});var Gw=(t,e)=>{const{$from:n}=e.selection,r=Ws(t,e.schema);let s=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)s=n.node(i),s.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},H7=(t,e)=>{const n=Gw(t,e);if(!n)return!1;const[,r]=wPe(e,t,n.$pos.pos+4);return r},lce=(t,e,n)=>{const{$anchor:r}=t.selection,s=Math.max(0,r.pos-2),i=t.doc.resolve(s).node();return!(!i||!n.includes(i.type.name))},cce=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-2);return!(s.index()===0||((n=s.nodeBefore)==null?void 0:n.type.name)!==t)},uce=(t,e,n)=>{if(!n)return!1;const r=Ws(t,e.schema);let s=!1;return n.descendants(i=>{i.type===r&&(s=!0)}),s},dP=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!uh(t.state,e)&&lce(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),c=[];l.node().descendants((p,m)=>{p.type.name===e&&c.push({node:p,pos:m})});const d=c.at(-1);if(!d)return!1;const f=t.state.doc.resolve(l.start()+d.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},f.end()).joinForward().run()}if(!uh(t.state,e)||!DPe(t.state))return!1;const r=Gw(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=uce(e,t.state,i);return cce(e,t.state)&&!o?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},dce=(t,e)=>{const n=H7(t,e),r=Gw(t,e);return!r||!n?!1:n>r.depth},fce=(t,e)=>{const n=H7(t,e),r=Gw(t,e);return!r||!n?!1:n<r.depth},fP=(t,e)=>{if(!uh(t.state,e)||!MPe(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:s}=n;return!n.empty&&r.sameParent(s)?!1:dce(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():fce(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},wze=(t,e)=>{var n;const{$anchor:r}=e.selection,s=e.doc.resolve(r.pos-r.parentOffset-2);return!(s.index()===s.parent.childCount-1||((n=s.nodeAfter)==null?void 0:n.type.name)!==t)},pce=gs.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&fP(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&fP(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&dP(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&dP(t,n,r)&&(e=!0)}),e}}}}),SW=/^(\s*)(\d+)\.\s+(.*)$/,Cze=/^\s/;function Eze(t){const e=[];let n=0,r=0;for(;n<t.length;){const s=t[n],i=s.match(SW);if(!i)break;const[,o,a,l]=i,c=o.length;let d=l,f=n+1;const p=[s];for(;f<t.length;){const m=t[f];if(m.match(SW))break;if(m.trim()==="")p.push(m),d+=`
`,f+=1;else if(m.match(Cze))p.push(m),d+=`
${m.slice(c+2)}`,f+=1;else break}e.push({indent:c,number:parseInt(a,10),content:d.trim(),raw:p.join(`
`)}),r=f,n=f}return[e,r]}function hce(t,e,n){var r;const s=[];let i=0;for(;i<t.length;){const o=t[i];if(o.indent===e){const a=o.content.split(`
`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.slice(1).join(`
`).trim();if(d){const m=n.blockTokens(d);c.push(...m)}let f=i+1;const p=[];for(;f<t.length&&t[f].indent>e;)p.push(t[f]),f+=1;if(p.length>0){const m=Math.min(...p.map(y=>y.indent)),v=hce(p,m,n);c.push({type:"list",ordered:!0,start:p[0].number,items:v,raw:p.map(y=>y.raw).join(`
`)})}s.push({type:"list_item",raw:o.raw,tokens:c}),i=f}else i+=1}return s}function Mze(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(s=>{if(s.type==="paragraph"||s.type==="list"||s.type==="blockquote"||s.type==="code")r.push(...e.parseChildren([s]));else if(s.type==="text"&&s.tokens){const i=e.parseChildren([s]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([s]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var Dze="listItem",wW="textStyle",CW=/^(\d+)\.\s$/,mce=Qa.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",ms(this.options.HTMLAttributes,n),0]:["ol",ms(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?Mze(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const s=t.split(`
`),[i,o]=Eze(s);if(i.length===0)return;const a=hce(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:s.slice(0,o).join(`
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Dze,this.editor.getAttributes(wW)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=u1({find:CW,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=u1({find:CW,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(wW)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),kze=/^\s*(\[([( |x])?\])\s$/,Tze=Qa.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",ms(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const s=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return D7(t,e,s)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const s=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=f=>{var p,m;a.ariaLabel=((m=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:m.call(p,f,a.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};c(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",f=>f.preventDefault()),a.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const v=n();if(typeof v!="number")return!1;const y=m.doc.nodeAt(v);return m.setNodeMarkup(v,void 0,{...y==null?void 0:y.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,p])=>{s.setAttribute(f,p)}),s.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),s.append(i,l),Object.entries(e).forEach(([f,p])=>{s.setAttribute(f,p)});let d=new Set(Object.keys(e));return{dom:s,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;s.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,c(f);const p=r.extensionManager.attributes,m=BS(f,p),v=new Set(Object.keys(m)),y=this.options.HTMLAttributes;return d.forEach(x=>{v.has(x)||(x in y?s.setAttribute(x,y[x]):s.removeAttribute(x))}),Object.entries(m).forEach(([x,w])=>{w==null?x in y?s.setAttribute(x,y[x]):s.removeAttribute(x):s.setAttribute(x,w)}),d=v,!0}}}},addInputRules(){return[u1({find:kze,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Aze=Qa.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",ms(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const o=tP(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(i)},s=tP(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});gs.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(oce.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(ace.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(pce.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(mce.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Tze.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Aze.configure(this.options.taskList)),t}});var _ze=Qa.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",ms(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];return n.length===1&&n[0].type==="image"?e.parseChildren([n[0]]):e.createNode("paragraph",void 0,e.parseInline(n))},renderMarkdown:(t,e)=>!t||!Array.isArray(t.content)?"":e.renderChildren(t.content),addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Oze=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Rze=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Nze=Uu.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",ms(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Qg({find:Oze,type:this.type})]},addPasteRules(){return[dh({find:Rze,type:this.type})]}}),jze=Qa.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Ize=gs.create({name:"starterKit",addExtensions(){var t,e,n,r;const s=[];return this.options.bold!==!1&&s.push(nze.configure(this.options.bold)),this.options.blockquote!==!1&&s.push(J7e.configure(this.options.blockquote)),this.options.bulletList!==!1&&s.push(oce.configure(this.options.bulletList)),this.options.code!==!1&&s.push(ize.configure(this.options.code)),this.options.codeBlock!==!1&&s.push(lze.configure(this.options.codeBlock)),this.options.document!==!1&&s.push(cze.configure(this.options.document)),this.options.dropcursor!==!1&&s.push(R7e.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&s.push(N7e.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&s.push(uze.configure(this.options.hardBreak)),this.options.heading!==!1&&s.push(dze.configure(this.options.heading)),this.options.undoRedo!==!1&&s.push(L7e.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&s.push(fze.configure(this.options.horizontalRule)),this.options.italic!==!1&&s.push(vze.configure(this.options.italic)),this.options.listItem!==!1&&s.push(ace.configure(this.options.listItem)),this.options.listKeymap!==!1&&s.push(pce.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&s.push(Hle.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&s.push(mce.configure(this.options.orderedList)),this.options.paragraph!==!1&&s.push(_ze.configure(this.options.paragraph)),this.options.strike!==!1&&s.push(Nze.configure(this.options.strike)),this.options.text!==!1&&s.push(jze.configure(this.options.text)),this.options.underline!==!1&&s.push(ice.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&s.push(I7e.configure((r=this.options)==null?void 0:r.trailingNode)),s}}),Lze=Ize;const Pze=gs.create({name:"maxPastedLength",addOptions(){return{maxLength:1e3,maxLengthErrorMessage:{}}},addStorage(){return{isMaxLengthReached:!1}},addProseMirrorPlugins(){const t=this,{maxLength:e,maxLengthErrorMessage:n}=t.options;return[new is({props:{handlePaste:(r,s,i)=>{const o=r.state.doc.textContent.length,a=i.content.textBetween(0,i.content.size,"").length,l=r.state.selection.to-r.state.selection.from;return o-l+a>e?($n.showError(n.title,n.message),s.preventDefault(),!0):!1}}})]}}),$ze={linkControlLabel:"Ссылка",colorPickerControlLabel:"Цвет текста",highlightControlLabel:"Выделить текст",colorControlLabel:t=>`Установить цвет текста ${t}`,boldControlLabel:"Жирный",italicControlLabel:"Курсив",underlineControlLabel:"Подчеркнутый",strikeControlLabel:"Зачеркнутый",clearFormattingControlLabel:"Очистить форматирование",unlinkControlLabel:"Удалить ссылку",bulletListControlLabel:"Маркированный список",orderedListControlLabel:"Нумерованный список",h1ControlLabel:"Заголовок 1",h2ControlLabel:"Заголовок 2",h3ControlLabel:"Заголовок 3",h4ControlLabel:"Заголовок 4",h5ControlLabel:"Заголовок 5",h6ControlLabel:"Заголовок 6",blockquoteControlLabel:"Цитата",alignLeftControlLabel:"Выровнять текст: слева",alignCenterControlLabel:"Выровнять текст: по центру",alignRightControlLabel:"Выровнять текст: справа",alignJustifyControlLabel:"Выровнять текст: по ширине",codeControlLabel:"Код",codeBlockControlLabel:"Блок кода",subscriptControlLabel:"Подстрочный",superscriptControlLabel:"Надстрочный",unsetColorControlLabel:"Сбросить цвет",hrControlLabel:"Горизонтальная линия",linkEditorInputLabel:"Введите URL",linkEditorInputPlaceholder:"https://example.com/",linkEditorExternalLink:"Открыть ссылку в новой вкладке",linkEditorInternalLink:"Открыть ссылку в той же вкладке",linkEditorSave:"Сохранить",colorPickerCancel:"Отмена",colorPickerClear:"Очистить цвет",colorPickerColorPicker:"Выбор цвета",colorPickerPalette:"Палитра цветов",colorPickerSave:"Сохранить",colorPickerColorLabel:t=>`Установить цвет текста ${t}`},pP=3e3,EW=t=>t?g.jsx("span",{className:ti("character-count",{"is-red":t===pP}),children:`${t}/3000`}):null,zze=t=>{const e=Ve.c(33),{charactersCounter:n}=t,{isMobile:r,isDesktop:s,isTablet:i}=Yt(),[o,a]=O.useState(!1);let l,c;e[0]!==s||e[1]!==r||e[2]!==i?(l=()=>{(r||i||s)&&a(!1)},c=[r,s,i],e[0]=s,e[1]=r,e[2]=i,e[3]=l,e[4]=c):(l=e[3],c=e[4]),O.useEffect(l,c);let d;e[5]!==r?(d=r?{padding:"8px",display:"flex"}:void 0,e[5]=r,e[6]=d):d=e[6];const f=d,p=o?"normal":"space-between";let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsxs(Mt.ControlsGroup,{children:[g.jsx(Mt.Bold,{}),g.jsx(Mt.Italic,{}),g.jsx(Mt.Underline,{}),g.jsx(Mt.Strikethrough,{}),g.jsx(Mt.ClearFormatting,{}),g.jsx(Mt.Highlight,{}),g.jsx(Mt.Code,{})]}),e[7]=m):m=e[7];let v;e[8]!==s||e[9]!==o?(v=(o||s)&&g.jsxs(g.Fragment,{children:[g.jsxs(Mt.ControlsGroup,{children:[g.jsx(Mt.H1,{}),g.jsx(Mt.H2,{}),g.jsx(Mt.H3,{}),g.jsx(Mt.H4,{})]}),g.jsxs(Mt.ControlsGroup,{children:[g.jsx(Mt.Blockquote,{}),g.jsx(Mt.Hr,{}),g.jsx(Mt.BulletList,{}),g.jsx(Mt.OrderedList,{}),g.jsx(Mt.Subscript,{}),g.jsx(Mt.Superscript,{})]}),g.jsxs(Mt.ControlsGroup,{children:[g.jsx(Mt.Link,{}),g.jsx(Mt.Unlink,{})]}),g.jsxs(Mt.ControlsGroup,{children:[g.jsx(Mt.AlignLeft,{}),g.jsx(Mt.AlignCenter,{}),g.jsx(Mt.AlignJustify,{}),g.jsx(Mt.AlignRight,{})]})]}),e[8]=s,e[9]=o,e[10]=v):v=e[10];let y;e[11]!==n||e[12]!==o?(y=o&&EW(n),e[11]=n,e[12]=o,e[13]=y):y=e[13];let x;e[14]!==v||e[15]!==y?(x=g.jsxs(vt,{align:"center",gap:8,wrap:"wrap",w:"100%",children:[m,v,y]}),e[14]=v,e[15]=y,e[16]=x):x=e[16];let w;e[17]!==n||e[18]!==s||e[19]!==o?(w=(s||!s&&!o)&&EW(n),e[17]=n,e[18]=s,e[19]=o,e[20]=w):w=e[20];let C;e[21]!==p||e[22]!==x||e[23]!==w?(C=g.jsxs(vt,{align:"center",w:"100%",justify:p,children:[x,w]}),e[21]=p,e[22]=x,e[23]=w,e[24]=C):C=e[24];let E;e[25]!==r||e[26]!==o||e[27]!==i?(E=(r||i)&&g.jsx("div",{className:"editor-chevron-container",style:{width:"18px",height:"18px"},children:g.jsx(gn,{className:"editor-chevron",size:"xs",onClick:()=>{a(Fze)},children:g.jsx(_$,{className:ti({"reversed-chevron":o})})})}),e[25]=r,e[26]=o,e[27]=i,e[28]=E):E=e[28];let D;return e[29]!==f||e[30]!==C||e[31]!==E?(D=g.jsxs(Mt.Toolbar,{style:f,sticky:!0,children:[C,E]}),e[29]=f,e[30]=C,e[31]=E,e[32]=D):D=e[32],D};function Fze(t){return!t}const Bze=t=>{const e=Ve.c(50),{content:n,onChange:r,disabled:s}=t,{t:i,i18n:o}=yt(),a=o.language==="ru";let l,c,d,f,p,m,v,y,x,w,C;if(e[0]!==i){const B={title:i("validations.descriptionLengthError.title"),message:i("validations.descriptionLengthError.message")};d=Y8e,l=Lze,f=K7e,p=V9e,m=W7e,v=U7e,y=B7e,e[12]===Symbol.for("react.memo_cache_sentinel")?(x=G7e.configure({types:["heading","paragraph"]}),e[12]=x):x=e[12],w=H7e.configure({placeholder:i("placeholders.description")}),e[13]===Symbol.for("react.memo_cache_sentinel")?(C=P7e.configure({limit:pP}),e[13]=C):C=e[13],c=Pze.configure({maxLength:pP,maxLengthErrorMessage:B}),e[0]=i,e[1]=l,e[2]=c,e[3]=d,e[4]=f,e[5]=p,e[6]=m,e[7]=v,e[8]=y,e[9]=x,e[10]=w,e[11]=C}else l=e[1],c=e[2],d=e[3],f=e[4],p=e[5],m=e[6],v=e[7],y=e[8],x=e[9],w=e[10],C=e[11];let E;e[14]!==l||e[15]!==c||e[16]!==f||e[17]!==p||e[18]!==m||e[19]!==v||e[20]!==y||e[21]!==x||e[22]!==w||e[23]!==C?(E=[l,f,p,m,v,y,x,w,C,c],e[14]=l,e[15]=c,e[16]=f,e[17]=p,e[18]=m,e[19]=v,e[20]=y,e[21]=x,e[22]=w,e[23]=C,e[24]=E):E=e[24];const D=!s;let T;e[25]!==r?(T=B=>{const{editor:V}=B;r((V==null?void 0:V.getHTML())||"")},e[25]=r,e[26]=T):T=e[26];let A;e[27]!==n||e[28]!==E||e[29]!==D||e[30]!==T?(A={extensions:E,content:n,editable:D,onUpdate:T},e[27]=n,e[28]=E,e[29]=D,e[30]=T,e[31]=A):A=e[31];let _;e[32]!==n||e[33]!==s?(_=[s,n],e[32]=n,e[33]=s,e[34]=_):_=e[34];const R=d(A,_);let N;e[35]!==s?(N=ti("rich-text-editor-container",{"rich-text-editor-container-disabled":s}),e[35]=s,e[36]=N):N=e[36];const I=a?$ze:qle;let $;e[37]===Symbol.for("react.memo_cache_sentinel")?($={toolbar:{justifyContent:"space-between",alignItems:"start",flexWrap:"nowrap"}},e[37]=$):$=e[37];let L;e[38]!==(R==null?void 0:R.storage.characterCount)?(L=R==null?void 0:R.storage.characterCount.characters(),e[38]=R==null?void 0:R.storage.characterCount,e[39]=L):L=e[39];let z;e[40]!==L?(z=g.jsx(zze,{charactersCounter:L}),e[40]=L,e[41]=z):z=e[41];let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(Mt.Content,{}),e[42]=F):F=e[42];let q;e[43]!==R||e[44]!==I||e[45]!==z?(q=g.jsxs(Mt,{labels:I,editor:R,styles:$,children:[z,F]}),e[43]=R,e[44]=I,e[45]=z,e[46]=q):q=e[46];let H;return e[47]!==N||e[48]!==q?(H=g.jsx(le,{className:N,children:q}),e[47]=N,e[48]=q,e[49]=H):H=e[49],H},Hze=t=>{const e=Ve.c(7),{event:n,handleSetEvent:r,disabled:s,eventDescription:i}=t;let o;e[0]!==n||e[1]!==r?(o=c=>{r({...n,resource:{...n.resource,description:c}})},e[0]=n,e[1]=r,e[2]=o):o=e[2];const a=o;let l;return e[3]!==s||e[4]!==i||e[5]!==a?(l=g.jsx(Bze,{content:i,disabled:s,onChange:a}),e[3]=s,e[4]=i,e[5]=a,e[6]=l):l=e[6],l},qze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.997%2015.2043L5.45974%202.12734L18.5342%202.12734L11.997%2015.2043Z'%20fill='%23FF6B6B'/%3e%3cpath%20d='M5%201C3.34315%201%202%202.34315%202%204V19.9973C2%2021.6542%203.34315%2022.9973%205%2022.9973H19C20.6569%2022.9973%2022%2021.6542%2022%2019.9973V4C22%202.34315%2020.6569%201%2019%201H16.5C16.5%201%2012.8297%203.94874%2012.4264%2011.0247C12.1447%2011.3173%2011.8849%2011.3025%2011.5755%2011.0247C11.0046%203.91723%207%201%207%201H5Z'%20fill='%2381A3C5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.1903%201L5.84118%201.34685C5.60611%201.58041%205.60487%201.9603%205.83842%202.19538C6.07197%202.43045%206.45187%202.43169%206.68694%202.19814L7.3283%201.56095C7.51223%201.7618%207.69814%201.97398%207.88384%202.19734L7.16905%202.74102C6.90531%202.94163%206.85413%203.31807%207.05474%203.58181C7.25535%203.84556%207.63178%203.89674%207.89553%203.69613L8.61805%203.14657C8.78504%203.37931%208.94941%203.62133%209.10947%203.8725L8.33964%204.29024C8.04839%204.44828%207.9404%204.81251%208.09845%205.10376C8.25649%205.39502%208.62072%205.503%208.91197%205.34496L9.71417%204.90965C9.83152%205.131%209.94463%205.35817%2010.0526%205.59107L9.23216%205.91252C8.92362%206.03341%208.7715%206.38152%208.89239%206.69005C9.01327%206.99859%209.36138%207.15071%209.66992%207.02983L10.5093%206.70096C10.5966%206.94319%2010.6778%207.19071%2010.7521%207.44345L9.8859%207.65785C9.56423%207.73746%209.36801%208.06277%209.44763%208.38443C9.52725%208.70609%209.85255%208.90231%2010.1742%208.8227L11.0363%208.60933C11.0575%208.71888%2011.0774%208.82929%2011.0959%208.94055C11.0327%209.0717%2010.9973%209.21877%2010.9973%209.3741V9.52462H10.2969C9.96553%209.52462%209.6969%209.79325%209.6969%2010.1246C9.6969%2010.456%209.96553%2010.7246%2010.2969%2010.7246H10.9973V11.3318C9.83214%2011.7436%208.99733%2012.8549%208.99733%2014.1611V17.1611C8.99733%2017.7134%209.44505%2018.1611%209.99733%2018.1611H13.9973C14.5496%2018.1611%2014.9973%2017.7134%2014.9973%2017.1611V14.1611C14.9973%2012.8549%2014.1625%2011.7436%2012.9973%2011.3318V9.69337H13.6975C14.0288%209.69337%2014.2975%209.42474%2014.2975%209.09337C14.2975%208.762%2014.0288%208.49337%2013.6975%208.49337H12.9605C13.0027%208.23162%2013.0531%207.97476%2013.111%207.72285L13.9806%207.95352C14.3009%208.03847%2014.6294%207.84769%2014.7144%207.52739C14.7993%207.2071%2014.6086%206.87858%2014.2883%206.79362L13.4373%206.56791C13.5347%206.27813%2013.6415%205.99597%2013.7561%205.72156L14.5555%206.09989C14.855%206.24165%2015.2127%206.11375%2015.3545%205.81423C15.4962%205.51471%2015.3683%205.15698%2015.0688%205.01523L14.2684%204.63644C14.4131%204.36228%2014.5647%204.09742%2014.7213%203.84201L15.4632%204.33575C15.7391%204.51934%2016.1115%204.44454%2016.2951%204.16868C16.4787%203.89282%2016.4039%203.52035%2016.128%203.33676L15.3892%202.84503C15.5695%202.59738%2015.7528%202.36102%2015.9366%202.13615L16.6091%202.73915C16.8558%202.96036%2017.2352%202.93969%2017.4564%202.69297C17.6776%202.44625%2017.6569%202.06691%2017.4102%201.8457L16.7288%201.23476C16.8046%201.15443%2016.8799%201.07617%2016.9545%201H15.8574C15.8262%201.03476%2015.7949%201.06984%2015.7635%201.10526C14.9004%202.08038%2013.9989%203.31537%2013.2957%204.79138C13.2886%204.80402%2013.2819%204.81701%2013.2756%204.83035C13.2691%204.84389%2013.2633%204.85756%2013.258%204.87132C12.7642%205.92477%2012.3724%207.0994%2012.1671%208.38846C12.1119%208.37902%2012.0552%208.3741%2011.9973%208.3741C11.9329%208.3741%2011.8699%208.3802%2011.8088%208.39184C11.1802%205.23533%209.50654%202.77154%207.97906%201.08733C7.95245%201.058%207.92588%201.02889%207.89935%201H6.1903ZM11.9973%2013.1955C11.5923%2013.1955%2011.2434%2012.9546%2011.0863%2012.6083C10.5543%2012.9211%2010.1973%2013.4994%2010.1973%2014.1611V16.9611H13.7973V14.1611C13.7973%2013.4994%2013.4403%2012.9211%2012.9084%2012.6083C12.7512%2012.9546%2012.4024%2013.1955%2011.9973%2013.1955Z'%20fill='white'/%3e%3c/svg%3e",Uze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23228BE6'/%3e%3cpath%20d='M6%207.9999C6%207.66853%206.26863%207.3999%206.6%207.3999H17.4C17.7314%207.3999%2018%207.66853%2018%207.9999C18%208.33127%2017.7314%208.5999%2017.4%208.5999H6.6C6.26863%208.5999%206%208.33127%206%207.9999Z'%20fill='white'/%3e%3cpath%20d='M6%2011.9999C6%2011.6685%206.26863%2011.3999%206.6%2011.3999H17.4C17.7314%2011.3999%2018%2011.6685%2018%2011.9999C18%2012.3313%2017.7314%2012.5999%2017.4%2012.5999H6.6C6.26863%2012.5999%206%2012.3313%206%2011.9999Z'%20fill='white'/%3e%3cpath%20d='M6.6%2015.3999C6.26863%2015.3999%206%2015.6685%206%2015.9999C6%2016.3313%206.26863%2016.5999%206.6%2016.5999H14.4C14.7314%2016.5999%2015%2016.3313%2015%2015.9999C15%2015.6685%2014.7314%2015.3999%2014.4%2015.3999H6.6Z'%20fill='white'/%3e%3c/svg%3e",Vze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%204C2%202.34315%203.34315%201%205%201H14.7574C15.553%201%2016.3161%201.31607%2016.8787%201.87868L19%204L21.1213%206.12132C21.6839%206.68393%2022%207.44699%2022%208.24264V20C22%2021.6569%2020.6569%2023%2019%2023H5C3.34315%2023%202%2021.6569%202%2020V4Z'%20fill='%23BACCDF'/%3e%3cpath%20d='M14.8999%201.00342V6.50003C14.8999%207.38368%2015.6162%208.10003%2016.4999%208.10003L21.9965%208.10003C21.9765%207.67959%2021.8684%207.27119%2021.6827%206.90003L16.4999%206.90003C16.279%206.90003%2016.0999%206.72094%2016.0999%206.50003L16.0999%201.31724C15.7287%201.1315%2015.3203%201.02342%2014.8999%201.00342Z'%20fill='white'/%3e%3c/svg%3e",Wze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%203C9.2198%202.99998%209.43348%203.07238%209.608%203.206L9.708%203.293L12.414%206H19C19.7652%205.99996%2020.5015%206.29233%2021.0583%206.81728C21.615%207.34224%2021.9501%208.06011%2021.995%208.824L22%209V17C22%2017.7652%2021.7077%2018.5015%2021.1827%2019.0583C20.6578%2019.615%2019.9399%2019.9501%2019.176%2019.995L19%2020H5C4.23479%2020%203.49849%2019.7077%202.94174%2019.1827C2.38499%2018.6578%202.04989%2017.9399%202.005%2017.176L2%2017V6C1.99996%205.23479%202.29233%204.49849%202.81728%203.94174C3.34224%203.38499%204.06011%203.04989%204.824%203.005L5%203H9Z'%20fill='%236C8196'/%3e%3c/svg%3e",Yze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23E64980'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.79932%209.37741V5.83398H18.1565V14.1911H14.6127C14.6127%2016.8496%2012.4576%2019.0048%209.79904%2019.0048C7.14051%2019.0048%204.98535%2016.8496%204.98535%2014.1911C4.98535%2011.5326%207.14079%209.37741%209.79932%209.37741C9.79941%209.37741%209.79922%209.37741%209.79932%209.37741ZM10.9993%207.03398H16.9565V12.9911H14.462C14.0272%2011.2969%2012.6935%209.96308%2010.9993%209.52826V7.03398ZM13.4127%2014.1911C13.4127%2016.1869%2011.7948%2017.8048%209.79904%2017.8048C7.80325%2017.8048%206.18535%2016.1869%206.18535%2014.1911C6.18535%2012.1953%207.80325%2010.5774%209.79904%2010.5774C9.79894%2010.5774%209.79913%2010.5774%209.79904%2010.5774L9.79932%2014.1911H13.4127ZM13.2087%2012.9911H10.9993V10.7815C12.0297%2011.1442%2012.8461%2011.9607%2013.2087%2012.9911Z'%20fill='white'/%3e%3c/svg%3e",Gze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%234DABF7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.6215%2010.4561C14.9164%2010.1761%2015.3807%2010.1821%2015.6683%2010.4697L19.6683%2014.4697C19.9612%2014.7626%2019.9612%2015.2374%2019.6683%2015.5303C19.3754%2015.8232%2018.9005%2015.8232%2018.6076%2015.5303L15.1244%2012.0471L11.4422%2015.5439C11.152%2015.8194%2010.6967%2015.8186%2010.4075%2015.5421L9.00646%2014.2027L5.6785%2017.5304C5.38559%2017.8232%204.91072%2017.8232%204.61784%2017.5303C4.32496%2017.2374%204.32498%2016.7625%204.61789%2016.4696L8.46439%2012.6235C8.75265%2012.3353%209.21834%2012.33%209.51298%2012.6117L10.9275%2013.9641L14.6215%2010.4561Z'%20fill='white'/%3e%3cpath%20d='M10.0001%208.5C10.0001%209.32843%209.32853%2010%208.50011%2010C7.67168%2010%207.00011%209.32843%207.00011%208.5C7.00011%207.67157%207.67168%207%208.50011%207C9.32853%207%2010.0001%207.67157%2010.0001%208.5Z'%20fill='white'/%3e%3c/svg%3e",Kze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F59F00'/%3e%3cpath%20d='M8.7627%207.75794V16.2419C8.76267%2016.3363%208.78782%2016.4289%208.83554%2016.5103C8.88327%2016.5917%208.95184%2016.6588%209.0342%2016.7049C9.11655%2016.7509%209.20969%2016.7742%209.30402%2016.7722C9.39834%2016.7702%209.49044%2016.7431%209.57079%2016.6937L16.464%2012.4517C16.5412%2012.4043%2016.605%2012.3378%2016.6492%2012.2587C16.6934%2012.1796%2016.7167%2012.0905%2016.7167%2011.9999C16.7167%2011.9093%2016.6934%2011.8202%2016.6492%2011.7411C16.605%2011.662%2016.5412%2011.5956%2016.464%2011.5482L9.57079%207.30617C9.49044%207.25673%209.39834%207.22963%209.30402%207.22765C9.20969%207.22568%209.11655%207.24892%209.0342%207.29496C8.95184%207.341%208.88327%207.40817%208.83554%207.48956C8.78782%207.57094%208.76267%207.66359%208.7627%207.75794Z'%20fill='white'/%3e%3c/svg%3e",Zze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23CC5DE8'/%3e%3cpath%20d='M15.0909%209V13.566C14.8235%2013.4066%2014.513%2013.3153%2014.1818%2013.3153C13.1777%2013.3153%2012.3636%2014.1543%2012.3636%2015.1892C12.3636%2016.2241%2013.1777%2017.0631%2014.1818%2017.0631C15.186%2017.0631%2016%2016.2241%2016%2015.1892V6.75018C16%206.23185%2015.5017%205.86997%2015.0281%206.0443L9.20994%208.18588C8.92049%208.29242%208.72727%208.57499%208.72727%208.89176V14.5029C8.45984%2014.3435%208.14935%2014.2522%207.81818%2014.2522C6.81403%2014.2522%206%2015.0912%206%2016.1261C6%2017.161%206.81403%2018%207.81818%2018C8.82234%2018%209.63636%2017.161%209.63636%2016.1261V11.0077L15.0909%209Z'%20fill='white'/%3e%3c/svg%3e",Jze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F03E3E'/%3e%3cpath%20d='M7.40272%209.3772C8.0638%209.3772%208.54619%209.51969%208.84987%209.80468C9.15354%2010.0873%209.30538%2010.4774%209.30538%2010.975C9.30538%2011.1993%209.27151%2011.4142%209.20377%2011.6197C9.13602%2011.823%209.02506%2012.004%208.87089%2012.1629C8.71905%2012.3217%208.51582%2012.4479%208.2612%2012.5413C8.00657%2012.6324%207.69238%2012.678%207.31862%2012.678H6.85259V14.5H5.76636V9.3772H7.40272ZM7.34666%2010.2672H6.85259V11.7879H7.21C7.41323%2011.7879%207.5896%2011.7611%207.7391%2011.7073C7.88861%2011.6536%208.00424%2011.5695%208.086%2011.4551C8.16776%2011.3406%208.20864%2011.1934%208.20864%2011.0136C8.20864%2010.7613%208.13856%2010.5744%207.9984%2010.4529C7.85824%2010.3291%207.64099%2010.2672%207.34666%2010.2672Z'%20fill='white'/%3e%3cpath%20d='M14.5228%2011.8896C14.5228%2012.4665%2014.4119%2012.9489%2014.1899%2013.3367C13.9704%2013.7221%2013.6515%2014.013%2013.2334%2014.2092C12.8152%2014.4031%2012.3118%2014.5%2011.7231%2014.5H10.2725V9.3772H11.8808C12.4181%209.3772%2012.8841%209.47297%2013.2789%209.66452C13.6737%209.85374%2013.9797%2010.1352%2014.1969%2010.509C14.4142%2010.8804%2014.5228%2011.3406%2014.5228%2011.8896ZM13.3945%2011.9176C13.3945%2011.5392%2013.3385%2011.2285%2013.2263%2010.9855C13.1166%2010.7402%2012.953%2010.5592%2012.7358%2010.4424C12.5209%2010.3256%2012.2546%2010.2672%2011.9369%2010.2672H11.3587V13.603H11.8247C12.355%2013.603%2012.7486%2013.4617%2013.0056%2013.179C13.2649%2012.8964%2013.3945%2012.4759%2013.3945%2011.9176Z'%20fill='white'/%3e%3cpath%20d='M16.6532%2014.5H15.5845V9.3772H18.5209V10.2672H16.6532V11.5882H18.3912V12.4747H16.6532V14.5Z'%20fill='white'/%3e%3c/svg%3e",Xze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%23F76707'/%3e%3cpath%20d='M19%2012C19%2010.8953%2018.7386%209.80634%2018.237%208.82207C17.7355%207.8378%2017.0082%206.98619%2016.1145%206.33688L12%2012H19Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%2017.8C15.2033%2017.8%2017.8%2015.2033%2017.8%2012C17.8%208.79675%2015.2033%206.2%2012%206.2C8.79675%206.2%206.2%208.79675%206.2%2012C6.2%2015.2033%208.79675%2017.8%2012%2017.8ZM12%2019C15.866%2019%2019%2015.866%2019%2012C19%208.13401%2015.866%205%2012%205C8.13401%205%205%208.13401%205%2012C5%2015.866%208.13401%2019%2012%2019Z'%20fill='white'/%3e%3c/svg%3e",Qze="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='2'%20y='1'%20width='20'%20height='22'%20rx='3'%20fill='%2337B24D'/%3e%3cpath%20d='M4%208.6C4%208.26863%204.26863%208%204.6%208H19.4C19.7314%208%2020%208.26863%2020%208.6C20%208.93137%2019.7314%209.2%2019.4%209.2H4.6C4.26863%209.2%204%208.93137%204%208.6Z'%20fill='white'/%3e%3cpath%20d='M8.6%2020C8.26863%2020%208%2019.7314%208%2019.4L8%204.6C8%204.26863%208.26863%204%208.6%204C8.93137%204%209.2%204.26863%209.2%204.6L9.2%2019.4C9.2%2019.7314%208.93137%2020%208.6%2020Z'%20fill='white'/%3e%3c/svg%3e",MW={archive:qze,doc:Uze,file:Vze,folder:Wze,graphika:Yze,image:Gze,media:Kze,music:Zze,pdf:Jze,presentation:Xze,table:Qze},gce={archive:["application/zip","application/vnd.rar","application/x-zip-compressed","application/x-rar-compressed"],pdf:["application/pdf"],doc:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","application/rtf","application/vnd.oasis.opendocument.text"],table:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.spreadsheet","application/vnd.ms-excel","text/plain","text/csv"],presentation:["application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.presentation"],graphika:["application/x-draw"],image:["image/png","image/jpeg","image/jpg","image/svg","image/svg+xml"],media:["video/mp4"],music:["audio/mpeg"]},eFe=Object.keys(gce),tFe=eFe.reduce((t,e)=>(gce[e].forEach(r=>t[r]=e),t),{}),nFe=18,vce=t=>{const e=Ve.c(5),{type:n,size:r}=t,s=tFe[n],i=MW[s]??MW.file,o=r??nFe;let a;e[0]!==i?(a=g.jsx(ov,{src:i}),e[0]=i,e[1]=a):a=e[1];let l;return e[2]!==o||e[3]!==a?(l=g.jsx(le,{h:o,w:o,children:a}),e[2]=o,e[3]=a,e[4]=l):l=e[4],l},rFe="_documentPaper_moe5w_1",sFe={documentPaper:rFe},iFe=t=>{var E;const e=Ve.c(24),{onDelete:n,document:r,readonly:s}=t,{t:i}=yt();let o;e[0]!==r||e[1]!==n?(o=D=>{D.preventDefault(),n==null||n(r)},e[0]=r,e[1]=n,e[2]=o):o=e[2];const a=o,l=ve($w);let c;e[3]!==l?(c=l&&((E=l.ModuleUrls.find(oFe))==null?void 0:E.Url),e[3]=l,e[4]=c):c=e[4];const f=`${c}/doc.html?id=${r.id}`;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p={root:sFe.documentPaper},e[5]=p):p=e[5];let m;e[6]!==r.mimeType?(m=g.jsx(vce,{type:r.mimeType}),e[6]=r.mimeType,e[7]=m):m=e[7];let v;e[8]!==r.name?(v=g.jsx(He,{fz:"xs",w:80,truncate:!0,children:r.name}),e[8]=r.name,e[9]=v):v=e[9];let y;e[10]!==r.name||e[11]!==v?(y=g.jsx(ss,{label:r.name,withArrow:!0,children:v}),e[10]=r.name,e[11]=v,e[12]=y):y=e[12];let x;e[13]!==a||e[14]!==s||e[15]!==i?(x=!s&&g.jsx(ss,{label:i("fullEventPage.deleteAttachments"),withArrow:!0,children:g.jsx(A1,{title:"Delete file",size:"sm",onClick:a})}),e[13]=a,e[14]=s,e[15]=i,e[16]=x):x=e[16];let w;e[17]!==m||e[18]!==y||e[19]!==x?(w=g.jsxs(wt,{gap:5,align:"center",children:[m,y,x]}),e[17]=m,e[18]=y,e[19]=x,e[20]=w):w=e[20];let C;return e[21]!==f||e[22]!==w?(C=g.jsx(lw,{shadow:"sm",px:4,withBorder:!0,classNames:p,h:28,children:g.jsx(fw,{href:f,target:"_blank",color:"dark",underline:"never",children:w})}),e[21]=f,e[22]=w,e[23]=C):C=e[23],C};function oFe(t){return t.Name==="Disk"}const q7=t=>{const e=Ve.c(6),{onDelete:n,documents:r,readonly:s}=t;let i;e[0]!==r||e[1]!==n||e[2]!==s?(i=!!r.length&&g.jsx(wt,{gap:"xs",children:r.map((a,l)=>O.createElement(iFe,{document:a,readonly:s,key:l,onDelete:n}))}),e[0]=r,e[1]=n,e[2]=s,e[3]=i):i=e[3];let o;return e[4]!==i?(o=g.jsx(g.Fragment,{children:i}),e[4]=i,e[5]=o):o=e[5],o},aFe=t=>{const e=Ve.c(16),{onClick:n,disabled:r}=t,{isMobile:s}=Yt(),{t:i}=yt();let o;e[0]!==i?(o=i("fullEventPage.noFilesInEvent"),e[0]=i,e[1]=o):o=e[1];const a=!r,l=s?"100%":242;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(j$,{size:"1em"}),e[2]=c):c=e[2];let d;e[3]!==i?(d=i("eventDetails.setupAccess"),e[3]=i,e[4]=d):d=e[4];let f;e[5]!==r||e[6]!==n||e[7]!==d?(f=g.jsx(Pn,{component:"button",pointer:!0,size:Ja,leftSection:c,disabled:r,onClick:n,children:d}),e[5]=r,e[6]=n,e[7]=d,e[8]=f):f=e[8];let p;e[9]!==l||e[10]!==f?(p=g.jsx(Pn.Wrapper,{w:l,children:f}),e[9]=l,e[10]=f,e[11]=p):p=e[11];let m;return e[12]!==o||e[13]!==a||e[14]!==p?(m=g.jsx(ss,{label:o,withArrow:!0,position:"bottom",disabled:a,children:p}),e[12]=o,e[13]=a,e[14]=p,e[15]=m):m=e[15],m},yce=t=>{const e=Ve.c(8),{value:n,data:r,disabled:s,onChange:i}=t,{isMobile:o}=Yt();let a;e[0]!==r?(a=r.map(lFe),e[0]=r,e[1]=a):a=e[1];const l=a,c=String(n),d=o?150:"auto";let f;return e[2]!==l||e[3]!==s||e[4]!==i||e[5]!==c||e[6]!==d?(f=g.jsx(uo,{data:l,value:c,onChange:i,disabled:s,maw:200,w:d}),e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=d,e[7]=f):f=e[7],f};function lFe(t){return{...t,value:t.value.toString()}}var Ay=(t=>(t.Public="public",t.Private="private",t))(Ay||{});const DW=mt.Read,bce=t=>{var Je,je;const e=Ve.c(101),{onApply:n,onClose:r,eventResource:s}=t,i=((Je=s.documentsPermissions)==null?void 0:Je.accessType)===mt.Deny?Ay.Private:Ay.Public,o=nh(vRe),a=((je=s.documentsPermissions)==null?void 0:je.accessType)??DW,{t:l}=yt(),[c,d]=O.useState(i),[f,p]=O.useState(a),m=ve(kr);let v;e[0]!==m||e[1]!==s?(v=m3(s,m),e[0]=m,e[1]=s,e[2]=v):v=e[2];const y=v;let x;e[3]!==m||e[4]!==s.documents?(x=X$(s.documents,m),e[3]=m,e[4]=s.documents,e[5]=x):x=e[5];const w=x;let C;e[6]!==l?(C=l("eventDetails.filesAccess.read"),e[6]=l,e[7]=C):C=e[7];let E;e[8]!==l?(E=l("eventDetails.filesAccess.comment"),e[8]=l,e[9]=E):E=e[9];let D;e[10]!==l?(D=l("eventDetails.filesAccess.write"),e[10]=l,e[11]=D):D=e[11];let T;e[12]!==l?(T=l("eventDetails.filesAccess.full"),e[12]=l,e[13]=T):T=e[13];let A;e[14]!==C||e[15]!==E||e[16]!==D||e[17]!==T?(A={[mt.Read]:C,[mt.Comment]:E,[mt.Write]:D,[mt.Full]:T},e[14]=C,e[15]=E,e[16]=D,e[17]=T,e[18]=A):A=e[18];const _=A,R=_[mt.Read];let N;e[19]!==R?(N={value:mt.Read,label:R},e[19]=R,e[20]=N):N=e[20];const I=_[mt.Comment];let $;e[21]!==I?($={value:mt.Comment,label:I},e[21]=I,e[22]=$):$=e[22];const L=_[mt.Write];let z;e[23]!==L?(z={value:mt.Write,label:L},e[23]=L,e[24]=z):z=e[24];const F=_[mt.Full];let q;e[25]!==F?(q={value:mt.Full,label:F},e[25]=F,e[26]=q):q=e[26];let H;e[27]!==$||e[28]!==z||e[29]!==q||e[30]!==N?(H=[N,$,z,q],e[27]=$,e[28]=z,e[29]=q,e[30]=N,e[31]=H):H=e[31];const B=H;let V;e[32]!==f||e[33]!==n||e[34]!==w||e[35]!==y?(V=()=>{const We=y.map(cFe),Le=w.map(uFe);n({accessType:f,userIds:We,documentIds:Le})},e[32]=f,e[33]=n,e[34]=w,e[35]=y,e[36]=V):V=e[36];const Y=V;let G;e[37]!==l?(G=l("fullEventPage.filePermissionsSettings"),e[37]=l,e[38]=G):G=e[38];let W;e[39]!==l||e[40]!==o?(W=o&&g.jsx(h_,{withCloseButton:!1,color:"yellow",withBorder:!0,mb:25,children:l("warning.message_access_file")}),e[39]=l,e[40]=o,e[41]=W):W=e[41];let Z;e[42]!==w?(Z=g.jsx(Qs,{type:"always",children:g.jsx(le,{mah:100,mb:14,children:g.jsx(q7,{documents:w,readonly:!0})})}),e[42]=w,e[43]=Z):Z=e[43];let Q;e[44]===Symbol.for("react.memo_cache_sentinel")?(Q=We=>d(We),e[44]=Q):Q=e[44];let X;e[45]!==l?(X=l("eventDetails.giveAccess"),e[45]=l,e[46]=X):X=e[46];let re;e[47]!==f?(re=()=>f===mt.Deny&&p(DW),e[47]=f,e[48]=re):re=e[48];let ne;e[49]!==X||e[50]!==re?(ne=g.jsx(qs,{size:"sm",label:X,value:Ay.Public,onClick:re}),e[49]=X,e[50]=re,e[51]=ne):ne=e[51];let ee;e[52]===Symbol.for("react.memo_cache_sentinel")?(ee=Ee(250),e[52]=ee):ee=e[52];let oe;if(e[53]!==(m==null?void 0:m.Id)||e[54]!==s.organizerId||e[55]!==s.participantInfo||e[56]!==y){let We;e[58]!==(m==null?void 0:m.Id)||e[59]!==s.organizerId||e[60]!==s.participantInfo?(We=Le=>g.jsx(Die,{avatarSize:"sm",participantInfo:s.participantInfo,organizerId:s.organizerId,currentUserId:m==null?void 0:m.Id,hideAttendingType:!0,guest:Le},Le.id||Le.userId),e[58]=m==null?void 0:m.Id,e[59]=s.organizerId,e[60]=s.participantInfo,e[61]=We):We=e[61],oe=y.map(We),e[53]=m==null?void 0:m.Id,e[54]=s.organizerId,e[55]=s.participantInfo,e[56]=y,e[57]=oe}else oe=e[57];let ce;e[62]!==oe?(ce=g.jsx(Qs,{children:g.jsx(Fi,{size:"xs",spacing:"xs",center:!0,mah:ee,children:oe})}),e[62]=oe,e[63]=ce):ce=e[63];const ue=c===Ay.Private;let pe;e[64]!==B||e[65]!==f||e[66]!==ue?(pe=g.jsx(yce,{data:B,value:f,onChange:p,disabled:ue}),e[64]=B,e[65]=f,e[66]=ue,e[67]=pe):pe=e[67];let de;e[68]!==ce||e[69]!==pe?(de=g.jsxs(Is,{ml:"xl",mt:"md",children:[ce,pe]}),e[68]=ce,e[69]=pe,e[70]=de):de=e[70];let me;e[71]!==l?(me=l("eventDetails.restrictAccess"),e[71]=l,e[72]=me):me=e[72];let Se;e[73]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>p(mt.Deny),e[73]=Se):Se=e[73];let De;e[74]!==me?(De=g.jsx(qs,{mt:"md",size:"sm",label:me,value:Ay.Private,onClick:Se}),e[74]=me,e[75]=De):De=e[75];let Ae;e[76]!==c||e[77]!==ne||e[78]!==de||e[79]!==De?(Ae=g.jsxs(qs.Group,{mt:"md",value:c,onChange:Q,children:[ne,de,De]}),e[76]=c,e[77]=ne,e[78]=de,e[79]=De,e[80]=Ae):Ae=e[80];let fe;e[81]!==l?(fe=l("buttons.cancel"),e[81]=l,e[82]=fe):fe=e[82];let Te;e[83]!==r||e[84]!==fe?(Te=g.jsx(en,{onClick:r,variant:"outline",children:fe}),e[83]=r,e[84]=fe,e[85]=Te):Te=e[85];let Ne;e[86]!==l?(Ne=l("buttons.apply"),e[86]=l,e[87]=Ne):Ne=e[87];let Ue;e[88]!==Y||e[89]!==Ne?(Ue=g.jsx(en,{"data-autofocus":!0,onClick:Y,children:Ne}),e[88]=Y,e[89]=Ne,e[90]=Ue):Ue=e[90];let rt;e[91]!==Te||e[92]!==Ue?(rt=g.jsxs(wt,{mt:"xl",justify:"flex-end",children:[Te,Ue]}),e[91]=Te,e[92]=Ue,e[93]=rt):rt=e[93];let ot;return e[94]!==r||e[95]!==G||e[96]!==W||e[97]!==Z||e[98]!==Ae||e[99]!==rt?(ot=g.jsxs(ks,{opened:!0,onClose:r,title:G,centered:!0,children:[W,Z,Ae,rt]}),e[94]=r,e[95]=G,e[96]=W,e[97]=Z,e[98]=Ae,e[99]=rt,e[100]=ot):ot=e[100],ot};function cFe(t){const{userId:e}=t;return e}function uFe(t){const{id:e}=t;return e}const dFe=t=>{const e=Ve.c(9),{onClick:n}=t,{t:r}=yt(),{isMobile:s}=Yt(),i=s?"100%":220;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(z4e,{size:"1em"}),e[0]=o):o=e[0];let a;e[1]!==r?(a=r("buttons.loadFile"),e[1]=r,e[2]=a):a=e[2];let l;e[3]!==n||e[4]!==a?(l=g.jsx(Pn,{miw:190,component:"button",pointer:!0,size:Ja,leftSection:o,onClick:n,children:a}),e[3]=n,e[4]=a,e[5]=l):l=e[5];let c;return e[6]!==i||e[7]!==l?(c=g.jsx(Pn.Wrapper,{w:i,children:l}),e[6]=i,e[7]=l,e[8]=c):c=e[8],c},fFe=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function d1(t,e,n){const r=pFe(t),{webkitRelativePath:s}=t,i=typeof e=="string"?e:typeof s=="string"&&s.length>0?s:`./${t.name}`;return typeof r.path!="string"&&kW(r,"path",i),kW(r,"relativePath",i),r}function pFe(t){const{name:e}=t;if(e&&e.lastIndexOf(".")!==-1&&!t.type){const r=e.split(".").pop().toLowerCase(),s=fFe.get(r);s&&Object.defineProperty(t,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return t}function kW(t,e,n){Object.defineProperty(t,e,{value:n,writable:!1,configurable:!1,enumerable:!0})}const hFe=[".DS_Store","Thumbs.db"];function mFe(t){return sv(this,void 0,void 0,function*(){return aA(t)&&gFe(t.dataTransfer)?xFe(t.dataTransfer,t.type):vFe(t)?yFe(t):Array.isArray(t)&&t.every(e=>"getFile"in e&&typeof e.getFile=="function")?bFe(t):[]})}function gFe(t){return aA(t)}function vFe(t){return aA(t)&&aA(t.target)}function aA(t){return typeof t=="object"&&t!==null}function yFe(t){return hP(t.target.files).map(e=>d1(e))}function bFe(t){return sv(this,void 0,void 0,function*(){return(yield Promise.all(t.map(n=>n.getFile()))).map(n=>d1(n))})}function xFe(t,e){return sv(this,void 0,void 0,function*(){if(t.items){const n=hP(t.items).filter(s=>s.kind==="file");if(e!=="drop")return n;const r=yield Promise.all(n.map(SFe));return TW(xce(r))}return TW(hP(t.files).map(n=>d1(n)))})}function TW(t){return t.filter(e=>hFe.indexOf(e.name)===-1)}function hP(t){if(t===null)return[];const e=[];for(let n=0;n<t.length;n++){const r=t[n];e.push(r)}return e}function SFe(t){if(typeof t.webkitGetAsEntry!="function")return AW(t);const e=t.webkitGetAsEntry();return e&&e.isDirectory?Sce(e):AW(t,e)}function xce(t){return t.reduce((e,n)=>[...e,...Array.isArray(n)?xce(n):[n]],[])}function AW(t,e){return sv(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof t.getAsFileSystemHandle=="function"){const i=yield t.getAsFileSystemHandle();if(i===null)throw new Error(`${t} is not a File`);if(i!==void 0){const o=yield i.getFile();return o.handle=i,d1(o)}}const r=t.getAsFile();if(!r)throw new Error(`${t} is not a File`);return d1(r,(n=e==null?void 0:e.fullPath)!==null&&n!==void 0?n:void 0)})}function wFe(t){return sv(this,void 0,void 0,function*(){return t.isDirectory?Sce(t):CFe(t)})}function Sce(t){const e=t.createReader();return new Promise((n,r)=>{const s=[];function i(){e.readEntries(o=>sv(this,void 0,void 0,function*(){if(o.length){const a=Promise.all(o.map(wFe));s.push(a),i()}else try{const a=yield Promise.all(s);n(a)}catch(a){r(a)}}),o=>{r(o)})}i()})}function CFe(t){return sv(this,void 0,void 0,function*(){return new Promise((e,n)=>{t.file(r=>{const s=d1(r,t.fullPath);e(s)},r=>{n(r)})})})}var mD={},_W;function EFe(){return _W||(_W=1,mD.__esModule=!0,mD.default=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(",");if(n.length===0)return!0;var r=t.name||"",s=(t.type||"").toLowerCase(),i=s.replace(/\/.*$/,"");return n.some(function(o){var a=o.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):s===a})}return!0}),mD}var MFe=EFe();const lN=Mr(MFe);function OW(t){return TFe(t)||kFe(t)||Cce(t)||DFe()}function DFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kFe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function TFe(t){if(Array.isArray(t))return mP(t)}function RW(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function NW(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?RW(Object(n),!0).forEach(function(r){wce(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):RW(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function wce(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function US(t,e){return OFe(t)||_Fe(t,e)||Cce(t,e)||AFe()}function AFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cce(t,e){if(t){if(typeof t=="string")return mP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mP(t,e)}}function mP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _Fe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],s=!0,i=!1,o,a;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));s=!0);}catch(l){i=!0,a=l}finally{try{!s&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function OFe(t){if(Array.isArray(t))return t}var RFe=typeof lN=="function"?lN:lN.default,Ece="file-invalid-type",NFe="file-too-large",jFe="file-too-small",IFe="too-many-files",LFe={FileInvalidType:Ece},PFe=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=e.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:Ece,message:"File type must be ".concat(r)}},jW=function(e){return{code:NFe,message:"File is larger than ".concat(e," ").concat(e===1?"byte":"bytes")}},IW=function(e){return{code:jFe,message:"File is smaller than ".concat(e," ").concat(e===1?"byte":"bytes")}},$Fe={code:IFe,message:"Too many files"};function Mce(t,e){var n=t.type==="application/x-moz-file"||RFe(t,e);return[n,n?null:PFe(e)]}function Dce(t,e,n){if(dg(t.size))if(dg(e)&&dg(n)){if(t.size>n)return[!1,jW(n)];if(t.size<e)return[!1,IW(e)]}else{if(dg(e)&&t.size<e)return[!1,IW(e)];if(dg(n)&&t.size>n)return[!1,jW(n)]}return[!0,null]}function dg(t){return t!=null}function zFe(t){var e=t.files,n=t.accept,r=t.minSize,s=t.maxSize,i=t.multiple,o=t.maxFiles,a=t.validator;return!i&&e.length>1||i&&o>=1&&e.length>o?!1:e.every(function(l){var c=Mce(l,n),d=US(c,1),f=d[0],p=Dce(l,r,s),m=US(p,1),v=m[0],y=a?a(l):null;return f&&v&&!y})}function lA(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble<"u"?t.cancelBubble:!1}function gD(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!t.target&&!!t.target.files}function LW(t){t.preventDefault()}function FFe(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function BFe(t){return t.indexOf("Edge/")!==-1}function HFe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return FFe(t)||BFe(t)}function uu(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),o=1;o<s;o++)i[o-1]=arguments[o];return e.some(function(a){return!lA(r)&&a&&a.apply(void 0,[r].concat(i)),lA(r)})}}function qFe(){return"showOpenFilePicker"in window}function UFe(t){if(dg(t)){var e=Object.entries(t).filter(function(n){var r=US(n,2),s=r[0],i=r[1],o=!0;return kce(s)||(console.warn('Skipped "'.concat(s,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),(!Array.isArray(i)||!i.every(Tce))&&(console.warn('Skipped "'.concat(s,'" because an invalid file extension was provided.')),o=!1),o}).reduce(function(n,r){var s=US(r,2),i=s[0],o=s[1];return NW(NW({},n),{},wce({},i,o))},{});return[{description:"Files",accept:e}]}return t}function VFe(t){if(dg(t))return Object.entries(t).reduce(function(e,n){var r=US(n,2),s=r[0],i=r[1];return[].concat(OW(e),[s],OW(i))},[]).filter(function(e){return kce(e)||Tce(e)}).join(",")}function WFe(t){return t instanceof DOMException&&(t.name==="AbortError"||t.code===t.ABORT_ERR)}function YFe(t){return t instanceof DOMException&&(t.name==="SecurityError"||t.code===t.SECURITY_ERR)}function kce(t){return t==="audio/*"||t==="video/*"||t==="image/*"||t==="text/*"||t==="application/*"||/\w+\/[-+.\w]+/g.test(t)}function Tce(t){return/^.*\.[\w]+$/.test(t)}var GFe=["children"],KFe=["open"],ZFe=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],JFe=["refKey","onChange","onClick"];function XFe(t){return tBe(t)||eBe(t)||Ace(t)||QFe()}function QFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eBe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tBe(t){if(Array.isArray(t))return gP(t)}function cN(t,e){return sBe(t)||rBe(t,e)||Ace(t,e)||nBe()}function nBe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ace(t,e){if(t){if(typeof t=="string")return gP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gP(t,e)}}function gP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function rBe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],s=!0,i=!1,o,a;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!(e&&r.length===e));s=!0);}catch(l){i=!0,a=l}finally{try{!s&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function sBe(t){if(Array.isArray(t))return t}function PW(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function us(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?PW(Object(n),!0).forEach(function(r){vP(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):PW(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cA(t,e){if(t==null)return{};var n=iBe(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function iBe(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}var U7=O.forwardRef(function(t,e){var n=t.children,r=cA(t,GFe),s=Oce(r),i=s.open,o=cA(s,KFe);return O.useImperativeHandle(e,function(){return{open:i}},[i]),xe.createElement(O.Fragment,null,n(us(us({},o),{},{open:i})))});U7.displayName="Dropzone";var _ce={disabled:!1,getFilesFromEvent:mFe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};U7.defaultProps=_ce;U7.propTypes={children:tt.func,accept:tt.objectOf(tt.arrayOf(tt.string)),multiple:tt.bool,preventDropOnDocument:tt.bool,noClick:tt.bool,noKeyboard:tt.bool,noDrag:tt.bool,noDragEventsBubbling:tt.bool,minSize:tt.number,maxSize:tt.number,maxFiles:tt.number,disabled:tt.bool,getFilesFromEvent:tt.func,onFileDialogCancel:tt.func,onFileDialogOpen:tt.func,useFsAccessApi:tt.bool,autoFocus:tt.bool,onDragEnter:tt.func,onDragLeave:tt.func,onDragOver:tt.func,onDrop:tt.func,onDropAccepted:tt.func,onDropRejected:tt.func,onError:tt.func,validator:tt.func};var yP={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Oce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=us(us({},_ce),t),n=e.accept,r=e.disabled,s=e.getFilesFromEvent,i=e.maxSize,o=e.minSize,a=e.multiple,l=e.maxFiles,c=e.onDragEnter,d=e.onDragLeave,f=e.onDragOver,p=e.onDrop,m=e.onDropAccepted,v=e.onDropRejected,y=e.onFileDialogCancel,x=e.onFileDialogOpen,w=e.useFsAccessApi,C=e.autoFocus,E=e.preventDropOnDocument,D=e.noClick,T=e.noKeyboard,A=e.noDrag,_=e.noDragEventsBubbling,R=e.onError,N=e.validator,I=O.useMemo(function(){return VFe(n)},[n]),$=O.useMemo(function(){return UFe(n)},[n]),L=O.useMemo(function(){return typeof x=="function"?x:$W},[x]),z=O.useMemo(function(){return typeof y=="function"?y:$W},[y]),F=O.useRef(null),q=O.useRef(null),H=O.useReducer(oBe,yP),B=cN(H,2),V=B[0],Y=B[1],G=V.isFocused,W=V.isFileDialogActive,Z=O.useRef(typeof window<"u"&&window.isSecureContext&&w&&qFe()),Q=function(){!Z.current&&W&&setTimeout(function(){if(q.current){var We=q.current.files;We.length||(Y({type:"closeDialog"}),z())}},300)};O.useEffect(function(){return window.addEventListener("focus",Q,!1),function(){window.removeEventListener("focus",Q,!1)}},[q,W,z,Z]);var X=O.useRef([]),re=function(We){F.current&&F.current.contains(We.target)||(We.preventDefault(),X.current=[])};O.useEffect(function(){return E&&(document.addEventListener("dragover",LW,!1),document.addEventListener("drop",re,!1)),function(){E&&(document.removeEventListener("dragover",LW),document.removeEventListener("drop",re))}},[F,E]),O.useEffect(function(){return!r&&C&&F.current&&F.current.focus(),function(){}},[F,C,r]);var ne=O.useCallback(function(je){R?R(je):console.error(je)},[R]),ee=O.useCallback(function(je){je.preventDefault(),je.persist(),Ue(je),X.current=[].concat(XFe(X.current),[je.target]),gD(je)&&Promise.resolve(s(je)).then(function(We){if(!(lA(je)&&!_)){var Le=We.length,_e=Le>0&&zFe({files:We,accept:I,minSize:o,maxSize:i,multiple:a,maxFiles:l,validator:N}),Be=Le>0&&!_e;Y({isDragAccept:_e,isDragReject:Be,isDragActive:!0,type:"setDraggedFiles"}),c&&c(je)}}).catch(function(We){return ne(We)})},[s,c,ne,_,I,o,i,a,l,N]),oe=O.useCallback(function(je){je.preventDefault(),je.persist(),Ue(je);var We=gD(je);if(We&&je.dataTransfer)try{je.dataTransfer.dropEffect="copy"}catch{}return We&&f&&f(je),!1},[f,_]),ce=O.useCallback(function(je){je.preventDefault(),je.persist(),Ue(je);var We=X.current.filter(function(_e){return F.current&&F.current.contains(_e)}),Le=We.indexOf(je.target);Le!==-1&&We.splice(Le,1),X.current=We,!(We.length>0)&&(Y({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),gD(je)&&d&&d(je))},[F,d,_]),ue=O.useCallback(function(je,We){var Le=[],_e=[];je.forEach(function(Be){var ut=Mce(Be,I),lt=cN(ut,2),At=lt[0],jt=lt[1],Ot=Dce(Be,o,i),Pt=cN(Ot,2),Rt=Pt[0],Nt=Pt[1],Fn=N?N(Be):null;if(At&&Rt&&!Fn)Le.push(Be);else{var pn=[jt,Nt];Fn&&(pn=pn.concat(Fn)),_e.push({file:Be,errors:pn.filter(function(hn){return hn})})}}),(!a&&Le.length>1||a&&l>=1&&Le.length>l)&&(Le.forEach(function(Be){_e.push({file:Be,errors:[$Fe]})}),Le.splice(0)),Y({acceptedFiles:Le,fileRejections:_e,isDragReject:_e.length>0,type:"setFiles"}),p&&p(Le,_e,We),_e.length>0&&v&&v(_e,We),Le.length>0&&m&&m(Le,We)},[Y,a,I,o,i,l,p,m,v,N]),pe=O.useCallback(function(je){je.preventDefault(),je.persist(),Ue(je),X.current=[],gD(je)&&Promise.resolve(s(je)).then(function(We){lA(je)&&!_||ue(We,je)}).catch(function(We){return ne(We)}),Y({type:"reset"})},[s,ue,ne,_]),de=O.useCallback(function(){if(Z.current){Y({type:"openDialog"}),L();var je={multiple:a,types:$};window.showOpenFilePicker(je).then(function(We){return s(We)}).then(function(We){ue(We,null),Y({type:"closeDialog"})}).catch(function(We){WFe(We)?(z(We),Y({type:"closeDialog"})):YFe(We)?(Z.current=!1,q.current?(q.current.value=null,q.current.click()):ne(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ne(We)});return}q.current&&(Y({type:"openDialog"}),L(),q.current.value=null,q.current.click())},[Y,L,z,w,ue,ne,$,a]),me=O.useCallback(function(je){!F.current||!F.current.isEqualNode(je.target)||(je.key===" "||je.key==="Enter"||je.keyCode===32||je.keyCode===13)&&(je.preventDefault(),de())},[F,de]),Se=O.useCallback(function(){Y({type:"focus"})},[]),De=O.useCallback(function(){Y({type:"blur"})},[]),Ae=O.useCallback(function(){D||(HFe()?setTimeout(de,0):de())},[D,de]),fe=function(We){return r?null:We},Te=function(We){return T?null:fe(We)},Ne=function(We){return A?null:fe(We)},Ue=function(We){_&&We.stopPropagation()},rt=O.useMemo(function(){return function(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},We=je.refKey,Le=We===void 0?"ref":We,_e=je.role,Be=je.onKeyDown,ut=je.onFocus,lt=je.onBlur,At=je.onClick,jt=je.onDragEnter,Ot=je.onDragOver,Pt=je.onDragLeave,Rt=je.onDrop,Nt=cA(je,ZFe);return us(us(vP({onKeyDown:Te(uu(Be,me)),onFocus:Te(uu(ut,Se)),onBlur:Te(uu(lt,De)),onClick:fe(uu(At,Ae)),onDragEnter:Ne(uu(jt,ee)),onDragOver:Ne(uu(Ot,oe)),onDragLeave:Ne(uu(Pt,ce)),onDrop:Ne(uu(Rt,pe)),role:typeof _e=="string"&&_e!==""?_e:"presentation"},Le,F),!r&&!T?{tabIndex:0}:{}),Nt)}},[F,me,Se,De,Ae,ee,oe,ce,pe,T,A,r]),ot=O.useCallback(function(je){je.stopPropagation()},[]),Je=O.useMemo(function(){return function(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},We=je.refKey,Le=We===void 0?"ref":We,_e=je.onChange,Be=je.onClick,ut=cA(je,JFe),lt=vP({accept:I,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:fe(uu(_e,pe)),onClick:fe(uu(Be,ot)),tabIndex:-1},Le,q);return us(us({},lt),ut)}},[q,n,a,pe,r]);return us(us({},V),{},{isFocused:G&&!r,getRootProps:rt,getInputProps:Je,rootRef:F,inputRef:q,open:fe(de)})}function oBe(t,e){switch(e.type){case"focus":return us(us({},t),{},{isFocused:!0});case"blur":return us(us({},t),{},{isFocused:!1});case"openDialog":return us(us({},yP),{},{isFileDialogActive:!0});case"closeDialog":return us(us({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":return us(us({},t),{},{isDragActive:e.isDragActive,isDragAccept:e.isDragAccept,isDragReject:e.isDragReject});case"setFiles":return us(us({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections,isDragReject:e.isDragReject});case"reset":return us({},yP);default:return t}}function $W(){}const[aBe,lBe]=Ys("Dropzone component was not found in tree");var VS={root:"m_d46a4834",inner:"m_b85f7144",fullScreen:"m_96f6e9ad",dropzone:"m_7946116d"};function V7(t){const e=n=>{const{children:r,...s}=Ce(`Dropzone${$F(t)}`,{},n),i=lBe(),o=TA(r)?r:g.jsx("span",{children:r});return i[t]?O.cloneElement(o,s):null};return e.displayName=`@mantine/dropzone/${$F(t)}`,e}const cBe=V7("accept"),uBe=V7("reject"),dBe=V7("idle"),fBe={multiple:!0,maxSize:1/0,activateOnClick:!0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,useFsAccessApi:!0,variant:"light",rejectColor:"red"},pBe=(t,{radius:e,variant:n,acceptColor:r,rejectColor:s})=>{const i=t.variantColorResolver({color:r||t.primaryColor,theme:t,variant:n}),o=t.variantColorResolver({color:s||"red",theme:t,variant:n});return{root:{"--dropzone-radius":ar(e),"--dropzone-accept-color":i.color,"--dropzone-accept-bg":i.background,"--dropzone-reject-color":o.color,"--dropzone-reject-bg":o.background}}},Oh=Fe((t,e)=>{const n=Ce("Dropzone",fBe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,radius:c,disabled:d,loading:f,multiple:p,maxSize:m,accept:v,children:y,onDropAny:x,onDrop:w,onReject:C,openRef:E,name:D,maxFiles:T,autoFocus:A,activateOnClick:_,activateOnDrag:R,dragEventsBubbling:N,activateOnKeyboard:I,onDragEnter:$,onDragLeave:L,onDragOver:z,onFileDialogCancel:F,onFileDialogOpen:q,preventDropOnDocument:H,useFsAccessApi:B,getFilesFromEvent:V,validator:Y,rejectColor:G,acceptColor:W,enablePointerEvents:Z,loaderProps:Q,inputProps:X,mod:re,attributes:ne,...ee}=n,oe=bt({name:"Dropzone",classes:VS,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:ne,vars:l,varsResolver:pBe}),{getRootProps:ce,getInputProps:ue,isDragAccept:pe,isDragReject:de,isDragActive:me,open:Se}=Oce({onDrop:x,onDropAccepted:w,onDropRejected:C,disabled:d||f,accept:Array.isArray(v)?v.reduce((Te,Ne)=>({...Te,[Ne]:[]}),{}):v,multiple:p,maxSize:m,maxFiles:T,autoFocus:A,noClick:!_,noDrag:!R,noDragEventsBubbling:!N,noKeyboard:!I,onDragEnter:$,onDragLeave:L,onDragOver:z,onFileDialogCancel:F,onFileDialogOpen:q,preventDropOnDocument:H,useFsAccessApi:B,validator:Y,...V?{getFilesFromEvent:V}:null});uS(E,Se);const De=me&&pe,Ae=me&&de,fe=!De&&!Ae;return g.jsx(aBe,{value:{accept:De,reject:Ae,idle:fe},children:g.jsxs(le,{...ce(),...oe("root",{focusable:!0}),...ee,mod:[{accept:De,reject:Ae,idle:fe,disabled:d,loading:f,"activate-on-click":_},re],children:[g.jsx(j1,{visible:f,overlayProps:{radius:c},unstyled:a,loaderProps:Q}),g.jsx("input",{...ue(X),name:D}),g.jsx("div",{...oe("inner"),ref:e,"data-enable-pointer-events":Z||void 0,children:y})]})})});Oh.classes=VS;Oh.displayName="@mantine/dropzone/Dropzone";Oh.Accept=cBe;Oh.Idle=dBe;Oh.Reject=uBe;const hBe={maxSize:1/0,activateOnDrag:!0,dragEventsBubbling:!0,activateOnKeyboard:!0,active:!0,zIndex:yi("max"),withinPortal:!0},W7=Fe((t,e)=>{const n=Ce("DropzoneFullScreen",hBe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,active:c,onDrop:d,onReject:f,zIndex:p,withinPortal:m,portalProps:v,attributes:y,...x}=n,w=bt({name:"DropzoneFullScreen",classes:VS,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:y,rootSelector:"fullScreen"}),{resolvedClassNames:C,resolvedStyles:E}=Ma({classNames:r,styles:o,props:n}),[D,T]=O.useState(0),[A,{open:_,close:R}]=Ps(!1),N=$=>{var L;(L=$.dataTransfer)!=null&&L.types.includes("Files")&&(T(z=>z+1),_())},I=()=>{T($=>$-1)};return O.useEffect(()=>{D===0&&R()},[D]),O.useEffect(()=>{if(c)return document.addEventListener("dragenter",N,!1),document.addEventListener("dragleave",I,!1),()=>{document.removeEventListener("dragenter",N,!1),document.removeEventListener("dragleave",I,!1)}},[c]),g.jsx(Hd,{...v,withinPortal:m,children:g.jsx(le,{ref:e,...w("fullScreen",{style:{opacity:A?1:0,pointerEvents:A?"all":"none",zIndex:p}}),children:g.jsx(Oh,{activateOnClick:!1,...x,classNames:C,styles:E,unstyled:a,className:VS.dropzone,onDrop:$=>{d==null||d($),R(),T(0)},onReject:$=>{f==null||f($),R(),T(0)}})})})});W7.classes=VS;W7.displayName="@mantine/dropzone/DropzoneFullScreen";Oh.FullScreen=W7;const uN=Oh,mBe=t=>{const e=Ve.c(26),{onDrop:n}=t,r=Dr(),{t:s}=yt();let i;e[0]!==s?(i=E=>{E.forEach(D=>{D.errors.forEach(T=>{switch(T.code){case LFe.FileInvalidType:return dv.show({color:"red",title:s("fileModal.error"),message:s("fileModal.errorMessageInvalidType",{fileName:D.file.name})});default:return}})})},e[0]=s,e[1]=i):i=e[1];const o=i;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=Ee(200),e[2]=a):a=e[2];const l=r.colors[r.primaryColor];let c;e[3]!==l[6]?(c=g.jsx(uN.Accept,{children:g.jsx(xU,{size:"4rem",stroke:1.5,color:l[6]})}),e[3]=l[6],e[4]=c):c=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(uN.Idle,{children:g.jsx(xU,{size:"4rem",stroke:1.5})}),e[5]=d):d=e[5];let f;e[6]!==s?(f=s("fileModal.description"),e[6]=s,e[7]=f):f=e[7];let p;e[8]!==f?(p=g.jsx(He,{ta:"center",size:"m",inline:!0,children:f}),e[8]=f,e[9]=p):p=e[9];const m=r.colors.gray[6];let v;e[10]!==s?(v=s("fileModal.info"),e[10]=s,e[11]=v):v=e[11];let y;e[12]!==s?(y=s("fileModal.sizeType"),e[12]=s,e[13]=y):y=e[13];let x;e[14]!==y||e[15]!==v||e[16]!==r.colors.gray[6]?(x=g.jsxs(He,{ta:"center",size:"xs",inline:!0,c:m,children:[v," - ",boe," ",y,"."]}),e[14]=y,e[15]=v,e[16]=r.colors.gray[6],e[17]=x):x=e[17];let w;e[18]!==x||e[19]!==c||e[20]!==p?(w=g.jsxs(vt,{gap:"md",justify:"center",align:"center",direction:"column",h:a,children:[c,d,p,x]}),e[18]=x,e[19]=c,e[20]=p,e[21]=w):w=e[21];let C;return e[22]!==n||e[23]!==o||e[24]!==w?(C=g.jsx(uN,{onDrop:n,onReject:o,multiple:!0,children:w}),e[22]=n,e[23]=o,e[24]=w,e[25]=C):C=e[25],C},gBe=t=>{const e=Ve.c(23),{file:n}=t;let r;e[0]!==n?(r=i5e(n),e[0]=n,e[1]=r):r=e[1];const s=ve(r);let i;e[2]!==n?(i=o5e(n),e[2]=n,e[3]=i):i=e[3];const o=ve(i);let a;e[4]!==n.type?(a=g.jsx(vce,{type:n.type}),e[4]=n.type,e[5]=a):a=e[5];let l;e[6]!==n.name?(l=g.jsx(He,{truncate:!0,w:"40%",children:n.name}),e[6]=n.name,e[7]=l):l=e[7];let c;e[8]!==n.name||e[9]!==l?(c=g.jsx(ss,{label:n.name,withArrow:!0,position:"bottom",children:l}),e[8]=n.name,e[9]=l,e[10]=c):c=e[10];let d;e[11]!==s||e[12]!==o?(d=o!=="error"&&g.jsx(P1,{w:"100%",size:"sm",value:s,animated:o==="pending"}),e[11]=s,e[12]=o,e[13]=d):d=e[13];let f;e[14]!==o?(f=o==="error"&&g.jsx(l4e,{color:"var(--mantine-color-red-text)"}),e[14]=o,e[15]=f):f=e[15];let p;e[16]!==d||e[17]!==f?(p=g.jsxs(vt,{w:"60%",justify:"center",children:[d,f]}),e[16]=d,e[17]=f,e[18]=p):p=e[18];let m;return e[19]!==a||e[20]!==c||e[21]!==p?(m=g.jsxs(vt,{justify:"space-between",align:"center",gap:5,my:5,children:[a,c,p]}),e[19]=a,e[20]=c,e[21]=p,e[22]=m):m=e[22],m},vBe=()=>{const t=Ve.c(5),e=ve(Coe);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=Ee(200),t[0]=n):n=t[0];let r;t[1]!==e?(r=e.map(yBe),t[1]=e,t[2]=r):r=t[2];let s;return t[3]!==r?(s=g.jsx(Fi,{size:"sm",h:n,center:!0,children:r}),t[3]=r,t[4]=s):s=t[4],s};function yBe(t,e){return g.jsx(gBe,{file:t},e)}const bBe=({onClose:t,opened:e})=>{const n=Kt(),r=ve(Coe),s=qe.isEmpty(r),{t:i}=yt(),o=c=>l(c),a=O.useCallback(()=>{c5e(),n(woe()),t([])},[n,t]),l=async c=>{const d=await n(l5e(c)).then(r$);t(d)};return g.jsx(ks,{opened:e,onClose:a,title:i("fileModal.title"),size:s?"lg":"md",centered:!0,closeOnClickOutside:s,children:s?g.jsx(mBe,{onDrop:o}):g.jsx(vBe,{})})};function xBe(t,e){return t.name===e.name&&t.size===e.size&&t.mimeType===e.mimeType}function SBe(t,e){return e.filter(n=>!t.some(r=>xBe(r,n)))}const Rce=t=>{const e=Ve.c(49),{eventResource:n,eventId:r,onDocumentsChange:s,onPermissionsChange:i}=t,o=Kt(),a=ve(kr);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=[],e[0]=l):l=e[0];const[c,d]=O.useState(l),[f,p]=Ps(!1),[m,v]=Ps(!1),y=m3(n,a),x=X$(n.documents,a),w=Il(n),C=w===mt.Full||w===mt.Write,E=C&&!qe.isEmpty(y)&&!qe.isEmpty(c),D=qe.isEmpty(x),T=C||E,{isMobile:A}=Yt(),{t:_}=yt();let R;e[1]!==o||e[2]!==c||e[3]!==r||e[4]!==s?(R=ne=>{const ee=c.filter(oe=>oe!==ne);d(ee),s(ee),r&&o(tie({data:{EventId:Number(r),DocumentIds:[ne.id]},showSuccessMessage:!1}))},e[1]=o,e[2]=c,e[3]=r,e[4]=s,e[5]=R):R=e[5];const N=R;let I;e[6]!==c||e[7]!==s||e[8]!==p?(I=ne=>{const ee=[...c,...SBe(c,ne)];d(ee),s(ee),p.close()},e[6]=c,e[7]=s,e[8]=p,e[9]=I):I=e[9];const $=I;let L;e[10]!==i||e[11]!==v?(L=ne=>{i(ne),v.close()},e[10]=i,e[11]=v,e[12]=L):L=e[12];const z=L;let F;e[13]!==v?(F=()=>v.close(),e[13]=v,e[14]=F):F=e[14];const q=F;let H;e[15]!==n.documents?(H=()=>{const ne=Array.isArray(n.documents)?n.documents:[];d(ne)},e[15]=n.documents,e[16]=H):H=e[16];let B;e[17]!==n?(B=[n],e[17]=n,e[18]=B):B=e[18],O.useEffect(H,B);let V;e[19]!==$||e[20]!==f?(V=f&&g.jsx(bBe,{onClose:$,opened:!0}),e[19]=$,e[20]=f,e[21]=V):V=e[21];let Y;e[22]!==n||e[23]!==z||e[24]!==q||e[25]!==m?(Y=m&&g.jsx(bce,{onApply:z,onClose:q,eventResource:n}),e[22]=n,e[23]=z,e[24]=q,e[25]=m,e[26]=Y):Y=e[26];let G;e[27]!==A||e[28]!==_?(G=A&&g.jsx(He,{size:"sm",children:_("fullEventPage.labels.attachments")}),e[27]=A,e[28]=_,e[29]=G):G=e[29];let W;e[30]!==C||e[31]!==T||e[32]!==D||e[33]!==E||e[34]!==v.open||e[35]!==p.open?(W=T&&g.jsxs(vt,{w:"100%",align:"center",wrap:"wrap",gap:10,children:[C&&g.jsx(dFe,{onClick:p.open}),E&&g.jsx(aFe,{disabled:D,onClick:v.open})]}),e[30]=C,e[31]=T,e[32]=D,e[33]=E,e[34]=v.open,e[35]=p.open,e[36]=W):W=e[36];const Z=!C;let Q;e[37]!==c||e[38]!==N||e[39]!==Z?(Q=g.jsx(q7,{documents:c,onDelete:N,readonly:Z}),e[37]=c,e[38]=N,e[39]=Z,e[40]=Q):Q=e[40];let X;e[41]!==W||e[42]!==Q?(X=g.jsxs(vt,{direction:"column",gap:"sm",children:[W,Q]}),e[41]=W,e[42]=Q,e[43]=X):X=e[43];let re;return e[44]!==G||e[45]!==X||e[46]!==V||e[47]!==Y?(re=g.jsxs(g.Fragment,{children:[V,Y,G,X]}),e[44]=G,e[45]=X,e[46]=V,e[47]=Y,e[48]=re):re=e[48],re},Nce=t=>{const e=Ve.c(13),{event:n,handleSetEvent:r,disabled:s}=t,{isMobile:i}=Yt(),[o,a]=O.useState(n.resource.isFree);let l;e[0]!==n||e[1]!==r?(l=w=>{r({...n,resource:{...n.resource,isFree:w==="0"?Rd.Busy:Rd.Free}}),a(Number(w))},e[0]=n,e[1]=r,e[2]=l):l=e[2];const c=l;let d,f;e[3]!==n.resource.isFree?(d=()=>{a(n.resource.isFree)},f=[n.resource.isFree],e[3]=n.resource.isFree,e[4]=d,e[5]=f):(d=e[4],f=e[5]),O.useEffect(d,f);const p=i?"100%":220,m=String(o);let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v={value:String(Rd.Free),label:ct("freeBusy.free")},e[6]=v):v=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=[v,{value:String(Rd.Busy),label:ct("freeBusy.busy")}],e[7]=y):y=e[7];let x;return e[8]!==s||e[9]!==c||e[10]!==p||e[11]!==m?(x=g.jsx(vt,{children:g.jsx(t3,{w:p,value:m,onChange:c,data:y,disabled:s})}),e[8]=s,e[9]=c,e[10]=p,e[11]=m,e[12]=x):x=e[12],x},wBe=t=>{const e=Ve.c(61),n=ve(kr),{event:r,handleSetEvent:s,edit:i,currentUserId:o,onPermissionsChange:a,onDocumentsChange:l}=t,{resource:c}=r,{location:d,participantInfo:f,ownerId:p}=c,{t:m}=yt(),{accessType:v}=f,y=v===mt.Read;let x;e[0]!==(n==null?void 0:n.Id)||e[1]!==t.event.resource.ownerId?(x=qe.isNil(t.event.resource.ownerId)||t.event.resource.ownerId===(n==null?void 0:n.Id),e[0]=n==null?void 0:n.Id,e[1]=t.event.resource.ownerId,e[2]=x):x=e[2];const w=x;let C;e[3]!==w||e[4]!==t.event.resource.documents?(C=!qe.isEmpty(t.event.resource.documents)||w,e[3]=w,e[4]=t.event.resource.documents,e[5]=C):C=e[5];const E=C;let D;e[6]!==m?(D=m("fullEventPage.labels.place"),e[6]=m,e[7]=D):D=e[7];let T;e[8]!==D?(T=g.jsx(He,{size:"sm",children:D}),e[8]=D,e[9]=T):T=e[9];let A;e[10]!==r||e[11]!==s||e[12]!==c?(A=Z=>{s({...r,resource:{...c,location:Z.target.value}})},e[10]=r,e[11]=s,e[12]=c,e[13]=A):A=e[13];const _=d||"";let R;e[14]!==m?(R=m("placeholders.location"),e[14]=m,e[15]=R):R=e[15];let N;e[16]!==y||e[17]!==A||e[18]!==_||e[19]!==R?(N=g.jsx(Pn,{onChange:A,size:Ja,value:_,disabled:y,placeholder:R}),e[16]=y,e[17]=A,e[18]=_,e[19]=R,e[20]=N):N=e[20];let I;e[21]!==E||e[22]!==l||e[23]!==a||e[24]!==t.event.id||e[25]!==t.event.resource?(I=E&&g.jsx(Rce,{eventResource:t.event.resource,eventId:t.event.id,onDocumentsChange:l,onPermissionsChange:a}),e[21]=E,e[22]=l,e[23]=a,e[24]=t.event.id,e[25]=t.event.resource,e[26]=I):I=e[26];let $;e[27]!==m?($=m("fullEventPage.labels.availability"),e[27]=m,e[28]=$):$=e[28];let L;e[29]!==$?(L=g.jsx(He,{size:"sm",children:$}),e[29]=$,e[30]=L):L=e[30];let z;e[31]!==r||e[32]!==s?(z=g.jsx(Nce,{event:r,handleSetEvent:s}),e[31]=r,e[32]=s,e[33]=z):z=e[33];let F;e[34]!==m?(F=m("fullEventPage.labels.calendar"),e[34]=m,e[35]=F):F=e[35];let q;e[36]!==F?(q=g.jsx(He,{size:"sm",children:F}),e[36]=F,e[37]=q):q=e[37];const H=!!(y||p&&o!==p);let B;e[38]!==i||e[39]!==r||e[40]!==s||e[41]!==H?(B=g.jsx(n3,{disabled:H,edit:i,event:r,handleSetEvent:s,full:!0}),e[38]=i,e[39]=r,e[40]=s,e[41]=H,e[42]=B):B=e[42];let V;e[43]!==m?(V=m("fullEventPage.labels.category"),e[43]=m,e[44]=V):V=e[44];let Y;e[45]!==V?(Y=g.jsx(He,{size:"sm",children:V}),e[45]=V,e[46]=Y):Y=e[46];let G;e[47]!==y||e[48]!==r||e[49]!==s?(G=g.jsx(Moe,{disabled:y,event:r,handleSetEvent:s}),e[47]=y,e[48]=r,e[49]=s,e[50]=G):G=e[50];let W;return e[51]!==L||e[52]!==z||e[53]!==q||e[54]!==B||e[55]!==Y||e[56]!==G||e[57]!==T||e[58]!==N||e[59]!==I?(W=g.jsx("div",{children:g.jsxs("div",{className:"event-settings-mobile",children:[T,N,I,L,z,q,B,Y,G]})}),e[51]=L,e[52]=z,e[53]=q,e[54]=B,e[55]=Y,e[56]=G,e[57]=T,e[58]=N,e[59]=I,e[60]=W):W=e[60],W},CBe=t=>{const e=Ve.c(8),{handleSetEvent:n,event:r,disabled:s}=t;let i;e[0]!==r||e[1]!==n?(i=d=>{n({...r,resource:{...r.resource,isPrivate:d.currentTarget.checked}})},e[0]=r,e[1]=n,e[2]=i):i=e[2];const o=i,a=r.resource.isPrivate;let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=ct("eventDetails.private"),e[3]=l):l=e[3];let c;return e[4]!==s||e[5]!==r.resource.isPrivate||e[6]!==o?(c=g.jsx(vt,{children:g.jsx(Lp,{checked:a,onChange:o,label:l,disabled:s})}),e[4]=s,e[5]=r.resource.isPrivate,e[6]=o,e[7]=c):c=e[7],c},EBe=t=>{const e=Ve.c(8),{index:n,item:r,form:s,isAllDay:i}=t,{t:o}=yt();let a;e[0]!==s||e[1]!==n||e[2]!==i||e[3]!==r||e[4]!==o?(a=()=>{const c=`notifications.${n}`,{type:d,intervalType:f,intervalCount:p,allDayInterval:m}=r;d===null?s.setFieldError(`${c}.type`,o("notifications.validation.typeRequired")):s.clearFieldError(`${c}.type`),f===null?s.setFieldError(`${c}.intervalType`,o("notifications.validation.intervalTypeRequired")):s.clearFieldError(`${c}.intervalType`),p==null||p<1||p>365?s.setFieldError(`${c}.intervalCount`,o("notifications.validation.intervalCountRange",{min:1,max:365})):s.clearFieldError(`${c}.intervalCount`),!m&&i?s.setFieldError(`${c}.notificationTime`,o("notifications.validation.selectTime")):s.clearFieldError(`${c}.notificationTime`)},e[0]=s,e[1]=n,e[2]=i,e[3]=r,e[4]=o,e[5]=a):a=e[5];let l;e[6]!==r?(l=[r],e[6]=r,e[7]=l):l=e[7],O.useEffect(a,l)};var yl=(t=>(t[t.Calendar=1]="Calendar",t[t.Owner=0]="Owner",t))(yl||{});Qe.extend(g3);const MBe=t=>{var $,L;const{t:e}=yt(),{index:n,item:r,form:s,isAllDay:i}=t,o=n===0?g.jsx(le,{mt:"5px",children:g.jsx(A$,{className:"icon",size:"1em"})}):null,a=()=>s.removeListItem("notifications",n);EBe(t);const l=[{value:`${lh.Bell}`,label:e("notifications.notification")},{value:`${lh.Mail}`,label:e("notifications.onMail")}],c=l.find(z=>z.value.toString()===r.type.toString()),d=z=>{const F=q=>{switch(q){case gt.Minute:return z===1?e("timeIndicators.minutes_accusative"):e("timeIndicators.minutes",{count:z});case gt.Hour:return e("timeIndicators.hours",{count:z});case gt.Day:return e("timeIndicators.days",{count:z});case gt.Weeks:return e("timeIndicators.weeks",{count:z});default:return""}};return i?[{value:`${gt.Day}`,label:F(gt.Day)},{value:`${gt.Weeks}`,label:F(gt.Weeks)}]:[{value:`${gt.Minute}`,label:F(gt.Minute)},{value:`${gt.Hour}`,label:F(gt.Hour)},{value:`${gt.Day}`,label:F(gt.Day)},{value:`${gt.Weeks}`,label:F(gt.Weeks)}]},f=O.useMemo(()=>d(r.intervalCount),[r.intervalCount,i]),p=f.find(z=>z.value===r.intervalType.toString()),m=(($=f[0])==null?void 0:$.value)||null,v=((L=l[0])==null?void 0:L.value)||null;O.useEffect(()=>{var F;if(!f.find(q=>(q==null?void 0:q.value.toString())===r.intervalType.toString())&&((F=f[0])!=null&&F.value)){const q=Number(f[0].value);s.setFieldValue(`notifications.${n}.intervalType`,q)}},[f]);const y=s.getInputProps(`notifications.${n}.type`),x=s.getInputProps(`notifications.${n}.intervalCount`),w=s.getInputProps(`notifications.${n}.intervalType`),C=s.getInputProps(`notifications.${n}.allDayInterval`),E=(c==null?void 0:c.value)||null,D=(p==null?void 0:p.value)||null,T=s.getInputProps(`notifications.${n}.allDayInterval`).value,A=(()=>{if(!T)return"12:00";if(Qe.isDayjs(T))return T.format("HH:mm");const z=["HH:mm:ss","HH:mm"];for(const q of z)if(Qe(T,q,!0).isValid())return Qe.utc(`2000-01-01 ${T}`,`YYYY-MM-DD ${q}`).local().format("HH:mm");const F=Qe.utc(T);return F.isValid()?F.local().format("HH:mm"):"12:00"})(),_=O.useMemo(()=>{const z=s.errors.notifications;return(z==null?void 0:z[n])??{}},[s.errors.notifications,n]),R=z=>{if(z===""){s.setFieldValue(`notifications.${n}.intervalCount`,0),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner));return}if(!i){Number(z)<=0&&s.setFieldValue(`notifications.${n}.intervalType`,gt.Minute),s.setFieldValue(`notifications.${n}.intervalCount`,Number(z)),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner));return}const F=Number(z),q=Number(w.value);let H={minute:{min:0,max:40320},hour:{min:0,max:672},day:{min:0,max:28},weeks:{min:0,max:4}};const B={[gt.Minute]:{min:H.minute.min,max:H.minute.max,next:gt.Hour,prev:null},[gt.Hour]:{min:H.hour.min,max:H.hour.max,next:gt.Day,prev:gt.Minute},[gt.Day]:{min:H.day.min,max:H.day.max,next:gt.Weeks,prev:gt.Hour},[gt.Weeks]:{min:H.weeks.min,max:H.weeks.max,next:null,prev:gt.Day}},V=i?[gt.Day,gt.Weeks]:[gt.Minute,gt.Hour,gt.Day,gt.Weeks];let Y=q,G=F;const{min:W,max:Z,next:Q,prev:X}=B[q],re=oe=>oe!==null&&V.includes(oe);F>Z&&re(Q)?(Y=Q,G=B[Q].min):F<W&&re(X)?(Y=X,G=B[X].max):F<1&&(q===gt.Day?G=0:G=1);const ee=d(G).find(oe=>Number(oe.value)===Y);ee&&s.setFieldValue(`notifications.${n}.intervalType`,Number(ee.value)),s.setFieldValue(`notifications.${n}.intervalCount`,Number(G)),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner))},N=z=>{y.onChange(z),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner))},I=z=>{w.onChange(z),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner))};return g.jsxs(qa,{align:"flex-start",icon:o,children:[g.jsx(uo,{...y,onChange:N,size:"xs",error:_.type,data:l,defaultValue:v,value:E}),g.jsx(le,{mt:4,children:e("buttons.for")}),g.jsx(Jy,{...x,onChange:R,error:_.intervalCount,size:"xs",w:100,step:1}),g.jsx(uo,{...w,onChange:I,size:"xs",w:100,data:f,defaultValue:m,value:D}),i&&g.jsxs(g.Fragment,{children:[g.jsx(le,{mt:4,children:e("buttons.in")}),g.jsx(q$,{disabled:!!(C!=null&&C.disabled),time:A,size:"xs",offset:{mainAxis:-4,crossAxis:-40},setTime:z=>{if(!z)return;const[F,q]=z.split(":").map(Number);s.getInputProps(`notifications.${n}.allDayInterval`).onChange(Qe().set("hours",F||0).set("minutes",q||0)),s.setFieldValue(`notifications.${n}.source`,Number(yl.Owner))}})]}),g.jsx(gn,{mt:1,onClick:a,children:g.jsx(Tc,{size:"1.125rem"})})]})},DBe=t=>{const e=Ve.c(16),{event:n,form:r}=t,{t:s}=yt();let i;e[0]!==n.resource.isAllDayWithoutTime||e[1]!==r?(i=()=>{const p=n.resource.isAllDayWithoutTime?Hde:Bde;delete p.id,r.insertListItem("notifications",p)},e[0]=n.resource.isAllDayWithoutTime,e[1]=r,e[2]=i):i=e[2];const o=i;let a;e[3]!==r.values.notifications.length?(a=r.values.notifications.length===0?g.jsx(A$,{className:"icon",size:"1em"}):null,e[3]=r.values.notifications.length,e[4]=a):a=e[4];const l=a;let c;e[5]!==n.resource.isAllDayWithoutTime||e[6]!==r?(c=r.values.notifications.map((p,m)=>g.jsx(MBe,{isAllDay:n.resource.isAllDayWithoutTime,form:r,index:m,item:p},m)),e[5]=n.resource.isAllDayWithoutTime,e[6]=r,e[7]=c):c=e[7];let d;e[8]!==r.values.notifications.length||e[9]!==o||e[10]!==l||e[11]!==s?(d=r.values.notifications.length<5&&g.jsx(qa,{icon:l,children:g.jsx(en,{onClick:o,variant:"subtle",children:s("notifications.addNotification")})}),e[8]=r.values.notifications.length,e[9]=o,e[10]=l,e[11]=s,e[12]=d):d=e[12];let f;return e[13]!==c||e[14]!==d?(f=g.jsxs(g.Fragment,{children:[c,d]}),e[13]=c,e[14]=d,e[15]=f):f=e[15],f},kBe=t=>{const e=Ve.c(47),n=ve(kr),{event:r,form:s,handleSetEvent:i,edit:o,currentUserId:a,onPermissionsChange:l,onDocumentsChange:c,eventDescription:d}=t,{t:f}=yt(),{isMobile:p}=Yt(),m=O.useRef(null),{computedHeight:v}=k$(m,r),{resource:y}=r,{location:x,ownerId:w}=y,C=Il(y),E=C===mt.Read||C===mt.FreeBusy;let D;e[0]!==C||e[1]!==(n==null?void 0:n.Id)||e[2]!==t.event.resource.ownerId?(D=qe.isNil(t.event.resource.ownerId)||t.event.resource.ownerId===(n==null?void 0:n.Id)||C===mt.Full||C===mt.Write,e[0]=C,e[1]=n==null?void 0:n.Id,e[2]=t.event.resource.ownerId,e[3]=D):D=e[3];const T=D;let A;e[4]!==T||e[5]!==t.event.resource.documents?(A=!qe.isEmpty(t.event.resource.documents)||T,e[4]=T,e[5]=t.event.resource.documents,e[6]=A):A=e[6];const _=A;let R;e[7]!==r||e[8]!==i||e[9]!==y?(R=V=>{i({...r,resource:{...y,location:V.target.value}})},e[7]=r,e[8]=i,e[9]=y,e[10]=R):R=e[10];const N=R;let I;e[11]!==v?(I={height:v},e[11]=v,e[12]=I):I=e[12];let $;e[13]!==p||e[14]!==t?($=p&&g.jsx(wBe,{...t}),e[13]=p,e[14]=t,e[15]=$):$=e[15];let L;e[16]!==a||e[17]!==E||e[18]!==o||e[19]!==r||e[20]!==s||e[21]!==N||e[22]!==i||e[23]!==_||e[24]!==p||e[25]!==x||e[26]!==c||e[27]!==l||e[28]!==w||e[29]!==t.event.id||e[30]!==t.event.resource||e[31]!==f?(L=!p&&g.jsxs(g.Fragment,{children:[g.jsx(qa,{icon:g.jsx(N$,{className:"icon",size:"1em"}),children:g.jsx(Pn,{onChange:N,size:"xs",value:x||"",disabled:E,maxLength:1024,placeholder:f("placeholders.location")})}),_&&g.jsx(qa,{icon:g.jsx(le,{mt:8,children:g.jsx(xie,{className:"icon",size:"1em"})}),align:"flex-start",children:g.jsx(Rce,{eventResource:t.event.resource,eventId:t.event.id,onDocumentsChange:c,onPermissionsChange:l})}),g.jsxs(qa,{icon:g.jsx(zRe,{className:"icon",size:"1em"}),children:[g.jsx(Nce,{disabled:E,event:r,handleSetEvent:i}),g.jsx(CBe,{disabled:E,event:r,handleSetEvent:i})]}),g.jsx(DBe,{form:s,event:r}),g.jsx(qa,{icon:g.jsx(le,{mt:8,children:g.jsx(Z_,{className:"icon",size:"1em"})}),align:"flex-start",children:g.jsxs(vt,{direction:p?"column":"row",w:"100%",gap:10,children:[g.jsx(n3,{disabled:!!(E||w&&a!==w),edit:o,event:r,handleSetEvent:i,full:!0}),g.jsx(Moe,{disabled:E,event:r,handleSetEvent:i})]})})]}),e[16]=a,e[17]=E,e[18]=o,e[19]=r,e[20]=s,e[21]=N,e[22]=i,e[23]=_,e[24]=p,e[25]=x,e[26]=c,e[27]=l,e[28]=w,e[29]=t.event.id,e[30]=t.event.resource,e[31]=f,e[32]=L):L=e[32];let z;e[33]===Symbol.for("react.memo_cache_sentinel")?(z=g.jsx(le,{mt:15,children:g.jsx(hie,{className:"icon",size:"1em"})}),e[33]=z):z=e[33];const F=d||"";let q;e[34]!==E||e[35]!==r||e[36]!==i||e[37]!==F?(q=g.jsx(Hze,{disabled:E,event:r,eventDescription:F,handleSetEvent:i}),e[34]=E,e[35]=r,e[36]=i,e[37]=F,e[38]=q):q=e[38];let H;e[39]!==p||e[40]!==q?(H=g.jsx(qa,{icon:z,align:"flex-start",isMobile:p,children:q}),e[39]=p,e[40]=q,e[41]=H):H=e[41];let B;return e[42]!==I||e[43]!==$||e[44]!==L||e[45]!==H?(B=g.jsxs("div",{ref:m,style:I,className:"settings-wrapper",children:[$,L,H]}),e[42]=I,e[43]=$,e[44]=L,e[45]=H,e[46]=B):B=e[46],B},TBe=(t,e)=>{const n=Ve.c(8),[r,s]=O.useState(0);let i;n[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],n[0]=i):i=n[0];const[o,a]=O.useState(i);let l,c;n[1]!==o||n[2]!==t||n[3]!==r||n[4]!==e?(l=()=>{const p=setTimeout(()=>{r>0&&(t(o),s(0),a([]))},e);return()=>clearTimeout(p)},c=[t,r,e,o],n[1]=o,n[2]=t,n[3]=r,n[4]=e,n[5]=l,n[6]=c):(l=n[5],c=n[6]),O.useEffect(l,c);let d;return n[7]===Symbol.for("react.memo_cache_sentinel")?(d=(...p)=>{const m=p;s(ABe),a(m)},n[7]=d):d=n[7],d};function ABe(t){return t+1}var ds=(t=>(t[t.day=0]="day",t[t.work_week=1]="work_week",t[t.week=2]="week",t[t.month=3]="month",t[t.year=4]="year",t[t.agenda=5]="agenda",t))(ds||{});function Gd(t){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gd(t)}function _Be(t,e){if(Gd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jce(t){var e=_Be(t,"string");return Gd(e)=="symbol"?e:e+""}function Ad(t,e,n){return(e=jce(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zW(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function hr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zW(Object(n),!0).forEach(function(r){Ad(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zW(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zu(t,e){if(t==null)return{};var n,r,s=Ud(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Si(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function FW(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,jce(r.key),r)}}function wi(t,e,n){return e&&FW(t.prototype,e),n&&FW(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function uA(t){return uA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uA(t)}function Ice(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ice=function(){return!!t})()}function OBe(t,e){if(e&&(Gd(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _S(t)}function Vo(t,e,n){return e=uA(e),OBe(t,Ice()?Reflect.construct(e,n||[],uA(t).constructor):e.apply(t,n))}function Wo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fT(t,e)}function Lce(t){if(Array.isArray(t))return t}function RBe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,i,o,a=[],l=!0,c=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}function bP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Y7(t,e){if(t){if(typeof t=="string")return bP(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bP(t,e):void 0}}function Pce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _d(t,e){return Lce(t)||RBe(t,e)||Y7(t,e)||Pce()}var dN,BW;function NBe(){if(BW)return dN;BW=1;var t=function(e,n,r,s,i,o,a,l){if(!e){var c;if(n===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,s,i,o,a,l],f=0;c=new Error(n.replace(/%s/g,function(){return d[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};return dN=t,dN}var jBe=NBe();const WS=Mr(jBe);var IBe=function(){};function LBe(t,e){var n={};return Object.keys(t).forEach(function(r){n[dk(r)]=IBe}),n}function HW(t,e){return t[e]!==void 0}function dk(t){return"default"+t.charAt(0).toUpperCase()+t.substr(1)}function PBe(t){return!!t&&(typeof t!="function"||t.prototype&&t.prototype.isReactComponent)}function $ce(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function zce(t){function e(n){var r=this.constructor.getDerivedStateFromProps(t,n);return r??null}this.setState(e.bind(this))}function Fce(t,e){try{var n=this.props,r=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}$ce.__suppressDeprecationWarning=!0;zce.__suppressDeprecationWarning=!0;Fce.__suppressDeprecationWarning=!0;function $Be(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var n=null,r=null,s=null;if(typeof e.componentWillMount=="function"?n="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?r="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(r="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?s="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(s="UNSAFE_componentWillUpdate"),n!==null||r!==null||s!==null){var i=t.displayName||t.name,o=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.

`+i+" uses "+o+" but also contains the following legacy lifecycles:"+(n!==null?`
  `+n:"")+(r!==null?`
  `+r:"")+(s!==null?`
  `+s:"")+`

The above lifecycles should be removed. Learn more about this warning here:
https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=$ce,e.componentWillReceiveProps=zce),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=Fce;var a=e.componentDidUpdate;e.componentDidUpdate=function(c,d,f){var p=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:f;a.call(this,c,d,p)}}return t}var zBe="/Users/jquense/src/uncontrollable/src/uncontrollable.js";function Bce(t,e,n){n===void 0&&(n=[]);var r=t.displayName||t.name||"Component",s=PBe(t),i=Object.keys(e),o=i.map(dk);s||!n.length||WS(!1);var a=(function(c){U_(d,c);function d(){for(var p,m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];p=c.call.apply(c,[this].concat(v))||this,p.handlers=Object.create(null),i.forEach(function(w){var C=e[w],E=function(T){if(p.props[C]){var A;p._notifying=!0;for(var _=arguments.length,R=new Array(_>1?_-1:0),N=1;N<_;N++)R[N-1]=arguments[N];(A=p.props)[C].apply(A,[T].concat(R)),p._notifying=!1}p.unmounted||p.setState(function(I){var $,L=I.values;return{values:wr(Object.create(null),L,($={},$[w]=T,$))}})};p.handlers[C]=E}),n.length&&(p.attachRef=function(w){p.inner=w});var x=Object.create(null);return i.forEach(function(w){x[w]=p.props[dk(w)]}),p.state={values:x,prevProps:{}},p}var f=d.prototype;return f.shouldComponentUpdate=function(){return!this._notifying},d.getDerivedStateFromProps=function(m,v){var y=v.values,x=v.prevProps,w={values:wr(Object.create(null),y),prevProps:{}};return i.forEach(function(C){w.prevProps[C]=m[C],!HW(m,C)&&HW(x,C)&&(w.values[C]=m[dk(C)])}),w},f.componentWillUnmount=function(){this.unmounted=!0},f.render=function(){var m=this,v=this.props,y=v.innerRef,x=Ud(v,["innerRef"]);o.forEach(function(C){delete x[C]});var w={};return i.forEach(function(C){var E=m.props[C];w[C]=E!==void 0?E:m.state.values[C]}),xe.createElement(t,wr({},x,w,this.handlers,{ref:y||this.attachRef}))},d})(xe.Component);$Be(a),a.displayName="Uncontrolled("+r+")",a.propTypes=wr({innerRef:function(){}},LBe(e)),n.forEach(function(c){a.prototype[c]=function(){var f;return(f=this.inner)[c].apply(f,arguments)}});var l=a;return xe.forwardRef&&(l=xe.forwardRef(function(c,d){return xe.createElement(a,wr({},c,{innerRef:d,__source:{fileName:zBe,lineNumber:128},__self:this}))}),l.propTypes=a.propTypes),l.ControlledComponent=t,l.deferControlTo=function(c,d,f){return d===void 0&&(d={}),Bce(c,wr({},e,d),f)},l}function Hce(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Hce(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Ls(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Hce(t))&&(r&&(r+=" "),r+=e);return r}const FBe=Object.freeze(Object.defineProperty({__proto__:null,clsx:Ls,default:Ls},Symbol.toStringTag,{value:"Module"}));var qce="milliseconds",G7="seconds",K7="minutes",Z7="hours",YS="day",dA="week",J7="month",X7="year",fA="decade",pA="century",Uce={milliseconds:1,seconds:1e3,minutes:60*1e3,hours:3600*1e3,day:1440*60*1e3,week:10080*60*1e3},BBe={month:1,year:12,decade:120,century:1200};function HBe(t){return[31,qBe(t),31,30,31,30,31,31,30,31,30,31]}function qBe(t){return t%4===0&&t%100!==0||t%400===0?29:28}function fh(t,e,n){switch(t=new Date(t),n){case qce:case G7:case K7:case Z7:case YS:case dA:return UBe(t,e*Uce[n]);case J7:case X7:case fA:case pA:return VBe(t,e*BBe[n])}throw new TypeError('Invalid units: "'+n+'"')}function UBe(t,e){var n=new Date(+t+e);return WBe(t,n)}function VBe(t,e){var n=t.getFullYear(),r=t.getMonth(),s=t.getDate(),i=n*12+r+e,o=Math.trunc(i/12),a=i%12,l=Math.min(s,HBe(o)[a]),c=new Date(t);return c.setFullYear(o),c.setDate(1),c.setMonth(a),c.setDate(l),c}function WBe(t,e){var n=t.getTimezoneOffset(),r=e.getTimezoneOffset(),s=r-n;return new Date(+e+s*Uce.minutes)}function hA(t,e,n){return fh(t,-e,n)}function Ea(t,e,n){switch(t=new Date(t),e){case pA:case fA:case X7:t=XBe(t,0);case J7:t=JBe(t,1);case dA:case YS:t=vA(t,0);case Z7:t=GS(t,0);case K7:t=gA(t,0);case G7:t=mA(t,0)}return e===fA&&(t=hA(t,qW(t)%10,"year")),e===pA&&(t=hA(t,qW(t)%100,"year")),e===dA&&(t=QBe(t,0,n)),t}function xP(t,e,n){switch(t=new Date(t),t=Ea(t,e,n),e){case pA:case fA:case X7:case J7:case dA:t=fh(t,1,e),t=hA(t,1,YS),t.setHours(23,59,59,999);break;case YS:t.setHours(23,59,59,999);break;case Z7:case K7:case G7:t=fh(t,1,e),t=hA(t,1,qce)}return t}var R3=K1(function(t,e){return t===e}),Vce=K1(function(t,e){return t!==e}),Q7=K1(function(t,e){return t>e}),N3=K1(function(t,e){return t>=e}),Wce=K1(function(t,e){return t<e}),Kw=K1(function(t,e){return t<=e});function YBe(){return new Date(Math.min.apply(Math,arguments))}function GBe(){return new Date(Math.max.apply(Math,arguments))}function KBe(t,e,n,r){return r=r||"day",(!e||N3(t,e,r))&&(!n||Kw(t,n,r))}var mA=Rh("Milliseconds"),gA=Rh("Seconds"),GS=Rh("Minutes"),vA=Rh("Hours"),ZBe=Rh("Day"),JBe=Rh("Date"),XBe=Rh("Month"),qW=Rh("FullYear");function QBe(t,e,n){var r=(ZBe(t)+7-(n||0))%7;return e===void 0?r:fh(t,e-r,YS)}function Rh(t){var e=(function(n){switch(n){case"Milliseconds":return 36e5;case"Seconds":return 3600;case"Minutes":return 60;case"Hours":return 1;default:return null}})(t);return function(n,r){if(r===void 0)return n["get"+t]();var s=new Date(n);return s["set"+t](r),e&&s["get"+t]()!=r&&(t==="Hours"||r>=e&&s.getHours()-n.getHours()<Math.floor(r/e))&&s["set"+t](r+e),s}}function K1(t){return function(e,n,r){return t(+Ea(e,r),+Ea(n,r))}}function eHe(t){if(Array.isArray(t))return bP(t)}function Yce(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function tHe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nHe(t){return eHe(t)||Yce(t)||Y7(t)||tHe()}var fN,UW;function Gce(){if(UW)return fN;UW=1;function t(e,n,r){var s=-1,i=e.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(i);++s<i;)o[s]=e[s+n];return o}return fN=t,fN}var pN,VW;function Zw(){if(VW)return pN;VW=1;function t(e,n){return e===n||e!==e&&n!==n}return pN=t,pN}var hN,WW;function Kce(){if(WW)return hN;WW=1;var t=typeof Rp=="object"&&Rp&&Rp.Object===Object&&Rp;return hN=t,hN}var mN,YW;function Oc(){if(YW)return mN;YW=1;var t=Kce(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return mN=n,mN}var gN,GW;function Z1(){if(GW)return gN;GW=1;var t=Oc(),e=t.Symbol;return gN=e,gN}var vN,KW;function rHe(){if(KW)return vN;KW=1;var t=Z1(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,s=t?t.toStringTag:void 0;function i(o){var a=n.call(o,s),l=o[s];try{o[s]=void 0;var c=!0}catch{}var d=r.call(o);return c&&(a?o[s]=l:delete o[s]),d}return vN=i,vN}var yN,ZW;function sHe(){if(ZW)return yN;ZW=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return yN=n,yN}var bN,JW;function J1(){if(JW)return bN;JW=1;var t=Z1(),e=rHe(),n=sHe(),r="[object Null]",s="[object Undefined]",i=t?t.toStringTag:void 0;function o(a){return a==null?a===void 0?s:r:i&&i in Object(a)?e(a):n(a)}return bN=o,bN}var xN,XW;function Wu(){if(XW)return xN;XW=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return xN=t,xN}var SN,QW;function ez(){if(QW)return SN;QW=1;var t=J1(),e=Wu(),n="[object AsyncFunction]",r="[object Function]",s="[object GeneratorFunction]",i="[object Proxy]";function o(a){if(!e(a))return!1;var l=t(a);return l==r||l==s||l==n||l==i}return SN=o,SN}var wN,eY;function tz(){if(eY)return wN;eY=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return wN=e,wN}var CN,tY;function Jw(){if(tY)return CN;tY=1;var t=ez(),e=tz();function n(r){return r!=null&&e(r.length)&&!t(r)}return CN=n,CN}var EN,nY;function nz(){if(nY)return EN;nY=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,s){var i=typeof r;return s=s??t,!!s&&(i=="number"||i!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<s}return EN=n,EN}var MN,rY;function j3(){if(rY)return MN;rY=1;var t=Zw(),e=Jw(),n=nz(),r=Wu();function s(i,o,a){if(!r(a))return!1;var l=typeof o;return(l=="number"?e(a)&&n(o,a.length):l=="string"&&o in a)?t(a[o],i):!1}return MN=s,MN}var DN,sY;function iHe(){if(sY)return DN;sY=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return DN=e,DN}var kN,iY;function oHe(){if(iY)return kN;iY=1;var t=iHe(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return kN=n,kN}var TN,oY;function Nh(){if(oY)return TN;oY=1;function t(e){return e!=null&&typeof e=="object"}return TN=t,TN}var AN,aY;function Xw(){if(aY)return AN;aY=1;var t=J1(),e=Nh(),n="[object Symbol]";function r(s){return typeof s=="symbol"||e(s)&&t(s)==n}return AN=r,AN}var _N,lY;function Zce(){if(lY)return _N;lY=1;var t=oHe(),e=Wu(),n=Xw(),r=NaN,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(e(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=e(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=t(c);var f=i.test(c);return f||o.test(c)?a(c.slice(2),f?2:8):s.test(c)?r:+c}return _N=l,_N}var ON,cY;function Jce(){if(cY)return ON;cY=1;var t=Zce(),e=1/0,n=17976931348623157e292;function r(s){if(!s)return s===0?s:0;if(s=t(s),s===e||s===-e){var i=s<0?-1:1;return i*n}return s===s?s:0}return ON=r,ON}var RN,uY;function Xce(){if(uY)return RN;uY=1;var t=Jce();function e(n){var r=t(n),s=r%1;return r===r?s?r-s:r:0}return RN=e,RN}var NN,dY;function aHe(){if(dY)return NN;dY=1;var t=Gce(),e=j3(),n=Xce(),r=Math.ceil,s=Math.max;function i(o,a,l){(l?e(o,a,l):a===void 0)?a=1:a=s(n(a),0);var c=o==null?0:o.length;if(!c||a<1)return[];for(var d=0,f=0,p=Array(r(c/a));d<c;)p[f++]=t(o,d,d+=a);return p}return NN=i,NN}var lHe=aHe();const cHe=Mr(lHe);var jN,fY;function uHe(){if(fY)return jN;fY=1;var t=Oc(),e=function(){return t.Date.now()};return jN=e,jN}var IN,pY;function dHe(){if(pY)return IN;pY=1;var t=Wu(),e=uHe(),n=Zce(),r="Expected a function",s=Math.max,i=Math.min;function o(a,l,c){var d,f,p,m,v,y,x=0,w=!1,C=!1,E=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(c)&&(w=!!c.leading,C="maxWait"in c,p=C?s(n(c.maxWait)||0,l):p,E="trailing"in c?!!c.trailing:E);function D(z){var F=d,q=f;return d=f=void 0,x=z,m=a.apply(q,F),m}function T(z){return x=z,v=setTimeout(R,l),w?D(z):m}function A(z){var F=z-y,q=z-x,H=l-F;return C?i(H,p-q):H}function _(z){var F=z-y,q=z-x;return y===void 0||F>=l||F<0||C&&q>=p}function R(){var z=e();if(_(z))return N(z);v=setTimeout(R,A(z))}function N(z){return v=void 0,E&&d?D(z):(d=f=void 0,m)}function I(){v!==void 0&&clearTimeout(v),x=0,d=y=f=v=void 0}function $(){return v===void 0?m:N(e())}function L(){var z=e(),F=_(z);if(d=arguments,f=this,y=z,F){if(v===void 0)return T(y);if(C)return clearTimeout(v),v=setTimeout(R,l),D(y)}return v===void 0&&(v=setTimeout(R,l)),m}return L.cancel=I,L.flush=$,L}return IN=o,IN}var fHe=dHe();const pHe=Mr(fHe);function jh(t){return t&&t.ownerDocument||document}function rz(t){var e=jh(t);return e&&e.defaultView||window}function sz(t,e){return rz(t).getComputedStyle(t,e)}var hHe=/([A-Z])/g;function Qce(t){return t.replace(hHe,"-$1").toLowerCase()}var mHe=/^ms-/;function vD(t){return Qce(t).replace(mHe,"-ms-")}var gHe=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function eue(t){return!!(t&&gHe.test(t))}function Li(t,e){var n="",r="";if(typeof e=="string")return t.style.getPropertyValue(vD(e))||sz(t).getPropertyValue(vD(e));Object.keys(e).forEach(function(s){var i=e[s];!i&&i!==0?t.style.removeProperty(vD(s)):eue(s)?r+=s+"("+i+") ":n+=vD(s)+": "+i+";"}),r&&(n+="transform: "+r+";"),t.style.cssText+=";"+n}function Kd(t,e){if(t.contains)return t.contains(e);if(t.compareDocumentPosition)return t===e||!!(t.compareDocumentPosition(e)&16)}const vHe=Object.freeze(Object.defineProperty({__proto__:null,default:Kd},Symbol.toStringTag,{value:"Module"}));function tue(t){return"nodeType"in t&&t.nodeType===document.DOCUMENT_NODE}function I3(t){return"window"in t&&t.window===t?t:tue(t)&&t.defaultView||!1}function nue(t){var e=t==="pageXOffset"?"scrollLeft":"scrollTop";function n(r,s){var i=I3(r);if(s===void 0)return i?i[t]:r[e];i?i.scrollTo(i[t],s):r[e]=s}return n}const L3=nue("pageXOffset"),f1=nue("pageYOffset");function Ml(t){var e=jh(t),n={top:0,left:0,height:0,width:0},r=e&&e.documentElement;return!r||!Kd(r,t)||(t.getBoundingClientRect!==void 0&&(n=t.getBoundingClientRect()),n={top:n.top+f1(r)-(r.clientTop||0),left:n.left+L3(r)-(r.clientLeft||0),width:n.width,height:n.height}),n}const gtt=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"}));var yHe=function(e){return!!e&&"offsetParent"in e};function iz(t){for(var e=jh(t),n=t&&t.offsetParent;yHe(n)&&n.nodeName!=="HTML"&&Li(n,"position")==="static";)n=n.offsetParent;return n||e.documentElement}var bHe=function(e){return e.nodeName&&e.nodeName.toLowerCase()};function Qw(t,e){var n={top:0,left:0},r;if(Li(t,"position")==="fixed")r=t.getBoundingClientRect();else{var s=e||iz(t);r=Ml(t),bHe(s)!=="html"&&(n=Ml(s));var i=String(Li(s,"borderTopWidth")||0);n.top+=parseInt(i,10)-f1(s)||0;var o=String(Li(s,"borderLeftWidth")||0);n.left+=parseInt(o,10)-L3(s)||0}var a=String(Li(t,"marginTop")||0),l=String(Li(t,"marginLeft")||0);return wr({},r,{top:r.top-n.top-(parseInt(a,10)||0),left:r.left-n.left-(parseInt(l,10)||0)})}const vtt=Object.freeze(Object.defineProperty({__proto__:null,default:Qw},Symbol.toStringTag,{value:"Module"})),oz=!!(typeof window<"u"&&window.document&&window.document.createElement);var hY=new Date().getTime();function xHe(t){var e=new Date().getTime(),n=Math.max(0,16-(e-hY)),r=setTimeout(t,n);return hY=e,r}var SHe=["","webkit","moz","o","ms"],SP="clearTimeout",wP=xHe,mY=function(e,n){return e+(e?n[0].toUpperCase()+n.substr(1):n)+"AnimationFrame"};oz&&SHe.some(function(t){var e=mY(t,"request");return e in window&&(SP=mY(t,"cancel"),wP=function(r){return window[e](r)}),!!wP});var p1=function(e){typeof window[SP]=="function"&&window[SP](e)},X1=wP;const ytt=Object.freeze(Object.defineProperty({__proto__:null,cancel:p1,request:X1},Symbol.toStringTag,{value:"Module"}));var LN;function P3(t,e){if(!LN){var n=document.body,r=n.matches||n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector;LN=function(i,o){return r.call(i,o)}}return LN(t,e)}var wHe=Function.prototype.bind.call(Function.prototype.call,[].slice);function eC(t,e){return wHe(t.querySelectorAll(e))}const btt=Object.freeze(Object.defineProperty({__proto__:null,default:eC},Symbol.toStringTag,{value:"Module"}));var CP=!1,EP=!1;try{var PN={get passive(){return CP=!0},get once(){return EP=CP=!0}};oz&&(window.addEventListener("test",PN,PN),window.removeEventListener("test",PN,!0))}catch{}function az(t,e,n,r){if(r&&typeof r!="boolean"&&!EP){var s=r.once,i=r.capture,o=n;!EP&&s&&(o=n.__once||function a(l){this.removeEventListener(e,a,i),n.call(this,l)},n.__once=o),t.addEventListener(e,o,CP?r:i)}t.addEventListener(e,n,r)}function CHe(t){const e=O.useRef(t);return O.useEffect(()=>{e.current=t},[t]),e}function gY(t){const e=CHe(t);return O.useCallback(function(...n){return e.current&&e.current(...n)},[e])}function vY(){return O.useState(null)}function EHe(){const t=O.useRef(!0),e=O.useRef(()=>t.current);return O.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),e.current}function MHe(t){const e=EHe();return[t[0],O.useCallback(n=>{if(e())return t[1](n)},[e,t[1]])]}var xa="top",Tl="bottom",Al="right",Sa="left",lz="auto",tC=[xa,Tl,Al,Sa],h1="start",KS="end",DHe="clippingParents",rue="viewport",fx="popper",kHe="reference",yY=tC.reduce(function(t,e){return t.concat([e+"-"+h1,e+"-"+KS])},[]),cz=[].concat(tC,[lz]).reduce(function(t,e){return t.concat([e,e+"-"+h1,e+"-"+KS])},[]),THe="beforeRead",AHe="read",_He="afterRead",OHe="beforeMain",RHe="main",NHe="afterMain",jHe="beforeWrite",IHe="write",LHe="afterWrite",PHe=[THe,AHe,_He,OHe,RHe,NHe,jHe,IHe,LHe];function Au(t){return t.split("-")[0]}function Xa(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ev(t){var e=Xa(t).Element;return t instanceof e||t instanceof Element}function _u(t){var e=Xa(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function uz(t){if(typeof ShadowRoot>"u")return!1;var e=Xa(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}var Ng=Math.max,yA=Math.min,m1=Math.round;function MP(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function sue(){return!/^((?!chrome|android).)*safari/i.test(MP())}function g1(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),s=1,i=1;e&&_u(t)&&(s=t.offsetWidth>0&&m1(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&m1(r.height)/t.offsetHeight||1);var o=ev(t)?Xa(t):window,a=o.visualViewport,l=!sue()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/s,d=(r.top+(l&&a?a.offsetTop:0))/i,f=r.width/s,p=r.height/i;return{width:f,height:p,top:d,right:c+f,bottom:d+p,left:c,x:c,y:d}}function dz(t){var e=g1(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function iue(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&uz(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ph(t){return t?(t.nodeName||"").toLowerCase():null}function Zd(t){return Xa(t).getComputedStyle(t)}function $He(t){return["table","td","th"].indexOf(ph(t))>=0}function Ih(t){return((ev(t)?t.ownerDocument:t.document)||window.document).documentElement}function $3(t){return ph(t)==="html"?t:t.assignedSlot||t.parentNode||(uz(t)?t.host:null)||Ih(t)}function bY(t){return!_u(t)||Zd(t).position==="fixed"?null:t.offsetParent}function zHe(t){var e=/firefox/i.test(MP()),n=/Trident/i.test(MP());if(n&&_u(t)){var r=Zd(t);if(r.position==="fixed")return null}var s=$3(t);for(uz(s)&&(s=s.host);_u(s)&&["html","body"].indexOf(ph(s))<0;){var i=Zd(s);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return s;s=s.parentNode}return null}function nC(t){for(var e=Xa(t),n=bY(t);n&&$He(n)&&Zd(n).position==="static";)n=bY(n);return n&&(ph(n)==="html"||ph(n)==="body"&&Zd(n).position==="static")?e:n||zHe(t)||e}function fz(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function sS(t,e,n){return Ng(t,yA(e,n))}function FHe(t,e,n){var r=sS(t,e,n);return r>n?n:r}function oue(){return{top:0,right:0,bottom:0,left:0}}function aue(t){return Object.assign({},oue(),t)}function lue(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var BHe=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,aue(typeof e!="number"?e:lue(e,tC))};function HHe(t){var e,n=t.state,r=t.name,s=t.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Au(n.placement),l=fz(a),c=[Sa,Al].indexOf(a)>=0,d=c?"height":"width";if(!(!i||!o)){var f=BHe(s.padding,n),p=dz(i),m=l==="y"?xa:Sa,v=l==="y"?Tl:Al,y=n.rects.reference[d]+n.rects.reference[l]-o[l]-n.rects.popper[d],x=o[l]-n.rects.reference[l],w=nC(i),C=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,E=y/2-x/2,D=f[m],T=C-p[d]-f[v],A=C/2-p[d]/2+E,_=sS(D,A,T),R=l;n.modifiersData[r]=(e={},e[R]=_,e.centerOffset=_-A,e)}}function qHe(t){var e=t.state,n=t.options,r=n.element,s=r===void 0?"[data-popper-arrow]":r;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||iue(e.elements.popper,s)&&(e.elements.arrow=s))}const UHe={name:"arrow",enabled:!0,phase:"main",fn:HHe,effect:qHe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function v1(t){return t.split("-")[1]}var VHe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function WHe(t,e){var n=t.x,r=t.y,s=e.devicePixelRatio||1;return{x:m1(n*s)/s||0,y:m1(r*s)/s||0}}function xY(t){var e,n=t.popper,r=t.popperRect,s=t.placement,i=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,d=t.roundOffsets,f=t.isFixed,p=o.x,m=p===void 0?0:p,v=o.y,y=v===void 0?0:v,x=typeof d=="function"?d({x:m,y}):{x:m,y};m=x.x,y=x.y;var w=o.hasOwnProperty("x"),C=o.hasOwnProperty("y"),E=Sa,D=xa,T=window;if(c){var A=nC(n),_="clientHeight",R="clientWidth";if(A===Xa(n)&&(A=Ih(n),Zd(A).position!=="static"&&a==="absolute"&&(_="scrollHeight",R="scrollWidth")),A=A,s===xa||(s===Sa||s===Al)&&i===KS){D=Tl;var N=f&&A===T&&T.visualViewport?T.visualViewport.height:A[_];y-=N-r.height,y*=l?1:-1}if(s===Sa||(s===xa||s===Tl)&&i===KS){E=Al;var I=f&&A===T&&T.visualViewport?T.visualViewport.width:A[R];m-=I-r.width,m*=l?1:-1}}var $=Object.assign({position:a},c&&VHe),L=d===!0?WHe({x:m,y},Xa(n)):{x:m,y};if(m=L.x,y=L.y,l){var z;return Object.assign({},$,(z={},z[D]=C?"0":"",z[E]=w?"0":"",z.transform=(T.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",z))}return Object.assign({},$,(e={},e[D]=C?y+"px":"",e[E]=w?m+"px":"",e.transform="",e))}function YHe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,s=r===void 0?!0:r,i=n.adaptive,o=i===void 0?!0:i,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Au(e.placement),variation:v1(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,xY(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,xY(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const GHe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:YHe,data:{}};var yD={passive:!0};function KHe(t){var e=t.state,n=t.instance,r=t.options,s=r.scroll,i=s===void 0?!0:s,o=r.resize,a=o===void 0?!0:o,l=Xa(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&c.forEach(function(d){d.addEventListener("scroll",n.update,yD)}),a&&l.addEventListener("resize",n.update,yD),function(){i&&c.forEach(function(d){d.removeEventListener("scroll",n.update,yD)}),a&&l.removeEventListener("resize",n.update,yD)}}const ZHe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:KHe,data:{}};var JHe={left:"right",right:"left",bottom:"top",top:"bottom"};function fk(t){return t.replace(/left|right|bottom|top/g,function(e){return JHe[e]})}var XHe={start:"end",end:"start"};function SY(t){return t.replace(/start|end/g,function(e){return XHe[e]})}function pz(t){var e=Xa(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function hz(t){return g1(Ih(t)).left+pz(t).scrollLeft}function QHe(t,e){var n=Xa(t),r=Ih(t),s=n.visualViewport,i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;var c=sue();(c||!c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a+hz(t),y:l}}function eqe(t){var e,n=Ih(t),r=pz(t),s=(e=t.ownerDocument)==null?void 0:e.body,i=Ng(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Ng(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-r.scrollLeft+hz(t),l=-r.scrollTop;return Zd(s||n).direction==="rtl"&&(a+=Ng(n.clientWidth,s?s.clientWidth:0)-i),{width:i,height:o,x:a,y:l}}function mz(t){var e=Zd(t),n=e.overflow,r=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+r)}function cue(t){return["html","body","#document"].indexOf(ph(t))>=0?t.ownerDocument.body:_u(t)&&mz(t)?t:cue($3(t))}function iS(t,e){var n;e===void 0&&(e=[]);var r=cue(t),s=r===((n=t.ownerDocument)==null?void 0:n.body),i=Xa(r),o=s?[i].concat(i.visualViewport||[],mz(r)?r:[]):r,a=e.concat(o);return s?a:a.concat(iS($3(o)))}function DP(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tqe(t,e){var n=g1(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function wY(t,e,n){return e===rue?DP(QHe(t,n)):ev(e)?tqe(e,n):DP(eqe(Ih(t)))}function nqe(t){var e=iS($3(t)),n=["absolute","fixed"].indexOf(Zd(t).position)>=0,r=n&&_u(t)?nC(t):t;return ev(r)?e.filter(function(s){return ev(s)&&iue(s,r)&&ph(s)!=="body"}):[]}function rqe(t,e,n,r){var s=e==="clippingParents"?nqe(t):[].concat(e),i=[].concat(s,[n]),o=i[0],a=i.reduce(function(l,c){var d=wY(t,c,r);return l.top=Ng(d.top,l.top),l.right=yA(d.right,l.right),l.bottom=yA(d.bottom,l.bottom),l.left=Ng(d.left,l.left),l},wY(t,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function uue(t){var e=t.reference,n=t.element,r=t.placement,s=r?Au(r):null,i=r?v1(r):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case xa:l={x:o,y:e.y-n.height};break;case Tl:l={x:o,y:e.y+e.height};break;case Al:l={x:e.x+e.width,y:a};break;case Sa:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?fz(s):null;if(c!=null){var d=c==="y"?"height":"width";switch(i){case h1:l[c]=l[c]-(e[d]/2-n[d]/2);break;case KS:l[c]=l[c]+(e[d]/2-n[d]/2);break}}return l}function ZS(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=r===void 0?t.placement:r,i=n.strategy,o=i===void 0?t.strategy:i,a=n.boundary,l=a===void 0?DHe:a,c=n.rootBoundary,d=c===void 0?rue:c,f=n.elementContext,p=f===void 0?fx:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,x=y===void 0?0:y,w=aue(typeof x!="number"?x:lue(x,tC)),C=p===fx?kHe:fx,E=t.rects.popper,D=t.elements[v?C:p],T=rqe(ev(D)?D:D.contextElement||Ih(t.elements.popper),l,d,o),A=g1(t.elements.reference),_=uue({reference:A,element:E,placement:s}),R=DP(Object.assign({},E,_)),N=p===fx?R:A,I={top:T.top-N.top+w.top,bottom:N.bottom-T.bottom+w.bottom,left:T.left-N.left+w.left,right:N.right-T.right+w.right},$=t.modifiersData.offset;if(p===fx&&$){var L=$[s];Object.keys(I).forEach(function(z){var F=[Al,Tl].indexOf(z)>=0?1:-1,q=[xa,Tl].indexOf(z)>=0?"y":"x";I[z]+=L[q]*F})}return I}function sqe(t,e){e===void 0&&(e={});var n=e,r=n.placement,s=n.boundary,i=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?cz:l,d=v1(r),f=d?a?yY:yY.filter(function(v){return v1(v)===d}):tC,p=f.filter(function(v){return c.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=ZS(t,{placement:y,boundary:s,rootBoundary:i,padding:o})[Au(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function iqe(t){if(Au(t)===lz)return[];var e=fk(t);return[SY(t),e,SY(e)]}function oqe(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,x=e.options.placement,w=Au(x),C=w===x,E=l||(C||!v?[fk(x)]:iqe(x)),D=[x].concat(E).reduce(function(X,re){return X.concat(Au(re)===lz?sqe(e,{placement:re,boundary:d,rootBoundary:f,padding:c,flipVariations:v,allowedAutoPlacements:y}):re)},[]),T=e.rects.reference,A=e.rects.popper,_=new Map,R=!0,N=D[0],I=0;I<D.length;I++){var $=D[I],L=Au($),z=v1($)===h1,F=[xa,Tl].indexOf(L)>=0,q=F?"width":"height",H=ZS(e,{placement:$,boundary:d,rootBoundary:f,altBoundary:p,padding:c}),B=F?z?Al:Sa:z?Tl:xa;T[q]>A[q]&&(B=fk(B));var V=fk(B),Y=[];if(i&&Y.push(H[L]<=0),a&&Y.push(H[B]<=0,H[V]<=0),Y.every(function(X){return X})){N=$,R=!1;break}_.set($,Y)}if(R)for(var G=v?3:1,W=function(re){var ne=D.find(function(ee){var oe=_.get(ee);if(oe)return oe.slice(0,re).every(function(ce){return ce})});if(ne)return N=ne,"break"},Z=G;Z>0;Z--){var Q=W(Z);if(Q==="break")break}e.placement!==N&&(e.modifiersData[r]._skip=!0,e.placement=N,e.reset=!0)}}const aqe={name:"flip",enabled:!0,phase:"main",fn:oqe,requiresIfExists:["offset"],data:{_skip:!1}};function CY(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function EY(t){return[xa,Al,Tl,Sa].some(function(e){return t[e]>=0})}function lqe(t){var e=t.state,n=t.name,r=e.rects.reference,s=e.rects.popper,i=e.modifiersData.preventOverflow,o=ZS(e,{elementContext:"reference"}),a=ZS(e,{altBoundary:!0}),l=CY(o,r),c=CY(a,s,i),d=EY(l),f=EY(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const cqe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:lqe};function uqe(t,e,n){var r=Au(t),s=[Sa,xa].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=i[0],a=i[1];return o=o||0,a=(a||0)*s,[Sa,Al].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function dqe(t){var e=t.state,n=t.options,r=t.name,s=n.offset,i=s===void 0?[0,0]:s,o=cz.reduce(function(d,f){return d[f]=uqe(f,e.rects,i),d},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const fqe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dqe};function pqe(t){var e=t.state,n=t.name;e.modifiersData[n]=uue({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const hqe={name:"popperOffsets",enabled:!0,phase:"read",fn:pqe,data:{}};function mqe(t){return t==="x"?"y":"x"}function gqe(t){var e=t.state,n=t.options,r=t.name,s=n.mainAxis,i=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,x=ZS(e,{boundary:l,rootBoundary:c,padding:f,altBoundary:d}),w=Au(e.placement),C=v1(e.placement),E=!C,D=fz(w),T=mqe(D),A=e.modifiersData.popperOffsets,_=e.rects.reference,R=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,I=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(A){if(i){var z,F=D==="y"?xa:Sa,q=D==="y"?Tl:Al,H=D==="y"?"height":"width",B=A[D],V=B+x[F],Y=B-x[q],G=m?-R[H]/2:0,W=C===h1?_[H]:R[H],Z=C===h1?-R[H]:-_[H],Q=e.elements.arrow,X=m&&Q?dz(Q):{width:0,height:0},re=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:oue(),ne=re[F],ee=re[q],oe=sS(0,_[H],X[H]),ce=E?_[H]/2-G-oe-ne-I.mainAxis:W-oe-ne-I.mainAxis,ue=E?-_[H]/2+G+oe+ee+I.mainAxis:Z+oe+ee+I.mainAxis,pe=e.elements.arrow&&nC(e.elements.arrow),de=pe?D==="y"?pe.clientTop||0:pe.clientLeft||0:0,me=(z=$==null?void 0:$[D])!=null?z:0,Se=B+ce-me-de,De=B+ue-me,Ae=sS(m?yA(V,Se):V,B,m?Ng(Y,De):Y);A[D]=Ae,L[D]=Ae-B}if(a){var fe,Te=D==="x"?xa:Sa,Ne=D==="x"?Tl:Al,Ue=A[T],rt=T==="y"?"height":"width",ot=Ue+x[Te],Je=Ue-x[Ne],je=[xa,Sa].indexOf(w)!==-1,We=(fe=$==null?void 0:$[T])!=null?fe:0,Le=je?ot:Ue-_[rt]-R[rt]-We+I.altAxis,_e=je?Ue+_[rt]+R[rt]-We-I.altAxis:Je,Be=m&&je?FHe(Le,Ue,_e):sS(m?Le:ot,Ue,m?_e:Je);A[T]=Be,L[T]=Be-Ue}e.modifiersData[r]=L}}const vqe={name:"preventOverflow",enabled:!0,phase:"main",fn:gqe,requiresIfExists:["offset"]};function yqe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function bqe(t){return t===Xa(t)||!_u(t)?pz(t):yqe(t)}function xqe(t){var e=t.getBoundingClientRect(),n=m1(e.width)/t.offsetWidth||1,r=m1(e.height)/t.offsetHeight||1;return n!==1||r!==1}function Sqe(t,e,n){n===void 0&&(n=!1);var r=_u(e),s=_u(e)&&xqe(e),i=Ih(e),o=g1(t,s,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ph(e)!=="body"||mz(i))&&(a=bqe(e)),_u(e)?(l=g1(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=hz(i))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function wqe(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function s(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||s(i)}),r}function Cqe(t){var e=wqe(t);return PHe.reduce(function(n,r){return n.concat(e.filter(function(s){return s.phase===r}))},[])}function Eqe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Mqe(t){var e=t.reduce(function(n,r){var s=n[r.name];return n[r.name]=s?Object.assign({},s,r,{options:Object.assign({},s.options,r.options),data:Object.assign({},s.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var MY={placement:"bottom",modifiers:[],strategy:"absolute"};function DY(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Dqe(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,s=e.defaultOptions,i=s===void 0?MY:s;return function(a,l,c){c===void 0&&(c=i);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},MY,i),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},f=[],p=!1,m={state:d,setOptions:function(w){var C=typeof w=="function"?w(d.options):w;y(),d.options=Object.assign({},i,d.options,C),d.scrollParents={reference:ev(a)?iS(a):a.contextElement?iS(a.contextElement):[],popper:iS(l)};var E=Cqe(Mqe([].concat(r,d.options.modifiers)));return d.orderedModifiers=E.filter(function(D){return D.enabled}),v(),m.update()},forceUpdate:function(){if(!p){var w=d.elements,C=w.reference,E=w.popper;if(DY(C,E)){d.rects={reference:Sqe(C,nC(E),d.options.strategy==="fixed"),popper:dz(E)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(I){return d.modifiersData[I.name]=Object.assign({},I.data)});for(var D=0;D<d.orderedModifiers.length;D++){if(d.reset===!0){d.reset=!1,D=-1;continue}var T=d.orderedModifiers[D],A=T.fn,_=T.options,R=_===void 0?{}:_,N=T.name;typeof A=="function"&&(d=A({state:d,options:R,name:N,instance:m})||d)}}}},update:Eqe(function(){return new Promise(function(x){m.forceUpdate(),x(d)})}),destroy:function(){y(),p=!0}};if(!DY(a,l))return m;m.setOptions(c).then(function(x){!p&&c.onFirstUpdate&&c.onFirstUpdate(x)});function v(){d.orderedModifiers.forEach(function(x){var w=x.name,C=x.options,E=C===void 0?{}:C,D=x.effect;if(typeof D=="function"){var T=D({state:d,name:w,instance:m,options:E}),A=function(){};f.push(T||A)}})}function y(){f.forEach(function(x){return x()}),f=[]}return m}}var kqe=Dqe({defaultModifiers:[cqe,hqe,GHe,ZHe,fqe,aqe,vqe,UHe]}),kY=function(e){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},Tqe={name:"applyStyles",enabled:!1},Aqe={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(e){var n=e.state;return function(){var r=n.elements,s=r.reference,i=r.popper;if("removeAttribute"in s){var o=(s.getAttribute("aria-describedby")||"").split(",").filter(function(a){return a.trim()!==i.id});o.length?s.setAttribute("aria-describedby",o.join(",")):s.removeAttribute("aria-describedby")}}},fn:function(e){var n,r=e.state,s=r.elements,i=s.popper,o=s.reference,a=(n=i.getAttribute("role"))==null?void 0:n.toLowerCase();if(i.id&&a==="tooltip"&&"setAttribute"in o){var l=o.getAttribute("aria-describedby");if(l&&l.split(",").indexOf(i.id)!==-1)return;o.setAttribute("aria-describedby",l?l+","+i.id:i.id)}}},_qe=[];function Oqe(t,e,n){var r=n===void 0?{}:n,s=r.enabled,i=s===void 0?!0:s,o=r.placement,a=o===void 0?"bottom":o,l=r.strategy,c=l===void 0?"absolute":l,d=r.modifiers,f=d===void 0?_qe:d,p=Ud(r,["enabled","placement","strategy","modifiers"]),m=O.useRef(),v=O.useCallback(function(){var D;(D=m.current)==null||D.update()},[]),y=O.useCallback(function(){var D;(D=m.current)==null||D.forceUpdate()},[]),x=MHe(O.useState({placement:a,update:v,forceUpdate:y,attributes:{},styles:{popper:kY(c),arrow:{}}})),w=x[0],C=x[1],E=O.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(T){var A=T.state,_={},R={};Object.keys(A.elements).forEach(function(N){_[N]=A.styles[N],R[N]=A.attributes[N]}),C({state:A,styles:_,attributes:R,update:v,forceUpdate:y,placement:A.placement})}}},[v,y,C]);return O.useEffect(function(){!m.current||!i||m.current.setOptions({placement:a,strategy:c,modifiers:[].concat(f,[E,Tqe])})},[c,a,E,i]),O.useEffect(function(){if(!(!i||t==null||e==null))return m.current=kqe(t,e,wr({},p,{placement:a,strategy:c,modifiers:[].concat(f,[Aqe,E])})),function(){m.current!=null&&(m.current.destroy(),m.current=void 0,C(function(D){return wr({},D,{attributes:{},styles:{popper:kY(c)}})}))}},[i,t,e]),w}function gz(t,e,n,r){var s=r&&typeof r!="boolean"?r.capture:r;t.removeEventListener(e,n,s),n.__once&&t.removeEventListener(e,n.__once,s)}function Cu(t,e,n,r){return az(t,e,n,r),function(){gz(t,e,n,r)}}const Rqe=Object.freeze(Object.defineProperty({__proto__:null,default:Cu},Symbol.toStringTag,{value:"Module"}));var $N,TY;function Nqe(){if(TY)return $N;TY=1;var t=function(){};return $N=t,$N}var jqe=Nqe();const Iqe=Mr(jqe);function Lqe(t){return t&&"setState"in t?jp.findDOMNode(t):t??null}const Pqe=(function(t){return jh(Lqe(t))});var $qe=27,AY=function(){};function zqe(t){return t.button===0}function Fqe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var _Y=function(e){return e&&("current"in e?e.current:e)};function Bqe(t,e,n){var r=n===void 0?{}:n,s=r.disabled,i=r.clickTrigger,o=i===void 0?"click":i,a=O.useRef(!1),l=e||AY,c=O.useCallback(function(p){var m,v=_Y(t);Iqe(!!v,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),a.current=!v||Fqe(p)||!zqe(p)||!!Kd(v,(m=p.composedPath==null?void 0:p.composedPath()[0])!=null?m:p.target)},[t]),d=gY(function(p){a.current||l(p)}),f=gY(function(p){p.keyCode===$qe&&l(p)});O.useEffect(function(){if(!(s||t==null)){var p=window.event,m=Pqe(_Y(t)),v=Cu(m,o,c,!0),y=Cu(m,o,function(C){if(C===p){p=void 0;return}d(C)}),x=Cu(m,"keyup",function(C){if(C===p){p=void 0;return}f(C)}),w=[];return"ontouchstart"in m.documentElement&&(w=[].slice.call(m.body.children).map(function(C){return Cu(C,"mousemove",AY)})),function(){v(),y(),x(),w.forEach(function(C){return C()})}}},[t,s,o,c,d,f])}function Hqe(t){var e={};return Array.isArray(t)?(t==null||t.forEach(function(n){e[n.name]=n}),e):t||e}function qqe(t){return t===void 0&&(t={}),Array.isArray(t)?t:Object.keys(t).map(function(e){return t[e].name=e,t[e]})}function Uqe(t){var e,n,r,s,i=t.enabled,o=t.enableEvents,a=t.placement,l=t.flip,c=t.offset,d=t.fixed,f=t.containerPadding,p=t.arrowElement,m=t.popperConfig,v=m===void 0?{}:m,y=Hqe(v.modifiers);return wr({},v,{placement:a,enabled:i,strategy:d?"fixed":v.strategy,modifiers:qqe(wr({},y,{eventListeners:{enabled:o},preventOverflow:wr({},y.preventOverflow,{options:f?wr({padding:f},(e=y.preventOverflow)==null?void 0:e.options):(n=y.preventOverflow)==null?void 0:n.options}),offset:{options:wr({offset:c},(r=y.offset)==null?void 0:r.options)},arrow:wr({},y.arrow,{enabled:!!p,options:wr({},(s=y.arrow)==null?void 0:s.options,{element:p})}),flip:wr({enabled:!!l},y.flip)}))})}function due(t){t===void 0&&(t=jh());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}var bD;function rC(t){if((!bD&&bD!==0||t)&&oz){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),bD=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return bD}const xtt=Object.freeze(Object.defineProperty({__proto__:null,default:rC},Symbol.toStringTag,{value:"Module"}));var zN=function(e){var n;return typeof document>"u"?null:e==null?jh().body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),(n=e)!=null&&n.nodeType&&e||null)};function OY(t,e){var n=O.useState(function(){return zN(t)}),r=n[0],s=n[1];if(!r){var i=zN(t);i&&s(i)}return O.useEffect(function(){e&&r&&e(r)},[e,r]),O.useEffect(function(){var o=zN(t);o!==r&&s(o)},[t,r]),r}const RY=t=>!t||typeof t=="function"?t:e=>{t.current=e};function Vqe(t,e){const n=RY(t),r=RY(e);return s=>{n&&n(s),r&&r(s)}}function Wqe(t,e){return O.useMemo(()=>Vqe(t,e),[t,e])}var vz=xe.forwardRef(function(t,e){var n=t.flip,r=t.offset,s=t.placement,i=t.containerPadding,o=i===void 0?5:i,a=t.popperConfig,l=a===void 0?{}:a,c=t.transition,d=vY(),f=d[0],p=d[1],m=vY(),v=m[0],y=m[1],x=Wqe(p,e),w=OY(t.container),C=OY(t.target),E=O.useState(!t.show),D=E[0],T=E[1],A=Oqe(C,f,Uqe({placement:s,enableEvents:!!t.show,containerPadding:o||5,flip:n,offset:r,arrowElement:v,popperConfig:l})),_=A.styles,R=A.attributes,N=Ud(A,["styles","attributes"]);t.show?D&&T(!1):!t.transition&&!D&&T(!0);var I=function(){T(!0),t.onExited&&t.onExited.apply(t,arguments)},$=t.show||c&&!D;if(Bqe(f,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!$)return null;var L=t.children(wr({},N,{show:!!t.show,props:wr({},R.popper,{style:_.popper,ref:x}),arrowProps:wr({},R.arrow,{style:_.arrow,ref:y})}));if(c){var z=t.onExit,F=t.onExiting,q=t.onEnter,H=t.onEntering,B=t.onEntered;L=xe.createElement(c,{in:t.show,appear:!0,onExit:z,onExiting:F,onExited:I,onEnter:q,onEntering:H,onEntered:B},L)}return w?jp.createPortal(L,w):null});vz.displayName="Overlay";vz.propTypes={show:tt.bool,placement:tt.oneOf(cz),target:tt.any,container:tt.any,flip:tt.bool,children:tt.func.isRequired,containerPadding:tt.number,popperConfig:tt.object,rootClose:tt.bool,rootCloseEvent:tt.oneOf(["click","mousedown"]),rootCloseDisabled:tt.bool,onHide:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];if(e.rootClose){var i;return(i=tt.func).isRequired.apply(i,[e].concat(r))}return tt.func.apply(tt,[e].concat(r))},transition:tt.elementType,onEnter:tt.func,onEntering:tt.func,onEntered:tt.func,onExit:tt.func,onExiting:tt.func,onExited:tt.func};var FN,NY;function Yqe(){if(NY)return FN;NY=1;function t(){this.__data__=[],this.size=0}return FN=t,FN}var BN,jY;function z3(){if(jY)return BN;jY=1;var t=Zw();function e(n,r){for(var s=n.length;s--;)if(t(n[s][0],r))return s;return-1}return BN=e,BN}var HN,IY;function Gqe(){if(IY)return HN;IY=1;var t=z3(),e=Array.prototype,n=e.splice;function r(s){var i=this.__data__,o=t(i,s);if(o<0)return!1;var a=i.length-1;return o==a?i.pop():n.call(i,o,1),--this.size,!0}return HN=r,HN}var qN,LY;function Kqe(){if(LY)return qN;LY=1;var t=z3();function e(n){var r=this.__data__,s=t(r,n);return s<0?void 0:r[s][1]}return qN=e,qN}var UN,PY;function Zqe(){if(PY)return UN;PY=1;var t=z3();function e(n){return t(this.__data__,n)>-1}return UN=e,UN}var VN,$Y;function Jqe(){if($Y)return VN;$Y=1;var t=z3();function e(n,r){var s=this.__data__,i=t(s,n);return i<0?(++this.size,s.push([n,r])):s[i][1]=r,this}return VN=e,VN}var WN,zY;function F3(){if(zY)return WN;zY=1;var t=Yqe(),e=Gqe(),n=Kqe(),r=Zqe(),s=Jqe();function i(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=s,WN=i,WN}var YN,FY;function Xqe(){if(FY)return YN;FY=1;var t=F3();function e(){this.__data__=new t,this.size=0}return YN=e,YN}var GN,BY;function Qqe(){if(BY)return GN;BY=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return GN=t,GN}var KN,HY;function eUe(){if(HY)return KN;HY=1;function t(e){return this.__data__.get(e)}return KN=t,KN}var ZN,qY;function tUe(){if(qY)return ZN;qY=1;function t(e){return this.__data__.has(e)}return ZN=t,ZN}var JN,UY;function nUe(){if(UY)return JN;UY=1;var t=Oc(),e=t["__core-js_shared__"];return JN=e,JN}var XN,VY;function rUe(){if(VY)return XN;VY=1;var t=nUe(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return XN=n,XN}var QN,WY;function fue(){if(WY)return QN;WY=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return QN=n,QN}var ej,YY;function sUe(){if(YY)return ej;YY=1;var t=ez(),e=rUe(),n=Wu(),r=fue(),s=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,a=Object.prototype,l=o.toString,c=a.hasOwnProperty,d=RegExp("^"+l.call(c).replace(s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||e(p))return!1;var m=t(p)?d:i;return m.test(r(p))}return ej=f,ej}var tj,GY;function iUe(){if(GY)return tj;GY=1;function t(e,n){return e==null?void 0:e[n]}return tj=t,tj}var nj,KY;function yv(){if(KY)return nj;KY=1;var t=sUe(),e=iUe();function n(r,s){var i=e(r,s);return t(i)?i:void 0}return nj=n,nj}var rj,ZY;function yz(){if(ZY)return rj;ZY=1;var t=yv(),e=Oc(),n=t(e,"Map");return rj=n,rj}var sj,JY;function B3(){if(JY)return sj;JY=1;var t=yv(),e=t(Object,"create");return sj=e,sj}var ij,XY;function oUe(){if(XY)return ij;XY=1;var t=B3();function e(){this.__data__=t?t(null):{},this.size=0}return ij=e,ij}var oj,QY;function aUe(){if(QY)return oj;QY=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return oj=t,oj}var aj,eG;function lUe(){if(eG)return aj;eG=1;var t=B3(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function s(i){var o=this.__data__;if(t){var a=o[i];return a===e?void 0:a}return r.call(o,i)?o[i]:void 0}return aj=s,aj}var lj,tG;function cUe(){if(tG)return lj;tG=1;var t=B3(),e=Object.prototype,n=e.hasOwnProperty;function r(s){var i=this.__data__;return t?i[s]!==void 0:n.call(i,s)}return lj=r,lj}var cj,nG;function uUe(){if(nG)return cj;nG=1;var t=B3(),e="__lodash_hash_undefined__";function n(r,s){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=t&&s===void 0?e:s,this}return cj=n,cj}var uj,rG;function dUe(){if(rG)return uj;rG=1;var t=oUe(),e=aUe(),n=lUe(),r=cUe(),s=uUe();function i(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=s,uj=i,uj}var dj,sG;function fUe(){if(sG)return dj;sG=1;var t=dUe(),e=F3(),n=yz();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return dj=r,dj}var fj,iG;function pUe(){if(iG)return fj;iG=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return fj=t,fj}var pj,oG;function H3(){if(oG)return pj;oG=1;var t=pUe();function e(n,r){var s=n.__data__;return t(r)?s[typeof r=="string"?"string":"hash"]:s.map}return pj=e,pj}var hj,aG;function hUe(){if(aG)return hj;aG=1;var t=H3();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return hj=e,hj}var mj,lG;function mUe(){if(lG)return mj;lG=1;var t=H3();function e(n){return t(this,n).get(n)}return mj=e,mj}var gj,cG;function gUe(){if(cG)return gj;cG=1;var t=H3();function e(n){return t(this,n).has(n)}return gj=e,gj}var vj,uG;function vUe(){if(uG)return vj;uG=1;var t=H3();function e(n,r){var s=t(this,n),i=s.size;return s.set(n,r),this.size+=s.size==i?0:1,this}return vj=e,vj}var yj,dG;function bz(){if(dG)return yj;dG=1;var t=fUe(),e=hUe(),n=mUe(),r=gUe(),s=vUe();function i(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=n,i.prototype.has=r,i.prototype.set=s,yj=i,yj}var bj,fG;function yUe(){if(fG)return bj;fG=1;var t=F3(),e=yz(),n=bz(),r=200;function s(i,o){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([i,o]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,o),this.size=a.size,this}return bj=s,bj}var xj,pG;function xz(){if(pG)return xj;pG=1;var t=F3(),e=Xqe(),n=Qqe(),r=eUe(),s=tUe(),i=yUe();function o(a){var l=this.__data__=new t(a);this.size=l.size}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=s,o.prototype.set=i,xj=o,xj}var Sj,hG;function bUe(){if(hG)return Sj;hG=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return Sj=e,Sj}var wj,mG;function xUe(){if(mG)return wj;mG=1;function t(e){return this.__data__.has(e)}return wj=t,wj}var Cj,gG;function SUe(){if(gG)return Cj;gG=1;var t=bz(),e=bUe(),n=xUe();function r(s){var i=-1,o=s==null?0:s.length;for(this.__data__=new t;++i<o;)this.add(s[i])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,Cj=r,Cj}var Ej,vG;function wUe(){if(vG)return Ej;vG=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s;)if(n(e[r],r,e))return!0;return!1}return Ej=t,Ej}var Mj,yG;function CUe(){if(yG)return Mj;yG=1;function t(e,n){return e.has(n)}return Mj=t,Mj}var Dj,bG;function pue(){if(bG)return Dj;bG=1;var t=SUe(),e=wUe(),n=CUe(),r=1,s=2;function i(o,a,l,c,d,f){var p=l&r,m=o.length,v=a.length;if(m!=v&&!(p&&v>m))return!1;var y=f.get(o),x=f.get(a);if(y&&x)return y==a&&x==o;var w=-1,C=!0,E=l&s?new t:void 0;for(f.set(o,a),f.set(a,o);++w<m;){var D=o[w],T=a[w];if(c)var A=p?c(T,D,w,a,o,f):c(D,T,w,o,a,f);if(A!==void 0){if(A)continue;C=!1;break}if(E){if(!e(a,function(_,R){if(!n(E,R)&&(D===_||d(D,_,l,c,f)))return E.push(R)})){C=!1;break}}else if(!(D===T||d(D,T,l,c,f))){C=!1;break}}return f.delete(o),f.delete(a),C}return Dj=i,Dj}var kj,xG;function hue(){if(xG)return kj;xG=1;var t=Oc(),e=t.Uint8Array;return kj=e,kj}var Tj,SG;function EUe(){if(SG)return Tj;SG=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s,i){r[++n]=[i,s]}),r}return Tj=t,Tj}var Aj,wG;function MUe(){if(wG)return Aj;wG=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(s){r[++n]=s}),r}return Aj=t,Aj}var _j,CG;function DUe(){if(CG)return _j;CG=1;var t=Z1(),e=hue(),n=Zw(),r=pue(),s=EUe(),i=MUe(),o=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",v="[object Set]",y="[object String]",x="[object Symbol]",w="[object ArrayBuffer]",C="[object DataView]",E=t?t.prototype:void 0,D=E?E.valueOf:void 0;function T(A,_,R,N,I,$,L){switch(R){case C:if(A.byteLength!=_.byteLength||A.byteOffset!=_.byteOffset)return!1;A=A.buffer,_=_.buffer;case w:return!(A.byteLength!=_.byteLength||!$(new e(A),new e(_)));case l:case c:case p:return n(+A,+_);case d:return A.name==_.name&&A.message==_.message;case m:case y:return A==_+"";case f:var z=s;case v:var F=N&o;if(z||(z=i),A.size!=_.size&&!F)return!1;var q=L.get(A);if(q)return q==_;N|=a,L.set(A,_);var H=r(z(A),z(_),N,I,$,L);return L.delete(A),H;case x:if(D)return D.call(A)==D.call(_)}return!1}return _j=T,_j}var Oj,EG;function Sz(){if(EG)return Oj;EG=1;function t(e,n){for(var r=-1,s=n.length,i=e.length;++r<s;)e[i+r]=n[r];return e}return Oj=t,Oj}var Rj,MG;function Ll(){if(MG)return Rj;MG=1;var t=Array.isArray;return Rj=t,Rj}var Nj,DG;function mue(){if(DG)return Nj;DG=1;var t=Sz(),e=Ll();function n(r,s,i){var o=s(r);return e(r)?o:t(o,i(r))}return Nj=n,Nj}var jj,kG;function kUe(){if(kG)return jj;kG=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,i=0,o=[];++r<s;){var a=e[r];n(a,r,e)&&(o[i++]=a)}return o}return jj=t,jj}var Ij,TG;function gue(){if(TG)return Ij;TG=1;function t(){return[]}return Ij=t,Ij}var Lj,AG;function wz(){if(AG)return Lj;AG=1;var t=kUe(),e=gue(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(o){return o==null?[]:(o=Object(o),t(s(o),function(a){return r.call(o,a)}))}:e;return Lj=i,Lj}var Pj,_G;function TUe(){if(_G)return Pj;_G=1;function t(e,n){for(var r=-1,s=Array(e);++r<e;)s[r]=n(r);return s}return Pj=t,Pj}var $j,OG;function AUe(){if(OG)return $j;OG=1;var t=J1(),e=Nh(),n="[object Arguments]";function r(s){return e(s)&&t(s)==n}return $j=r,$j}var zj,RG;function Cz(){if(RG)return zj;RG=1;var t=AUe(),e=Nh(),n=Object.prototype,r=n.hasOwnProperty,s=n.propertyIsEnumerable,i=t((function(){return arguments})())?t:function(o){return e(o)&&r.call(o,"callee")&&!s.call(o,"callee")};return zj=i,zj}var Nx={exports:{}},Fj,NG;function _Ue(){if(NG)return Fj;NG=1;function t(){return!1}return Fj=t,Fj}Nx.exports;var jG;function q3(){return jG||(jG=1,(function(t,e){var n=Oc(),r=_Ue(),s=e&&!e.nodeType&&e,i=s&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===s,a=o?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c})(Nx,Nx.exports)),Nx.exports}var Bj,IG;function OUe(){if(IG)return Bj;IG=1;var t=J1(),e=tz(),n=Nh(),r="[object Arguments]",s="[object Array]",i="[object Boolean]",o="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",C="[object Float32Array]",E="[object Float64Array]",D="[object Int8Array]",T="[object Int16Array]",A="[object Int32Array]",_="[object Uint8Array]",R="[object Uint8ClampedArray]",N="[object Uint16Array]",I="[object Uint32Array]",$={};$[C]=$[E]=$[D]=$[T]=$[A]=$[_]=$[R]=$[N]=$[I]=!0,$[r]=$[s]=$[x]=$[i]=$[w]=$[o]=$[a]=$[l]=$[c]=$[d]=$[f]=$[p]=$[m]=$[v]=$[y]=!1;function L(z){return n(z)&&e(z.length)&&!!$[t(z)]}return Bj=L,Bj}var Hj,LG;function U3(){if(LG)return Hj;LG=1;function t(e){return function(n){return e(n)}}return Hj=t,Hj}var jx={exports:{}};jx.exports;var PG;function Ez(){return PG||(PG=1,(function(t,e){var n=Kce(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===r,o=i&&n.process,a=(function(){try{var l=s&&s.require&&s.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();t.exports=a})(jx,jx.exports)),jx.exports}var qj,$G;function Mz(){if($G)return qj;$G=1;var t=OUe(),e=U3(),n=Ez(),r=n&&n.isTypedArray,s=r?e(r):t;return qj=s,qj}var Uj,zG;function vue(){if(zG)return Uj;zG=1;var t=TUe(),e=Cz(),n=Ll(),r=q3(),s=nz(),i=Mz(),o=Object.prototype,a=o.hasOwnProperty;function l(c,d){var f=n(c),p=!f&&e(c),m=!f&&!p&&r(c),v=!f&&!p&&!m&&i(c),y=f||p||m||v,x=y?t(c.length,String):[],w=x.length;for(var C in c)(d||a.call(c,C))&&!(y&&(C=="length"||m&&(C=="offset"||C=="parent")||v&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||s(C,w)))&&x.push(C);return x}return Uj=l,Uj}var Vj,FG;function Dz(){if(FG)return Vj;FG=1;var t=Object.prototype;function e(n){var r=n&&n.constructor,s=typeof r=="function"&&r.prototype||t;return n===s}return Vj=e,Vj}var Wj,BG;function yue(){if(BG)return Wj;BG=1;function t(e,n){return function(r){return e(n(r))}}return Wj=t,Wj}var Yj,HG;function RUe(){if(HG)return Yj;HG=1;var t=yue(),e=t(Object.keys,Object);return Yj=e,Yj}var Gj,qG;function NUe(){if(qG)return Gj;qG=1;var t=Dz(),e=RUe(),n=Object.prototype,r=n.hasOwnProperty;function s(i){if(!t(i))return e(i);var o=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&o.push(a);return o}return Gj=s,Gj}var Kj,UG;function sC(){if(UG)return Kj;UG=1;var t=vue(),e=NUe(),n=Jw();function r(s){return n(s)?t(s):e(s)}return Kj=r,Kj}var Zj,VG;function bue(){if(VG)return Zj;VG=1;var t=mue(),e=wz(),n=sC();function r(s){return t(s,n,e)}return Zj=r,Zj}var Jj,WG;function jUe(){if(WG)return Jj;WG=1;var t=bue(),e=1,n=Object.prototype,r=n.hasOwnProperty;function s(i,o,a,l,c,d){var f=a&e,p=t(i),m=p.length,v=t(o),y=v.length;if(m!=y&&!f)return!1;for(var x=m;x--;){var w=p[x];if(!(f?w in o:r.call(o,w)))return!1}var C=d.get(i),E=d.get(o);if(C&&E)return C==o&&E==i;var D=!0;d.set(i,o),d.set(o,i);for(var T=f;++x<m;){w=p[x];var A=i[w],_=o[w];if(l)var R=f?l(_,A,w,o,i,d):l(A,_,w,i,o,d);if(!(R===void 0?A===_||c(A,_,a,l,d):R)){D=!1;break}T||(T=w=="constructor")}if(D&&!T){var N=i.constructor,I=o.constructor;N!=I&&"constructor"in i&&"constructor"in o&&!(typeof N=="function"&&N instanceof N&&typeof I=="function"&&I instanceof I)&&(D=!1)}return d.delete(i),d.delete(o),D}return Jj=s,Jj}var Xj,YG;function IUe(){if(YG)return Xj;YG=1;var t=yv(),e=Oc(),n=t(e,"DataView");return Xj=n,Xj}var Qj,GG;function LUe(){if(GG)return Qj;GG=1;var t=yv(),e=Oc(),n=t(e,"Promise");return Qj=n,Qj}var e5,KG;function PUe(){if(KG)return e5;KG=1;var t=yv(),e=Oc(),n=t(e,"Set");return e5=n,e5}var t5,ZG;function $Ue(){if(ZG)return t5;ZG=1;var t=yv(),e=Oc(),n=t(e,"WeakMap");return t5=n,t5}var n5,JG;function V3(){if(JG)return n5;JG=1;var t=IUe(),e=yz(),n=LUe(),r=PUe(),s=$Ue(),i=J1(),o=fue(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=o(t),v=o(e),y=o(n),x=o(r),w=o(s),C=i;return(t&&C(new t(new ArrayBuffer(1)))!=p||e&&C(new e)!=a||n&&C(n.resolve())!=c||r&&C(new r)!=d||s&&C(new s)!=f)&&(C=function(E){var D=i(E),T=D==l?E.constructor:void 0,A=T?o(T):"";if(A)switch(A){case m:return p;case v:return a;case y:return c;case x:return d;case w:return f}return D}),n5=C,n5}var r5,XG;function zUe(){if(XG)return r5;XG=1;var t=xz(),e=pue(),n=DUe(),r=jUe(),s=V3(),i=Ll(),o=q3(),a=Mz(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function v(y,x,w,C,E,D){var T=i(y),A=i(x),_=T?d:s(y),R=A?d:s(x);_=_==c?f:_,R=R==c?f:R;var N=_==f,I=R==f,$=_==R;if($&&o(y)){if(!o(x))return!1;T=!0,N=!1}if($&&!N)return D||(D=new t),T||a(y)?e(y,x,w,C,E,D):n(y,x,_,w,C,E,D);if(!(w&l)){var L=N&&m.call(y,"__wrapped__"),z=I&&m.call(x,"__wrapped__");if(L||z){var F=L?y.value():y,q=z?x.value():x;return D||(D=new t),E(F,q,w,C,D)}}return $?(D||(D=new t),r(y,x,w,C,E,D)):!1}return r5=v,r5}var s5,QG;function kz(){if(QG)return s5;QG=1;var t=zUe(),e=Nh();function n(r,s,i,o,a){return r===s?!0:r==null||s==null||!e(r)&&!e(s)?r!==r&&s!==s:t(r,s,i,o,n,a)}return s5=n,s5}var i5,eK;function xue(){if(eK)return i5;eK=1;var t=kz();function e(n,r){return t(n,r)}return i5=e,i5}var FUe=xue();const BUe=Mr(FUe);function eh(t,e){var n=I3(t);return n?n.innerHeight:e?t.clientHeight:Ml(t).height}const Stt=Object.freeze(Object.defineProperty({__proto__:null,default:eh},Symbol.toStringTag,{value:"Module"}));function iC(t,e,n){t.closest&&!n&&t.closest(e);var r=t;do{if(P3(r,e))return r;r=r.parentElement}while(r&&r!==n&&r.nodeType===document.ELEMENT_NODE);return null}const HUe=Object.freeze(Object.defineProperty({__proto__:null,default:iC},Symbol.toStringTag,{value:"Module"}));var o5,tK;function qUe(){if(tK)return o5;tK=1;function t(e,n,r,s){for(var i=e.length,o=r+(s?1:-1);s?o--:++o<i;)if(n(e[o],o,e))return o;return-1}return o5=t,o5}var a5,nK;function UUe(){if(nK)return a5;nK=1;var t=xz(),e=kz(),n=1,r=2;function s(i,o,a,l){var c=a.length,d=c,f=!l;if(i==null)return!d;for(i=Object(i);c--;){var p=a[c];if(f&&p[2]?p[1]!==i[p[0]]:!(p[0]in i))return!1}for(;++c<d;){p=a[c];var m=p[0],v=i[m],y=p[1];if(f&&p[2]){if(v===void 0&&!(m in i))return!1}else{var x=new t;if(l)var w=l(v,y,m,i,o,x);if(!(w===void 0?e(y,v,n|r,l,x):w))return!1}}return!0}return a5=s,a5}var l5,rK;function Sue(){if(rK)return l5;rK=1;var t=Wu();function e(n){return n===n&&!t(n)}return l5=e,l5}var c5,sK;function VUe(){if(sK)return c5;sK=1;var t=Sue(),e=sC();function n(r){for(var s=e(r),i=s.length;i--;){var o=s[i],a=r[o];s[i]=[o,a,t(a)]}return s}return c5=n,c5}var u5,iK;function wue(){if(iK)return u5;iK=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return u5=t,u5}var d5,oK;function WUe(){if(oK)return d5;oK=1;var t=UUe(),e=VUe(),n=wue();function r(s){var i=e(s);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(o){return o===s||t(o,s,i)}}return d5=r,d5}var f5,aK;function Tz(){if(aK)return f5;aK=1;var t=Ll(),e=Xw(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(i,o){if(t(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||e(i)?!0:r.test(i)||!n.test(i)||o!=null&&i in Object(o)}return f5=s,f5}var p5,lK;function YUe(){if(lK)return p5;lK=1;var t=bz(),e="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(e);var i=function(){var o=arguments,a=s?s.apply(this,o):o[0],l=i.cache;if(l.has(a))return l.get(a);var c=r.apply(this,o);return i.cache=l.set(a,c)||l,c};return i.cache=new(n.Cache||t),i}return n.Cache=t,p5=n,p5}var h5,cK;function GUe(){if(cK)return h5;cK=1;var t=YUe(),e=500;function n(r){var s=t(r,function(o){return i.size===e&&i.clear(),o}),i=s.cache;return s}return h5=n,h5}var m5,uK;function KUe(){if(uK)return m5;uK=1;var t=GUe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(e,function(o,a,l,c){i.push(l?c.replace(n,"$1"):a||o)}),i});return m5=r,m5}var g5,dK;function Az(){if(dK)return g5;dK=1;function t(e,n){for(var r=-1,s=e==null?0:e.length,i=Array(s);++r<s;)i[r]=n(e[r],r,e);return i}return g5=t,g5}var v5,fK;function ZUe(){if(fK)return v5;fK=1;var t=Z1(),e=Az(),n=Ll(),r=Xw(),s=t?t.prototype:void 0,i=s?s.toString:void 0;function o(a){if(typeof a=="string")return a;if(n(a))return e(a,o)+"";if(r(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return v5=o,v5}var y5,pK;function JUe(){if(pK)return y5;pK=1;var t=ZUe();function e(n){return n==null?"":t(n)}return y5=e,y5}var b5,hK;function W3(){if(hK)return b5;hK=1;var t=Ll(),e=Tz(),n=KUe(),r=JUe();function s(i,o){return t(i)?i:e(i,o)?[i]:n(r(i))}return b5=s,b5}var x5,mK;function oC(){if(mK)return x5;mK=1;var t=Xw();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return x5=e,x5}var S5,gK;function Y3(){if(gK)return S5;gK=1;var t=W3(),e=oC();function n(r,s){s=t(s,r);for(var i=0,o=s.length;r!=null&&i<o;)r=r[e(s[i++])];return i&&i==o?r:void 0}return S5=n,S5}var w5,vK;function XUe(){if(vK)return w5;vK=1;var t=Y3();function e(n,r,s){var i=n==null?void 0:t(n,r);return i===void 0?s:i}return w5=e,w5}var C5,yK;function QUe(){if(yK)return C5;yK=1;function t(e,n){return e!=null&&n in Object(e)}return C5=t,C5}var E5,bK;function eVe(){if(bK)return E5;bK=1;var t=W3(),e=Cz(),n=Ll(),r=nz(),s=tz(),i=oC();function o(a,l,c){l=t(l,a);for(var d=-1,f=l.length,p=!1;++d<f;){var m=i(l[d]);if(!(p=a!=null&&c(a,m)))break;a=a[m]}return p||++d!=f?p:(f=a==null?0:a.length,!!f&&s(f)&&r(m,f)&&(n(a)||e(a)))}return E5=o,E5}var M5,xK;function tVe(){if(xK)return M5;xK=1;var t=QUe(),e=eVe();function n(r,s){return r!=null&&e(r,s,t)}return M5=n,M5}var D5,SK;function nVe(){if(SK)return D5;SK=1;var t=kz(),e=XUe(),n=tVe(),r=Tz(),s=Sue(),i=wue(),o=oC(),a=1,l=2;function c(d,f){return r(d)&&s(f)?i(o(d),f):function(p){var m=e(p,d);return m===void 0&&m===f?n(p,d):t(f,m,a|l)}}return D5=c,D5}var k5,wK;function G3(){if(wK)return k5;wK=1;function t(e){return e}return k5=t,k5}var T5,CK;function rVe(){if(CK)return T5;CK=1;function t(e){return function(n){return n==null?void 0:n[e]}}return T5=t,T5}var A5,EK;function sVe(){if(EK)return A5;EK=1;var t=Y3();function e(n){return function(r){return t(r,n)}}return A5=e,A5}var _5,MK;function iVe(){if(MK)return _5;MK=1;var t=rVe(),e=sVe(),n=Tz(),r=oC();function s(i){return n(i)?t(r(i)):e(i)}return _5=s,_5}var O5,DK;function K3(){if(DK)return O5;DK=1;var t=WUe(),e=nVe(),n=G3(),r=Ll(),s=iVe();function i(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?e(o[0],o[1]):t(o):s(o)}return O5=i,O5}var R5,kK;function Cue(){if(kK)return R5;kK=1;var t=qUe(),e=K3(),n=Xce(),r=Math.max;function s(i,o,a){var l=i==null?0:i.length;if(!l)return-1;var c=a==null?0:n(a);return c<0&&(c=r(l+c,0)),t(i,e(o,3),c)}return R5=s,R5}var oVe=Cue();const aVe=Mr(oVe);var N5,TK;function lVe(){if(TK)return N5;TK=1;var t=Math.ceil,e=Math.max;function n(r,s,i,o){for(var a=-1,l=e(t((s-r)/(i||1)),0),c=Array(l);l--;)c[o?l:++a]=r,r+=i;return c}return N5=n,N5}var j5,AK;function cVe(){if(AK)return j5;AK=1;var t=lVe(),e=j3(),n=Jce();function r(s){return function(i,o,a){return a&&typeof a!="number"&&e(i,o,a)&&(o=a=void 0),i=n(i),o===void 0?(o=i,i=0):o=n(o),a=a===void 0?i<o?1:-1:n(a),t(i,o,a,s)}}return j5=r,j5}var I5,_K;function uVe(){if(_K)return I5;_K=1;var t=cVe(),e=t();return I5=e,I5}var dVe=uVe();const fVe=Mr(dVe);var OK=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function pVe(t,e){return!!(t===e||OK(t)&&OK(e))}function hVe(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!pVe(t[n],e[n]))return!1;return!0}function _z(t,e){e===void 0&&(e=hVe);var n=null;function r(){for(var s=[],i=0;i<arguments.length;i++)s[i]=arguments[i];if(n&&n.lastThis===this&&e(s,n.lastArgs))return n.lastResult;var o=t.apply(this,s);return n={lastResult:o,lastArgs:s,lastThis:this},o}return r.clear=function(){n=null},r}const wtt=Object.freeze(Object.defineProperty({__proto__:null,default:_z},Symbol.toStringTag,{value:"Module"}));var L5,RK;function mVe(){if(RK)return L5;RK=1;var t=Z1(),e=Cz(),n=Ll(),r=t?t.isConcatSpreadable:void 0;function s(i){return n(i)||e(i)||!!(r&&i&&i[r])}return L5=s,L5}var P5,NK;function Eue(){if(NK)return P5;NK=1;var t=Sz(),e=mVe();function n(r,s,i,o,a){var l=-1,c=r.length;for(i||(i=e),a||(a=[]);++l<c;){var d=r[l];s>0&&i(d)?s>1?n(d,s-1,i,o,a):t(a,d):o||(a[a.length]=d)}return a}return P5=n,P5}var $5,jK;function gVe(){if(jK)return $5;jK=1;function t(e){return function(n,r,s){for(var i=-1,o=Object(n),a=s(n),l=a.length;l--;){var c=a[e?l:++i];if(r(o[c],c,o)===!1)break}return n}}return $5=t,$5}var z5,IK;function vVe(){if(IK)return z5;IK=1;var t=gVe(),e=t();return z5=e,z5}var F5,LK;function Oz(){if(LK)return F5;LK=1;var t=vVe(),e=sC();function n(r,s){return r&&t(r,s,e)}return F5=n,F5}var B5,PK;function yVe(){if(PK)return B5;PK=1;var t=Jw();function e(n,r){return function(s,i){if(s==null)return s;if(!t(s))return n(s,i);for(var o=s.length,a=r?o:-1,l=Object(s);(r?a--:++a<o)&&i(l[a],a,l)!==!1;);return s}}return B5=e,B5}var H5,$K;function bVe(){if($K)return H5;$K=1;var t=Oz(),e=yVe(),n=e(t);return H5=n,H5}var q5,zK;function xVe(){if(zK)return q5;zK=1;var t=bVe(),e=Jw();function n(r,s){var i=-1,o=e(r)?Array(r.length):[];return t(r,function(a,l,c){o[++i]=s(a,l,c)}),o}return q5=n,q5}var U5,FK;function SVe(){if(FK)return U5;FK=1;function t(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}return U5=t,U5}var V5,BK;function wVe(){if(BK)return V5;BK=1;var t=Xw();function e(n,r){if(n!==r){var s=n!==void 0,i=n===null,o=n===n,a=t(n),l=r!==void 0,c=r===null,d=r===r,f=t(r);if(!c&&!f&&!a&&n>r||a&&l&&d&&!c&&!f||i&&l&&d||!s&&d||!o)return 1;if(!i&&!a&&!f&&n<r||f&&s&&o&&!i&&!a||c&&s&&o||!l&&o||!d)return-1}return 0}return V5=e,V5}var W5,HK;function CVe(){if(HK)return W5;HK=1;var t=wVe();function e(n,r,s){for(var i=-1,o=n.criteria,a=r.criteria,l=o.length,c=s.length;++i<l;){var d=t(o[i],a[i]);if(d){if(i>=c)return d;var f=s[i];return d*(f=="desc"?-1:1)}}return n.index-r.index}return W5=e,W5}var Y5,qK;function EVe(){if(qK)return Y5;qK=1;var t=Az(),e=Y3(),n=K3(),r=xVe(),s=SVe(),i=U3(),o=CVe(),a=G3(),l=Ll();function c(d,f,p){f.length?f=t(f,function(y){return l(y)?function(x){return e(x,y.length===1?y[0]:y)}:y}):f=[a];var m=-1;f=t(f,i(n));var v=r(d,function(y,x,w){var C=t(f,function(E){return E(y)});return{criteria:C,index:++m,value:y}});return s(v,function(y,x){return o(y,x,p)})}return Y5=c,Y5}var G5,UK;function MVe(){if(UK)return G5;UK=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return G5=t,G5}var K5,VK;function Mue(){if(VK)return K5;VK=1;var t=MVe(),e=Math.max;function n(r,s,i){return s=e(s===void 0?r.length-1:s,0),function(){for(var o=arguments,a=-1,l=e(o.length-s,0),c=Array(l);++a<l;)c[a]=o[s+a];a=-1;for(var d=Array(s+1);++a<s;)d[a]=o[a];return d[s]=i(c),t(r,this,d)}}return K5=n,K5}var Z5,WK;function DVe(){if(WK)return Z5;WK=1;function t(e){return function(){return e}}return Z5=t,Z5}var J5,YK;function Due(){if(YK)return J5;YK=1;var t=yv(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return J5=e,J5}var X5,GK;function kVe(){if(GK)return X5;GK=1;var t=DVe(),e=Due(),n=G3(),r=e?function(s,i){return e(s,"toString",{configurable:!0,enumerable:!1,value:t(i),writable:!0})}:n;return X5=r,X5}var Q5,KK;function TVe(){if(KK)return Q5;KK=1;var t=800,e=16,n=Date.now;function r(s){var i=0,o=0;return function(){var a=n(),l=e-(a-o);if(o=a,l>0){if(++i>=t)return arguments[0]}else i=0;return s.apply(void 0,arguments)}}return Q5=r,Q5}var e6,ZK;function kue(){if(ZK)return e6;ZK=1;var t=kVe(),e=TVe(),n=e(t);return e6=n,e6}var t6,JK;function Tue(){if(JK)return t6;JK=1;var t=G3(),e=Mue(),n=kue();function r(s,i){return n(e(s,i,t),s+"")}return t6=r,t6}var n6,XK;function AVe(){if(XK)return n6;XK=1;var t=Eue(),e=EVe(),n=Tue(),r=j3(),s=n(function(i,o){if(i==null)return[];var a=o.length;return a>1&&r(i,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return n6=s,n6}var _Ve=AVe();const OVe=Mr(_Ve);function y1(t,e){var n=I3(t);return n?n.innerWidth:e?t.clientWidth:Ml(t).width}const Ctt=Object.freeze(Object.defineProperty({__proto__:null,default:y1},Symbol.toStringTag,{value:"Module"}));function Aue(t){return Lce(t)||Yce(t)||Y7(t)||Pce()}var r6,QK;function _ue(){if(QK)return r6;QK=1;function t(e,n){for(var r=-1,s=e==null?0:e.length;++r<s&&n(e[r],r,e)!==!1;);return e}return r6=t,r6}var s6,eZ;function Rz(){if(eZ)return s6;eZ=1;var t=Due();function e(n,r,s){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:s,writable:!0}):n[r]=s}return s6=e,s6}var i6,tZ;function Oue(){if(tZ)return i6;tZ=1;var t=Rz(),e=Zw(),n=Object.prototype,r=n.hasOwnProperty;function s(i,o,a){var l=i[o];(!(r.call(i,o)&&e(l,a))||a===void 0&&!(o in i))&&t(i,o,a)}return i6=s,i6}var o6,nZ;function aC(){if(nZ)return o6;nZ=1;var t=Oue(),e=Rz();function n(r,s,i,o){var a=!i;i||(i={});for(var l=-1,c=s.length;++l<c;){var d=s[l],f=o?o(i[d],r[d],d,i,r):void 0;f===void 0&&(f=r[d]),a?e(i,d,f):t(i,d,f)}return i}return o6=n,o6}var a6,rZ;function RVe(){if(rZ)return a6;rZ=1;var t=aC(),e=sC();function n(r,s){return r&&t(s,e(s),r)}return a6=n,a6}var l6,sZ;function NVe(){if(sZ)return l6;sZ=1;function t(e){var n=[];if(e!=null)for(var r in Object(e))n.push(r);return n}return l6=t,l6}var c6,iZ;function jVe(){if(iZ)return c6;iZ=1;var t=Wu(),e=Dz(),n=NVe(),r=Object.prototype,s=r.hasOwnProperty;function i(o){if(!t(o))return n(o);var a=e(o),l=[];for(var c in o)c=="constructor"&&(a||!s.call(o,c))||l.push(c);return l}return c6=i,c6}var u6,oZ;function Z3(){if(oZ)return u6;oZ=1;var t=vue(),e=jVe(),n=Jw();function r(s){return n(s)?t(s,!0):e(s)}return u6=r,u6}var d6,aZ;function IVe(){if(aZ)return d6;aZ=1;var t=aC(),e=Z3();function n(r,s){return r&&t(s,e(s),r)}return d6=n,d6}var Ix={exports:{}};Ix.exports;var lZ;function LVe(){return lZ||(lZ=1,(function(t,e){var n=Oc(),r=e&&!e.nodeType&&e,s=r&&!0&&t&&!t.nodeType&&t,i=s&&s.exports===r,o=i?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;function l(c,d){if(d)return c.slice();var f=c.length,p=a?a(f):new c.constructor(f);return c.copy(p),p}t.exports=l})(Ix,Ix.exports)),Ix.exports}var f6,cZ;function PVe(){if(cZ)return f6;cZ=1;function t(e,n){var r=-1,s=e.length;for(n||(n=Array(s));++r<s;)n[r]=e[r];return n}return f6=t,f6}var p6,uZ;function $Ve(){if(uZ)return p6;uZ=1;var t=aC(),e=wz();function n(r,s){return t(r,e(r),s)}return p6=n,p6}var h6,dZ;function J3(){if(dZ)return h6;dZ=1;var t=yue(),e=t(Object.getPrototypeOf,Object);return h6=e,h6}var m6,fZ;function Rue(){if(fZ)return m6;fZ=1;var t=Sz(),e=J3(),n=wz(),r=gue(),s=Object.getOwnPropertySymbols,i=s?function(o){for(var a=[];o;)t(a,n(o)),o=e(o);return a}:r;return m6=i,m6}var g6,pZ;function zVe(){if(pZ)return g6;pZ=1;var t=aC(),e=Rue();function n(r,s){return t(r,e(r),s)}return g6=n,g6}var v6,hZ;function Nue(){if(hZ)return v6;hZ=1;var t=mue(),e=Rue(),n=Z3();function r(s){return t(s,n,e)}return v6=r,v6}var y6,mZ;function FVe(){if(mZ)return y6;mZ=1;var t=Object.prototype,e=t.hasOwnProperty;function n(r){var s=r.length,i=new r.constructor(s);return s&&typeof r[0]=="string"&&e.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return y6=n,y6}var b6,gZ;function Nz(){if(gZ)return b6;gZ=1;var t=hue();function e(n){var r=new n.constructor(n.byteLength);return new t(r).set(new t(n)),r}return b6=e,b6}var x6,vZ;function BVe(){if(vZ)return x6;vZ=1;var t=Nz();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.byteLength)}return x6=e,x6}var S6,yZ;function HVe(){if(yZ)return S6;yZ=1;var t=/\w*$/;function e(n){var r=new n.constructor(n.source,t.exec(n));return r.lastIndex=n.lastIndex,r}return S6=e,S6}var w6,bZ;function qVe(){if(bZ)return w6;bZ=1;var t=Z1(),e=t?t.prototype:void 0,n=e?e.valueOf:void 0;function r(s){return n?Object(n.call(s)):{}}return w6=r,w6}var C6,xZ;function UVe(){if(xZ)return C6;xZ=1;var t=Nz();function e(n,r){var s=r?t(n.buffer):n.buffer;return new n.constructor(s,n.byteOffset,n.length)}return C6=e,C6}var E6,SZ;function VVe(){if(SZ)return E6;SZ=1;var t=Nz(),e=BVe(),n=HVe(),r=qVe(),s=UVe(),i="[object Boolean]",o="[object Date]",a="[object Map]",l="[object Number]",c="[object RegExp]",d="[object Set]",f="[object String]",p="[object Symbol]",m="[object ArrayBuffer]",v="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",w="[object Int8Array]",C="[object Int16Array]",E="[object Int32Array]",D="[object Uint8Array]",T="[object Uint8ClampedArray]",A="[object Uint16Array]",_="[object Uint32Array]";function R(N,I,$){var L=N.constructor;switch(I){case m:return t(N);case i:case o:return new L(+N);case v:return e(N,$);case y:case x:case w:case C:case E:case D:case T:case A:case _:return s(N,$);case a:return new L;case l:case f:return new L(N);case c:return n(N);case d:return new L;case p:return r(N)}}return E6=R,E6}var M6,wZ;function jue(){if(wZ)return M6;wZ=1;var t=Wu(),e=Object.create,n=(function(){function r(){}return function(s){if(!t(s))return{};if(e)return e(s);r.prototype=s;var i=new r;return r.prototype=void 0,i}})();return M6=n,M6}var D6,CZ;function WVe(){if(CZ)return D6;CZ=1;var t=jue(),e=J3(),n=Dz();function r(s){return typeof s.constructor=="function"&&!n(s)?t(e(s)):{}}return D6=r,D6}var k6,EZ;function YVe(){if(EZ)return k6;EZ=1;var t=V3(),e=Nh(),n="[object Map]";function r(s){return e(s)&&t(s)==n}return k6=r,k6}var T6,MZ;function GVe(){if(MZ)return T6;MZ=1;var t=YVe(),e=U3(),n=Ez(),r=n&&n.isMap,s=r?e(r):t;return T6=s,T6}var A6,DZ;function KVe(){if(DZ)return A6;DZ=1;var t=V3(),e=Nh(),n="[object Set]";function r(s){return e(s)&&t(s)==n}return A6=r,A6}var _6,kZ;function ZVe(){if(kZ)return _6;kZ=1;var t=KVe(),e=U3(),n=Ez(),r=n&&n.isSet,s=r?e(r):t;return _6=s,_6}var O6,TZ;function JVe(){if(TZ)return O6;TZ=1;var t=xz(),e=_ue(),n=Oue(),r=RVe(),s=IVe(),i=LVe(),o=PVe(),a=$Ve(),l=zVe(),c=bue(),d=Nue(),f=V3(),p=FVe(),m=VVe(),v=WVe(),y=Ll(),x=q3(),w=GVe(),C=Wu(),E=ZVe(),D=sC(),T=Z3(),A=1,_=2,R=4,N="[object Arguments]",I="[object Array]",$="[object Boolean]",L="[object Date]",z="[object Error]",F="[object Function]",q="[object GeneratorFunction]",H="[object Map]",B="[object Number]",V="[object Object]",Y="[object RegExp]",G="[object Set]",W="[object String]",Z="[object Symbol]",Q="[object WeakMap]",X="[object ArrayBuffer]",re="[object DataView]",ne="[object Float32Array]",ee="[object Float64Array]",oe="[object Int8Array]",ce="[object Int16Array]",ue="[object Int32Array]",pe="[object Uint8Array]",de="[object Uint8ClampedArray]",me="[object Uint16Array]",Se="[object Uint32Array]",De={};De[N]=De[I]=De[X]=De[re]=De[$]=De[L]=De[ne]=De[ee]=De[oe]=De[ce]=De[ue]=De[H]=De[B]=De[V]=De[Y]=De[G]=De[W]=De[Z]=De[pe]=De[de]=De[me]=De[Se]=!0,De[z]=De[F]=De[Q]=!1;function Ae(fe,Te,Ne,Ue,rt,ot){var Je,je=Te&A,We=Te&_,Le=Te&R;if(Ne&&(Je=rt?Ne(fe,Ue,rt,ot):Ne(fe)),Je!==void 0)return Je;if(!C(fe))return fe;var _e=y(fe);if(_e){if(Je=p(fe),!je)return o(fe,Je)}else{var Be=f(fe),ut=Be==F||Be==q;if(x(fe))return i(fe,je);if(Be==V||Be==N||ut&&!rt){if(Je=We||ut?{}:v(fe),!je)return We?l(fe,s(Je,fe)):a(fe,r(Je,fe))}else{if(!De[Be])return rt?fe:{};Je=m(fe,Be,je)}}ot||(ot=new t);var lt=ot.get(fe);if(lt)return lt;ot.set(fe,Je),E(fe)?fe.forEach(function(Ot){Je.add(Ae(Ot,Te,Ne,Ot,fe,ot))}):w(fe)&&fe.forEach(function(Ot,Pt){Je.set(Pt,Ae(Ot,Te,Ne,Pt,fe,ot))});var At=Le?We?d:c:We?T:D,jt=_e?void 0:At(fe);return e(jt||fe,function(Ot,Pt){jt&&(Pt=Ot,Ot=fe[Pt]),n(Je,Pt,Ae(Ot,Te,Ne,Pt,fe,ot))}),Je}return O6=Ae,O6}var R6,AZ;function XVe(){if(AZ)return R6;AZ=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return R6=t,R6}var N6,_Z;function QVe(){if(_Z)return N6;_Z=1;var t=Y3(),e=Gce();function n(r,s){return s.length<2?r:t(r,e(s,0,-1))}return N6=n,N6}var j6,OZ;function eWe(){if(OZ)return j6;OZ=1;var t=W3(),e=XVe(),n=QVe(),r=oC();function s(i,o){return o=t(o,i),i=n(i,o),i==null||delete i[r(e(o))]}return j6=s,j6}var I6,RZ;function tWe(){if(RZ)return I6;RZ=1;var t=J1(),e=J3(),n=Nh(),r="[object Object]",s=Function.prototype,i=Object.prototype,o=s.toString,a=i.hasOwnProperty,l=o.call(Object);function c(d){if(!n(d)||t(d)!=r)return!1;var f=e(d);if(f===null)return!0;var p=a.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==l}return I6=c,I6}var L6,NZ;function nWe(){if(NZ)return L6;NZ=1;var t=tWe();function e(n){return t(n)?void 0:n}return L6=e,L6}var P6,jZ;function rWe(){if(jZ)return P6;jZ=1;var t=Eue();function e(n){var r=n==null?0:n.length;return r?t(n,1):[]}return P6=e,P6}var $6,IZ;function sWe(){if(IZ)return $6;IZ=1;var t=rWe(),e=Mue(),n=kue();function r(s){return n(e(s,void 0,t),s+"")}return $6=r,$6}var z6,LZ;function iWe(){if(LZ)return z6;LZ=1;var t=Az(),e=JVe(),n=eWe(),r=W3(),s=aC(),i=nWe(),o=sWe(),a=Nue(),l=1,c=2,d=4,f=o(function(p,m){var v={};if(p==null)return v;var y=!1;m=t(m,function(w){return w=r(w,p),y||(y=w.length>1),w}),s(p,a(p),v),y&&(v=e(v,l|c|d,i));for(var x=m.length;x--;)n(v,m[x]);return v});return z6=f,z6}var oWe=iWe();const aWe=Mr(oWe);var F6,PZ;function lWe(){if(PZ)return F6;PZ=1;var t=Tue(),e=Zw(),n=j3(),r=Z3(),s=Object.prototype,i=s.hasOwnProperty,o=t(function(a,l){a=Object(a);var c=-1,d=l.length,f=d>2?l[2]:void 0;for(f&&n(l[0],l[1],f)&&(d=1);++c<d;)for(var p=l[c],m=r(p),v=-1,y=m.length;++v<y;){var x=m[v],w=a[x];(w===void 0||e(w,s[x])&&!i.call(a,x))&&(a[x]=p[x])}return a});return F6=o,F6}var cWe=lWe();const uWe=Mr(cWe);var B6,$Z;function dWe(){if($Z)return B6;$Z=1;var t=_ue(),e=jue(),n=Oz(),r=K3(),s=J3(),i=Ll(),o=q3(),a=ez(),l=Wu(),c=Mz();function d(f,p,m){var v=i(f),y=v||o(f)||c(f);if(p=r(p,4),m==null){var x=f&&f.constructor;y?m=v?new x:[]:l(f)?m=a(x)?e(s(f)):{}:m={}}return(y?t:n)(f,function(w,C,E){return p(m,w,C,E)}),m}return B6=d,B6}var fWe=dWe();const pWe=Mr(fWe);var H6,zZ;function hWe(){if(zZ)return H6;zZ=1;var t=Rz(),e=Oz(),n=K3();function r(s,i){var o={};return i=n(i,3),e(s,function(a,l,c){t(o,l,i(a,l,c))}),o}return H6=r,H6}var mWe=hWe();const gWe=Mr(mWe);var pk={exports:{}},vWe=pk.exports,FZ;function yWe(){return FZ||(FZ=1,(function(t,e){(function(n,r){t.exports=r()})(vWe,(function(){return function(n,r,s){r.prototype.isBetween=function(i,o,a,l){var c=s(i),d=s(o),f=(l=l||"()")[0]==="(",p=l[1]===")";return(f?this.isAfter(c,a):!this.isBefore(c,a))&&(p?this.isBefore(d,a):!this.isAfter(d,a))||(f?this.isBefore(c,a):!this.isAfter(c,a))&&(p?this.isAfter(d,a):!this.isBefore(d,a))}}}))})(pk)),pk.exports}yWe();var hk={exports:{}},bWe=hk.exports,BZ;function xWe(){return BZ||(BZ=1,(function(t,e){(function(n,r){t.exports=r()})(bWe,(function(){return function(n,r){r.prototype.isSameOrAfter=function(s,i){return this.isSame(s,i)||this.isAfter(s,i)}}}))})(hk)),hk.exports}xWe();var mk={exports:{}},SWe=mk.exports,HZ;function wWe(){return HZ||(HZ=1,(function(t,e){(function(n,r){t.exports=r()})(SWe,(function(){return function(n,r){r.prototype.isSameOrBefore=function(s,i){return this.isSame(s,i)||this.isBefore(s,i)}}}))})(mk)),mk.exports}wWe();var gk={exports:{}},CWe=gk.exports,qZ;function EWe(){return qZ||(qZ=1,(function(t,e){(function(n,r){t.exports=r()})(CWe,(function(){return function(n,r,s){var i=r.prototype,o=function(f){return f&&(f.indexOf?f:f.s)},a=function(f,p,m,v,y){var x=f.name?f:f.$locale(),w=o(x[p]),C=o(x[m]),E=w||C.map((function(T){return T.slice(0,v)}));if(!y)return E;var D=x.weekStart;return E.map((function(T,A){return E[(A+(D||0))%7]}))},l=function(){return s.Ls[s.locale()]},c=function(f,p){return f.formats[p]||(function(m){return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(v,y,x){return y||x.slice(1)}))})(f.formats[p.toUpperCase()])},d=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):a(f,"months")},monthsShort:function(p){return p?p.format("MMM"):a(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):a(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):a(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):a(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};i.localeData=function(){return d.bind(this)()},s.localeData=function(){var f=l();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},s.months=function(){return a(l(),"months")},s.monthsShort=function(){return a(l(),"monthsShort","months",3)},s.weekdays=function(f){return a(l(),"weekdays",null,null,f)},s.weekdaysShort=function(f){return a(l(),"weekdaysShort","weekdays",3,f)},s.weekdaysMin=function(f){return a(l(),"weekdaysMin","weekdays",2,f)}}}))})(gk)),gk.exports}EWe();var vk={exports:{}},MWe=vk.exports,UZ;function DWe(){return UZ||(UZ=1,(function(t,e){(function(n,r){t.exports=r()})(MWe,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,s,i){var o=s.prototype,a=o.format;i.en.formats=n,o.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,d=(function(f,p){return f.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,v,y){var x=y&&y.toUpperCase();return v||p[y]||n[y]||p[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(w,C,E){return C||E.slice(1)}))}))})(l,c===void 0?{}:c);return a.call(this,d)}}}))})(vk)),vk.exports}DWe();var yk={exports:{}},kWe=yk.exports,VZ;function TWe(){return VZ||(VZ=1,(function(t,e){(function(n,r){t.exports=r()})(kWe,(function(){return function(n,r,s){var i=function(o,a){if(!a||!a.length||!a[0]||a.length===1&&!a[0].length)return null;var l;a.length===1&&a[0].length>0&&(a=a[0]),l=a[0];for(var c=1;c<a.length;c+=1)a[c].isValid()&&!a[c][o](l)||(l=a[c]);return l};s.max=function(){var o=[].slice.call(arguments,0);return i("isAfter",o)},s.min=function(){var o=[].slice.call(arguments,0);return i("isBefore",o)}}}))})(yk)),yk.exports}TWe();function kd(t){return t.children}var mi={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},ha={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"},WZ=Object.keys(ha).map(function(t){return ha[t]});tt.oneOfType([tt.string,tt.func]);tt.any;tt.func;tt.oneOfType([tt.arrayOf(tt.oneOf(WZ)),tt.objectOf(function(t,e){var n=WZ.indexOf(e)!==-1&&typeof t[e]=="boolean";if(n)return null;for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i<r;i++)s[i-2]=arguments[i];return tt.elementType.apply(tt,[t,e].concat(s))})]);tt.oneOfType([tt.oneOf(["overlap","no-overlap"]),tt.func]);function ns(t,e){t&&t.apply(null,[].concat(e))}var YZ={seconds:1e3,minutes:1e3*60,hours:1e3*60*60,day:1e3*60*60*24};function Iue(t,e){var n=Ea(t,"month");return Ea(n,"week",e.startOfWeek())}function Lue(t,e){var n=xP(t,"month");return xP(n,"week",e.startOfWeek())}function AWe(t,e){for(var n=Iue(t,e),r=Lue(t,e),s=[];Kw(n,r,"day");)s.push(n),n=fh(n,1,"day");return s}function kP(t,e){var n=Ea(t,e);return R3(n,t)?n:fh(n,1,e)}function _We(t,e){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",r=t,s=[];Kw(r,e,n);)s.push(r),r=fh(r,1,n);return s}function OWe(t,e){return e==null&&t==null?null:(e==null&&(e=new Date),t==null&&(t=new Date),t=Ea(t,"day"),t=vA(t,vA(e)),t=GS(t,GS(e)),t=gA(t,gA(e)),mA(t,mA(e)))}function GZ(t){return vA(t)===0&&GS(t)===0&&gA(t)===0&&mA(t)===0}function JS(t,e,n){return!n||n==="milliseconds"?Math.abs(+t-+e):Math.round(Math.abs(+Ea(t,n)/YZ[n]-+Ea(e,n)/YZ[n]))}var RWe=tt.oneOfType([tt.string,tt.func]);function NWe(t,e,n,r,s){var i=typeof r=="function"?r(n,s,t):e.call(t,n,r,s);return WS(i==null||typeof i=="string","`localizer format(..)` must return a string, null, or undefined"),i}function jWe(t,e,n){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,e+n,0,0)}function jz(t,e){return t.getTimezoneOffset()-e.getTimezoneOffset()}function IWe(t,e){return JS(t,e,"minutes")+jz(t,e)}function LWe(t){var e=Ea(t,"day");return JS(e,t,"minutes")+jz(e,t)}function PWe(t,e){return Wce(t,e,"day")}function $We(t,e,n){var r=R3(t,e,"minutes");return r?N3(e,n,"minutes"):Q7(e,n,"minutes")}function zWe(t){var e=t.evtA,n=e.start,r=e.end,s=e.allDay,i=t.evtB,o=i.start,a=i.end,l=i.allDay,c=+Ea(n,"day")-+Ea(o,"day"),d=JS(n,kP(r,"day"),"day"),f=JS(o,kP(a,"day"),"day");return c||Math.max(f,1)-Math.max(d,1)||!!l-!!s||+n-+o||+r-+a}function FWe(t){var e=t.event,n=e.start,r=e.end,s=t.range,i=s.start,o=s.end,a=Ea(n,"day"),l=Kw(a,o,"day"),c=Vce(a,r,"minutes"),d=c?Q7(r,i,"minutes"):N3(r,i,"minutes");return l&&d}function BWe(t,e){return R3(t,e,"day")}function HWe(t,e){return GZ(t)&&GZ(e)}var qWe=wi(function t(e){var n=this;Si(this,t),WS(typeof e.format=="function","date localizer `format(..)` must be a function"),WS(typeof e.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=e.propType||RWe,this.formats=e.formats,this.format=function(){for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return NWe.apply(void 0,[n,e.format].concat(s))},this.startOfWeek=e.firstOfWeek,this.merge=e.merge||OWe,this.inRange=e.inRange||KBe,this.lt=e.lt||Wce,this.lte=e.lte||Kw,this.gt=e.gt||Q7,this.gte=e.gte||N3,this.eq=e.eq||R3,this.neq=e.neq||Vce,this.startOf=e.startOf||Ea,this.endOf=e.endOf||xP,this.add=e.add||fh,this.range=e.range||_We,this.diff=e.diff||JS,this.ceil=e.ceil||kP,this.min=e.min||YBe,this.max=e.max||GBe,this.minutes=e.minutes||GS,this.firstVisibleDay=e.firstVisibleDay||Iue,this.lastVisibleDay=e.lastVisibleDay||Lue,this.visibleDays=e.visibleDays||AWe,this.getSlotDate=e.getSlotDate||jWe,this.getTimezoneOffset=e.getTimezoneOffset||function(r){return r.getTimezoneOffset()},this.getDstOffset=e.getDstOffset||jz,this.getTotalMin=e.getTotalMin||IWe,this.getMinutesFromMidnight=e.getMinutesFromMidnight||LWe,this.continuesPrior=e.continuesPrior||PWe,this.continuesAfter=e.continuesAfter||$We,this.sortEvents=e.sortEvents||zWe,this.inEventRange=e.inEventRange||FWe,this.isSameDate=e.isSameDate||BWe,this.startAndEndAreDateOnly=e.startAndEndAreDateOnly||HWe,this.segmentOffset=e.browserTZOffset?e.browserTZOffset():0});function UWe(t,e,n,r){var s=hr(hr({},t.formats),n);return hr(hr({},t),{},{messages:r,startOfWeek:function(){return t.startOfWeek(e)},format:function(o,a){return t.format(o,s[a]||a,e)}})}var VWe={date:"Date",time:"Time",event:"Event",allDay:"All Day",week:"Week",work_week:"Work Week",day:"Day",month:"Month",previous:"Back",next:"Next",yesterday:"Yesterday",tomorrow:"Tomorrow",today:"Today",agenda:"Agenda",noEventsInRange:"There are no events in this range.",showMore:function(e){return"+".concat(e," more")}};function WWe(t){return hr(hr({},VWe),t)}function YWe(t){var e=t.ref,n=t.callback;O.useEffect(function(){var r=function(i){e.current&&!e.current.contains(i.target)&&n()};return document.addEventListener("mousedown",r),function(){document.removeEventListener("mousedown",r)}},[e,n])}var GWe=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],Pue=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.style,i=r.className,o=r.event,a=r.selected,l=r.isAllDay,c=r.onSelect,d=r.onDoubleClick,f=r.onKeyPress,p=r.localizer,m=r.continuesPrior,v=r.continuesAfter,y=r.accessors,x=r.getters,w=r.children,C=r.components,E=C.event,D=C.eventWrapper,T=r.slotStart,A=r.slotEnd,_=zu(r,GWe);delete _.resizable;var R=y.title(o),N=y.tooltip(o),I=y.end(o),$=y.start(o),L=y.allDay(o),z=l||L||p.diff($,p.ceil(I,"day"),"day")>1,F=x.eventProp(o,$,I,a),q=xe.createElement("div",{className:"rbc-event-content",title:N||void 0},E?xe.createElement(E,{event:o,continuesPrior:m,continuesAfter:v,title:R,isAllDay:L,localizer:p,slotStart:T,slotEnd:A}):R);return xe.createElement(D,Object.assign({},this.props,{type:"date"}),xe.createElement("div",Object.assign({},_,{tabIndex:0,style:hr(hr({},F.style),s),className:Ls("rbc-event",i,F.className,{"rbc-selected":a,"rbc-event-allday":z,"rbc-event-continues-prior":m,"rbc-event-continues-after":v}),onClick:function(B){return c&&c(o,B)},onDoubleClick:function(B){return d&&d(o,B)},onKeyPress:function(B){return f&&f(o,B)}}),typeof w=="function"?w(q):q))}}]),e})(xe.Component);function X3(t,e){return!t||e==null?!1:BUe(t,e)}function $ue(t,e){var n=t.right-t.left,r=n/e;return r}function zue(t,e,n,r){var s=$ue(t,r);return n?r-1-Math.floor((e-t.left)/s):Math.floor((e-t.left)/s)}function KWe(t,e){var n=e.x,r=e.y;return r>=t.top&&r<=t.bottom&&n>=t.left&&n<=t.right}function ZWe(t,e,n,r,s){var i=-1,o=-1,a=r-1,l=$ue(e,r),c=zue(e,n.x,s,r),d=e.top<n.y&&e.bottom>n.y,f=e.top<t.y&&e.bottom>t.y,p=t.y>e.bottom,m=e.top>t.y,v=n.top<e.top&&n.bottom>e.bottom;return v&&(i=0,o=a),d&&(m?(i=0,o=c):p&&(i=c,o=a)),f&&(i=o=s?a-Math.floor((t.x-e.left)/l):Math.floor((t.x-e.left)/l),d?c<i?i=c:o=c:t.y<n.y?o=a:i=0),{startIdx:i,endIdx:o}}function JWe(t){var e=t.target,n=t.offset,r=t.container,s=t.box,i=Ml(e),o=i.top,a=i.left,l=i.width,c=i.height,d=Ml(r),f=d.top,p=d.left,m=d.width,v=d.height,y=Ml(s),x=y.width,w=y.height,C=f+v,E=p+m,D=o+w,T=a+x,A=n.x,_=n.y,R=D>C?o-w-_:o+_+c,N=T>E?a+A-x+l:a+A;return{topOffset:R,leftOffset:N}}function XWe(t){var e=t.containerRef,n=t.accessors,r=t.getters,s=t.selected,i=t.components,o=t.localizer,a=t.position,l=t.show,c=t.events,d=t.slotStart,f=t.slotEnd,p=t.onSelect,m=t.onDoubleClick,v=t.onKeyPress,y=t.handleDragStart,x=t.popperRef,w=t.target,C=t.offset;YWe({ref:x,callback:l}),O.useLayoutEffect(function(){var T=JWe({target:w,offset:C,container:e.current,box:x.current}),A=T.topOffset,_=T.leftOffset;x.current.style.top="".concat(A,"px"),x.current.style.left="".concat(_,"px")},[C.x,C.y,w]);var E=a.width,D={minWidth:E+E/2};return xe.createElement("div",{style:D,className:"rbc-overlay",ref:x},xe.createElement("div",{className:"rbc-overlay-header"},o.format(d,"dayHeaderFormat")),c.map(function(T,A){return xe.createElement(Pue,{key:A,type:"popup",localizer:o,event:T,getters:r,onSelect:p,accessors:n,components:i,onDoubleClick:m,onKeyPress:v,continuesPrior:o.lt(n.end(T),d,"day"),continuesAfter:o.gte(n.start(T),f,"day"),slotStart:d,slotEnd:f,selected:X3(T,s),draggable:!0,onDragStart:function(){return y(T)},onDragEnd:function(){return l()}})}))}var Fue=xe.forwardRef(function(t,e){return xe.createElement(XWe,Object.assign({},t,{popperRef:e}))});Fue.propTypes={accessors:tt.object.isRequired,getters:tt.object.isRequired,selected:tt.object,components:tt.object.isRequired,localizer:tt.object.isRequired,position:tt.object.isRequired,show:tt.func.isRequired,events:tt.array.isRequired,slotStart:tt.instanceOf(Date).isRequired,slotEnd:tt.instanceOf(Date),onSelect:tt.func,onDoubleClick:tt.func,onKeyPress:tt.func,handleDragStart:tt.func,style:tt.object,offset:tt.shape({x:tt.number,y:tt.number})};function QWe(t){var e=t.containerRef,n=t.popupOffset,r=n===void 0?5:n,s=t.overlay,i=t.accessors,o=t.localizer,a=t.components,l=t.getters,c=t.selected,d=t.handleSelectEvent,f=t.handleDoubleClickEvent,p=t.handleKeyPressEvent,m=t.handleDragStart,v=t.onHide,y=t.overlayDisplay,x=O.useRef(null);if(!s.position)return null;var w=r;isNaN(r)||(w={x:r,y:r});var C=s.position,E=s.events,D=s.date,T=s.end;return xe.createElement(vz,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:v,target:s.target},function(A){var _=A.props;return xe.createElement(Fue,Object.assign({},_,{containerRef:e,ref:x,target:s.target,offset:w,accessors:i,getters:l,selected:c,components:a,localizer:o,position:C,show:y,events:E,slotStart:D,slotEnd:T,onSelect:d,onDoubleClick:f,onKeyPress:p,handleDragStart:m}))})}var Iz=xe.forwardRef(function(t,e){return xe.createElement(QWe,Object.assign({},t,{containerRef:e}))});Iz.propTypes={popupOffset:tt.oneOfType([tt.number,tt.shape({x:tt.number,y:tt.number})]),overlay:tt.shape({position:tt.object,events:tt.array,date:tt.instanceOf(Date),end:tt.instanceOf(Date)}),accessors:tt.object.isRequired,localizer:tt.object.isRequired,components:tt.object.isRequired,getters:tt.object.isRequired,selected:tt.object,handleSelectEvent:tt.func,handleDoubleClickEvent:tt.func,handleKeyPressEvent:tt.func,handleDragStart:tt.func,onHide:tt.func,overlayDisplay:tt.func};function ro(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return Cu(n,t,e,{passive:!1})}function eYe(t,e,n){return!t||Kd(t,document.elementFromPoint(e,n))}function tYe(t,e){var n=e.clientX,r=e.clientY,s=document.elementFromPoint(n,r);return iC(s,".rbc-event",t)}function nYe(t,e){var n=e.clientX,r=e.clientY,s=document.elementFromPoint(n,r);return iC(s,".rbc-show-more",t)}function bA(t,e){return!!tYe(t,e)}function rYe(t,e){return!!nYe(t,e)}function by(t){var e=t;return t.touches&&t.touches.length&&(e=t.touches[0]),{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var KZ=5,sYe=250,Bue=(function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,s=r===void 0?!1:r,i=n.longPressThreshold,o=i===void 0?250:i,a=n.validContainers,l=a===void 0?[]:a;Si(this,t),this.isDetached=!1,this.container=e,this.globalMouse=!e||s,this.longPressThreshold=o,this.validContainers=l,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=ro("touchmove",function(){},window),this._removeKeyDownListener=ro("keydown",this._keyListener),this._removeKeyUpListener=ro("keyup",this._keyListener),this._removeDropFromOutsideListener=ro("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=ro("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return wi(t,[{key:"on",value:function(n,r){var s=this._listeners[n]||(this._listeners[n]=[]);return s.push(r),{remove:function(){var o=s.indexOf(r);o!==-1&&s.splice(o,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),i=1;i<r;i++)s[i-1]=arguments[i];var o,a=this._listeners[n]||[];return a.forEach(function(l){o===void 0&&(o=l.apply(void 0,s))}),o}},{key:"teardown",value:function(){this.isDetached=!0,this._listeners=Object.create(null),this._removeTouchMoveWindowListener&&this._removeTouchMoveWindowListener(),this._removeInitialEventListener&&this._removeInitialEventListener(),this._removeEndListener&&this._removeEndListener(),this._onEscListener&&this._onEscListener(),this._removeMoveListener&&this._removeMoveListener(),this._removeKeyUpListener&&this._removeKeyUpListener(),this._removeKeyDownListener&&this._removeKeyDownListener(),this._removeDropFromOutsideListener&&this._removeDropFromOutsideListener(),this._removeDragOverFromOutsideListener&&this._removeDragOverFromOutsideListener()}},{key:"isSelected",value:function(n){var r=this._selectRect;return!r||!this.selecting?!1:ZZ(r,tv(n))}},{key:"filter",value:function(n){var r=this._selectRect;return!r||!this.selecting?[]:n.filter(this.isSelected,this)}},{key:"_addLongPressListener",value:function(n,r){var s=this,i=null,o=null,a=null,l=function(p){i=setTimeout(function(){d(),n(p)},s.longPressThreshold),o=ro("touchmove",function(){return d()}),a=ro("touchend",function(){return d()})},c=ro("touchstart",l),d=function(){i&&clearTimeout(i),o&&o(),a&&a(),i=null,o=null,a=null};return r&&l(r),function(){d(),c()}}},{key:"_addInitialEventListener",value:function(){var n=this,r=ro("mousedown",function(i){n._removeInitialEventListener(),n._handleInitialEvent(i),n._removeInitialEventListener=ro("mousedown",n._handleInitialEvent)}),s=ro("touchstart",function(i){n._removeInitialEventListener(),n._removeInitialEventListener=n._addLongPressListener(n._handleInitialEvent,i)});this._removeInitialEventListener=function(){r(),s()}}},{key:"_dropFromOutsideListener",value:function(n){var r=by(n),s=r.pageX,i=r.pageY,o=r.clientX,a=r.clientY;this.emit("dropFromOutside",{x:s,y:i,clientX:o,clientY:a}),n.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(n){var r=by(n),s=r.pageX,i=r.pageY,o=r.clientX,a=r.clientY;this.emit("dragOverFromOutside",{x:s,y:i,clientX:o,clientY:a}),n.preventDefault()}},{key:"_handleInitialEvent",value:function(n){if(!this.isDetached){var r=by(n),s=r.clientX,i=r.clientY,o=r.pageX,a=r.pageY,l=this.container(),c,d;if(!(n.which===3||n.button===2||!eYe(l,s,i))){if(!this.globalMouse&&l&&!Kd(l,n.target)){var f=iYe(0),p=f.top,m=f.left,v=f.bottom,y=f.right;if(d=tv(l),c=ZZ({top:d.top-p,left:d.left-m,bottom:d.bottom+v,right:d.right+y},{top:a,left:o}),!c)return}var x=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(n.type),x:o,y:a,clientX:s,clientY:i});if(x!==!1)switch(n.type){case"mousedown":this._removeEndListener=ro("mouseup",this._handleTerminatingEvent),this._onEscListener=ro("keydown",this._handleTerminatingEvent),this._removeMoveListener=ro("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(n),this._removeEndListener=ro("touchend",this._handleTerminatingEvent),this._removeMoveListener=ro("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(n){var r=n.target,s=this.validContainers;return!s||!s.length||!r?!0:s.some(function(i){return!!r.closest(i)})}},{key:"_handleTerminatingEvent",value:function(n){var r=by(n),s=r.pageX,i=r.pageY;if(this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),!!this._initialEventData){var o=!this.container||Kd(this.container(),n.target),a=this._isWithinValidContainer(n),l=this._selectRect,c=this.isClick(s,i);return this._initialEventData=null,n.key==="Escape"||!a?this.emit("reset"):c&&o?this._handleClickEvent(n):c?this.emit("reset"):this.emit("select",l)}}},{key:"_handleClickEvent",value:function(n){var r=by(n),s=r.pageX,i=r.pageY,o=r.clientX,a=r.clientY,l=new Date().getTime();return this._lastClickData&&l-this._lastClickData.timestamp<sYe?(this._lastClickData=null,this.emit("doubleClick",{x:s,y:i,clientX:o,clientY:a})):(this._lastClickData={timestamp:l},this.emit("click",{x:s,y:i,clientX:o,clientY:a}))}},{key:"_handleMoveEvent",value:function(n){if(!(this._initialEventData===null||this.isDetached)){var r=this._initialEventData,s=r.x,i=r.y,o=by(n),a=o.pageX,l=o.pageY,c=Math.abs(s-a),d=Math.abs(i-l),f=Math.min(a,s),p=Math.min(l,i),m=this.selecting;this.isClick(a,l)&&!m&&!(c||d)||(this.selecting=!0,this._selectRect={top:p,left:f,x:a,y:l,right:f+c,bottom:p+d},m||this.emit("selectStart",this._initialEventData),this.isClick(a,l)||this.emit("selecting",this._selectRect),n.preventDefault())}}},{key:"_keyListener",value:function(n){this.ctrl=n.metaKey||n.ctrlKey}},{key:"isClick",value:function(n,r){var s=this._initialEventData,i=s.x,o=s.y,a=s.isTouch;return!a&&Math.abs(n-i)<=KZ&&Math.abs(r-o)<=KZ}}]),t})();function iYe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return Gd(t)!=="object"&&(t={top:t,left:t,right:t,bottom:t}),t}function ZZ(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=tv(t),s=r.top,i=r.left,o=r.right,a=o===void 0?i:o,l=r.bottom,c=l===void 0?s:l,d=tv(e),f=d.top,p=d.left,m=d.right,v=m===void 0?p:m,y=d.bottom,x=y===void 0?f:y;return!(c-n<f||s+n>x||a-n<p||i+n>v)}function tv(t){if(!t.getBoundingClientRect)return t;var e=t.getBoundingClientRect(),n=e.left+JZ("left"),r=e.top+JZ("top");return{top:r,left:n,right:(t.offsetWidth||0)+n,bottom:(t.offsetHeight||0)+r}}function JZ(t){if(t==="left")return window.pageXOffset||document.body.scrollLeft||0;if(t==="top")return window.pageYOffset||document.body.scrollTop||0}var oYe=(function(t){Wo(e,t);function e(n,r){var s;return Si(this,e),s=Vo(this,e,[n,r]),s.state={selecting:!1},s.containerRef=O.createRef(),s}return wi(e,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"componentDidUpdate",value:function(r){!r.selectable&&this.props.selectable&&this._selectable(),r.selectable&&!this.props.selectable&&this._teardownSelectable()}},{key:"render",value:function(){var r=this.props,s=r.range,i=r.getNow,o=r.getters,a=r.date,l=r.components.dateCellWrapper,c=r.localizer,d=this.state,f=d.selecting,p=d.startIdx,m=d.endIdx,v=i();return xe.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},s.map(function(y,x){var w=f&&x>=p&&x<=m,C=o.dayProp(y),E=C.className,D=C.style;return xe.createElement(l,{key:x,value:y,range:s},xe.createElement("div",{style:D,className:Ls("rbc-day-bg",E,w&&"rbc-selected-cell",c.isSameDate(y,v)&&"rbc-today",a&&c.neq(a,y,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,s=this.containerRef.current,i=this._selector=new Bue(this.props.container,{longPressThreshold:this.props.longPressThreshold}),o=function(l,c){if(!bA(s,l)&&!rYe(s,l)){var d=tv(s),f=r.props,p=f.range,m=f.rtl;if(KWe(d,l)){var v=zue(d,l.x,m,p.length);r._selectSlot({startIdx:v,endIdx:v,action:c,box:l})}}r._initial={},r.setState({selecting:!1})};i.on("selecting",function(a){var l=r.props,c=l.range,d=l.rtl,f=-1,p=-1;if(r.state.selecting||(ns(r.props.onSelectStart,[a]),r._initial={x:a.x,y:a.y}),i.isSelected(s)){var m=tv(s),v=ZWe(r._initial,m,a,c.length,d);f=v.startIdx,p=v.endIdx}r.setState({selecting:!0,startIdx:f,endIdx:p})}),i.on("beforeSelect",function(a){if(r.props.selectable==="ignoreEvents")return!bA(r.containerRef.current,a)}),i.on("click",function(a){return o(a,"click")}),i.on("doubleClick",function(a){return o(a,"doubleClick")}),i.on("select",function(a){r._selectSlot(hr(hr({},r.state),{},{action:"select",bounds:a})),r._initial={},r.setState({selecting:!1}),ns(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var s=r.endIdx,i=r.startIdx,o=r.action,a=r.bounds,l=r.box;s!==-1&&i!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:i,end:s,action:o,bounds:a,box:l,resourceId:this.props.resourceId})}}]),e})(xe.Component),xu={propTypes:{slotMetrics:tt.object.isRequired,selected:tt.object,isAllDay:tt.bool,accessors:tt.object.isRequired,localizer:tt.object.isRequired,components:tt.object.isRequired,getters:tt.object.isRequired,onSelect:tt.func,onDoubleClick:tt.func,onKeyPress:tt.func},defaultProps:{segments:[],selected:{}},renderEvent:function(e,n){var r=e.selected;e.isAllDay;var s=e.accessors,i=e.getters,o=e.onSelect,a=e.onDoubleClick,l=e.onKeyPress,c=e.localizer,d=e.slotMetrics,f=e.components,p=e.resizable,m=d.continuesPrior(n),v=d.continuesAfter(n);return xe.createElement(Pue,{event:n,getters:i,localizer:c,accessors:s,components:f,onSelect:o,onDoubleClick:a,onKeyPress:l,continuesPrior:m,continuesAfter:v,slotStart:d.first,slotEnd:d.last,selected:X3(n,r),resizable:p})},renderSpan:function(e,n,r){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",i=Math.abs(n||1)/e*100+"%";return xe.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:i,flexBasis:i,maxWidth:i}},s)}},Hue=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this,s=this.props,i=s.segments,o=s.slotMetrics.slots,a=s.className,l=1;return xe.createElement("div",{className:Ls(a,"rbc-row")},i.reduce(function(c,d,f){var p=d.event,m=d.left,v=d.right,y=d.span,x="_lvl_"+f,w=m-l,C=xu.renderEvent(r.props,p);return w&&c.push(xu.renderSpan(o,w,"".concat(x,"_gap"))),c.push(xu.renderSpan(o,y,x,C)),l=v+1,c},[]))}}]),e})(xe.Component);Hue.defaultProps=hr({},xu.defaultProps);function que(t){var e=t.dateRange,n=t.unit,r=n===void 0?"day":n,s=t.localizer;return{first:e[0],last:s.add(e[e.length-1],1,r)}}function aYe(t,e,n,r){var s=que({dateRange:e,localizer:r}),i=s.first,o=s.last,a=r.max(r.startOf(n.start(t),"day"),i),l=r.min(r.ceil(n.end(t),"day"),o),c=aVe(e,function(f){return r.isSameDate(f,a)}),d=r.diff(a,l,"day");return{event:t,span:d,left:c+1,right:Math.max(c+d,1)}}function TP(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,s,i=[],o=[];for(n=0;n<t.length;n++){for(s=t[n],r=0;r<i.length&&lYe(s,i[r]);r++);r>=e?o.push(s):(i[r]||(i[r]=[])).push(s)}for(n=0;n<i.length;n++)i[n].sort(function(a,l){return a.left-l.left});return{levels:i,extra:o}}function XS(t,e,n,r,s){var i={start:r.start(t),end:r.end(t)},o={start:e,end:n};return s.inEventRange({event:i,range:o})}function lYe(t,e){return e.some(function(n){return n.left<=t.right&&n.right>=t.left})}function Uue(t,e,n,r){var s={start:n.start(t),end:n.end(t),allDay:n.allDay(t)},i={start:n.start(e),end:n.end(e),allDay:n.allDay(e)};return r.sortEvents({evtA:s,evtB:i})}var Vue=function(e,n){return e.left<=n&&e.right>=n},XZ=function(e,n){return e.filter(function(r){return Vue(r,n)}).length},Wue=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){for(var r=this.props,s=r.segments,i=r.slotMetrics.slots,o=TP(s).levels[0],a=1,l=1,c=[];a<=i;){var d="_lvl_"+a,f=o.filter(function(C){return Vue(C,a)})[0]||{},p=f.event,m=f.left,v=f.right,y=f.span;if(!p){a++;continue}var x=Math.max(0,m-l);if(this.canRenderSlotEvent(m,y)){var w=xu.renderEvent(this.props,p);x&&c.push(xu.renderSpan(i,x,d+"_gap")),c.push(xu.renderSpan(i,y,d,w)),l=a=v+1}else x&&c.push(xu.renderSpan(i,x,d+"_gap")),c.push(xu.renderSpan(i,1,d,this.renderShowMore(s,a))),l=a=a+1}return xe.createElement("div",{className:"rbc-row"},c)}},{key:"canRenderSlotEvent",value:function(r,s){var i=this.props.segments;return fVe(r,r+s).every(function(o){var a=XZ(i,o);return a===1})}},{key:"renderShowMore",value:function(r,s){var i=this,o=this.props.localizer,a=XZ(r,s);return a?xe.createElement("button",{type:"button",key:"sm_"+s,className:Ls("rbc-button-link","rbc-show-more"),onClick:function(c){return i.showMore(s,c)}},o.messages.showMore(a)):!1}},{key:"showMore",value:function(r,s){s.preventDefault(),s.stopPropagation(),this.props.onShowMore(r,s.target)}}]),e})(xe.Component);Wue.defaultProps=hr({},xu.defaultProps);var cYe=function(e){var n=e.children;return xe.createElement("div",{className:"rbc-row-content-scroll-container"},n)},uYe=function(e,n){return e.left<=n&&e.right>=n},dYe=function(e,n){return e[0].range===n[0].range&&e[0].events===n[0].events&&e[0].maxRows===n[0].maxRows};function Yue(){return _z(function(t){for(var e=t.range,n=t.events,r=t.maxRows,s=t.minRows,i=t.accessors,o=t.localizer,a=t.maxRowsStatic,l=que({dateRange:e,localizer:o}),c=l.first,d=l.last,f=n.map(function(C){return aYe(C,e,i,o)}),p=TP(f,Math.max(r-1,1)),m=p.levels,v=p.extra,y=TP(f,Math.max(a-1,1)),x=y.extra,w=v.length>0?s-1:s;m.length<w;)m.push([]);return{first:c,last:d,extraStatic:x,levels:m,extra:v,range:e,slots:e.length,clone:function(E){var D=Yue();return D(hr(hr({},t),E))},getDateForSlot:function(E){return e[E]},getSlotForDate:function(E){return e.find(function(D){return o.isSameDate(D,E)})},getEventsForSlot:function(E){return f.filter(function(D){return uYe(D,E)}).map(function(D){return D.event})},continuesPrior:function(E){return o.continuesPrior(i.start(E),c)},continuesAfter:function(E){var D=i.start(E),T=i.end(E);return o.continuesAfter(D,T,d)}}},dYe)}var xA=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.handleSelectSlot=function(o){var a=n.props,l=a.range,c=a.onSelectSlot;c(l.slice(o.start,o.end+1),o)},n.handleShowMore=function(o,a){if(n.props.isAllDay)n.setState({showAllEvents:!n.state.showAllEvents});else{var l=n.props,c=l.range,d=l.onShowMore,f=n.slotMetrics(n.props),p=eC(n.containerRef.current,".rbc-row-bg")[0],m;p&&(m=p.children[o-1]);var v=f.getEventsForSlot(o);d(v,c[o-1],m,o,a)}},n.getContainer=function(){var o=n.props.container;return o?o():n.containerRef.current},n.renderHeadingCell=function(o,a){var l=n.props,c=l.renderHeader,d=l.getNow,f=l.localizer;return c({date:o,key:"header_".concat(a),className:Ls("rbc-date-cell",f.isSameDate(o,d())&&"rbc-now")})},n.renderDummy=function(){var o=n.props,a=o.className,l=o.range,c=o.renderHeader,d=o.showAllEvents;return xe.createElement("div",{className:a,ref:n.containerRef},xe.createElement("div",{className:Ls("rbc-row-content",d&&"rbc-row-content-scrollable")},c&&xe.createElement("div",{className:"rbc-row",ref:n.headingRowRef},l.map(n.renderHeadingCell)),xe.createElement("div",{className:"rbc-row",ref:n.eventRowRef},xe.createElement("div",{className:"rbc-row-segment"},xe.createElement("div",{className:"rbc-event"},xe.createElement("div",{className:"rbc-event-content"}," "))))))},n.containerRef=O.createRef(),n.headingRowRef=O.createRef(),n.eventRowRef=O.createRef(),n.state={showAllEvents:!1},n.slotMetrics=Yue(),n.eventHeight=0,n}return wi(e,[{key:"getRowLimit",value:function(){var r,s=this.eventRowRef.current?eh(this.eventRowRef.current):this.eventHeight;this.eventHeight=s;var i=(r=this.headingRowRef)!==null&&r!==void 0&&r.current?eh(this.headingRowRef.current):0,o=eh(this.containerRef.current)-i,a=Math.max(Math.floor(o/(s+1)),1);return a}},{key:"render",value:function(){var r=this.props,s=r.date,i=r.rtl,o=r.range,a=r.className,l=r.selected,c=r.selectable,d=r.renderForMeasure,f=r.accessors,p=r.getters,m=r.components,v=r.getNow,y=r.renderHeader,x=r.onSelect,w=r.localizer,C=r.onSelectStart,E=r.onSelectEnd,D=r.onDoubleClick,T=r.onKeyPress,A=r.resourceId,_=r.longPressThreshold,R=r.isAllDay,N=r.resizable,I=r.showAllEvents;if(d)return this.renderDummy();var $=this.slotMetrics(hr(hr({},this.props),{},{maxRows:this.state.showAllEvents?1/0:this.props.maxRows,maxRowsStatic:this.props.maxRows})),L=$.levels,z=$.extra,F=$.extraStatic,q=I?cYe:kd,H=m.weekWrapper,B={selected:l,accessors:f,getters:p,localizer:w,components:m,onSelect:x,onDoubleClick:D,onKeyPress:T,resourceId:A,slotMetrics:$,resizable:N};return xe.createElement("div",{className:a,role:"rowgroup",ref:this.containerRef},F.length>1&&xe.createElement("div",{onClick:this.handleShowMore,className:"chevron-show-more"},xe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler ".concat(this.state.showAllEvents?"icon-tabler-chevron-up":"icon-tabler-chevron-down"),width:"20",height:"20",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},xe.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),this.state.showAllEvents?xe.createElement("path",{d:"M6 15l6 -6l6 6"}):xe.createElement("path",{d:"M6 9l6 6l6 -6"}))),xe.createElement(oYe,{localizer:w,date:s,getNow:v,rtl:i,range:o,selectable:c,container:this.getContainer,getters:p,onSelectStart:C,onSelectEnd:E,onSelectSlot:this.handleSelectSlot,components:m,longPressThreshold:_,resourceId:A}),xe.createElement("div",{className:Ls("rbc-row-content",I&&"rbc-row-content-scrollable"),role:"row"},y&&xe.createElement("div",{className:"rbc-row ",ref:this.headingRowRef},o.map(this.renderHeadingCell)),xe.createElement("div",null,xe.createElement(q,null,xe.createElement(H,Object.assign({isAllDay:R},B,{rtl:this.props.rtl}),L.map(function(V,Y){return xe.createElement(Hue,Object.assign({key:Y,segments:V},B))}),!!z.length&&xe.createElement(Wue,Object.assign({segments:z,onShowMore:this.handleShowMore},B)))))))}}]),e})(xe.Component);xA.defaultProps={minRows:0,maxRows:1/0};var Gue=function(e){var n=e.label;return xe.createElement("span",{role:"columnheader","aria-sort":"none"},n)},fYe=function(e){var n=e.label,r=e.drilldownView,s=e.onDrillDown;return r?xe.createElement("button",{type:"button",className:"rbc-button-link",onClick:s,role:"cell"},n):xe.createElement("span",null,n)},pYe=["date","className"],hYe=function(e,n,r,s,i){return e.filter(function(o){return XS(o,n,r,s,i)})},Q3=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.callMeasureRowLimitOnResize=pHe(function(){this.measureRowLimit(this.props)},300),n.getContainer=function(){return n.containerRef.current},n.renderWeek=function(o,a){var l=n.props,c=l.events,d=l.components,f=l.selectable,p=l.getNow,m=l.selected,v=l.date,y=l.localizer,x=l.longPressThreshold,w=l.accessors,C=l.getters,E=l.showAllEvents,D=n.state,T=D.needLimitMeasure,A=D.rowLimit,_=hYe(nHe(c),o[0],o[o.length-1],w,y);return _.sort(function(R,N){return Uue(R,N,w,y)}),xe.createElement(xA,{key:a,ref:a===0?n.slotRowRef:void 0,container:n.getContainer,className:"rbc-month-row",getNow:p,date:v,range:o,events:_,maxRows:E?1/0:A,selected:m,selectable:f,components:d,accessors:w,getters:C,localizer:y,renderHeader:n.readerDateHeading,renderForMeasure:T,onShowMore:n.handleShowMore,onSelect:n.handleSelectEvent,onDoubleClick:n.handleDoubleClickEvent,onKeyPress:n.handleKeyPressEvent,onSelectSlot:n.handleSelectSlot,longPressThreshold:x,rtl:n.props.rtl,resizable:n.props.resizable,showAllEvents:E})},n.readerDateHeading=function(o){var a=o.date,l=o.className,c=zu(o,pYe),d=n.props,f=d.date,p=d.getDrilldownView,m=d.localizer,v=m.neq(a,f,"month"),y=m.isSameDate(a,f),x=p(a),w=m.format(a,"dateFormat"),C=n.props.components.dateHeader||fYe;return xe.createElement("div",Object.assign({},c,{className:Ls(l,v&&"rbc-off-range",y&&"rbc-current"),role:"cell"}),xe.createElement(C,{label:w,date:a,drilldownView:x,isOffRange:v,onDrillDown:function(D){return n.handleHeadingClick(a,x,D)}}))},n.handleSelectSlot=function(o,a){n._pendingSelection=n._pendingSelection.concat(o),clearTimeout(n._selectTimer),n._selectTimer=setTimeout(function(){return n.selectDates(a)})},n.handleHeadingClick=function(o,a,l){l.preventDefault(),n.clearSelection(),ns(n.props.onDrillDown,[o,a])},n.handleSelectEvent=function(){n.clearSelection();for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onSelectEvent,a)},n.handleDoubleClickEvent=function(){n.clearSelection();for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onDoubleClickEvent,a)},n.handleKeyPressEvent=function(){n.clearSelection();for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onKeyPressEvent,a)},n.handleShowMore=function(o,a,l,c,d){var f=n.props,p=f.popup,m=f.onDrillDown,v=f.onShowMore,y=f.doShowMoreDrillDown;if(n.clearSelection(),p){var x=Qw(l,n.containerRef.current);n.setState({overlay:{date:a,events:o,position:x,target:d}})}else y&&ns(m,[]);ns(v,[o,a,c])},n.overlayDisplay=function(){n.setState({overlay:null})},n.state={rowLimit:5,needLimitMeasure:!0,date:null},n.containerRef=O.createRef(),n.slotRowRef=O.createRef(),n._bgRows=[],n._pendingSelection=[],n}return wi(e,[{key:"componentDidMount",value:function(){var r=this,s;this.state.needLimitMeasure&&this.measureRowLimit(this.props),window.addEventListener("resize",this._resizeListener=function(){r.callMeasureRowLimitOnResize(),s||X1(function(){s=!1,r.setState({needLimitMeasure:!0})})},!1)}},{key:"componentDidUpdate",value:function(){this.state.needLimitMeasure&&this.measureRowLimit(this.props)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this._resizeListener,!1)}},{key:"render",value:function(){var r=this.props,s=r.date,i=r.localizer,o=r.className,a=i.visibleDays(s,i),l=cHe(a,7);return this._weekCount=l.length,xe.createElement("div",{className:Ls("rbc-month-view",o),role:"table","aria-label":"Month View",ref:this.containerRef},xe.createElement("div",{className:"rbc-row rbc-month-header",role:"row"},this.renderHeaders(l[0])),l.map(this.renderWeek),this.props.popup&&this.renderOverlay())}},{key:"renderHeaders",value:function(r){var s=this.props,i=s.localizer,o=s.components,a=r[0],l=r[r.length-1],c=o.header||Gue;return i.range(a,l,"day").map(function(d,f){return xe.createElement("div",{key:"header_"+f,className:"rbc-header"},xe.createElement(c,{date:d,localizer:i,label:i.format(d,"weekdayFormat")}))})}},{key:"renderOverlay",value:function(){var r,s,i=this,o=(r=(s=this.state)===null||s===void 0?void 0:s.overlay)!==null&&r!==void 0?r:{},a=this.props,l=a.accessors,c=a.localizer,d=a.components,f=a.getters,p=a.selected,m=a.popupOffset,v=a.handleDragStart,y=function(){return i.setState({overlay:null})};return xe.createElement(Iz,{overlay:o,accessors:l,localizer:c,components:d,getters:f,selected:p,popupOffset:m,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:v,show:!!o.position,overlayDisplay:this.overlayDisplay,onHide:y})}},{key:"measureRowLimit",value:function(){var r,s;this.setState({needLimitMeasure:!1,rowLimit:this.slotRowRef.current.getRowLimit((r=this.slotRowRef.current)===null||r===void 0||(s=r.headingRowRef)===null||s===void 0?void 0:s.current)})}},{key:"selectDates",value:function(r){var s=this._pendingSelection.slice();this._pendingSelection=[],s.sort(function(a,l){return+a-+l});var i=new Date(s[0]),o=new Date(s[s.length-1]);o.setDate(s[s.length-1].getDate()+1),ns(this.props.onSelectSlot,{slots:s,start:i,end:o,action:r.action,bounds:r.bounds,box:r.box})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}}],[{key:"getDerivedStateFromProps",value:function(r,s){var i=r.date,o=r.localizer;return{date:i,needLimitMeasure:o.neq(i,s.date,"month")}}}]),e})(xe.Component);Q3.range=function(t,e){var n=e.localizer,r=n.firstVisibleDay(t,n),s=n.lastVisibleDay(t,n);return{start:r,end:s}};Q3.navigate=function(t,e,n){var r=n.localizer;switch(e){case mi.PREVIOUS:return r.add(t,-1,"month");case mi.NEXT:return r.add(t,1,"month");default:return t}};Q3.title=function(t,e){var n=e.localizer;return n.format(t,"monthHeaderFormat")};var QZ=function(e){var n=e.min,r=e.max,s=e.step,i=e.slots,o=e.localizer;return"".concat(+o.startOf(n,"minutes"))+"".concat(+o.startOf(r,"minutes"))+"".concat(s,"-").concat(i)};function Lz(t){for(var e=t.min,n=t.max,r=t.step,s=t.timeslots,i=t.localizer,o=QZ({step:r,localizer:i}),a=1+i.getTotalMin(e,n),l=i.getMinutesFromMidnight(e),c=Math.ceil((a-1)/(r*s)),d=c*s,f=new Array(c),p=new Array(d),m=0;m<c;m++){f[m]=new Array(s);for(var v=0;v<s;v++){var y=m*s+v,x=y*r;p[y]=f[m][v]=i.getSlotDate(e,l,x)}}var w=p.length*r;p.push(i.getSlotDate(e,l,w));function C(E){var D=i.diff(e,E,"minutes")+i.getDstOffset(e,E);return Math.min(D,a)}return{groups:f,update:function(D){return QZ(D)!==o?Lz(D):this},dateIsInGroup:function(D,T){var A=f[T+1];return i.inRange(D,f[T][0],A?A[0]:n,"minutes")},nextSlot:function(D){var T=p[Math.min(p.indexOf(D)+1,p.length-1)];return T===D&&(T=i.add(D,r,"minutes")),T},closestSlotToPosition:function(D){var T=Math.min(p.length-1,Math.max(0,Math.floor(D*d)));return p[T]},closestSlotFromPoint:function(D,T){var A=Math.abs(T.top-T.bottom);return this.closestSlotToPosition((D.y-T.top)/A)},closestSlotFromDate:function(D){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(i.lt(D,e,"minutes"))return p[0];if(i.gt(D,n,"minutes"))return p[p.length-1];var A=i.diff(e,D,"minutes");return p[(A-A%r)/r+T]},startsBeforeDay:function(D){return i.lt(D,e,"day")},startsAfterDay:function(D){return i.gt(D,n,"day")},startsBefore:function(D){return i.lt(i.merge(e,D),e,"minutes")},startsAfter:function(D){return i.gt(i.merge(n,D),n,"minutes")},getRange:function(D,T,A,_){A||(D=i.min(n,i.max(e,D))),_||(T=i.min(n,i.max(e,T)));var R=C(D),N=C(T),I=N>r*d&&!i.eq(n,T)?(R-r)/(r*d)*100:R/(r*d)*100;return{top:I,height:N/(r*d)*100-I,start:C(D),startDate:D,end:C(T),endDate:T}},getCurrentTimePosition:function(D){var T=C(D),A=T/(r*d)*100;return A}}}var mYe=(function(){function t(e,n){var r=n.accessors,s=n.slotMetrics;Si(this,t);var i=s.getRange(r.start(e),r.end(e)),o=i.start,a=i.startDate,l=i.end,c=i.endDate,d=i.top,f=i.height;this.start=o,this.end=l,this.startMs=+a,this.endMs=+c,this.top=d,this.height=f,this.data=e}return wi(t,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(s,i){return Math.max(s,i.leaves.length+1)},0)+1;return 100/n}if(this.leaves){var r=100-this.container._width;return r/(this.leaves.length+1)}return this.row._width}},{key:"width",get:function(){var n=this._width,r=Math.min(100,this._width*1.7);if(this.rows)return r;if(this.leaves)return this.leaves.length>0?r:n;var s=this.row.leaves,i=s.indexOf(this);return i===s.length-1?n:r}},{key:"xOffset",get:function(){if(this.rows)return 0;if(this.leaves)return this.container._width;var n=this.row,r=n.leaves,s=n.xOffset,i=n._width,o=r.indexOf(this)+1;return s+o*i}}]),t})();function gYe(t,e,n){return Math.abs(e.start-t.start)<n||e.start>t.start&&e.start<t.end}function vYe(t){for(var e=OVe(t,["startMs",function(a){return-a.endMs}]),n=[];e.length>0;){var r=e.shift();n.push(r);for(var s=0;s<e.length;s++){var i=e[s];if(!(r.endMs>i.startMs)){if(s>0){var o=e.splice(s,1)[0];n.push(o)}break}}}return n}function Kue(t){for(var e=t.events,n=t.minimumStartDifference,r=t.slotMetrics,s=t.accessors,i=e.map(function(d){return new mYe(d,{slotMetrics:r,accessors:s})}),o=vYe(i),a=[],l=function(){var f=o[c],p=a.find(function(y){return y.end>f.start||Math.abs(f.start-y.start)<n});if(!p)return f.rows=[],a.push(f),1;f.container=p;for(var m=null,v=p.rows.length-1;!m&&v>=0;v--)gYe(p.rows[v],f,n)&&(m=p.rows[v]);m?(m.leaves.push(f),f.row=m):(f.leaves=[],p.rows.push(f))},c=0;c<o.length;c++)l();return o.map(function(d){return{event:d.data,style:{top:d.top,height:d.height,width:d.width,xOffset:Math.max(0,d.xOffset)}}})}function Zue(t,e,n){for(var r=0;r<t.friends.length;++r)if(!(n.indexOf(t.friends[r])>-1)){e=e>t.friends[r].idx?e:t.friends[r].idx,n.push(t.friends[r]);var s=Zue(t.friends[r],e,n);e=e>s?e:s}return e}function yYe(t){var e=t.events,n=t.minimumStartDifference,r=t.slotMetrics,s=t.accessors,i=Kue({events:e,minimumStartDifference:n,slotMetrics:r,accessors:s});i.sort(function(q,H){return q=q.style,H=H.style,q.top!==H.top?q.top>H.top?1:-1:q.top+q.height<H.top+H.height?1:-1});for(var o=0;o<i.length;++o)i[o].friends=[],delete i[o].style.left,delete i[o].style.left,delete i[o].idx,delete i[o].size;for(var a=0;a<i.length-1;++a)for(var l=i[a],c=l.style.top,d=l.style.top+l.style.height,f=a+1;f<i.length;++f){var p=i[f],m=p.style.top,v=p.style.top+p.style.height;(m>=c&&v<=d||v>c&&v<=d||m>=c&&m<d)&&(l.friends.push(p),p.friends.push(l))}for(var y=0;y<i.length;++y){for(var x=i[y],w=[],C=0;C<100;++C)w.push(1);for(var E=0;E<x.friends.length;++E)x.friends[E].idx!==void 0&&(w[x.friends[E].idx]=0);x.idx=w.indexOf(1)}for(var D=0;D<i.length;++D){var T=0;if(!i[D].size){var A=[],_=Zue(i[D],0,A);T=100/(_+1),i[D].size=T;for(var R=0;R<A.length;++R)A[R].size=T}}for(var N=0;N<i.length;++N){var I=i[N];I.style.left=I.idx*I.size;for(var $=0,L=0;L<I.friends.length;++L){var z=I.friends[L].idx;$=$>z?$:z}$<=I.idx&&(I.size=100-I.idx*I.size);var F=I.idx===0?0:3;I.style.width="calc(".concat(I.size,"% - ").concat(F,"px)"),I.style.height="calc(".concat(I.style.height,"% - 2px)"),I.style.xOffset="calc(".concat(I.style.left,"% + ").concat(F,"px)")}return i}var eJ={overlap:Kue,"no-overlap":yYe};function bYe(t){return!!(t&&t.constructor&&t.call&&t.apply)}function xYe(t){t.events,t.minimumStartDifference,t.slotMetrics,t.accessors;var e=t.dayLayoutAlgorithm,n=e;return e in eJ&&(n=eJ[e]),bYe(n)?n.apply(this,arguments):[]}var Jue=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.renderSlot,i=r.resource,o=r.group,a=r.getters,l=r.components,c=l===void 0?{}:l,d=c.timeSlotWrapper,f=d===void 0?kd:d,p=a?a.slotGroupProp(o):{};return xe.createElement("div",Object.assign({className:"rbc-timeslot-group"},p),o.map(function(m,v){var y=a?a.slotProp(m,i):{};return xe.createElement(f,{key:v,value:m,resource:i},xe.createElement("div",Object.assign({},y,{className:Ls("rbc-time-slot",y.className)}),s&&s(m,v)))}))}}]),e})(O.Component);function Qm(t){return typeof t=="string"?t:t+"%"}function SYe(t){var e=t.style,n=t.className,r=t.event,s=t.accessors,i=t.rtl,o=t.selected,a=t.label,l=t.continuesPrior,c=t.continuesAfter,d=t.getters,f=t.onClick,p=t.onDoubleClick,m=t.isBackgroundEvent,v=t.onKeyPress,y=t.components,x=y.event,w=y.eventWrapper,C=s.title(r),E=s.tooltip(r),D=s.end(r),T=s.start(r),A=d.eventProp(r,T,D,o),_=e.height,R=e.top,N=e.width,I=e.xOffset,$=[xe.createElement("div",{key:"1",className:"rbc-event-label"},a),xe.createElement("div",{key:"2",className:"rbc-event-content"},x?xe.createElement(x,{event:r,title:C}):C)],L=m?hr(hr({},A.style),{},Ad({top:Qm(R),height:Qm(_),width:"calc(".concat(N," + 10px)")},i?"right":"left",Qm(Math.max(0,I)))):hr(hr({},A.style),{},Ad({top:Qm(R),width:Qm(N),height:Qm(_)},i?"right":"left",Qm(I)));return xe.createElement(w,Object.assign({type:"time"},t),xe.createElement("div",{onClick:f,onDoubleClick:p,style:L,onKeyPress:v,title:E?(typeof a=="string"?a+": ":"")+E:void 0,className:Ls(m?"rbc-background-event":"rbc-event",n,A.className,{"rbc-selected":o,"rbc-event-continues-earlier":l,"rbc-event-continues-later":c})},$))}var wYe=function(e){var n=e.children,r=e.className,s=e.style,i=e.innerRef;return xe.createElement("div",{className:r,style:s,ref:i},n)},CYe=xe.forwardRef(function(t,e){return xe.createElement(wYe,Object.assign({},t,{innerRef:e}))}),EYe=["dayProp"],MYe=["eventContainerWrapper"],Xue=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.state={selecting:!1,timeIndicatorPosition:null},n.intervalTriggered=!1,n.renderEvents=function(o){var a=o.events,l=o.isBackgroundEvent,c=n.props,d=c.rtl,f=c.selected,p=c.accessors,m=c.localizer,v=c.getters,y=c.components,x=c.step,w=c.timeslots,C=c.dayLayoutAlgorithm,E=c.resizable,D=_S(n),T=D.slotMetrics,A=m.messages,_=xYe({events:a,accessors:p,slotMetrics:T,minimumStartDifference:Math.ceil(x*w/2),dayLayoutAlgorithm:C});return _.map(function(R,N){var I=R.event,$=R.style,L=p.end(I),z=p.start(I),F="eventTimeRangeFormat",q,H=T.startsBeforeDay(z),B=T.startsAfterDay(L);H?F="eventTimeRangeEndFormat":B&&(F="eventTimeRangeStartFormat"),H&&B?q=A.allDay:q=m.format({start:z,end:L},F);var V=H||T.startsBefore(z),Y=B||T.startsAfter(L);return xe.createElement(SYe,{style:$,event:I,label:q,key:"evt_"+N,getters:v,rtl:d,components:y,continuesPrior:V,continuesAfter:Y,accessors:p,resource:n.props.resource,selected:X3(I,f),onClick:function(W){return n._select(hr(hr({},I),{},{sourceResource:n.props.resource}),W)},onDoubleClick:function(W){return n._doubleClick(I,W)},isBackgroundEvent:l,onKeyPress:function(W){return n._keyPress(I,W)},resizable:E})})},n._selectable=function(){var o=n.containerRef.current,a=n.props,l=a.longPressThreshold,c=a.localizer,d=n._selector=new Bue(function(){return o},{longPressThreshold:l}),f=function(y){var x=n.props.onSelecting,w=n.state||{},C=p(y),E=C.startDate,D=C.endDate;x&&(c.eq(w.startDate,E,"minutes")&&c.eq(w.endDate,D,"minutes")||x({start:E,end:D,resourceId:n.props.resource})===!1)||(n.state.start!==C.start||n.state.end!==C.end||n.state.selecting!==C.selecting)&&n.setState(C)},p=function(y){var x=n.slotMetrics.closestSlotFromPoint(y,tv(o));n.state.selecting||(n._initialSlot=x);var w=n._initialSlot;c.lte(w,x)?x=n.slotMetrics.nextSlot(x):c.gt(w,x)&&(w=n.slotMetrics.nextSlot(w));var C=n.slotMetrics.getRange(c.min(w,x),c.max(w,x));return hr(hr({},C),{},{selecting:!0,top:"".concat(C.top,"%"),height:"".concat(C.height,"%")})},m=function(y,x){if(!bA(n.containerRef.current,y)){var w=p(y),C=w.startDate,E=w.endDate;n._selectSlot({startDate:C,endDate:E,action:x,box:y})}n.setState({selecting:!1})};d.on("selecting",f),d.on("selectStart",f),d.on("beforeSelect",function(v){if(n.props.selectable==="ignoreEvents")return!bA(n.containerRef.current,v)}),d.on("click",function(v){return m(v,"click")}),d.on("doubleClick",function(v){return m(v,"doubleClick")}),d.on("select",function(v){n.state.selecting&&(n._selectSlot(hr(hr({},n.state),{},{action:"select",bounds:v})),n.setState({selecting:!1}))}),d.on("reset",function(){n.state.selecting&&n.setState({selecting:!1})})},n._teardownSelectable=function(){n._selector&&(n._selector.teardown(),n._selector=null)},n._selectSlot=function(o){for(var a=o.startDate,l=o.endDate,c=o.action,d=o.bounds,f=o.box,p=a,m=[];n.props.localizer.lte(p,l);)m.push(p),p=new Date(+p+n.props.step*60*1e3);ns(n.props.onSelectSlot,{slots:m,start:a,end:l,resourceId:n.props.resource,action:c,bounds:d,box:f})},n._select=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onSelectEvent,a)},n._doubleClick=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onDoubleClickEvent,a)},n._keyPress=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onKeyPressEvent,a)},n.slotMetrics=Lz(n.props),n.containerRef=O.createRef(),n}return wi(e,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable(),this.props.isNow&&this.setTimeIndicatorPositionUpdateInterval()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable(),this.clearTimeIndicatorInterval()}},{key:"UNSAFE_componentWillReceiveProps",value:function(r){r.selectable&&!this.props.selectable&&this._selectable(),!r.selectable&&this.props.selectable&&this._teardownSelectable(),this.slotMetrics=this.slotMetrics.update(r)}},{key:"componentDidUpdate",value:function(r,s){var i=this.props,o=i.getNow,a=i.isNow,l=i.localizer,c=i.date,d=i.min,f=i.max,p=l.neq(r.getNow(),o(),"minutes");if(r.isNow!==a||p){if(this.clearTimeIndicatorInterval(),a){var m=!p&&l.eq(r.date,c,"minutes")&&s.timeIndicatorPosition===this.state.timeIndicatorPosition;this.setTimeIndicatorPositionUpdateInterval(m)}}else a&&(l.neq(r.min,d,"minutes")||l.neq(r.max,f,"minutes"))&&this.positionTimeIndicator()}},{key:"setTimeIndicatorPositionUpdateInterval",value:function(){var r=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!s&&this.positionTimeIndicator(),this._timeIndicatorTimeout=window.setTimeout(function(){r.intervalTriggered=!0,r.positionTimeIndicator(),r.setTimeIndicatorPositionUpdateInterval()},6e4)}},{key:"clearTimeIndicatorInterval",value:function(){this.intervalTriggered=!1,window.clearTimeout(this._timeIndicatorTimeout)}},{key:"positionTimeIndicator",value:function(){var r=this.props,s=r.min,i=r.max,o=r.getNow,a=o();if(a>=s&&a<=i){var l=this.slotMetrics.getCurrentTimePosition(a);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:l})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,s=r.date,i=r.max,o=r.rtl,a=r.isNow,l=r.resource,c=r.accessors,d=r.localizer,f=r.getters,p=f.dayProp,m=zu(f,EYe),v=r.components,y=v.eventContainerWrapper,x=zu(v,MYe),w=this.slotMetrics,C=this.state,E=C.selecting,D=C.top,T=C.height,A=C.startDate,_=C.endDate,R={start:A,end:_},N=p(i),I=N.className,$=N.style,L=x.dayColumnWrapper||CYe;return xe.createElement(L,{ref:this.containerRef,date:s,style:$,className:Ls(I,"rbc-day-slot","rbc-time-column",a&&"rbc-now",a&&"rbc-today",E&&"rbc-slot-selecting"),slotMetrics:w},w.groups.map(function(z,F){return xe.createElement(Jue,{key:F,group:z,resource:l,getters:m,components:x})}),xe.createElement(y,{localizer:d,resource:l,accessors:c,getters:m,components:x,slotMetrics:w},xe.createElement("div",{className:Ls("rbc-events-container",o&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),E&&xe.createElement("div",{className:"rbc-slot-selection",style:{top:D,height:T}},xe.createElement("span",null,d.format(R,"selectRangeFormat"))),a&&this.intervalTriggered&&xe.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),e})(xe.Component);Xue.defaultProps={dragThroughEvents:!0,timeslots:2};function DYe(t){var e=t.min,n=t.max,r=t.localizer;return r.getTimezoneOffset(e)!==r.getTimezoneOffset(n)?{start:r.add(e,-1,"day"),end:r.add(n,-1,"day")}:{start:e,end:n}}var kYe=function(e){var n=e.min,r=e.max,s=e.timeslots,i=e.step,o=e.localizer,a=e.getNow,l=e.resource,c=e.components,d=e.getters,f=e.gutterRef,p=c.timeGutterWrapper,m=O.useMemo(function(){return DYe({min:n,max:r,localizer:o})},[n==null?void 0:n.toISOString(),r==null?void 0:r.toISOString(),o]),v=m.start,y=m.end,x=O.useState(Lz({min:v,max:y,timeslots:s,step:i,localizer:o})),w=_d(x,2),C=w[0],E=w[1];O.useEffect(function(){C&&E(C.update({min:v,max:y,timeslots:s,step:i,localizer:o}))},[v==null?void 0:v.toISOString(),y==null?void 0:y.toISOString(),s,i]);var D=O.useCallback(function(T,A){if(A)return null;var _=C.dateIsInGroup(a(),A);return xe.createElement("span",{className:Ls("rbc-label",_&&"rbc-now")},o.format(T,"timeGutterFormat"))},[C,o,a]);return xe.createElement(p,{slotMetrics:C},xe.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:f},C.groups.map(function(T,A){return xe.createElement(Jue,{key:A,group:T,resource:l,components:c,renderSlot:D,getters:d})})))},TYe=xe.forwardRef(function(t,e){return xe.createElement(kYe,Object.assign({gutterRef:e},t))}),AYe=function(e){var n=e.label;return xe.createElement(xe.Fragment,null,n)},_Ye=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.handleHeaderClick=function(o,a,l){l.preventDefault(),ns(n.props.onDrillDown,[o,a])},n.renderRow=function(o){var a=n.props,l=a.events,c=a.rtl,d=a.selectable,f=a.getNow,p=a.range,m=a.getters,v=a.localizer,y=a.accessors,x=a.components,w=a.resizable,C=y.resourceId(o),E=o?l.filter(function(D){return y.resource(D)===C}):l;return xe.createElement(xA,{isAllDay:!0,rtl:c,getNow:f,minRows:2,maxRows:n.props.allDayMaxRows+1,range:p,events:E,resourceId:C,className:"rbc-allday-cell",selectable:d,selected:n.props.selected,components:x,accessors:y,getters:m,localizer:v,onSelect:n.props.onSelectEvent,onShowMore:n.props.onShowMore,onDoubleClick:n.props.onDoubleClickEvent,onKeyPress:n.props.onKeyPressEvent,onSelectSlot:n.props.onSelectSlot,longPressThreshold:n.props.longPressThreshold,resizable:w})},n}return wi(e,[{key:"renderHeaderCells",value:function(r){var s=this,i=this.props,o=i.localizer,a=i.getDrilldownView,l=i.getNow,c=i.getters.dayProp,d=i.components.header,f=d===void 0?Gue:d,p=l();return r.map(function(m,v){var y=a(m),x=o.format(m,"dayFormat"),w=c(m),C=w.className,E=w.style,D=xe.createElement(f,{date:m,label:x,localizer:o});return xe.createElement("div",{key:v,style:E,className:Ls("rbc-header",C,o.isSameDate(m,p)&&"rbc-today")},y?xe.createElement("button",{type:"button",className:"rbc-button-link",onClick:function(A){return s.handleHeaderClick(m,y,A)}},D):xe.createElement("span",null,D))})}},{key:"render",value:function(){var r=this,s=this.props,i=s.width,o=s.rtl,a=s.resources,l=s.range,c=s.events,d=s.getNow,f=s.accessors,p=s.selectable,m=s.components,v=s.getters,y=s.scrollRef,x=s.localizer,w=s.isOverflowing,C=s.components,E=C.timeGutterHeader,D=C.resourceHeader,T=D===void 0?AYe:D,A=s.resizable,_={};w&&(_[o?"marginLeft":"marginRight"]="".concat(rC()-1,"px"));var R=a.groupEvents(c);return xe.createElement("div",{style:_,ref:y,className:Ls("rbc-time-header",w&&"rbc-overflowing")},xe.createElement("div",{className:"rbc-label rbc-time-header-gutter",style:{width:i,minWidth:i,maxWidth:i}},E&&xe.createElement(E,null)),a.map(function(N,I){var $=_d(N,2),L=$[0],z=$[1];return xe.createElement("div",{className:"rbc-time-header-content",key:L||I},z&&xe.createElement("div",{className:"rbc-row rbc-row-resource",key:"resource_".concat(I)},xe.createElement("div",{className:"rbc-header"},xe.createElement(T,{index:I,label:f.resourceTitle(z),resource:z}))),xe.createElement("div",{className:"rbc-row rbc-time-header-cell".concat(l.length<=1?" rbc-time-header-cell-single-day":"")},r.renderHeaderCells(l)),xe.createElement(xA,{isAllDay:!0,rtl:o,getNow:d,minRows:2,maxRows:r.props.allDayMaxRows+1,range:l,events:R.get(L)||[],resourceId:z&&L,className:"rbc-allday-cell",selectable:p,selected:r.props.selected,components:m,accessors:f,getters:v,localizer:x,onSelect:r.props.onSelectEvent,onShowMore:r.props.onShowMore,onDoubleClick:r.props.onDoubleClickEvent,onKeyPress:r.props.onKeyPressEvent,onSelectSlot:r.props.onSelectSlot,longPressThreshold:r.props.longPressThreshold,resizable:A}))}))}}]),e})(xe.Component),q6={};function OYe(t,e){return{map:function(r){return t?t.map(function(s,i){return r([e.resourceId(s),s],i)}):[r([q6,null],0)]},groupEvents:function(r){var s=new Map;return t?(r.forEach(function(i){var o=e.resource(i)||q6;if(Array.isArray(o))o.forEach(function(l){var c=s.get(l)||[];c.push(i),s.set(l,c)});else{var a=s.get(o)||[];a.push(i),s.set(o,a)}}),s):(s.set(q6,r),s)}}}var Q1=(function(t){Wo(e,t);function e(n){var r;return Si(this,e),r=Vo(this,e,[n]),r.handleScroll=function(s){r.scrollRef.current&&(r.scrollRef.current.scrollLeft=s.target.scrollLeft)},r.handleResize=function(){p1(r.rafHandle),r.rafHandle=X1(r.checkOverflow)},r.handleKeyPressEvent=function(){r.clearSelection();for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];ns(r.props.onKeyPressEvent,i)},r.handleSelectEvent=function(){r.clearSelection();for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];ns(r.props.onSelectEvent,i)},r.handleDoubleClickEvent=function(){r.clearSelection();for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];ns(r.props.onDoubleClickEvent,i)},r.handleShowMore=function(s,i,o,a,l){var c=r.props,d=c.popup,f=c.onDrillDown,p=c.onShowMore,m=c.getDrilldownView,v=c.doShowMoreDrillDown;if(r.clearSelection(),d){var y=Qw(o,r.containerRef.current);r.setState({overlay:{date:i,events:s,position:hr(hr({},y),{},{width:"200px"}),target:l}})}else v&&ns(f,[i,m(i)||ha.DAY]);ns(p,[s,i,a])},r.handleSelectAllDaySlot=function(s,i){var o=r.props.onSelectSlot,a=new Date(s[0]),l=new Date(s[s.length-1]);l.setDate(s[s.length-1].getDate()+1),ns(o,{slots:s,start:a,end:l,action:i.action,resourceId:i.resourceId})},r.overlayDisplay=function(){r.setState({overlay:null})},r.checkOverflow=function(){if(!r._updatingOverflow){var s=r.contentRef.current,i=s.scrollHeight>s.clientHeight;r.state.isOverflowing!==i&&(r._updatingOverflow=!0,r.setState({isOverflowing:i},function(){r._updatingOverflow=!1}))}},r.memoizedResources=_z(function(s,i){return OYe(s,i)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=xe.createRef(),r.contentRef=xe.createRef(),r.containerRef=xe.createRef(),r._scrollRatio=null,r.gutterRef=O.createRef(),r}return wi(e,[{key:"getSnapshotBeforeUpdate",value:function(){return this.checkOverflow(),null}},{key:"componentDidMount",value:function(){this.props.width==null&&this.measureGutter(),this.calculateScroll(),this.applyScroll(),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),p1(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,s,i,o){var a=this,l=this.props,c=l.min,d=l.max,f=l.components,p=l.accessors,m=l.localizer,v=l.dayLayoutAlgorithm,y=this.memoizedResources(this.props.resources,p),x=y.groupEvents(s),w=y.groupEvents(i);return y.map(function(C,E){var D=_d(C,2),T=D[0],A=D[1];return r.map(function(_,R){var N=(x.get(T)||[]).filter(function($){return m.inRange(_,p.start($),p.end($),"day")}),I=(w.get(T)||[]).filter(function($){return m.inRange(_,p.start($),p.end($),"day")});return xe.createElement(Xue,Object.assign({},a.props,{localizer:m,min:m.merge(_,c),max:m.merge(_,d),resource:A&&T,components:f,isNow:m.isSameDate(_,o),key:E+"-"+R,date:_,events:N,backgroundEvents:I,dayLayoutAlgorithm:v}))})})}},{key:"render",value:function(){var r,s=this.props,i=s.events,o=s.backgroundEvents,a=s.range,l=s.width,c=s.rtl,d=s.selected,f=s.getNow,p=s.resources,m=s.components,v=s.accessors,y=s.getters,x=s.localizer,w=s.min,C=s.max,E=s.showMultiDayTimes,D=s.longPressThreshold,T=s.resizable;l=l||this.state.gutterWidth;var A=a[0],_=a[a.length-1];this.slots=a.length;var R=[],N=[],I=[];return i.forEach(function($){if(XS($,A,_,v,x)){var L=v.start($),z=v.end($);v.allDay($)||x.startAndEndAreDateOnly(L,z)||!E&&!x.isSameDate(L,z)?R.push($):N.push($)}}),o.forEach(function($){XS($,A,_,v,x)&&I.push($)}),R.sort(function($,L){return Uue($,L,v,x)}),xe.createElement("div",{className:Ls("rbc-time-view",p&&"rbc-time-view-resources"),ref:this.containerRef},xe.createElement(_Ye,{range:a,events:R,width:l,rtl:c,getNow:f,localizer:x,selected:d,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(p,v),selectable:this.props.selectable,accessors:v,getters:y,components:m,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:D,onSelectSlot:this.handleSelectAllDaySlot,onSelectEvent:this.handleSelectEvent,onShowMore:this.handleShowMore,onDoubleClickEvent:this.props.onDoubleClickEvent,onKeyPressEvent:this.props.onKeyPressEvent,onDrillDown:this.props.onDrillDown,getDrilldownView:this.props.getDrilldownView,resizable:T}),this.props.popup&&this.renderOverlay(),xe.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},xe.createElement(TYe,{date:A,ref:this.gutterRef,localizer:x,min:x.merge(A,w),max:x.merge(A,C),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:m,className:"rbc-time-gutter",getters:y}),this.renderEvents(a,N,I,f())))}},{key:"renderOverlay",value:function(){var r,s,i=this,o=(r=(s=this.state)===null||s===void 0?void 0:s.overlay)!==null&&r!==void 0?r:{},a=this.props,l=a.accessors,c=a.localizer,d=a.components,f=a.getters,p=a.selected,m=a.popupOffset,v=a.handleDragStart,y=function(){return i.setState({overlay:null})};return xe.createElement(Iz,{overlay:o,accessors:l,localizer:c,components:d,getters:f,selected:p,popupOffset:m,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:v,show:!!o.position,overlayDisplay:this.overlayDisplay,onHide:y})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}},{key:"measureGutter",value:function(){var r=this;this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest),this.measureGutterAnimationFrameRequest=window.requestAnimationFrame(function(){var s,i=(s=r.gutterRef)!==null&&s!==void 0&&s.current?y1(r.gutterRef.current):void 0;i&&r.state.gutterWidth!==i&&r.setState({gutterWidth:i})})}},{key:"applyScroll",value:function(){if(this._scrollRatio!=null&&this.props.enableAutoScroll===!0){var r=this.contentRef.current;r.scrollTop=r.scrollHeight*this._scrollRatio,this._scrollRatio=null}}},{key:"calculateScroll",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,s=r.min,i=r.max,o=r.scrollToTime,a=r.localizer,l=a.diff(a.merge(o,s),o,"milliseconds"),c=a.diff(s,i,"milliseconds");this._scrollRatio=l/c}}]),e})(O.Component);Q1.defaultProps={step:30,timeslots:2};var RYe=["date","localizer","min","max","scrollToTime","enableAutoScroll"],eO=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.date,i=r.localizer,o=r.min,a=o===void 0?i.startOf(new Date,"day"):o,l=r.max,c=l===void 0?i.endOf(new Date,"day"):l,d=r.scrollToTime,f=d===void 0?i.startOf(new Date,"day"):d,p=r.enableAutoScroll,m=p===void 0?!0:p,v=zu(r,RYe),y=e.range(s,{localizer:i});return xe.createElement(Q1,Object.assign({},v,{range:y,eventOffset:10,localizer:i,min:a,max:c,scrollToTime:f,enableAutoScroll:m}))}}]),e})(xe.Component);eO.range=function(t,e){var n=e.localizer;return[n.startOf(t,"day")]};eO.navigate=function(t,e,n){var r=n.localizer;switch(e){case mi.PREVIOUS:return r.add(t,-1,"day");case mi.NEXT:return r.add(t,1,"day");default:return t}};eO.title=function(t,e){var n=e.localizer;return n.format(t,"dayHeaderFormat")};var NYe=["date","localizer","min","max","scrollToTime","enableAutoScroll"],hh=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.date,i=r.localizer,o=r.min,a=o===void 0?i.startOf(new Date,"day"):o,l=r.max,c=l===void 0?i.endOf(new Date,"day"):l,d=r.scrollToTime,f=d===void 0?i.startOf(new Date,"day"):d,p=r.enableAutoScroll,m=p===void 0?!0:p,v=zu(r,NYe),y=e.range(s,this.props);return xe.createElement(Q1,Object.assign({},v,{range:y,eventOffset:15,localizer:i,min:a,max:c,scrollToTime:f,enableAutoScroll:m}))}}]),e})(xe.Component);hh.defaultProps=Q1.defaultProps;hh.navigate=function(t,e,n){var r=n.localizer;switch(e){case mi.PREVIOUS:return r.add(t,-1,"week");case mi.NEXT:return r.add(t,1,"week");default:return t}};hh.range=function(t,e){var n=e.localizer,r=n.startOfWeek(),s=n.startOf(t,"week",r),i=n.endOf(t,"week",r);return n.range(s,i)};hh.title=function(t,e){var n=e.localizer,r=hh.range(t,{localizer:n}),s=Aue(r),i=s[0],o=s.slice(1);return n.format({start:i,end:o.pop()},"dayRangeHeaderFormat")};var jYe=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function Pz(t,e){return hh.range(t,e).slice(0,5)}var lC=(function(t){Wo(e,t);function e(){return Si(this,e),Vo(this,e,arguments)}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.date,i=r.localizer,o=r.min,a=o===void 0?i.startOf(new Date,"day"):o,l=r.max,c=l===void 0?i.endOf(new Date,"day"):l,d=r.scrollToTime,f=d===void 0?i.startOf(new Date,"day"):d,p=r.enableAutoScroll,m=p===void 0?!0:p,v=zu(r,jYe),y=Pz(s,this.props);return xe.createElement(Q1,Object.assign({},v,{range:y,eventOffset:15,localizer:i,min:a,max:c,scrollToTime:f,enableAutoScroll:m}))}}]),e})(xe.Component);lC.defaultProps=Q1.defaultProps;lC.range=Pz;lC.navigate=hh.navigate;lC.title=function(t,e){var n=e.localizer,r=Pz(t,{localizer:n}),s=Aue(r),i=s[0],o=s.slice(1);return n.format({start:i,end:o.pop()},"dayRangeHeaderFormat")};function mh(t){var e=t.accessors,n=t.components,r=t.date,s=t.events,i=t.getters,o=t.length,a=t.localizer,l=t.onDoubleClickEvent,c=t.onSelectEvent,d=t.selected,f=O.useRef(null),p=O.useRef(null),m=O.useRef(null),v=O.useRef(null),y=O.useRef(null);O.useEffect(function(){C()});var x=function(_,R,N){var I=n.event,$=n.date;return R=R.filter(function(L){return XS(L,a.startOf(_,"day"),a.endOf(_,"day"),e,a)}),R.map(function(L,z){var F=e.title(L),q=e.end(L),H=e.start(L),B=i.eventProp(L,H,q,X3(L,d)),V=z===0&&a.format(_,"agendaDateFormat"),Y=z===0?xe.createElement("td",{rowSpan:R.length,className:"rbc-agenda-date-cell"},$?xe.createElement($,{day:_,label:V}):V):!1;return xe.createElement("tr",{key:N+"_"+z,className:B.className,style:B.style},Y,xe.createElement("td",{className:"rbc-agenda-time-cell"},w(_,L)),xe.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(W){return c&&c(L,W)},onDoubleClick:function(W){return l&&l(L,W)}},I?xe.createElement(I,{event:L,title:F}):F))},[])},w=function(_,R){var N="",I=n.time,$=a.messages.allDay,L=e.end(R),z=e.start(R);return e.allDay(R)||(a.eq(z,L)?$=a.format(z,"agendaTimeFormat"):a.isSameDate(z,L)?$=a.format({start:z,end:L},"agendaTimeRangeFormat"):a.isSameDate(_,z)?$=a.format(z,"agendaTimeFormat"):a.isSameDate(_,L)&&($=a.format(L,"agendaTimeFormat"))),a.gt(_,z,"day")&&(N="rbc-continues-prior"),a.lt(_,L,"day")&&(N+=" rbc-continues-after"),xe.createElement("span",{className:N.trim()},I?xe.createElement(I,{event:R,day:_,label:$}):$)},C=function(){if(y.current){var _=f.current,R=y.current.firstChild;if(R){var N=v.current.scrollHeight>v.current.clientHeight,I=[],$=I;I=[y1(R.children[0]),y1(R.children[1])],($[0]!==I[0]||$[1]!==I[1])&&(p.current.style.width=I[0]+"px",m.current.style.width=I[1]+"px"),N?(Y_(_,"rbc-header-overflowing"),_.style.marginRight=rC()+"px"):G_(_,"rbc-header-overflowing")}}},E=a.messages,D=a.add(r,o,"day"),T=a.range(r,D,"day");return s=s.filter(function(A){return XS(A,a.startOf(r,"day"),a.endOf(D,"day"),e,a)}),s.sort(function(A,_){return+e.start(A)-+e.start(_)}),xe.createElement("div",{className:"rbc-agenda-view"},s.length!==0?xe.createElement(xe.Fragment,null,xe.createElement("table",{ref:f,className:"rbc-agenda-table"},xe.createElement("thead",null,xe.createElement("tr",null,xe.createElement("th",{className:"rbc-header",ref:p},E.date),xe.createElement("th",{className:"rbc-header",ref:m},E.time),xe.createElement("th",{className:"rbc-header"},E.event)))),xe.createElement("div",{className:"rbc-agenda-content",ref:v},xe.createElement("table",{className:"rbc-agenda-table"},xe.createElement("tbody",{ref:y},T.map(function(A,_){return x(A,s,_)}))))):xe.createElement("span",{className:"rbc-agenda-empty"},E.noEventsInRange))}mh.defaultProps={length:30};mh.range=function(t,e){var n=e.length,r=n===void 0?mh.defaultProps.length:n,s=e.localizer,i=s.add(t,r,"day");return{start:t,end:i}};mh.navigate=function(t,e,n){var r=n.length,s=r===void 0?mh.defaultProps.length:r,i=n.localizer;switch(e){case mi.PREVIOUS:return i.add(t,-s,"day");case mi.NEXT:return i.add(t,s,"day");default:return t}};mh.title=function(t,e){var n=e.length,r=n===void 0?mh.defaultProps.length:n,s=e.localizer,i=s.add(t,r,"day");return s.format({start:t,end:i},"agendaHeaderFormat")};var bk=Ad(Ad(Ad(Ad(Ad({},ha.MONTH,Q3),ha.WEEK,hh),ha.WORK_WEEK,lC),ha.DAY,eO),ha.AGENDA,mh),IYe=["action","date","today"];function LYe(t,e){var n=e.action,r=e.date,s=e.today,i=zu(e,IYe);switch(t=typeof t=="string"?bk[t]:t,n){case mi.TODAY:r=s||new Date;break;case mi.DATE:break;default:WS(t&&typeof t.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=t.navigate(r,n,i)}return r}var PYe=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.navigate=function(o){n.props.onNavigate(o)},n.view=function(o){n.props.onView(o)},n}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.localizer.messages,i=r.label;return xe.createElement("div",{className:"rbc-toolbar"},xe.createElement("span",{className:"rbc-btn-group"},xe.createElement("button",{type:"button",onClick:this.navigate.bind(null,mi.TODAY)},s.today),xe.createElement("button",{type:"button",onClick:this.navigate.bind(null,mi.PREVIOUS)},s.previous),xe.createElement("button",{type:"button",onClick:this.navigate.bind(null,mi.NEXT)},s.next)),xe.createElement("span",{className:"rbc-toolbar-label"},i),xe.createElement("span",{className:"rbc-btn-group"},this.viewNamesGroup(s)))}},{key:"viewNamesGroup",value:function(r){var s=this,i=this.props.views,o=this.props.view;if(i.length>1)return i.map(function(a){return xe.createElement("button",{type:"button",key:a,className:Ls({"rbc-active":o===a}),onClick:s.view.bind(null,a)},r[a])})}}]),e})(xe.Component);function $Ye(t,e){var n=null;return typeof e=="function"?n=e(t):typeof e=="string"&&Gd(t)==="object"&&t!=null&&e in t&&(n=t[e]),n}var pp=function(e){return function(n){return $Ye(n,e)}},zYe=["view","date","getNow","onNavigate"],FYe=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function Que(t){if(Array.isArray(t))return t;for(var e=[],n=0,r=Object.entries(t);n<r.length;n++){var s=_d(r[n],2),i=s[0],o=s[1];o&&e.push(i)}return e}function BYe(t,e){var n=e.views,r=Que(n);return r.indexOf(t)!==-1}var ede=(function(t){Wo(e,t);function e(){var n;Si(this,e);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return n=Vo(this,e,[].concat(s)),n.getViews=function(){var o=n.props.views;return Array.isArray(o)?pWe(o,function(a,l){return a[l]=bk[l]},{}):Gd(o)==="object"?gWe(o,function(a,l){return a===!0?bk[l]:a}):bk},n.getView=function(){var o=n.getViews();return o[n.props.view]},n.getDrilldownView=function(o){var a=n.props,l=a.view,c=a.drilldownView,d=a.getDrilldownView;return d?d(o,l,Object.keys(n.getViews())):c},n.handleRangeChange=function(o,a,l){var c=n.props,d=c.onRangeChange,f=c.localizer;d&&a.range&&d(a.range(o,{localizer:f}),l)},n.handleNavigate=function(o,a){var l=n.props,c=l.view,d=l.date,f=l.getNow,p=l.onNavigate,m=zu(l,zYe),v=n.getView(),y=f();d=LYe(v,hr(hr({},m),{},{action:o,date:a||d||y,today:y})),p(d,c,o),n.handleRangeChange(d,v)},n.handleViewChange=function(o){o!==n.props.view&&BYe(o,n.props)&&n.props.onView(o);var a=n.getViews();n.handleRangeChange(n.props.date||n.props.getNow(),a[o],o)},n.handleSelectEvent=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onSelectEvent,a)},n.handleDoubleClickEvent=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onDoubleClickEvent,a)},n.handleKeyPressEvent=function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];ns(n.props.onKeyPressEvent,a)},n.handleSelectSlot=function(o){ns(n.props.onSelectSlot,o)},n.handleDrillDown=function(o,a){var l=n.props.onDrillDown;if(l){l(o,a,n.drilldownView);return}a&&n.handleViewChange(a),n.handleNavigate(mi.DATE,o)},n.state={context:e.getContext(n.props)},n}return wi(e,[{key:"render",value:function(){var r=this.props,s=r.view,i=r.toolbar,o=r.events,a=r.backgroundEvents,l=r.style,c=r.className,d=r.elementProps,f=r.date,p=r.getNow,m=r.length,v=r.showMultiDayTimes,y=r.onShowMore,x=r.doShowMoreDrillDown;r.components,r.formats,r.messages,r.culture;var w=zu(r,FYe);f=f||p();var C=this.getView(),E=this.state.context,D=E.accessors,T=E.components,A=E.getters,_=E.localizer,R=E.viewNames,N=T.toolbar||PYe,I=C.title(f,{localizer:_,length:m});return xe.createElement("div",Object.assign({},d,{className:Ls(c,"rbc-calendar",w.rtl&&"rbc-rtl"),style:l}),i&&xe.createElement(N,{date:f,view:s,views:R,label:I,onView:this.handleViewChange,onNavigate:this.handleNavigate,localizer:_}),xe.createElement(C,Object.assign({},w,{events:o,backgroundEvents:a,date:f,getNow:p,length:m,localizer:_,getters:A,components:T,accessors:D,showMultiDayTimes:v,getDrilldownView:this.getDrilldownView,onNavigate:this.handleNavigate,onDrillDown:this.handleDrillDown,onSelectEvent:this.handleSelectEvent,onDoubleClickEvent:this.handleDoubleClickEvent,onKeyPressEvent:this.handleKeyPressEvent,onSelectSlot:this.handleSelectSlot,onShowMore:y,doShowMoreDrillDown:x})))}}],[{key:"getDerivedStateFromProps",value:function(r){return{context:e.getContext(r)}}},{key:"getContext",value:function(r){var s=r.startAccessor,i=r.endAccessor,o=r.allDayAccessor,a=r.tooltipAccessor,l=r.titleAccessor,c=r.resourceAccessor,d=r.resourceIdAccessor,f=r.resourceTitleAccessor,p=r.eventPropGetter,m=r.backgroundEventPropGetter,v=r.slotPropGetter,y=r.slotGroupPropGetter,x=r.dayPropGetter,w=r.view,C=r.views,E=r.localizer,D=r.culture,T=r.messages,A=T===void 0?{}:T,_=r.components,R=_===void 0?{}:_,N=r.formats,I=N===void 0?{}:N,$=Que(C),L=WWe(A);return{viewNames:$,localizer:UWe(E,D,I,L),getters:{eventProp:function(){return p&&p.apply(void 0,arguments)||{}},backgroundEventProp:function(){return m&&m.apply(void 0,arguments)||{}},slotProp:function(){return v&&v.apply(void 0,arguments)||{}},slotGroupProp:function(){return y&&y.apply(void 0,arguments)||{}},dayProp:function(){return x&&x.apply(void 0,arguments)||{}}},components:uWe(R[w]||{},aWe(R,$),{eventWrapper:kd,backgroundEventWrapper:kd,eventContainerWrapper:kd,dateCellWrapper:kd,weekWrapper:kd,timeSlotWrapper:kd,timeGutterWrapper:kd}),accessors:{start:pp(s),end:pp(i),allDay:pp(o),tooltip:pp(a),title:pp(l),resource:pp(c),resourceId:pp(d),resourceTitle:pp(f)}}}}]),e})(xe.Component);ede.defaultProps={events:[],backgroundEvents:[],elementProps:{},popup:!1,toolbar:!0,view:ha.MONTH,views:[ha.MONTH,ha.WEEK,ha.DAY,ha.AGENDA],step:30,length:30,allDayMaxRows:1/0,doShowMoreDrillDown:!0,drilldownView:ha.DAY,titleAccessor:"title",tooltipAccessor:"title",allDayAccessor:"allDay",startAccessor:"start",endAccessor:"end",resourceAccessor:"resourceId",resourceIdAccessor:"id",resourceTitleAccessor:"title",longPressThreshold:250,getNow:function(){return new Date},dayLayoutAlgorithm:"overlap"};var HYe=Bce(ede,{view:"onView",date:"onNavigate",selected:"onSelectEvent"});function qYe(t){return/s$/.test(t)?t:t+"s"}var UYe=function(e,n,r){var s=e.start,i=e.end;return r.format(s,"MMMM dd",n)+" – "+r.format(i,r.eq(s,i,"month")?"dd":"MMMM dd",n)},VYe=function(e,n,r){var s=e.start,i=e.end;return r.format(s,"D",n)+" – "+r.format(i,"D",n)},U6=function(e,n,r){var s=e.start,i=e.end;return r.format(s,"t",n)+" – "+r.format(i,"t",n)},WYe=function(e,n,r){var s=e.start;return r.format(s,"t",n)+" – "},YYe=function(e,n,r){var s=e.end;return" – "+r.format(s,"t",n)},GYe={dateFormat:"dd",dayFormat:"dd EEE",weekdayFormat:"EEE",selectRangeFormat:U6,eventTimeRangeFormat:U6,eventTimeRangeStartFormat:WYe,eventTimeRangeEndFormat:YYe,timeGutterFormat:"t",monthHeaderFormat:"MMMM yyyy",dayHeaderFormat:"EEEE MMM dd",dayRangeHeaderFormat:UYe,agendaHeaderFormat:VYe,agendaDateFormat:"EEE MMM dd",agendaTimeFormat:"t",agendaTimeRangeFormat:U6};function hp(t){var e=t&&qYe(t.toLowerCase());return e==="FullYear"?e="year":e||(e=void 0),e}function tde(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.firstDayOfWeek,r=n===void 0?7:n,s=e.zone,i=s?{zone:s}:{};function o(ne,ee){return t.fromJSDate(ne,i).toFormat(ee)}function a(ne,ee,oe){return t.fromJSDate(ne,i).setLocale(ee).toFormat(oe)}function l(ne,ee,oe){var ce=hp(oe),ue=ce?t.fromJSDate(ne,i).startOf(ce):t.fromJSDate(ne,i),pe=ce?t.fromJSDate(ee,i).startOf(ce):t.fromJSDate(ee,i);return[ue,pe,ce]}function c(ne){var ee=ne.weekday;if(ee===r)return ne.startOf("day");if(r===1)return ne.startOf("week");var oe=r===7?ee:ee+(7-r);return ne.minus({day:oe}).startOf("day")}function d(ne){var ee=ne.weekday,oe=r===1?7:r-1;if(ee===oe)return ne.endOf("day");if(r===1)return ne.endOf("week");var ce=r>oe?ne.plus({day:r-oe}):ne;return ce.set({weekday:oe}).endOf("day")}function f(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,ee=arguments.length>1?arguments[1]:void 0,oe=hp(ee);if(oe){var ce=t.fromJSDate(ne,i);return oe.includes("week")?c(ce):ce.startOf(oe)}return t.fromJSDate(ne,i)}function p(){return r}function m(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,ee=arguments.length>1?arguments[1]:void 0;return f(ne,ee).toJSDate()}function v(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,ee=arguments.length>1?arguments[1]:void 0,oe=hp(ee);if(oe){var ce=t.fromJSDate(ne,i);return oe.includes("week")?d(ce):ce.endOf(oe)}return t.fromJSDate(ne,i)}function y(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date,ee=arguments.length>1?arguments[1]:void 0;return v(ne,ee).toJSDate()}function x(ne,ee,oe){var ce=l(ne,ee,oe),ue=_d(ce,2),pe=ue[0],de=ue[1];return+pe==+de}function w(ne,ee,oe){return!x(ne,ee,oe)}function C(ne,ee,oe){var ce=l(ne,ee,oe),ue=_d(ce,2),pe=ue[0],de=ue[1];return+pe>+de}function E(ne,ee,oe){var ce=l(ne,ee,oe),ue=_d(ce,2),pe=ue[0],de=ue[1];return+pe<+de}function D(ne,ee,oe){var ce=l(ne,ee,oe),ue=_d(ce,2),pe=ue[0],de=ue[1];return+pe>=+de}function T(ne,ee,oe){var ce=l(ne,ee,oe),ue=_d(ce,2),pe=ue[0],de=ue[1];return+pe<=+de}function A(ne,ee,oe){var ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",ue=hp(ce),pe=f(ne,ue),de=f(ee,ue),me=f(oe,ue);return+pe>=+de&&+pe<=+me}function _(ne,ee){var oe=t.fromJSDate(ne,i),ce=t.fromJSDate(ee,i),ue=t.min(oe,ce);return ue.toJSDate()}function R(ne,ee){var oe=t.fromJSDate(ne,i),ce=t.fromJSDate(ee,i),ue=t.max(oe,ce);return ue.toJSDate()}function N(ne,ee){if(!ne&&!ee)return null;var oe=t.fromJSDate(ee,i),ce=f(ne,"day");return ce.set({hour:oe.hour,minute:oe.minute,second:oe.second,millisecond:oe.millisecond}).toJSDate()}function I(ne,ee,oe){var ce=hp(oe);return t.fromJSDate(ne,i).plus(Ad({},ce,ee)).toJSDate()}function $(ne,ee){for(var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",ce=hp(oe),ue=t.fromJSDate(ne,i).toJSDate(),pe=[];T(ue,ee);)pe.push(ue),ue=I(ue,1,ce);return pe}function L(ne,ee){var oe=hp(ee),ce=m(ne,oe);return x(ce,ne)?ce:I(ce,1,oe)}function z(ne,ee){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",ce=hp(oe),ue=t.fromJSDate(ne,i),pe=t.fromJSDate(ee,i);return Math.floor(pe.diff(ue,ce,{conversionAccuracy:"longterm"}).toObject()[ce])}function F(ne){var ee=f(ne,"month");return c(ee).toJSDate()}function q(ne){var ee=v(ne,"month");return d(ee).toJSDate()}function H(ne){for(var ee=F(ne),oe=q(ne),ce=[];T(ee,oe);)ce.push(ee),ee=I(ee,1,"day");return ce}function B(ne,ee,oe){return f(ne,"day").set({minutes:ee+oe}).toJSDate()}function V(ne,ee){return z(ne,ee,"minutes")}function Y(ne){var ee=f(ne,"day"),oe=t.fromJSDate(ne,i);return Math.round(oe.diff(ee,"minutes",{conversionAccuracy:"longterm"}).toObject().minutes)}function G(ne,ee){return E(ne,ee)}function W(ne,ee,oe){return D(ee,oe)}function Z(ne){var ee=ne.evtA,oe=ee.start,ce=ee.end,ue=ee.allDay,pe=ne.evtB,de=pe.start,me=pe.end,Se=pe.allDay,De=+m(oe,"day")-+m(de,"day"),Ae=z(oe,L(ce,"day"),"day"),fe=z(de,L(me,"day"),"day");return De||Math.max(fe,1)-Math.max(Ae,1)||!!Se-!!ue||+oe-+de||+ce-+me}function Q(ne){var ee=ne.event,oe=ee.start,ce=ee.end,ue=ne.range,pe=ue.start,de=ue.end,me=m(oe,"day"),Se=T(me,de,"day"),De=w(me,ce,"minutes"),Ae=De?C(ce,pe,"minutes"):D(ce,pe,"minutes");return Se&&Ae}function X(ne,ee){var oe=t.fromJSDate(ne,i),ce=t.fromJSDate(ee,i);return oe.hasSame(ce,"day")}function re(){var ne=new Date,ee=/-/.test(ne.toString())?"-":"",oe=ne.getTimezoneOffset(),ce=Number("".concat(ee).concat(Math.abs(oe))),ue=s?t.local().setZone(s).offset:t.local().offset;return ue>ce?1:0}return new qWe({format:function(ee,oe,ce){return ce?a(ee,ce,oe):o(ee,oe)},formats:GYe,firstOfWeek:p,firstVisibleDay:F,lastVisibleDay:q,visibleDays:H,lt:E,lte:T,gt:C,gte:D,eq:x,neq:w,merge:N,inRange:A,startOf:m,endOf:y,range:$,add:I,diff:z,ceil:L,min:_,max:R,getSlotDate:B,getTotalMin:V,getMinutesFromMidnight:Y,continuesPrior:G,continuesAfter:W,sortEvents:Z,inEventRange:Q,isSameDate:X,browserTZOffset:re})}var px={},V6={exports:{}},tJ;function po(){return tJ||(tJ=1,(function(t){function e(n){return n&&n.__esModule?n:{default:n}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(V6)),V6.exports}var xD={},W6={exports:{}},Y6={exports:{}},G6={exports:{}},K6={exports:{}},nJ;function eb(){return nJ||(nJ=1,(function(t){function e(n){"@babel/helpers - typeof";return t.exports=e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(K6)),K6.exports}var Z6={exports:{}},rJ;function KYe(){return rJ||(rJ=1,(function(t){var e=eb().default;function n(r,s){if(e(r)!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var o=i.call(r,s||"default");if(e(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(Z6)),Z6.exports}var sJ;function nde(){return sJ||(sJ=1,(function(t){var e=eb().default,n=KYe();function r(s){var i=n(s,"string");return e(i)=="symbol"?i:i+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(G6)),G6.exports}var iJ;function rde(){return iJ||(iJ=1,(function(t){var e=nde();function n(r,s,i){return(s=e(s))in r?Object.defineProperty(r,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[s]=i,r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(Y6)),Y6.exports}var oJ;function bv(){return oJ||(oJ=1,(function(t){var e=rde();function n(s,i){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(s,l).enumerable})),o.push.apply(o,a)}return o}function r(s){for(var i=1;i<arguments.length;i++){var o=arguments[i]!=null?arguments[i]:{};i%2?n(Object(o),!0).forEach(function(a){e(s,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach(function(a){Object.defineProperty(s,a,Object.getOwnPropertyDescriptor(o,a))})}return s}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(W6)),W6.exports}var J6={exports:{}},X6={exports:{}},aJ;function ZYe(){return aJ||(aJ=1,(function(t){function e(n,r){if(n==null)return{};var s={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(r.indexOf(i)!==-1)continue;s[i]=n[i]}return s}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(X6)),X6.exports}var lJ;function $z(){return lJ||(lJ=1,(function(t){var e=ZYe();function n(r,s){if(r==null)return{};var i,o,a=e(r,s);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(o=0;o<l.length;o++)i=l[o],s.indexOf(i)===-1&&{}.propertyIsEnumerable.call(r,i)&&(a[i]=r[i])}return a}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(J6)),J6.exports}var Q6={exports:{}},cJ;function xv(){return cJ||(cJ=1,(function(t){function e(n,r){if(!(n instanceof r))throw new TypeError("Cannot call a class as a function")}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(Q6)),Q6.exports}var eI={exports:{}},uJ;function Sv(){return uJ||(uJ=1,(function(t){var e=nde();function n(s,i){for(var o=0;o<i.length;o++){var a=i[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(s,e(a.key),a)}}function r(s,i,o){return i&&n(s.prototype,i),o&&n(s,o),Object.defineProperty(s,"prototype",{writable:!1}),s}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(eI)),eI.exports}var tI={exports:{}},nI={exports:{}},dJ;function JYe(){return dJ||(dJ=1,(function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(nI)),nI.exports}var rI={exports:{}},fJ;function XYe(){return fJ||(fJ=1,(function(t){function e(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t.exports=e=function(){return!!n},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(rI)),rI.exports}var sI={exports:{}},iI={exports:{}},pJ;function QYe(){return pJ||(pJ=1,(function(t){function e(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(iI)),iI.exports}var hJ;function eGe(){return hJ||(hJ=1,(function(t){var e=eb().default,n=QYe();function r(s,i){if(i&&(e(i)=="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(s)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(sI)),sI.exports}var mJ;function tb(){return mJ||(mJ=1,(function(t){var e=JYe(),n=XYe(),r=eGe();function s(i,o,a){return o=e(o),r(i,n()?Reflect.construct(o,a||[],e(i).constructor):o.apply(i,a))}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports})(tI)),tI.exports}var oI={exports:{}},aI={exports:{}},gJ;function tGe(){return gJ||(gJ=1,(function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,i){return s.__proto__=i,s},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(aI)),aI.exports}var vJ;function nb(){return vJ||(vJ=1,(function(t){var e=tGe();function n(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(s&&s.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),s&&e(r,s)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(oI)),oI.exports}const cC=sw(FBe);var Ha={},eg={},yJ;function nGe(){return yJ||(yJ=1,Object.defineProperty(eg,"__esModule",{value:!0}),eg.views=eg.navigate=void 0,eg.navigate={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"},eg.views={MONTH:"month",WEEK:"week",WORK_WEEK:"work_week",DAY:"day",AGENDA:"agenda"}),eg}var bJ;function rGe(){if(bJ)return Ha;bJ=1;var t=po().default;Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.views=Ha.dateRangeFormat=Ha.dateFormat=Ha.accessor=Ha.DayLayoutAlgorithmPropType=void 0;var e=t(V_()),n=nGe(),r=Object.keys(n.views).map(function(s){return n.views[s]});return Ha.accessor=e.default.oneOfType([e.default.string,e.default.func]),Ha.dateFormat=e.default.any,Ha.dateRangeFormat=e.default.func,Ha.views=e.default.oneOfType([e.default.arrayOf(e.default.oneOf(r)),e.default.objectOf(function(s,i){var o=r.indexOf(i)!==-1&&typeof s[i]=="boolean";if(o)return null;for(var a=arguments.length,l=new Array(a>2?a-2:0),c=2;c<a;c++)l[c-2]=arguments[c];return e.default.elementType.apply(e.default,[s,i].concat(l))})]),Ha.DayLayoutAlgorithmPropType=e.default.oneOfType([e.default.oneOf(["overlap","no-overlap"]),e.default.func]),Ha}var hx={},xy={},xJ;function sde(){if(xJ)return xy;xJ=1;var t=po().default;Object.defineProperty(xy,"__esModule",{value:!0}),xy.accessor=n,xy.wrapAccessor=void 0;var e=t(eb());function n(r,s){var i=null;return typeof s=="function"?i=s(r):typeof s=="string"&&(0,e.default)(r)==="object"&&r!=null&&s in r&&(i=r[s]),i}return xy.wrapAccessor=function(s){return function(i){return n(i,s)}},xy}var mx={},SJ;function tO(){if(SJ)return mx;SJ=1;var t=po().default;Object.defineProperty(mx,"__esModule",{value:!0}),mx.DnDContext=void 0;var e=t(vi());return mx.DnDContext=e.default.createContext(),mx}var wJ;function sGe(){if(wJ)return hx;wJ=1;var t=po().default;Object.defineProperty(hx,"__esModule",{value:!0}),hx.default=void 0;var e=t(xv()),n=t(Sv()),r=t(tb()),s=t(nb()),i=t(vi()),o=t(cC),a=sde(),l=tO(),c=(function(d){(0,s.default)(f,d);function f(){var p;(0,e.default)(this,f);for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];return p=(0,r.default)(this,f,[].concat(v)),p.handleResizeUp=function(x){x.button===0&&p.context.draggable.onBeginAction(p.props.event,"resize","UP")},p.handleResizeDown=function(x){x.button===0&&p.context.draggable.onBeginAction(p.props.event,"resize","DOWN")},p.handleResizeLeft=function(x){x.button===0&&p.context.draggable.onBeginAction(p.props.event,"resize","LEFT")},p.handleResizeRight=function(x){x.button===0&&p.context.draggable.onBeginAction(p.props.event,"resize","RIGHT")},p.handleStartDragging=function(x){var w;if(x.button===0){var C=(w=x.target.getAttribute("class"))===null||w===void 0?void 0:w.includes("rbc-addons-dnd-resize");C||p.context.draggable.onBeginAction(p.props.event,"move")}},p}return(0,n.default)(f,[{key:"renderAnchor",value:function(m){var v=m==="Up"||m==="Down"?"ns":"ew";return i.default.createElement("div",{className:"rbc-addons-dnd-resize-".concat(v,"-anchor"),onMouseDown:this["handleResize".concat(m)]},i.default.createElement("div",{className:"rbc-addons-dnd-resize-".concat(v,"-icon")}))}},{key:"render",value:function(){var m=this.props,v=m.event,y=m.type,x=m.continuesPrior,w=m.continuesAfter,C=m.resizable,E=this.props.children;if(v.__isPreview)return i.default.cloneElement(E,{className:(0,o.default)(E.props.className,"rbc-addons-dnd-drag-preview")});var D=this.context.draggable,T=D.draggableAccessor,A=D.resizableAccessor,_=T?!!(0,a.accessor)(v,T):!0;if(!_)return E;var R=C&&(A?!!(0,a.accessor)(v,A):!0);if(R||_){var N={onMouseDown:this.handleStartDragging,onTouchStart:this.handleStartDragging};if(R){var I=null,$=null;y==="date"?(I=!x&&this.renderAnchor("Left"),$=!w&&this.renderAnchor("Right")):(I=!x&&this.renderAnchor("Up"),$=!w&&this.renderAnchor("Down")),N.children=i.default.createElement("div",{className:"rbc-addons-dnd-resizable"},I,E.props.children,$)}D.dragAndDropAction.interacting&&D.dragAndDropAction.event===v&&(N.className=(0,o.default)(E.props.className,"rbc-addons-dnd-dragged-event")),E=i.default.cloneElement(E,N)}return E}}]),f})(i.default.Component);return c.contextType=l.DnDContext,hx.default=c,hx}var gx={},lI={exports:{}},CJ;function ide(){return CJ||(CJ=1,(function(t){var e=eb().default;function n(r,s){if(typeof WeakMap=="function")var i=new WeakMap,o=new WeakMap;return(t.exports=n=function(l,c){if(!c&&l&&l.__esModule)return l;var d,f,p={__proto__:null,default:l};if(l===null||e(l)!="object"&&typeof l!="function")return p;if(d=c?o:i){if(d.has(l))return d.get(l);d.set(l,p)}for(var m in l)m!=="default"&&{}.hasOwnProperty.call(l,m)&&((f=(d=Object.defineProperty)&&Object.getOwnPropertyDescriptor(l,m))&&(f.get||f.set)?d(p,m,f):p[m]=l[m]);return p},t.exports.__esModule=!0,t.exports.default=t.exports)(r,s)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(lI)),lI.exports}function zz(t,e,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),t){var s=document.createEvent("HTMLEvents");s.initEvent(e,n,r),t.dispatchEvent(s)}}function iGe(t){var e=Li(t,"transitionDuration")||"",n=e.indexOf("ms")===-1?1e3:1;return parseFloat(e)*n}function oGe(t,e,n){n===void 0&&(n=5);var r=!1,s=setTimeout(function(){r||zz(t,"transitionend",!0)},e+n),i=Cu(t,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(s),i()}}function Fz(t,e,n,r){n==null&&(n=iGe(t)||0);var s=oGe(t,n,r),i=Cu(t,"transitionend",e);return function(){s(),i()}}var EJ={transition:"","transition-duration":"","transition-delay":"","transition-timing-function":""};function MJ(t){var e=t.node,n=t.properties,r=t.duration,s=r===void 0?200:r,i=t.easing,o=t.callback,a=[],l={},c="";Object.keys(n).forEach(function(p){var m=n[p];eue(p)?c+=p+"("+m+") ":(l[p]=m,a.push(Qce(p)))}),c&&(l.transform=c,a.push("transform"));function d(p){p.target===p.currentTarget&&(Li(e,EJ),o&&o.call(this,p))}s>0&&(l.transition=a.join(", "),l["transition-duration"]=s/1e3+"s",l["transition-delay"]="0s",l["transition-timing-function"]=i||"linear");var f=Fz(e,d,s);return e.clientLeft,Li(e,l),{cancel:function(){f(),Li(e,EJ)}}}function ode(t,e,n,r,s){if(!("nodeType"in t))return MJ(t);if(!e)throw new Error("must include properties to animate");return typeof r=="function"&&(s=r,r=""),MJ({node:t,properties:e,duration:n,easing:r,callback:s})}function ade(t,e,n){if(t){if(typeof n>"u")return t.getAttribute(e);!n&&n!==""?t.removeAttribute(e):t.setAttribute(e,String(n))}}function lde(t){return t?Array.from(t.children):[]}function cde(t){if(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}return null}var aGe=Function.prototype.bind.call(Function.prototype.call,[].slice);function ude(t){return t?aGe(t.childNodes):[]}function dde(t,e){return function(r){var s=r.currentTarget,i=r.target,o=eC(s,t);o.some(function(a){return Kd(a,i)})&&e.call(this,r)}}function fde(t,e){return t&&e&&e.parentNode?(e.nextSibling?e.parentNode.insertBefore(t,e.nextSibling):e.parentNode.appendChild(t),t):null}var lGe=/^(?:input|select|textarea|button)$/i;function pde(t){return t?lGe.test(t.nodeName):!1}function hde(t){return t?!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length):!1}function mde(t,e,n){e===void 0&&(e=null),n===void 0&&(n=null);for(var r=[];t;t=t.nextElementSibling)if(t!==e){if(n&&P3(t,n))break;r.push(t)}return r}function gde(t,e){return mde(t,t,e)}function cGe(t,e){var n=null,r=[];for(n=t?t[e]:null;n&&n.nodeType!==9;)r.push(n),n=n[e]||null;return r}function vde(t){return cGe(t,"parentElement")}function yde(t,e){return t&&e?(e.firstElementChild?e.insertBefore(t,e.firstElementChild):e.appendChild(t),t):null}function bde(t){return t&&t.parentNode?(t.parentNode.removeChild(t),t):null}function Bz(t,e){var n=Li(t,"position"),r=n==="absolute",s=t.ownerDocument;if(n==="fixed")return s||document;for(;(t=t.parentNode)&&!tue(t);){var i=r&&Li(t,"position")==="static",o=(Li(t,"overflow")||"")+(Li(t,"overflow-y")||"")+Li(t,"overflow-x");if(!i&&/(auto|scroll)/.test(o)&&(e||eh(t)<t.scrollHeight))return t}return s||document}function xde(t,e){var n=Ml(t),r={top:0,left:0};if(t){var s=e||Bz(t),i=I3(s),o=f1(s),a=eh(s,!0);i||(r=Ml(s)),n={top:n.top-r.top,left:n.left-r.left,height:n.height,width:n.width};var l=n.height,c=n.top+(i?0:o),d=c+l;o=o>c?c:d>o+a?d-a:o;var f=X1(function(){return f1(s,o)});return function(){return p1(f)}}}function Sde(t){return mde(t&&t.parentElement?t.parentElement.firstElementChild:null,t)}var uGe=/&nbsp;/gi,dGe=/\xA0/g,fGe=/\s+([^\s])/gm;function wde(t,e,n){e===void 0&&(e=!0),n===void 0&&(n=!0);var r="";return t&&(r=(t.textContent||"").replace(uGe," ").replace(dGe," "),e&&(r=r.trim()),n&&(r=r.replace(fGe," $1"))),r}function Cde(t,e){t.classList?t.classList.toggle(e):W_(t,e)?G_(t,e):Y_(t,e)}const pGe={addEventListener:az,removeEventListener:gz,triggerEvent:zz,animate:ode,filter:dde,listen:Cu,style:Li,getComputedStyle:sz,attribute:ade,activeElement:due,ownerDocument:jh,ownerWindow:rz,requestAnimationFrame:X1,cancelAnimationFrame:p1,matches:P3,height:eh,width:y1,offset:Ml,offsetParent:iz,position:Qw,contains:Kd,scrollbarSize:rC,scrollLeft:L3,scrollParent:Bz,scrollTo:xde,scrollTop:f1,querySelectorAll:eC,closest:iC,addClass:Y_,removeClass:G_,hasClass:W_,toggleClass:Cde,transitionEnd:Fz,childNodes:ude,childElements:lde,nextUntil:gde,parents:vde,siblings:Sde,clear:cde,insertAfter:fde,isInput:pde,isVisible:hde,prepend:yde,remove:bde,text:wde},hGe=Object.freeze(Object.defineProperty({__proto__:null,activeElement:due,addClass:Y_,addEventListener:az,animate:ode,attribute:ade,cancelAnimationFrame:p1,childElements:lde,childNodes:ude,clear:cde,closest:iC,contains:Kd,default:pGe,filter:dde,getComputedStyle:sz,hasClass:W_,height:eh,insertAfter:fde,isInput:pde,isVisible:hde,listen:Cu,matches:P3,nextUntil:gde,offset:Ml,offsetParent:iz,ownerDocument:jh,ownerWindow:rz,parents:vde,position:Qw,prepend:yde,querySelectorAll:eC,remove:bde,removeClass:G_,removeEventListener:gz,requestAnimationFrame:X1,scrollLeft:L3,scrollParent:Bz,scrollTo:xde,scrollTop:f1,scrollbarSize:rC,siblings:Sde,style:Li,text:wde,toggleClass:Cde,transitionEnd:Fz,triggerEvent:zz,width:y1},Symbol.toStringTag,{value:"Module"})),mGe=sw(hGe);var SD={exports:{}},DJ;function gGe(){return DJ||(DJ=1,(function(t,e){e.__esModule=!0,e.default=r;var n=Function.prototype.bind.call(Function.prototype.call,[].slice);function r(s,i){return n(s.querySelectorAll(i))}t.exports=e.default})(SD,SD.exports)),SD.exports}var cc={};const vGe=sw(vHe),yGe=sw(HUe),bGe=sw(Rqe);var kJ;function Ede(){if(kJ)return cc;kJ=1;var t=po().default;Object.defineProperty(cc,"__esModule",{value:!0}),cc.default=void 0,cc.getBoundsForNode=E,cc.getEventNodeFromPoint=c,cc.getShowMoreNodeFromPoint=d,cc.isEvent=f,cc.isShowMore=p,cc.objectsCollide=C;var e=t(eb()),n=t(xv()),r=t(Sv()),s=t(vGe),i=t(yGe),o=t(bGe);function a(T,A){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return(0,o.default)(_,T,A,{passive:!1})}function l(T,A,_){return!T||(0,s.default)(T,document.elementFromPoint(A,_))}function c(T,A){var _=A.clientX,R=A.clientY,N=document.elementFromPoint(_,R);return(0,i.default)(N,".rbc-event",T)}function d(T,A){var _=A.clientX,R=A.clientY,N=document.elementFromPoint(_,R);return(0,i.default)(N,".rbc-show-more",T)}function f(T,A){return!!c(T,A)}function p(T,A){return!!d(T,A)}function m(T){var A=T;return T.touches&&T.touches.length&&(A=T.touches[0]),{clientX:A.clientX,clientY:A.clientY,pageX:A.pageX,pageY:A.pageY}}var v=5,y=250,x=(function(){function T(A){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=_.global,N=R===void 0?!1:R,I=_.longPressThreshold,$=I===void 0?250:I,L=_.validContainers,z=L===void 0?[]:L;(0,n.default)(this,T),this.isDetached=!1,this.container=A,this.globalMouse=!A||N,this.longPressThreshold=$,this.validContainers=z,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=a("touchmove",function(){},window),this._removeKeyDownListener=a("keydown",this._keyListener),this._removeKeyUpListener=a("keyup",this._keyListener),this._removeDropFromOutsideListener=a("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=a("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return(0,r.default)(T,[{key:"on",value:function(_,R){var N=this._listeners[_]||(this._listeners[_]=[]);return N.push(R),{remove:function(){var $=N.indexOf(R);$!==-1&&N.splice($,1)}}}},{key:"emit",value:function(_){for(var R=arguments.length,N=new Array(R>1?R-1:0),I=1;I<R;I++)N[I-1]=arguments[I];var $,L=this._listeners[_]||[];return L.forEach(function(z){$===void 0&&($=z.apply(void 0,N))}),$}},{key:"teardown",value:function(){this.isDetached=!0,this._listeners=Object.create(null),this._removeTouchMoveWindowListener&&this._removeTouchMoveWindowListener(),this._removeInitialEventListener&&this._removeInitialEventListener(),this._removeEndListener&&this._removeEndListener(),this._onEscListener&&this._onEscListener(),this._removeMoveListener&&this._removeMoveListener(),this._removeKeyUpListener&&this._removeKeyUpListener(),this._removeKeyDownListener&&this._removeKeyDownListener(),this._removeDropFromOutsideListener&&this._removeDropFromOutsideListener(),this._removeDragOverFromOutsideListener&&this._removeDragOverFromOutsideListener()}},{key:"isSelected",value:function(_){var R=this._selectRect;return!R||!this.selecting?!1:C(R,E(_))}},{key:"filter",value:function(_){var R=this._selectRect;return!R||!this.selecting?[]:_.filter(this.isSelected,this)}},{key:"_addLongPressListener",value:function(_,R){var N=this,I=null,$=null,L=null,z=function(B){I=setTimeout(function(){q(),_(B)},N.longPressThreshold),$=a("touchmove",function(){return q()}),L=a("touchend",function(){return q()})},F=a("touchstart",z),q=function(){I&&clearTimeout(I),$&&$(),L&&L(),I=null,$=null,L=null};return R&&z(R),function(){q(),F()}}},{key:"_addInitialEventListener",value:function(){var _=this,R=a("mousedown",function(I){_._removeInitialEventListener(),_._handleInitialEvent(I),_._removeInitialEventListener=a("mousedown",_._handleInitialEvent)}),N=a("touchstart",function(I){_._removeInitialEventListener(),_._removeInitialEventListener=_._addLongPressListener(_._handleInitialEvent,I)});this._removeInitialEventListener=function(){R(),N()}}},{key:"_dropFromOutsideListener",value:function(_){var R=m(_),N=R.pageX,I=R.pageY,$=R.clientX,L=R.clientY;this.emit("dropFromOutside",{x:N,y:I,clientX:$,clientY:L}),_.preventDefault()}},{key:"_dragOverFromOutsideListener",value:function(_){var R=m(_),N=R.pageX,I=R.pageY,$=R.clientX,L=R.clientY;this.emit("dragOverFromOutside",{x:N,y:I,clientX:$,clientY:L}),_.preventDefault()}},{key:"_handleInitialEvent",value:function(_){if(!this.isDetached){var R=m(_),N=R.clientX,I=R.clientY,$=R.pageX,L=R.pageY,z=this.container(),F,q;if(!(_.which===3||_.button===2||!l(z,N,I))){if(!this.globalMouse&&z&&!(0,s.default)(z,_.target)){var H=w(0),B=H.top,V=H.left,Y=H.bottom,G=H.right;if(q=E(z),F=C({top:q.top-B,left:q.left-V,bottom:q.bottom+Y,right:q.right+G},{top:L,left:$}),!F)return}var W=this.emit("beforeSelect",this._initialEventData={isTouch:/^touch/.test(_.type),x:$,y:L,clientX:N,clientY:I});if(W!==!1)switch(_.type){case"mousedown":this._removeEndListener=a("mouseup",this._handleTerminatingEvent),this._onEscListener=a("keydown",this._handleTerminatingEvent),this._removeMoveListener=a("mousemove",this._handleMoveEvent);break;case"touchstart":this._handleMoveEvent(_),this._removeEndListener=a("touchend",this._handleTerminatingEvent),this._removeMoveListener=a("touchmove",this._handleMoveEvent);break}}}}},{key:"_isWithinValidContainer",value:function(_){var R=_.target,N=this.validContainers;return!N||!N.length||!R?!0:N.some(function(I){return!!R.closest(I)})}},{key:"_handleTerminatingEvent",value:function(_){var R=m(_),N=R.pageX,I=R.pageY;if(this.selecting=!1,this._removeEndListener&&this._removeEndListener(),this._removeMoveListener&&this._removeMoveListener(),!!this._initialEventData){var $=!this.container||(0,s.default)(this.container(),_.target),L=this._isWithinValidContainer(_),z=this._selectRect,F=this.isClick(N,I);return this._initialEventData=null,_.key==="Escape"||!L?this.emit("reset"):F&&$?this._handleClickEvent(_):F?this.emit("reset"):this.emit("select",z)}}},{key:"_handleClickEvent",value:function(_){var R=m(_),N=R.pageX,I=R.pageY,$=R.clientX,L=R.clientY,z=new Date().getTime();return this._lastClickData&&z-this._lastClickData.timestamp<y?(this._lastClickData=null,this.emit("doubleClick",{x:N,y:I,clientX:$,clientY:L})):(this._lastClickData={timestamp:z},this.emit("click",{x:N,y:I,clientX:$,clientY:L}))}},{key:"_handleMoveEvent",value:function(_){if(!(this._initialEventData===null||this.isDetached)){var R=this._initialEventData,N=R.x,I=R.y,$=m(_),L=$.pageX,z=$.pageY,F=Math.abs(N-L),q=Math.abs(I-z),H=Math.min(L,N),B=Math.min(z,I),V=this.selecting;this.isClick(L,z)&&!V&&!(F||q)||(this.selecting=!0,this._selectRect={top:B,left:H,x:L,y:z,right:H+F,bottom:B+q},V||this.emit("selectStart",this._initialEventData),this.isClick(L,z)||this.emit("selecting",this._selectRect),_.preventDefault())}}},{key:"_keyListener",value:function(_){this.ctrl=_.metaKey||_.ctrlKey}},{key:"isClick",value:function(_,R){var N=this._initialEventData,I=N.x,$=N.y,L=N.isTouch;return!L&&Math.abs(_-I)<=v&&Math.abs(R-$)<=v}}]),T})();function w(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return(0,e.default)(T)!=="object"&&(T={top:T,left:T,right:T,bottom:T}),T}function C(T,A){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,R=E(T),N=R.top,I=R.left,$=R.right,L=$===void 0?I:$,z=R.bottom,F=z===void 0?N:z,q=E(A),H=q.top,B=q.left,V=q.right,Y=V===void 0?B:V,G=q.bottom,W=G===void 0?H:G;return!(F-_<H||N+_>W||L-_<B||I+_>Y)}function E(T){if(!T.getBoundingClientRect)return T;var A=T.getBoundingClientRect(),_=A.left+D("left"),R=A.top+D("top");return{top:R,left:_,right:(T.offsetWidth||0)+_,bottom:(T.offsetHeight||0)+R}}function D(T){if(T==="left")return window.pageXOffset||document.body.scrollLeft||0;if(T==="top")return window.pageYOffset||document.body.scrollTop||0}return cc.default=x,cc}var vx={},TJ;function xGe(){if(TJ)return vx;TJ=1;var t=po().default;Object.defineProperty(vx,"__esModule",{value:!0}),vx.default=void 0;var e=t(rde()),n=t(bv()),r=t(cC),s=t(vi());function i(a){return typeof a=="string"?a:a+"%"}function o(a){var l=a.style,c=a.className,d=a.event,f=a.accessors,p=a.rtl,m=a.selected,v=a.label,y=a.continuesPrior,x=a.continuesAfter,w=a.getters,C=a.onClick,E=a.onDoubleClick,D=a.isBackgroundEvent,T=a.onKeyPress,A=a.components,_=A.event,R=A.eventWrapper,N=f.title(d),I=f.tooltip(d),$=f.end(d),L=f.start(d),z=w.eventProp(d,L,$,m),F=l.height,q=l.top,H=l.width,B=l.xOffset,V=[s.default.createElement("div",{key:"1",className:"rbc-event-label"},v),s.default.createElement("div",{key:"2",className:"rbc-event-content"},_?s.default.createElement(_,{event:d,title:N}):N)],Y=D?(0,n.default)((0,n.default)({},z.style),{},(0,e.default)({top:i(q),height:i(F),width:"calc(".concat(H," + 10px)")},p?"right":"left",i(Math.max(0,B)))):(0,n.default)((0,n.default)({},z.style),{},(0,e.default)({top:i(q),width:i(H),height:i(F)},p?"right":"left",i(B)));return s.default.createElement(R,Object.assign({type:"time"},a),s.default.createElement("div",{onClick:C,onDoubleClick:E,style:Y,onKeyPress:T,title:I?(typeof v=="string"?v+": ":"")+I:void 0,className:(0,r.default)(D?"rbc-background-event":"rbc-event",c,z.className,{"rbc-selected":m,"rbc-event-continues-earlier":y,"rbc-event-continues-later":x})},V))}return vx.default=o,vx}var mp={},AJ;function Hz(){if(AJ)return mp;AJ=1;var t=po().default;Object.defineProperty(mp,"__esModule",{value:!0}),mp.dragAccessors=void 0,mp.eventTimes=c,mp.mergeComponents=a,mp.pointInColumn=l;var e=t(bv()),n=t($z()),r=sde(),s=vi(),i=["children"];mp.dragAccessors={start:(0,r.wrapAccessor)(function(d){return d.start}),end:(0,r.wrapAccessor)(function(d){return d.end})};function o(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];var m=f.filter(Boolean).map(s.createFactory),v=function(x){var w=x.children,C=(0,n.default)(x,i);return m.reduceRight(function(E,D){return D(C,E)},w)};return v}function a(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0,p=Object.keys(f),m=(0,e.default)({},d);return p.forEach(function(v){m[v]=d[v]?o(d[v],f[v]):f[v]}),m}function l(d,f){var p=d.left,m=d.right,v=d.top,y=f.x,x=f.y;return y<m+10&&y>p&&x>v}function c(d,f,p){var m=f.start(d),v=f.end(d),y=p.diff(m,v,"milliseconds");return{start:m,end:v,duration:y}}return mp}var _J;function SGe(){if(_J)return gx;_J=1;var t=ide().default,e=po().default;Object.defineProperty(gx,"__esModule",{value:!0}),gx.default=void 0;var n=e(bv()),r=e(xv()),s=e(Sv()),i=e(tb()),o=e(nb()),a=e(vi()),l=tO(),c=mGe,d=e(gGe()),f=t(Ede()),p=e(xGe()),m=Hz(),v=(function(y){(0,o.default)(x,y);function x(){var w;(0,r.default)(this,x);for(var C=arguments.length,E=new Array(C),D=0;D<C;D++)E[D]=arguments[D];return w=(0,i.default)(this,x,[].concat(E)),w.handleMove=function(T,A){if(!(0,m.pointInColumn)(A,T))return w.reset();var _=w.context.draggable.dragAndDropAction.event,R=w.props,N=R.accessors,I=R.slotMetrics,$=I.closestSlotFromPoint({y:T.y-w.eventOffsetTop,x:T.x},A),L=(0,m.eventTimes)(_,N,w.props.localizer),z=L.duration,F=w.props.localizer.add($,z,"milliseconds");w.update(_,I.getRange($,F,!1,!0))},w.handleDropFromOutside=function(T,A){var _=w.props,R=_.slotMetrics,N=_.resource,I=R.closestSlotFromPoint({y:T.y,x:T.x},A);w.context.draggable.onDropFromOutside({start:I,end:R.nextSlot(I),allDay:!1,resource:N})},w.updateParentScroll=function(T,A){setTimeout(function(){var _=(0,d.default)(A,".rbc-addons-dnd-drag-preview")[0];_&&(_.offsetTop<T.scrollTop?(0,c.scrollTop)(T,Math.max(_.offsetTop,0)):_.offsetTop+_.offsetHeight>T.scrollTop+T.clientHeight&&(0,c.scrollTop)(T,Math.min(_.offsetTop-T.offsetHeight+_.offsetHeight,T.scrollHeight)))})},w._selectable=function(){var T=w.ref.current,A=T.children[0],_=!1,R=w._selector=new f.default(function(){return T.closest(".rbc-time-view")}),N=(0,c.scrollParent)(T);R.on("beforeSelect",function(I){var $=w.context.draggable.dragAndDropAction;if(!$.action)return!1;if($.action==="resize")return(0,m.pointInColumn)((0,f.getBoundsForNode)(A),I);var L=(0,f.getEventNodeFromPoint)(A,I);if(!L)return!1;w.eventOffsetTop=I.y-(0,f.getBoundsForNode)(L).top}),R.on("selecting",function(I){var $=(0,f.getBoundsForNode)(A),L=w.context.draggable.dragAndDropAction;L.action==="move"&&(w.updateParentScroll(N,A),w.handleMove(I,$)),L.action==="resize"&&(w.updateParentScroll(N,A),w.handleResize(I,$))}),R.on("dropFromOutside",function(I){if(w.context.draggable.onDropFromOutside){var $=(0,f.getBoundsForNode)(A);(0,m.pointInColumn)($,I)&&w.handleDropFromOutside(I,$)}}),R.on("dragOver",function(I){if(w.context.draggable.dragFromOutsideItem){var $=(0,f.getBoundsForNode)(A);w.handleDropFromOutside(I,$)}}),R.on("selectStart",function(){_=!0,w.context.draggable.onStart()}),R.on("select",function(I){var $=(0,f.getBoundsForNode)(A);_=!1;var L=w.context.draggable.dragAndDropAction;if(L.action==="resize")w.handleInteractionEnd();else{if(!w.state.event||!(0,m.pointInColumn)($,I))return;w.handleInteractionEnd()}}),R.on("click",function(){_&&w.reset(),w.context.draggable.onEnd(null)}),R.on("reset",function(){w.reset(),w.context.draggable.onEnd(null)})},w.handleInteractionEnd=function(){var T=w.props.resource,A=w.state.event;w.reset(),w.context.draggable.onEnd({start:A.start,end:A.end,resourceId:T})},w._teardownSelectable=function(){w._selector&&(w._selector.teardown(),w._selector=null)},w.state={},w.ref=a.default.createRef(),w}return(0,s.default)(x,[{key:"componentDidMount",value:function(){this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"reset",value:function(){this.state.event&&this.setState({event:null,top:null,height:null})}},{key:"update",value:function(C,E){var D=E.startDate,T=E.endDate,A=E.top,_=E.height,R=this.state.event;R&&D===R.start&&T===R.end||this.setState({top:A,height:_,event:(0,n.default)((0,n.default)({},C),{},{start:D,end:T})})}},{key:"handleResize",value:function(C,E){var D=this.props,T=D.accessors,A=D.slotMetrics,_=D.localizer,R=this.context.draggable.dragAndDropAction,N=R.event,I=R.direction,$=A.closestSlotFromPoint(C,E),L=(0,m.eventTimes)(N,T,_),z=L.start,F=L.end,q;if(I==="UP"){var H=_.min($,A.closestSlotFromDate(F,-1));q=A.getRange(H,F),q=(0,n.default)((0,n.default)({},q),{},{endDate:F})}else if(I==="DOWN"){var B=_.max($,A.closestSlotFromDate(z));q=A.getRange(z,B),q=(0,n.default)((0,n.default)({},q),{},{startDate:z})}this.update(N,q)}},{key:"renderContent",value:function(){var C=this.props,E=C.children,D=C.accessors,T=C.components,A=C.getters,_=C.slotMetrics,R=C.localizer,N=this.state,I=N.event,$=N.top,L=N.height;if(!I)return E;var z=E.props.children,F=I.start,q=I.end,H,B="eventTimeRangeFormat",V=_.startsBeforeDay(F),Y=_.startsAfterDay(q);return V?B="eventTimeRangeEndFormat":Y&&(B="eventTimeRangeStartFormat"),V&&Y?H=R.messages.allDay:H=R.format({start:F,end:q},B),a.default.cloneElement(E,{children:a.default.createElement(a.default.Fragment,null,z,I&&a.default.createElement(p.default,{event:I,label:H,className:"rbc-addons-dnd-drag-preview",style:{top:$,height:L,width:100},getters:A,components:T,accessors:(0,n.default)((0,n.default)({},D),m.dragAccessors),continuesPrior:V,continuesAfter:Y}))})}},{key:"render",value:function(){return a.default.createElement("div",{ref:this.ref},this.renderContent())}}]),x})(a.default.Component);return v.contextType=l.DnDContext,gx.default=v,gx}var yx={},cI={exports:{}},uI={exports:{}},dI={exports:{}},OJ;function Mde(){return OJ||(OJ=1,(function(t){function e(n,r){(r==null||r>n.length)&&(r=n.length);for(var s=0,i=Array(r);s<r;s++)i[s]=n[s];return i}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(dI)),dI.exports}var RJ;function wGe(){return RJ||(RJ=1,(function(t){var e=Mde();function n(r){if(Array.isArray(r))return e(r)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(uI)),uI.exports}var fI={exports:{}},NJ;function CGe(){return NJ||(NJ=1,(function(t){function e(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(fI)),fI.exports}var pI={exports:{}},jJ;function EGe(){return jJ||(jJ=1,(function(t){var e=Mde();function n(r,s){if(r){if(typeof r=="string")return e(r,s);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(r,s):void 0}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(pI)),pI.exports}var hI={exports:{}},IJ;function MGe(){return IJ||(IJ=1,(function(t){function e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(hI)),hI.exports}var LJ;function DGe(){return LJ||(LJ=1,(function(t){var e=wGe(),n=CGe(),r=EGe(),s=MGe();function i(o){return e(o)||n(o)||r(o)||s()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports})(cI)),cI.exports}var bx={},xx={},Sx={},PJ;function kGe(){if(PJ)return Sx;PJ=1;var t=po().default;Object.defineProperty(Sx,"__esModule",{value:!0}),Sx.default=void 0;var e=t(bv()),n=t($z()),r=t(xv()),s=t(Sv()),i=t(tb()),o=t(nb()),a=t(vi()),l=t(cC),c=["style","className","event","selected","isAllDay","onSelect","onDoubleClick","onKeyPress","localizer","continuesPrior","continuesAfter","accessors","getters","children","components","slotStart","slotEnd"],d=(function(f){(0,o.default)(p,f);function p(){return(0,r.default)(this,p),(0,i.default)(this,p,arguments)}return(0,s.default)(p,[{key:"render",value:function(){var v=this.props,y=v.style,x=v.className,w=v.event,C=v.selected,E=v.isAllDay,D=v.onSelect,T=v.onDoubleClick,A=v.onKeyPress,_=v.localizer,R=v.continuesPrior,N=v.continuesAfter,I=v.accessors,$=v.getters,L=v.children,z=v.components,F=z.event,q=z.eventWrapper,H=v.slotStart,B=v.slotEnd,V=(0,n.default)(v,c);delete V.resizable;var Y=I.title(w),G=I.tooltip(w),W=I.end(w),Z=I.start(w),Q=I.allDay(w),X=E||Q||_.diff(Z,_.ceil(W,"day"),"day")>1,re=$.eventProp(w,Z,W,C),ne=a.default.createElement("div",{className:"rbc-event-content",title:G||void 0},F?a.default.createElement(F,{event:w,continuesPrior:R,continuesAfter:N,title:Y,isAllDay:Q,localizer:_,slotStart:H,slotEnd:B}):Y);return a.default.createElement(q,Object.assign({},this.props,{type:"date"}),a.default.createElement("div",Object.assign({},V,{tabIndex:0,style:(0,e.default)((0,e.default)({},re.style),y),className:(0,l.default)("rbc-event",x,re.className,{"rbc-selected":C,"rbc-event-allday":X,"rbc-event-continues-prior":R,"rbc-event-continues-after":N}),onClick:function(oe){return D&&D(w,oe)},onDoubleClick:function(oe){return T&&T(w,oe)},onKeyPress:function(oe){return A&&A(w,oe)}}),typeof L=="function"?L(ne):ne))}}]),p})(a.default.Component);return Sx.default=d,Sx}var gp={},$J;function Dde(){if($J)return gp;$J=1;var t=po().default;Object.defineProperty(gp,"__esModule",{value:!0}),gp.dateCellSelection=o,gp.getSlotAtX=s,gp.isSelected=n,gp.pointInBox=i,gp.slotWidth=r;var e=t(xue());function n(a,l){return!a||l==null?!1:(0,e.default)(a,l)}function r(a,l){var c=a.right-a.left,d=c/l;return d}function s(a,l,c,d){var f=r(a,d);return c?d-1-Math.floor((l-a.left)/f):Math.floor((l-a.left)/f)}function i(a,l){var c=l.x,d=l.y;return d>=a.top&&d<=a.bottom&&c>=a.left&&c<=a.right}function o(a,l,c,d,f){var p=-1,m=-1,v=d-1,y=r(l,d),x=s(l,c.x,f,d),w=l.top<c.y&&l.bottom>c.y,C=l.top<a.y&&l.bottom>a.y,E=a.y>l.bottom,D=l.top>a.y,T=c.top<l.top&&c.bottom>l.bottom;return T&&(p=0,m=v),w&&(D?(p=0,m=x):E&&(p=x,m=v)),C&&(p=m=f?v-Math.floor((a.x-l.left)/y):Math.floor((a.x-l.left)/y),w?x<p?p=x:m=x:a.y<c.y?m=v:p=0),{startIdx:p,endIdx:m}}return gp}var zJ;function TGe(){if(zJ)return xx;zJ=1;var t=po().default;Object.defineProperty(xx,"__esModule",{value:!0}),xx.default=void 0;var e=t(V_()),n=t(vi()),r=t(kGe()),s=Dde();return xx.default={propTypes:{slotMetrics:e.default.object.isRequired,selected:e.default.object,isAllDay:e.default.bool,accessors:e.default.object.isRequired,localizer:e.default.object.isRequired,components:e.default.object.isRequired,getters:e.default.object.isRequired,onSelect:e.default.func,onDoubleClick:e.default.func,onKeyPress:e.default.func},defaultProps:{segments:[],selected:{}},renderEvent:function(o,a){var l=o.selected;o.isAllDay;var c=o.accessors,d=o.getters,f=o.onSelect,p=o.onDoubleClick,m=o.onKeyPress,v=o.localizer,y=o.slotMetrics,x=o.components,w=o.resizable,C=y.continuesPrior(a),E=y.continuesAfter(a);return n.default.createElement(r.default,{event:a,getters:d,localizer:v,accessors:c,components:x,onSelect:f,onDoubleClick:p,onKeyPress:m,continuesPrior:C,continuesAfter:E,slotStart:y.first,slotEnd:y.last,selected:(0,s.isSelected)(a,l),resizable:w})},renderSpan:function(o,a,l){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",d=Math.abs(a||1)/o*100+"%";return n.default.createElement("div",{key:l,className:"rbc-row-segment",style:{WebkitFlexBasis:d,flexBasis:d,maxWidth:d}},c)}},xx}var FJ;function AGe(){if(FJ)return bx;FJ=1;var t=po().default;Object.defineProperty(bx,"__esModule",{value:!0}),bx.default=void 0;var e=t(bv()),n=t(xv()),r=t(Sv()),s=t(tb()),i=t(nb());t(V_());var o=t(cC),a=t(vi()),l=t(TGe()),c=(function(d){(0,i.default)(f,d);function f(){return(0,n.default)(this,f),(0,s.default)(this,f,arguments)}return(0,r.default)(f,[{key:"render",value:function(){var m=this,v=this.props,y=v.segments,x=v.slotMetrics.slots,w=v.className,C=1;return a.default.createElement("div",{className:(0,o.default)(w,"rbc-row")},y.reduce(function(E,D,T){var A=D.event,_=D.left,R=D.right,N=D.span,I="_lvl_"+T,$=_-C,L=l.default.renderEvent(m.props,A);return $&&E.push(l.default.renderSpan(x,$,"".concat(I,"_gap"))),E.push(l.default.renderSpan(x,N,I,L)),C=R+1,E},[]))}}]),f})(a.default.Component);return c.propTypes={},c.defaultProps=(0,e.default)({},l.default.defaultProps),bx.default=c,bx}var Ed={},BJ;function _Ge(){if(BJ)return Ed;BJ=1;var t=po().default;Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.endOfRange=n,Ed.eventLevels=s,Ed.eventSegments=r,Ed.inRange=i,Ed.segsOverlap=o,Ed.sortEvents=a;var e=t(Cue());function n(l){var c=l.dateRange,d=l.unit,f=d===void 0?"day":d,p=l.localizer;return{first:c[0],last:p.add(c[c.length-1],1,f)}}function r(l,c,d,f){var p=n({dateRange:c,localizer:f}),m=p.first,v=p.last,y=f.max(f.startOf(d.start(l),"day"),m),x=f.min(f.ceil(d.end(l),"day"),v),w=(0,e.default)(c,function(E){return f.isSameDate(E,y)}),C=f.diff(y,x,"day");return{event:l,span:C,left:w+1,right:Math.max(w+C,1)}}function s(l){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,d,f,p,m=[],v=[];for(d=0;d<l.length;d++){for(p=l[d],f=0;f<m.length&&o(p,m[f]);f++);f>=c?v.push(p):(m[f]||(m[f]=[])).push(p)}for(d=0;d<m.length;d++)m[d].sort(function(y,x){return y.left-x.left});return{levels:m,extra:v}}function i(l,c,d,f,p){var m={start:f.start(l),end:f.end(l)},v={start:c,end:d};return p.inEventRange({event:m,range:v})}function o(l,c){return c.some(function(d){return d.left<=l.right&&d.right>=l.left})}function a(l,c,d,f){var p={start:d.start(l),end:d.end(l),allDay:d.allDay(l)},m={start:d.start(c),end:d.end(c),allDay:d.allDay(c)};return f.sortEvents({evtA:p,evtB:m})}return Ed}var HJ;function OGe(){if(HJ)return yx;HJ=1;var t=ide().default,e=po().default;Object.defineProperty(yx,"__esModule",{value:!0}),yx.default=void 0;var n=e(bv()),r=e(DGe()),s=e(xv()),i=e(Sv()),o=e(tb()),a=e(nb()),l=e(vi()),c=e(AGe()),d=t(Ede()),f=_Ge(),p=Dde(),m=Hz(),v=tO(),y=(function(x){(0,a.default)(w,x);function w(){var C;(0,s.default)(this,w);for(var E=arguments.length,D=new Array(E),T=0;T<E;T++)D[T]=arguments[T];return C=(0,o.default)(this,w,[].concat(D)),C.handleMove=function(A,_,R){if(!(0,p.pointInBox)(_,A))return C.reset();var N=C.context.draggable.dragAndDropAction.event||R,I=C.props,$=I.accessors,L=I.slotMetrics,z=I.rtl,F=I.localizer,q=(0,p.getSlotAtX)(_,A.x,z,L.slots),H=L.getDateForSlot(q),B=(0,m.eventTimes)(N,$,F),V=B.start,Y=B.duration;V=F.merge(H,V);var G=F.add(V,Y,"milliseconds");C.update(N,V,G)},C.handleDropFromOutside=function(A,_){if(C.context.draggable.onDropFromOutside){var R=C.props,N=R.slotMetrics,I=R.rtl,$=R.localizer,L=(0,p.getSlotAtX)(_,A.x,I,N.slots),z=N.getDateForSlot(L);C.context.draggable.onDropFromOutside({start:z,end:$.add(z,1,"day"),allDay:!1})}},C.handleDragOverFromOutside=function(A,_){C.context.draggable.dragFromOutsideItem&&C.handleMove(A,_,C.context.draggable.dragFromOutsideItem())},C._selectable=function(){var A=C.ref.current.closest(".rbc-month-row, .rbc-allday-cell"),_=A.closest(".rbc-month-view, .rbc-time-view"),R=A.classList.contains("rbc-month-row"),N=C._selector=new d.default(function(){return _},{validContainers:(0,r.default)(R?[]:[".rbc-day-slot",".rbc-allday-cell"])});N.on("beforeSelect",function(I){var $=C.props.isAllDay,L=C.context.draggable.dragAndDropAction.action,z=(0,d.getBoundsForNode)(A),F=(0,p.pointInBox)(z,I);return L==="move"||L==="resize"&&(!$||F)}),N.on("selecting",function(I){var $=(0,d.getBoundsForNode)(A),L=C.context.draggable.dragAndDropAction;L.action==="move"&&C.handleMove(I,$),L.action==="resize"&&C.handleResize(I,$)}),N.on("selectStart",function(){return C.context.draggable.onStart()}),N.on("select",function(I){var $=(0,d.getBoundsForNode)(A);C.state.segment&&((0,p.pointInBox)($,I)?C.handleInteractionEnd():C.reset())}),N.on("dropFromOutside",function(I){if(C.context.draggable.onDropFromOutside){var $=(0,d.getBoundsForNode)(A);(0,p.pointInBox)($,I)&&C.handleDropFromOutside(I,$)}}),N.on("dragOverFromOutside",function(I){if(C.context.draggable.dragFromOutsideItem){var $=(0,d.getBoundsForNode)(A);C.handleDragOverFromOutside(I,$)}}),N.on("click",function(){return C.context.draggable.onEnd(null)}),N.on("reset",function(){C.reset(),C.context.draggable.onEnd(null)})},C.handleInteractionEnd=function(){var A=C.props,_=A.resourceId,R=A.isAllDay,N=C.state.segment.event;C.reset(),C.context.draggable.onEnd({start:N.start,end:N.end,resourceId:_,isAllDay:R})},C._teardownSelectable=function(){C._selector&&(C._selector.teardown(),C._selector=null)},C.state={},C.ref=l.default.createRef(),C}return(0,i.default)(w,[{key:"componentDidMount",value:function(){this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"reset",value:function(){this.state.segment&&this.setState({segment:null})}},{key:"update",value:function(E,D,T){var A=(0,f.eventSegments)((0,n.default)((0,n.default)({},E),{},{end:T,start:D,__isPreview:!0}),this.props.slotMetrics.range,m.dragAccessors,this.props.localizer),_=this.state.segment;_&&A.span===_.span&&A.left===_.left&&A.right===_.right||this.setState({segment:A})}},{key:"handleResize",value:function(E,D){var T=this.context.draggable.dragAndDropAction,A=T.event,_=T.direction,R=this.props,N=R.accessors,I=R.slotMetrics,$=R.rtl,L=R.localizer,z=(0,m.eventTimes)(A,N,L),F=z.start,q=z.end,H=(0,p.getSlotAtX)(D,E.x,$,I.slots),B=I.getDateForSlot(H),V=(0,p.pointInBox)(D,E);if(_==="RIGHT"){if(V){if(I.last<F)return this.reset();L.eq(L.startOf(q,"day"),q)?q=L.add(B,1,"day"):q=B}else if(L.inRange(F,I.first,I.last)||D.bottom<E.y&&+I.first>+F)q=L.add(I.last,1,"milliseconds");else{this.setState({segment:null});return}var Y=N.end(A);q=L.merge(q,Y),L.lt(q,F)&&(q=Y)}else if(_==="LEFT"){if(V){if(I.first>q)return this.reset();F=B}else if(L.inRange(q,I.first,I.last)||D.top>E.y&&L.lt(I.last,q))F=L.add(I.first,-1,"milliseconds");else{this.reset();return}var G=N.start(A);F=L.merge(F,G),L.gt(F,q)&&(F=G)}this.update(A,F,q)}},{key:"render",value:function(){var E=this.props,D=E.children,T=E.accessors,A=this.state.segment;return l.default.createElement("div",{ref:this.ref,className:"rbc-addons-dnd-row-body"},D,A&&l.default.createElement(c.default,Object.assign({},this.props,{selected:null,className:"rbc-addons-dnd-drag-row",segments:[A],accessors:(0,n.default)((0,n.default)({},T),m.dragAccessors)})))}}]),w})(l.default.Component);return y.contextType=v.DnDContext,yx.default=y,yx}var qJ;function RGe(){if(qJ)return xD;qJ=1;var t=po().default;Object.defineProperty(xD,"__esModule",{value:!0}),xD.default=y;var e=t(bv()),n=t($z()),r=t(xv()),s=t(Sv()),i=t(tb()),o=t(nb()),a=t(vi()),l=t(cC);rGe();var c=t(sGe()),d=t(SGe()),f=t(OGe()),p=Hz(),m=tO(),v=["selectable","elementProps"];function y(x){var w=(function(C){(0,o.default)(E,C);function E(){var D;(0,r.default)(this,E);for(var T=arguments.length,A=new Array(T),_=0;_<T;_++)A[_]=arguments[_];D=(0,i.default)(this,E,[].concat(A)),D.defaultOnDragOver=function(N){N.preventDefault()},D.handleBeginAction=function(N,I,$){D.setState({event:N,action:I,direction:$});var L=D.props.onDragStart;L&&L({event:N,action:I,direction:$})},D.handleInteractionStart=function(){D.state.interacting===!1&&D.setState({interacting:!0})},D.handleInteractionEnd=function(N){var I=D.state,$=I.action,L=I.event;if($&&(D.setState({action:null,event:null,interacting:!1,direction:null}),N!=null)){N.event=L;var z=D.props,F=z.onEventDrop,q=z.onEventResize;$==="move"&&F&&F(N),$==="resize"&&q&&q(N)}};var R=D.props.components;return D.components=(0,p.mergeComponents)(R,{eventWrapper:c.default,eventContainerWrapper:d.default,weekWrapper:f.default}),D.state={interacting:!1},D}return(0,s.default)(E,[{key:"getDnDContextValue",value:function(){return{draggable:{onStart:this.handleInteractionStart,onEnd:this.handleInteractionEnd,onBeginAction:this.handleBeginAction,onDropFromOutside:this.props.onDropFromOutside,dragFromOutsideItem:this.props.dragFromOutsideItem,draggableAccessor:this.props.draggableAccessor,resizableAccessor:this.props.resizableAccessor,dragAndDropAction:this.state}}}},{key:"render",value:function(){var T=this.props,A=T.selectable,_=T.elementProps,R=(0,n.default)(T,v),N=this.state.interacting;delete R.onEventDrop,delete R.onEventResize,R.selectable=A?"ignoreEvents":!1;var I=this.props.onDropFromOutside?(0,e.default)((0,e.default)({},_),{},{onDragOver:this.props.onDragOver||this.defaultOnDragOver}):_;R.className=(0,l.default)(R.className,"rbc-addons-dnd",!!N&&"rbc-addons-dnd-is-dragging");var $=this.getDnDContextValue();return a.default.createElement(m.DnDContext.Provider,{value:$},a.default.createElement(x,Object.assign({},R,{elementProps:I,components:this.components})))}}]),E})(a.default.Component);return w.defaultProps=(0,e.default)((0,e.default)({},x.defaultProps),{},{draggableAccessor:null,resizableAccessor:null,resizable:!0}),w}return xD}var UJ;function NGe(){if(UJ)return px;UJ=1;var t=po().default;Object.defineProperty(px,"__esModule",{value:!0}),px.default=void 0;var e=t(RGe());return px.default=e.default,px}var jGe=NGe();const IGe=Mr(jGe);function qz(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var AP={exports:{}},xk={exports:{}};/*!
 * Globalize
 *
 * http://github.com/jquery/globalize
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */var LGe=xk.exports,VJ;function kde(){return VJ||(VJ=1,(function(t,e){(function(n,r){var s,i,o,a,l,c,d,f,p,m,v,y,x,w,C,E,D,T,A,_,R,N,I,$;s=function(L){return new s.prototype.init(L)},typeof qz<"u"?t.exports=s:n.Globalize=s,s.cultures={},s.prototype={constructor:s,init:function(L){return this.cultures=s.cultures,this.cultureSelector=L,this}},s.prototype.init.prototype=s.prototype,s.cultures.default={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},s.cultures.default.calendar=s.cultures.default.calendars.standard,s.cultures.en=s.cultures.default,s.cultureSelector="en",i=/^0x[a-f0-9]+$/i,o=/^[+\-]?infinity$/i,a=/^[+\-]?\d*\.?\d*(e[+\-]?\d+)?$/,l=/^\s+|\s+$/g,c=function(L,z){if(L.indexOf)return L.indexOf(z);for(var F=0,q=L.length;F<q;F++)if(L[F]===z)return F;return-1},d=function(L,z){return L.substr(L.length-z.length)===z},f=function(){var L,z,F,q,H,B,V=arguments[0]||{},Y=1,G=arguments.length,W=!1;for(typeof V=="boolean"&&(W=V,V=arguments[1]||{},Y=2),typeof V!="object"&&!m(V)&&(V={});Y<G;Y++)if((L=arguments[Y])!=null)for(z in L)F=V[z],q=L[z],V!==q&&(W&&q&&(v(q)||(H=p(q)))?(H?(H=!1,B=F&&p(F)?F:[]):B=F&&v(F)?F:{},V[z]=f(W,B,q)):q!==r&&(V[z]=q));return V},p=Array.isArray||function(L){return Object.prototype.toString.call(L)==="[object Array]"},m=function(L){return Object.prototype.toString.call(L)==="[object Function]"},v=function(L){return Object.prototype.toString.call(L)==="[object Object]"},y=function(L,z){return L.indexOf(z)===0},x=function(L){return(L+"").replace(l,"")},w=function(L){return isNaN(L)?NaN:Math[L<0?"ceil":"floor"](L)},C=function(L,z,F){var q;for(q=L.length;q<z;q+=1)L=F?"0"+L:L+"0";return L},E=function(L,z){for(var F=0,q=!1,H=0,B=L.length;H<B;H++){var V=L.charAt(H);switch(V){case"'":q?z.push("'"):F++,q=!1;break;case"\\":q&&z.push("\\"),q=!q;break;default:z.push(V),q=!1;break}}return F},D=function(L,z){z=z||"F";var F,q=L.patterns,H=z.length;if(H===1){if(F=q[z],!F)throw"Invalid date format string '"+z+"'.";z=F}else H===2&&z.charAt(0)==="%"&&(z=z.charAt(1));return z},T=function(L,z,F){var q=F.calendar,H=q.convert,B;if(!z||!z.length||z==="i"){if(F&&F.name.length)if(H)B=T(L,q.patterns.F,F);else{var V=new Date(L.getTime()),Y=R(L,q.eras);V.setFullYear(N(L,q,Y)),B=V.toLocaleString()}else B=L.toString();return B}var G=q.eras,W=z==="s";z=D(q,z),B=[];var Z,Q=["0","00","000"],X,re,ne=/([^d]|^)(d|dd)([^d]|$)/g,ee=0,oe=_(),ce;function ue(Ue,rt){var ot,Je=Ue+"";return rt>1&&Je.length<rt?(ot=Q[rt-2]+Je,ot.substr(ot.length-rt,rt)):(ot=Je,ot)}function pe(){return X||re||(X=ne.test(z),re=!0),X}function de(Ue,rt){if(ce)return ce[rt];switch(rt){case 0:return Ue.getFullYear();case 1:return Ue.getMonth();case 2:return Ue.getDate();default:throw"Invalid part value "+rt}}for(!W&&H&&(ce=H.fromGregorian(L));;){var me=oe.lastIndex,Se=oe.exec(z),De=z.slice(me,Se?Se.index:z.length);if(ee+=E(De,B),!Se)break;if(ee%2){B.push(Se[0]);continue}var Ae=Se[0],fe=Ae.length;switch(Ae){case"ddd":case"dddd":var Te=fe===3?q.days.namesAbbr:q.days.names;B.push(Te[L.getDay()]);break;case"d":case"dd":X=!0,B.push(ue(de(L,2),fe));break;case"MMM":case"MMMM":var Ne=de(L,1);B.push(q.monthsGenitive&&pe()?q.monthsGenitive[fe===3?"namesAbbr":"names"][Ne]:q.months[fe===3?"namesAbbr":"names"][Ne]);break;case"M":case"MM":B.push(ue(de(L,1)+1,fe));break;case"y":case"yy":case"yyyy":Ne=ce?ce[0]:N(L,q,R(L,G),W),fe<4&&(Ne=Ne%100),B.push(ue(Ne,fe));break;case"h":case"hh":Z=L.getHours()%12,Z===0&&(Z=12),B.push(ue(Z,fe));break;case"H":case"HH":B.push(ue(L.getHours(),fe));break;case"m":case"mm":B.push(ue(L.getMinutes(),fe));break;case"s":case"ss":B.push(ue(L.getSeconds(),fe));break;case"t":case"tt":Ne=L.getHours()<12?q.AM?q.AM[0]:" ":q.PM?q.PM[0]:" ",B.push(fe===1?Ne.charAt(0):Ne);break;case"f":case"ff":case"fff":B.push(ue(L.getMilliseconds(),3).substr(0,fe));break;case"z":case"zz":Z=L.getTimezoneOffset()/60,B.push((Z<=0?"+":"-")+ue(Math.floor(Math.abs(Z)),fe));break;case"zzz":Z=L.getTimezoneOffset()/60,B.push((Z<=0?"+":"-")+ue(Math.floor(Math.abs(Z)),2)+":"+ue(Math.abs(L.getTimezoneOffset()%60),2));break;case"g":case"gg":q.eras&&B.push(q.eras[R(L,G)].name);break;case"/":B.push(q["/"]);break;default:throw"Invalid date format pattern '"+Ae+"'."}}return B.join("")},(function(){var L;L=function(z,F,q){var H=q.groupSizes,B=H[0],V=1,Y=Math.pow(10,F),G=Math.round(z*Y)/Y;isFinite(G)||(G=z),z=G;var W=z+"",Z="",Q=W.split(/e/i),X=Q.length>1?parseInt(Q[1],10):0;W=Q[0],Q=W.split("."),W=Q[0],Z=Q.length>1?Q[1]:"",X>0?(Z=C(Z,X,!1),W+=Z.slice(0,X),Z=Z.substr(X)):X<0&&(X=-X,W=C(W,X+1,!0),Z=W.slice(-X,W.length)+Z,W=W.slice(0,-X)),F>0?Z=q["."]+(Z.length>F?Z.slice(0,F):C(Z,F)):Z="";for(var re=W.length-1,ne=q[","],ee="";re>=0;){if(B===0||B>re)return W.slice(0,re+1)+(ee.length?ne+ee+Z:Z);ee=W.slice(re-B+1,re+1)+(ee.length?ne+ee:""),re-=B,V<H.length&&(B=H[V],V++)}return W.slice(0,re+1)+ne+ee+Z},A=function(z,F,q){if(!isFinite(z))return z===1/0?q.numberFormat.positiveInfinity:z===-1/0?q.numberFormat.negativeInfinity:q.numberFormat.NaN;if(!F||F==="i")return q.name.length?z.toLocaleString():z.toString();F=F||"D";var H=q.numberFormat,B=Math.abs(z),V=-1,Y;F.length>1&&(V=parseInt(F.slice(1),10));var G=F.charAt(0).toUpperCase(),W;switch(G){case"D":Y="n",B=w(B),V!==-1&&(B=C(""+B,V,!0)),z<0&&(B="-"+B);break;case"N":W=H;case"C":W=W||H.currency;case"P":W=W||H.percent,Y=z<0?W.pattern[0]:W.pattern[1]||"n",V===-1&&(V=W.decimals),B=L(B*(G==="P"?100:1),V,W);break;default:throw"Bad number format specifier: "+G}for(var Z=/n|\$|-|%/g,Q="";;){var X=Z.lastIndex,re=Z.exec(Y);if(Q+=Y.slice(X,re?re.index:Y.length),!re)break;switch(re[0]){case"n":Q+=B;break;case"$":Q+=H.currency.symbol;break;case"-":/[1-9]/.test(B)&&(Q+=H["-"]);break;case"%":Q+=H.percent.symbol;break}}return Q}})(),_=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},R=function(L,z){if(!z)return 0;for(var F,q=L.getTime(),H=0,B=z.length;H<B;H++)if(F=z[H].start,F===null||q>=F)return H;return 0},N=function(L,z,F,q){var H=L.getFullYear();return!q&&z.eras&&(H-=z.eras[F].offset),H},(function(){var L,z,F,q,H,B,V;L=function(Y,G){if(G<100){var W=new Date,Z=R(W),Q=N(W,Y,Z),X=Y.twoDigitYearMax;X=typeof X=="string"?new Date().getFullYear()%100+parseInt(X,10):X,G+=Q-Q%100,G>X&&(G-=100)}return G},z=function(Y,G,W){var Z,Q=Y.days,X=Y._upperDays;return X||(Y._upperDays=X=[V(Q.names),V(Q.namesAbbr),V(Q.namesShort)]),G=B(G),W?(Z=c(X[1],G),Z===-1&&(Z=c(X[2],G))):Z=c(X[0],G),Z},F=function(Y,G,W){var Z=Y.months,Q=Y.monthsGenitive||Y.months,X=Y._upperMonths,re=Y._upperMonthsGen;X||(Y._upperMonths=X=[V(Z.names),V(Z.namesAbbr)],Y._upperMonthsGen=re=[V(Q.names),V(Q.namesAbbr)]),G=B(G);var ne=c(W?X[1]:X[0],G);return ne<0&&(ne=c(W?re[1]:re[0],G)),ne},q=function(Y,G){var W=Y._parseRegExp;if(!W)Y._parseRegExp=W={};else{var Z=W[G];if(Z)return Z}for(var Q=D(Y,G).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),X=["^"],re=[],ne=0,ee=0,oe=_(),ce;(ce=oe.exec(Q))!==null;){var ue=Q.slice(ne,ce.index);if(ne=oe.lastIndex,ee+=E(ue,X),ee%2){X.push(ce[0]);continue}var pe=ce[0],de=pe.length,me;switch(pe){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":me="(\\D+)";break;case"tt":case"t":me="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":me="(\\d{"+de+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":me="(\\d\\d?)";break;case"zzz":me="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":me="([+-]?\\d\\d?)";break;case"/":me="(\\/)";break;default:throw"Invalid date format pattern '"+pe+"'."}me&&X.push(me),re.push(ce[0])}E(Q.slice(ne),X),X.push("$");var Se=X.join("").replace(/\s+/g,"\\s+"),De={regExp:Se,groups:re};return W[G]=De},H=function(Y,G,W){return Y<G||Y>W},B=function(Y){return Y.split(" ").join(" ").toUpperCase()},V=function(Y){for(var G=[],W=0,Z=Y.length;W<Z;W++)G[W]=B(Y[W]);return G},I=function(Y,G,W){Y=x(Y);var Z=W.calendar,Q=q(Z,G),X=new RegExp(Q.regExp).exec(Y);if(X===null)return null;for(var re=Q.groups,ne=null,ee=null,oe=null,ce=null,ue=null,pe=0,de,me=0,Se=0,De=0,Ae=null,fe=!1,Te=0,Ne=re.length;Te<Ne;Te++){var Ue=X[Te+1];if(Ue){var rt=re[Te],ot=rt.length,Je=parseInt(Ue,10);switch(rt){case"dd":case"d":if(ce=Je,H(ce,1,31))return null;break;case"MMM":case"MMMM":if(oe=F(Z,Ue,ot===3),H(oe,0,11))return null;break;case"M":case"MM":if(oe=Je-1,H(oe,0,11))return null;break;case"y":case"yy":case"yyyy":if(ee=ot<4?L(Z,Je):Je,H(ee,0,9999))return null;break;case"h":case"hh":if(pe=Je,pe===12&&(pe=0),H(pe,0,11))return null;break;case"H":case"HH":if(pe=Je,H(pe,0,23))return null;break;case"m":case"mm":if(me=Je,H(me,0,59))return null;break;case"s":case"ss":if(Se=Je,H(Se,0,59))return null;break;case"tt":case"t":if(fe=Z.PM&&(Ue===Z.PM[0]||Ue===Z.PM[1]||Ue===Z.PM[2]),!fe&&(!Z.AM||Ue!==Z.AM[0]&&Ue!==Z.AM[1]&&Ue!==Z.AM[2]))return null;break;case"f":case"ff":case"fff":if(De=Je*Math.pow(10,3-ot),H(De,0,999))return null;break;case"ddd":case"dddd":if(ue=z(Z,Ue,ot===3),H(ue,0,6))return null;break;case"zzz":var je=Ue.split(/:/);if(je.length!==2||(de=parseInt(je[0],10),H(de,-12,13)))return null;var We=parseInt(je[1],10);if(H(We,0,59))return null;Ae=de*60+(y(Ue,"-")?-We:We);break;case"z":case"zz":if(de=Je,H(de,-12,13))return null;Ae=de*60;break;case"g":case"gg":var Le=Ue;if(!Le||!Z.eras)return null;Le=x(Le.toLowerCase());for(var _e=0,Be=Z.eras.length;_e<Be;_e++)if(Le===Z.eras[_e].name.toLowerCase()){ne=_e;break}if(ne===null)return null;break}}}var ut=new Date,lt,At=Z.convert;if(lt=At?At.fromGregorian(ut)[0]:ut.getFullYear(),ee===null?ee=lt:Z.eras&&(ee+=Z.eras[ne||0].offset),oe===null&&(oe=0),ce===null&&(ce=1),At){if(ut=At.toGregorian(ee,oe,ce),ut===null)return null}else if(ut.setFullYear(ee,oe,ce),ut.getDate()!==ce||ue!==null&&ut.getDay()!==ue)return null;if(fe&&pe<12&&(pe+=12),ut.setHours(pe,me,Se,De),Ae!==null){var jt=ut.getMinutes()-(Ae+ut.getTimezoneOffset());ut.setHours(ut.getHours()+parseInt(jt/60,10),jt%60)}return ut}})(),$=function(L,z,F){var q=z["-"],H=z["+"],B;switch(F){case"n -":q=" "+q,H=" "+H;case"n-":d(L,q)?B=["-",L.substr(0,L.length-q.length)]:d(L,H)&&(B=["+",L.substr(0,L.length-H.length)]);break;case"- n":q+=" ",H+=" ";case"-n":y(L,q)?B=["-",L.substr(q.length)]:y(L,H)&&(B=["+",L.substr(H.length)]);break;case"(n)":y(L,"(")&&d(L,")")&&(B=["-",L.substr(1,L.length-2)]);break}return B||["",L]},s.prototype.findClosestCulture=function(L){return s.findClosestCulture.call(this,L)},s.prototype.format=function(L,z,F){return s.format.call(this,L,z,F)},s.prototype.localize=function(L,z){return s.localize.call(this,L,z)},s.prototype.parseInt=function(L,z,F){return s.parseInt.call(this,L,z,F)},s.prototype.parseFloat=function(L,z,F){return s.parseFloat.call(this,L,z,F)},s.prototype.culture=function(L){return s.culture.call(this,L)},s.addCultureInfo=function(L,z,F){var q={},H=!1;typeof L!="string"?(F=L,L=this.culture().name,q=this.cultures[L]):typeof z!="string"?(F=z,H=this.cultures[L]==null,q=this.cultures[L]||this.cultures.default):(H=!0,q=this.cultures[z]),this.cultures[L]=f(!0,{},q,F),H&&(this.cultures[L].calendar=this.cultures[L].calendars.standard)},s.findClosestCulture=function(L){var z;if(!L)return this.findClosestCulture(this.cultureSelector)||this.cultures.default;if(typeof L=="string"&&(L=L.split(",")),p(L)){var F,q=this.cultures,H=L,B,V=H.length,Y=[];for(B=0;B<V;B++){L=x(H[B]);var G,W=L.split(";");F=x(W[0]),W.length===1?G=1:(L=x(W[1]),L.indexOf("q=")===0?(L=L.substr(2),G=parseFloat(L),G=isNaN(G)?0:G):G=1),Y.push({lang:F,pri:G})}for(Y.sort(function(re,ne){return re.pri<ne.pri?1:re.pri>ne.pri?-1:0}),B=0;B<V;B++)if(F=Y[B].lang,z=q[F],z)return z;for(B=0;B<V;B++){F=Y[B].lang;do{var Z=F.lastIndexOf("-");if(Z===-1)break;if(F=F.substr(0,Z),z=q[F],z)return z}while(!0)}for(B=0;B<V;B++){F=Y[B].lang;for(var Q in q){var X=q[Q];if(X.language==F)return X}}}else if(typeof L=="object")return L;return z||null},s.format=function(L,z,F){var q=this.findClosestCulture(F);return L instanceof Date?L=T(L,z,q):typeof L=="number"&&(L=A(L,z,q)),L},s.localize=function(L,z){return this.findClosestCulture(z).messages[L]||this.cultures.default.messages[L]},s.parseDate=function(L,z,F){F=this.findClosestCulture(F);var q,H,B;if(z){if(typeof z=="string"&&(z=[z]),z.length)for(var V=0,Y=z.length;V<Y;V++){var G=z[V];if(G&&(q=I(L,G,F),q))break}}else{B=F.calendar.patterns;for(H in B)if(q=I(L,B[H],F),q)break}return q||null},s.parseInt=function(L,z,F){return w(s.parseFloat(L,z,F))},s.parseFloat=function(L,z,F){typeof z!="number"&&(F=z,z=10);var q=this.findClosestCulture(F),H=NaN,B=q.numberFormat;if(L.indexOf(q.numberFormat.currency.symbol)>-1&&(L=L.replace(q.numberFormat.currency.symbol,""),L=L.replace(q.numberFormat.currency["."],q.numberFormat["."])),L.indexOf(q.numberFormat.percent.symbol)>-1&&(L=L.replace(q.numberFormat.percent.symbol,"")),L=L.replace(/ /g,""),o.test(L))H=parseFloat(L);else if(!z&&i.test(L))H=parseInt(L,16);else{var V=$(L,B,B.pattern[0]),Y=V[0],G=V[1];Y===""&&B.pattern[0]!=="(n)"&&(V=$(L,B,"(n)"),Y=V[0],G=V[1]),Y===""&&B.pattern[0]!=="-n"&&(V=$(L,B,"-n"),Y=V[0],G=V[1]),Y=Y||"+";var W,Z,Q=G.indexOf("e");Q<0&&(Q=G.indexOf("E")),Q<0?(Z=G,W=null):(Z=G.substr(0,Q),W=G.substr(Q+1));var X,re,ne=B["."],ee=Z.indexOf(ne);ee<0?(X=Z,re=null):(X=Z.substr(0,ee),re=Z.substr(ee+ne.length));var oe=B[","];X=X.split(oe).join("");var ce=oe.replace(/\u00A0/g," ");oe!==ce&&(X=X.split(ce).join(""));var ue=Y+X;if(re!==null&&(ue+="."+re),W!==null){var pe=$(W,B,"-n");ue+="e"+(pe[0]||"+")+pe[1]}a.test(ue)&&(H=parseFloat(ue))}return H},s.culture=function(L){return typeof L<"u"&&(this.cultureSelector=L),this.findClosestCulture(L)||this.cultures.default}})(LGe)})(xk)),xk.exports}var PGe=AP.exports,WJ;function $Ge(){return WJ||(WJ=1,(function(t,e){(function(n,r){var s;typeof qz<"u"?s=kde():s=n.Globalize,s.addCultureInfo("en-GB","default",{name:"en-GB",englishName:"English (United Kingdom)",nativeName:"English (United Kingdom)",numberFormat:{currency:{pattern:["-$n","$n"],symbol:"£"}},calendars:{standard:{firstDay:1,patterns:{d:"dd/MM/yyyy",D:"dd MMMM yyyy",t:"HH:mm",T:"HH:mm:ss",f:"dd MMMM yyyy HH:mm",F:"dd MMMM yyyy HH:mm:ss",M:"dd MMMM",Y:"MMMM yyyy"}}}})})(PGe)})()),AP.exports}$Ge();var _P={exports:{}},zGe=_P.exports,YJ;function FGe(){return YJ||(YJ=1,(function(t,e){(function(n,r){var s;typeof qz<"u"?s=kde():s=n.Globalize,s.addCultureInfo("ru","default",{name:"ru",englishName:"Russian",nativeName:"русский",language:"ru",numberFormat:{",":" ",".":",",negativeInfinity:"-бесконечность",positiveInfinity:"бесконечность",percent:{pattern:["-n%","n%"],",":" ",".":","},currency:{pattern:["-n$","n$"],",":" ",".":",",symbol:"р."}},calendars:{standard:{"/":".",firstDay:1,days:{names:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],namesAbbr:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],namesShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]},months:{names:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],namesAbbr:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]},monthsGenitive:{names:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],namesAbbr:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]},AM:null,PM:null,patterns:{d:"dd.MM.yyyy",D:"d MMMM yyyy 'г.'",t:"H:mm",T:"H:mm:ss",f:"d MMMM yyyy 'г.' H:mm",F:"d MMMM yyyy 'г.' H:mm:ss",Y:"MMMM yyyy"}}}})})(zGe)})()),_P.exports}FGe();function nv(t){let e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(!e)return"";let n=parseInt(e[1],16),r=parseInt(e[2],16),s=parseInt(e[3],16),i="";n/=255,r/=255,s/=255;let o=Math.max(n,r,s),a=Math.min(n,r,s),l=0,c=0,d=(o+a)/2;if(o===a)l=c=0;else{let f=o-a;switch(c=d>.5?f/(2-o-a):f/(o+a),o){case n:l=(r-s)/f+(r<s?6:0);break;case r:l=(s-n)/f+2;break;case s:l=(n-r)/f+4;break}l/=6}return l=Math.round(l*360),c=Math.round(c*100),d=Math.round(d*100),i=l+","+c+"%,"+(d+(100-d)/1.8)+"%","hsl("+i+")"}const uC=ds.month,BGe={dateFormat:"dd",dayHeaderFormat:"dd MMMM yyyy",monthHeaderFormat:"LLLL yyyy",dayRangeHeaderFormat:({start:t,end:e},n,r)=>r.format(t,"dd",n)+" — "+r.format(e,"dd MMMM yyyy",n)},HGe={showMore:t=>`+${t} ${ct("buttons.more")}`},qGe={formats:BGe,resizable:!0,selectable:!0,messages:HGe,showMultiDayTimes:!0,step:30,allDayMaxRows:2,localizer:tde(nt,{firstDayOfWeek:1}),longPressThreshold:20,getNow:()=>nt.local().toJSDate()},UGe=({event:t,start:e,end:n,isAllDay:r,events:s,view:i})=>{let o=t.allDay,a=t.resource.isAllDayWithoutTime,l=e,c=n;i!=="month"&&!r&&t.allDay&&(l=Es(e,{minute:0}),c=Es(e,{minute:60}),o=!1,a=!1),(r&&!t.allDay&&i!=="month"||t.allDay&&r)&&(o=!0,a=!0,l=Lt(e),c=Lt(n)),i==="month"&&!r&&(l=e,c=n),t.resource.isAllDayWithoutTime&&e instanceof Date&&n instanceof Date&&i==="month"&&(l=Lt(e),c=Lt(n),o=!0,a=!0);const d=s.find(f=>f.id===t.id)||t;return{...d,start:l,end:c,allDay:o,resource:{...d.resource,isAllDayWithoutTime:a,saveType:1}}},VGe=(t,e,n,r)=>{const{resource:s,end:i}=t,{mainColor:o,categoryId:a,participantInfo:l}=s,{attendingType:c}=l,d=!co(Lt(t.start),Lt(t.end),"day"),f=e[a]||o;if(o==="#00000080")return{background:o};const p=r&&q1(new Date,i)?nv(f):f;if(!d&&n==="month"&&!t.allDay||n==="agenda")return{background:"transparent"};const m={borderLeftWidth:s.categoryId?4:1,borderStyle:"solid",borderLeftColor:s.categoryId?o:"#fff",boxShadow:s.categoryId?"-1px 0 0 0 #fff":"none",borderTopWidth:1,borderRightWidth:1,borderBottomWidth:1};return c===4?{...m,borderTopColor:"#fff",borderBottomColor:"#fff",borderRightColor:"#fff",backgroundColor:p,backgroundImage:`repeating-linear-gradient(
        45deg,
        #ffffff,
        #ffffff 5px,
        ${p} 5px,
        ${p} 10px
      )`}:c===2?{...m,borderTopColor:p,borderBottomColor:p,borderRightColor:p,borderLeftColor:p,background:"#fff",textDecoration:"line-through"}:c===1||c===null?{...m,borderTopColor:"#fff",borderBottomColor:"#fff",borderRightColor:"#fff",background:p}:{...m,borderTopColor:p,borderBottomColor:p,borderRightColor:p,borderLeftColor:p,background:"#fff",color:p}},Tde=(t,e,n)=>(r,s)=>{const{allDay:i,resource:o}=r,a=VGe(r,t,e,n),l=ga(r.end,new Date);let c={borderRadius:"6px",color:"#343a40",maxHeight:s===!1||!i?"":60,...a};return{className:ti({"recurring-event":o.recurring.repeatPeriod!=="never","is-past-event":n&&l}),style:c}},WGe=(t,e)=>{const n=s=>{const i=s.getBoundingClientRect(),{top:o}=t.getBoundingClientRect();return i.top<=o+20};t.querySelectorAll(".rbc-label").forEach(s=>{n(s)&&e((s==null?void 0:s.innerHTML)||"")})},Ade=t=>{let e=new Date,n=new Date;return Array.isArray(t)?(e=kl(t[0],"day"),n=Iu(t[t.length-1],"day")):(e=kl(t.start,"day"),n=Iu(t.end,"day")),{start:e,end:n}},YGe=(t,e)=>{if(qe.isNil(e))return!0;const{start:n,end:r}=t,{start:s,end:i}=e;return!((q1(n,s)||co(n,s,"day"))&&(ga(r,i)||co(n,s,"day")))},GGe=({view:t,handleClick:e,handleShowCreateEvent:n,action:r,date:s,start:i,dispatch:o,showCreateEvent:a,event:l,rest:c,end:d,navigate:f})=>{const p=`/event/new/${St(i,"yyyy-MM-dd")}`;t==="month"?co(i,s,"day")&&e(()=>{var m,v,y,x;r==="click"?n({...l,start:xr(Lt(i),{hour:10,minute:0}),end:xr(Lt(i),{hour:11,minute:0})},{left:((m=c==null?void 0:c.box)==null?void 0:m.clientX)||((v=c==null?void 0:c.bounds)==null?void 0:v.x),top:((y=c==null?void 0:c.box)==null?void 0:y.clientY)||((x=c==null?void 0:c.bounds)==null?void 0:x.y)}):(o(a({opened:!1,event:{...l,start:xr(Lt(i),{hour:10,minute:0}),end:xr(Lt(i),{hour:11,minute:0})}})),f(p))}):e(()=>{var m,v,y,x,w,C,E,D;r==="doubleClick"?(o(a({opened:!1,event:{...l,start:Lt(i),end:Es(Lt(i),{hour:1}),resource:{...l.resource,isAllDayWithoutTime:!c.hasOwnProperty("box")}}})),f(p)):r==="select"?n({...l,start:Lt(i),end:Lt(d),resource:{...l.resource,isAllDayWithoutTime:!c.hasOwnProperty("box")}},{left:((m=c==null?void 0:c.box)==null?void 0:m.clientX)||((v=c==null?void 0:c.bounds)==null?void 0:v.x),top:(((y=c==null?void 0:c.box)==null?void 0:y.clientY)||((x=c==null?void 0:c.bounds)==null?void 0:x.y))-window.scrollY}):n({...l,start:Lt(i),end:Es(Lt(i),{hour:1}),resource:{...l.resource,isAllDayWithoutTime:!c.hasOwnProperty("box")}},{left:((w=c==null?void 0:c.box)==null?void 0:w.clientX)||((C=c==null?void 0:c.bounds)==null?void 0:C.x),top:((E=c==null?void 0:c.box)==null?void 0:E.clientY)||((D=c==null?void 0:c.bounds)==null?void 0:D.y)})})},KGe=async({events:t,view:e,dispatch:n,editEventThunk:r,showCreateEvent:s,openRecurringActionModal:i,updateEvents:o,event:a,start:l,end:c,isAllDay:d})=>{const{participantInfo:f}=a.resource,{accessType:p}=f;if(p===mt.Read){$n.showWarning(ct("warning.message_access"));return}const v=UGe({event:a,start:l,end:c,isAllDay:d,events:t,view:e});a.resource.recurring.repeatPeriod==="never"?(await n(r(v)),n(_c()),n(o())):(n(s({opened:!1,event:{...v,resource:{...v.resource,exception:{toDateFrom:a.start,toDateTo:new Date(l),startDate:a.start,endDate:a.end}}}})),n(i("Moved")))},ZGe=async({dispatch:t,events:e,editEventThunk:n,showCreateEvent:r,openRecurringActionModal:s,updateEvents:i,event:o,start:a,end:l})=>{const{participantInfo:c}=o.resource,{accessType:d}=c;if(d===mt.Read){$n.showWarning(ct("warning.message_access"));return}let p=e.find(x=>x.id===o.id)||o,m=new Date(a),v=new Date(l);o.resource.isAllDayWithoutTime&&(m=Lt(m),v=Lt(v));const y={...p,resource:{...p.resource,saveType:rs.DoNotSaveParticipants},start:m,end:v};o.resource.recurring.repeatPeriod==="never"?(await t(n(y)),t(_c()),t(i())):(t(r({opened:!1,event:{...y,resource:{...y.resource,exception:{toDateFrom:new Date(o.start),toDateTo:new Date(a),startDate:o.start,endDate:o.end}}}})),t(s("Moved")))},Uz=(t,e,n)=>{const r={borderRadius:"50%",height:12,width:12,backgroundColor:e,border:e?"1px solid #fff":"none"};switch(t){case Wa.WillVisit:return r;case Wa.None:return{...r,background:"#fff",textDecorationColor:n};case Wa.NotVisit:return{...r,backgroundColor:"#fff",textDecorationColor:n};case Wa.Maybe:return{...r,border:"none",backgroundImage:`linear-gradient(
                45deg, 
                #ffffff 25%,
                ${n} 25%, 
                ${n} 50%,
                #ffffff 50%, 
                #ffffff 75%,
                ${n} 75%,
                ${n} 100%
            )`,backgroundSize:"5px 5px"};default:return{...r}}},JGe=(t,e,n,r)=>n<2?null:n>=3||n===2&&!r?`${t} - ${e}`:t,_de=t=>{const e=Ve.c(7),{ref:n,latency:r,onSingleClick:s,onDoubleClick:i,event:o}=t,a=r===void 0?300:r,l=s===void 0?XGe:s,c=i===void 0?QGe:i;let d;e[0]!==a||e[1]!==c||e[2]!==l||e[3]!==n?(d=()=>{const p=n.current;let m=0;const v=y=>{m=m+1,setTimeout(()=>{m===1?l(y):m>1&&c(y),m=0},a)};return p==null||p.addEventListener("click",v),()=>{p==null||p.removeEventListener("click",v)}},e[0]=a,e[1]=c,e[2]=l,e[3]=n,e[4]=d):d=e[4];let f;e[5]!==o?(f=[o],e[5]=o,e[6]=f):f=e[6],O.useEffect(d,f)};function XGe(){return null}function QGe(){return null}const nO=()=>t=>{const e=St(t.start,"yyyy-MM-dd'T'HH:mm:ss'Z'",!t.resource.isAllDayWithoutTime);return`/event/${t.id}/${e}`},Ode=({event:t,isBusyMode:e,setEventDetailsModalData:n,setShowEventDetailsModal:r,setEventDetailsModalCoords:s})=>{const i=Kt(),o=O.useRef(null),a=Il(t.resource),l=Br(),c=ve(Yo),d=ve(Lh),f=ds[d??uC],p=O.useCallback(()=>{i(OL({opened:!1,event:t,coords:{left:0,top:0}}))},[i,t]),m=nO(),{paramView:v,year:y,month:x,day:w,eventId:C}=Fu(),E=O.useCallback(_=>{_.preventDefault(),i(OL({opened:!0,event:t,coords:{left:_.clientX,top:_.clientY}}))},[t]),D=async()=>{const _=a!==mt.FreeBusy&&a!==mt.Read,{payload:R}=await i(Tu({id:Number(t.id),calendarsGroup:c,startDate:t.start,isAllDay:t.resource.isAllDayWithoutTime,isUtc:!0}));R.HasMaterials&&_&&i($d(Number(t.id)))},T=(_,R)=>{if(!_)return;const N=_.getBoundingClientRect();s(f==="day"?{left:(R==null?void 0:R.clientX)||N.left,top:(R==null?void 0:R.clientY)||N.top}:{left:N==null?void 0:N.x,top:N==null?void 0:N.y,width:N==null?void 0:N.width,height:N==null?void 0:N.height})},A=_=>{const R=_.target;T(R,_),n(t),r(!0);const N=St(t.start,"yyyy/MM/dd");l(`/${v}/${N}/${t.id}`)};return _de({onSingleClick:_=>{A(_)},onDoubleClick:()=>{e||(p(),l(m(t)))},ref:o,latency:250,event:t}),O.useEffect(()=>{if(C&&o.current){const _=o.current;if(C===String(t.id)&&PAe(t.start,Number(y),Number(x),Number(w))){if(T(_),n(t),r(!0),e)return;D()}}},[C,y,x,w]),{ref:o,handleContextMenu:E}},eKe=t=>{var q;const{t:e}=yt(),n=ve(Lh),r=ds[n??uC],{event:s,isBusyMode:i=!1}=t,{title:o,resource:a}=s,{mainColor:l,categoryId:c,participantInfo:d,location:f,isCanceled:p}=a,{accessType:m}=d,v=!co(Lt(s.start),Lt(s.end),"day");mt.Read;const y=ve(wv),{attendingType:x}=d,w=x===Wa.NotVisit||p?"line-through":"unset",C=ve(zw),{handleContextMenu:E,ref:D}=Ode({event:s,isBusyMode:i,setEventDetailsModalData:t.setEventDetailsModalData,setShowEventDetailsModal:t.setShowEventDetailsModal,setEventDetailsModalCoords:t.setEventDetailsModalCoords}),T=ga(s.end,new Date),A=C&&T?nv(l):l,_=C&&T?nv(y[c]):y[c],R=O.useMemo(()=>Uz(p?Wa.NotVisit:x,_,A),[x,_,A,p]),N=O.useMemo(()=>!v&&r==="month"&&!s.allDay,[v,r,s.allDay]),{eventTimeStart:I,eventTimeEnd:$}=O.useMemo(()=>({eventTimeStart:St(s.start,"HH:mm"),eventTimeEnd:St(s.end,"HH:mm")}),[s.start,s.end]),L=t.linesEvent||1,z=(q=D.current)==null?void 0:q.clientWidth,F=L===1&&I===$?"xs":"sm";return a.mainColor==="#00000080"?null:g.jsxs(le,{className:`custom-event-container ${v?"":"more-than-one-day"}`,onContextMenu:E,pt:2,pb:2,mih:20,children:[g.jsx(le,{ref:D,className:"event-box-ref"}),g.jsxs(vt,{align:r==="month"?"center":"start",children:[N&&g.jsx(le,{className:"event-external-circle",style:{backgroundColor:A},children:g.jsx(le,{style:R})}),r==="month"&&!a.isAllDayWithoutTime&&g.jsx(He,{td:w,fz:F,className:"custom-event-start",children:I}),g.jsxs(He,{lineClamp:L>3?L-2:1,className:ti("event-title",{"white-space":r!=="month"}),td:w,fz:F,children:[p&&g.jsxs("span",{style:{fontWeight:500},children:[e("eventStatus.canceled"),": "]}),o||e("placeholders.defaultEventTitle"),r!=="month"&&g.jsxs(g.Fragment,{children:[L<2?`, ${I} - ${$}`:"",L<2&&f?`, ${f}`:""]})]})]}),r==="month"||a.isAllDayWithoutTime||L===1?null:g.jsxs(g.Fragment,{children:[g.jsx(le,{children:g.jsxs(He,{fz:F,children:[JGe(I,$,L,f),L===2&&f?`, ${f}`:""]})}),L>=3&&g.jsx(le,{w:z&&z-10,children:g.jsx(He,{fz:F,truncate:!0,children:f})})]})]})},GJ=t=>{const e=Ve.c(14),{label:n,date:r,onChangeDate:s}=t;let i;e[0]!==n?(i=n.split(" "),e[0]=n,e[1]=i):i=e[1];const o=i;let a;e[2]!==o[0]?(a=g.jsx("span",{children:o[0]}),e[2]=o[0],e[3]=a):a=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(vn,{w:5}),e[4]=l):l=e[4];let c;e[5]!==o[1]?(c=g.jsx(vt,{pt:5,h:"100%",align:"flex-start",children:g.jsx("sup",{children:o[1]})}),e[5]=o[1],e[6]=c):c=e[6];let d;e[7]!==r||e[8]!==s?(d=g.jsx(le,{onClick:p=>{p.stopPropagation(),s(r)},className:"week-header-box"}),e[7]=r,e[8]=s,e[9]=d):d=e[9];let f;return e[10]!==a||e[11]!==c||e[12]!==d?(f=g.jsxs(vt,{align:"center",className:"week-header-container",gap:0,children:[a,l,c,d]}),e[10]=a,e[11]=c,e[12]=d,e[13]=f):f=e[13],f},tKe=()=>{var d,f;const t=Ve.c(13),e=ve(Cv),{Timezone:n}=ve(oh);let r;t[0]!==n?(r=n||{Id:null,SecondEnabled:!1,SecondId:null},t[0]=n,t[1]=r):r=t[1];const{Id:s,SecondEnabled:i,SecondId:o}=r;let a;t[2]!==i||t[3]!==o||t[4]!==e?(a=i&&g.jsxs("div",{className:"time-slot-header",children:["UTC ",(d=e[o])==null?void 0:d.utc.slice(0,3)]}),t[2]=i,t[3]=o,t[4]=e,t[5]=a):a=t[5];let l;t[6]!==s||t[7]!==(n==null?void 0:n.Id)||t[8]!==e?(l=(n==null?void 0:n.Id)&&g.jsxs("div",{className:"time-slot-header",children:["UTC ",(f=e[Number(s)])==null?void 0:f.utc.slice(0,3)]}),t[6]=s,t[7]=n==null?void 0:n.Id,t[8]=e,t[9]=l):l=t[9];let c;return t[10]!==a||t[11]!==l?(c=g.jsxs("div",{className:"time-slot-header-wrapper",children:[a,l]}),t[10]=a,t[11]=l,t[12]=c):c=t[12],c},nKe=t=>{const e=Ln.language,{event:n,email:r,calendarsGroup:s,setSelectedEvent:i,setShowEventDetailsModal:o,setModalCoords:a}=t,l=Kt(),{color:c}=n.resource.calendarId?s[n.resource.calendarId]:{color:""},d=async()=>{await l(Tu({id:Number(n.id),calendarsGroup:s,startDate:n.start,isAllDay:n.allDay})),n.resource.hasMaterials&&l($d(Number(n.id)))},f=O.useCallback(async p=>{a({left:p.clientX,top:p.clientY}),i(n),o(!0),d()},[o,s,l,n,a,i]);return g.jsx(le,{px:20,py:7,className:"search-popup-item",onClick:f,children:g.jsxs(wt,{justify:"space-between",children:[g.jsxs(wt,{gap:"xs",children:[g.jsx(Z_,{size:18}),g.jsx(ah,{size:18,style:{color:c}}),g.jsxs(le,{children:[g.jsx(le,{maw:200,children:g.jsx(ss,{multiline:!0,disabled:n.title.length<=27,maw:500,withArrow:!0,transitionProps:{duration:200},label:n.title,styles:{tooltip:{whiteSpace:"pre-wrap",wordBreak:"break-word"}},children:g.jsxs(He,{truncate:!0,fz:"md",children:[" ",n.title]})})}),g.jsx(le,{children:g.jsx(He,{c:"gray.6",fz:"sm",children:r})})]})]}),g.jsx(He,{c:"gray.6",fz:"sm",children:St(n.start,"EEEE",!1,e)})]})})},rKe=t=>{const e=Ve.c(15),{events:n,email:r,calendarsGroup:s,setSelectedEvent:i,setShowEventDetailsModal:o,setModalCoords:a}=t;let l;if(e[0]!==s||e[1]!==r||e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==o){let d;e[7]!==s||e[8]!==r||e[9]!==a||e[10]!==i||e[11]!==o?(d=f=>g.jsx(nKe,{setModalCoords:a,setShowEventDetailsModal:o,setSelectedEvent:i,event:f,email:r,calendarsGroup:s},`${f.id}-${f.title}-${f.start}`),e[7]=s,e[8]=r,e[9]=a,e[10]=i,e[11]=o,e[12]=d):d=e[12],l=n.map(d),e[0]=s,e[1]=r,e[2]=n,e[3]=a,e[4]=i,e[5]=o,e[6]=l}else l=e[6];let c;return e[13]!==l?(c=g.jsx(le,{children:g.jsx(Qs.Autosize,{mah:420,mx:"auto",children:l})}),e[13]=l,e[14]=c):c=e[14],c},SA="dd MMMM yyyy, HH:mm";Qe.extend(g3);const sKe=(t,e,n)=>n?`${St(t,"dd MMMM yyyy")} - ${St(e,"dd MMMM yyyy")}`:`${St(t,SA)} - ${St(e,SA)}`,iKe=t=>{const e=t%10,n=t%100;return e===1&&n!==11?"one":[2,3,4].includes(e)&&![12,13,14].includes(n)?"few":"many"},oKe=(t,e,n)=>{if(e===gt.Minute&&n==="one")return t("timeIndicators.minutes_accusative");switch(e){case gt.Minute:return t(`timeIndicators.minutes_${n}`);case gt.Hour:return t(`timeIndicators.hours_${n}`);case gt.Day:return t(`timeIndicators.days_${n}`);case gt.Weeks:return t(`timeIndicators.weeks_${n}`);default:return""}},qp=t=>{const e=t.intervalCount??0;switch(t.intervalType){case gt.Minute:return e;case gt.Hour:return e*60;case gt.Day:return e*60*24;case gt.Weeks:return e*60*24*7;default:return 1/0}},aKe=(t,e,n)=>t.slice().sort((r,s)=>r.order-s.order).map(r=>{var v;const s=r.intervalCount,i=iKe(s),o=oKe(e,r.intervalType,i),a=r.type===lh.Mail?`, ${e("notifications.letter")}`:"";if(!n)return s===0?`${e("buttons.startTime")} ${a}`:`${e("buttons.For")} ${s} ${o}${a}`;const l=(v=r.allDayInterval)==null?void 0:v.split(":");if(!l)return"";const d=Qe.utc(`2000-01-01 ${l[0]}:${l[1]}:${l[2]||"00"}`).local(),f=d.format("HH"),p=d.format("mm"),m=` (${e("notifications.beforeEvent")} ${f}:${p})`;return s===0?`${e("buttons.thisDay")} ${a}${m}`:`${e("buttons.For")} ${s} ${o}${a}${m}`}),Rde=({startDate:t,endDate:e,isAllDay:n,locale:r="ru"})=>{const s=Lt(t),i=Lt(e),o=co(s,i,"month"),a=co(s,i,"day");return o?n&&a?St(t,"EEEE, dd MMMM",!1,r):n&&!a?`${St(t,"dd",!1,r)} - ${St(e,"dd MMMM yyyy",!1,r)}`:!n&&!a?`${St(t,SA,!1,r)} - ${St(e,SA,!1,r)}`:`${St(t,"EEEE, dd MMMM ⋅ HH:mm",!1,r)} - ${St(e,"HH:mm",!1,r)}`:sKe(t,e,n)},lKe=t=>/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/i.test(t),b1=(t,e)=>{if(!e||!t)return!1;const n=e.ContactId===t.resource.organizerId,r=t.resource.hasParticipant;return n&&r};var mI={exports:{}},pr={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var KJ;function cKe(){if(KJ)return pr;KJ=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,o=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,m=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function E(T){if(typeof T=="object"&&T!==null){var A=T.$$typeof;switch(A){case e:switch(T=T.type,T){case l:case c:case r:case i:case s:case f:return T;default:switch(T=T&&T.$$typeof,T){case a:case d:case v:case m:case o:return T;default:return A}}case n:return A}}}function D(T){return E(T)===c}return pr.AsyncMode=l,pr.ConcurrentMode=c,pr.ContextConsumer=a,pr.ContextProvider=o,pr.Element=e,pr.ForwardRef=d,pr.Fragment=r,pr.Lazy=v,pr.Memo=m,pr.Portal=n,pr.Profiler=i,pr.StrictMode=s,pr.Suspense=f,pr.isAsyncMode=function(T){return D(T)||E(T)===l},pr.isConcurrentMode=D,pr.isContextConsumer=function(T){return E(T)===a},pr.isContextProvider=function(T){return E(T)===o},pr.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===e},pr.isForwardRef=function(T){return E(T)===d},pr.isFragment=function(T){return E(T)===r},pr.isLazy=function(T){return E(T)===v},pr.isMemo=function(T){return E(T)===m},pr.isPortal=function(T){return E(T)===n},pr.isProfiler=function(T){return E(T)===i},pr.isStrictMode=function(T){return E(T)===s},pr.isSuspense=function(T){return E(T)===f},pr.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===s||T===f||T===p||typeof T=="object"&&T!==null&&(T.$$typeof===v||T.$$typeof===m||T.$$typeof===o||T.$$typeof===a||T.$$typeof===d||T.$$typeof===x||T.$$typeof===w||T.$$typeof===C||T.$$typeof===y)},pr.typeOf=E,pr}var ZJ;function uKe(){return ZJ||(ZJ=1,mI.exports=cKe()),mI.exports}var gI,JJ;function dKe(){if(JJ)return gI;JJ=1;var t=uKe(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[t.ForwardRef]=r,i[t.Memo]=s;function o(v){return t.isMemo(v)?s:i[v.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(v,y,x){if(typeof y!="string"){if(p){var w=f(y);w&&w!==p&&m(v,w,x)}var C=l(y);c&&(C=C.concat(c(y)));for(var E=o(v),D=o(y),T=0;T<C.length;++T){var A=C[T];if(!n[A]&&!(x&&x[A])&&!(D&&D[A])&&!(E&&E[A])){var _=d(y,A);try{a(v,A,_)}catch{}}}}return v}return gI=m,gI}var fKe=dKe();const pKe=Mr(fKe);function hKe(t,e){if(!t){var n=new Error("loadable: "+e);throw n.framesToPop=1,n.name="Invariant Violation",n}}var mKe=xe.createContext(),gKe={initialChunks:{}},XJ="PENDING",vKe="RESOLVED",vI="REJECTED";function yKe(t){return typeof t=="function"?{requireAsync:t,resolve:function(){},chunkName:function(){}}:t}var bKe=function(e){var n=function(s){return xe.createElement(mKe.Consumer,null,function(i){return xe.createElement(e,Object.assign({__chunkExtractor:i},s))})};return e.displayName&&(n.displayName=e.displayName+"WithChunkExtractor"),n},xKe=function(e){return e};function Nde(t){var e=t.defaultResolveComponent,n=e===void 0?xKe:e,r=t.render,s=t.onLoad;function i(a,l){l===void 0&&(l={});var c=yKe(a),d={};function f(w){return l.cacheKey?l.cacheKey(w):c.resolve?c.resolve(w):"static"}function p(w,C,E){var D=l.resolveComponent?l.resolveComponent(w,C):n(w);return pKe(E,D,{preload:!0}),D}var m=function(C){var E=f(C),D=d[E];return(!D||D.status===vI)&&(D=c.requireAsync(C),D.status=XJ,d[E]=D,D.then(function(){D.status=vKe},function(T){console.error("loadable-components: failed to asynchronously load component",{fileName:c.resolve(C),chunkName:c.chunkName(C),error:T&&T.message}),D.status=vI})),D},v=(function(w){U_(C,w),C.getDerivedStateFromProps=function(T,A){var _=f(T);return wr({},A,{cacheKey:_,loading:A.loading||A.cacheKey!==_})};function C(D){var T;return T=w.call(this,D)||this,T.state={result:null,error:null,loading:!0,cacheKey:f(D)},hKe(!D.__chunkExtractor||c.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),D.__chunkExtractor?(l.ssr===!1||(c.requireAsync(D).catch(function(){return null}),T.loadSync(),D.__chunkExtractor.addChunk(c.chunkName(D))),_S(T)):(l.ssr!==!1&&(c.isReady&&c.isReady(D)||c.chunkName&&gKe.initialChunks[c.chunkName(D)])&&T.loadSync(),T)}var E=C.prototype;return E.componentDidMount=function(){this.mounted=!0;var T=this.getCache();T&&T.status===vI&&this.setCache(),this.state.loading&&this.loadAsync()},E.componentDidUpdate=function(T,A){A.cacheKey!==this.state.cacheKey&&this.loadAsync()},E.componentWillUnmount=function(){this.mounted=!1},E.safeSetState=function(T,A){this.mounted&&this.setState(T,A)},E.getCacheKey=function(){return f(this.props)},E.getCache=function(){return d[this.getCacheKey()]},E.setCache=function(T){T===void 0&&(T=void 0),d[this.getCacheKey()]=T},E.triggerOnLoad=function(){var T=this;s&&setTimeout(function(){s(T.state.result,T.props)})},E.loadSync=function(){if(this.state.loading)try{var T=c.requireSync(this.props),A=p(T,this.props,x);this.state.result=A,this.state.loading=!1}catch(_){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:c.resolve(this.props),chunkName:c.chunkName(this.props),error:_&&_.message}),this.state.error=_}},E.loadAsync=function(){var T=this,A=this.resolveAsync();return A.then(function(_){var R=p(_,T.props,x);T.safeSetState({result:R,loading:!1},function(){return T.triggerOnLoad()})}).catch(function(_){return T.safeSetState({error:_,loading:!1})}),A},E.resolveAsync=function(){var T=this.props;T.__chunkExtractor,T.forwardedRef;var A=Ud(T,["__chunkExtractor","forwardedRef"]);return m(A)},E.render=function(){var T=this.props,A=T.forwardedRef,_=T.fallback;T.__chunkExtractor;var R=Ud(T,["forwardedRef","fallback","__chunkExtractor"]),N=this.state,I=N.error,$=N.loading,L=N.result;if(l.suspense){var z=this.getCache()||this.loadAsync();if(z.status===XJ)throw this.loadAsync()}if(I)throw I;var F=_||l.fallback||null;return $?F:r({fallback:F,result:L,options:l,props:wr({},R,{ref:A})})},C})(xe.Component),y=bKe(v),x=xe.forwardRef(function(w,C){return xe.createElement(y,Object.assign({forwardedRef:C},w))});return x.displayName="Loadable",x.preload=function(w){x.load(w)},x.load=function(w){return m(w)},x}function o(a,l){return i(a,wr({},l,{suspense:!0}))}return{loadable:i,lazy:o}}function SKe(t){return t.__esModule?t.default:t.default||t}var jde=Nde({defaultResolveComponent:SKe,render:function(e){var n=e.result,r=e.props;return xe.createElement(n,r)}}),wKe=jde.loadable,CKe=jde.lazy,Ide=Nde({onLoad:function(e,n){e&&n.forwardedRef&&(typeof n.forwardedRef=="function"?n.forwardedRef(e):n.forwardedRef.current=e)},render:function(e){var n=e.result,r=e.props;return r.children?r.children(n):null}}),EKe=Ide.loadable,MKe=Ide.lazy,Yu=wKe;Yu.lib=EKe;var DKe=CKe;DKe.lib=MKe;var Sk={exports:{}},kKe=Sk.exports,QJ;function TKe(){return QJ||(QJ=1,(function(t,e){(function(n,r){t.exports=r(vi())})(typeof self<"u"?self:kKe,function(n){return(function(){var r={155:function(C){C.exports=n}},s={};function i(C){var E=s[C];if(E!==void 0)return E.exports;var D=s[C]={exports:{}};return r[C](D,D.exports,i),D.exports}i.d=function(C,E){for(var D in E)i.o(E,D)&&!i.o(C,D)&&Object.defineProperty(C,D,{enumerable:!0,get:E[D]})},i.o=function(C,E){return Object.prototype.hasOwnProperty.call(C,E)},i.r=function(C){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})};var o={};i.r(o),i.d(o,{useReactToPrint:function(){return w}});var a=i(155);const l="printWindow";function c({level:C="error",messages:E,suppressErrors:D=!1}){D||(C==="error"?console.error(E):C==="warning"?console.warn(E):console.debug(E))}function d(C,E){if(E||!C){const D=document.getElementById(l);D&&document.body.removeChild(D)}}function f(C){return C instanceof Error?C:new Error("Unknown Error")}function p(C,E){const{documentTitle:D,onAfterPrint:T,onPrintError:A,preserveAfterPrint:_,print:R,suppressErrors:N}=E;setTimeout(()=>{var I,$;if(C.contentWindow){let L=function(){T==null||T(),d(_)};if(C.contentWindow.focus(),R)R(C).then(L).catch(z=>{A?A("print",f(z)):c({messages:["An error was thrown by the specified `print` function"],suppressErrors:N})});else{if(C.contentWindow.print){const z=($=(I=C.contentDocument)===null||I===void 0?void 0:I.title)!==null&&$!==void 0?$:"",F=C.ownerDocument.title;D&&(C.ownerDocument.title=D,C.contentDocument&&(C.contentDocument.title=D)),C.contentWindow.print(),D&&(C.ownerDocument.title=F,C.contentDocument&&(C.contentDocument.title=z))}else c({messages:["Printing for this browser is not currently possible: the browser does not have a `print` method available for iframes."],suppressErrors:N});[/Android/i,/webOS/i,/iPhone/i,/iPad/i,/iPod/i,/BlackBerry/i,/Windows Phone/i].some(z=>{var F,q;return((q=(F=navigator.userAgent)!==null&&F!==void 0?F:navigator.vendor)!==null&&q!==void 0?q:"opera"in window&&window.opera).match(z)})?setTimeout(L,500):L()}}else c({messages:["Printing failed because the `contentWindow` of the print iframe did not load. This is possibly an error with `react-to-print`. Please file an issue: https://github.com/MatthewHerbst/react-to-print/issues/"],suppressErrors:N})},500)}function m(C){const E=[],D=document.createTreeWalker(C,NodeFilter.SHOW_ELEMENT,null);let T=D.nextNode();for(;T;)E.push(T),T=D.nextNode();return E}function v(C,E,D){const T=m(C),A=m(E);if(T.length===A.length)for(let _=0;_<T.length;_++){const R=T[_],N=A[_],I=R.shadowRoot;if(I!==null){const $=N.attachShadow({mode:I.mode});$.innerHTML=I.innerHTML,v(I,$,D)}}else c({messages:["When cloning shadow root content, source and target elements have different size. `onBeforePrint` likely resolved too early.",C,E],suppressErrors:D})}const y=`
    @page {
        /* Remove browser default header (title) and footer (url) */
        margin: 0;
    }
    @media print {
        body {
            /* Tell browsers to print background colors */
            color-adjust: exact; /* Firefox. This is an older version of "print-color-adjust" */
            print-color-adjust: exact; /* Firefox/Safari */
            -webkit-print-color-adjust: exact; /* Chrome/Safari/Edge/Opera */
        }
    }
`;function x(C,E,D,T){var A,_,R,N,I;const{contentNode:$,clonedContentNode:L,clonedImgNodes:z,clonedVideoNodes:F,numResourcesToLoad:q,originalCanvasNodes:H}=D,{bodyClass:B,fonts:V,ignoreGlobalStyles:Y,pageStyle:G,nonce:W,suppressErrors:Z,copyShadowRoots:Q}=T;C.onload=null;const X=(A=C.contentDocument)!==null&&A!==void 0?A:(_=C.contentWindow)===null||_===void 0?void 0:_.document;if(X){const re=X.body.appendChild(L);Q&&v($,re,!!Z),V&&(!((R=C.contentDocument)===null||R===void 0)&&R.fonts&&(!((N=C.contentWindow)===null||N===void 0)&&N.FontFace)?V.forEach(de=>{const me=new FontFace(de.family,de.source,{weight:de.weight,style:de.style});C.contentDocument.fonts.add(me),me.loaded.then(()=>{E(me)}).catch(Se=>{E(me,["Failed loading the font:",me,"Load error:",f(Se)])})}):(V.forEach(de=>{E(de)}),c({messages:['"react-to-print" is not able to load custom fonts because the browser does not support the FontFace API but will continue attempting to print the page'],suppressErrors:Z})));const ne=G??y,ee=X.createElement("style");W&&(ee.setAttribute("nonce",W),X.head.setAttribute("nonce",W)),ee.appendChild(X.createTextNode(ne)),X.head.appendChild(ee),B&&X.body.classList.add(...B.split(" "));const oe=X.querySelectorAll("canvas");for(let de=0;de<H.length;++de){const me=H[de],Se=oe[de];if(Se===void 0){c({messages:["A canvas element could not be copied for printing, has it loaded? `onBeforePrint` likely resolved too early.",me],suppressErrors:Z});continue}const De=Se.getContext("2d");De&&De.drawImage(me,0,0)}for(let de=0;de<z.length;de++){const me=z[de],Se=me.getAttribute("src");if(Se){const De=new Image;De.onload=()=>{E(me)},De.onerror=(Ae,fe,Te,Ne,Ue)=>{E(me,["Error loading <img>",me,"Error",Ue])},De.src=Se}else E(me,['Found an <img> tag with an empty "src" attribute. This prevents pre-loading it.',me])}for(let de=0;de<F.length;de++){const me=F[de];me.preload="auto";const Se=me.getAttribute("poster");if(Se){const De=new Image;De.onload=()=>{E(me)},De.onerror=(Ae,fe,Te,Ne,Ue)=>{E(me,["Error loading video poster",Se,"for video",me,"Error:",Ue])},De.src=Se}else me.readyState>=2?E(me):me.src?(me.onloadeddata=()=>{E(me)},me.onerror=(De,Ae,fe,Te,Ne)=>{E(me,["Error loading video",me,"Error",Ne])},me.onstalled=()=>{E(me,["Loading video stalled, skipping",me])}):E(me,["Error loading video, `src` is empty",me])}const ce="select",ue=$.querySelectorAll(ce),pe=X.querySelectorAll(ce);for(let de=0;de<ue.length;de++)pe[de].value=ue[de].value;if(!Y){const de=document.querySelectorAll("style, link[rel~='stylesheet'], link[as='style']");for(let me=0,Se=de.length;me<Se;++me){const De=de[me];if(De.tagName.toLowerCase()==="style"){const Ae=X.createElement(De.tagName),fe=De.sheet;if(fe){let Te="";try{const Ne=fe.cssRules.length;for(let Ue=0;Ue<Ne;++Ue)typeof fe.cssRules[Ue].cssText=="string"&&(Te+=`${fe.cssRules[Ue].cssText}\r
`)}catch(Ne){c({messages:["A stylesheet could not be accessed. This is likely due to the stylesheet having cross-origin imports, and many browsers block script access to cross-origin stylesheets. See https://github.com/MatthewHerbst/react-to-print/issues/429 for details. You may be able to load the sheet by both marking the stylesheet with the cross `crossorigin` attribute, and setting the `Access-Control-Allow-Origin` header on the server serving the stylesheet. Alternatively, host the stylesheet on your domain to avoid this issue entirely.",De,`Original error: ${f(Ne).message}`],level:"warning"})}Ae.setAttribute("id",`react-to-print-${me}`),W&&Ae.setAttribute("nonce",W),Ae.appendChild(X.createTextNode(Te)),X.head.appendChild(Ae)}}else if(De.getAttribute("href"))if(De.hasAttribute("disabled"))c({messages:["`react-to-print` encountered a <link> tag with a `disabled` attribute and will ignore it. Note that the `disabled` attribute is deprecated, and some browsers ignore it. You should stop using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-disabled. The <link> is:",De],level:"warning"}),E(De);else{const Ae=X.createElement(De.tagName);for(let fe=0,Te=De.attributes.length;fe<Te;++fe){const Ne=De.attributes[fe];Ne&&Ae.setAttribute(Ne.nodeName,(I=Ne.nodeValue)!==null&&I!==void 0?I:"")}Ae.onload=()=>{E(Ae)},Ae.onerror=(fe,Te,Ne,Ue,rt)=>{E(Ae,["Failed to load",Ae,"Error:",rt])},W&&Ae.setAttribute("nonce",W),X.head.appendChild(Ae)}else c({messages:["`react-to-print` encountered a <link> tag with an empty `href` attribute. In addition to being invalid HTML, this can cause problems in many browsers, and so the <link> was not loaded. The <link> is:",De],level:"warning"}),E(De)}}}q===0&&p(C,T)}function w({bodyClass:C,contentRef:E,copyShadowRoots:D,documentTitle:T,fonts:A,ignoreGlobalStyles:_,nonce:R,onAfterPrint:N,onBeforePrint:I,onPrintError:$,pageStyle:L,preserveAfterPrint:z,print:F,printIframeProps:q,suppressErrors:H}){return(0,a.useCallback)(V=>{function Y(){const G={bodyClass:C,contentRef:E,copyShadowRoots:D,documentTitle:T,fonts:A,ignoreGlobalStyles:_,nonce:R,onAfterPrint:N,onPrintError:$,pageStyle:L,preserveAfterPrint:z,print:F,suppressErrors:H},W=(function(X){const re=document.createElement("iframe");return re.width=`${document.documentElement.clientWidth}px`,re.height=`${document.documentElement.clientHeight}px`,re.style.position="absolute",re.style.top=`-${document.documentElement.clientHeight+100}px`,re.style.left=`-${document.documentElement.clientWidth+100}px`,re.id=l,re.srcdoc="<!DOCTYPE html>",X&&(X.allow&&(re.allow=X.allow),X.referrerPolicy!==void 0&&(re.referrerPolicy=X.referrerPolicy),X.sandbox!==void 0&&(re.sandbox=X.sandbox)),re})(q),Z=(function(X,re){const{contentRef:ne,fonts:ee,ignoreGlobalStyles:oe,suppressErrors:ce}=re,ue=(function({contentRef:Ae,optionalContent:fe,suppressErrors:Te}){return fe&&typeof fe=="function"?(Ae&&c({level:"warning",messages:['"react-to-print" received a `contentRef` option and an optional-content param passed to its callback. The `contentRef` option will be ignored.']}),fe()):Ae?Ae.current:void c({messages:['"react-to-print" did not receive a `contentRef` option or a optional-content param pass to its callback.'],suppressErrors:Te})})({contentRef:ne,optionalContent:X,suppressErrors:ce});if(!ue)return;const pe=ue.cloneNode(!0),de=document.querySelectorAll("link[rel~='stylesheet'], link[as='style']"),me=pe.querySelectorAll("img"),Se=pe.querySelectorAll("video"),De=ee?ee.length:0;return{contentNode:ue,clonedContentNode:pe,clonedImgNodes:me,clonedVideoNodes:Se,numResourcesToLoad:(oe?0:de.length)+me.length+Se.length+De,originalCanvasNodes:ue.querySelectorAll("canvas")}})(V,G);if(!Z)return void c({messages:["There is nothing to print"],suppressErrors:H});const Q=(function(X,re,ne){const{suppressErrors:ee}=X,oe=[],ce=[];return function(ue,pe){oe.includes(ue)?c({level:"debug",messages:["Tried to mark a resource that has already been handled",ue],suppressErrors:ee}):(pe?(c({messages:['"react-to-print" was unable to load a resource but will continue attempting to print the page',...pe],suppressErrors:ee}),ce.push(ue)):oe.push(ue),oe.length+ce.length===re&&p(ne,X))}})(G,Z.numResourcesToLoad,W);(function(X,re,ne,ee){X.onload=()=>{x(X,re,ne,ee)},document.body.appendChild(X)})(W,Q,Z,G)}d(z,!0),I?I().then(()=>{Y()}).catch(G=>{$==null||$("onBeforePrint",f(G))}):Y()},[C,E,D,T,A,_,R,N,I,$,L,z,F,H])}return o})()})})(Sk)),Sk.exports}var AKe=TKe();const _Ke=()=>{const t=Ve.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(le,{maw:400,children:g.jsxs(wt,{gap:"xs",children:[g.jsx(br,{h:28,w:113}),g.jsx(br,{h:28,w:113})]})}),t[0]=e):e=t[0],e},Lde=t=>{var ut,lt,At,jt;const e=Ve.c(124),{event:n,isPrint:r}=t,s=Ln.language,i=ve(kr),o=ve(Yo),a=ve(cf),l=ve(Gde),c=ve(uie),d=ve(fie),{title:f,start:p,end:m,resource:v}=n,{isMobile:y}=Yt(),{categoryId:x,mainColor:w,author:C,participantInfo:E,simpleNotifications:D,allDayNotifications:T,hasParticipant:A,hasMaterials:_,isAllDayWithoutTime:R,location:N,isFree:I}=v;let $;e[0]!==o||e[1]!==v.calendarId?($=v.calendarId?o[v.calendarId]:{name:"",color:""},e[0]=o,e[1]=v.calendarId,e[2]=$):$=e[2];const{color:L,name:z}=$,{attendingType:F}=E;let q;if(e[3]!==l||e[4]!==x){let Ot;e[6]!==x?(Ot=Pt=>Pt.Id===x,e[6]=x,e[7]=Ot):Ot=e[7],q=l.filter(Ot),e[3]=l,e[4]=x,e[5]=q}else q=e[5];const H=q[0],B=OKe;let V;e[8]!==F?(V=iNe(F),e[8]=F,e[9]=V):V=e[9];const{icon:Y}=V;let G;e[10]!==N?(G=lKe(N),e[10]=N,e[11]=G):G=e[11];const W=G,Z=R?T:D;let Q,X,re,ne,ee,oe,ce,ue,pe,de,me;if(e[12]!==F||e[13]!==C||e[14]!==m||e[15]!==n||e[16]!==Y||e[17]!==R||e[18]!==y||e[19]!==r||e[20]!==Z||e[21]!==v.isCanceled||e[22]!==v.isRecurringSeriesCanceled||e[23]!==p||e[24]!==f){const Ot=aKe(Z||[],ct,R);X=le,ee=y||r?"100%":300,oe="event-details-content-body",Q=le,ce=y?"100%":410;const Pt=(f==null?void 0:f.length)<59;let Rt;e[36]===Symbol.for("react.memo_cache_sentinel")?(Rt={duration:200},e[36]=Rt):Rt=e[36];let Nt;e[37]===Symbol.for("react.memo_cache_sentinel")?(Nt={tooltip:{whiteSpace:"pre-wrap",wordBreak:"break-word"}},e[37]=Nt):Nt=e[37];const Fn=r?24:"md",pn=r?"bold":"md",hn=v.isCanceled?"line-through":"unset";let On;e[38]!==v.isCanceled?(On=v.isCanceled&&g.jsxs("span",{style:{fontWeight:500},children:[ct("eventStatus.canceled"),": "]}),e[38]=v.isCanceled,e[39]=On):On=e[39];let Vt;e[40]!==f?(Vt=f||ct("placeholders.defaultEventTitle"),e[40]=f,e[41]=Vt):Vt=e[41];let an;e[42]!==Fn||e[43]!==pn||e[44]!==hn||e[45]!==On||e[46]!==Vt?(an=g.jsxs(He,{truncate:!0,fz:Fn,fw:pn,td:hn,children:[On,Vt]}),e[42]=Fn,e[43]=pn,e[44]=hn,e[45]=On,e[46]=Vt,e[47]=an):an=e[47],e[48]!==Pt||e[49]!==an||e[50]!==f?(ue=g.jsx(le,{children:g.jsx(ss,{multiline:!0,disabled:Pt,maw:500,withArrow:!0,transitionProps:Rt,label:f,styles:Nt,children:an})}),e[48]=Pt,e[49]=an,e[50]=f,e[51]=ue):ue=e[51],e[52]===Symbol.for("react.memo_cache_sentinel")?(pe=g.jsx(vn,{h:"md"}),e[52]=pe):pe=e[52],e[53]!==F||e[54]!==C||e[55]!==Y||e[56]!==r?(de=r&&g.jsxs(vt,{align:"center",children:[g.jsxs(He,{children:[ct("eventDetails.author"),": ",C.name||C.email||""]}),F&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{w:"sm"}),"•",g.jsx(vn,{w:"sm"}),g.jsxs(He,{children:[ct("eventDetails.yourAnswer"),":"]}),g.jsx(He,{mx:5,mt:5,children:Y})," ",B(F)]})]}),e[53]=F,e[54]=C,e[55]=Y,e[56]=r,e[57]=de):de=e[57],e[58]!==n?(me=(((lt=(ut=n==null?void 0:n.resource)==null?void 0:ut.recurring)==null?void 0:lt.repeatPeriod)===null||((jt=(At=n==null?void 0:n.resource)==null?void 0:At.recurring)==null?void 0:jt.repeatPeriod)!=="never")&&g.jsxs(vt,{gap:"xs",align:"flex-start",children:[g.jsx(le,{mt:3,w:20,children:g.jsx(J_,{size:20})}),g.jsx(loe,{isInfo:!0,open:RKe,event:n})]}),e[58]=n,e[59]=me):me=e[59],e[60]!==m||e[61]!==R||e[62]!==y||e[63]!==v.isCanceled||e[64]!==v.isRecurringSeriesCanceled||e[65]!==p?(re=(!v.isCanceled||v.isRecurringSeriesCanceled)&&g.jsxs(g.Fragment,{children:[g.jsxs(wt,{gap:"xs",children:[g.jsx(R$,{size:20}),g.jsx(He,{tt:"capitalize",fz:y?"xs":"md",children:Rde({startDate:p,endDate:m,isAllDay:R,locale:s})})]}),g.jsx(vn,{h:"md"})]}),e[60]=m,e[61]=R,e[62]=y,e[63]=v.isCanceled,e[64]=v.isRecurringSeriesCanceled,e[65]=p,e[66]=re):re=e[66],ne=Ot.length>0&&g.jsxs(vt,{align:"flex-start",gap:10,children:[g.jsx(A$,{size:20}),g.jsx(vt,{direction:"column",children:Ot.map((xn,Ts)=>g.jsx(He,{fz:y?"xs":"md",children:xn},Ts))})]}),e[12]=F,e[13]=C,e[14]=m,e[15]=n,e[16]=Y,e[17]=R,e[18]=y,e[19]=r,e[20]=Z,e[21]=v.isCanceled,e[22]=v.isRecurringSeriesCanceled,e[23]=p,e[24]=f,e[25]=Q,e[26]=X,e[27]=re,e[28]=ne,e[29]=ee,e[30]=oe,e[31]=ce,e[32]=ue,e[33]=pe,e[34]=de,e[35]=me}else Q=e[25],X=e[26],re=e[27],ne=e[28],ee=e[29],oe=e[30],ce=e[31],ue=e[32],pe=e[33],de=e[34],me=e[35];let Se;e[67]===Symbol.for("react.memo_cache_sentinel")?(Se=g.jsx(vn,{h:"md"}),e[67]=Se):Se=e[67];let De;e[68]!==N||e[69]!==W?(De=!!N&&g.jsxs(g.Fragment,{children:[g.jsxs(wt,{gap:"xs",wrap:"nowrap",children:[g.jsx(vt,{align:"center",children:g.jsx(N$,{className:"icon",size:20})}),g.jsx(ss,{multiline:!0,disabled:N.length<59,maw:500,withArrow:!0,transitionProps:{duration:200},label:N,styles:{tooltip:{whiteSpace:"pre-wrap",wordBreak:"break-word"}},children:W?g.jsx(fw,{truncate:!0,href:N,target:"_blank",rel:"noopener noreferrer",children:N}):g.jsx(He,{truncate:!0,children:N})})]}),g.jsx(vn,{h:"md"})]}),e[68]=N,e[69]=W,e[70]=De):De=e[70];let Ae;e[71]!==a||e[72]!==d||e[73]!==_||e[74]!==r?(Ae=_&&!r&&g.jsxs(le,{mb:10,className:"materialsRow",children:[g.jsx(vt,{w:"5%",mt:4,mr:10,children:g.jsx(xie,{className:"icon",size:20})}),d!=="fulfilled"?g.jsx(_Ke,{}):g.jsx(le,{w:"95%",children:g.jsx(q7,{documents:a.resource.documents,readonly:!0})})]}),e[71]=a,e[72]=d,e[73]=_,e[74]=r,e[75]=Ae):Ae=e[75];let fe;e[76]===Symbol.for("react.memo_cache_sentinel")?(fe=g.jsx(Z_,{size:20}),e[76]=fe):fe=e[76];let Te;e[77]!==L?(Te=g.jsx(ah,{style:{color:L},size:20}),e[77]=L,e[78]=Te):Te=e[78];let Ne;e[79]!==z?(Ne=g.jsx(He,{children:z}),e[79]=z,e[80]=Ne):Ne=e[80];let Ue;e[81]!==(H==null?void 0:H.Color)||e[82]!==(H==null?void 0:H.Name)||e[83]!==w?(Ue=(H==null?void 0:H.Color)&&g.jsxs(g.Fragment,{children:[g.jsx(ah,{style:{color:(H==null?void 0:H.Color)||w},size:20}),g.jsx(He,{children:(H==null?void 0:H.Name)||ct("eventDetails.withoutCategory")})]}),e[81]=H==null?void 0:H.Color,e[82]=H==null?void 0:H.Name,e[83]=w,e[84]=Ue):Ue=e[84];let rt;e[85]!==Te||e[86]!==Ne||e[87]!==Ue?(rt=g.jsxs(wt,{gap:"xs",children:[fe,Te,Ne,Ue]}),e[85]=Te,e[86]=Ne,e[87]=Ue,e[88]=rt):rt=e[88];let ot;e[89]!==v.isPrivate?(ot=v.isPrivate&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"md"}),g.jsxs(wt,{gap:"xs",children:[g.jsx(S4e,{size:20}),g.jsx(He,{children:ct("eventDetails.private")})]})]}),e[89]=v.isPrivate,e[90]=ot):ot=e[90];let Je;e[91]!==I?(Je=I===Rd.Free&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"md"}),g.jsxs(wt,{gap:"xs",children:[g.jsx(PRe,{size:20}),g.jsx(He,{children:ct("freeBusy.freeMessage")})]})]}),e[91]=I,e[92]=Je):Je=e[92];let je;e[93]!==Q||e[94]!==re||e[95]!==ne||e[96]!==De||e[97]!==Ae||e[98]!==rt||e[99]!==ot||e[100]!==Je||e[101]!==ce||e[102]!==ue||e[103]!==pe||e[104]!==de||e[105]!==me?(je=g.jsxs(Q,{maw:ce,children:[ue,pe,de,me,re,ne,Se,De,Ae,rt,ot,Je]}),e[93]=Q,e[94]=re,e[95]=ne,e[96]=De,e[97]=Ae,e[98]=rt,e[99]=ot,e[100]=Je,e[101]=ce,e[102]=ue,e[103]=pe,e[104]=de,e[105]=me,e[106]=je):je=e[106];let We;e[107]===Symbol.for("react.memo_cache_sentinel")?(We=g.jsx(vn,{h:"md"}),e[107]=We):We=e[107];let Le;e[108]!==a||e[109]!==c||e[110]!==(i==null?void 0:i.ContactId)||e[111]!==(i==null?void 0:i.Id)||e[112]!==A?(Le=A&&g.jsxs(le,{children:[g.jsxs(vt,{mih:50,gap:"xs",w:"100%",justify:"flex-start",align:"flex-start",wrap:"wrap",children:[g.jsx(le,{mt:3,w:20,children:g.jsx(j$,{size:20})}),c!=="fulfilled"?g.jsx(kie,{}):g.jsx(le,{children:g.jsx(Iie,{currentUserContactId:i==null?void 0:i.ContactId,currentUserId:i==null?void 0:i.Id,event:a})})]}),g.jsx(vn,{h:"md"})]}),e[108]=a,e[109]=c,e[110]=i==null?void 0:i.ContactId,e[111]=i==null?void 0:i.Id,e[112]=A,e[113]=Le):Le=e[113];let _e;e[114]!==n.resource.description||e[115]!==y?(_e=n.resource.description&&g.jsxs(le,{maw:y?"100%":410,children:[g.jsxs(vt,{gap:"xs",justify:"flex-start",align:"flex-start",children:[g.jsx(hie,{className:"icon",size:20}),g.jsx(He,{className:"description-text-details",style:{flex:1},dangerouslySetInnerHTML:{__html:n.resource.description}})]}),g.jsx(vn,{h:"md"})]}),e[114]=n.resource.description,e[115]=y,e[116]=_e):_e=e[116];let Be;return e[117]!==X||e[118]!==ee||e[119]!==oe||e[120]!==je||e[121]!==Le||e[122]!==_e?(Be=g.jsxs(X,{mah:ee,className:oe,children:[je,We,Le,_e]}),e[117]=X,e[118]=ee,e[119]=oe,e[120]=je,e[121]=Le,e[122]=_e,e[123]=Be):Be=e[123],Be};function OKe(t){return ct(`eventDetails.answers.${t}`)}function RKe(){}const NKe=t=>{const e=Ve.c(24),{event:n,forwardRef:r}=t,s=ve(Yo),{resource:i}=n,{categoryId:o,mainColor:a}=i;let l;e[0]!==s||e[1]!==i.calendarId?(l=i.calendarId?s[i.calendarId]:{color:""},e[0]=s,e[1]=i.calendarId,e[2]=l):l=e[2];const{color:c}=l,d=ve(wv),f=ve(kr),p=d[o]||a,m=i.categoryId?a:p;let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v={display:"none"},e[3]=v):v=e[3];let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y={padding:40,width:"100%"},e[4]=y):y=e[4];let x;e[5]!==m?(x=g.jsx(le,{w:30,h:30,style:{background:m}}),e[5]=m,e[6]=x):x=e[6];const w=d[o]||c;let C;e[7]!==w?(C={background:w,flex:"auto"},e[7]=w,e[8]=C):C=e[8];const E=f==null?void 0:f.Email;let D;e[9]!==E?(D=g.jsx(He,{children:E}),e[9]=E,e[10]=D):D=e[10];let T;e[11]!==C||e[12]!==D?(T=g.jsx(wt,{justify:"flex-end",h:30,style:C,children:D}),e[11]=C,e[12]=D,e[13]=T):T=e[13];let A;e[14]!==x||e[15]!==T?(A=g.jsxs(wt,{gap:"xs",children:[x,T]}),e[14]=x,e[15]=T,e[16]=A):A=e[16];let _;e[17]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(vn,{h:"xs"}),e[17]=_):_=e[17];let R;e[18]!==n?(R=g.jsx(Lde,{isPrint:!0,event:n}),e[18]=n,e[19]=R):R=e[19];let N;return e[20]!==r||e[21]!==A||e[22]!==R?(N=g.jsx(le,{style:v,children:g.jsxs("div",{ref:r,style:y,children:[A,_,R]})}),e[20]=r,e[21]=A,e[22]=R,e[23]=N):N=e[23],N},Vz=t=>{var i;const e=Ve.c(3),n=ve(df),r=ve(kr);r==null||r.Id;let s;return e[0]!==n||e[1]!==t?(s=(i=n.find(o=>o.id===t))==null?void 0:i.ownerId,e[0]=n,e[1]=t,e[2]=s):s=e[2],s===(r==null?void 0:r.Id)},jKe=Yu(()=>of(()=>import("./changeownermodal-CryUAIGd.js"),[])),Wz=({handleCreateCopy:t,event:e,handleChangeOwner:n,isFullView:r=!1,size:s=20})=>{const i=O.useRef(null),o=AKe.useReactToPrint({contentRef:i}),[a,{toggle:l,close:c}]=Ps(!1),d=ve(kr),{isMobile:f}=Yt(),{ownerId:p}=e.resource,m=(d==null?void 0:d.Id)===p,v=Il(e.resource),y=Vz(e.resource.calendarId),x=v===mt.Read&&!y,{t:w}=yt(),[C,{open:E,close:D}]=Ps(!1),T=Kt(),A=Br(),[_,R]=O.useState(!1),N=()=>{l(),n()},I=O.useCallback(async()=>{const q=await T(Yp(Number(e.id)));T(_c()),q.payload&&A("/")},[T,e]),$=O.useCallback(()=>{R(!0),I(),D(),R(!1)},[D,I]),L=O.useCallback(()=>{D()},[D]),z=O.useCallback(async()=>{T(Wg("Deleted"))},[T]),F=()=>{var q,H;((H=(q=e==null?void 0:e.resource)==null?void 0:q.recurring)==null?void 0:H.repeatPeriod)==="never"?E():z()};return g.jsxs(g.Fragment,{children:[g.jsxs(Gt,{position:"top",shadow:"md",width:200,children:[g.jsx(Gt.Target,{children:g.jsx(gn,{size:s,children:g.jsx(bie,{size:20})})}),g.jsx(NKe,{forwardRef:i,event:e}),g.jsxs(Gt.Dropdown,{children:[!f&&g.jsx(Gt.Item,{onClick:()=>o(),children:w("eventOptions.print")}),g.jsx(Gt.Item,{onClick:t,children:w("eventOptions.createCopy")}),g.jsx(Gt.Item,{disabled:!m,onClick:l,children:w("eventOptions.changeOwner")}),r&&g.jsx(Gt.Item,{disabled:x,onClick:F,children:b1(e,d)?w("buttons.cancelAndDelete"):w("eventOptions.delete")})]})]}),a&&g.jsx(jKe,{applyChangeOwner:N,closeOwnedModal:c,event:e}),g.jsx(Eh,{opened:C,handleConfirm:$,handleCancel:L,data:b1(e,d)?I$:e3,blockSaveButton:_})]})},IKe=t=>{const e=Ve.c(30),{event:n}=t,{title:r,start:s,end:i,resource:o}=n,{isMobile:a}=Yt(),{isAllDayWithoutTime:l,author:c}=o,{email:d}=c,f=a?"100%":300,p=a?"100%":410,m=(r==null?void 0:r.length)<59;let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={duration:200},e[0]=v):v=e[0];let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y={tooltip:{whiteSpace:"pre-wrap",wordBreak:"break-word"}},e[1]=y):y=e[1];let x;e[2]!==r?(x=r||ct("placeholders.defaultEventTitle"),e[2]=r,e[3]=x):x=e[3];let w;e[4]!==x?(w=g.jsx(He,{truncate:!0,fz:"md",fw:"md",children:x}),e[4]=x,e[5]=w):w=e[5];let C;e[6]!==m||e[7]!==w||e[8]!==r?(C=g.jsx(le,{children:g.jsx(ss,{multiline:!0,disabled:m,maw:500,withArrow:!0,transitionProps:v,label:r,styles:y,children:w})}),e[6]=m,e[7]=w,e[8]=r,e[9]=C):C=e[9];let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsx(vn,{h:"md"}),e[10]=E):E=e[10];let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=g.jsx(R$,{size:20}),e[11]=D):D=e[11];const T=a?"xs":"md";let A;e[12]!==i||e[13]!==l||e[14]!==s?(A=Rde({startDate:s,endDate:i,isAllDay:l}),e[12]=i,e[13]=l,e[14]=s,e[15]=A):A=e[15];let _;e[16]!==T||e[17]!==A?(_=g.jsxs(wt,{gap:"xs",children:[D,g.jsx(He,{tt:"capitalize",fz:T,children:A})]}),e[16]=T,e[17]=A,e[18]=_):_=e[18];let R;e[19]!==d||e[20]!==a?(R=d&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"md"}),g.jsxs(wt,{gap:"xs",children:[g.jsx(q4e,{size:20}),g.jsxs(He,{fz:a?"xs":"md",children:[ct("freeBusy.who_created"),": ",d]})]})]}),e[19]=d,e[20]=a,e[21]=R):R=e[21];let N;e[22]!==_||e[23]!==R||e[24]!==p||e[25]!==C?(N=g.jsxs(le,{maw:p,children:[C,E,_,R]}),e[22]=_,e[23]=R,e[24]=p,e[25]=C,e[26]=N):N=e[26];let I;return e[27]!==f||e[28]!==N?(I=g.jsx(le,{mah:f,className:"event-details-content-body",children:N}),e[27]=f,e[28]=N,e[29]=I):I=e[29],I},LKe=t=>{const e=Ve.c(43),{openedParticipation:n,toggleOpenedParticipation:r,currentEvent:s,handleCloseDetailsModal:i}=t,o=Kt(),{t:a}=yt(),l=ve(kr),[c,d]=Ps(!1),{toggle:f}=d,{description:p}=s.resource.participantInfo;let m;e[0]!==o?(m=q=>{typeof q=="object"&&o(Hw(q))},e[0]=o,e[1]=m):m=e[1];const v=m;let y;e[2]!==o||e[3]!==v?(y=q=>{var H,B;typeof q=="object"&&(q.resource.recurring.repeatPeriod==="never"?(o(kg({EventId:Number(q.id),StartDate:kl(q.start,"day"),EndDate:Iu(q.end,"day"),Type:((B=(H=q.resource)==null?void 0:H.participantInfo)==null?void 0:B.attendingType)||null,Description:q.resource.participantInfo.description||""})),o(Gp()),o(_c())):o(Wg("ApplyParticipant")),v(q))},e[2]=o,e[3]=v,e[4]=y):y=e[4];const x=y;let w;e[5]!==x||e[6]!==o||e[7]!==v||e[8]!==i?(w=q=>{q.resource.recurring.repeatPeriod==="never"?x(q):(o(Wg("ApplyParticipant")),i(),v(q))},e[5]=x,e[6]=o,e[7]=v,e[8]=i,e[9]=w):w=e[9];const C=w;let E;e[10]!==v?(E=q=>{v(q)},e[10]=v,e[11]=E):E=e[11];const D=E;if(!l)return null;let T;e[12]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx(Bo,{}),e[12]=T):T=e[12];let A;e[13]!==a?(A=a("notesActions.willBe"),e[13]=a,e[14]=A):A=e[14];let _;e[15]!==x||e[16]!==s?(_=g.jsx(gT,{handleSetEvent:x,event:s}),e[15]=x,e[16]=s,e[17]=_):_=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=g.jsx(Bo,{orientation:"vertical",size:"sm"}),e[18]=R):R=e[18];let N;e[19]!==n?(N=n?g.jsx(XRe,{size:"1.125rem"}):g.jsx(_$,{size:"1.125rem"}),e[19]=n,e[20]=N):N=e[20];let I;e[21]!==N||e[22]!==r?(I=g.jsx(gn,{onClick:r,children:N}),e[21]=N,e[22]=r,e[23]=I):I=e[23];let $;e[24]!==I||e[25]!==_?($=g.jsxs(wt,{gap:10,children:[_,R,I]}),e[24]=I,e[25]=_,e[26]=$):$=e[26];let L;e[27]!==$||e[28]!==A?(L=g.jsxs(wt,{justify:"space-between",py:15,children:[A,$]}),e[27]=$,e[28]=A,e[29]=L):L=e[29];let z;e[30]!==s||e[31]!==p||e[32]!==v||e[33]!==D||e[34]!==C||e[35]!==n||e[36]!==c||e[37]!==a||e[38]!==f?(z=n&&g.jsxs(le,{children:[g.jsx(Bo,{}),g.jsxs(wt,{justify:"space-between",pt:15,children:[g.jsx(le,{}),g.jsx(en,{onClick:f,variant:"default",radius:"xl",size:"compact-sm",children:a(p?"notesActions.edit":"notesActions.title")})]}),g.jsx(Eoe,{close:f,opened:c,handleSubmit:C,handleClose:D,handleSetEvent:v,event:s})]}),e[30]=s,e[31]=p,e[32]=v,e[33]=D,e[34]=C,e[35]=n,e[36]=c,e[37]=a,e[38]=f,e[39]=z):z=e[39];let F;return e[40]!==L||e[41]!==z?(F=g.jsxs(le,{children:[T,L,z]}),e[40]=L,e[41]=z,e[42]=F):F=e[42],F},dC=t=>{const e=Kt(),n=ve(cf),r=ve(kr),[s,{toggle:i}]=Ps(!1),{event:o,handleCloseDetailsModal:a,isMobile:l,isBusyMode:c=!1}=t,[d,{open:f,close:p}]=Ps(!1),m=o==null?void 0:o.id,v=Il(o.resource),y=Br(),x=O.useRef(!0),[w,C]=O.useState(!1),E=Vz(o.resource.calendarId),D=v===mt.Read&&!E,T=o.resource.isCanceled,A=O.useCallback(()=>{a(),y(`/event/${m}/${St(o.start,"yyyy-MM-dd'T'HH:mm:ss'Z'",!o.resource.isAllDayWithoutTime)}`)},[o,m,y]),_=O.useCallback(async()=>{C(!0),await e(Yp(Number(m))),e(_c()),a()},[e,a,m]),R=O.useCallback(async()=>{e(Wg("Deleted")),a()},[e,a]);O.useEffect(()=>()=>{!x.current||c||e(lRe())},[]);const N=()=>{a(),x.current=!1,e(Hw({...o,resource:{...o.resource,saveType:rs.Duplicate}})),y(`/event/${m}/${Ca(o.start)}`)},I=()=>{a()},$=O.useCallback(()=>{p()},[p]),L=O.useCallback(()=>{_(),a(),x.current=!0},[p,_]),z=()=>{var q,H;if(D){$n.showWarning(ct("warning.message_access_delete"));return}x.current=!1,((H=(q=n==null?void 0:n.resource)==null?void 0:q.recurring)==null?void 0:H.repeatPeriod)==="never"?f():R()},F=()=>{a(),x.current=!1};return g.jsxs(g.Fragment,{children:[g.jsxs(le,{className:l?"event-details-container-mobile":"event-details-container",style:{height:l?window.innerHeight:"100%"},children:[g.jsx(wt,{justify:"flex-end",children:g.jsxs(wt,{gap:"xs",mt:5,children:[!c&&g.jsxs(g.Fragment,{children:[!T&&g.jsx(gn,{onClick:q=>{q.preventDefault(),a(),A()},children:g.jsx(Sie,{size:20})}),g.jsx(ss,{label:b1(o,r)?ct("buttons.cancelAndDelete"):ct("buttons.delete"),withArrow:!0,children:g.jsx(gn,{disabled:D,onClick:z,children:g.jsx(Mie,{size:20})})}),!T&&g.jsx(Wz,{handleChangeOwner:I,handleCreateCopy:N,event:n})]}),g.jsx(gn,{onClick:()=>{a()},children:g.jsx(Tc,{size:20})})]})}),g.jsx(vn,{h:"xs"}),c?g.jsx(IKe,{event:o}):g.jsx(Lde,{event:o}),o.resource.hasParticipant&&!c&&!T&&g.jsx(LKe,{openedParticipation:s,toggleOpenedParticipation:i,currentEvent:n,handleCloseDetailsModal:F})]}),g.jsx(Eh,{opened:d,handleConfirm:L,handleCancel:$,data:b1(o,r)?I$:e3,blockSaveButton:w})]})},PKe=({contentRef:t,coord:e={left:-999,top:-999},centered:n=!1,isMobile:r=!1,withoutCorrecting:s=!1,opened:i,withDrag:o=!1,querySelector:a,isFullContentHeight:l})=>{const c=O.useRef(!1),d=O.useRef({x:0,y:0}),f=document.querySelector(`${a}`),p=x=>{c.current=!0,d.current={x:x==null?void 0:x.clientX,y:x==null?void 0:x.clientY}},m=O.useCallback(x=>{if(c.current){const w=x.clientX-d.current.x,C=x.clientY-d.current.y;f.style.left=`${f.offsetLeft+w}px`,f.style.top=`${f.offsetTop+C}px`,d.current={x:x==null?void 0:x.clientX,y:x==null?void 0:x.clientY}}},[f]),v=O.useCallback(()=>{if(t&&e&&!s&&f&&i){if(n||r){f.style.left="auto",f.style.top="auto";return}const x=window.innerWidth,w=window.innerHeight,C=t.clientWidth,E=l?482:t.clientHeight;let D=e.left,T=e.top<0?-e.top:e.top;if(e.height&&e.width){let A=e.top<0?-e.top:e.top,_=e.left,R=e.width,N=e.height;R<x/2?_+R+C>=x?_-C>x?D-=C:_-C<0?D=10:_+C>x?D-=C+20:D-=C:D+=R:D+=R/2-C/2,N<w/2?A+N+E>=w?A-E<0?T=10:T-=E:T+=N:T=w/2-E/3}else{let A=e.top<0?-e.top:e.top,_=e.left;_+C>=x&&(_-C<0?D=10:D-=C),A+E>=w&&(A-E<0?T=10:T-=E)}f.style.left=`${D}px`,f.style.top=`${T}px`;return}e&&s&&i&&(f.style.left=`${e.left}px`,f.style.top=`${e.top}px`)},[t,l,e,s,i,n,r]),y=()=>{c.current=!1};return O.useEffect(()=>{v()},[t,l,e,s,n,i,r]),O.useEffect(()=>(i&&f!==null&&o?(document.addEventListener("mousemove",m),document.addEventListener("mouseup",y)):(document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y)),()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y)}),[i,f,o]),{handleMouseDown:p}},$Ke=t=>{const e=Ve.c(17),{children:n,close:r,withDrag:s,handleMouseDown:i,setContentRef:o,padding:a,isFull:l,isMobile:c}=t;let d;e[0]!==o?(d=w=>{o(w)},e[0]=o,e[1]=d):d=e[1];let f;e[2]!==r||e[3]!==i||e[4]!==c||e[5]!==s?(f=s&&g.jsxs(vt,{className:ti({modalHeader:!0,desktopBackground:!c,mobileBackground:c}),py:c?"xs":0,children:[g.jsx(le,{onMouseDown:i,className:"dragSection"}),g.jsx(le,{className:"iconSection",children:g.jsx(Tc,{size:20,className:"icon",onClick:()=>{r()}})})]}),e[2]=r,e[3]=i,e[4]=c,e[5]=s,e[6]=f):f=e[6];const p=l?"100%":void 0;let m;e[7]!==p?(m={maxHeight:p},e[7]=p,e[8]=m):m=e[8];const v=l?0:a;let y;e[9]!==n||e[10]!==m||e[11]!==v?(y=g.jsx(le,{style:m,p:v,children:n}),e[9]=n,e[10]=m,e[11]=v,e[12]=y):y=e[12];let x;return e[13]!==d||e[14]!==f||e[15]!==y?(x=g.jsxs("div",{ref:d,children:[f,y]}),e[13]=d,e[14]=f,e[15]=y,e[16]=x):x=e[16],x},Ou=t=>{const e=Ve.c(45),{children:n,close:r,opened:s,coord:i,withoutOverlay:o,disableCloseOnClickOutside:a,withDrag:l,withoutCorrecting:c,size:d,padding:f,useOutsideCLick:p,centered:m,isMobile:v,isFull:y,loadingFlag:x,isFullContentHeight:w}=t,C=l===void 0?!1:l,E=c===void 0?!1:c,D=d===void 0?467:d,T=f===void 0?20:f,A=p===void 0?!1:p,_=m===void 0?!1:m,R=v===void 0?!1:v,N=y===void 0?!1:y,I=x===void 0?null:x,$=w===void 0?!1:w,[L,z]=O.useState(null);let F;e[0]!==r?(F=()=>r(),e[0]=r,e[1]=F):F=e[1];const q=ow(F);let H;e[2]!==_||e[3]!==L||e[4]!==i||e[5]!==$||e[6]!==R||e[7]!==I||e[8]!==s||e[9]!==C||e[10]!==E?(H={contentRef:L,coord:i,withoutCorrecting:E,centered:_,isMobile:R,opened:s,withDrag:C,querySelector:".custom-modal-content",loadingFlag:I,isFullContentHeight:$},e[2]=_,e[3]=L,e[4]=i,e[5]=$,e[6]=R,e[7]=I,e[8]=s,e[9]=C,e[10]=E,e[11]=H):H=e[11];const{handleMouseDown:B}=PKe(H);let V;if(N){let de;e[15]===Symbol.for("react.memo_cache_sentinel")?(de={},e[15]=de):de=e[15],V=de}else{const de=R?"10px":0,me=R?"10px":0;let Se;e[12]!==de||e[13]!==me?(Se={position:"absolute",boxShadow:"0px 16px 40px rgba(0, 0, 0, 0.3)",width:"auto",marginLeft:de,marginRight:me,display:"flex",justifyContent:"center",overflow:"hidden",maxHeight:"520px"},e[12]=de,e[13]=me,e[14]=Se):Se=e[14],V=Se}const Y=V,G=!a;let W;e[16]===Symbol.for("react.memo_cache_sentinel")?(W={transition:"pop",duration:100,timingFunction:"linear"},e[16]=W):W=e[16];let Z,Q;e[17]===Symbol.for("react.memo_cache_sentinel")?(Z={content:"custom-modal-content"},Q={position:"relative",transition:"none"},e[17]=Z,e[18]=Q):(Z=e[17],Q=e[18]);let X;e[19]===Symbol.for("react.memo_cache_sentinel")?(X={padding:0},e[19]=X):X=e[19];let re;e[20]!==Y?(re={root:Q,content:Y,body:X},e[20]=Y,e[21]=re):re=e[21];const ne=o?-1:100;let ee;e[22]!==ne?(ee={opacity:0,zIndex:ne},e[22]=ne,e[23]=ee):ee=e[23];const oe=A?q:null;let ce;e[24]!==n||e[25]!==r||e[26]!==B||e[27]!==N||e[28]!==R||e[29]!==T||e[30]!==C?(ce=g.jsx($Ke,{close:r,withDrag:C,handleMouseDown:B,setContentRef:z,padding:T,isFull:N,isMobile:R,children:n}),e[24]=n,e[25]=r,e[26]=B,e[27]=N,e[28]=R,e[29]=T,e[30]=C,e[31]=ce):ce=e[31];let ue;e[32]!==oe||e[33]!==ce?(ue=g.jsx(fi,{children:g.jsx("div",{ref:oe,children:ce})}),e[32]=oe,e[33]=ce,e[34]=ue):ue=e[34];let pe;return e[35]!==_||e[36]!==r||e[37]!==N||e[38]!==s||e[39]!==D||e[40]!==G||e[41]!==re||e[42]!==ee||e[43]!==ue?(pe=g.jsx(ks,{opened:s,shadow:"lg",closeOnEscape:!0,keepMounted:!1,centered:_,fullScreen:N,withCloseButton:!1,closeOnClickOutside:G,transitionProps:W,size:D,classNames:Z,styles:re,overlayProps:ee,onClose:r,children:ue}),e[35]=_,e[36]=r,e[37]=N,e[38]=s,e[39]=D,e[40]=G,e[41]=re,e[42]=ee,e[43]=ue,e[44]=pe):pe=e[44],pe},Pde=({email:t})=>{const e=ve(D$),[n,r]=O.useState(!0),[s]=OA(e,300),i=Kt(),o=ve(aie),a=ve(cJe),l=ve(Yo),c=ve(fv),[d,f]=O.useState(!1),[p,m]=O.useState(),[v,y]=O.useState({left:0,top:0}),{t:x}=yt(),w=O.useRef(null),{isMobile:C}=Yt(),E=ow(()=>_()),D=O.useCallback(()=>{i(K_()),f(!1)},[]);O.useEffect(()=>{s.trim()&&(r(!0),(async()=>await i(Dg({body:{CalendarIds:a,StartDate:cv(new Date,{year:100}),EndDate:Es(new Date,{year:100}),query:s.trim()},calendarsGroup:l,isEdit:!0})))().then(()=>{r(!1)})),s.trim()||i(bU())},[s,a,i,l]);const T=I=>{i(iie(I))},A=()=>{i(CA(!1)),i(qy(!1))},_=()=>{!d&&!c&&A()},R=()=>!n&&o.length===0&&e?g.jsx(vt,{h:40,pl:"sm",align:"center",children:g.jsx(He,{size:"sm",children:x("feedBacks.nothingFound")})}):o.length?g.jsx(rKe,{setModalCoords:y,setShowEventDetailsModal:f,setSelectedEvent:I=>m(I),email:t,events:o,calendarsGroup:l}):g.jsx(vt,{h:40,pl:"sm",align:"center",children:g.jsx(zi,{size:"sm",color:"gray",type:"dots"})}),N=I=>{var $;I.stopPropagation(),T(""),($=w.current)==null||$.focus()};return g.jsxs(le,{className:"search-events",w:C?"85%":void 0,children:[g.jsx(gn,{mr:10,onClick:A,children:g.jsx(T$,{size:20,strokeWidth:2,color:"#858e96"})}),g.jsx(le,{ref:E,w:C?"80%":"70%",children:g.jsxs(Mn,{opened:!0,transitionProps:{transition:"pop"},shadow:"md",classNames:{dropdown:"search-dropdown"},position:"bottom-start",width:"target",withinPortal:!1,children:[g.jsx(Mn.Target,{children:g.jsx(le,{className:"search-events-input-container",children:g.jsx(Pn,{ref:w,className:"search-events-inputs",placeholder:x("feedBacks.search"),variant:"filled",size:"xs",w:"100%",autoFocus:!0,leftSection:g.jsx(gn,{size:20,className:"search-events-input-icon",onClick:I=>{i(qy(!0))},children:g.jsx(Cie,{})}),rightSection:!!e.length&&g.jsx(gn,{size:20,className:"cancel-icon",onClick:N,children:g.jsx(Tc,{stroke:2,className:"icon"})}),rightSectionPointerEvents:"all",radius:"sm",value:e,onKeyUp:I=>{I.code==="Enter"&&i(qy(!0))},onChange:I=>{T(I.currentTarget.value),e.trim()||(i(bU()),r(!0))}})})}),!c&&e.trim()&&g.jsx(Mn.Dropdown,{p:0,children:R()})]})}),g.jsx(Ou,{coord:v,close:D,opened:d,isMobile:C,children:p&&g.jsx(dC,{isMobile:C,handleCloseDetailsModal:D,event:p})})]})},zKe=Yu(()=>of(()=>import("./index-Wsunfl8K.js"),__vite__mapDeps([0,1]))),eX=t=>{var C;const e=ve(Lh),n=ve(lie),{width:r}=YP(),s=ds[e??3],i=r<1320,{goToBack:o,label:a,isBusyMode:l,goToCurrent:c,goToNext:d,goToDate:f,goToView:p,date:m}=t,{t:v,i18n:y}=yt(),x=(C=n[n.length-1])==null?void 0:C.start,w=O.useMemo(()=>l?[{label:v("calendarViews.day"),value:String(ds.day)},{label:v("calendarViews.week"),value:String(ds.week)}]:[{label:v("calendarViews.day"),value:String(ds.day)},{label:v("calendarViews.workingWeek"),value:String(ds.work_week)},{label:v("calendarViews.week"),value:String(ds.week)},{label:v("calendarViews.month"),value:String(ds.month)},{label:v("calendarViews.year"),value:String(ds.year)},{label:v("calendarViews.schedule"),value:String(ds.agenda)}],[l,y.language]);return g.jsxs(vt,{align:"center",className:ti("toolbar-wrapper",{"toolbar-wrapper-busy":l}),children:[g.jsxs(wt,{className:"container",left:0,children:[g.jsxs(vt,{h:32,align:"center",gap:"xs",children:[g.jsxs(le,{className:"move-buttons",children:[g.jsx(gn,{onClick:o,className:"action-icon",children:g.jsx(yie,{size:20})}),g.jsx(en,{onClick:c,radius:"0",variant:"transparent",color:"black",className:"now-button",children:v("buttons.today")}),g.jsx(gn,{onClick:d,className:"action-icon",children:g.jsx(O$,{size:20})})]}),g.jsx(zKe,{goToDate:f,date:m,label:a,view:s,endDate:x})]}),i?g.jsx(uo,{className:"views-select",data:w,onChange:p,value:String(e)}):g.jsx(T8,{value:String(e),onChange:p,data:w,radius:6,size:"xs"})]}),g.jsx(vn,{w:"md"})]})},tX=t=>{const[e,n]=O.useState(!0),r=ve(Lh),s=ve(hJe),i=!qe.isNil(r)&&r>=0?ds[r]:null,o=Kt(),{onView:a,onNavigate:l,label:c,view:d,isBusyMode:f,calendarRef:p,fadeLeft:m,fadeRight:v,date:y}=t,[x,w]=O.useState(y),C=i==="agenda"?y.toDateString()+" - "+(s==null?void 0:s.toDateString()):c,E=ve(Yo),D=ve(df),T=ve(hC),A=ve(mRe),_=ve(sO),R=ve(lJe),N=ve(Kde),I=ve(kr),{Email:$}=I||{Email:null},L=Br(),{paramView:z,year:F,month:q,day:H,eventId:B}=Fu(),V=O.useCallback(ne=>o(wA(ne)),[o]);O.useEffect(()=>{o(sJe({onNavigate:l}))},[]);const Y=O.useCallback(async()=>{const ne=Yg(_);if(qe.isNil(ne))return;const ee={body:{CalendarIds:T,StartDate:_n(ne.start),EndDate:_n(ne.end)},calendarsGroup:E,isEdit:!1};await o(Dg(ee)).unwrap()},[o,T,E,_]);O.useEffect(()=>{f||!A||D.length===0||i==="agenda"||Y()},[D,A,f]),O.useEffect(()=>{},[d,i]),O.useEffect(()=>{if(z){if(z==="preview"){L(`/${i}${F?`/${F}`:""}${q?`/${q}`:""}${H?`/${H}`:""}${B?`/${B}`:""}`);return}V(ds[z]),a(z)}},[z,i]);const G=O.useCallback(ne=>{if(!qe.isNil(ne))if(f)V(Number(ne));else{const ee=`/${ds[Number(ne)]}${F?`/${F}`:""}${q?`/${q}`:""}${H?`/${H}`:""}${B?`/${B}`:""}`;L(ee)}},[a,V,F,q,H,B]),W=O.useCallback(()=>{if(d==="agenda"){const ne=new Date(y);ne.setDate(y.getDate()-1),l("DATE",ne)}else l("PREV");d==="month"&&m&&m()},[l,m,d,y]),Z=O.useCallback(()=>{if(d==="agenda"){const ne=new Date(y);ne.setDate(y.getDate()+1),l("DATE",ne)}else l("NEXT");d==="month"&&v&&v()},[l,v,d,y]),Q=()=>{l("TODAY",new Date)},X=ne=>{ne&&ne instanceof Date&&(f&&w(ne),l("DATE",ne))},re=qe.debounce(ne=>{i==="month"&&(ne.deltaY<0&&W(),ne.deltaY>0&&Z())},200,{leading:!0,trailing:!1,maxWait:1200});return O.useEffect(()=>{if(!(p!=null&&p.current))return;const ne=p.current;return ne&&ne.addEventListener("wheel",re),()=>{ne==null||ne.removeEventListener("wheel",re)}},[p,i]),O.useEffect(()=>{if(e){const ne=Yg(_);ne!=null&&ne.end&&o(oJe(ne.end)),n(!1)}},[_]),O.useEffect(()=>{w(y)},[y]),R&&!f?g.jsx(g.Fragment,{children:M1.createPortal(g.jsx(le,{w:"100%",children:N?g.jsx(Pde,{email:$}):g.jsx(eX,{goToBack:W,label:C,isBusyMode:f,goToCurrent:Q,goToNext:Z,goToDate:X,goToView:G,date:x})}),R)}):g.jsx(eX,{goToBack:W,label:C,isBusyMode:f,goToCurrent:Q,goToNext:Z,goToDate:X,goToView:G,date:x})},FKe=(t,e)=>{const r=(s=>{const i=s.getFullYear(),o=(s.getMonth()+1).toString().padStart(2,"0"),a=s.getDate().toString().padStart(2,"0");return`${i}${o}${a}`})(t);return e[r]?"var(--mantine-color-red-3)":"var(--mantine-color-white)"},BKe=t=>{const{onChangeDate:e,onDrillDown:n,hasEventsByDateStringMap:r,startOfMonth:s,currentDate:i}=t,{i18n:o}=yt(),a=O.useMemo(()=>St(_n(s),"LLLL",!1,o.language),[s]),l=Kt(),c=O.useCallback(async d=>{if(qe.isNil(d))return;const f=_n(d);co(f,i,"day")?n(f):(await e(f),l(J$(!0)))},[i]);return g.jsx(wt,{justify:"center",className:a,children:g.jsxs(le,{children:[g.jsx(He,{tt:"capitalize",mx:8,my:4,fz:"sm",children:a}),g.jsx(pv,{size:"xs",locale:o.language,value:Lt(i),defaultDate:s,onChange:AS(c),styles:{day:{width:`${1.8}rem`},calendarHeader:{display:"none"}},getDayProps:d=>{const f=Pp(d);return{style:()=>({backgroundColor:`${FKe(f,r)}`})}}})]})})},HKe=t=>{const e={};return t.forEach(n=>{const r=kl(n.end,"day");let s=kl(n.start,"day");for(;s<=r;){const i=V$(s);e[i]=!0,s=Lt(Es(s,{day:1}))}}),e},qKe=qe.debounce(t=>{const e=document.querySelector(`.${St(_n(t),"LLLL")}`),n=document.querySelector(".rbc-year-view");if(e&&n){const{height:r}=e.getBoundingClientRect();n.scrollTo({top:(e==null?void 0:e.offsetTop)-r,behavior:"smooth"})}},500),QS=t=>{const e=MA(),n=nh(Pl),r=nh(Ev),[s,{width:i}]=SQ(),{onDrillDown:o,events:a}=t,l=O.useMemo(()=>[...Array(12).keys()].map(p=>new Date(rr(n,"year"),p)),[n]),c=O.useMemo(()=>HKe(a),[a]);O.useEffect(()=>{qKe(n)},[i,n]);const d=O.useCallback(p=>{var m;(m=r.onNavigate)==null||m.call(r,"DATE",p)},[e,r,c,n]),f=O.useMemo(()=>g.jsx(g.Fragment,{children:l.map(p=>g.jsx(sr.Col,{className:"wrapper-month",span:{sm:6,md:"auto",lg:3},children:g.jsx(BKe,{startOfMonth:p,onChangeDate:d,currentDate:n,onDrillDown:o,hasEventsByDateStringMap:c})},+p))}),[n,c]);return g.jsx(le,{my:20,className:"rbc-year-view",ref:s,children:g.jsx(sr,{gutter:{xs:"md",md:"md"},grow:!0,justify:"center",children:f})})};QS.range=t=>({start:kl(t,"year"),end:Iu(t,"year")});QS.navigate=(t,e,{localizer:n})=>{switch(e){case mi.PREVIOUS:return n.add(t,-1,"year");case mi.NEXT:return n.add(t,1,"year");default:return t}};QS.title=(t,{localizer:e})=>{const{start:n}=QS.range(t);return St(_n(n),"yyyy")};const UKe=(t,e)=>{const[n,r]=e.split(":"),s=nt.fromJSDate(new Date).set({hour:Number(n),minute:Number(r)}).toJSDate();return nt.fromJSDate(s,{zone:t}).toFormat("HH:mm")},VKe=t=>{const e=document.querySelector(".rbc-time-gutter");e&&e.querySelectorAll(".rbc-label").forEach(r=>{const s=document.createElement("span");s.innerHTML=UKe(t,r.innerHTML),s.classList.add("rbc-label"),r.insertAdjacentElement("beforebegin",s)})},WKe=(t,e,n)=>{const r=Ve.c(7),s=t[(e==null?void 0:e.SecondId)||0];let i;r[0]!==(e==null?void 0:e.SecondEnabled)||r[1]!==s?(i=()=>{e!=null&&e.SecondEnabled&&s&&VKe(s==null?void 0:s.tzName)},r[0]=e==null?void 0:e.SecondEnabled,r[1]=s,r[2]=i):i=r[2];let o;r[3]!==e||r[4]!==t||r[5]!==n?(o=[t,e,n],r[3]=e,r[4]=t,r[5]=n,r[6]=o):o=r[6],O.useEffect(i,o)},nX=()=>{const t=Ve.c(1),e=O.useRef(null);let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={textRef:e,isTextTruncated:()=>{const s=e.current;return s?s.scrollWidth>s.clientWidth:!1}},t[0]=n):n=t[0],n},rX={tooltip:{wordBreak:"break-word",whiteSpace:"pre-wrap"}},YKe=t=>{const e=Ve.c(146),{event:n,isFirstInDay:r,dateStr:s,onDateClick:i,isBusyMode:o,setEventDetailsModalData:a,setShowEventDetailsModal:l,setEventDetailsModalCoords:c}=t,d=o===void 0?!1:o,f=Ln.language,{title:p,resource:m}=n,{mainColor:v,categoryId:y,participantInfo:x}=m,C=Il(m)===mt.Read,E=ve(wv),{attendingType:D}=x,T=D===Wa.NotVisit,A=ve(zw),{textRef:_,isTextTruncated:R}=nX(),{textRef:N,isTextTruncated:I}=nX();let $;e[0]!==n||e[1]!==d||e[2]!==C||e[3]!==c||e[4]!==a||e[5]!==l?($={event:n,isBusyMode:d,preventDoubleClick:C,setEventDetailsModalData:a,setShowEventDetailsModal:l,setEventDetailsModalCoords:c},e[0]=n,e[1]=d,e[2]=C,e[3]=c,e[4]=a,e[5]=l,e[6]=$):$=e[6];const{handleContextMenu:L,ref:z}=Ode($);let F,q;if(e[7]!==s||e[8]!==n.end||e[9]!==n.start){const Rt=nt.fromJSDate(n.start).startOf("day"),Nt=nt.fromJSDate(n.end).startOf("day"),Fn=nt.fromISO(s).startOf("day");q=Nt.diff(Rt,"days").days+1,F=Fn.diff(Rt,"days"),e[7]=s,e[8]=n.end,e[9]=n.start,e[10]=F,e[11]=q}else F=e[10],q=e[11];const H=F.days+1;let B;e[12]!==H||e[13]!==q?(B={totalDays:q,currentDay:H},e[12]=H,e[13]=q,e[14]=B):B=e[14];const{totalDays:V,currentDay:Y}=B;let G,W,Z,Q,X,re,ne,ee,oe,ce,ue,pe,de,me,Se,De,Ae,fe,Te,Ne,Ue,rt,ot,Je,je;if(e[15]!==D||e[16]!==E||e[17]!==y||e[18]!==Y||e[19]!==s||e[20]!==n||e[21]!==L||e[22]!==T||e[23]!==r||e[24]!==R||e[25]!==v||e[26]!==i||e[27]!==z||e[28]!==A||e[29]!==p||e[30]!==_||e[31]!==V){const Rt=ga(n.end,new Date),Nt=A&&Rt?nv(v):v,Fn=A&&Rt?nv(E[y]):E[y];let pn;e[57]!==D||e[58]!==Nt||e[59]!==Fn?(pn=Uz(D,Fn,Nt),e[57]=D,e[58]=Nt,e[59]=Fn,e[60]=pn):pn=e[60];const hn=pn;let On;e[61]!==n.start?(On=St(n.start,"HH:mm"),e[61]=n.start,e[62]=On):On=e[62];let Vt;e[63]!==n.end?(Vt=St(n.end,"HH:mm"),e[63]=n.end,e[64]=Vt):Vt=e[64];let an;e[65]!==On||e[66]!==Vt?(an={eventTimeStart:On,eventTimeEnd:Vt},e[65]=On,e[66]=Vt,e[67]=an):an=e[67];const{eventTimeStart:xn,eventTimeEnd:Ts}=an;let Hr;e[68]!==Y||e[69]!==n.allDay||e[70]!==n.resource.isAllDayWithoutTime||e[71]!==Ts||e[72]!==xn||e[73]!==V?(Hr=()=>n.allDay?n.resource.isAllDayWithoutTime?ct("eventDetails.allDay"):Y===V?`${ct("eventDetails.until")} ${Ts}`:Y===1?xn:ct("eventDetails.allDay"):`${xn} – ${Ts}`,e[68]=Y,e[69]=n.allDay,e[70]=n.resource.isAllDayWithoutTime,e[71]=Ts,e[72]=xn,e[73]=V,e[74]=Hr):Hr=e[74];const As=Hr;re=le,Te=`agenda-event-group ${r?"":"subsequent-event"}`,e[75]!==s||e[76]!==r||e[77]!==i?(Ne=r&&g.jsxs(le,{className:"agenda-date-cell",onClick:()=>i(new Date(s)),children:[g.jsx(He,{className:"agenda-day",children:St(new Date(s),"d")}),g.jsxs(He,{className:"agenda-date-info",children:[St(new Date(s),"MMM",!1,f).replace(".",""),","," ",St(new Date(s),"EEE",!1,f).toLowerCase()]})]}),e[75]=s,e[76]=r,e[77]=i,e[78]=Ne):Ne=e[78],X=vt,de=z,me=ti("agenda-event",{"is-past-event":Rt&&A}),Se=L,De="center";let Rr;e[79]!==Nt?(Rr={backgroundColor:Nt},e[79]=Nt,e[80]=Rr):Rr=e[80];let ft;e[81]!==hn?(ft=g.jsx(le,{style:hn}),e[81]=hn,e[82]=ft):ft=e[82],e[83]!==Rr||e[84]!==ft?(Ae=g.jsx(le,{className:"event-external-circle",style:Rr,children:ft}),e[83]=Rr,e[84]=ft,e[85]=Ae):Ae=e[85];const xt=T?"line-through":"unset";let st;e[86]!==As?(st=As(),e[86]=As,e[87]=st):st=e[87],e[88]!==xt||e[89]!==st?(fe=g.jsx(He,{className:"agenda-event-time",td:xt,children:st}),e[88]=xt,e[89]=st,e[90]=fe):fe=e[90],Q=le,ue="agenda-event-content",e[91]===Symbol.for("react.memo_cache_sentinel")?(pe={minWidth:0,overflow:"hidden"},e[91]=pe):pe=e[91],Z=vt,oe="center",e[92]===Symbol.for("react.memo_cache_sentinel")?(ce={width:"100%"},e[92]=ce):ce=e[92],W=ss,e[93]!==p?(ot=p||ct("placeholders.defaultEventTitle"),e[93]=p,e[94]=ot):ot=e[94],Je=!0,je=500;let it;e[95]!==R?(it=R(),e[95]=R,e[96]=it):it=e[96],ne=!it,ee=rX,G=He,Ue=_,rt=ti("agenda-event-title",{"past-event":Rt}),e[15]=D,e[16]=E,e[17]=y,e[18]=Y,e[19]=s,e[20]=n,e[21]=L,e[22]=T,e[23]=r,e[24]=R,e[25]=v,e[26]=i,e[27]=z,e[28]=A,e[29]=p,e[30]=_,e[31]=V,e[32]=G,e[33]=W,e[34]=Z,e[35]=Q,e[36]=X,e[37]=re,e[38]=ne,e[39]=ee,e[40]=oe,e[41]=ce,e[42]=ue,e[43]=pe,e[44]=de,e[45]=me,e[46]=Se,e[47]=De,e[48]=Ae,e[49]=fe,e[50]=Te,e[51]=Ne,e[52]=Ue,e[53]=rt,e[54]=ot,e[55]=Je,e[56]=je}else G=e[32],W=e[33],Z=e[34],Q=e[35],X=e[36],re=e[37],ne=e[38],ee=e[39],oe=e[40],ce=e[41],ue=e[42],pe=e[43],de=e[44],me=e[45],Se=e[46],De=e[47],Ae=e[48],fe=e[49],Te=e[50],Ne=e[51],Ue=e[52],rt=e[53],ot=e[54],Je=e[55],je=e[56];const We=T?"line-through":"unset";let Le;e[97]!==p?(Le=p||ct("placeholders.defaultEventTitle"),e[97]=p,e[98]=Le):Le=e[98];let _e;e[99]!==G||e[100]!==We||e[101]!==Le||e[102]!==Ue||e[103]!==rt?(_e=g.jsx(G,{ref:Ue,className:rt,td:We,fz:"sm",truncate:!0,children:Le}),e[99]=G,e[100]=We,e[101]=Le,e[102]=Ue,e[103]=rt,e[104]=_e):_e=e[104];let Be;e[105]!==W||e[106]!==ne||e[107]!==ee||e[108]!==_e||e[109]!==ot||e[110]!==Je||e[111]!==je?(Be=g.jsx(W,{label:ot,multiline:Je,maw:je,disabled:ne,styles:ee,children:_e}),e[105]=W,e[106]=ne,e[107]=ee,e[108]=_e,e[109]=ot,e[110]=Je,e[111]=je,e[112]=Be):Be=e[112];let ut;e[113]!==Y||e[114]!==V?(ut=V>1&&g.jsx(He,{c:"dimmed",component:"span",className:"agenda-event-day-count",ml:8,fz:"sm",style:{whiteSpace:"nowrap"},children:`(${ct("fullEventPage.repeatTypes.day")} ${Y}/${V})`}),e[113]=Y,e[114]=V,e[115]=ut):ut=e[115];let lt;e[116]!==n.resource.location||e[117]!==I||e[118]!==N?(lt=n.resource.location&&g.jsx(ss,{label:n.resource.location,multiline:!0,maw:500,disabled:!I(),styles:rX,children:g.jsx(He,{ref:N,component:"span",c:"dimmed",ml:8,fz:"sm",truncate:!0,miw:120,children:n.resource.location})}),e[116]=n.resource.location,e[117]=I,e[118]=N,e[119]=lt):lt=e[119];let At;e[120]!==Z||e[121]!==oe||e[122]!==ce||e[123]!==Be||e[124]!==ut||e[125]!==lt?(At=g.jsxs(Z,{align:oe,style:ce,children:[Be,ut,lt]}),e[120]=Z,e[121]=oe,e[122]=ce,e[123]=Be,e[124]=ut,e[125]=lt,e[126]=At):At=e[126];let jt;e[127]!==Q||e[128]!==ue||e[129]!==pe||e[130]!==At?(jt=g.jsx(Q,{className:ue,style:pe,children:At}),e[127]=Q,e[128]=ue,e[129]=pe,e[130]=At,e[131]=jt):jt=e[131];let Ot;e[132]!==X||e[133]!==de||e[134]!==me||e[135]!==Se||e[136]!==De||e[137]!==Ae||e[138]!==fe||e[139]!==jt?(Ot=g.jsxs(X,{ref:de,className:me,onContextMenu:Se,align:De,children:[Ae,fe,jt]}),e[132]=X,e[133]=de,e[134]=me,e[135]=Se,e[136]=De,e[137]=Ae,e[138]=fe,e[139]=jt,e[140]=Ot):Ot=e[140];let Pt;return e[141]!==re||e[142]!==Te||e[143]!==Ne||e[144]!==Ot?(Pt=g.jsxs(re,{className:Te,children:[Ne,Ot]}),e[141]=re,e[142]=Te,e[143]=Ne,e[144]=Ot,e[145]=Pt):Pt=e[145],Pt},GKe=t=>{const e=Ve.c(14),{isFooterVisible:n,hasMore:r,onLoadMore:s,footerDate:i}=t,o=!n;let a;e[0]!==o?(a=ti("agenda-footer",{hidden:o}),e[0]=o,e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=ct("footer.agendaUntil"),e[2]=l):l=e[2];let c;e[3]!==i?(c=g.jsxs(He,{size:"sm",c:"dimmed",children:[l," ",i]}),e[3]=i,e[4]=c):c=e[4];let d;e[5]!==r||e[6]!==s?(d=r&&g.jsx(or,{onClick:s,className:"load-more-link",children:ct("buttons.loadMore")}),e[5]=r,e[6]=s,e[7]=d):d=e[7];let f;e[8]!==c||e[9]!==d?(f=g.jsxs(vt,{align:"center",gap:"sm",children:[c,d]}),e[8]=c,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==f?(p=g.jsx(le,{className:a,children:f}),e[11]=a,e[12]=f,e[13]=p):p=e[13],p},KKe=t=>{const e=Ve.c(15),{events:n,onDateClick:r,isBusyMode:s,setEventDetailsModalData:i,setShowEventDetailsModal:o,setEventDetailsModalCoords:a,hasMore:l,onLoadMore:c,footerDate:d}=t,f=s===void 0?!1:s,p=ve(Pl);let m;if(e[0]!==p||e[1]!==n){const x=[...n].sort(ZKe);let w;e[3]!==p?(w=(C,E)=>{if(ga(E.end,p))return C;const D=ga(E.start,p)?p:E.start,T=nt.fromJSDate(D).startOf("day"),A=nt.fromJSDate(E.end).startOf("day");let _=T;for(;_<=A;){const R=_.toFormat("yyyy-MM-dd");C[R]||(C[R]=[]),C[R].push(E),_=_.plus({days:1})}return C},e[3]=p,e[4]=w):w=e[4],m=x.reduce(w,{}),e[0]=p,e[1]=n,e[2]=m}else m=e[2];const v=m;let y;return e[5]!==d||e[6]!==v||e[7]!==l||e[8]!==f||e[9]!==r||e[10]!==c||e[11]!==a||e[12]!==i||e[13]!==o?(y=g.jsx(le,{className:"agenda-events-list",children:Object.keys(v).length===0?g.jsx(le,{className:"empty-state",children:g.jsx(He,{size:"lg",c:"dimmed",children:ct("eventList.noEvents")})}):g.jsxs(le,{className:"agenda-event-list",children:[g.jsx(le,{className:"agenda-event-list-scroll-area",children:Object.entries(v).map(x=>{const[w,C]=x;return g.jsx(le,{className:"agenda-event-row",children:C.map((E,D)=>g.jsx(YKe,{event:E,isFirstInDay:D===0,dateStr:w,onDateClick:r,isBusyMode:f,setEventDetailsModalData:i,setShowEventDetailsModal:o,setEventDetailsModalCoords:a},`${E.id}-${w}`))},w)})}),g.jsx(GKe,{isFooterVisible:!0,hasMore:l,onLoadMore:c,footerDate:d})]})}),e[5]=d,e[6]=v,e[7]=l,e[8]=f,e[9]=r,e[10]=c,e[11]=a,e[12]=i,e[13]=o,e[14]=y):y=e[14],y};function ZKe(t,e){return(t==null?void 0:t.start.getTime())>(e==null?void 0:e.start.getTime())?1:(t==null?void 0:t.start.getTime())<(e==null?void 0:e.start.getTime())?-1:0}const JKe=t=>{const e=Ve.c(10),{label:n}=t;let r;e[0]!==n?(r=n.split(" "),e[0]=n,e[1]=r):r=e[1];const s=r;let i;e[2]!==s[0]?(i=g.jsx(He,{className:"day-deader",fw:500,children:s[0]}),e[2]=s[0],e[3]=i):i=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(vn,{w:5}),e[4]=o):o=e[4];let a;e[5]!==s[1]?(a=g.jsx(vt,{pt:5,h:"100%",children:g.jsx("sup",{children:s[1]})}),e[5]=s[1],e[6]=a):a=e[6];let l;return e[7]!==i||e[8]!==a?(l=g.jsxs(vt,{align:"center",className:"day-deader-box",gap:0,children:[i,o,a]}),e[7]=i,e[8]=a,e[9]=l):l=e[9],l},$de=t=>{const e=Ve.c(4),n=Kt();let r;e[0]!==n||e[1]!==t?(r=()=>{const o=setInterval(async()=>{await n(jg()).unwrap(),t&&n(_c())},3e4);return()=>{clearInterval(o)}},e[0]=n,e[1]=t,e[2]=r):r=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=[],e[3]=s):s=e[3],O.useEffect(r,s)},XKe=IGe(HYe);let sX="8:00";const QKe={backgroundColor:"#E7F5FF"},iX=720,eZe=tde(nt),Yz=({calendarRef:t,fadeLeft:e,fadeRight:n,isEventListDisplayed:r,isBusyMode:s,events:i,handleSetEvent:o})=>{const[a,l]=O.useState(1),[c,d]=O.useState(i.length>0),f=ve(Pl),p=ve(wv),m=ve(cf),v=ve(Ev),y=ve(hC),x=ve(Yo),w=Br(),C=ve(Xz),E=ve(uRe),D=Kt(),T=ve(Lh),A=ds[T??uC],_=ve(Cv),{Timezone:R}=ve(oh),{isMobile:N}=Yt(),I=ve(uie),$=ve(fie),[L,z]=O.useState(m),[F,q]=O.useState(!1),{i18n:H}=yt(),B=H.language,[V,Y]=O.useState({top:0,left:0,width:0,height:0}),G=ve(zw),W=ve(xRe);WKe(_,R,A),$de();const{paramView:Z,year:Q,month:X,day:re,eventId:ne}=Fu(),ee=Q&&X&&re?new Date(Number(Q),Number(X)-1,Number(re),12):new Date;O.useEffect(()=>{if(Q&&X&&re&&A!=="agenda"){const Be=new Date(Number(Q),Number(X)-1,Number(re),12);D(gc(_n(Be)))}},[Q,X,re,A]),O.useEffect(()=>{const Be=document.querySelector(".rbc-time-content");Be&&Be.addEventListener("scroll",()=>WGe(Be,ut=>{sX=ut}))},[A]);const oe=O.useCallback((Be,ut)=>{D($p({opened:!0,event:Be,coords:ut}))},[D]),ce=O.useCallback(()=>{q(!1),D(aRe()),D(K_()),w(`/${Z||A}/${Q}/${X}/${re}`)},[D,Z,A,Q,X,re]),ue=O.useCallback(({event:Be,start:ut,end:lt,isAllDay:At})=>{if(s){Be.id===m.id&&(o==null||o({...Be,start:ut,end:lt}));return}return KGe({events:i,view:A,dispatch:D,editEventThunk:Nd,showCreateEvent:$p,openRecurringActionModal:Wg,updateEvents:Gp,event:Be,start:ut,end:lt,isAllDay:At})},[i,D,A]),pe=O.useCallback(({event:Be,start:ut,end:lt})=>{if(s){Be.id===m.id&&(o==null||o({...Be,start:ut,end:lt}));return}return ZGe({dispatch:D,events:i,editEventThunk:Nd,showCreateEvent:$p,openRecurringActionModal:Wg,updateEvents:Gp,event:Be,start:ut,end:lt})},[i,D]),de=O.useCallback(Be=>{if(s)return;const ut=Be||new Date,lt=ut.getFullYear(),At=ut.getMonth()+1,jt=ut.getDate(),Ot=new Date(lt,At-1,jt,12),Pt=`${lt}/${String(At).padStart(2,"0")}/${String(jt).padStart(2,"0")}`,Rt=`/${Z||A}/${Pt}${ne?`/${ne}`:""}`;if(w(Rt),D(gc(Ot)),D(wu(Ot)),A==="agenda"){l(1);const Nt={body:{CalendarIds:y,StartDate:_n(Ot),Count:30,Offset:0},calendarsGroup:x,isEdit:!1};D(Dg(Nt))}},[D,ne,Z,A,y,x]),me=O.useCallback((Be,ut)=>{if(s)return;let lt;switch(Be){case"PREV":lt=new Date(f),lt.setDate(f.getDate()-1);break;case"NEXT":lt=new Date(f),lt.setDate(f.getDate()+1);break;case"TODAY":lt=new Date;break;case"DATE":lt=ut||f;break;default:lt=f}de(lt)},[f,de,s]),Se=TBe(Be=>{const[ut]=Be;ut()},200),De=O.useCallback(({start:Be,end:ut,action:lt,...At})=>{s||(GGe({view:A,handleClick:Se,handleShowCreateEvent:oe,action:lt,date:f,start:Be,dispatch:D,showCreateEvent:$p,event:m,rest:At,end:ut,navigate:w}),de(Be))},[f,A,m,oe,D,Se,w,de]),Ae=O.useCallback(Be=>{if(A==="agenda")return;const ut=Ade(Be),lt=S$(ut),At=Yg(W);D(Yde(lt)),YGe(ut,At)&&D(Gp())},[D,W,A,f]),{views:fe}=O.useMemo(()=>({views:{day:!0,week:!0,work_week:!0,month:!0,agenda:!0,year:QS}}),[]),Te=O.useCallback((Be,...ut)=>{const[,,lt]=ut;return Tde(p,A,G)(Be,lt)},[p,A]),Ne=O.useCallback(async(...Be)=>{const[,ut]=Be;await de(ut),D(J$(!0))},[de,D,A]),Ue=E===Cn.Pending||C===Cn.Pending,[rt]=sX.split(":"),ot=O.useCallback(Be=>({style:r&&co(Lt(f),Lt(Be),"day")?QKe:{}}),[f,r]),Je=O.useCallback(async Be=>{const{onNavigate:ut}=v;if(Be){ut&&ut("DATE",Be);const lt=nt.fromJSDate(Be);w(`/day/${lt.year}/${lt.month}/${lt.day}`)}},[v]),je=O.useCallback(()=>{},[]),We=O.useMemo(()=>{var Be;return St((Be=i[i.length-1])!=null&&Be.end?i[i.length-1].end:f,"d MMMM yyyy",!1,H.language)},[i,f]);O.useEffect(()=>{ne&&i.length&&(i.find(ut=>String(ut.id)===ne)||($n.showError(ct("errorsCatch.otherErrors.eventNotFound")),w(`/${Z}/${Q}/${X}/${re}`)))},[i,ne]);const Le=()=>{const Be={body:{CalendarIds:y,StartDate:_n(f),Count:30,Offset:a*30},calendarsGroup:x};l(a+1),D(tk(Be)).unwrap()},_e=O.useMemo(()=>{var Be;if(A==="agenda"&&f){const ut=Qe(f),lt=Qe((Be=i[i.length-1])==null?void 0:Be.end);return Math.min(lt.diff(ut,"day"),iX)}return 30},[f,i]);return O.useEffect(()=>{if(A==="agenda"&&i.length>0){const Be=a*30,ut=i.length<Be;d(!(_e>=iX||ut))}else d(!1)},[i,f,a,A,_e]),g.jsxs(le,{ref:t,className:`calendar-wrapper ${R!=null&&R.SecondEnabled?"calendar-wrapper-additional-timezone":""}`,children:[g.jsx(j1,{w:"100%",visible:Ue,overlayProps:{blur:.2},zIndex:10}),A==="agenda"?g.jsxs(g.Fragment,{children:[g.jsx(tX,{view:A,onNavigate:me,date:f,onView:je,calendarRef:t,isBusyMode:s,fadeLeft:e,fadeRight:n,label:St(f,"MMMM yyyy"),localizer:eZe,views:fe}),g.jsx(le,{className:"agenda-view-wrapper",children:g.jsx(KKe,{events:i,hasMore:c,onLoadMore:Le,footerDate:We,isBusyMode:s,onDateClick:Je,setEventDetailsModalData:z,setShowEventDetailsModal:q,setEventDetailsModalCoords:Y})})]}):g.jsx(XKe,{events:i,culture:B==="ru"?"ru-RU":"en-GB",eventPropGetter:Te,components:{timeGutterHeader:tKe,toolbar:Be=>g.jsx(tX,{...Be,calendarRef:t,isBusyMode:s,fadeLeft:e,fadeRight:n}),event:Be=>g.jsx(eKe,{...Be,isBusyMode:s,setEventDetailsModalData:z,setShowEventDetailsModal:q,setEventDetailsModalCoords:Y}),week:{header:Be=>g.jsx(GJ,{...Be,onChangeDate:de})},work_week:{header:Be=>g.jsx(GJ,{...Be,onChangeDate:de})},day:{header:Be=>g.jsx(JKe,{...Be})}},onView:je,view:A,views:fe,scrollToTime:_n(xr(f,{hour:Number(rt),minute:0})),dayPropGetter:ot,onNavigate:de,onEventDrop:ue,onShowMore:Ne,onEventResize:pe,onSelectSlot:De,onRangeChange:Ae,className:`rbc-${A}`,onDrillDown:Je,defaultDate:ee,...qGe}),g.jsx(Ou,{close:ce,opened:F,coord:V,withoutOverlay:!1,centered:!1,isMobile:N,isFull:N,loadingFlag:I==="fulfilled"||$==="fulfilled",isFullContentHeight:s?!s:L.resource.hasMaterials||L.resource.hasParticipant,children:g.jsx(dC,{isBusyMode:s,isMobile:N,handleCloseDetailsModal:ce,event:m})})]})};Yz.defaultProps={setDayEvents:()=>{},isShowEventList:!1,minCalendar:!1,isBusyMode:!1};const tZe=Object.freeze(Object.defineProperty({__proto__:null,default:Yz},Symbol.toStringTag,{value:"Module"}));var x1=(t=>(t[t.Main=0]="Main",t[t.User=1]="User",t[t.UserMain=2]="UserMain",t))(x1||{});function nZe(t){return qe.uniqBy(t,"id")}const rZe=({event:t,setCalendarsBusy:e,tab:n,isMounted:r,handleSetEvent:s})=>{var N,I;const i=Kt(),o=ve(xOe),a=ve(kr),l=ve(df),c=ve(Yo),d=ve(Cv),f=ve(Lh),p=ve(sO),m=O.useRef(null),{computedHeight:v}=k$(m),{allDay:y}=t,{isAllDayWithoutTime:x,startTimeZoneId:w,endTimeZoneId:C}=t.resource,E=t.resource.contactParticipants.length;O.useEffect(()=>()=>{(async()=>{await i(wA(f)),i(SX(!1))})()},[]),O.useEffect(()=>{i(SX(!0));const{contactParticipants:$,calendarId:L}=t.resource;let z=[];const F={};let q=[];const H={};if(n==="settings")return;const B=ds[f];B!=="day"&&B!=="week"&&i(wA(ds.week)),$.length&&l.forEach(Z=>{const Q=Z.ownerId||Z.id||"key";F[Q]=Z}),$.length&&$.forEach(Z=>{(a==null?void 0:a.Id)===Z.userId&&L?z=[...z,{isDisable:!1,color:c[L].color,isActive:!0,id:L,contactId:Z.id,isMainCalendar:!0}]:F[Z.userId]&&F[Z.userId].calendarType===x1.UserMain?(z=[...z,{isDisable:!1,color:F[Z.userId].color,isActive:!0,id:F[Z.userId].id||0,contactId:Z.id,isMainCalendar:!1}],H[Number(Z.id)]={name:"",color:F[Z.userId].color,accessType:F[Z.userId].accessType||mt.Read},q=[...q,Z.id]):z=[...z,{isDisable:!0,color:"#808080",isActive:!1,id:0,contactId:Z.id,isMainCalendar:!1}]});const V=Yg(p);let Y=null;V?Y={StartDate:_n((V==null?void 0:V.start)||new Date),EndDate:_n((V==null?void 0:V.end)||new Date)}:Y={StartDate:kl(t.start,"week"),EndDate:Iu(t.start,"week")};const G={ContactIds:[(a==null?void 0:a.ContactId)||0,...q],...Y};H[(a==null?void 0:a.ContactId)||0]={name:"",color:c[L||0].color,accessType:c[L||0].accessType},(async()=>{await i(Vx({body:G,calendarsGroup:H,timeZones:d,events:[]})),r.current=!0})(),e(z)},[n,E]);const D=(N=d[Number(w)])==null?void 0:N.tzName,T=(I=d[Number(C)])==null?void 0:I.tzName,A=_n(t.start,D),_=_n(t.end,T),R=O.useMemo(()=>{const $={...t,start:A,end:_,allDay:x?!0:y,resource:{...t.resource,mainColor:"#00000080",isBusyMode:!0}};return nZe([$,...o])},[o,x,A,_]);return g.jsx(le,{ref:m,style:{height:v},className:"react-big-calendar-wrapper react-big-calendar-wrapper-min",children:g.jsx(Yz,{events:R,isBusyMode:!0,isEventListDisplayed:!1,handleSetEvent:s})})},sZe=t=>{const e=Ve.c(37),{t:n}=yt();let r,s,i,o,a,l;e[0]!==t?({tab:l,isMobile:r,setCalendarsBusy:o,isMounted:s,setTab:a,...i}=t,e[0]=t,e[1]=r,e[2]=s,e[3]=i,e[4]=o,e[5]=a,e[6]=l):(r=e[1],s=e[2],i=e[3],o=e[4],a=e[5],l=e[6]);let c;e[7]!==a?(c=D=>a(D),e[7]=a,e[8]=c):c=e[8];let d;e[9]!==r?(d=ti({"settings-tab-panel-mobile":r,"inactive-tab":!0}),e[9]=r,e[10]=d):d=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f={cursor:"pointer"},e[11]=f):f=e[11];let p;e[12]!==n?(p=n("fullEventPage.sections.eventSettings"),e[12]=n,e[13]=p):p=e[13];let m;e[14]!==p?(m=g.jsx(ts.Tab,{style:f,value:"settings",children:p}),e[14]=p,e[15]=m):m=e[15];let v;e[16]!==r||e[17]!==n?(v=!r&&g.jsx(ts.Tab,{style:{cursor:"pointer"},value:"shared_calendar",children:n("fullEventPage.sections.cooperativeCalendar")}),e[16]=r,e[17]=n,e[18]=v):v=e[18];let y;e[19]!==d||e[20]!==m||e[21]!==v?(y=g.jsxs(ts.List,{className:d,children:[m,v]}),e[19]=d,e[20]=m,e[21]=v,e[22]=y):y=e[22];let x;e[23]!==i?(x=g.jsx(ts.Panel,{value:"settings",pt:"xs",children:g.jsx(kBe,{...i})}),e[23]=i,e[24]=x):x=e[24];let w;e[25]!==s||e[26]!==i||e[27]!==o||e[28]!==l?(w=l!=="settings"&&g.jsx(rZe,{isMounted:s,event:i.event,setCalendarsBusy:o,handleSetEvent:i.handleSetEvent,tab:l}),e[25]=s,e[26]=i,e[27]=o,e[28]=l,e[29]=w):w=e[29];let C;e[30]!==w?(C=g.jsx(ts.Panel,{value:"shared_calendar",pt:"xs",children:w}),e[30]=w,e[31]=C):C=e[31];let E;return e[32]!==c||e[33]!==y||e[34]!==x||e[35]!==C?(E=g.jsx(g.Fragment,{children:g.jsxs(ts,{onChange:c,defaultValue:"settings",children:[y,x,C]})}),e[32]=c,e[33]=y,e[34]=x,e[35]=C,e[36]=E):E=e[36],E},iZe=()=>{const t=Ve.c(10);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs(wt,{mb:"sm",children:[g.jsx(br,{height:36,width:"100%"}),g.jsx(br,{height:36,w:92})]}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=g.jsxs(wt,{mb:"sm",children:[g.jsx(br,{height:36,width:190}),g.jsx(br,{height:36,w:80}),g.jsx(br,{height:36,w:140})]}),t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsxs(sr.Col,{span:8,children:[e,g.jsxs(le,{mb:"sm",children:[n,g.jsxs(wt,{children:[g.jsx(br,{height:36,width:190}),g.jsx(br,{height:36,w:80}),g.jsx(br,{height:36,w:187})]})]})]}),t[2]=r):r=t[2];let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsxs(sr,{gutter:"xl",children:[r,g.jsx(sr.Col,{span:4,children:g.jsx(br,{height:35,w:92})})]}),t[3]=s):s=t[3];let i,o;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(le,{mt:"xl",mb:"xl",children:g.jsx(br,{height:18,width:150})}),o=g.jsx(br,{mb:"sm",height:36,width:"100%"}),t[4]=i,t[5]=o):(i=t[4],o=t[5]);let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsxs(wt,{mb:"sm",children:[g.jsx(br,{height:36,width:190}),g.jsx(br,{height:36,w:190})]}),t[6]=a):a=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsxs(sr.Col,{span:8,children:[i,o,a,g.jsx(wt,{mb:"sm",children:g.jsx(br,{height:50,width:694})})]}),t[7]=l):l=t[7];let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(le,{mt:"xl",mb:"xl",children:g.jsx(br,{height:18,width:150})}),t[8]=c):c=t[8];let d;return t[9]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsxs(le,{maw:1200,children:[s,g.jsxs(sr,{gutter:"xl",children:[l,g.jsx(sr.Col,{span:4,children:g.jsxs(le,{children:[c,g.jsx(wt,{mb:"sm",children:g.jsx(br,{height:36,width:190})})]})})]})]}),t[9]=d):d=t[9],d};function oZe(t){if(!/^[0-9a-zA-Z-]+$/.test(t))throw new Error(`[@mantine/use-form] Form name "${t}" is invalid, it should contain only letters, numbers and dashes`)}const aZe=typeof window<"u"?O.useLayoutEffect:O.useEffect;function Ai(t,e){aZe(()=>{if(t)return window.addEventListener(t,e),()=>window.removeEventListener(t,e)},[t])}function lZe(t,e){t&&oZe(t),Ai(`mantine-form:${t}:set-field-value`,n=>e.setFieldValue(n.detail.path,n.detail.value)),Ai(`mantine-form:${t}:set-values`,n=>e.setValues(n.detail)),Ai(`mantine-form:${t}:set-initial-values`,n=>e.setInitialValues(n.detail)),Ai(`mantine-form:${t}:set-errors`,n=>e.setErrors(n.detail)),Ai(`mantine-form:${t}:set-field-error`,n=>e.setFieldError(n.detail.path,n.detail.error)),Ai(`mantine-form:${t}:clear-field-error`,n=>e.clearFieldError(n.detail)),Ai(`mantine-form:${t}:clear-errors`,e.clearErrors),Ai(`mantine-form:${t}:reset`,e.reset),Ai(`mantine-form:${t}:validate`,e.validate),Ai(`mantine-form:${t}:validate-field`,n=>e.validateField(n.detail)),Ai(`mantine-form:${t}:reorder-list-item`,n=>e.reorderListItem(n.detail.path,n.detail.payload)),Ai(`mantine-form:${t}:remove-list-item`,n=>e.removeListItem(n.detail.path,n.detail.index)),Ai(`mantine-form:${t}:insert-list-item`,n=>e.insertListItem(n.detail.path,n.detail.item,n.detail.index)),Ai(`mantine-form:${t}:set-dirty`,n=>e.setDirty(n.detail)),Ai(`mantine-form:${t}:set-touched`,n=>e.setTouched(n.detail)),Ai(`mantine-form:${t}:reset-dirty`,n=>e.resetDirty(n.detail)),Ai(`mantine-form:${t}:reset-touched`,e.resetTouched)}function cZe(t){return e=>{if(!e)t(e);else if(typeof e=="function")t(e);else if(typeof e=="object"&&"nativeEvent"in e){const{currentTarget:n}=e;n instanceof HTMLInputElement?n.type==="checkbox"?t(n.checked):t(n.value):(n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement)&&t(n.value)}else t(e)}}function OP(t){return t===null||typeof t!="object"?{}:Object.keys(t).reduce((e,n)=>{const r=t[n];return r!=null&&r!==!1&&(e[n]=r),e},{})}function uZe(t){const[e,n]=O.useState(OP(t)),r=O.useRef(e),s=O.useCallback(l=>{n(c=>{const d=OP(typeof l=="function"?l(c):l);return r.current=d,d})},[]),i=O.useCallback(()=>s({}),[]),o=O.useCallback(l=>{r.current[l]!==void 0&&s(c=>{const d={...c};return delete d[l],d})},[e]),a=O.useCallback((l,c)=>{c==null||c===!1?o(l):r.current[l]!==c&&s(d=>({...d,[l]:c}))},[e]);return{errorsState:e,setErrors:s,clearErrors:i,setFieldError:a,clearFieldError:o}}function RP(t,e){if(e===null||typeof e!="object")return{};const n={...e};return Object.keys(e).forEach(r=>{r.includes(`${String(t)}.`)&&delete n[r]}),n}function oX(t,e){const n=t.substring(e.length+1).split(".")[0];return parseInt(n,10)}function aX(t,e,n,r){if(e===void 0)return n;const s=`${String(t)}`;let i=n;r===-1&&(i=RP(`${s}.${e}`,i));const o={...i},a=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${s}.`))return!1;const c=oX(l,s);return Number.isNaN(c)?!1:c>=e}).forEach(([l,c])=>{const d=oX(l,s),f=l.replace(`${s}.${d}`,`${s}.${d+r}`);o[f]=c,a.add(f),a.has(l)||delete o[l]}),o}function dZe(t,{from:e,to:n},r){const s=`${t}.${e}`,i=`${t}.${n}`,o={...r},a=new Set;return Object.keys(r).forEach(l=>{if(a.has(l))return;let c,d;if(l.startsWith(s)?(c=l,d=l.replace(s,i)):l.startsWith(i)&&(c=l.replace(i,s),d=l),c&&d){const f=o[c],p=o[d];p===void 0?delete o[c]:o[c]=p,f===void 0?delete o[d]:o[d]=f,a.add(c),a.add(d)}}),o}function lX(t,e,n){typeof n.value=="object"&&(n.value=Iy(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function Iy(t){if(typeof t!="object")return t;var e=0,n,r,s,i=Object.prototype.toString.call(t);if(i==="[object Object]"?s=Object.create(t.__proto__||null):i==="[object Array]"?s=Array(t.length):i==="[object Set]"?(s=new Set,t.forEach(function(o){s.add(Iy(o))})):i==="[object Map]"?(s=new Map,t.forEach(function(o,a){s.set(Iy(a),Iy(o))})):i==="[object Date]"?s=new Date(+t):i==="[object RegExp]"?s=new RegExp(t.source,t.flags):i==="[object DataView]"?s=new t.constructor(Iy(t.buffer)):i==="[object ArrayBuffer]"?s=t.slice(0):i.slice(-6)==="Array]"&&(s=new t.constructor(t)),s){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)lX(s,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(s,n=r[e])&&s[n]===t[n]||lX(s,n,Object.getOwnPropertyDescriptor(t,n))}return s||t}function zde(t){return typeof t!="string"?[]:t.split(".")}function Bs(t,e){const n=zde(t);if(n.length===0||typeof e!="object"||e===null)return;let r=e[n[0]];for(let s=1;s<n.length&&r!=null;s+=1)r=r[n[s]];return r}function fC(t,e,n){const r=zde(t);if(r.length===0)return n;const s=Iy(n);if(r.length===1)return s[r[0]]=e,s;let i=s[r[0]];for(let o=1;o<r.length-1;o+=1){if(i===void 0)return s;i=i[r[o]]}return i[r[r.length-1]]=e,s}function fZe(t,{from:e,to:n},r){const s=Bs(t,r);if(!Array.isArray(s))return r;const i=[...s],o=s[e];return i.splice(e,1),i.splice(n,0,o),fC(t,i,r)}function pZe(t,e,n,r){const s=Bs(t,r);if(!Array.isArray(s))return r;const i=[...s];return i.splice(typeof n=="number"?n:i.length,0,e),fC(t,i,r)}function hZe(t,e,n){const r=Bs(t,n);return Array.isArray(r)?fC(t,r.filter((s,i)=>i!==e),n):n}function mZe(t,e,n,r){const s=Bs(t,r);if(!Array.isArray(s)||s.length<=n)return r;const i=[...s];return i[n]=e,fC(t,i,r)}function gZe({$values:t,$errors:e,$status:n}){const r=O.useCallback((a,l)=>{n.clearFieldDirty(a),e.setErrors(c=>dZe(a,l,c)),t.setValues({values:fZe(a,l,t.refValues.current),updateState:!0})},[]),s=O.useCallback((a,l)=>{n.clearFieldDirty(a),e.setErrors(c=>aX(a,l,c,-1)),t.setValues({values:hZe(a,l,t.refValues.current),updateState:!0})},[]),i=O.useCallback((a,l,c)=>{n.clearFieldDirty(a),e.setErrors(d=>aX(a,c,d,1)),t.setValues({values:pZe(a,l,c,t.refValues.current),updateState:!0})},[]),o=O.useCallback((a,l,c)=>{n.clearFieldDirty(a),t.setValues({values:mZe(a,c,l,t.refValues.current),updateState:!0})},[]);return{reorderListItem:r,removeListItem:s,insertListItem:i,replaceListItem:o}}var yI,cX;function vZe(){return cX||(cX=1,yI=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var o=i[s];if(!t(e[o],n[o]))return!1}return!0}return e!==e&&n!==n}),yI}var yZe=vZe();const wD=Mr(yZe);function wx(t,e){const n=Object.keys(t);if(typeof e=="string"){const r=n.filter(s=>s.startsWith(`${e}.`));return t[e]||r.some(s=>t[s])||!1}return n.some(r=>t[r])}function bZe({initialDirty:t,initialTouched:e,mode:n,$values:r}){const[s,i]=O.useState(e),[o,a]=O.useState(t),l=O.useRef(e),c=O.useRef(t),d=O.useCallback(A=>{const _=typeof A=="function"?A(l.current):A;l.current=_,n==="controlled"&&i(_)},[]),f=O.useCallback((A,_=!1)=>{const R=typeof A=="function"?A(c.current):A;c.current=R,(n==="controlled"||_)&&a(R)},[]),p=O.useCallback(()=>d({}),[]),m=O.useCallback(A=>{const _=A?{...r.refValues.current,...A}:r.refValues.current;r.setValuesSnapshot(_),f({})},[]),v=O.useCallback((A,_)=>{d(R=>wx(R,A)===_?R:{...R,[A]:_})},[]),y=O.useCallback((A,_,R)=>{f(N=>wx(N,A)===_?N:{...N,[A]:_},R)},[]),x=O.useCallback((A,_)=>{const R=wx(c.current,A),N=!wD(Bs(A,r.getValuesSnapshot()),_),I=RP(A,c.current);I[A]=N,f(I,R!==N)},[]),w=O.useCallback(A=>wx(l.current,A),[]),C=O.useCallback(A=>f(_=>{if(typeof A!="string")return _;const R=RP(A,_);return delete R[A],wD(R,_)?_:R}),[]),E=O.useCallback(A=>{if(A){const R=Bs(A,c.current);if(typeof R=="boolean")return R;const N=Bs(A,r.refValues.current),I=Bs(A,r.valuesSnapshot.current);return!wD(N,I)}return Object.keys(c.current).length>0?wx(c.current):!wD(r.refValues.current,r.valuesSnapshot.current)},[]),D=O.useCallback(()=>c.current,[]),T=O.useCallback(()=>l.current,[]);return{touchedState:s,dirtyState:o,touchedRef:l,dirtyRef:c,setTouched:d,setDirty:f,resetDirty:m,resetTouched:p,isTouched:w,setFieldTouched:v,setFieldDirty:y,setTouchedState:i,setDirtyState:a,clearFieldDirty:C,isDirty:E,getDirty:D,getTouched:T,setCalculatedFieldDirty:x}}function xZe({initialValues:t,onValuesChange:e,mode:n}){const r=O.useRef(!1),[s,i]=O.useState(t||{}),o=O.useRef(s),a=O.useRef(s),l=O.useCallback(({values:x,subscribers:w,updateState:C=!0,mergeWithPreviousValues:E=!0})=>{const D=o.current,T=x instanceof Function?x(o.current):x,A=E?{...D,...T}:T;o.current=A,C&&(i(A),n==="uncontrolled"&&(o.current=A)),e==null||e(A,D),w==null||w.filter(Boolean).forEach(_=>_({updatedValues:A,previousValues:D}))},[e]),c=O.useCallback(x=>{var E;const w=Bs(x.path,o.current),C=x.value instanceof Function?x.value(w):x.value;if(w!==C){const D=o.current,T=fC(x.path,C,o.current);l({values:T,updateState:x.updateState}),(E=x.subscribers)==null||E.filter(Boolean).forEach(A=>A({path:x.path,updatedValues:T,previousValues:D}))}},[l]),d=O.useCallback(x=>{a.current=x},[]),f=O.useCallback((x,w)=>{r.current||(r.current=!0,l({values:x,updateState:n==="controlled"}),d(x),w())},[l]),p=O.useCallback(()=>{l({values:a.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=O.useCallback(()=>o.current,[]),v=O.useCallback(()=>a.current,[]),y=O.useCallback((x,w)=>{const C=Bs(x,a.current);typeof C>"u"||c({path:x,value:C,updateState:n==="controlled",subscribers:w})},[c,n]);return{initialized:r,stateValues:s,refValues:o,valuesSnapshot:a,setValues:l,setFieldValue:c,resetValues:p,setValuesSnapshot:d,initialize:f,getValues:m,getValuesSnapshot:v,resetField:y}}function SZe({$status:t,cascadeUpdates:e}){const n=O.useRef({}),r=O.useCallback((i,o)=>{O.useEffect(()=>(n.current[i]=n.current[i]||[],n.current[i].push(o),()=>{n.current[i]=n.current[i].filter(a=>a!==o)}),[o])},[]),s=O.useCallback(i=>{var a;const o=((a=n.current[i])==null?void 0:a.map(l=>c=>l({previousValue:Bs(i,c.previousValues),value:Bs(i,c.updatedValues),touched:t.isTouched(i),dirty:t.isDirty(i)})))??[];if(e)for(const l in n.current)(l.startsWith(`${i}.`)||i.startsWith(`${l}.`))&&o.push(...n.current[l].map(c=>d=>c({previousValue:Bs(l,d.previousValues),value:Bs(l,d.updatedValues),touched:t.isTouched(l),dirty:t.isDirty(l)})));return o},[]);return{subscribers:n,watch:r,getFieldSubscribers:s}}function uX(t,e){return t?`${t}-${e.toString()}`:e.toString()}const CD=Symbol("root-rule");function dX(t){const e=OP(t);return{hasErrors:Object.keys(e).length>0,errors:e}}function NP(t,e,n="",r={}){return typeof t!="object"||t===null?r:Object.keys(t).reduce((s,i)=>{const o=t[i],a=`${n===""?"":`${n}.`}${i}`,l=Bs(a,e);let c=!1;return typeof o=="function"&&(s[a]=o(l,e,a)),typeof o=="object"&&Array.isArray(l)&&(c=!0,l.forEach((d,f)=>NP(o,e,`${a}.${f}`,s)),CD in o&&(s[a]=o[CD](l,e,a))),typeof o=="object"&&typeof l=="object"&&l!==null&&(c||NP(o,e,a,s),CD in o&&(s[a]=o[CD](l,e,a))),s},r)}function jP(t,e){return dX(typeof t=="function"?t(e):NP(t,e))}function ED(t,e,n){if(typeof t!="string")return{hasError:!1,error:null};const r=jP(e,n),s=Object.keys(r.errors).find(i=>t.split(".").every((o,a)=>o===i.split(".")[a]));return{hasError:!!s,error:s?r.errors[s]:null}}const wZe="__MANTINE_FORM_INDEX__";function fX(t,e){return e?typeof e=="boolean"?e:Array.isArray(e)?e.includes(t.replace(/[.][0-9]+/g,`.${wZe}`)):!1:!1}function Gz({name:t,mode:e="controlled",initialValues:n,initialErrors:r={},initialDirty:s={},initialTouched:i={},clearInputErrorOnChange:o=!0,validateInputOnChange:a=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:d=(x=>x),enhanceGetInputProps:f,validate:p,onSubmitPreventDefault:m="always",touchTrigger:v="change",cascadeUpdates:y=!1}={}){const x=uZe(r),w=xZe({initialValues:n,onValuesChange:c,mode:e}),C=bZe({initialDirty:s,initialTouched:i,$values:w,mode:e}),E=gZe({$values:w,$errors:x,$status:C}),D=SZe({$status:C,cascadeUpdates:y}),[T,A]=O.useState(0),[_,R]=O.useState({}),[N,I]=O.useState(!1),$=O.useCallback(()=>{w.resetValues(),x.clearErrors(),C.resetDirty(),C.resetTouched(),e==="uncontrolled"&&A(ee=>ee+1)},[]),L=O.useCallback(ee=>{o&&x.clearErrors(),e==="uncontrolled"&&A(oe=>oe+1),Object.keys(D.subscribers.current).forEach(oe=>{const ce=Bs(oe,w.refValues.current),ue=Bs(oe,ee);ce!==ue&&D.getFieldSubscribers(oe).forEach(pe=>pe({previousValues:ee,updatedValues:w.refValues.current}))})},[o]),z=O.useCallback(ee=>{const oe=w.refValues.current;w.initialize(ee,()=>e==="uncontrolled"&&A(ce=>ce+1)),L(oe)},[L]),F=O.useCallback((ee,oe,ce)=>{const ue=fX(ee,a),pe=oe instanceof Function?oe(Bs(ee,w.refValues.current)):oe;C.setCalculatedFieldDirty(ee,pe),v==="change"&&C.setFieldTouched(ee,!0),!ue&&o&&x.clearFieldError(ee),w.setFieldValue({path:ee,value:oe,updateState:e==="controlled",subscribers:[...D.getFieldSubscribers(ee),ue?de=>{const me=ED(ee,p,de.updatedValues);me.hasError?x.setFieldError(ee,me.error):x.clearFieldError(ee)}:null,(ce==null?void 0:ce.forceUpdate)!==!1&&e!=="controlled"?()=>R(de=>({...de,[ee]:(de[ee]||0)+1})):null]})},[c,p]),q=O.useCallback(ee=>{const oe=w.refValues.current;w.setValues({values:ee,updateState:e==="controlled"}),L(oe)},[c,L]),H=O.useCallback(()=>{const ee=jP(p,w.refValues.current);return x.setErrors(ee.errors),ee},[p]),B=O.useCallback(ee=>{const oe=ED(ee,p,w.refValues.current);return oe.hasError?x.setFieldError(ee,oe.error):x.clearFieldError(ee),oe},[p]),V=(ee,{type:oe="input",withError:ce=!0,withFocus:ue=!0,...pe}={})=>{const me={onChange:cZe(Se=>F(ee,Se,{forceUpdate:!1})),"data-path":uX(t,ee)};return ce&&(me.error=x.errorsState[ee]),oe==="checkbox"?me[e==="controlled"?"checked":"defaultChecked"]=Bs(ee,w.refValues.current):me[e==="controlled"?"value":"defaultValue"]=Bs(ee,w.refValues.current),ue&&(me.onFocus=()=>C.setFieldTouched(ee,!0),me.onBlur=()=>{if(fX(ee,l)){const Se=ED(ee,p,w.refValues.current);Se.hasError?x.setFieldError(ee,Se.error):x.clearFieldError(ee)}}),Object.assign(me,f==null?void 0:f({inputProps:me,field:ee,options:{type:oe,withError:ce,withFocus:ue,...pe},form:ne}))},Y=(ee,oe)=>ce=>{m==="always"&&(ce==null||ce.preventDefault());const ue=H();if(ue.hasErrors)m==="validation-failed"&&(ce==null||ce.preventDefault()),oe==null||oe(ue.errors,w.refValues.current,ce);else{const pe=ee==null?void 0:ee(d(w.refValues.current),ce);pe instanceof Promise&&(I(!0),pe.finally(()=>I(!1)))}},G=ee=>d(ee||w.refValues.current),W=O.useCallback(ee=>{ee.preventDefault(),$()},[]),Z=O.useCallback(ee=>ee?!ED(ee,p,w.refValues.current).hasError:!jP(p,w.refValues.current).hasErrors,[p]),Q=ee=>`${T}-${String(ee)}-${_[String(ee)]||0}`,X=O.useCallback(ee=>document.querySelector(`[data-path="${uX(t,ee)}"]`),[]),re=O.useCallback(ee=>{w.resetField(ee,[e!=="controlled"?()=>R(oe=>({...oe,[ee]:(oe[ee]||0)+1})):null])},[w.resetField,e,R]),ne={watch:D.watch,initialized:w.initialized.current,values:e==="uncontrolled"?w.refValues.current:w.stateValues,getValues:w.getValues,getInitialValues:w.getValuesSnapshot,setInitialValues:w.setValuesSnapshot,resetField:re,initialize:z,setValues:q,setFieldValue:F,submitting:N,setSubmitting:I,errors:x.errorsState,setErrors:x.setErrors,setFieldError:x.setFieldError,clearFieldError:x.clearFieldError,clearErrors:x.clearErrors,resetDirty:C.resetDirty,setTouched:C.setTouched,setDirty:C.setDirty,isTouched:C.isTouched,resetTouched:C.resetTouched,isDirty:C.isDirty,getTouched:C.getTouched,getDirty:C.getDirty,reorderListItem:E.reorderListItem,insertListItem:E.insertListItem,removeListItem:E.removeListItem,replaceListItem:E.replaceListItem,reset:$,validate:H,validateField:B,getInputProps:V,onSubmit:Y,onReset:W,isValid:Z,getTransformedValues:G,key:Q,getInputNode:X};return lZe(t,ne),ne}function pX(t,e){if(typeof t=="number")return e.length===t;const{max:n,min:r}=t;let s=!0;return typeof n=="number"&&e.length>n&&(s=!1),typeof r=="number"&&e.length<r&&(s=!1),s}function CZe(t,e){const n=e||!0;return r=>typeof r=="string"?pX(t,r.trim())?null:n:typeof r=="object"&&r!==null&&"length"in r&&pX(t,r)?null:n}var wk={exports:{}},EZe=wk.exports,hX;function MZe(){return hX||(hX=1,(function(t,e){(function(n,r){t.exports=r()})(EZe,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,i=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,a={},l=function(y){return(y=+y)+(y>68?1900:2e3)},c=function(y){return function(x){this[y]=+x}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=(function(x){if(!x||x==="Z")return 0;var w=x.match(/([+-]|\d\d)/g),C=60*w[1]+(+w[2]||0);return C===0?0:w[0]==="+"?-C:C})(y)}],f=function(y){var x=a[y];return x&&(x.indexOf?x:x.s.concat(x.f))},p=function(y,x){var w,C=a.meridiem;if(C){for(var E=1;E<=24;E+=1)if(y.indexOf(C(E,0,x))>-1){w=E>12;break}}else w=y===(x?"pm":"PM");return w},m={A:[o,function(y){this.afternoon=p(y,!1)}],a:[o,function(y){this.afternoon=p(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[s,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[i,c("seconds")],ss:[i,c("seconds")],m:[i,c("minutes")],mm:[i,c("minutes")],H:[i,c("hours")],h:[i,c("hours")],HH:[i,c("hours")],hh:[i,c("hours")],D:[i,c("day")],DD:[s,c("day")],Do:[o,function(y){var x=a.ordinal,w=y.match(/\d+/);if(this.day=w[0],x)for(var C=1;C<=31;C+=1)x(C).replace(/\[|\]/g,"")===y&&(this.day=C)}],M:[i,c("month")],MM:[s,c("month")],MMM:[o,function(y){var x=f("months"),w=(f("monthsShort")||x.map((function(C){return C.slice(0,3)}))).indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[o,function(y){var x=f("months").indexOf(y)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,c("year")],YY:[s,function(y){this.year=l(y)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function v(y){var x,w;x=y,w=a&&a.formats;for(var C=(y=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(N,I,$){var L=$&&$.toUpperCase();return I||w[$]||n[$]||w[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(z,F,q){return F||q.slice(1)}))}))).match(r),E=C.length,D=0;D<E;D+=1){var T=C[D],A=m[T],_=A&&A[0],R=A&&A[1];C[D]=R?{regex:_,parser:R}:T.replace(/^\[|\]$/g,"")}return function(N){for(var I={},$=0,L=0;$<E;$+=1){var z=C[$];if(typeof z=="string")L+=z.length;else{var F=z.regex,q=z.parser,H=N.slice(L),B=F.exec(H)[0];q.call(I,B),N=N.replace(B,"")}}return(function(V){var Y=V.afternoon;if(Y!==void 0){var G=V.hours;Y?G<12&&(V.hours+=12):G===12&&(V.hours=0),delete V.afternoon}})(I),I}}return function(y,x,w){w.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(l=y.parseTwoDigitYear);var C=x.prototype,E=C.parse;C.parse=function(D){var T=D.date,A=D.utc,_=D.args;this.$u=A;var R=_[1];if(typeof R=="string"){var N=_[2]===!0,I=_[3]===!0,$=N||I,L=_[2];I&&(L=_[2]),a=this.$locale(),!N&&L&&(a=w.Ls[L]),this.$d=(function(H,B,V){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*H);var Y=v(B)(H),G=Y.year,W=Y.month,Z=Y.day,Q=Y.hours,X=Y.minutes,re=Y.seconds,ne=Y.milliseconds,ee=Y.zone,oe=new Date,ce=Z||(G||W?1:oe.getDate()),ue=G||oe.getFullYear(),pe=0;G&&!W||(pe=W>0?W-1:oe.getMonth());var de=Q||0,me=X||0,Se=re||0,De=ne||0;return ee?new Date(Date.UTC(ue,pe,ce,de,me,Se,De+60*ee.offset*1e3)):V?new Date(Date.UTC(ue,pe,ce,de,me,Se,De)):new Date(ue,pe,ce,de,me,Se,De)}catch{return new Date("")}})(T,R,A),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),$&&T!=this.format(R)&&(this.$d=new Date("")),a={}}else if(R instanceof Array)for(var z=R.length,F=1;F<=z;F+=1){_[1]=R[F-1];var q=w.apply(this,_);if(q.isValid()){this.$d=q.$d,this.$L=q.$L,this.init();break}F===z&&(this.$d=new Date(""))}else E.call(this,D)}}}))})(wk)),wk.exports}var DZe=MZe();const kZe=Mr(DZe),Fde=["#FFA8A8","#FAA2C1","#E599F7","#B197FC","#91A7FF","#74C0FC","#66D9E8","#63E6BE","#8CE99A","#C0EB75","#FFE066","#FFC078"],Kz=t=>{const e=Ve.c(12),{handleChange:n,color:r,disabled:s}=t,[i,o]=O.useState(r);let a;e[0]!==s||e[1]!==n?(a=v=>{s||(o(v),n(v))},e[0]=s,e[1]=n,e[2]=a):a=e[2];const l=a;let c,d;e[3]!==r?(c=()=>{o(r)},d=[r],e[3]=r,e[4]=c,e[5]=d):(c=e[4],d=e[5]),O.useEffect(c,d);let f;e[6]!==i||e[7]!==s||e[8]!==l?(f=Fde.map(v=>g.jsx(qd,{style:{color:"#fff",cursor:s?"not-allowed":"pointer"},onClick:()=>l(v),color:v,size:25,children:i===v&&g.jsx(gw,{width:10})},v)),e[6]=i,e[7]=s,e[8]=l,e[9]=f):f=e[9];const p=f;let m;return e[10]!==p?(m=g.jsx(wt,{justify:"space-between",gap:"xs",children:p}),e[10]=p,e[11]=m):m=e[11],m},TZe=t=>[{value:mt.FreeBusy,label:t("permissionsOptionsLabels.freeBusy")},{value:mt.Read,label:t("permissionsOptionsLabels.read")},{value:mt.Write,label:t("permissionsOptionsLabels.write")},{value:mt.Full,label:t("permissionsOptionsLabels.full")}],AZe=t=>{const e=Ve.c(43),{onAccessChange:n,onDelete:r,userAccess:s,isCurrentUser:i}=t,o=s.user.Name,a=s.user.Email,{t:l}=yt();let c;e[0]!==l?(c=TZe(l),e[0]=l,e[1]=c):c=e[1];const d=c;let f;e[2]!==n||e[3]!==s?(f=z=>{n({...s,accessType:z})},e[2]=n,e[3]=s,e[4]=f):f=e[4];const p=f,{isMobile:m}=Yt();let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v={itemWrapper:{width:"100%"},itemLabel:{width:"100%"}},e[5]=v):v=e[5];let y;e[6]!==s.user?(y=g.jsx(X_,{user:s.user}),e[6]=s.user,e[7]=y):y=e[7];const x=m?100:250;let w;e[8]!==o?(w=g.jsx(He,{size:"xs",truncate:!0,children:o}),e[8]=o,e[9]=w):w=e[9];let C;e[10]!==w||e[11]!==o?(C=g.jsx(ss,{multiline:!0,maw:500,withArrow:!0,label:o,children:w}),e[10]=w,e[11]=o,e[12]=C):C=e[12];let E;e[13]!==x||e[14]!==C?(E=g.jsx(le,{maw:x,children:C}),e[13]=x,e[14]=C,e[15]=E):E=e[15];const D=m?100:250;let T;e[16]!==a?(T=g.jsx(He,{size:"xs",truncate:!0,children:a}),e[16]=a,e[17]=T):T=e[17];let A;e[18]!==T||e[19]!==a?(A=g.jsx(ss,{label:a,children:T}),e[18]=T,e[19]=a,e[20]=A):A=e[20];let _;e[21]!==A||e[22]!==D?(_=g.jsx(le,{maw:D,children:A}),e[21]=A,e[22]=D,e[23]=_):_=e[23];let R;e[24]!==_||e[25]!==E?(R=g.jsxs(vt,{maw:"calc(100% - 15rem)",direction:"column",align:"start",justify:"center",children:[E,_]}),e[24]=_,e[25]=E,e[26]=R):R=e[26];let N;e[27]!==l||e[28]!==s.isOwner?(N=s.isOwner&&g.jsx(He,{mr:"3rem",size:"sm",children:l("settings.calendarSettings.accessOwner")}),e[27]=l,e[28]=s.isOwner,e[29]=N):N=e[29];let I;e[30]!==p||e[31]!==i||e[32]!==r||e[33]!==d||e[34]!==s?(I=!s.isOwner&&g.jsxs(vt,{align:"center",gap:"xs",children:[g.jsx(yce,{data:d,value:s.accessType,onChange:p,disabled:i}),g.jsx(gn,{disabled:i,onClick:()=>r==null?void 0:r(s),children:g.jsx(Tc,{size:"1em"})})]}),e[30]=p,e[31]=i,e[32]=r,e[33]=d,e[34]=s,e[35]=I):I=e[35];let $;e[36]!==R||e[37]!==N||e[38]!==I?($=g.jsxs(vt,{justify:"space-between",align:"center",direction:"row",children:[R,N,I]}),e[36]=R,e[37]=N,e[38]=I,e[39]=$):$=e[39];let L;return e[40]!==$||e[41]!==y?(L=g.jsx(Fi.Item,{p:5,styles:v,icon:y,children:$}),e[40]=$,e[41]=y,e[42]=L):L=e[42],L},_Ze={itemWrapper:{display:"grid !important",gridTemplateColumns:"2.5rem 1fr"}},OZe=t=>{const e=Ve.c(7),{userAccesses:n,onAccessChange:r,onDelete:s}=t,i=ve(kr);let o;e[0]!==r||e[1]!==s||e[2]!==(i==null?void 0:i.Id)||e[3]!==n?(o=!qe.isEmpty(n)&&g.jsx(Fi,{size:"xs",spacing:"xs",center:!0,styles:_Ze,children:n.map(l=>l.user?g.jsx(AZe,{userAccess:l,onDelete:s,onAccessChange:r,isCurrentUser:l.user.Id===(i==null?void 0:i.Id)},l.user.Id):null)}),e[0]=r,e[1]=s,e[2]=i==null?void 0:i.Id,e[3]=n,e[4]=o):o=e[4];let a;return e[5]!==o?(a=g.jsx(g.Fragment,{children:o}),e[5]=o,e[6]=a):a=e[6],a},MD=t=>t.sort((e,n)=>Number(n.isOwner)-Number(e.isOwner)),RZe=t=>{const e=Ve.c(34),{calendarId:n,calendarOwnerId:r,calendarSharePref:s}=t,i=Kt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];const[a,l]=O.useState(o),{t:c}=yt();let d;e[1]!==r||e[2]!==s.UserAccessRights||e[3]!==i?(d=async()=>{l([]);const $=s.UserAccessRights.filter(NZe),L=$.map(jZe),z=await i(kL({userIds:L})).unwrap(),F=$.map(q=>({user:z.find(H=>{const{Id:B}=H;return B===q.PrincipalId}),accessType:q.Type,isOwner:q.PrincipalId===r}));l(MD(F))},e[1]=r,e[2]=s.UserAccessRights,e[3]=i,e[4]=d):d=e[4];const f=d;let p,m;e[5]!==f?(p=()=>void f(),m=[f],e[5]=f,e[6]=p,e[7]=m):(p=e[6],m=e[7]),O.useEffect(p,m);let v;e[8]!==n||e[9]!==i?(v=async $=>{const L={entityIds:[n],userIds:[$.user.Id],accessType:$.accessType,entityType:Fw.Calendar};await i(VOe(L))},e[8]=n,e[9]=i,e[10]=v):v=e[10];const y=v;let x;e[11]!==i||e[12]!==y||e[13]!==a?(x=async $=>{if(!a.some(z=>{const{user:F}=z;return(F==null?void 0:F.Id)===$.userId})){const F={user:(await i(kL({userIds:[$.userId]})).unwrap())[0],accessType:mt.Read,isOwner:!1};l(MD([...a,F])),y(F)}},e[11]=i,e[12]=y,e[13]=a,e[14]=x):x=e[14];const w=x;let C;e[15]!==y||e[16]!==a?(C=$=>{const L=a.filter(z=>{const{user:F}=z;return(F==null?void 0:F.Id)!==$.user.Id});l(MD(L)),y({...$,accessType:mt.Deny})},e[15]=y,e[16]=a,e[17]=C):C=e[17];const E=C;let D;e[18]!==y||e[19]!==a?(D=$=>{const L=a.findIndex(z=>{const{user:F}=z;return(F==null?void 0:F.Id)===$.user.Id});if(L>-1){const z=[...a];z.splice(L,1,$),l(MD(z)),y($)}},e[18]=y,e[19]=a,e[20]=D):D=e[20];const T=D,A=a.length===1&&a[0].isOwner;let _;e[21]!==c?(_=c("settings.calendarSettings.accessSettingsHolder"),e[21]=c,e[22]=_):_=e[22];let R;e[23]!==w||e[24]!==_?(R=g.jsx(le,{maw:500,children:g.jsx(Rie,{placeholder:_,handlePickContact:w,accessType:mt.Full,searchType:"users"})}),e[23]=w,e[24]=_,e[25]=R):R=e[25];let N;e[26]!==T||e[27]!==E||e[28]!==A||e[29]!==a?(N=!A&&!!a.length&&g.jsx(le,{mt:10,maw:538,children:g.jsx(OZe,{userAccesses:a,onDelete:E,onAccessChange:T})}),e[26]=T,e[27]=E,e[28]=A,e[29]=a,e[30]=N):N=e[30];let I;return e[31]!==R||e[32]!==N?(I=g.jsx(g.Fragment,{children:g.jsxs(Is,{children:[R,N]})}),e[31]=R,e[32]=N,e[33]=I):I=e[33],I};function NZe(t){const{Type:e}=t;return e!==mt.Deny}function jZe(t){const{PrincipalId:e}=t;return e}const IZe=t=>{const e=Ve.c(8),{index:n,item:r,form:s,notType:i}=t,{t:o}=yt();let a;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==i||e[4]!==o?(a=()=>{const c=`${i}.${n}`,{type:d,intervalType:f,intervalCount:p,allDayInterval:m}=r;d===null?s.setFieldError(`${c}.type`,o("notifications.validation.typeRequired")):s.clearFieldError(`${c}.type`),f===null?s.setFieldError(`${c}.intervalType`,o("notifications.validation.intervalTypeRequired")):s.clearFieldError(`${c}.intervalType`),p==null||p<1||p>365?s.setFieldError(`${c}.intervalCount`,o("notifications.validation.intervalCountRange",{min:1,max:365})):s.clearFieldError(`${c}.intervalCount`),!m&&i==="allDayNotifications"?s.setFieldError(`${c}.notificationTime`,o("notifications.validation.selectTime")):s.clearFieldError(`${c}.notificationTime`)},e[0]=s,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a):a=e[5];let l;e[6]!==r?(l=[r],e[6]=r,e[7]=l):l=e[7],O.useEffect(a,l)};Qe.extend(g3);const mX=t=>{var I,$;const{t:e}=yt(),{index:n,item:r,form:s,isAllDay:i,onRemove:o}=t,a=i?"allDayNotifications":"simpleNotifications",l=()=>{o(n,i)};IZe({...t,notType:a});const c=[{value:`${lh.Bell}`,label:e("notifications.notification")},{value:`${lh.Mail}`,label:e("notifications.onMail")}],d=c.find(L=>L.value.toString()===r.type.toString()),f=L=>{const z=F=>{switch(F){case gt.Minute:return L===1?e("timeIndicators.minutes_accusative"):e("timeIndicators.minutes",{count:L});case gt.Hour:return e("timeIndicators.hours",{count:L});case gt.Day:return e("timeIndicators.days",{count:L});case gt.Weeks:return e("timeIndicators.weeks",{count:L});default:return""}};return i?[{value:`${gt.Day}`,label:z(gt.Day)},{value:`${gt.Weeks}`,label:z(gt.Weeks)}]:[{value:`${gt.Minute}`,label:z(gt.Minute)},{value:`${gt.Hour}`,label:z(gt.Hour)},{value:`${gt.Day}`,label:z(gt.Day)},{value:`${gt.Weeks}`,label:z(gt.Weeks)}]},p=O.useMemo(()=>f(r.intervalCount),[r.intervalCount,i]),m=p.find(L=>L.value===r.intervalType.toString()),v=((I=p[0])==null?void 0:I.value)||null,y=(($=c[0])==null?void 0:$.value)||null;O.useEffect(()=>{var z;if(!p.find(F=>(F==null?void 0:F.value.toString())===r.intervalType.toString())&&p.length>0){const F=(z=p[0])==null?void 0:z.value;s.setFieldValue(`${a}.${n}.intervalType`,F?Number(F):0)}},[p]);const x=s.getInputProps(`${a}.${n}.type`),w=s.getInputProps(`${a}.${n}.intervalCount`),C=s.getInputProps(`${a}.${n}.intervalType`),E=s.getInputProps(`${a}.${n}.allDayInterval`),D=(d==null?void 0:d.value)||null,T=(m==null?void 0:m.value)||null,A=s.getInputProps(`${a}.${n}.allDayInterval`).value,_=(()=>{if(Qe.isDayjs(A))return A.format("HH:mm");const L=["HH:mm:ss","HH:mm"];for(const z of L)if(Qe(A,z,!0).isValid())return Qe.utc(`2000-01-01 ${A}`,`YYYY-MM-DD ${z}`).local().format("HH:mm");return Qe.utc(A).local().format("HH:mm")})(),R=O.useMemo(()=>{const z=a==="allDayNotifications"?s.errors.allDayNotifications:s.errors.simpleNotifications;return(z==null?void 0:z[n])??{}},[s.errors,n]),N=L=>{if(L===""){s.setFieldValue(`${a}.${n}.intervalCount`,0);return}if(!i){Number(L)<=0&&s.setFieldValue(`${a}.${n}.intervalType`,gt.Minute),s.setFieldValue(`${a}.${n}.intervalCount`,Number(L));return}const z=Number(L),F=Number(C.value);let q={minute:{min:0,max:40320},hour:{min:0,max:672},day:{min:0,max:28},weeks:{min:0,max:4}};const H={[gt.Minute]:{min:q.minute.min,max:q.minute.max,next:gt.Hour,prev:null},[gt.Hour]:{min:q.hour.min,max:q.hour.max,next:gt.Day,prev:gt.Minute},[gt.Day]:{min:q.day.min,max:q.day.max,next:gt.Weeks,prev:gt.Hour},[gt.Weeks]:{min:q.weeks.min,max:q.weeks.max,next:null,prev:gt.Day}},B=i?[gt.Day,gt.Weeks]:[gt.Minute,gt.Hour,gt.Day,gt.Weeks];let V=F,Y=z;const{min:G,max:W,next:Z,prev:Q}=H[F],X=ee=>ee!==null&&B.includes(ee);z>W&&X(Z)?(V=Z,Y=H[Z].min):z<G&&X(Q)?(V=Q,Y=H[Q].max):z<1&&(F===gt.Day?Y=0:Y=1);const ne=f(Y).find(ee=>Number(ee.value)===V);ne&&s.setFieldValue(`${a}.${n}.intervalType`,Number(ne.value)),s.setFieldValue(`${a}.${n}.intervalCount`,Y)};return g.jsxs(vt,{align:"flex-start",gap:8,mt:n===0?15:0,children:[g.jsx(uo,{...x,size:"xs",error:R.type,data:c,defaultValue:y,value:D}),g.jsx(le,{mt:4,children:e("buttons.for")}),g.jsx(Jy,{...w,onChange:N,error:R.intervalCount,size:"xs",w:100,step:1}),g.jsx(uo,{...C,size:"xs",w:100,data:p,defaultValue:v,value:T}),i&&g.jsxs(g.Fragment,{children:[g.jsx(le,{mt:4,children:e("buttons.in")}),g.jsx(q$,{disabled:!!(E!=null&&E.disabled),time:_,size:"xs",offset:{mainAxis:-4,crossAxis:-40},setTime:L=>{if(!L)return;const[z,F]=L.split(":").map(Number);s.getInputProps(`${a}.${n}.allDayInterval`).onChange(Qe().set("hours",z||0).set("minutes",F||0)),s.setFieldValue(`${a}.${n}.source`,Number(yl.Owner))}})]}),g.jsx(gn,{mt:1,onClick:l,children:g.jsx(Tc,{size:"1.125rem"})})]})},LZe=t=>{const e=Ve.c(38),{form:n,updateCalendarNotes:r,onRemove:s}=t,{t:i}=yt();let o;e[0]!==r?(o=()=>{const A={...Bde,source:yl.Calendar};delete A.id,r("simpleNotifications",A)},e[0]=r,e[1]=o):o=e[1];const a=o;let l;e[2]!==r?(l=()=>{const A={...Hde,source:yl.Calendar};delete A.id,r("allDayNotifications",A)},e[2]=r,e[3]=l):l=e[3];const c=l;let d;e[4]!==i?(d=i("settings.calendarSettings.notifications.simpleNotificationsTitle"),e[4]=i,e[5]=d):d=e[5];let f;e[6]!==d?(f=g.jsx(He,{mt:15,size:"sm",fw:400,c:"#000000",children:d}),e[6]=d,e[7]=f):f=e[7];let p;e[8]!==n||e[9]!==s?(p=n.values.simpleNotifications.map((A,_)=>g.jsx(mX,{onRemove:s,isAllDay:!1,form:n,index:_,item:A},_)),e[8]=n,e[9]=s,e[10]=p):p=e[10];let m;e[11]!==p?(m=g.jsx(vt,{direction:"column",align:"flex-start",gap:10,children:p}),e[11]=p,e[12]=m):m=e[12];let v;e[13]!==n.values.simpleNotifications.length||e[14]!==a||e[15]!==i?(v=n.values.simpleNotifications.length<5&&g.jsx(en,{mt:15,onClick:a,variant:"outline",children:i("notifications.addNotification")}),e[13]=n.values.simpleNotifications.length,e[14]=a,e[15]=i,e[16]=v):v=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(vn,{h:15}),e[17]=y):y=e[17];let x;e[18]!==i?(x=i("settings.calendarSettings.notifications.allDayNotificationsTitle"),e[18]=i,e[19]=x):x=e[19];let w;e[20]!==x?(w=g.jsx(He,{mt:15,size:"sm",fw:400,c:"#000000",children:x}),e[20]=x,e[21]=w):w=e[21];let C;e[22]!==n||e[23]!==s?(C=n.values.allDayNotifications.map((A,_)=>g.jsx(mX,{onRemove:s,isAllDay:!0,form:n,index:_,item:A},_)),e[22]=n,e[23]=s,e[24]=C):C=e[24];let E;e[25]!==C?(E=g.jsx(vt,{direction:"column",align:"flex-start",gap:10,children:C}),e[25]=C,e[26]=E):E=e[26];let D;e[27]!==n.values.allDayNotifications.length||e[28]!==c||e[29]!==i?(D=n.values.allDayNotifications.length<5&&g.jsx(en,{mt:15,onClick:c,variant:"outline",children:i("notifications.addNotification")}),e[27]=n.values.allDayNotifications.length,e[28]=c,e[29]=i,e[30]=D):D=e[30];let T;return e[31]!==E||e[32]!==D||e[33]!==f||e[34]!==m||e[35]!==v||e[36]!==w?(T=g.jsxs(g.Fragment,{children:[f,m,v,y,w,E,D]}),e[31]=E,e[32]=D,e[33]=f,e[34]=m,e[35]=v,e[36]=w,e[37]=T):T=e[37],T},rO=t=>{const{intervalCount:e,intervalType:n}=t;return Number(n)===gt.Weeks&&!e?gt.Day:n},PZe=()=>{const t=Ve.c(173),e=Kt();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={name:"",color:"",id:0,calendarType:1,isActive:!0,url:""},t[0]=n):n=t[0];const[r,s]=O.useState(n);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={calendarName:"",calendarColor:""},t[1]=i):i=t[1];const[o,a]=O.useState(i),l=O.useRef(!1),[c,d]=O.useState(""),f=ve(kr),p=ve(df),m=ve(Xz),[v,y]=O.useState(mt.Deny),[x,w]=O.useState(null),[C,E]=O.useState(!1),[D,T]=O.useState(null),[A,_]=Ps(!1),{open:R,close:N}=_,I=O.useRef(null),{t:$}=yt(),L=v===mt.Full,z=v===mt.Read||v===mt.FreeBusy;let F;t[2]!==$?(F=$("validations.calendarName"),t[2]=$,t[3]=F):F=t[3];const q=F,H=x1[r.calendarType]==="Main"||x1[r.calendarType]==="UserMain";let B;t[4]===Symbol.for("react.memo_cache_sentinel")?(B={allDayNotifications:[],simpleNotifications:[]},t[4]=B):B=t[4];let V;t[5]!==$?(V={initialValues:B,validateInputOnChange:!0,validateInputOnBlur:!0,validate:st=>{const it={},ht=(kt,Hn,qr)=>{const Gn=[],Bt={minute:{min:0,max:40320},hour:{min:0,max:672},day:{min:0,max:28},weeks:{min:0,max:4}};for(let Vn=0;Vn<kt.length;Vn++){const Wt=kt[Vn],Kn={},Nr=Number(Wt.intervalCount),Ci=Number(Wt.intervalType);e:switch(Ci){case gt.Minute:{(Nr<Bt.minute.min||Nr>Bt.minute.max)&&(Kn.intervalCount=$("fullEventPage.noteForms.minuteError",{min:Bt.minute.min,max:Bt.minute.max}));break e}case gt.Hour:{(Nr<Bt.hour.min||Nr>Bt.hour.max)&&(Kn.intervalCount=$("fullEventPage.noteForms.hourError",{min:Bt.hour.min,max:Bt.hour.max}));break e}case gt.Day:{(Nr<Bt.day.min||Nr>Bt.day.max)&&(Kn.intervalCount=$("fullEventPage.noteForms.dayError",{min:Bt.day.min,max:Bt.day.max}));break e}case gt.Weeks:(Nr<Bt.weeks.min||Nr>Bt.weeks.max)&&(Kn.intervalCount=$("fullEventPage.noteForms.weekError",{min:Bt.weeks.min,max:Bt.weeks.max}))}Hn&&!Ude(Wt.allDayInterval)&&(Kn.allDayInterval=$("fullEventPage.noteForms.allDayTimeError")),Object.keys(Kn).length>0&&(Gn[Vn]=Kn)}Gn.length>0&&(it[qr]=Gn)};return ht(st.simpleNotifications,!1,"simpleNotifications"),ht(st.allDayNotifications,!0,"allDayNotifications"),it}},t[5]=$,t[6]=V):V=t[6];const Y=Gz(V);let G;t[7]===Symbol.for("react.memo_cache_sentinel")?(G={actionType:0,title:"",text:"",textConfirmButton:""},t[7]=G):G=t[7];const[W,Z]=O.useState(G);let Q;t[8]!==R?(Q=st=>{Z(st==="clear"?jie:Nie),R()},t[8]=R,t[9]=Q):Q=t[9];const X=Q;let re;t[10]!==r.id||t[11]!==e?(re=()=>{r.id&&e(Zz(r.id))},t[10]=r.id,t[11]=e,t[12]=re):re=t[12];const ne=re;let ee;t[13]!==r.id||t[14]!==N||t[15]!==W.actionType||t[16]!==ne||t[17]!==e?(ee=async()=>{W.actionType===Ac.CONFIRM_MODAL_CALENDAR_DELETE?ne():(await e(Yx(r.id||1)),e(_c())),N()},t[13]=r.id,t[14]=N,t[15]=W.actionType,t[16]=ne,t[17]=e,t[18]=ee):ee=t[18];const oe=ee;let ce;t[19]!==N?(ce=()=>{N()},t[19]=N,t[20]=ce):ce=t[20];const ue=ce,[pe,de]=O.useState(!0);let me;t[21]===Symbol.for("react.memo_cache_sentinel")?(me={entityId:null,userId:null},t[21]=me):me=t[21];const Se=O.useRef(me),{id:De}=Fu(),Ae=v===mt.Full||r.ownerId===(f==null?void 0:f.Id);let fe;t[22]!==e?(fe=st=>{e(pC(st))},t[22]=e,t[23]=fe):fe=t[23];const Te=fe;let Ne;t[24]!==Y?(Ne=(st,it)=>{Y.validate().hasErrors||Y.insertListItem(st,it)},t[24]=Y,t[25]=Ne):Ne=t[25];const Ue=Ne;let rt;t[26]===Symbol.for("react.memo_cache_sentinel")?(rt=qe.debounce(VZe,300),t[26]=rt):rt=t[26];const ot=rt;let Je;t[27]!==r||t[28]!==Y||t[29]!==Te?(Je=()=>{if(!Y.validate().hasErrors)return ot(r,Y.values,Te),()=>ot.cancel()},t[27]=r,t[28]=Y,t[29]=Te,t[30]=Je):Je=t[30];let je;t[31]!==Y.values?(je=[Y.values],t[31]=Y.values,t[32]=je):je=t[32],O.useEffect(Je,je);let We;t[33]!==e?(We=async(st,it)=>{de(!0);const ht={entityId:st,entityType:Fw.Calendar},kt=await e(w$(ht)).unwrap(),Hn=eie(it,kt);w(kt),y(Hn),Se.current={entityId:st,userId:it},de(!1)},t[33]=e,t[34]=We):We=t[34];const Le=We;let _e;t[35]!==r.id||t[36]!==f||t[37]!==Le?(_e=()=>{!qe.isNil(f)&&!qe.isNil(r.id)&&r.id>0&&(Se.current.entityId!==r.id||Se.current.userId!==f.Id)&&Le(r.id,f.Id)},t[35]=r.id,t[36]=f,t[37]=Le,t[38]=_e):_e=t[38];let Be;t[39]!==r||t[40]!==f||t[41]!==Le?(Be=[r,f,Le],t[39]=r,t[40]=f,t[41]=Le,t[42]=Be):Be=t[42],O.useEffect(_e,Be);let ut;t[43]!==e?(ut=async st=>{const it=await e(kL({userIds:st})).unwrap();qe.isEmpty(it)||T(it[0])},t[43]=e,t[44]=ut):ut=t[44];const lt=ut;let At;t[45]===Symbol.for("react.memo_cache_sentinel")?(At=()=>{l.current=!1},t[45]=At):At=t[45];let jt;t[46]!==De?(jt=[De],t[46]=De,t[47]=jt):jt=t[47],O.useEffect(At,jt);let Ot;t[48]!==p||t[49]!==f||t[50]!==Y||t[51]!==lt||t[52]!==De?(Ot=()=>{var st;if(p.length&&f&&!l.current){const it=p.find(ht=>ht.id===Number(De));if(it){(f==null?void 0:f.Id)===(it==null?void 0:it.ownerId)?T(f):qe.isNil(it==null?void 0:it.ownerId)||lt([it==null?void 0:it.ownerId]),a({calendarColor:it.color,calendarName:it.name});const ht=structuredClone((st=it.settingsContainer)==null?void 0:st.defaultEventNotifications);Y.setFieldValue("allDayNotifications",(ht==null?void 0:ht.filter(WZe))||[]),Y.setFieldValue("simpleNotifications",(ht==null?void 0:ht.filter(YZe))||[]),s(it),l.current=!0}}},t[48]=p,t[49]=f,t[50]=Y,t[51]=lt,t[52]=De,t[53]=Ot):Ot=t[53];let Pt;t[54]!==p||t[55]!==f||t[56]!==lt||t[57]!==De?(Pt=[p,De,f,lt],t[54]=p,t[55]=f,t[56]=lt,t[57]=De,t[58]=Pt):Pt=t[58],O.useEffect(Ot,Pt);let Rt;t[59]!==o.calendarName||t[60]!==q||t[61]!==C?(Rt=()=>{(o.calendarName.trim().length<2||o.calendarName.trim().length>50)&&C?d(q):d("")},t[59]=o.calendarName,t[60]=q,t[61]=C,t[62]=Rt):Rt=t[62];let Nt;t[63]!==o||t[64]!==q||t[65]!==C?(Nt=[o,C,q],t[63]=o,t[64]=q,t[65]=C,t[66]=Nt):Nt=t[66],O.useEffect(Rt,Nt);let Fn;t[67]!==r||t[68]!==o.calendarName||t[69]!==c||t[70]!==Te?(Fn=()=>{if(o.calendarName!==r.name){const st=o.calendarName.trim();c||Te({...r,name:st})}},t[67]=r,t[68]=o.calendarName,t[69]=c,t[70]=Te,t[71]=Fn):Fn=t[71];const pn=Fn;let hn;t[72]!==pn?(hn=()=>{const st=setTimeout(()=>{pn()},500);return()=>{clearTimeout(st)}},t[72]=pn,t[73]=hn):hn=t[73];let On;t[74]!==o.calendarName||t[75]!==pn?(On=[o.calendarName,pn],t[74]=o.calendarName,t[75]=pn,t[76]=On):On=t[76],O.useEffect(hn,On);let Vt;t[77]!==Y?(Vt=(st,it)=>{const ht=it?"allDayNotifications":"simpleNotifications";Y.removeListItem(ht,st)},t[77]=Y,t[78]=Vt):Vt=t[78];const an=Vt;let xn;t[79]===Symbol.for("react.memo_cache_sentinel")?(xn=st=>{E(!0),a(it=>({...it,calendarName:st.target.value}))},t[79]=xn):xn=t[79];const Ts=xn;let Hr;t[80]!==r||t[81]!==Te?(Hr=st=>{a(it=>({...it,calendarColor:st})),Te({...r,color:st})},t[80]=r,t[81]=Te,t[82]=Hr):Hr=t[82];const As=Hr;let Rr;if(t[83]!==r.url||t[84]!==$){const st=async()=>{I.current&&(navigator.clipboard&&(navigator.clipboard.writeText(r.url),$n.showSuccess($("feedBacks.copied"))),I.current.focus(),I.current.select())};Rr=()=>g.jsx(gn,{onClick:st,children:g.jsx(r4e,{size:48,strokeWidth:2,color:"#5F6368"})}),t[83]=r.url,t[84]=$,t[85]=Rr}else Rr=t[85];const ft=Rr;if(m==="fulfilled"&&!pe){let st;t[86]!==$?(st=$("settings.calendarSettings.calendarInputLabel"),t[86]=$,t[87]=st):st=t[87];let it;t[88]!==st?(it=g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:st}),t[88]=st,t[89]=it):it=t[89];const ht=!!c.length;let kt;t[90]!==$?(kt=$("placeholders.myCalendar"),t[90]=$,t[91]=kt):kt=t[91];let Hn;t[92]!==o.calendarName||t[93]!==ht||t[94]!==kt?(Hn=g.jsx(Xy,{size:Ja,error:ht,placeholder:kt,value:o.calendarName,onChange:Ts,maw:500}),t[92]=o.calendarName,t[93]=ht,t[94]=kt,t[95]=Hn):Hn=t[95];let qr;t[96]!==c?(qr=!!c.length&&g.jsx(He,{c:"red",size:"xs",children:c}),t[96]=c,t[97]=qr):qr=t[97];let Gn;t[98]!==it||t[99]!==Hn||t[100]!==qr?(Gn=g.jsxs(le,{my:10,children:[it,Hn,qr]}),t[98]=it,t[99]=Hn,t[100]=qr,t[101]=Gn):Gn=t[101];let Bt;t[102]!==$?(Bt=$("settings.calendarSettings.calendarOwnerLabel"),t[102]=$,t[103]=Bt):Bt=t[103];let Vn;t[104]!==Bt?(Vn=g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:Bt}),t[104]=Bt,t[105]=Vn):Vn=t[105];let Wt;t[106]!==D?(Wt=g.jsx(X_,{user:D}),t[106]=D,t[107]=Wt):Wt=t[107];const Kn=D==null?void 0:D.Name;let Nr;t[108]!==Kn?(Nr=g.jsx(He,{fz:"sm",fw:400,ml:"sm",children:Kn}),t[108]=Kn,t[109]=Nr):Nr=t[109];let Ci;t[110]!==Wt||t[111]!==Nr?(Ci=g.jsxs(vt,{align:"center",children:[Wt,Nr]}),t[110]=Wt,t[111]=Nr,t[112]=Ci):Ci=t[112];let el;t[113]!==Vn||t[114]!==Ci?(el=g.jsxs(le,{my:10,children:[Vn,Ci]}),t[113]=Vn,t[114]=Ci,t[115]=el):el=t[115];let Bi;t[116]!==$?(Bi=$("settings.calendarSettings.calendarColorLabel"),t[116]=$,t[117]=Bi):Bi=t[117];let ho;t[118]!==Bi?(ho=g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:Bi}),t[118]=Bi,t[119]=ho):ho=t[119];let ri;t[120]!==o.calendarColor||t[121]!==As?(ri=g.jsx(le,{w:220,children:g.jsx(Kz,{color:o.calendarColor,handleChange:As,disabled:!1})}),t[120]=o.calendarColor,t[121]=As,t[122]=ri):ri=t[122];let tl;t[123]!==ho||t[124]!==ri?(tl=g.jsxs(le,{my:10,children:[ho,ri]}),t[123]=ho,t[124]=ri,t[125]=tl):tl=t[125];let mo;t[126]!==r.id||t[127]!==r.ownerId||t[128]!==x||t[129]!==Ae||t[130]!==$?(mo=Ae&&g.jsxs(le,{my:10,children:[g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:$("settings.calendarSettings.accessSettingsLabel")}),!qe.isNil(x)&&g.jsx(RZe,{calendarId:r.id,calendarOwnerId:r.ownerId,calendarSharePref:x})]}),t[126]=r.id,t[127]=r.ownerId,t[128]=x,t[129]=Ae,t[130]=$,t[131]=mo):mo=t[131];let si;t[132]!==$?(si=$("settings.calendarSettings.notifications.title"),t[132]=$,t[133]=si):si=t[133];let Go;t[134]!==si?(Go=g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:si}),t[134]=si,t[135]=Go):Go=t[135];let ii;t[136]!==Y||t[137]!==an||t[138]!==Ue?(ii=g.jsx(LZe,{form:Y,updateCalendarNotes:Ue,onRemove:an}),t[136]=Y,t[137]=an,t[138]=Ue,t[139]=ii):ii=t[139];let Tr;t[140]!==Go||t[141]!==ii?(Tr=g.jsxs(le,{my:10,children:[Go,ii]}),t[140]=Go,t[141]=ii,t[142]=Tr):Tr=t[142];let $l;t[143]!==r.ownerId||t[144]!==r.url||t[145]!==(f==null?void 0:f.Id)||t[146]!==ft?($l=r.ownerId===(f==null?void 0:f.Id)&&g.jsxs(le,{my:10,children:[g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:"CalDav"}),g.jsx(le,{className:"caldav-link",maw:500,children:g.jsx(Xy,{size:Ja,className:"caldav-text",defaultValue:r.url,readOnly:!0,ref:I,rightSection:ft()})})]}),t[143]=r.ownerId,t[144]=r.url,t[145]=f==null?void 0:f.Id,t[146]=ft,t[147]=$l):$l=t[147];let zl;t[148]!==z||t[149]!==X||t[150]!==$?(zl=!z&&g.jsxs(le,{my:10,children:[g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:$("settings.calendarSettings.clearCalendar.label")}),g.jsx(He,{mb:10,size:"sm",fw:400,c:"#3D4044",children:$("settings.calendarSettings.clearCalendar.description")}),g.jsx(le,{children:g.jsx(en,{miw:120,onClick:()=>X("clear"),children:$("buttons.clear")})})]}),t[148]=z,t[149]=X,t[150]=$,t[151]=zl):zl=t[151];let Ei;t[152]!==L||t[153]!==H||t[154]!==X||t[155]!==$?(Ei=!H&&L&&g.jsxs(le,{my:10,children:[g.jsx(He,{mb:10,size:"sm",fw:400,c:"dimmed",children:$("settings.calendarSettings.deleteCalendar.label")}),g.jsx(He,{mb:10,size:"sm",fw:400,c:"#3D4044",children:$("settings.calendarSettings.deleteCalendar.description")}),g.jsx(le,{children:g.jsx(en,{miw:120,onClick:()=>X("delete"),children:$("buttons.delete")})})]}),t[152]=L,t[153]=H,t[154]=X,t[155]=$,t[156]=Ei):Ei=t[156];let Hi;t[157]!==W||t[158]!==ue||t[159]!==oe||t[160]!==A?(Hi=g.jsx(Eh,{opened:A,handleConfirm:oe,handleCancel:ue,data:W}),t[157]=W,t[158]=ue,t[159]=oe,t[160]=A,t[161]=Hi):Hi=t[161];let Gu;return t[162]!==Gn||t[163]!==el||t[164]!==tl||t[165]!==mo||t[166]!==Tr||t[167]!==$l||t[168]!==zl||t[169]!==Ei||t[170]!==Hi?(Gu=g.jsx(fi,{withFullPage:!0,children:g.jsxs(Is,{pb:64,children:[Gn,el,tl,mo,Tr,$l,zl,Ei,Hi]})}),t[162]=Gn,t[163]=el,t[164]=tl,t[165]=mo,t[166]=Tr,t[167]=$l,t[168]=zl,t[169]=Ei,t[170]=Hi,t[171]=Gu):Gu=t[171],Gu}let xt;return t[172]===Symbol.for("react.memo_cache_sentinel")?(xt=g.jsx(vt,{w:"100%",h:"calc(100vh - 8rem)",justify:"center",align:"center",children:g.jsx(zi,{})}),t[172]=xt):xt=t[172],xt};function $Ze(t){return{...t,intervalType:rO(t),allDayInterval:t.allDayInterval?yoe(t.allDayInterval):null}}function zZe(t){if(t instanceof Date){const e=t.getHours(),n=t.getMinutes();return[e,n]}if(typeof t=="string"){const[e,n]=t.split(":").map(Number);return[e||0,n||0]}return[0,0]}function FZe(t,e){const n=t.intervalCount===0,r=e.intervalCount===0;if(n&&!r)return-1;if(!n&&r)return 1;const s=qp(t),i=qp(e);if(s!==i)return s-i;if(t.allDayInterval&&e.allDayInterval){const o=zZe,[a,l]=o(t.allDayInterval),[c,d]=o(e.allDayInterval);return a*60+l-(c*60+d)}return s-i}function BZe(t,e){t.order=e}function HZe(t){return{...t,intervalType:rO(t)}}function qZe(t,e){const n=t.intervalCount===0,r=e.intervalCount===0;if(n&&!r)return-1;if(!n&&r)return 1;const s=qp(t),i=qp(e);return s-i}function UZe(t,e){t.order=e}function VZe(t,e,n){const s=e.allDayNotifications.map($Ze).slice().sort(FZe);s.forEach(BZe);const o=e.simpleNotifications.slice().map(HZe).sort(qZe);o.forEach(UZe);const a=[...s,...o];n({...t,settingsContainer:{...t.settingsContainer,defaultEventNotifications:a}})}function WZe(t){return t.allDayInterval}function YZe(t){return!t.allDayInterval}const GZe=Object.freeze(Object.defineProperty({__proto__:null,checkIntervalTypeEventNotifications:rO,default:PZe},Symbol.toStringTag,{value:"Module"}));Qe.extend(kZe);let gX={end:new Date,start:new Date},vX="thisEvent";const Bde={type:lh.Bell,intervalType:gt.Minute,intervalCount:30,order:-1,source:yl.Owner,notificationTime:null,allDayInterval:null},Hde={type:lh.Bell,intervalType:gt.Day,intervalCount:1,order:-1,source:yl.Owner,notificationTime:null,allDayInterval:"09:00:00"},yX=(t,e)=>{const n={type:Number(t.type),intervalType:Number(t.intervalType),intervalCount:Number(t.intervalCount)};if(e){const r=t.allDayInterval??"",s=Qe(r,["HH:mm:ss","HH:mm"],!0);n.allDayInterval=s.isValid()?s.format("HH:mm")+":00":""}return n},qde=(t,e)=>t.filter((n,r,s)=>{const i=yX(n,e);return r===s.findIndex(o=>qe.isEqual(yX(o,e),i))}),Ude=t=>t?typeof t=="string"?Qe(t,["HH:mm","HH:mm:ss"],!0).isValid():Qe.isDayjs(t)?t.isValid():!1:!1,KZe=t=>{if(!t)return"";if(typeof t=="string"){const[e,n]=t.split(":");return e+":"+n}return Qe.isDayjs(t)&&t.isValid()?t.format("HH:mm"):""},Ett=t=>{var Hr,As,Rr;const{handleCloseCreateEventModal:e,edit:n,calendarsGroup:r,currentEvent:s,calendarList:i,currentAddConfigStatus:o,currentUser:a,currentEventStatus:l,isLoaderData:c,saveType:d,setSaveType:f,timeZones:p,timeZone:m,submitEvent:v,calendarDisplayedDatesRange:y,openedDeletedRecurringActionModal:x}=t,w=ve(sOe),C=O.useRef(!1),E=O.useRef(!1),D=O.useRef(null),T=O.useRef(null),{t:A}=yt(),_=Kt(),R=Fu(),N=Br(),[I,{close:$,open:L}]=Ps(!1),[z,F]=Ps(!1),[q,H]=O.useState("settings"),[B,V]=O.useState(s),[Y,G]=O.useState(js.ThisEvent),[W,Z]=O.useState(!1),[Q,X]=O.useState([]),re=i.find(ft=>ft.id===B.resource.calendarId),[ne]=wRe(),{isMobile:ee,isDesktop:oe}=Yt(),{computedHeight:ce}=k$(T,B),{resource:ue}=B,{contactParticipants:pe}=ue,de=Il(B.resource),me=((Hr=s==null?void 0:s.resource)==null?void 0:Hr.description)||"",{participantInfo:{description:Se}}=B.resource,{id:De}=R,Ae=Gz({initialValues:{notifications:[]},validateInputOnChange:!0,validateInputOnBlur:!0,validate:ft=>{const xt={},st=new Set;for(let it=0;it<ft.notifications.length;it++){const ht=ft.notifications[it],kt={},Hn=B.allDay?KZe(ht.allDayInterval):"",qr=`${ht.type}-${ht.intervalType}-${ht.intervalCount}-${Hn}`;st.add(qr);const Gn=Number(ht.intervalCount),Bt=Number(ht.intervalType),Vn=ht.allDayInterval;let Wt={minute:{min:0,max:40320},hour:{min:0,max:672},day:{min:0,max:28},weeks:{min:0,max:4}};switch(Bt){case gt.Minute:(Gn<Wt.minute.min||Gn>Wt.minute.max)&&(kt.intervalCount=A("fullEventPage.noteForms.minuteError",{min:Wt.minute.min,max:Wt.minute.max}));break;case gt.Hour:(Gn<Wt.hour.min||Gn>Wt.hour.max)&&(kt.intervalCount=A("fullEventPage.noteForms.hourError",{min:Wt.hour.min,max:Wt.hour.max}));break;case gt.Day:(Gn<Wt.day.min||Gn>Wt.day.max)&&(kt.intervalCount=A("fullEventPage.noteForms.dayError",{min:Wt.day.min,max:Wt.day.max}));break;case gt.Weeks:(Gn<Wt.weeks.min||Gn>Wt.weeks.max)&&(kt.intervalCount=A("fullEventPage.noteForms.weekError",{min:Wt.weeks.min,max:Wt.weeks.max}));break}const Kn=ht.allDayInterval;B.resource.isAllDayWithoutTime&&!Ude(Kn)&&(kt.allDayInterval=A("fullEventPage.noteForms.allDayTimeError")),Object.keys(kt).length>0&&(xt.notifications||(xt.notifications=[]),xt.notifications[it]=kt)}return xt}});O.useEffect(()=>{C.current&&Ae.validate()},[Ae.values]),O.useEffect(()=>{var ft,xt,st,it,ht;if((ft=B==null?void 0:B.resource)!=null&&ft.isAllDayWithoutTime){if((st=(xt=B==null?void 0:B.resource)==null?void 0:xt.allDayNotifications)!=null&&st.length){const kt=structuredClone(B.resource.allDayNotifications);Ae.setFieldValue("notifications",kt)}}else if((ht=(it=B==null?void 0:B.resource)==null?void 0:it.simpleNotifications)!=null&&ht.length){const kt=structuredClone(B.resource.simpleNotifications);Ae.setFieldValue("notifications",kt)}},[((As=B==null?void 0:B.resource)==null?void 0:As.allDayNotifications)||((Rr=B==null?void 0:B.resource)==null?void 0:Rr.simpleNotifications)]);const fe=()=>{var xt,st;const ft=((st=(xt=re==null?void 0:re.settingsContainer)==null?void 0:xt.defaultEventNotifications)==null?void 0:st.filter(it=>it.allDayInterval))||[];Ae.setFieldValue("notifications",structuredClone(ft))},Te=()=>{var xt,st;const ft=((st=(xt=re==null?void 0:re.settingsContainer)==null?void 0:xt.defaultEventNotifications)==null?void 0:st.filter(it=>!it.allDayInterval))||[];Ae.setFieldValue("notifications",structuredClone(ft))},Ne=(ft,xt)=>{const st=qe.omit(ft,["id"]);if(st.allDayInterval=st.allDayInterval??"",st.notificationTime=st.notificationTime??"",!xt&&st.notificationTime){const it=new Date(st.notificationTime),ht=String(it.getHours()).padStart(2,"0"),kt=String(it.getMinutes()).padStart(2,"0");st.notificationTime=`${ht}:${kt}`}return st.type=Number(st.type),st.intervalType=Number(st.intervalType),st.intervalCount=Number(st.intervalCount),st},Ue=(ft,xt,st)=>{if(ft.length!==xt.length)return!1;const it=ft.map(kt=>Ne(kt,st)),ht=xt.map(kt=>Ne(kt,st));return qe.isEqual(it,ht)},rt=ft=>ft.map(xt=>{const st={...xt};if(st.notificationTime){const it=new Date(st.notificationTime),ht=String(it.getHours()).padStart(2,"0"),kt=String(it.getMinutes()).padStart(2,"0");st.allDayInterval=`${ht}:${kt}`,st.notificationTime=""}else st.allDayInterval="12:00",st.notificationTime="";return st}),ot=(ft,xt)=>ft.map(st=>{const it={...st};if(it.allDayInterval){const[ht,kt]=it.allDayInterval.split(":"),Hn=Qe(xt).hour(parseInt(ht)).minute(parseInt(kt)).toDate();it.notificationTime=Hn.toISOString(),it.allDayInterval=""}return it});O.useEffect(()=>{if(!n){B.resource.isAllDayWithoutTime?fe():Te(),C.current=!0;return}const ft=B.resource.allDayNotifications||[],xt=B.resource.simpleNotifications||[];B.resource.isAllDayWithoutTime?ft.length>0?Ae.setFieldValue("notifications",structuredClone(ft)):xt.length>0&&Ae.setFieldValue("notifications",structuredClone(rt(xt))):xt.length>0?Ae.setFieldValue("notifications",structuredClone(xt)):ft.length>0&&Ae.setFieldValue("notifications",structuredClone(ot(ft,B.start))),C.current=!0},[B.id]),O.useEffect(()=>{if(!C.current)return;const ft=B.resource.isAllDayWithoutTime,xt=Ae.values.notifications,st=ft?B.resource.allDayNotifications||[]:B.resource.simpleNotifications||[];Ue(xt,st,ft)||(st.length>0?Ae.setFieldValue("notifications",structuredClone(st)):n||(ft?fe():Te()))},[B.resource.isAllDayWithoutTime,n]);const Je=O.useRef(null);O.useEffect(()=>{if(!C.current||!re)return;const ft=Je.current,xt=B.resource.calendarId;if(ft===null){Je.current=xt;return}if(ft===xt){Je.current=xt;return}Je.current=xt;const st=B.resource.isAllDayWithoutTime,it=st?B.resource.allDayNotifications:B.resource.simpleNotifications,ht=!!(it!=null&&it.length);(!n||!ht)&&(st?fe():Te())},[B.resource.calendarId]),O.useEffect(()=>{if(!C.current)return;const ft=B.resource.isAllDayWithoutTime,xt=D.current;if(xt===null){D.current=ft;return}if(xt===ft)return;D.current=ft;const st=B.resource.allDayNotifications||[],it=B.resource.simpleNotifications||[],ht=st.length>0||it.length>0;(!n||!ht)&&(ft?fe():Te())},[B.resource.isAllDayWithoutTime]);const je=w==="fulfilled"&&a,We=(ft,xt)=>{V(typeof ft=="object"?{...ft}:{...B,[ft]:xt})},Le=O.useMemo(()=>s,[s.start,s.resource.documents]),_e=O.useCallback(We,[B]);O.useEffect(()=>{B.resource.saveType===rs.Duplicate&&l===Cn.Fulfilled&&Y!==js.AllEvents&&s.resource.recurring.repeatPeriod!=="never"&&G(js.AllEvents)},[B.resource.saveType,l,Y]),O.useEffect(()=>{Y!==js.AllEvents&&vX!==js.AllEvents&&(gX={start:B.start,end:B.end}),vX=Y},[B.start,B.end,Y]),O.useEffect(()=>{n&&!Object.keys(p).length||Xje({currentEvent:s,currentEventStatus:l,saveType:d,setSaveType:f,currentUser:a,calendarList:i,setEvent:V,timeZoneId:Number(m==null?void 0:m.Id),timeZones:p,edit:n})},[s]),O.useEffect(()=>{n&&s.resource.documents&&s.resource.documents.length>0&&V(ft=>({...ft,resource:{...ft.resource,documents:s.resource.documents}}))},[s.resource.documents,n]),O.useEffect(()=>{if(!E.current){E.current=!0;return}Yje({currentEventStatus:l,modeEditEvents:Y,event:{...B,allDay:s.allDay},dates:gX,handleSetEvent:_e,initialEvent:Le,currentEvent:s})},[Y]);const Be=O.useCallback(ft=>d5e({dispatch:_,currentUser:a,event:ft}),[_,a]),ut=O.useCallback((ft,xt)=>Qje({currentEvent:s,event:B,dispatch:_,eventId:ft,showSuccessMessage:xt}),[B,s,_]),lt=O.useCallback(async(ft,xt)=>Wje({currentUser:a,permissionsModalHandlers:F,updateEventMaterialsPermissions:Be,newEvent:ft,prevEvent:xt}),[a,F,Be]),At=O.useMemo(()=>{if(!n)return!1;const xt=Le.resource.isAllDayWithoutTime?Le.resource.allDayNotifications||[]:Le.resource.simpleNotifications||[],st=Ae.values.notifications||[],it=Bt=>Bt.map(Vn=>qe.omit(Vn,["order","id","Id"])),ht=!qe.isEqual(it(st),it(xt)),kt=["resource.allDayNotifications","resource.simpleNotifications","resource.mainColor"],Hn=qe.omit(B,kt),qr=qe.omit(Le,kt),Gn=!qe.isEqual(Hn,qr);return ht&&!Gn},[B,Le,n,Ae.values.notifications]),jt=()=>{const xt=Ae.values.notifications.slice().map(it=>({...it,intervalType:rO(it)})).slice().sort((it,ht)=>{const kt=it.intervalCount===0,Hn=ht.intervalCount===0;if(kt&&!Hn)return-1;if(!kt&&Hn)return 1;if(B.resource.isAllDayWithoutTime){const Bt=qp(it),Vn=qp(ht);if(Bt!==Vn)return Bt-Vn;if(it.allDayInterval&&ht.allDayInterval){const Wt=Bi=>{if(Bi instanceof Date){const ho=Bi.getHours(),ri=Bi.getMinutes();return[ho,ri]}if(typeof Bi=="string"){const[ho,ri]=Bi.split(":").map(Number);return[ho||0,ri||0]}return[0,0]},[Kn,Nr]=Wt(it.allDayInterval),[Ci,el]=Wt(ht.allDayInterval);return Kn*60+Nr-(Ci*60+el)}}const qr=qp(it),Gn=qp(ht);return qr-Gn});if(xt.forEach((it,ht)=>{it.order=ht}),Ae.validate().hasErrors)return;const st=qde(xt,B.resource.isAllDayWithoutTime);Jje({event:B,checkEventMaterialsPermissions:lt,currentEvent:s,initialEvent:Le,notifications:st,dispatch:_,edit:n,modeEditEvents:Y,updateEventMaterials:ut,calendarsGroup:r,navigate:N,setIsLoaderSave:Z,calendarList:i,timeZones:p})};O.useEffect(()=>{v&&(jt(),_(oie(!1)))},[v]);const Ot=O.useCallback(ft=>V({...B,resource:{...B.resource,documents:ft}}),[B,V]),Pt=O.useRef(!1);O.useEffect(()=>{Pt.current&&(Pt.current=!1,jt())},[B,jt]);const Rt=O.useCallback(ft=>V({...B,resource:{...B.resource,documentsPermissions:ft}}),[B,V]),Nt=O.useCallback(()=>{Z(!1),F.close()},[F]),Fn=ft=>{Pt.current=!0,Rt(ft),Nt()},pn=ft=>{_e({...ft,resource:{...ft.resource}})},hn=ft=>{_e(ft)};O.useEffect(()=>{ee?document.body.style.overflow="":document.body.style.overflow="hidden"},[ee]),O.useEffect(()=>()=>{e(),document.body.style.overflow=""},[]);const On=ft=>{_(sie({status:ft})),ft!=="Canceled"&&N("/")},Vt=pe.length>0?!1:de===mt.Read||de===mt.FreeBusy,an=ft=>{let xt=[],st=!1;const it={},ht=Q.map(Bt=>{var Vn;return it[Number(Bt.contactId)]={name:"",color:Bt.color,accessType:((Vn=r[Bt.id])==null?void 0:Vn.accessType)||mt.Read},(a==null?void 0:a.ContactId)===Bt.contactId&&(st=!0),ft===Bt.contactId?(Bt.isActive?(xt=xt.filter(Wt=>Wt!==Bt.contactId),delete it[Number(Bt.contactId)]):xt=[...xt,Bt.contactId],{...Bt,isActive:!Bt.isActive}):(ft&&Bt.isActive&&Bt.contactId&&(xt=[...xt,Bt.contactId]),!ft&&Bt.isActive&&Bt.contactId&&(xt=[...xt,Bt.contactId]),Bt)});(!Q.length||!st)&&a!=null&&a.ContactId&&(it[a.ContactId]={name:"",color:B.resource.mainColor||"#000000",accessType:r[B.resource.calendarId||0].accessType},xt=[a.ContactId]);const kt=Yg(y),Hn={StartDate:(kt==null?void 0:kt.start)||new Date,EndDate:(kt==null?void 0:kt.end)||new Date},qr={ContactIds:xt,...Hn};(async()=>{_(Vx({body:qr,calendarsGroup:it,events:[],timeZones:p}))})(),X(ht)};O.useEffect(()=>{const ft=C.current;q==="settings"||!ft||an(0)},[y,q]);const xn=()=>{_(Hw({...B,resource:{...B.resource,saveType:rs.Duplicate}}))},Ts=()=>e==null?void 0:e();return g.jsxs(g.Fragment,{children:[c&&De||!ne?g.jsx(iZe,{}):g.jsx(fi,{withFullPage:!0,children:g.jsxs(le,{className:"content-event-full",maw:q==="settings"?1200:"100%",children:[I&&g.jsx(Eoe,{opened:I,close:$,handleSetEvent:_e,event:B,handleSubmit:pn,handleClose:hn}),z&&g.jsx(bce,{onApply:Fn,onClose:Nt,eventResource:B.resource}),g.jsxs(sr,{gutter:ee?void 0:"xl",children:[g.jsxs(sr.Col,{span:{base:12,sm:8},children:[g.jsx(uoe,{handleSetEvent:_e,handleSubmitEvent:jt,hasError:Object.keys(Ae.errors).length>0,event:B,edit:n||!1,full:!0,modeEditEvents:Y,setModeEditEvents:G}),oe&&n&&(s.resource.recurring.repeatPeriod!=="never"||!!s.resource.recurring.recurringId)&&B.resource.saveType!==rs.Duplicate&&g.jsx(Lie,{modeEditEvents:Y,setModeEditEvents:G,disabled:Vt})]}),g.jsxs(sr.Col,{span:{base:12,sm:4},children:[g.jsxs(vt,{align:"center",children:[g.jsx(en,{mr:5,className:"submit-btn",loading:W,disabled:Object.keys(Ae.errors).length>0||de===mt.FreeBusy||de===mt.Read&&!At,onClick:jt,children:A(n?"buttons.save":"buttons.create")}),!ee&&n&&B.resource.saveType!==rs.Duplicate&&g.jsx(Wz,{event:B,handleCreateCopy:xn,handleChangeOwner:Ts,isFullView:!0,size:37})]}),pe.length>0&&!ee&&!B.resource.isCanceled&&je&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"sm"}),g.jsx(wt,{gap:8,children:g.jsx(gT,{event:B,handleSetEvent:_e})}),g.jsx(vn,{h:"sm"}),g.jsx(wt,{children:g.jsx(en,{onClick:L,size:"compact-sm",variant:"default",color:"dark",radius:"xl",children:A(Se?"notesActions.edit":"notesActions.title")})})]})]})]}),!ee&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"lg"}),g.jsx(vn,{h:"lg"})]}),g.jsxs(sr,{gutter:"xl",children:[g.jsx(sr.Col,{span:{base:12,sm:8},children:g.jsx(sZe,{form:Ae,edit:n||!1,handleSetEvent:_e,initialEvent:Le,event:B,currentUserId:(a==null?void 0:a.Id)||1,onDocumentsChange:Ot,onPermissionsChange:Rt,eventDescription:me,tab:q,setCalendarsBusy:X,setTab:H,isMounted:C,isMobile:ee})}),g.jsx(sr.Col,{span:{base:12,sm:4},children:g.jsxs(ts,{defaultValue:"guest",children:[g.jsx(ts.List,{className:ti({"guests-tab-panel-mobile":ee,"inactive-tab":!0}),children:g.jsx(ts.Tab,{value:"guest",children:A("fullEventPage.sections.guests")})}),g.jsx(vn,{h:"lg"}),g.jsx(ts.Panel,{value:"guest",children:g.jsxs("div",{className:"guest-wrapper",ref:T,style:{height:ce},children:[g.jsx(Iie,{currentUserContactId:(a==null?void 0:a.ContactId)||1,currentUserId:(a==null?void 0:a.Id)||1,handleSetEvent:_e,event:B,isShowCheckbox:q==="shared_calendar",calendarsBusy:Q,onChangeCalendarBusy:an}),g.jsx(vn,{h:"md"}),pe.length>0&&(de===mt.Full||B.resource.ownerId===void 0)&&g.jsx(p5e,{handleSetEvent:_e,event:B})]})}),ee&&pe.length>0&&!B.resource.isCanceled&&je&&g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"lg"}),g.jsx(ts.List,{className:ti({"participation-tab-panel-mobile":ee}),children:g.jsx(ts.Tab,{value:"guest",children:A("notesActions.willBe")})}),g.jsx(ts.Panel,{value:"guest",pt:"xs",children:g.jsxs(g.Fragment,{children:[g.jsx(vn,{h:"sm"}),g.jsx(wt,{gap:8,children:g.jsx(gT,{event:B,handleSetEvent:_e})}),g.jsx(vn,{h:"sm"}),g.jsx(wt,{children:g.jsx(en,{onClick:L,size:"compact-md",variant:"default",color:"dark",radius:"xl",children:A(Se?"notesActions.edit":"notesActions.title")})}),g.jsx(vn,{h:"lg"})]})})]})]})})]})]})}),x&&g.jsx(sk,{status:"Deleted",event:s,close:On}),g.jsx(j1,{visible:o==="pending",overlayProps:{blur:2}})]})},bI=t=>{let e={};return{calendars:t.map(n=>{var r,s;return e[n.Id]={name:n.Name||"",color:n.Color||"#FAA2C1",accessType:n.AccessType},{name:n.Name||"",color:n.Color||"#FAA2C1",id:n.Id,isActive:!!n.Status,calendarType:n.Type,ownerId:n.OwnerId,accessType:n.AccessType,url:n.Url,viewPeriod:n.ViewPeriod,isHiddenFromList:!!n.IsHiddenInList,settingsContainer:{defaultEventNotifications:((s=(r=n==null?void 0:n.SettingsContainer)==null?void 0:r.DefaultEventNotifications)==null?void 0:s.map(i=>({id:i.Id,type:i.Type,intervalType:i.IntervalType,intervalCount:i.IntervalCount,order:i.Order,source:i.Source,allDayInterval:i.AllDayInterval,notificationTime:i.NotificationTime})))||[]}}}),calendarsGroupById:e}},ZZe=t=>{const{name:e,color:n,id:r,calendarType:s,isActive:i,settingsContainer:o}=t,a=qde((o==null?void 0:o.defaultEventNotifications)||[],!0);let l={Name:e,ShortName:e,ImageId:null,Status:i?1:0,Color:n||"#FAA2C1",Type:s,SettingsContainer:{DefaultEventNotifications:a.map(c=>({Id:void 0,Type:c.type,Order:c.order,Source:c.source,IntervalType:c.intervalType,IntervalCount:c.intervalCount,AllDayInterval:c.allDayInterval,NotificationTime:c.notificationTime}))}};return r&&(l={...l,Id:r}),l},JZe=t=>{const e=t>=0?"+":"-",n=Math.abs(t),r=Math.floor(n/60),s=n%60;return`${e}${String(r).padStart(2,"0")}:${String(s).padStart(2,"0")}`},XZe=t=>{let e={},n=0;return t.forEach((r,s)=>{const o=nt.now().setZone(r.TzIdName).offset,a=JZe(o);e[r.Id||s]={value:String(r.Id||s),label:`(UTC${a}) ${ct(`timezones.${r.TzIdName}`)}`,utc:a,utcOffsetMinutes:o,tzName:r.TzIdName}}),{timeZones:e,browserUtcId:n}},xI=t=>{let e={};return t.forEach(n=>{e[n.Id]=n.Color}),e},Cx=t=>t.filter(e=>e.isActive&&!e.isHiddenFromList).map(e=>(e==null?void 0:e.id)||0),Ex=t=>t.map(e=>(e==null?void 0:e.id)||0),jg=sn("calendar/getCalendarsThunk",async()=>(await SOe()).data),Ck=sn("calendar/getTimeZonesThunk",async t=>{const e=await TOe();return{timeZone:t,data:e.data}}),Ek=sn("calendar/getCategoriesThunk",async()=>(await EOe()).data),QZe=sn("user/postUserCategoryThunk",async t=>{const e=await AOe(t.data);return $n.showSuccess(t.isEditMode?ct("successMessages.categoryEdited"):ct("successMessages.categoryCreated")),{data:e.data,isEditMode:t.isEditMode}}),eJe=sn("user/deleteUserCategoryThunk",async t=>{const e=await _Oe(t);return $n.showSuccess(ct("successMessages.categoryDeleted")),e.data}),Zz=sn("calendar/deleteCalendarThunk",async t=>{const e=await DOe(t);return $n.showSuccess(ct("successMessages.calendarDeleted")),e.data}),pC=sn("calendar/addCalendarThunk",async t=>{const e=ZZe(t),n=await MOe(e);return!(t!=null&&t.id)&&$n.showSuccess(ct("successMessages.calendarAdded")),n.data}),Vde=sn("calendar/showOnlyThisCalendarThunk",async t=>(await kOe({ids:t.ids,Status:0},t.activeId)).data),oS=sn("calendar/getConnectedCalendarsThunk",async()=>(await wOe()).data),bX=sn("calendar/updateCalendarVisibilityThunk",async(t,{dispatch:e})=>(await COe(t.calendarId,t.isHiddenInList),$n.showSuccess(t.isHiddenInList?ct("successMessages.calendarHidden"):ct("successMessages.calendarRestored")),await Promise.all([e(jg()),e(oS())]),t)),wA=sn("calendar/setGlobalCalendarViewModeThunk",async t=>(await OOe(t)).data),xX={globalDate:new Date,calendarsStatus:"initial",timeZonesStatus:"initial",calendars:[],calendarsIds:[],allCalendarsIds:[],calendarsGroupById:{},categories:[],categoriesColors:{},timeZones:{},browserUtcId:0,toolBarRef:null,isSearchActive:!1,globalSettingsCalendar:{},viewMode:uC,categoriesStatus:"initial",calendarDisplayedDatesRange:null,deviceSize:Wp.desktop,isSettingsMenuOpen:!1,isShowMobileCalendar:!0,isBusyMode:!1,showFooter:!1,agendaEndDate:null,connectedCalendars:[],connectedCalendarsStatus:"initial"},Wde=$1({name:"calendar",initialState:xX,reducers:{setIsSettingsMenuOpen:(t,e)=>{t.isSettingsMenuOpen=e.payload},setGlobalDate:(t,e)=>{t.globalDate=e.payload},resetCalendarsSlice:()=>xX,setToolBarRef:(t,e)=>{t.toolBarRef=e.payload},setIsSearchActive:(t,e)=>{t.isSearchActive=e.payload},setGlobalSettingsCalendar:(t,e)=>{t.globalSettingsCalendar={...t.globalSettingsCalendar,...e.payload}},setCalendarDisplayedRange:(t,e)=>{t.calendarDisplayedDatesRange=e.payload},setDeviceSize:(t,e)=>{t.deviceSize=e.payload},setShowMobileCalendar:(t,e)=>{t.isShowMobileCalendar=e.payload},setBusyMode:(t,e)=>{t.isBusyMode=e.payload},setShowFooter:(t,e)=>{t.showFooter=e.payload},setAgendaEndDate:(t,e)=>{t.agendaEndDate=e.payload}},extraReducers:t=>t.addCase(jg.pending,(e,n)=>{e.calendarsStatus==="initial"&&(e.calendarsStatus="pending")}).addCase(jg.fulfilled,(e,n)=>{e.calendarsStatus="fulfilled";const{calendars:r,calendarsGroupById:s}=bI(n.payload);r.length>0&&(e.viewMode=r[0].viewPeriod),e.calendars=r,e.calendarsIds=Cx(r),e.allCalendarsIds=Ex(r),e.calendarsGroupById=s}).addCase(jg.rejected,e=>{e.calendarsStatus="rejected"}).addCase(Ck.pending,e=>{e.timeZonesStatus="pending"}).addCase(Ck.fulfilled,(e,n)=>{const{data:r}=n.payload,{timeZones:s,browserUtcId:i}=XZe(r);e.browserUtcId=i,e.timeZones=s,e.timeZonesStatus="fulfilled"}).addCase(Ck.rejected,e=>{e.timeZonesStatus="rejected"}).addCase(Ek.pending,e=>{e.categoriesStatus="pending"}).addCase(Ek.fulfilled,(e,n)=>{e.categories=n.payload,e.categoriesStatus="fulfilled";let r=xI(n.payload);e.categoriesColors=r}).addCase(Ek.rejected,e=>{e.categoriesStatus="rejected"}).addCase(pC.fulfilled,(e,n)=>{var a,l,c,d,f,p;const r={...n.payload,OwnerId:((l=(a=n.meta)==null?void 0:a.arg)==null?void 0:l.ownerId)||0,AccessType:((d=(c=n.meta)==null?void 0:c.arg)==null?void 0:d.accessType)||0},{calendars:s,calendarsGroupById:i}=bI([r]);if(e.calendarsGroupById={...e.calendarsGroupById,...i},(p=(f=n.meta)==null?void 0:f.arg)!=null&&p.id){const{id:m}=n.meta.arg,v=e.calendars.findIndex(y=>y.id===m);v>-1&&(e.calendars.splice(v,1,s[0]),e.calendarsIds=Cx(e.calendars),e.allCalendarsIds=Ex(e.calendars));return}const o=[...e.calendars,...s];e.calendars=o,e.calendarsIds=Cx(o),e.allCalendarsIds=Ex(o)}).addCase(Zz.fulfilled,(e,n)=>{const r=n.meta.arg,s=e.calendars.findIndex(i=>i.id===r);s>-1&&(e.calendars.splice(s,1),e.calendarsIds=Cx(e.calendars),e.allCalendarsIds=Ex(e.calendars))}).addCase(Vde.fulfilled,(e,n)=>{const r=n.meta.arg.ids;e.calendars=e.calendars.map(s=>s.id&&r.includes(s.id)?{...s,isActive:!1}:{...s,isActive:!0}),e.calendarsIds=Cx(e.calendars),e.allCalendarsIds=Ex(e.calendars)}).addCase(QZe.fulfilled,(e,n)=>{if(n.payload.isEditMode){const s=e.categories.findIndex(i=>i.Id===n.payload.data.Id);s>-1&&(e.categories.splice(s,1,n.payload.data),e.categoriesColors=xI(e.categories));return}let r=[...e.categories,n.payload.data];e.categories=r,e.categoriesColors=xI(r)}).addCase(eJe.fulfilled,(e,n)=>{e.categories=e.categories.filter(r=>r.Id!==n.meta.arg)}).addCase(wA.fulfilled,(e,n)=>{e.viewMode=n.meta.arg}).addCase(oS.pending,e=>{e.connectedCalendarsStatus==="initial"&&(e.connectedCalendarsStatus="pending")}).addCase(oS.fulfilled,(e,n)=>{e.connectedCalendarsStatus="fulfilled";const{calendars:r}=bI(n.payload);e.connectedCalendars=r}).addCase(oS.rejected,e=>{e.connectedCalendarsStatus="rejected"})}),tJe=Wde.reducer,{setGlobalDate:gc,resetCalendarsSlice:nJe,setToolBarRef:rJe,setIsSearchActive:CA,setGlobalSettingsCalendar:sJe,setCalendarDisplayedRange:Yde,setDeviceSize:SI,setIsSettingsMenuOpen:Jz,setShowMobileCalendar:iJe,setBusyMode:SX,setShowFooter:IP,setAgendaEndDate:oJe}=Wde.actions,Pl=t=>t.calendar.globalDate,df=t=>t.calendar.calendars,Yo=t=>t.calendar.calendarsGroupById,hC=t=>t.calendar.calendarsIds,Gde=t=>t.calendar.categories,wv=t=>t.calendar.categoriesColors,Xz=t=>t.calendar.calendarsStatus,Cv=t=>t.calendar.timeZones,aJe=t=>t.calendar.browserUtcId,Mtt=t=>t.calendar.timeZonesStatus,lJe=t=>t.calendar.toolBarRef,Kde=t=>t.calendar.isSearchActive,Ev=t=>t.calendar.globalSettingsCalendar,Lh=t=>t.calendar.viewMode,cJe=t=>t.calendar.allCalendarsIds,Dtt=t=>t.calendar.categoriesStatus,sO=t=>t.calendar.calendarDisplayedDatesRange,uJe=t=>t.calendar.deviceSize,dJe=t=>t.calendar.isSettingsMenuOpen,Zde=t=>t.calendar.isShowMobileCalendar,fJe=t=>t.calendar.isBusyMode,pJe=t=>t.calendar.showFooter,hJe=t=>t.calendar.agendaEndDate,mJe=t=>t.calendar.connectedCalendars,gJe=tre({user:rOe,calendar:tJe,events:sRe,documentsUpload:n5e,eventList:Fje,busy:bOe,...jEe}),vJe=dke({reducer:gJe,middleware:t=>t({serializableCheck:!1}).concat(...IEe)}),Kt=()=>MA(),ve=nh,yJe=()=>{const t=Ve.c(2),e=ve(oh);let n;return t[0]!==e.UserId?(n=e.UserId>0?g.jsx(tQ,{to:"/"}):g.jsx(nQ,{}),t[0]=e.UserId,t[1]=n):n=t[1],n},bJe=t=>{const e=Ve.c(63),{newTimezone:n,isOpen:r,onClose:s,askTimezoneChange:i}=t,{t:o}=yt(),[a,l]=O.useState(!1),c=Br(),d=Kt(),f=ve(oh);let p;e[0]!==c||e[1]!==s?(p=()=>{s(),c("/settings/general")},e[0]=c,e[1]=s,e[2]=p):p=e[2];const m=p;let v,y;e[3]!==i||e[4]!==d||e[5]!==a||e[6]!==n||e[7]!==s||e[8]!==f?(v=()=>{var Z,Q;if(!n){s();return}const W=Number(n.value);d(Yse({data:{Id:Number(W),SecondEnabled:!!((Z=f.Timezone)!=null&&Z.SecondEnabled),SecondId:((Q=f.Timezone)==null?void 0:Q.SecondId)||0}})),d(Kse({...f,Timezone:{...f.Timezone,Id:Number(W)}})),y(),s()},y=()=>{i&&a&&d(XD({data:{AskTimezoneChange:!a}}))},e[3]=i,e[4]=d,e[5]=a,e[6]=n,e[7]=s,e[8]=f,e[9]=v,e[10]=y):(v=e[9],y=e[10]);let x;e[11]!==y||e[12]!==s?(x=()=>{y(),s()},e[11]=y,e[12]=s,e[13]=x):x=e[13];const w=x;let C;e[14]!==o?(C=o("timezoneModal.title"),e[14]=o,e[15]=C):C=e[15];let E;e[16]!==o?(E=o("timezoneModal.changeTo"),e[16]=o,e[17]=E):E=e[17];const D=`timezones.${n==null?void 0:n.tzName}`;let T;e[18]!==o||e[19]!==D?(T=o(D),e[18]=o,e[19]=D,e[20]=T):T=e[20];let A;e[21]!==E||e[22]!==T?(A=g.jsxs(He,{children:[E," ",T,"?"]}),e[21]=E,e[22]=T,e[23]=A):A=e[23];let _;e[24]!==o?(_=o("timezoneModal.dontAskAgain"),e[24]=o,e[25]=_):_=e[25];let R;e[26]===Symbol.for("react.memo_cache_sentinel")?(R={label:{fontSize:14}},e[26]=R):R=e[26];let N;e[27]!==a?(N=()=>l(!a),e[27]=a,e[28]=N):N=e[28];let I;e[29]!==a||e[30]!==_||e[31]!==N?(I=g.jsx(nf,{mt:10,label:_,styles:R,checked:a,onChange:N}),e[29]=a,e[30]=_,e[31]=N,e[32]=I):I=e[32];let $;e[33]!==o?($=o("timezoneModal.settings"),e[33]=o,e[34]=$):$=e[34];let L;e[35]!==m||e[36]!==$?(L=g.jsx(en,{onClick:m,variant:"subtle",children:$}),e[35]=m,e[36]=$,e[37]=L):L=e[37];let z;e[38]!==o?(z=o("timezoneModal.no"),e[38]=o,e[39]=z):z=e[39];let F;e[40]!==w||e[41]!==z?(F=g.jsx(en,{onClick:w,mr:10,w:70,variant:"outline",children:z}),e[40]=w,e[41]=z,e[42]=F):F=e[42];let q;e[43]!==o?(q=o("timezoneModal.yes"),e[43]=o,e[44]=q):q=e[44];let H;e[45]!==v||e[46]!==q?(H=g.jsx(en,{onClick:v,w:70,children:q}),e[45]=v,e[46]=q,e[47]=H):H=e[47];let B;e[48]!==F||e[49]!==H?(B=g.jsxs(le,{children:[F,H]}),e[48]=F,e[49]=H,e[50]=B):B=e[50];let V;e[51]!==L||e[52]!==B?(V=g.jsxs(wt,{mt:20,justify:"space-between",children:[L,B]}),e[51]=L,e[52]=B,e[53]=V):V=e[53];let Y;e[54]!==I||e[55]!==V||e[56]!==A?(Y=g.jsxs(le,{children:[A,I,V]}),e[54]=I,e[55]=V,e[56]=A,e[57]=Y):Y=e[57];let G;return e[58]!==r||e[59]!==s||e[60]!==Y||e[61]!==C?(G=g.jsx(ks,{title:C,radius:8,opened:r,onClose:s,withCloseButton:!1,children:Y}),e[58]=r,e[59]=s,e[60]=Y,e[61]=C,e[62]=G):G=e[62],G},xJe=()=>{const t=Ve.c(8),{width:e,height:n}=YP(),r=Kt();let s;t[0]!==r||t[1]!==e?(s=()=>{e>1200?r(SI(Wp.desktop)):e<=1200&&e>=769?r(SI(Wp.tablet)):r(SI(Wp.mobile))},t[0]=r,t[1]=e,t[2]=s):s=t[2];let i;t[3]!==e?(i=[e],t[3]=e,t[4]=i):i=t[4],O.useEffect(s,i);let o;return t[5]!==n||t[6]!==e?(o={width:e,height:n},t[5]=n,t[6]=e,t[7]=o):o=t[7],o};var Mk={exports:{}},SJe=Mk.exports,wX;function wJe(){return wX||(wX=1,(function(t,e){(function(n,r){t.exports=r(Pie())})(SJe,(function(n){function r(v){return v&&typeof v=="object"&&"default"in v?v:{default:v}}var s=r(n),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),o="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),a="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),l="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(v,y,x){var w,C;return x==="m"?y?"минута":"минуту":v+" "+(w=+v,C={mm:y?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[x].split("_"),w%10==1&&w%100!=11?C[0]:w%10>=2&&w%10<=4&&(w%100<10||w%100>=20)?C[1]:C[2])}var f=function(v,y){return c.test(y)?i[v.month()]:o[v.month()]};f.s=o,f.f=i;var p=function(v,y){return c.test(y)?a[v.month()]:l[v.month()]};p.s=l,p.f=a;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:f,monthsShort:p,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:d,mm:d,h:"час",hh:d,d:"день",dd:d,M:"месяц",MM:d,y:"год",yy:d},ordinal:function(v){return v},meridiem:function(v){return v<4?"ночи":v<12?"утра":v<17?"дня":"вечера"}};return s.default.locale(m,null,!0),m}))})(Mk)),Mk.exports}wJe();const CJe=(t,e)=>{const n=Ve.c(3),r=t[(e==null?void 0:e.Id)||0];let s,i;n[0]!==r?(s=()=>{r&&(ws.defaultZone=r==null?void 0:r.tzName)},i=[r],n[0]=r,n[1]=s,n[2]=i):(s=n[1],i=n[2]),O.useEffect(s,i)};var da=(t=>(t[t.Settings=0]="Settings",t[t.Event=1]="Event",t[t.Home=2]="Home",t))(da||{});const EJe=()=>{switch(yh().pathname.split("/")[1]){case"settings":return da.Settings;case"event":return da.Event;default:return da.Home}},iO={body:{height:"100%",padding:0}},gh="8px",MJe={content:{borderTopRightRadius:gh,borderTopLeftRadius:gh},...iO},DJe={content:{borderTopRightRadius:gh,borderBottomRightRadius:gh},...iO},kJe={content:{borderTopLeftRadius:gh,borderBottomLeftRadius:gh},...iO},TJe={content:{borderBottomRightRadius:gh,borderBottomLeftRadius:gh},...iO},AJe={left:DJe,right:kJe,bottom:MJe,top:TJe},Qz=t=>{const e=Ve.c(11);let n,r,s;e[0]!==t?({children:n,position:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const i=s===void 0?"left":s,o=AJe[i];let a;e[4]!==n?(a=g.jsx(Qs,{p:0,h:"100%",children:n}),e[4]=n,e[5]=a):a=e[5];let l;return e[6]!==i||e[7]!==r||e[8]!==o||e[9]!==a?(l=g.jsx(jl,{styles:o,position:i,...r,children:a}),e[6]=i,e[7]=r,e[8]=o,e[9]=a,e[10]=l):l=e[10],l},eF=(t,e)=>{const n=Ve.c(10);let r,s;n[0]!==t||n[1]!==(e==null?void 0:e.Id)?(r=[],s=[],t.forEach(c=>{c.ownerId===(e==null?void 0:e.Id)?r=[...r,c]:s=[...s,c]}),n[0]=t,n[1]=e==null?void 0:e.Id,n[2]=r,n[3]=s):(r=n[2],s=n[3]);let i;n[4]!==r||n[5]!==s?(i={myCalendars:r,otherCalendars:s},n[4]=r,n[5]=s,n[6]=i):i=n[6];const{myCalendars:o,otherCalendars:a}=i;let l;return n[7]!==o||n[8]!==a?(l={myCalendars:o,otherCalendars:a},n[7]=o,n[8]=a,n[9]=l):l=n[9],l},_Je=t=>{const e=Ve.c(3),[n,r]=O.useState(!1);let s;return e[0]!==n||e[1]!==t?(s=i=>{n||(r(!0),t(i))},e[0]=n,e[1]=t,e[2]=s):s=e[2],s},OJe=t=>{const e=Ve.c(47),{close:n,initialValues:r,addCalendar:s,isLoadingCreate:i}=t,{t:o}=yt();let a;e[0]!==r?(a={...r,isSubmit:!1},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==o?(l=CZe({min:2,max:50},o("validations.calendarName")),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==l?(c={name:l},e[4]=l,e[5]=c):c=e[5];let d;e[6]!==a||e[7]!==c?(d={initialValues:a,validateInputOnChange:!0,validate:c},e[6]=a,e[7]=c,e[8]=d):d=e[8];const f=Gz(d);let p;e[9]!==s?(p=$=>{s($)},e[9]=s,e[10]=p):p=e[10];const m=_Je(p);let v;if(e[11]!==f||e[12]!==m){let $;e[14]!==m?($=(L,z)=>{z==null||z.preventDefault(),m(L)},e[14]=m,e[15]=$):$=e[15],v=f.onSubmit($),e[11]=f,e[12]=m,e[13]=v}else v=e[13];let y;e[16]!==f?(y=f.getInputProps("name"),e[16]=f,e[17]=y):y=e[17];let x;e[18]!==y?(x=g.jsx(Xy,{size:Ja,...y}),e[18]=y,e[19]=x):x=e[19];let w;e[20]!==f?(w=f.getInputProps("color"),e[20]=f,e[21]=w):w=e[21];let C;e[22]!==f?(C=$=>{f.setFieldValue("color",$)},e[22]=f,e[23]=C):C=e[23];let E;e[24]!==C||e[25]!==w.value?(E=g.jsx(le,{w:220,mt:20,mb:30,children:g.jsx(Kz,{disabled:!1,color:w.value,handleChange:C})}),e[24]=C,e[25]=w.value,e[26]=E):E=e[26];let D;e[27]!==o?(D=o("buttons.cancel"),e[27]=o,e[28]=D):D=e[28];let T;e[29]!==n||e[30]!==D?(T=g.jsx(en,{variant:"outline",onClick:n,children:D}),e[29]=n,e[30]=D,e[31]=T):T=e[31];let A;e[32]!==o?(A=o("buttons.create"),e[32]=o,e[33]=A):A=e[33];let _;e[34]!==i||e[35]!==A?(_=g.jsx(en,{loading:i,type:"submit",children:A}),e[34]=i,e[35]=A,e[36]=_):_=e[36];let R;e[37]!==T||e[38]!==_?(R=g.jsxs(wt,{gap:10,children:[T,_]}),e[37]=T,e[38]=_,e[39]=R):R=e[39];let N;e[40]!==E||e[41]!==R||e[42]!==x?(N=g.jsxs(le,{w:220,children:[x,E,R]}),e[40]=E,e[41]=R,e[42]=x,e[43]=N):N=e[43];let I;return e[44]!==N||e[45]!==v?(I=g.jsx(g.Fragment,{children:g.jsx("form",{onSubmit:v,children:N})}),e[44]=N,e[45]=v,e[46]=I):I=e[46],I},Jde=()=>{const t=Ve.c(7),e=Kt();let n;t[0]!==e?(n=a=>{e(bX({calendarId:a,isHiddenInList:!0}))},t[0]=e,t[1]=n):n=t[1];const r=n;let s;t[2]!==e?(s=a=>{e(bX({calendarId:a,isHiddenInList:!1}))},t[2]=e,t[3]=s):s=t[3];const i=s;let o;return t[4]!==r||t[5]!==i?(o={hideCalendar:r,unhideCalendar:i},t[4]=r,t[5]=i,t[6]=o):o=t[6],o},RJe=O.memo(t=>{const e=Ve.c(12),{name:n,onClick:r,disabled:s}=t,o=!(n.length>25),a=s?"dimmed":"";let l;e[0]!==s?(l=ti({"not-allowed-element":s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={cursor:"pointer"},e[2]=c):c=e[2];let d;e[3]!==n||e[4]!==r||e[5]!==a||e[6]!==l?(d=g.jsx(He,{c:a,className:l,size:"sm",ml:10,onClick:r,truncate:!0,style:c,children:n}),e[3]=n,e[4]=r,e[5]=a,e[6]=l,e[7]=d):d=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==d?(f=g.jsx(ss,{disabled:o,withinPortal:!0,label:n,openDelay:500,children:d}),e[8]=n,e[9]=o,e[10]=d,e[11]=f):f=e[11],f}),NJe=({data:t,isMobile:e,openConfirmClear:n,openConfirmDelete:r})=>{const s=Br(),[i,o]=O.useState(!1),a=Kt(),{name:l,color:c,id:d,calendarType:f,isActive:p,accessType:m}=t,{t:v}=yt(),y=ve(fv),x=ve(df),w=ve(kr),{myCalendars:C,otherCalendars:E}=eF(x,w),{hideCalendar:D}=Jde(),T=m===mt.Full,A=m===mt.Read||m===mt.FreeBusy,_=x1[f]==="Main"||x1[f]==="UserMain";O.useEffect(()=>{o(p)},[p]);const R=H=>{a(pC(H))},N=(H,B)=>{const V=[];C.map(Y=>Y.id!==H&&Y.id&&V.push(Y.id)),E.map(Y=>Y.id!==H&&Y.id&&V.push(Y.id)),a(Vde({ids:V,activeId:H}))},I=O.useCallback(()=>{qe.isNil(d)||D(d)},[d,D]),$=O.useCallback(()=>{y||(o(!i),R({...t,isActive:!i}))},[i,y,t]),L=H=>H.preventDefault(),z=()=>{s(`/settings/${d}`,{state:{calendar:t}}),a(IP(!1))},F=O.useCallback(()=>{qe.isNil(t.id)||n(t.id)},[t.id]),q=O.useCallback(()=>{qe.isNil(t.id)||r(t.id)},[t.id]);return g.jsx(Fi.Item,{className:"item-with-custom-checkbox",style:{"--item-color":c},children:g.jsxs(vt,{className:"checkbox-group",justify:"space-between",align:"center",children:[g.jsx(nf,{checked:i,onChange:$,color:c,disabled:y}),g.jsx(RJe,{onClick:$,name:l,disabled:y}),e?g.jsx(gn,{w:"100%",onClickCapture:L,onClick:z,variant:"transparent",children:g.jsx(O$,{width:26,size:"1em"})}):g.jsxs(Gt,{position:"right",shadow:"md",width:220,children:[g.jsx(Gt.Target,{children:g.jsx(gn,{variant:"transparent",color:"gray",children:g.jsx(bie,{size:"1em"})})}),g.jsxs(Gt.Dropdown,{onClickCapture:L,children:[g.jsx(Gt.Item,{onClick:H=>N(d||1),disabled:y,children:v("calendarOptions.showOnlyThis")}),g.jsx(Gt.Item,{onClick:I,disabled:y,children:v("calendarOptions.hideFromList")}),g.jsx(Gt.Item,{onClick:H=>s(`/settings/${d}`,{state:{calendar:t}}),children:v("calendarOptions.settings")}),!A&&g.jsx(Gt.Item,{onClick:F,children:v("calendarOptions.clear")}),!_&&T&&g.jsx(Gt.Item,{onClick:q,children:v("calendarOptions.delete")}),g.jsxs(g.Fragment,{children:[g.jsx(Bo,{my:"sm"}),g.jsx(le,{mx:5,mb:10,children:g.jsx(Kz,{color:c,disabled:!1,handleChange:H=>R({...t,color:H})})})]})]})]})]})})},jJe=t=>{const e=Ve.c(17);let n,r,s,i,o;e[0]!==t?({setCoord:o,open:s,handleChangeCalendar:n,isMyCalendars:r,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=i,e[5]=o):(n=e[1],r=e[2],s=e[3],i=e[4],o=e[5]);const a=ve(kr);let l;e[6]!==i?(l=g.jsx(Pi.Control,{...i}),e[6]=i,e[7]=l):l=e[7];let c;e[8]!==(a==null?void 0:a.Id)||e[9]!==n||e[10]!==r||e[11]!==s||e[12]!==o?(c=r&&g.jsx(gn,{onFocus:IJe,onClick:f=>{f.preventDefault(),s(),n("","",{name:"",color:W3e(Fde),calendarType:1,isActive:!0,ownerId:a==null?void 0:a.Id,url:""}),o({left:f.pageX,top:f.pageY})},size:"lg",children:g.jsx(_4e,{color:"#868E96",size:16})}),e[8]=a==null?void 0:a.Id,e[9]=n,e[10]=r,e[11]=s,e[12]=o,e[13]=c):c=e[13];let d;return e[14]!==l||e[15]!==c?(d=g.jsxs(vt,{justify:"flex-start",align:"center",direction:"row",wrap:"nowrap",children:[l,c]}),e[14]=l,e[15]=c,e[16]=d):d=e[16],d},CX=({title:t,calendarList:e,isMyCalendars:n,isMobile:r})=>{const[s,i]=O.useState({left:0,top:0}),[o,{open:a,close:l}]=Ps(!1),[c,d]=O.useState({name:"",color:"#63E6BE",calendarType:1,isActive:!1,url:""}),f=Kt(),p=ve(kr),[m,v]=Ps(!1),[y,x]=O.useState(!1),w=($,L,z)=>{if(!$&&!L){d({...z});return}d({...c,[$]:L})},C=async $=>{await x(!0),await f(pC($)),await f(jg()),x(!1),l()},[E,D]=O.useState(null),[T,A]=O.useState(null),_=O.useCallback(()=>{v.close(),A(null)},[v.close]),R=O.useCallback(async()=>{qe.isNil(T)||((E==null?void 0:E.actionType)===Ac.CONFIRM_MODAL_CALENDAR_DELETE?(f(Zz(T)),A(null)):(await f(Yx(T)),f(_c())),_())},[E,v.close,f,T]),N=O.useCallback($=>{A($),D(jie),v.open()},[]),I=O.useCallback($=>{A($),D(Nie),v.open()},[]);return g.jsxs(g.Fragment,{children:[g.jsx(Pi,{className:"list-calendars-wrapper",styles:{item:{backgroundColor:"#fff",border:"none"},label:{padding:10},chevron:{marginLeft:6}},chevronPosition:"left",defaultValue:"item-1",px:r?"xs":"",children:g.jsxs(Pi.Item,{value:"item-1",children:[g.jsx(jJe,{handleChangeCalendar:w,open:a,setCoord:i,isMyCalendars:n,children:t}),g.jsx(Pi.Panel,{children:g.jsx(Fi,{className:"list-calendars",spacing:0,size:"xs",center:!0,listStyleType:"none",children:e.map($=>g.jsx(NJe,{handleChangeCalendar:w,setCoord:i,open:a,isMobile:r,data:$,isActive:c.isActive,isMyCalendars:n,user:p,openConfirmClear:N,openConfirmDelete:I},$.id))})})]})}),!qe.isNil(E)&&g.jsx(Eh,{data:E,opened:m,handleConfirm:R,handleCancel:_}),g.jsx(Ou,{withOutFullWidth:!0,isMobile:r,opened:o,close:l,coord:s,children:g.jsx(OJe,{addCalendar:C,initialValues:c,close:l,isLoadingCreate:y})})]})};function IJe(t){t.target.blur()}const Xde=t=>{const e=Ve.c(15),{isMobile:n}=t,r=ve(df),s=ve(kr),{t:i}=yt();let o;e[0]!==r?(o=r.filter(LJe),e[0]=r,e[1]=o):o=e[1];const a=o,{myCalendars:l,otherCalendars:c}=eF(a,s),d=n||!1;let f;e[2]!==i?(f=i("navBar.myCalendars"),e[2]=i,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==d||e[6]!==f?(p=g.jsx(CX,{isMobile:d,isMyCalendars:!0,calendarList:l,title:f}),e[4]=l,e[5]=d,e[6]=f,e[7]=p):p=e[7];let m;e[8]!==n||e[9]!==c||e[10]!==i?(m=c.length!==0&&g.jsx(CX,{isMobile:n||!1,calendarList:c,title:i("navBar.otherCalendars")}),e[8]=n,e[9]=c,e[10]=i,e[11]=m):m=e[11];let v;return e[12]!==p||e[13]!==m?(v=g.jsxs(le,{children:[p,m]}),e[12]=p,e[13]=m,e[14]=v):v=e[14],v};function LJe(t){return!t.isHiddenFromList}const PJe=t=>{const e=Ve.c(18),{opened:n,close:r}=t,{isMobile:s}=Yt(),{t:i}=yt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(le,{p:0,w:32}),e[0]=o):o=e[0];let a;e[1]!==i?(a=i("buttons.calendars"),e[1]=i,e[2]=a):a=e[2];let l;e[3]!==a?(l=g.jsx(He,{fw:500,fz:18,children:a}),e[3]=a,e[4]=l):l=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(Tc,{stroke:1.5}),e[5]=c):c=e[5];let d;e[6]!==r?(d=g.jsx(gn,{onClick:r,w:32,p:0,variant:"white",color:"gray","aria-label":"Settings",children:c}),e[6]=r,e[7]=d):d=e[7];let f;e[8]!==l||e[9]!==d?(f=g.jsxs(wt,{justify:"space-between",p:"sm",children:[o,l,d]}),e[8]=l,e[9]=d,e[10]=f):f=e[10];let p;e[11]!==s?(p=g.jsx(fi,{children:g.jsx(Xde,{isMobile:s})}),e[11]=s,e[12]=p):p=e[12];let m;return e[13]!==r||e[14]!==n||e[15]!==f||e[16]!==p?(m=g.jsxs(Qz,{opened:n,onClose:r,position:"bottom",withCloseButton:!1,size:"md",children:[f,p]}),e[13]=r,e[14]=n,e[15]=f,e[16]=p,e[17]=m):m=e[17],m},$Je=()=>{const t=Kt(),e=ve(cf),n=ve(Pl),r=ve(fv),s=ve(pJe),{isMobile:i}=Yt(),o=new Date,{t:a}=yt(),l=O.useCallback(()=>{t(gc(o)),t(wu(o))},[o]),c=()=>t(IP(!0)),d=()=>t(IP(!1)),f=O.useCallback(p=>{t($p({opened:!0,event:{...e,start:xr(Lt(n),{hour:10,minute:0}),end:xr(Lt(n),{hour:11,minute:0})},coords:{left:p.clientX,top:p.clientY}}))},[n]);return!i||r?null:g.jsxs(ei.Footer,{h:56,children:[g.jsx(wt,{justify:"center",h:"100%",children:g.jsxs(wt,{w:"100%",h:"100%",align:"center",justify:"space-between",mx:"md",children:[g.jsxs(wt,{gap:"xl",children:[g.jsx(en,{onClick:l,p:0,variant:"white",children:a("buttons.today")}),g.jsx(en,{onClick:c,p:0,variant:"white",children:a("buttons.calendars")})]}),g.jsx(en,{onClick:f,leftSection:g.jsx(gie,{size:"1em"}),variant:"filled",children:a("buttons.create")})]})}),g.jsx(PJe,{opened:s,close:d})]})},zJe=t=>{const[e,n]=O.useState(void 0);return O.useEffect(()=>{if(!t||t.startsWith("data:")||t.startsWith("blob:")){n(t||null);return}if(!t.includes("/api/")){n(t);return}n(void 0);let r=null;const s=new AbortController;return(async()=>{try{const o=t.includes("://")?new URL(t):null;let a=o?o.pathname+o.search:t;a.startsWith("/api/")&&(a=a.substring(4));const l=await bn.get(a,{responseType:"blob",signal:s.signal});if(s.signal.aborted)return;const d=(await l.data.slice(0,500).text()).trim().startsWith("<svg");if(!(l.data.type.startsWith("image/")||d||l.data.type==="application/octet-stream")){n(null);return}let p=l.data;if(d&&l.data.type!=="image/svg+xml"){const m=await l.data.text();p=new Blob([m],{type:"image/svg+xml"})}r=URL.createObjectURL(p),n(r)}catch{n(null)}})(),()=>{s.abort(),r&&URL.revokeObjectURL(r)}},[t]),e},DD=24,FJe=t=>{const e=Ve.c(5),{url:n}=t,r=zJe(n);if(r===void 0){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(zi,{size:DD,type:"oval"}),e[0]=o):o=e[0],o}if(!r){let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(T4e,{size:DD,stroke:1.5,color:"var(--mantine-color-gray-5)"}),e[1]=o):o=e[1],o}let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s={objectFit:"contain",flexShrink:0},e[2]=s):s=e[2];let i;return e[3]!==r?(i=g.jsx(le,{component:"img",src:r,w:DD,h:DD,alt:"",style:s}),e[3]=r,e[4]=i):i=e[4],i},BJe=t=>{const e=Ve.c(4),{links:n}=t;let r;e[0]!==n?(r=n.map(HJe),e[0]=n,e[1]=r):r=e[1];let s;return e[2]!==r?(s=g.jsx(g.Fragment,{children:r}),e[2]=r,e[3]=s):s=e[3],s};function HJe(t,e){return g.jsx(Gt.Item,{component:"a",href:t.Url||void 0,target:"_blank",rel:"noopener noreferrer",disabled:!t.Url,fz:16,pl:24,h:36,my:6,leftSection:g.jsx(FJe,{url:t.Icon}),children:t.Title},`${t.Title}-${e}`)}const Qde=()=>{const t=Ve.c(17),{t:e}=yt("translation"),n=ve($w),[r,s]=O.useState(!1),i=O.useRef(void 0);let o;t[0]!==n.ModuleUrls?(o=n.ModuleUrls.filter(qJe),t[0]=n.ModuleUrls,t[1]=o):o=t[1];const a=o;let l;t[2]!==n.ModuleUrls?(l=n.ModuleUrls.filter(UJe),t[2]=n.ModuleUrls,t[3]=l):l=t[3];const c=l;let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{clearTimeout(i.current),s(!0)},t[4]=d):d=t[4];const f=d;let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{i.current=setTimeout(()=>s(!1),150)},t[5]=p):p=t[5];const m=p;let v,y;t[6]===Symbol.for("react.memo_cache_sentinel")?(v=()=>()=>clearTimeout(i.current),y=[],t[6]=v,t[7]=y):(v=t[6],y=t[7]),O.useEffect(v,y);let x;t[8]!==a?(x=a.map(VJe),t[8]=a,t[9]=x):x=t[9];let w;t[10]!==c||t[11]!==r||t[12]!==e?(w=c.length>0&&g.jsxs(Mn,{opened:r,position:"left-start",withinPortal:!0,zIndex:1002,shadow:"xs",offset:{mainAxis:10,crossAxis:0},children:[g.jsx(Mn.Target,{children:g.jsx("div",{style:{width:"100%"},onMouseEnter:f,onMouseLeave:m,children:g.jsx(Gt.Item,{fz:16,px:"sm",w:"100%",my:4,leftSection:g.jsx(b4e,{stroke:1.5}),children:e("appsMenu.links")})})}),g.jsx(Mn.Dropdown,{style:{padding:0},onMouseEnter:f,onMouseLeave:m,children:g.jsx(Gt,{children:g.jsx(BJe,{links:c})})})]}),t[10]=c,t[11]=r,t[12]=e,t[13]=w):w=t[13];let C;return t[14]!==x||t[15]!==w?(C=g.jsxs(g.Fragment,{children:[x,w]}),t[14]=x,t[15]=w,t[16]=C):C=t[16],C};function qJe(t){return t.ShowItem&&(t.TailType===hT.Module||t.TailType===hT.Integration)}function UJe(t){return t.ShowItem&&t.TailType===hT.Link}function VJe(t){return g.jsx(Gt.Item,{component:"a",href:t.Url,target:"_blank",fz:16,pl:24,h:36,my:6,leftSection:g.jsx(le,{component:"img",src:t.Icon,height:24}),children:t.Title},t.Url)}const efe=()=>{const t=Ve.c(2),e=ve($w);let n;return t[0]!==e.ModuleUrls.length?(n=e.ModuleUrls.length?g.jsxs(Gt,{radius:8,position:"bottom-end",children:[g.jsx(Gt.Target,{children:g.jsx(gn,{children:g.jsx(v4e,{size:26})})}),g.jsx(Gt.Dropdown,{px:0,py:8,w:260,children:g.jsx(Qde,{})})]}):null,t[0]=e.ModuleUrls.length,t[1]=n):n=t[1],n},tfe=t=>{var Q,X;const e=Ve.c(60),{isMobile:n}=t,r=Br(),s=Kt(),i=ve(kr),o=ve($w),a=ve(aOe);let l;e[0]!==(o==null?void 0:o.ModulesAccess)?(l=o==null?void 0:o.ModulesAccess.includes("Admin"),e[0]=o==null?void 0:o.ModulesAccess,e[1]=l):l=e[1];const c=l;let d;e[2]!==(o==null?void 0:o.ModulesAccess)?(d=o==null?void 0:o.ModulesAccess.includes("Payments"),e[2]=o==null?void 0:o.ModulesAccess,e[3]=d):d=e[3];const f=d;let p;e[4]!==(o==null?void 0:o.ModuleUrls)?(p=(Q=o==null?void 0:o.ModuleUrls.find(WJe))==null?void 0:Q.Url,e[4]=o==null?void 0:o.ModuleUrls,e[5]=p):p=e[5];const m=p;let v;e[6]!==(o==null?void 0:o.ModuleUrls)?(v=(X=o==null?void 0:o.ModuleUrls.find(YJe))==null?void 0:X.Url,e[6]=o==null?void 0:o.ModuleUrls,e[7]=v):v=e[7];const y=v,{t:x}=yt(),w=a.AppType==="saas";let C;e[8]!==s||e[9]!==r?(C=async()=>{try{await bn.get("v2/auth/logout"),r("/login"),s(TL())}catch{r("/login"),s(TL())}},e[8]=s,e[9]=r,e[10]=C):C=e[10];const E=C;if(!i)return null;const D=`${i.Surname??"-"} ${i.FirstName??"-"}`;let T;e[11]===Symbol.for("react.memo_cache_sentinel")?(T={fz:16,h:36,pl:24,my:6},e[11]=T):T=e[11];const A=T;let _;e[12]!==i?(_=g.jsx(OS,{user:i,size:"50"}),e[12]=i,e[13]=_):_=e[13];const R=D.length<=50;let N;e[14]!==D?(N=g.jsx(He,{truncate:!0,fz:18,children:D}),e[14]=D,e[15]=N):N=e[15];let I;e[16]!==R||e[17]!==N||e[18]!==D?(I=g.jsx(ss,{label:D,disabled:R,children:N}),e[16]=R,e[17]=N,e[18]=D,e[19]=I):I=e[19];let $;e[20]!==i.Email?($=g.jsx(He,{fz:14,c:"dimmed",children:i.Email}),e[20]=i.Email,e[21]=$):$=e[21];let L;e[22]!==I||e[23]!==$?(L=g.jsxs(Is,{p:0,gap:0,maw:"calc(100% - 70px)",children:[I,$]}),e[22]=I,e[23]=$,e[24]=L):L=e[24];let z;e[25]!==L||e[26]!==_?(z=g.jsxs(wt,{pl:24,gap:"sm",children:[_,L]}),e[25]=L,e[26]=_,e[27]=z):z=e[27];let F;e[28]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(Bo,{my:13}),e[28]=F):F=e[28];let q;e[29]!==m||e[30]!==c||e[31]!==x?(q=c&&g.jsx(Gt.Item,{component:"a",href:`${m}/dashboard`,target:"_blank",leftSection:g.jsx(L4e,{stroke:1.2,size:24}),...A,children:x("userMenuItems.main")}),e[29]=m,e[30]=c,e[31]=x,e[32]=q):q=e[32];let H;e[33]!==m||e[34]!==c||e[35]!==x?(H=c&&g.jsx(Gt.Item,{component:"a",href:`${m}/profile`,target:"_blank",leftSection:g.jsx(B4e,{stroke:1.2,size:24}),...A,children:x("userMenuItems.profile")}),e[33]=m,e[34]=c,e[35]=x,e[36]=H):H=e[36];let B;e[37]!==c||e[38]!==f||e[39]!==w||e[40]!==y||e[41]!==x?(B=w&&g.jsxs(g.Fragment,{children:[f&&y&&g.jsx(Gt.Item,{component:"a",href:y,target:"_blank",leftSection:g.jsx(WRe,{stroke:1.2,size:24}),...A,children:x("userMenuItems.subscribe")}),g.jsx(Gt.Item,{component:"a",href:"https://preview.r7.ru",target:"_blank",leftSection:g.jsx(i4e,{stroke:1.2,size:24}),...A,children:x("userMenuItems.download")}),c&&g.jsx(Gt.Item,{component:"a",href:"https://r7.ru/feedback",target:"_blank",leftSection:g.jsx(BRe,{stroke:1.2,size:24}),...A,children:x("userMenuItems.report")})]}),e[37]=c,e[38]=f,e[39]=w,e[40]=y,e[41]=x,e[42]=B):B=e[42];let V;e[43]!==n||e[44]!==r||e[45]!==x?(V=n&&g.jsx(Gt.Item,{onClick:()=>r("settings/general"),leftSection:g.jsx(Eie,{stroke:1.5,size:20}),...A,children:x("settings.title")}),e[43]=n,e[44]=r,e[45]=x,e[46]=V):V=e[46];let Y;e[47]===Symbol.for("react.memo_cache_sentinel")?(Y=g.jsx(C4e,{stroke:1.2,size:24}),e[47]=Y):Y=e[47];let G;e[48]!==x?(G=x("userMenuItems.logout"),e[48]=x,e[49]=G):G=e[49];let W;e[50]!==E||e[51]!==G?(W=g.jsx(Gt.Item,{onClick:E,leftSection:Y,...A,children:G}),e[50]=E,e[51]=G,e[52]=W):W=e[52];let Z;return e[53]!==z||e[54]!==q||e[55]!==H||e[56]!==B||e[57]!==V||e[58]!==W?(Z=g.jsxs(le,{children:[z,F,q,H,B,V,W]}),e[53]=z,e[54]=q,e[55]=H,e[56]=B,e[57]=V,e[58]=W,e[59]=Z):Z=e[59],Z};function WJe(t){return t.Name==="Admin"}function YJe(t){return t.Name==="Payments"}const nfe=()=>{const t=Ve.c(5),e=ve(kr);if(!e)return null;let n;t[0]!==e?(n=g.jsx(Gt.Target,{children:g.jsx(OS,{size:35,user:e})}),t[0]=e,t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx(Gt.Dropdown,{py:14,px:0,miw:320,maw:320,children:g.jsx(tfe,{})}),t[2]=r):r=t[2];let s;return t[3]!==n?(s=g.jsxs(Gt,{radius:8,position:"bottom-end",children:[n,r]}),t[3]=n,t[4]=s):s=t[4],s},GJe=t=>{const e=Ln.language,{opened:n,setOpened:r}=t,s=O.useRef(null),i=ve(Pl),o=MA(),a=ve(Kde),l=ve(Zde),c=Br(),d=ve(fv),f=O.useRef(d),p=ve(kr),{Email:m}=p||{Email:null},{isMobile:v,isDesktop:y}=Yt(),[x,w]=O.useState(!1);O.useEffect(()=>{f.current=d},[d]),O.useEffect(()=>{s.current&&o(rJe(s.current))},[s.current]);const C=()=>{o(CA(!0)),v&&o(qy(!0))},E=()=>{o(iJe(!l))},D=()=>{w(!x)},T=$Ae(_=>{_&&(o(gc(_)),D())}),A=()=>{o(CA(!1)),o(qy(!1)),o(iie(""))};return O.useEffect(()=>()=>{f.current===!1&&A()},[]),g.jsx(ei.Header,{pr:16,pl:y?10:16,withBorder:!1,children:g.jsxs(vt,{className:"nav-buttons",h:"100%",children:[g.jsx(le,{className:"burger-button",children:g.jsx(X9,{hidden:y,opened:n,onClick:()=>r(!n),size:"sm",pl:3})}),v&&!a&&g.jsx(g.Fragment,{children:g.jsxs(Mn,{opened:x,onChange:D,position:"bottom",withArrow:!0,shadow:"md",children:[g.jsx(Mn.Target,{children:g.jsx(He,{onClick:D,fw:500,fz:18,tt:"capitalize",children:St(i,"LLLL yyyy",!1,e)})}),g.jsx(Mn.Dropdown,{children:g.jsx(H$,{onChange:T,value:i,locale:e,p:"sm"})})]})}),g.jsx(wt,{ref:s,style:{flex:1,width:"80%"}}),v&&a&&g.jsx(Pde,{email:m}),!a&&g.jsxs(wt,{gap:v?5:"sm",children:[v&&g.jsx(gn,{onClick:E,children:g.jsx(mie,{color:l?"#868e96":"#339AF0",size:20})}),g.jsx(gn,{onClick:C,children:g.jsx(Cie,{size:26})}),g.jsx(NEe,{actionIconProps:{size:"md"}}),!v&&g.jsx(gn,{onClick:()=>c("/settings/general"),children:g.jsx(Eie,{size:26})}),g.jsx(efe,{}),g.jsx(nfe,{})]})]})})},rfe=()=>{const t=Ve.c(3),e=ve(Cv),{Timezone:n}=ve(oh);let r;t[0]!==n||t[1]!==e?(r=qe.isNil(n)?void 0:e[n.Id],t[0]=n,t[1]=e,t[2]=r):r=t[2];const s=r;return s==null?void 0:s.tzName},KJe=t=>{const e=Pp(t),n=e.getDate(),r=Br(),i=nh(Ev).onNavigate,o=ve(Lh),a=async()=>{o&&ds[o]!=="day"&&(i&&i("DATE",e),r(`/day/${e.getFullYear()}/${e.getMonth()+1}/${e.getDate()}`))};return g.jsx(vt,{align:"center",justify:"center",w:"100%",h:"100%",onDoubleClick:a,children:n})},ZJe=()=>{const t=Ve.c(24),e=nh(Pl),n=nh(Ev);MA();const{i18n:r}=yt(),[s,i]=O.useState("month"),{isDesktop:o}=Yt(),a=rfe();let l;t[0]!==s?(l=()=>{s!=="month"&&i("month")},t[0]=s,t[1]=l):l=t[1];const c=ow(l);let d;t[2]!==n?(d=A=>{var R;if(!A)return;const _=new Date(A.getFullYear(),A.getMonth(),A.getDate(),12);(R=n.onNavigate)==null||R.call(n,"DATE",_)},t[2]=n,t[3]=d):d=t[3];const f=d;let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=A=>{i(A)},t[4]=p):p=t[4];const m=p,v=o?"flex-start":"center";let y;t[5]!==a?(y={timezone:a},t[5]=a,t[6]=y):y=t[6];const x=y;let w;t[7]!==f?(w=AS(f),t[7]=f,t[8]=w):w=t[8];let C;t[9]!==f?(C=AS(f),t[9]=f,t[10]=C):C=t[10];let E;t[11]!==e||t[12]!==r.language||t[13]!==s||t[14]!==c||t[15]!==w||t[16]!==C?(E=g.jsx(pv,{className:"desktop-date-picker",ref:c,value:e,date:e,onChange:w,onDateChange:C,size:"sm",level:s,onLevelChange:m,locale:r.language,renderDay:KJe}),t[11]=e,t[12]=r.language,t[13]=s,t[14]=c,t[15]=w,t[16]=C,t[17]=E):E=t[17];let D;t[18]!==x||t[19]!==E?(D=g.jsx(Hie,{settings:x,children:E}),t[18]=x,t[19]=E,t[20]=D):D=t[20];let T;return t[21]!==v||t[22]!==D?(T=g.jsx(vt,{justify:v,children:D}),t[21]=v,t[22]=D,t[23]=T):T=t[23],T},JJe=()=>{const t=Ve.c(4),e=O.useRef(null);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=c=>{var d;(d=e.current)==null||d.classList.add(c),setTimeout(()=>{var f;(f=e.current)==null||f.classList.remove(c)},500)},t[0]=n):n=t[0];const r=n;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=()=>{r("calendar-wrapper-right-animation")},t[1]=s):s=t[1];const i=s;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{r("calendar-wrapper-left-animation")},t[2]=o):o=t[2];const a=o;let l;return t[3]===Symbol.for("react.memo_cache_sentinel")?(l={calendarRef:e,fadeLeft:a,fadeRight:i},t[3]=l):l=t[3],l},XJe=t=>{const{handleCloseCreateEventModal:e,initialEvent:n}=t,r=ve(Yo),s=Br(),{t:i}=yt(),[o,a]=O.useState(n),l=ve(Zse),c=ve(df),d=ve(Ev),f=c.find(D=>D.id===o.resource.calendarId),p=Kt(),m=O.useCallback(async()=>{var _,R,N,I;let D={...o,resource:{...o.resource,startTimeZoneId:Number(l==null?void 0:l.Id),endTimeZoneId:Number(l==null?void 0:l.Id),simpleNotifications:((R=(_=f==null?void 0:f.settingsContainer)==null?void 0:_.defaultEventNotifications)==null?void 0:R.filter($=>!$.allDayInterval))||[],allDayNotifications:((I=(N=f==null?void 0:f.settingsContainer)==null?void 0:N.defaultEventNotifications)==null?void 0:I.filter($=>$.allDayInterval))||[]}};D.resource.isAllDayWithoutTime?(D.start=o.start,D.end=o.end):(D.start=_n(o.start),D.end=_n(o.end)),D.title=o.title.trim();const{onNavigate:T}=d;(p$(o.start,o.end,"day")>=1||o.resource.isAllDayWithoutTime)&&(D.allDay=!0),e(),await p(Wx({body:D,calendarsGroup:r})),await IL({event:D,calendarList:c,dispatch:p}),p(_c()),T&&T("DATE",_n(o.start))},[o,e,p,r,d,c]),v=(D,T)=>{if(typeof D=="object")a({...D});else{const A=D,_=T;a({...o,[A]:_})}},y=O.useCallback(v,[o]),x=O.useCallback(D=>{D.preventDefault(),e(),p(Hw(o)),s(`/event/new/${St(o.start,"yyyy-MM-dd")}`)},[o,e,p,s]),w=O.useCallback(()=>{e(),a(n)},[n,e]),{isMobile:C}=Yt(),E=o.resource.participantInfo.accessType===mt.Read;return g.jsxs(le,{miw:C?0:470,px:C?"sm":0,children:[g.jsx(uoe,{handleSubmitEvent:m,edit:!1,hasError:!1,handleSetEvent:y,event:o,full:!1}),!C&&g.jsx(vn,{h:"sm"}),g.jsx(qa,{additionalClassname:ti({"event-buttons-wrapper":C}),children:g.jsxs(vt,{style:{width:C?"auto":"100%"},justify:C?void 0:"space-between",gap:"sm",pos:C?void 0:"relative",bottom:C?20:0,left:C?20:0,children:[g.jsx(or,{onClick:x,children:g.jsx(He,{className:"other-params",c:"blue.6",span:!0,children:i("buttons.otherParams")})}),g.jsxs(vt,{gap:"sm",pos:C?"absolute":"relative",bottom:C?20:0,left:C?20:0,children:[g.jsx(en,{variant:"outline",onClick:w,children:i("buttons.cancel")}),g.jsx(en,{disabled:E,onClick:m,children:i("buttons.create")})]})]})})]})},tF=t=>{const e=Kt(),{handleCloseDeleteEventModal:n,event:r}=t,s=Br(),{t:i}=yt(),o=ve(kr),a=Il(r.resource),l=Vz(r.resource.calendarId),c=a===mt.Read&&!l,d=nO(),f=O.useCallback(()=>{n(),e($p({opened:!1,event:r})),s(d(r))},[r,e,n,s]),p=O.useCallback(()=>{n(),e($p({opened:!1,event:r})),e(Wg("Deleted"))},[e,r,n]),m=O.useCallback(()=>{n(),e(M$({opened:!0,event:r}))},[e,r,n]),v=()=>{var y,x;if(c){$n.showWarning(i("warning.message_access_delete"));return}((x=(y=r==null?void 0:r.resource)==null?void 0:y.recurring)==null?void 0:x.repeatPeriod)==="never"?m():p()};return g.jsxs(Gt,{children:[g.jsx(Gt.Item,{onClick:f,leftSection:g.jsx(Sie,{size:16}),children:i("buttons.edit")}),g.jsx(Gt.Item,{onClick:v,leftSection:g.jsx(Mie,{size:16}),children:b1(r,o)?i("buttons.cancelAndDelete"):i("buttons.delete")})]})};function Sy(t,e,n){let r=n.initialDeps??[],s,i=!0;function o(){var a,l,c;let d;n.key&&((a=n.debug)!=null&&a.call(n))&&(d=Date.now());const f=t();if(!(f.length!==r.length||f.some((v,y)=>r[y]!==v)))return s;r=f;let m;if(n.key&&((l=n.debug)!=null&&l.call(n))&&(m=Date.now()),s=e(...f),n.key&&((c=n.debug)!=null&&c.call(n))){const v=Math.round((Date.now()-d)*100)/100,y=Math.round((Date.now()-m)*100)/100,x=y/16,w=(C,E)=>{for(C=String(C);C.length<E;)C=" "+C;return C};console.info(`%c⏱ ${w(y,5)} /${w(v,5)} ms`,`
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n==null?void 0:n.key)}return n!=null&&n.onChange&&!(i&&n.skipInitialOnChange)&&n.onChange(s),i=!1,s}return o.updateDeps=a=>{r=a},o}function EX(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const QJe=(t,e)=>Math.abs(t-e)<1.01,eXe=(t,e,n)=>{let r;return function(...s){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,s),n)}},MX=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},tXe=t=>t,nXe=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let s=e;s<=n;s++)r.push(s);return r},rXe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const s=o=>{const{width:a,height:l}=o;e({width:Math.round(a),height:Math.round(l)})};if(s(MX(n)),!r.ResizeObserver)return()=>{};const i=new r.ResizeObserver(o=>{const a=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const c=l.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(MX(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},DX={passive:!0},kX=typeof window>"u"?!0:"onscrollend"in window,sXe=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let s=0;const i=t.options.useScrollendEvent&&kX?()=>{}:eXe(r,()=>{e(s,!1)},t.options.isScrollingResetDelay),o=d=>()=>{const{horizontal:f,isRtl:p}=t.options;s=f?n.scrollLeft*(p&&-1||1):n.scrollTop,i(),e(s,d)},a=o(!0),l=o(!1);n.addEventListener("scroll",a,DX);const c=t.options.useScrollendEvent&&kX;return c&&n.addEventListener("scrollend",l,DX),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",l)}},iXe=(t,e,n)=>{if(e!=null&&e.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},oXe=(t,{adjustments:e=0,behavior:n},r)=>{var s,i;const o=t+e;(i=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||i.call(s,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class aXe{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var i;return(i=r())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=r())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tXe,rangeExtractor:nXe,onChange:()=>{},measureElement:iXe,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Sy(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=i,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,i=new Map;for(let o=r-1;o>=0;o--){const a=n[o];if(s.has(a.lane))continue;const l=i.get(a.lane);if(l==null||a.end>l.end?i.set(a.lane,a):a.end<l.end&&s.set(a.lane,!0),s.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,a)=>o.end===a.end?o.index-a.index:o.end-a.end)[0]:void 0},this.getMeasurementOptions=Sy(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,i,o,a)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o,lanes:a}),{key:!1}),this.getMeasurements=Sy(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:i,enabled:o,lanes:a},l)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const p of this.laneAssignments.keys())p>=n&&this.laneAssignments.delete(p);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,c),f=new Array(a).fill(void 0);for(let p=0;p<c;p++){const m=d[p];m&&(f[m.lane]=p)}for(let p=c;p<n;p++){const m=i(p),v=this.laneAssignments.get(p);let y,x;if(v!==void 0&&this.options.lanes>1){y=v;const D=f[y],T=D!==void 0?d[D]:void 0;x=T?T.end+this.options.gap:r+s}else{const D=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);x=D?D.end+this.options.gap:r+s,y=D?D.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,y)}const w=l.get(m),C=typeof w=="number"?w:this.options.estimateSize(p),E=x+C;d[p]={index:p,start:x,size:C,end:E,key:m,lane:y},f[y]=p}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Sy(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,i)=>this.range=n.length>0&&r>0?lXe({measurements:n,outerSize:r,scrollOffset:s,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Sy(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),i=this.measurementsCache[s];if(!i)return;const o=i.key,a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const i=this.itemSizeCache.get(s.key)??s.size,o=r-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,o,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Sy(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let i=0,o=n.length;i<o;i++){const a=n[i],l=r[a];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return EX(r[sfe(0,r.length-1,s=>EX(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),o=this.getScrollOffset();r==="auto"&&(r=n>=o+i?"end":"start"),r==="center"?n+=(s-i)/2:r==="end"&&(n-=i);const a=this.getMaxScrollOffset();return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const i=this.getSize(),o=this.getScrollOffset();if(r==="auto")if(s.end>=o+i-this.options.scrollPaddingEnd)r="end";else if(s.start<=o+this.options.scrollPaddingStart)r="start";else return[o,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const a=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let i=0;const o=10,a=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,c);if(!d){console.warn("Failed to get offset for index:",n);return}const[f,p]=d;this._scrollToOffset(f,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const m=()=>{if(this.currentScrollToIndex!==n)return;const v=this.getScrollOffset(),y=this.getOffsetForIndex(n,p);if(!y){console.warn("Failed to get offset for index:",n);return}QJe(y[0],v)||l(p)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(m):m()})},l=c=>{this.targetWindow&&this.currentScrollToIndex===n&&(i++,i<o?this.targetWindow.requestAnimationFrame(()=>a(c)):console.warn(`Failed to scroll to index ${n} after ${o} attempts.`))};a(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=r.length-1;for(;o>=0&&i.some(a=>a===null);){const a=r[o];i[a.lane]===null&&(i[a.lane]=a.end),o--}s=Math.max(...i.filter(a=>a!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const sfe=(t,e,n,r)=>{for(;t<=e;){const s=(t+e)/2|0,i=n(s);if(i<r)t=s+1;else if(i>r)e=s-1;else return s}return t>0?t-1:0};function lXe({measurements:t,outerSize:e,scrollOffset:n,lanes:r}){const s=t.length-1,i=l=>t[l].start;if(t.length<=r)return{startIndex:0,endIndex:s};let o=sfe(0,s,i,n),a=o;if(r===1)for(;a<s&&t[a].end<n+e;)a++;else if(r>1){const l=Array(r).fill(0);for(;a<s&&l.some(d=>d<n+e);){const d=t[a];l[d.lane]=d.end,a++}const c=Array(r).fill(n+e);for(;o>=0&&c.some(d=>d>=n);){const d=t[o];c[d.lane]=d.start,o--}o=Math.max(0,o-o%r),a=Math.min(s,a+(r-1-a%r))}return{startIndex:o,endIndex:a}}const TX=typeof document<"u"?O.useLayoutEffect:O.useEffect;function cXe({useFlushSync:t=!0,...e}){const n=O.useReducer(()=>({}),{})[1],r={...e,onChange:(i,o)=>{var a;t&&o?M1.flushSync(n):n(),(a=e.onChange)==null||a.call(e,i,o)}},[s]=O.useState(()=>new aXe(r));return s.setOptions(r),TX(()=>s._didMount(),[]),TX(()=>s._willUpdate()),s}function uXe(t){return cXe({observeElementRect:rXe,observeElementOffset:sXe,scrollToFn:oXe,...t})}function ife(t,e,n=250){let r=null;return function(s){if(!r){r=window.setTimeout(function(){t(s),r=null},n);return}window.clearTimeout(r),r=null,e(s)}}const dXe="_eventCardFullDay_10381_1",fXe="_withRecurring_10381_23",wI={eventCardFullDay:dXe,withRecurring:fXe},pXe=t=>{const e=Ve.c(28),{event:n,onSingleClick:r,onDoubleClick:s,onContextMenu:i}=t,o=Dr(),a=ve(wv),l=ve(zw);let c;e[0]!==a||e[1]!==n||e[2]!==l?(c=Tde(a,"month",l)(n,!1),e[0]=a,e[1]=n,e[2]=l,e[3]=c):c=e[3];const d=c.style,f=n.resource.recurring.repeatPeriod!==cg.never;let p;e[4]!==n||e[5]!==r?(p=R=>r(R,n),e[4]=n,e[5]=r,e[6]=p):p=e[6];const m=p;let v;e[7]!==n||e[8]!==s?(v=R=>s(R,n),e[7]=n,e[8]=s,e[9]=v):v=e[9];const y=v;let x;e[10]!==n||e[11]!==i?(x=R=>i(R,n),e[10]=n,e[11]=i,e[12]=x):x=e[12];const w=x;let C;e[13]!==m||e[14]!==y?(C=ife(m,y),e[13]=m,e[14]=y,e[15]=C):C=e[15];const E=C,D=`${wI.eventCardFullDay} ${f?wI.withRecurring:""}`;let T;e[16]!==n.title?(T=g.jsx(He,{className:wI.title,title:n.title,truncate:!0,size:"sm",children:n.title}),e[16]=n.title,e[17]=T):T=e[17];let A;e[18]!==f||e[19]!==o?(A=f&&g.jsx(vt,{justify:"center",children:g.jsx(J_,{size:15,color:o.colors.gray[6]})}),e[18]=f,e[19]=o,e[20]=A):A=e[20];let _;return e[21]!==d||e[22]!==w||e[23]!==E||e[24]!==D||e[25]!==T||e[26]!==A?(_=g.jsxs(le,{className:D,style:d,onClick:E,onContextMenu:w,children:[T,A]}),e[21]=d,e[22]=w,e[23]=E,e[24]=D,e[25]=T,e[26]=A,e[27]=_):_=e[27],_},hXe="_eventListTimeDivider_1v556_1",mXe="_eventListConnectingLine_1v556_28",CI={eventListTimeDivider:hXe,eventListConnectingLine:mXe},gXe="_eventCard_1d5mw_1",vXe="_time_1d5mw_22",yXe="_title_1d5mw_26",bXe="_withRecurring_1d5mw_30",kD={eventCard:gXe,time:vXe,title:yXe,withRecurring:bXe},AX={HHmm:"HH:mm"};function xXe(t){const e=St(t.start,AX.HHmm),n=St(t.end,AX.HHmm);return`${e}-${n}`}function SXe(t){const e=t.resource.hasParticipant,n=t.resource.participantInfo.attendingType;return e&&n===Wa.NotVisit?{textDecoration:"line-through"}:{}}function wXe(t,e,n){const r=t.resource.participantInfo.attendingType;return Uz(r,n,e)}const ofe=({event:t,onSingleClick:e,onDoubleClick:n,onContextMenu:r})=>{const s=ve(wv),i=O.useMemo(()=>ga(t.end,new Date),[t]),o=O.useMemo(()=>SXe(t),[t]),a=s[t.resource.categoryId],l=Dr(),c=O.useMemo(()=>xXe(t),[t]),d=ve(zw),f=O.useMemo(()=>d&&i?nv(t.resource.mainColor):t.resource.mainColor,[t,d]),p=O.useMemo(()=>d&&i?nv(a):a,[t,d]),m=O.useMemo(()=>wXe(t,f,p),[t]),v=O.useMemo(()=>t.resource.recurring.repeatPeriod!==cg.never,[t]),y=O.useCallback(D=>e(D,t),[t,e]),x=O.useCallback(D=>n(D,t),[t,n]),w=O.useCallback(D=>r(D,t),[t,r]),C=ife(y,x),E=`${c} ${t.title}`;return g.jsxs(le,{className:`${kD.eventCard} ${v?kD.withRecurring:""}`,onClick:C,onContextMenu:w,title:E,children:[g.jsx(le,{className:"event-external-circle",style:{backgroundColor:f},children:g.jsx(le,{style:m})}),g.jsx(He,{size:"sm",classNames:{root:kD.time},style:o,ta:"center",c:"var(--mantine-color-gray-6)",children:c}),g.jsx(He,{c:i?"grey":"var(--mantine-color-gray-9)",size:"sm",className:kD.title,style:o,truncate:!0,children:t.title||ct("placeholders.defaultEventTitle")}),v&&g.jsx(vt,{justify:"center",children:g.jsx(J_,{size:15,color:l.colors.gray[6]})})]})},CXe=t=>{const e=Ve.c(14),{data:n,onSingleClick:r,onDoubleClick:s,onContextMenu:i}=t,o=n.isConnectingLineVisible?CI.eventListConnectingLine:"";let a;e[0]!==n.isBeforeEventTimeLineDisplayed?(a=n.isBeforeEventTimeLineDisplayed&&g.jsx(Bo,{className:CI.eventListTimeDivider}),e[0]=n.isBeforeEventTimeLineDisplayed,e[1]=a):a=e[1];let l;e[2]!==n.event||e[3]!==i||e[4]!==s||e[5]!==r?(l=g.jsx(ofe,{event:n.event,onSingleClick:r,onDoubleClick:s,onContextMenu:i}),e[2]=n.event,e[3]=i,e[4]=s,e[5]=r,e[6]=l):l=e[6];let c;e[7]!==n.isAfterEventTimeLineDisplayed?(c=n.isAfterEventTimeLineDisplayed&&g.jsx(Bo,{className:CI.eventListTimeDivider}),e[7]=n.isAfterEventTimeLineDisplayed,e[8]=c):c=e[8];let d;return e[9]!==o||e[10]!==a||e[11]!==l||e[12]!==c?(d=g.jsxs(Is,{m:0,gap:0,pos:"relative",w:"100%",className:o,children:[a,l,c]}),e[9]=o,e[10]=a,e[11]=l,e[12]=c,e[13]=d):d=e[13],d},EXe=t=>{const e=Ve.c(21),{row:n,onSingleClick:r,onDoubleClick:s,onContextMenu:i}=t,o=`event-card-date ${n.isCurrentDayToday&&n.isFirstEventOfDay?"is-today":""}`;let a;e[0]!==n.day||e[1]!==n.isFirstEventOfDay||e[2]!==n.weekday?(a=n.isFirstEventOfDay&&g.jsxs(g.Fragment,{children:[g.jsx(He,{className:"event-weekday",children:n.weekday}),g.jsx(He,{className:"event-day",children:n.day})]}),e[0]=n.day,e[1]=n.isFirstEventOfDay,e[2]=n.weekday,e[3]=a):a=e[3];let l;e[4]!==o||e[5]!==a?(l=g.jsx(Is,{gap:0,align:"center",className:o,children:a}),e[4]=o,e[5]=a,e[6]=l):l=e[6];let c;e[7]!==i||e[8]!==s||e[9]!==r||e[10]!==n?(c=n instanceof r1&&g.jsx(pXe,{event:n.value,onSingleClick:r,onDoubleClick:s,onContextMenu:i}),e[7]=i,e[8]=s,e[9]=r,e[10]=n,e[11]=c):c=e[11];let d;e[12]!==i||e[13]!==s||e[14]!==r||e[15]!==n?(d=n instanceof s1&&g.jsx(CXe,{data:n.value,onSingleClick:r,onDoubleClick:s,onContextMenu:i}),e[12]=i,e[13]=s,e[14]=r,e[15]=n,e[16]=d):d=e[16];let f;return e[17]!==l||e[18]!==c||e[19]!==d?(f=g.jsxs(vt,{children:[l,c,d]}),e[17]=l,e[18]=c,e[19]=d,e[20]=f):f=e[20],f},MXe="_eventListMonthWrapper_1x4wd_1",DXe="_eventListMonth_1x4wd_1",_X={eventListMonthWrapper:MXe,eventListMonth:DXe},kXe=t=>{const e=Ve.c(5),{data:n}=t,r=`url(${window.location.origin}/images/months/${n.monthIndex}.jpg)`;let s;e[0]!==r?(s={backgroundImage:r},e[0]=r,e[1]=s):s=e[1];let i;return e[2]!==n.label||e[3]!==s?(i=g.jsx(le,{className:_X.eventListMonthWrapper,children:g.jsx(He,{className:_X.eventListMonth,style:s,children:n.label})}),e[2]=n.label,e[3]=s,e[4]=i):i=e[4],i},TXe=t=>{const e=Ln.language,n=ve(zr.isRequestsBlocked),r=ve(zr.noPrevEvents),s=ve(zr.noNextEvents),i=ve(zr.rows),o=Kt(),a=O.useRef(!1),l=O.useMemo(()=>{const f=i.find(y=>y instanceof r1||y instanceof s1),p=i.findLast(y=>y instanceof r1||y instanceof s1),m=i.find(y=>y instanceof Gg),v=i.findLast(y=>y instanceof Gg);return{firstEvent:f,lastEvent:p,firstMonth:m,lastMonth:v}},[i]),c=O.useCallback(async()=>{n||r||(o(zp(!0)),await o(qw()),setTimeout(()=>o(zp(!1))))},[n,r]),d=O.useCallback(()=>{n||s||o(Uw())},[n,s]);O.useEffect(()=>{const f=!qe.isNil(l.firstEvent)&&t.has(l.firstEvent),p=!qe.isNil(l.firstMonth)&&t.has(l.firstMonth),m=!qe.isNil(l.lastEvent)&&t.has(l.lastEvent),v=!qe.isNil(l.lastMonth)&&t.has(l.lastMonth);if(p){if(!a.current){a.current=!0;return}o(zp(!0)),o(goe()),o(RS(e)),setTimeout(()=>o(zp(!1)))}v&&(o(moe()),o(RS(e))),f&&c(),m&&d()},[t])},AXe=()=>{const t=Ln.language,e=ve(zr.loadedRangeStartDate),n=ve(zr.loadedRangeEndDate),r=ve(zr.isRequestsBlocked),s=ve(Pl),i=Kt(),o=O.useRef(!1),a=ve(zr.noPrevEvents),l=ve(zr.noNextEvents),c=ve(zr.months),d=O.useMemo(()=>qe.isEmpty(c)?null:nt.fromFormat(c[0].value,Lu.yyyyMM).toJSDate(),[c]),f=O.useMemo(()=>qe.isEmpty(c)?null:nt.fromFormat(c[c.length-1].value,Lu.yyyyMM).toJSDate(),[c]),p=O.useCallback(async m=>{if(qe.isNil(e)||qe.isNil(n)||qe.isNil(d)||qe.isNil(f)||r)return;const v=new Date(e),y=new Date(n);if(m<d&&(i(zp(!0)),i(goe(m)),i(RS(t)),setTimeout(()=>i(zp(!1)))),m<v&&!a){const x=kl(m,"day");i(zp(!0)),await i(qw(x)),setTimeout(()=>i(zp(!1)))}if(m>f&&(i(moe(m)),i(RS(t)),setTimeout(()=>i(wu(m)))),m>y&&!l){const x=Iu(m,"day");await i(Uw(x)),i(wu(m))}},[e,n,r,a,l,d,f]);O.useEffect(()=>{if(!qe.isNil(s)){if(!o.current){o.current=!0;return}p(s)}},[s.getTime()])},_Xe=t=>{const[e,n]=O.useState({start:0,end:0}),r=O.useCallback(({y:s})=>{if(qe.isNil(t.current))return console.error("scrollAreaRef not found");n({start:s,end:s+t.current.clientHeight})},[]);return[e,r]},OXe=t=>{const e=Ve.c(10),n=ve(zr.shouldKeepTopPosition);let r;e[0]!==t?(r=t.getTotalSize(),e[0]=t,e[1]=r):r=e[1];const s=CQ(r),i=t.getTotalSize();let o;e[2]!==i||e[3]!==s||e[4]!==n||e[5]!==t?(o=()=>{const l=i-s;n&&l>0&&t.scrollOffset!==null&&t.scrollToOffset(t.scrollOffset+l)},e[2]=i,e[3]=s,e[4]=n,e[5]=t,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==s?(a=[i,s],e[7]=i,e[8]=s,e[9]=a):a=e[9],O.useEffect(o,a)},RXe=t=>{const e=ve(zr.isOpen),{isMobile:n}=Yt(),r=n||e,s=ve(zr.scrollToDate),i=ve(zr.rows),o=ve(zr.eventsByMonth),a=Kt(),l=O.useRef(!1),c=O.useCallback(m=>{const v=qe.sumBy(i.slice(0,m),({heightPx:y})=>y);a(Z$(!0)),!r||!l.current?(l.current=!0,t.scrollToOffset(v)):t.scrollToOffset(v,{behavior:"smooth"})},[i,r,t]),d=O.useCallback(m=>{const v=uT(m,Lu.yyyyMMdd);let y=null,x=1/0;i.forEach((w,C)=>{if(w instanceof Gg||!w.isFirstEventOfDay)return;const E=uT(w.date,Lu.yyyyMMdd),D=Math.abs(E.getTime()-v.getTime());D<x&&(x=D,y=C)}),!qe.isNil(y)&&y>-1&&c(y)},[i,c]),f=O.useCallback(m=>{const v=i.findIndex(y=>y instanceof Gg&&y.value===m);!qe.isNil(v)&&v>-1&&c(v)},[i,c]),p=O.useCallback(m=>{const v=V$(m),y=v.substring(0,6),x=i.findIndex(w=>w.value===v);if(x>-1)return c(x);if(!qe.isEmpty(o[y]))return d(v);f(y)},[i,o,c,d]);O.useEffect(()=>{qe.isNil(s)||(p(s),a(wu(null)))},[s==null?void 0:s.getTime()])},NXe=t=>{const e=ve(zr.isStickyDateDetectionBlocked),[n,r]=O.useState(null),s=Kt(),i=O.useCallback((a,l)=>{if(l){setTimeout(()=>s(Z$(!1)),1e3);return}const c=[...a][0];return c instanceof Gg?r(c.value+"01"):c instanceof r1||c instanceof s1?r(c.date):r(null)},[]),o=O.useMemo(()=>qe.debounce((a,l)=>i(a,l),50),[]);return O.useEffect(()=>o(t,e),[t]),n},jXe=(t,e,n)=>{const r=Ve.c(12),s=Kt(),i=nh(Ev),o=ve(sO);let a;r[0]!==o?(a=Yg(o),r[0]=o,r[1]=a):a=r[1];const l=a,c=ve(Pl);let d;r[2]!==c||r[3]!==s||r[4]!==e||r[5]!==n||r[6]!==l||r[7]!==i||r[8]!==t?(d=()=>{var m,v;if(qe.isNil(t))return;const p=uT(t,Lu.yyyyMMdd);if(!qe.isNil(l))if(ga(p,kl(c,"month"))){e==null||e(),(m=i.onNavigate)==null||m.call(i,mi.DATE,p);return}else q1(p,Iu(c,"month"))?(n==null||n(),(v=i.onNavigate)==null||v.call(i,mi.DATE,p)):s(gc(p))},r[2]=c,r[3]=s,r[4]=e,r[5]=n,r[6]=l,r[7]=i,r[8]=t,r[9]=d):d=r[9];let f;r[10]!==t?(f=[t],r[10]=t,r[11]=f):f=r[11],O.useEffect(d,f)},IXe=t=>{const e=Ve.c(8),n=ve(zr.rows);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=new Set,e[0]=r):r=e[0];const[s,i]=O.useState(r);let o;e[1]!==n||e[2]!==t?(o=()=>{const d=new Set;let f=0;n.forEach(p=>{const m=f+p.heightPx;m>t.start&&f<=t.end&&d.add(p),f=m}),i(d)},e[1]=n,e[2]=t,e[3]=o):o=e[3];const a=o;let l;e[4]!==a?(l=()=>{a()},e[4]=a,e[5]=l):l=e[5];let c;return e[6]!==t?(c=[t],e[6]=t,e[7]=c):c=e[7],O.useEffect(l,c),s},LXe={"--event-list-month_height":`${bu.month.heightPx}px`,"--event-list-month_margin-bottom":`${bu.month.marginBottomPx}px`,"--event-list-month_padding-top":`${bu.month.paddingTopPx}px`,"--event-list-event_height":`${bu.event.heightPx}px`,"--event-list-event_margin-bottom":`${bu.event.marginBottomPx}px`},PXe=({fadeLeft:t,fadeRight:e,onSingleClick:n,onDoubleClick:r,onContextMenu:s})=>{var y;$de(!0);const o=ve(zr.rows),a=O.useRef(void 0),l=uXe({count:o.length,overscan:15,getScrollElement:()=>a.current,estimateSize:x=>o[x].heightPx}),c=l.getVirtualItems(),d=((y=c==null?void 0:c[0])==null?void 0:y.start)??0,[f,p]=_Xe(a),m=IXe(f);OXe(l),RXe(l),AXe(),TXe(m);const v=NXe(m);return jXe(v,t,e),g.jsx(Qs,{onScrollPositionChange:p,className:"event-list-scroll-area",offsetScrollbars:!1,viewportRef:a,style:LXe,children:g.jsx("div",{className:"container-outer",style:{height:l.getTotalSize()},children:g.jsx("div",{className:"container-inner",style:{transform:`translateY(${d}px)`,"--event-list-header-sticky-top":`calc(${d}px * -1)`},children:c.map(x=>{const w=o[x.index];switch(w.constructor){case Gg:return g.jsx(kXe,{"data-index":x.index,data:w},x.key);case r1:case s1:return g.jsx(EXe,{row:w,"data-index":x.index,onSingleClick:n,onDoubleClick:r,onContextMenu:s},x.key);default:return g.jsx(g.Fragment,{})}})})})})},$Xe=t=>{const e=Ve.c(6),{onClick:n,openedEventList:r}=t,s=`event-list__toggle
      ${r?"detached":""}`;let i;e[0]!==r?(i=g.jsx(b_,{size:"xs",variant:"transparent",color:"gray",children:r?g.jsx(O$,{}):g.jsx(yie,{})}),e[0]=r,e[1]=i):i=e[1];let o;return e[2]!==n||e[3]!==s||e[4]!==i?(o=g.jsx(le,{className:s,onClick:n,children:i}),e[2]=n,e[3]=s,e[4]=i,e[5]=o):o=e[5],o},zXe=()=>{const t=Ln.language,e=ve(zr.loadedCalendarsIds),n=ve(zr.reloadTrigger),r=ve(zr.isOpen),s=ve(hC),i=ve(df),o=ve(Pl),a=Kt(),l=O.useMemo(()=>i.map(({color:f})=>f).join(","),[i]),c=O.useCallback(async(f=!1)=>{if(!r)return;if(qe.isNil(o)){console.error("Missing global date");return}if(!f&&s.toString()===e)return;const p=nt.fromJSDate(o).startOf("day").toJSDate(),m=Es(p,{seconds:1}).toISOString(),v=cv(p,{seconds:1}).toISOString();a(Z$(!0)),a(jL({keepIsOpen:!0,keepLoadedCalendarsIds:!0})),await a(zU({loadedRangeStartDate:m,loadedRangeEndDate:v})),a(qje({date:o,locale:t})),a(RS(t)),qe.isEmpty(s)?a(zU({loadedCalendarsIds:null})):(await a(Uw()),await a(qw())),a(wu(o)),a(Bje(!0))},[s,o,e,r]);O.useEffect(()=>{c()},[e,s,r]);const d=O.useRef(!1);O.useEffect(()=>{if(!d.current){d.current=!0;return}c(!0)},[l]),O.useEffect(()=>{qe.isNil(n)||c(!0)},[n])},FXe=()=>{const t=Ve.c(7),e=ve(zr.isOpen),{isMobile:n}=Yt(),r=Kt();let s;t[0]!==r||t[1]!==n||t[2]!==e?(s=()=>{n&&!e&&r(J$(!0))},t[0]=r,t[1]=n,t[2]=e,t[3]=s):s=t[3];let i;t[4]!==n||t[5]!==e?(i=[n,e],t[4]=n,t[5]=e,t[6]=i):i=t[6],O.useEffect(s,i)},BXe=()=>{const t=Ve.c(8),e=ve(zr.isOpen),n=Kt();let r;t[0]!==n||t[1]!==e?(r=()=>{e||n(jL({keepIsOpen:!0}))},t[0]=n,t[1]=e,t[2]=r):r=t[2];let s;t[3]!==e?(s=[e],t[3]=e,t[4]=s):s=t[4],O.useEffect(r,s);let i;t[5]!==n?(i=()=>()=>{n(jL({keepIsOpen:!0}))},t[5]=n,t[6]=i):i=t[6];let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=[],t[7]=o):o=t[7],O.useEffect(i,o)},afe=({fadeLeft:t,fadeRight:e})=>{var q,H,B;const n=Kt(),r=ve(zr.isOpen),s=ve(zr.isInitialLoadComplete),i=ve(Yo),o=ve(cf),[a,l]=O.useState(!1),[c,d]=O.useState(!1),[f,p]=O.useState({top:0,left:0,width:0,height:0}),m=O.useRef(null),{isMobile:v}=Yt(),y=Br(),x=nO(),w=r&&!s,C=r&&!w,E=Il((q=m.current)==null?void 0:q.resource),D=ve(kr),T=O.useCallback(async()=>{if(qe.isNil(m.current))return console.error("Missing event data");const V=E!==mt.FreeBusy&&E!==mt.Read,Y=Number(m.current.id),{payload:G}=await n(Tu({id:Y,calendarsGroup:i,startDate:m.current.start,isAllDay:m.current.resource.isAllDayWithoutTime,isUtc:!0}));G!=null&&G.HasMaterials&&V&&n($d(Y))},[n,m,i]),A=O.useCallback(()=>l(!1),[l]),_=O.useCallback(()=>l(!0),[l]),R=O.useCallback(()=>{n(K_()),d(!1)},[d]),N=O.useCallback(()=>d(!0),[d]),I=O.useCallback(()=>n(Hje()),[n]),$=O.useCallback(V=>m.current=V,[m]),L=O.useCallback(async({pageX:V,pageY:Y,target:G},W)=>{const Q=G.getBoundingClientRect();$(W),p({left:window.innerWidth-340,top:Q.y,width:340,height:22}),N(),T()},[T,N,$]),z=O.useCallback((V,Y)=>{if((D==null?void 0:D.ContactId)!==Y.resource.organizerId&&(Y.resource.accessType===mt.Read||Y.resource.accessType===mt.FreeBusy)){$n.showWarning(ct("warning.message_access"));return}$(Y),A(),y(x(Y))},[A,$,y]),F=O.useCallback((V,Y)=>{V.preventDefault(),$(Y),p({left:V.pageX,top:V.pageY}),_()},[_,$]);return zXe(),FXe(),BXe(),g.jsxs(g.Fragment,{children:[g.jsxs(le,{className:`event-list-wrapper 
          ${r?"opened":"closed"} 
          ${v?"mobile":""}`,children:[g.jsx(j1,{w:"100%",visible:w,overlayProps:{blur:.2},zIndex:10}),g.jsx($Xe,{onClick:I,openedEventList:r}),r&&g.jsx(fi,{children:C&&g.jsx(PXe,{fadeLeft:t,fadeRight:e,onSingleClick:L,onDoubleClick:z,onContextMenu:F})})]}),g.jsx(Ou,{coord:f,opened:a,close:A,withoutOverlay:!0,padding:10,useOutsideCLick:!0,children:g.jsx(tF,{handleCloseDeleteEventModal:A,event:m.current})}),g.jsx(Ou,{isMobile:v,opened:c,close:R,coord:f,isFull:v,isFullContentHeight:((H=m.current)==null?void 0:H.resource.hasMaterials)||((B=m.current)==null?void 0:B.resource.hasParticipant),children:g.jsx(dC,{isMobile:v,handleCloseDetailsModal:R,event:o})})]})},HXe=t=>{const{event:e,setModalCoords:n,setShowEventDetailsModal:r,setSelectedEvent:s,handleEventContentMenu:i}=t,o=Ln.language,a=Il(e.resource),l=ve(Yo),c=Kt(),d=nO(),{color:f,name:p}=e.resource.calendarId?l[e.resource.calendarId]:{color:"",name:""},m=O.useRef(null),v=Br(),y=async()=>{const w=a!==mt.FreeBusy&&a!==mt.Read;await c(Tu({id:Number(e.id),calendarsGroup:l,startDate:e.start,isAllDay:e.allDay})),e.resource.hasMaterials&&w&&c($d(Number(e.id)))},x=O.useCallback(async w=>{n({left:w.clientX,top:w.clientY}),s(e),r(!0),y()},[r,l,c,e,n,s]);return _de({onSingleClick:w=>{x(w)},onDoubleClick:()=>{v(d(e))},ref:m,latency:250,event:e}),g.jsxs($r.Tr,{ref:m,className:"table-row",onContextMenu:w=>i(w,e),children:[g.jsx($r.Td,{children:g.jsx(He,{c:"gray.6",fz:"sm",children:St(e.start,"dd MMMM yyyy, EEEE",!1,o)})}),g.jsx($r.Td,{children:g.jsxs(vt,{align:"center",children:[g.jsx(ah,{size:18,style:{color:f}}),g.jsx(He,{ml:5,fz:"md",children:p})]})}),g.jsx($r.Td,{children:g.jsx(vt,{align:"center",children:g.jsxs(He,{fz:"md",children:[St(e.start,"HH:mm")," - ",St(e.end,"HH:mm")]})})}),g.jsx($r.Td,{children:g.jsxs(He,{w:150,truncate:!0,fz:"md",children:[" ",e.title]})})]},e.id)},qXe=t=>{const e=Ve.c(16),{events:n,onSingleClick:r}=t,s=Br(),{t:i}=yt(),o=ve(D$),a=ve(cie),[l]=OA(o,300),[c,d]=O.useState(400);let f,p;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{d(window.innerHeight-64)},p=[],e[0]=f,e[1]=p):(f=e[0],p=e[1]),O.useEffect(f,p);let m;e[2]!==n||e[3]!==a||e[4]!==s||e[5]!==r?(m=a==="pending"?g.jsx(vt,{justify:"center",children:g.jsx(zi,{size:"sm",color:"gray",type:"dots"})}):n.map(x=>g.jsxs(le,{children:[g.jsx(ofe,{event:x,onSingleClick:r,onContextMenu:UXe,onDoubleClick:()=>s(`/event/${x.id}/${St(x.start,"yyyy-MM-dd")}`)}),g.jsx(vn,{h:10})]},`${x.id}-${x.title}-${x.start}`)),e[2]=n,e[3]=a,e[4]=s,e[5]=r,e[6]=m):m=e[6];let v;e[7]!==l||e[8]!==n.length||e[9]!==a||e[10]!==i?(v=!n.length&&!!l&&a!=="pending"&&g.jsx(vt,{justify:"center",mt:20,children:g.jsx(He,{children:i("feedBacks.nothingFound")})}),e[7]=l,e[8]=n.length,e[9]=a,e[10]=i,e[11]=v):v=e[11];let y;return e[12]!==c||e[13]!==m||e[14]!==v?(y=g.jsxs(Qs.Autosize,{mah:c,maw:400,children:[m,v]}),e[12]=c,e[13]=m,e[14]=v,e[15]=y):y=e[15],y};function UXe(){}const lfe=()=>{const t=ve(aie),e=Kt(),[n,r]=O.useState(!1),[s,i]=O.useState(),[o,a]=O.useState({left:0,top:0}),[l,c]=O.useState({top:0,left:0}),[d,f]=O.useState(!1),p=ve(die),m=ve(Yo),v=ve(D$),[y]=OA(v,300),[x,w]=O.useState(!1),C=ve(cie),E=O.useCallback(()=>{e(K_()),r(!1)},[]),{t:D}=yt(),{isMobile:T}=Yt(),A=g.jsxs($r.Tr,{children:[g.jsx($r.Th,{children:D("eventSearch.table.date")}),g.jsx($r.Th,{children:D("eventSearch.table.calendar")}),g.jsx($r.Th,{children:D("eventSearch.table.time")}),g.jsx($r.Th,{children:D("eventSearch.table.name")})]}),_=O.useCallback(()=>f(!1),[f]),R=O.useCallback(()=>f(!0),[f]),N=O.useCallback((F,q)=>{F.preventDefault(),i(q),c({left:F.pageX,top:F.pageY}),R()},[R]),I=O.useCallback(()=>{e(M$({opened:!1,event:null}))},[e]),$=O.useCallback(async()=>{w(!0),await e(Yp(Number(s.id))),I(),w(!1)},[s]),L=async F=>{await e(Tu({id:Number(F.id),calendarsGroup:m,startDate:F.start,isAllDay:F.allDay})),F.resource.hasMaterials&&e($d(Number(F.id)))},z=O.useCallback((F,q)=>{a({left:F.clientX,top:F.clientY}),i(q),r(!0),L(q)},[]);return g.jsxs(le,{className:"search-list-container",children:[T?g.jsx(qXe,{onSingleClick:z,onContextMenu:()=>{},onDoubleClick:()=>{},events:t}):g.jsxs(Qs,{style:{height:"calc(100vh - 91px)"},children:[g.jsxs($r,{verticalSpacing:"lg",highlightOnHover:!0,children:[g.jsx($r.Thead,{children:A}),g.jsx($r.Tbody,{children:C==="pending"?g.jsx($r.Tr,{children:g.jsx($r.Td,{colSpan:4,align:"center",children:g.jsx(JA,{children:g.jsx(zi,{color:"gray",type:"dots"})})})}):t.map(F=>g.jsx(HXe,{setModalCoords:a,handleEventContentMenu:N,setShowEventDetailsModal:r,setSelectedEvent:i,event:F},`${F.id}-${F.title}-${F.start}`))})]}),!t.length&&!!y&&C!=="pending"&&g.jsx(vt,{justify:"center",mt:20,children:g.jsx(He,{children:D("feedBacks.nothingFound")})})]}),g.jsx(Ou,{coord:l,opened:d,close:_,withoutOverlay:!0,padding:10,useOutsideCLick:!0,children:g.jsx(tF,{handleCloseDeleteEventModal:_,event:s})}),g.jsx(Ou,{coord:o,opened:n,close:E,isMobile:T,isFull:T,children:s&&g.jsx(dC,{isMobile:T,handleCloseDetailsModal:E,event:s})}),g.jsx(Eh,{opened:p.opened,handleConfirm:$,handleCancel:I,data:e3,blockSaveButton:x})]})};function VXe(t){return Object.prototype.toString.call(t)==="[object Object]"}function OX(t){return VXe(t)||Array.isArray(t)}function WXe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function nF(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;const s=JSON.stringify(Object.keys(t.breakpoints||{})),i=JSON.stringify(Object.keys(e.breakpoints||{}));return s!==i?!1:n.every(o=>{const a=t[o],l=e[o];return typeof a=="function"?`${a}`==`${l}`:!OX(a)||!OX(l)?a===l:nF(a,l)})}function RX(t){return t.concat().sort((e,n)=>e.name>n.name?1:-1).map(e=>e.options)}function YXe(t,e){if(t.length!==e.length)return!1;const n=RX(t),r=RX(e);return n.every((s,i)=>{const o=r[i];return nF(s,o)})}function rF(t){return typeof t=="number"}function LP(t){return typeof t=="string"}function oO(t){return typeof t=="boolean"}function NX(t){return Object.prototype.toString.call(t)==="[object Object]"}function ps(t){return Math.abs(t)}function sF(t){return Math.sign(t)}function aS(t,e){return ps(t-e)}function GXe(t,e){if(t===0||e===0||ps(t)<=ps(e))return 0;const n=aS(ps(t),ps(e));return ps(n/t)}function KXe(t){return Math.round(t*100)/100}function ew(t){return tw(t).map(Number)}function yc(t){return t[mC(t)]}function mC(t){return Math.max(0,t.length-1)}function iF(t,e){return e===mC(t)}function jX(t,e=0){return Array.from(Array(t),(n,r)=>e+r)}function tw(t){return Object.keys(t)}function cfe(t,e){return[t,e].reduce((n,r)=>(tw(r).forEach(s=>{const i=n[s],o=r[s],a=NX(i)&&NX(o);n[s]=a?cfe(i,o):o}),n),{})}function PP(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function ZXe(t,e){const n={start:r,center:s,end:i};function r(){return 0}function s(l){return i(l)/2}function i(l){return e-l}function o(l,c){return LP(t)?n[t](l):t(e,l,c)}return{measure:o}}function nw(){let t=[];function e(s,i,o,a={passive:!0}){let l;if("addEventListener"in s)s.addEventListener(i,o,a),l=()=>s.removeEventListener(i,o,a);else{const c=s;c.addListener(o),l=()=>c.removeListener(o)}return t.push(l),r}function n(){t=t.filter(s=>s())}const r={add:e,clear:n};return r}function JXe(t,e,n,r){const s=nw(),i=1e3/60;let o=null,a=0,l=0;function c(){s.add(t,"visibilitychange",()=>{t.hidden&&v()})}function d(){m(),s.clear()}function f(x){if(!l)return;o||(o=x,n(),n());const w=x-o;for(o=x,a+=w;a>=i;)n(),a-=i;const C=a/i;r(C),l&&(l=e.requestAnimationFrame(f))}function p(){l||(l=e.requestAnimationFrame(f))}function m(){e.cancelAnimationFrame(l),o=null,a=0,l=0}function v(){o=null,a=0}return{init:c,destroy:d,start:p,stop:m,update:n,render:r}}function XXe(t,e){const n=e==="rtl",r=t==="y",s=r?"y":"x",i=r?"x":"y",o=!r&&n?-1:1,a=d(),l=f();function c(v){const{height:y,width:x}=v;return r?y:x}function d(){return r?"top":n?"right":"left"}function f(){return r?"bottom":n?"left":"right"}function p(v){return v*o}return{scroll:s,cross:i,startEdge:a,endEdge:l,measureSize:c,direction:p}}function rv(t=0,e=0){const n=ps(t-e);function r(c){return c<t}function s(c){return c>e}function i(c){return r(c)||s(c)}function o(c){return i(c)?r(c)?t:e:c}function a(c){return n?c-n*Math.ceil((c-e)/n):c}return{length:n,max:e,min:t,constrain:o,reachedAny:i,reachedMax:s,reachedMin:r,removeOffset:a}}function ufe(t,e,n){const{constrain:r}=rv(0,t),s=t+1;let i=o(e);function o(p){return n?ps((s+p)%s):r(p)}function a(){return i}function l(p){return i=o(p),f}function c(p){return d().set(a()+p)}function d(){return ufe(t,a(),n)}const f={get:a,set:l,add:c,clone:d};return f}function QXe(t,e,n,r,s,i,o,a,l,c,d,f,p,m,v,y,x,w,C){const{cross:E,direction:D}=t,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},_=nw(),R=nw(),N=rv(50,225).constrain(m.measure(20)),I={mouse:300,touch:400},$={mouse:500,touch:600},L=v?43:25;let z=!1,F=0,q=0,H=!1,B=!1,V=!1,Y=!1;function G(de){if(!C)return;function me(De){(oO(C)||C(de,De))&&ne(De)}const Se=e;_.add(Se,"dragstart",De=>De.preventDefault(),A).add(Se,"touchmove",()=>{},A).add(Se,"touchend",()=>{}).add(Se,"touchstart",me).add(Se,"mousedown",me).add(Se,"touchcancel",oe).add(Se,"contextmenu",oe).add(Se,"click",ce,!0)}function W(){_.clear(),R.clear()}function Z(){const de=Y?n:e;R.add(de,"touchmove",ee,A).add(de,"touchend",oe).add(de,"mousemove",ee,A).add(de,"mouseup",oe)}function Q(de){const me=de.nodeName||"";return T.includes(me)}function X(){return(v?$:I)[Y?"mouse":"touch"]}function re(de,me){const Se=f.add(sF(de)*-1),De=d.byDistance(de,!v).distance;return v||ps(de)<N?De:x&&me?De*.5:d.byIndex(Se.get(),0).distance}function ne(de){const me=PP(de,r);Y=me,V=v&&me&&!de.buttons&&z,z=aS(s.get(),o.get())>=2,!(me&&de.button!==0)&&(Q(de.target)||(H=!0,i.pointerDown(de),c.useFriction(0).useDuration(0),s.set(o),Z(),F=i.readPoint(de),q=i.readPoint(de,E),p.emit("pointerDown")))}function ee(de){if(!PP(de,r)&&de.touches.length>=2)return oe(de);const Se=i.readPoint(de),De=i.readPoint(de,E),Ae=aS(Se,F),fe=aS(De,q);if(!B&&!Y&&(!de.cancelable||(B=Ae>fe,!B)))return oe(de);const Te=i.pointerMove(de);Ae>y&&(V=!0),c.useFriction(.3).useDuration(.75),a.start(),s.add(D(Te)),de.preventDefault()}function oe(de){const Se=d.byDistance(0,!1).index!==f.get(),De=i.pointerUp(de)*X(),Ae=re(D(De),Se),fe=GXe(De,Ae),Te=L-10*fe,Ne=w+fe/50;B=!1,H=!1,R.clear(),c.useDuration(Te).useFriction(Ne),l.distance(Ae,!v),Y=!1,p.emit("pointerUp")}function ce(de){V&&(de.stopPropagation(),de.preventDefault(),V=!1)}function ue(){return H}return{init:G,destroy:W,pointerDown:ue}}function eQe(t,e){let r,s;function i(f){return f.timeStamp}function o(f,p){const v=`client${(p||t.scroll)==="x"?"X":"Y"}`;return(PP(f,e)?f:f.touches[0])[v]}function a(f){return r=f,s=f,o(f)}function l(f){const p=o(f)-o(s),m=i(f)-i(r)>170;return s=f,m&&(r=f),p}function c(f){if(!r||!s)return 0;const p=o(s)-o(r),m=i(f)-i(r),v=i(f)-i(s)>170,y=p/m;return m&&!v&&ps(y)>.1?y:0}return{pointerDown:a,pointerMove:l,pointerUp:c,readPoint:o}}function tQe(){function t(n){const{offsetTop:r,offsetLeft:s,offsetWidth:i,offsetHeight:o}=n;return{top:r,right:s+i,bottom:r+o,left:s,width:i,height:o}}return{measure:t}}function nQe(t){function e(r){return t*(r/100)}return{measure:e}}function rQe(t,e,n,r,s,i,o){const a=[t].concat(r);let l,c,d=[],f=!1;function p(x){return s.measureSize(o.measure(x))}function m(x){if(!i)return;c=p(t),d=r.map(p);function w(C){for(const E of C){if(f)return;const D=E.target===t,T=r.indexOf(E.target),A=D?c:d[T],_=p(D?t:r[T]);if(ps(_-A)>=.5){x.reInit(),e.emit("resize");break}}}l=new ResizeObserver(C=>{(oO(i)||i(x,C))&&w(C)}),n.requestAnimationFrame(()=>{a.forEach(C=>l.observe(C))})}function v(){f=!0,l&&l.disconnect()}return{init:m,destroy:v}}function sQe(t,e,n,r,s,i){let o=0,a=0,l=s,c=i,d=t.get(),f=0;function p(){const A=r.get()-t.get(),_=!l;let R=0;return _?(o=0,n.set(r),t.set(r),R=A):(n.set(t),o+=A/l,o*=c,d+=o,t.add(o),R=d-f),a=sF(R),f=d,T}function m(){const A=r.get()-e.get();return ps(A)<.001}function v(){return l}function y(){return a}function x(){return o}function w(){return E(s)}function C(){return D(i)}function E(A){return l=A,T}function D(A){return c=A,T}const T={direction:y,duration:v,velocity:x,seek:p,settled:m,useBaseFriction:C,useBaseDuration:w,useFriction:D,useDuration:E};return T}function iQe(t,e,n,r,s){const i=s.measure(10),o=s.measure(50),a=rv(.1,.99);let l=!1;function c(){return!(l||!t.reachedAny(n.get())||!t.reachedAny(e.get()))}function d(m){if(!c())return;const v=t.reachedMin(e.get())?"min":"max",y=ps(t[v]-e.get()),x=n.get()-e.get(),w=a.constrain(y/o);n.subtract(x*w),!m&&ps(x)<i&&(n.set(t.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(m){l=!m}return{shouldConstrain:c,constrain:d,toggleActive:f}}function oQe(t,e,n,r,s){const i=rv(-e+t,0),o=f(),a=d(),l=p();function c(v,y){return aS(v,y)<=1}function d(){const v=o[0],y=yc(o),x=o.lastIndexOf(v),w=o.indexOf(y)+1;return rv(x,w)}function f(){return n.map((v,y)=>{const{min:x,max:w}=i,C=i.constrain(v),E=!y,D=iF(n,y);return E?w:D||c(x,C)?x:c(w,C)?w:C}).map(v=>parseFloat(v.toFixed(3)))}function p(){if(e<=t+s)return[i.max];if(r==="keepSnaps")return o;const{min:v,max:y}=a;return o.slice(v,y)}return{snapsContained:l,scrollContainLimit:a}}function aQe(t,e,n){const r=e[0],s=n?r-t:yc(e);return{limit:rv(s,r)}}function lQe(t,e,n,r){const i=e.min+.1,o=e.max+.1,{reachedMin:a,reachedMax:l}=rv(i,o);function c(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function d(p){if(!c(p))return;const m=t*(p*-1);r.forEach(v=>v.add(m))}return{loop:d}}function cQe(t){const{max:e,length:n}=t;function r(i){const o=i-e;return n?o/-n:0}return{get:r}}function uQe(t,e,n,r,s){const{startEdge:i,endEdge:o}=t,{groupSlides:a}=s,l=f().map(e.measure),c=p(),d=m();function f(){return a(r).map(y=>yc(y)[o]-y[0][i]).map(ps)}function p(){return r.map(y=>n[i]-y[i]).map(y=>-ps(y))}function m(){return a(c).map(y=>y[0]).map((y,x)=>y+l[x])}return{snaps:c,snapsAligned:d}}function dQe(t,e,n,r,s,i){const{groupSlides:o}=s,{min:a,max:l}=r,c=d();function d(){const p=o(i),m=!t||e==="keepSnaps";return n.length===1?[i]:m?p:p.slice(a,l).map((v,y,x)=>{const w=!y,C=iF(x,y);if(w){const E=yc(x[0])+1;return jX(E)}if(C){const E=mC(i)-yc(x)[0]+1;return jX(E,yc(x)[0])}return v})}return{slideRegistry:c}}function fQe(t,e,n,r,s){const{reachedAny:i,removeOffset:o,constrain:a}=r;function l(v){return v.concat().sort((y,x)=>ps(y)-ps(x))[0]}function c(v){const y=t?o(v):a(v),x=e.map((C,E)=>({diff:d(C-y,0),index:E})).sort((C,E)=>ps(C.diff)-ps(E.diff)),{index:w}=x[0];return{index:w,distance:y}}function d(v,y){const x=[v,v+n,v-n];if(!t)return v;if(!y)return l(x);const w=x.filter(C=>sF(C)===y);return w.length?l(w):yc(x)-n}function f(v,y){const x=e[v]-s.get(),w=d(x,y);return{index:v,distance:w}}function p(v,y){const x=s.get()+v,{index:w,distance:C}=c(x),E=!t&&i(x);if(!y||E)return{index:w,distance:v};const D=e[w]-C,T=v+d(D,0);return{index:w,distance:T}}return{byDistance:p,byIndex:f,shortcut:d}}function pQe(t,e,n,r,s,i,o){function a(f){const p=f.distance,m=f.index!==e.get();i.add(p),p&&(r.duration()?t.start():(t.update(),t.render(1),t.update())),m&&(n.set(e.get()),e.set(f.index),o.emit("select"))}function l(f,p){const m=s.byDistance(f,p);a(m)}function c(f,p){const m=e.clone().set(f),v=s.byIndex(m.get(),p);a(v)}return{distance:l,index:c}}function hQe(t,e,n,r,s,i,o,a){const l={passive:!0,capture:!0};let c=0;function d(m){if(!a)return;function v(y){if(new Date().getTime()-c>10)return;o.emit("slideFocusStart"),t.scrollLeft=0;const C=n.findIndex(E=>E.includes(y));rF(C)&&(s.useDuration(0),r.index(C,0),o.emit("slideFocus"))}i.add(document,"keydown",f,!1),e.forEach((y,x)=>{i.add(y,"focus",w=>{(oO(a)||a(m,w))&&v(x)},l)})}function f(m){m.code==="Tab"&&(c=new Date().getTime())}return{init:d}}function Lx(t){let e=t;function n(){return e}function r(l){e=o(l)}function s(l){e+=o(l)}function i(l){e-=o(l)}function o(l){return rF(l)?l:l.get()}return{get:n,set:r,add:s,subtract:i}}function dfe(t,e){const n=t.scroll==="x"?o:a,r=e.style;let s=null,i=!1;function o(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(i)return;const m=KXe(t.direction(p));m!==s&&(r.transform=n(m),s=m)}function c(p){i=!p}function d(){i||(r.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:d,to:l,toggleActive:c}}function mQe(t,e,n,r,s,i,o,a,l){const d=ew(s),f=ew(s).reverse(),p=w().concat(C());function m(_,R){return _.reduce((N,I)=>N-s[I],R)}function v(_,R){return _.reduce((N,I)=>m(N,R)>0?N.concat([I]):N,[])}function y(_){return i.map((R,N)=>({start:R-r[N]+.5+_,end:R+e-.5+_}))}function x(_,R,N){const I=y(R);return _.map($=>{const L=N?0:-n,z=N?n:0,F=N?"end":"start",q=I[$][F];return{index:$,loopPoint:q,slideLocation:Lx(-1),translate:dfe(t,l[$]),target:()=>a.get()>q?L:z}})}function w(){const _=o[0],R=v(f,_);return x(R,n,!1)}function C(){const _=e-o[0]-1,R=v(d,_);return x(R,-n,!0)}function E(){return p.every(({index:_})=>{const R=d.filter(N=>N!==_);return m(R,e)<=.1})}function D(){p.forEach(_=>{const{target:R,translate:N,slideLocation:I}=_,$=R();$!==I.get()&&(N.to($),I.set($))})}function T(){p.forEach(_=>_.translate.clear())}return{canLoop:E,clear:T,loop:D,loopPoints:p}}function gQe(t,e,n){let r,s=!1;function i(l){if(!n)return;function c(d){for(const f of d)if(f.type==="childList"){l.reInit(),e.emit("slidesChanged");break}}r=new MutationObserver(d=>{s||(oO(n)||n(l,d))&&c(d)}),r.observe(t,{childList:!0})}function o(){r&&r.disconnect(),s=!0}return{init:i,destroy:o}}function vQe(t,e,n,r){const s={};let i=null,o=null,a,l=!1;function c(){a=new IntersectionObserver(v=>{l||(v.forEach(y=>{const x=e.indexOf(y.target);s[x]=y}),i=null,o=null,n.emit("slidesInView"))},{root:t.parentElement,threshold:r}),e.forEach(v=>a.observe(v))}function d(){a&&a.disconnect(),l=!0}function f(v){return tw(s).reduce((y,x)=>{const w=parseInt(x),{isIntersecting:C}=s[w];return(v&&C||!v&&!C)&&y.push(w),y},[])}function p(v=!0){if(v&&i)return i;if(!v&&o)return o;const y=f(v);return v&&(i=y),v||(o=y),y}return{init:c,destroy:d,get:p}}function yQe(t,e,n,r,s,i){const{measureSize:o,startEdge:a,endEdge:l}=t,c=n[0]&&s,d=v(),f=y(),p=n.map(o),m=x();function v(){if(!c)return 0;const C=n[0];return ps(e[a]-C[a])}function y(){if(!c)return 0;const C=i.getComputedStyle(yc(r));return parseFloat(C.getPropertyValue(`margin-${l}`))}function x(){return n.map((C,E,D)=>{const T=!E,A=iF(D,E);return T?p[E]+d:A?p[E]+f:D[E+1][a]-C[a]}).map(ps)}return{slideSizes:p,slideSizesWithGaps:m,startGap:d,endGap:f}}function bQe(t,e,n,r,s,i,o,a,l){const{startEdge:c,endEdge:d,direction:f}=t,p=rF(n);function m(w,C){return ew(w).filter(E=>E%C===0).map(E=>w.slice(E,E+C))}function v(w){return w.length?ew(w).reduce((C,E,D)=>{const T=yc(C)||0,A=T===0,_=E===mC(w),R=s[c]-i[T][c],N=s[c]-i[E][d],I=!r&&A?f(o):0,$=!r&&_?f(a):0,L=ps(N-$-(R+I));return D&&L>e+l&&C.push(E),_&&C.push(w.length),C},[]).map((C,E,D)=>{const T=Math.max(D[E-1]||0);return w.slice(T,C)}):[]}function y(w){return p?m(w,n):v(w)}return{groupSlides:y}}function xQe(t,e,n,r,s,i,o){const{align:a,axis:l,direction:c,startIndex:d,loop:f,duration:p,dragFree:m,dragThreshold:v,inViewThreshold:y,slidesToScroll:x,skipSnaps:w,containScroll:C,watchResize:E,watchSlides:D,watchDrag:T,watchFocus:A}=i,_=2,R=tQe(),N=R.measure(e),I=n.map(R.measure),$=XXe(l,c),L=$.measureSize(N),z=nQe(L),F=ZXe(a,L),q=!f&&!!C,H=f||!!C,{slideSizes:B,slideSizesWithGaps:V,startGap:Y,endGap:G}=yQe($,N,I,n,H,s),W=bQe($,L,x,f,N,I,Y,G,_),{snaps:Z,snapsAligned:Q}=uQe($,F,N,I,W),X=-yc(Z)+yc(V),{snapsContained:re,scrollContainLimit:ne}=oQe(L,X,Q,C,_),ee=q?re:Q,{limit:oe}=aQe(X,ee,f),ce=ufe(mC(ee),d,f),ue=ce.clone(),pe=ew(n),de=({dragHandler:lt,scrollBody:At,scrollBounds:jt,options:{loop:Ot}})=>{Ot||jt.constrain(lt.pointerDown()),At.seek()},me=({scrollBody:lt,translate:At,location:jt,offsetLocation:Ot,previousLocation:Pt,scrollLooper:Rt,slideLooper:Nt,dragHandler:Fn,animation:pn,eventHandler:hn,scrollBounds:On,options:{loop:Vt}},an)=>{const xn=lt.settled(),Ts=!On.shouldConstrain(),Hr=Vt?xn:xn&&Ts,As=Hr&&!Fn.pointerDown();As&&pn.stop();const Rr=jt.get()*an+Pt.get()*(1-an);Ot.set(Rr),Vt&&(Rt.loop(lt.direction()),Nt.loop()),At.to(Ot.get()),As&&hn.emit("settle"),Hr||hn.emit("scroll")},Se=JXe(r,s,()=>de(ut),lt=>me(ut,lt)),De=.68,Ae=ee[ce.get()],fe=Lx(Ae),Te=Lx(Ae),Ne=Lx(Ae),Ue=Lx(Ae),rt=sQe(fe,Ne,Te,Ue,p,De),ot=fQe(f,ee,X,oe,Ue),Je=pQe(Se,ce,ue,rt,ot,Ue,o),je=cQe(oe),We=nw(),Le=vQe(e,n,o,y),{slideRegistry:_e}=dQe(q,C,ee,ne,W,pe),Be=hQe(t,n,_e,Je,rt,We,o,A),ut={ownerDocument:r,ownerWindow:s,eventHandler:o,containerRect:N,slideRects:I,animation:Se,axis:$,dragHandler:QXe($,t,r,s,Ue,eQe($,s),fe,Se,Je,rt,ot,ce,o,z,m,v,w,De,T),eventStore:We,percentOfView:z,index:ce,indexPrevious:ue,limit:oe,location:fe,offsetLocation:Ne,previousLocation:Te,options:i,resizeHandler:rQe(e,o,s,n,$,E,R),scrollBody:rt,scrollBounds:iQe(oe,Ne,Ue,rt,z),scrollLooper:lQe(X,oe,Ne,[fe,Ne,Te,Ue]),scrollProgress:je,scrollSnapList:ee.map(je.get),scrollSnaps:ee,scrollTarget:ot,scrollTo:Je,slideLooper:mQe($,L,X,B,V,Z,ee,Ne,n),slideFocus:Be,slidesHandler:gQe(e,o,D),slidesInView:Le,slideIndexes:pe,slideRegistry:_e,slidesToScroll:W,target:Ue,translate:dfe($,e)};return ut}function SQe(){let t={},e;function n(c){e=c}function r(c){return t[c]||[]}function s(c){return r(c).forEach(d=>d(e,c)),l}function i(c,d){return t[c]=r(c).concat([d]),l}function o(c,d){return t[c]=r(c).filter(f=>f!==d),l}function a(){t={}}const l={init:n,emit:s,off:o,on:i,clear:a};return l}const wQe={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function CQe(t){function e(i,o){return cfe(i,o||{})}function n(i){const o=i.breakpoints||{},a=tw(o).filter(l=>t.matchMedia(l).matches).map(l=>o[l]).reduce((l,c)=>e(l,c),{});return e(i,a)}function r(i){return i.map(o=>tw(o.breakpoints||{})).reduce((o,a)=>o.concat(a),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:n,optionsMediaQueries:r}}function EQe(t){let e=[];function n(i,o){return e=o.filter(({options:a})=>t.optionsAtMedia(a).active!==!1),e.forEach(a=>a.init(i,t)),o.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function r(){e=e.filter(i=>i.destroy())}return{init:n,destroy:r}}function EA(t,e,n){const r=t.ownerDocument,s=r.defaultView,i=CQe(s),o=EQe(i),a=nw(),l=SQe(),{mergeOptions:c,optionsAtMedia:d,optionsMediaQueries:f}=i,{on:p,off:m,emit:v}=l,y=$;let x=!1,w,C=c(wQe,EA.globalOptions),E=c(C),D=[],T,A,_;function R(){const{container:pe,slides:de}=E;A=(LP(pe)?t.querySelector(pe):pe)||t.children[0];const Se=LP(de)?A.querySelectorAll(de):de;_=[].slice.call(Se||A.children)}function N(pe){const de=xQe(t,A,_,r,s,pe,l);if(pe.loop&&!de.slideLooper.canLoop()){const me=Object.assign({},pe,{loop:!1});return N(me)}return de}function I(pe,de){x||(C=c(C,pe),E=d(C),D=de||D,R(),w=N(E),f([C,...D.map(({options:me})=>me)]).forEach(me=>a.add(me,"change",$)),E.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(ue),w.eventHandler.init(ue),w.resizeHandler.init(ue),w.slidesHandler.init(ue),w.options.loop&&w.slideLooper.loop(),A.offsetParent&&_.length&&w.dragHandler.init(ue),T=o.init(ue,D)))}function $(pe,de){const me=W();L(),I(c({startIndex:me},pe),de),l.emit("reInit")}function L(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),o.destroy(),a.clear()}function z(){x||(x=!0,a.clear(),L(),l.emit("destroy"),l.clear())}function F(pe,de,me){!E.active||x||(w.scrollBody.useBaseFriction().useDuration(de===!0?0:E.duration),w.scrollTo.index(pe,me||0))}function q(pe){const de=w.index.add(1).get();F(de,pe,-1)}function H(pe){const de=w.index.add(-1).get();F(de,pe,1)}function B(){return w.index.add(1).get()!==W()}function V(){return w.index.add(-1).get()!==W()}function Y(){return w.scrollSnapList}function G(){return w.scrollProgress.get(w.offsetLocation.get())}function W(){return w.index.get()}function Z(){return w.indexPrevious.get()}function Q(){return w.slidesInView.get()}function X(){return w.slidesInView.get(!1)}function re(){return T}function ne(){return w}function ee(){return t}function oe(){return A}function ce(){return _}const ue={canScrollNext:B,canScrollPrev:V,containerNode:oe,internalEngine:ne,destroy:z,off:m,on:p,emit:v,plugins:re,previousScrollSnap:Z,reInit:y,rootNode:ee,scrollNext:q,scrollPrev:H,scrollProgress:G,scrollSnapList:Y,scrollTo:F,selectedScrollSnap:W,slideNodes:ce,slidesInView:Q,slidesNotInView:X};return I(e,n),setTimeout(()=>l.emit("init"),0),ue}EA.globalOptions=void 0;function oF(t={},e=[]){const n=O.useRef(t),r=O.useRef(e),[s,i]=O.useState(),[o,a]=O.useState(),l=O.useCallback(()=>{s&&s.reInit(n.current,r.current)},[s]);return O.useEffect(()=>{nF(n.current,t)||(n.current=t,l())},[t,l]),O.useEffect(()=>{YXe(r.current,e)||(r.current=e,l())},[e,l]),O.useEffect(()=>{if(WXe()&&o){EA.globalOptions=oF.globalOptions;const c=EA(o,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[o,i]),[a,s]}oF.globalOptions=void 0;const[MQe,DQe]=Ys("Carousel component was not found in tree");var aF={root:"m_17884d0f",viewport:"m_a2dae653",container:"m_fcd81474",controls:"m_39bc3463",control:"m_64f58e10",indicators:"m_71ea3ab1",indicator:"m_eae68602",slide:"m_d98df724"};const lF=Fe((t,e)=>{const{classNames:n,className:r,style:s,styles:i,vars:o,mod:a,...l}=Ce("CarouselSlide",null,t),c=DQe();return g.jsx(le,{ref:e,mod:[{orientation:c.orientation},a],...c.getStyles("slide",{className:r,style:s,classNames:n,styles:i}),...l})});lF.classes=aF;lF.displayName="@mantine/carousel/CarouselSlide";function kQe({slideGap:t,slideSize:e,selector:n}){const r=Dr(),s=Bu({"--carousel-slide-gap":Er(Po(t)),"--carousel-slide-size":Ee(Po(e))}),i=ir(r.breakpoints).reduce((l,c)=>(l[c]||(l[c]={}),typeof t=="object"&&t[c]!==void 0&&(l[c]["--carousel-slide-gap"]=Er(t[c])),typeof e=="object"&&e[c]!==void 0&&(l[c]["--carousel-slide-size"]=Er(e[c])),l),{}),a=Wy(ir(i),r.breakpoints).filter(l=>ir(i[l.value]).length>0).map(l=>({query:`(min-width: ${r.breakpoints[l.value]})`,styles:i[l.value]}));return g.jsx(ef,{styles:s,media:a,selector:n})}function IX(t){return typeof t=="object"&&t!==null?ir(t):[]}function TQe(t){return t.sort((e,n)=>Lg(e)-Lg(n))}function AQe({slideGap:t,slideSize:e}){const n=Array.from(new Set([...IX(t),...IX(e)]));return TQe(n)}function _Qe({slideGap:t,slideSize:e,selector:n}){const r=Bu({"--carousel-slide-gap":Er(Po(t)),"--carousel-slide-size":Ee(Po(e))}),s=AQe({slideGap:t,slideSize:e}).reduce((o,a)=>(o[a]||(o[a]={}),typeof t=="object"&&t[a]!==void 0&&(o[a]["--carousel-slide-gap"]=Er(t[a])),typeof e=="object"&&e[a]!==void 0&&(o[a]["--carousel-slide-size"]=Er(e[a])),o),{}),i=Object.keys(s).map(o=>({query:`carousel (min-width: ${o})`,styles:s[o]}));return g.jsx(ef,{styles:r,container:i,selector:n})}function LX({dir:t,orientation:e,direction:n}){return n==="previous"?e==="horizontal"?90*(t==="ltr"?1:-1):-180:e==="horizontal"?90*(t==="ltr"?-1:1):0}const OQe={controlSize:26,controlsOffset:"sm",slideSize:"100%",slideGap:0,orientation:"horizontal",includeGapInSize:!0,initialSlide:0,withControls:!0,withIndicators:!1,withKeyboardEvents:!0,type:"media"},RQe={align:"center",loop:!1,slidesToScroll:1,dragFree:!1,inViewThreshold:0,skipSnaps:!1,containScroll:"trimSnaps"},NQe=(t,{height:e,controlSize:n,controlsOffset:r})=>({root:{"--carousel-height":Ee(e),"--carousel-control-size":Ee(n),"--carousel-controls-offset":Er(r)}}),rw=Fe((t,e)=>{const n=Ce("Carousel",OQe,t),{classNames:r,className:s,style:i,styles:o,unstyled:a,vars:l,children:c,getEmblaApi:d,onNextSlide:f,onPreviousSlide:p,onSlideChange:m,nextControlProps:v,previousControlProps:y,controlSize:x,controlsOffset:w,slideSize:C,slideGap:E,orientation:D,height:T,includeGapInSize:A,draggable:_,initialSlide:R,withControls:N,withIndicators:I,plugins:$,nextControlIcon:L,previousControlIcon:z,withKeyboardEvents:F,mod:q,type:H,emblaOptions:B,attributes:V,...Y}=n,G=bt({name:"Carousel",classes:aF,props:n,className:s,style:i,classNames:r,styles:o,unstyled:a,attributes:V,vars:l,varsResolver:NQe}),W=E1(),{dir:Z}=Hu(),[Q,X]=oF({axis:D==="horizontal"?"x":"y",direction:D==="horizontal"?Z:void 0,startIndex:R,...RQe,...B},$),[re,ne]=O.useState(0),[ee,oe]=O.useState(0),ce=O.useCallback(fe=>X&&X.scrollTo(fe),[X]),ue=O.useCallback(()=>{if(!X)return;const fe=X.selectedScrollSnap();ne(fe),fe!==re&&(m==null||m(fe))},[X,ne,m,re]),pe=O.useCallback(()=>{X==null||X.scrollPrev(),p==null||p()},[X]),de=O.useCallback(()=>{X==null||X.scrollNext(),f==null||f()},[X]),me=O.useCallback(fe=>{F&&(fe.key==="ArrowRight"&&(fe.preventDefault(),de()),fe.key==="ArrowLeft"&&(fe.preventDefault(),pe()))},[X]);O.useEffect(()=>{if(X)return d==null||d(X),ue(),oe(X.scrollSnapList().length),X.on("select",ue),()=>{X.off("select",ue)}},[X,B==null?void 0:B.slidesToScroll,ue]),O.useEffect(()=>{X&&(X.reInit(),oe(X.scrollSnapList().length),ne(fe=>Eu(fe,0,O.Children.toArray(c).length-1)))},[O.Children.toArray(c).length,B==null?void 0:B.slidesToScroll]);const Se=(X==null?void 0:X.canScrollPrev())||!1,De=(X==null?void 0:X.canScrollNext())||!1,Ae=Array(ee).fill(0).map((fe,Te)=>O.createElement(or,{...G("indicator"),key:Te,"data-active":Te===re||void 0,"aria-hidden":!0,tabIndex:-1,onClick:()=>ce(Te),"data-orientation":D,onMouseDown:Ne=>Ne.preventDefault()}));return g.jsxs(MQe,{value:{getStyles:G,orientation:D},children:[H==="container"?g.jsx(_Qe,{...n,selector:`.${W}`}):g.jsx(kQe,{...n,selector:`.${W}`}),g.jsxs(le,{ref:e,...G("root",{className:"responsiveClassName"}),...Y,mod:[{orientation:D,"include-gap-in-size":A},q],onKeyDownCapture:me,children:[N&&g.jsxs("div",{...G("controls"),"data-orientation":D,children:[g.jsx(or,{...y,...G("control",{className:y==null?void 0:y.className,style:y==null?void 0:y.style}),onClick:fe=>{var Te;pe(),(Te=y==null?void 0:y.onClick)==null||Te.call(y,fe)},"data-inactive":!Se||void 0,"data-type":"previous",tabIndex:Se?0:-1,children:typeof z<"u"?z:g.jsx(rh,{style:{transform:`rotate(${LX({dir:Z,orientation:D,direction:"previous"})}deg)`}})}),g.jsx(or,{...G("control",{className:v==null?void 0:v.className,style:v==null?void 0:v.style}),...v,onClick:fe=>{var Te;de(),(Te=v==null?void 0:v.onClick)==null||Te.call(v,fe)},"data-inactive":!De||void 0,"data-type":"next",tabIndex:De?0:-1,children:typeof L<"u"?L:g.jsx(rh,{style:{transform:`rotate(${LX({dir:Z,orientation:D,direction:"next"})}deg)`}})})]}),g.jsx("div",{...G("viewport"),ref:Q,"data-type":H,children:g.jsx("div",{...G("container",{className:W}),"data-orientation":D,children:c})}),I&&g.jsx("div",{...G("indicators"),"data-orientation":D,children:Ae})]})]})});rw.classes=aF;rw.displayName="@mantine/carousel/Carousel";rw.Slide=lF;const PX=(t,e)=>{const n=t.getAttribute("aria-label");return nt.fromFormat(n,"d MMMM yyyy",{locale:e}).toJSDate()},jQe=t=>{const e=Ve.c(6),n=ve(hC),r=Kt(),{i18n:s}=yt();let i;e[0]!==r||e[1]!==s?(i=()=>{var w,C;const a=document.querySelector(".mobile-date-picker"),l=a==null?void 0:a.querySelector(".mantine-Month-monthTbody"),c=l==null?void 0:l.firstChild,d=l==null?void 0:l.lastChild,f=(w=c==null?void 0:c.firstChild)==null?void 0:w.firstChild,p=(C=d==null?void 0:d.lastChild)==null?void 0:C.firstChild;let m=new Date,v=new Date;f&&(m=Lt(PX(f,s.language))),p&&(v=Lt(PX(p,s.language)));const y=Ade({start:m,end:v}),x=S$(y);r(Yde(x))},e[0]=r,e[1]=s,e[2]=i):i=e[2];let o;e[3]!==n||e[4]!==t?(o=[t,n],e[3]=n,e[4]=t,e[5]=o):o=e[5],O.useEffect(i,o)},IQe=()=>{const t=O.useRef(1),[e,n]=O.useState(1),r=ve(Pl),s=Kt(),{i18n:i}=yt(),o=rfe();jQe(r);const a=()=>{const m=Es(r,{month:1});s(gc(m)),s(wu(m))},l=()=>{const m=cv(r,{month:1});s(gc(m)),s(wu(m))},c=m=>{const v=t.current;v!==m&&(v===1&&m===2||v===2&&m===0||v===0&&m===1?a():l())};O.useEffect(()=>{c(e)},[e]);const d=O.useCallback(m=>{qe.isNil(m)||(s(gc(m)),s(wu(m)))},[gc,wu]),f=O.useCallback(m=>{n(v=>(t.current=v,m))},[n]),p=O.useMemo(()=>[0,1,2].map(m=>g.jsx(rw.Slide,{children:g.jsx(pv,{className:"mobile-date-picker",size:"lg",locale:i.language,onChange:AS(d),value:r,date:r})},m)),[r]);return g.jsx("div",{className:"mobile-carousel-container",children:g.jsx(Hie,{settings:{timezone:o},children:g.jsx(rw,{onSlideChange:f,withControls:!1,mx:"auto",initialSlide:1,children:p})})})},LQe=()=>{const t=Ve.c(3),e=ve(Zde),n=O.useRef(null),r=O.useRef(null),s=ve(fv);let i;return t[0]!==e||t[1]!==s?(i=g.jsx(vt,{ref:n,h:"100%",w:"100%",justify:"start",align:"center",direction:"column",children:s?g.jsx(le,{w:"100%",h:"100%",children:g.jsx(le,{children:g.jsx(fi,{withFullPage:!0,children:g.jsx(lfe,{})})})}):g.jsxs(g.Fragment,{children:[g.jsx(e9,{transitionDuration:300,transitionTimingFunction:"linear",in:e,children:g.jsxs(le,{ref:r,children:[g.jsx(fi,{children:g.jsx(IQe,{})}),g.jsx(Bo,{mt:"md"})]})}),g.jsx(le,{w:"100%",h:"100%",children:g.jsx(le,{h:"100%",children:g.jsx(fi,{children:g.jsx(afe,{fadeLeft:PQe,fadeRight:$Qe})})})})]})}),t[0]=e,t[1]=s,t[2]=i):i=t[2],i};function PQe(){}function $Qe(){}const zQe=Yu(()=>of(()=>Promise.resolve().then(()=>tZe),void 0)),FQe=()=>{const t=ve(cf),e=ve(hRe),n=ve(zr.isOpen),r=ve(fv),s=ve(fRe),i=ve(dRe),o=ve(yRe),a=ve(pRe),l=ve(fJe),c=ve(lie),d=ve(Yo),f=ve(hC),p=ve(sO),m=ve(kr),{id:v,date:y,isAllDay:x}=Fu(),w=Br(),E=ve(Lh)??uC,D=ve(gRe),T=ve(bRe),A=ve(die),{calendarRef:_,fadeLeft:R,fadeRight:N}=JJe(),[I,$]=O.useState(!1),[L,z]=O.useState(!1),[F,q]=O.useState(!0),[H,B]=O.useState(!0),{isMobile:V}=Yt(),Y=O.useMemo(()=>E===ds.month||E===ds.year,[E]),G=Kt(),W=O.useCallback(async()=>{const{payload:oe}=await G(Tu({id:Number(v),calendarsGroup:d,startDate:new Date(y),isAllDay:x==="true"}));if(w("/",{replace:!0}),oe){$(!0);const ce=oe==null?void 0:oe.AccessType,ue=(oe==null?void 0:oe.OrganizerId)===(m==null?void 0:m.ContactId)||ce!==mt.FreeBusy&&ce!==mt.Read;oe.HasMaterials&&ue&&G($d(Number(v)))}},[G,v,y,d]);O.useEffect(()=>{v&&y&&W()},[v,y,W]),O.useEffect(()=>{if(H&&!V&&!F){const oe=Yg(p);if(qe.isNil(oe)||co(oe.start,oe.end,"day"))return;const ce={body:{CalendarIds:f,StartDate:_n(oe.start),EndDate:_n(oe.end)},calendarsGroup:d,isEdit:!1};G(Dg(ce)).unwrap(),B(!1)}V&&B(!0),q(!1)},[V,p]);const Z=O.useCallback(()=>{G(rie())},[G]),Q=oe=>{G(sie({status:oe,dropEventToDefault:!0}))},X=O.useCallback(()=>{G(OL({opened:!1,event:null,coords:{left:-999,top:-999}}))},[G]),re=O.useCallback(()=>{G(M$({opened:!1,event:null}))},[G]),ne=O.useCallback(()=>{z(!0),G(Yp(Number(A.event.id))),re(),G(_c()),z(!1)},[G,A,re]),ee=O.useCallback(()=>$(!1),[]);return g.jsx(g.Fragment,{children:g.jsxs(le,{className:`react-big-calendar-wrapper ${n?"opened-event-list":"closed-event-list"}`,children:[V?g.jsx(fi,{withFullPage:!0,children:g.jsx(LQe,{})}):g.jsx(le,{className:`${r?"visibleSearchList":"defaultSearchList"}`,children:!l&&g.jsx(fi,{withFullPage:!0,children:g.jsx(zQe,{fadeLeft:R,fadeRight:N,calendarRef:_,isEventListDisplayed:Y,events:c})})}),r&&!V?g.jsx(fi,{withFullPage:!0,children:g.jsx(lfe,{})}):g.jsxs(g.Fragment,{children:[g.jsx(Ou,{coord:T,opened:o,close:X,withoutOverlay:!0,padding:10,useOutsideCLick:!0,children:g.jsx(tF,{handleCloseDeleteEventModal:X,event:t})}),g.jsx(Eh,{opened:A.opened,handleConfirm:ne,handleCancel:re,data:A.event&&b1(A.event,m)?I$:e3,blockSaveButton:L}),g.jsx(Ou,{coord:D,withDrag:!0,close:Z,opened:e,size:467,isMobile:V,isFull:V,children:g.jsx(XJe,{initialEvent:t,handleCloseCreateEventModal:Z})}),i&&g.jsx(sk,{status:"Moved",event:t,close:Q}),a&&g.jsx(sk,{status:"ApplyParticipant",event:t,close:Q}),g.jsx(Ou,{coord:{left:0,top:0},centered:!0,opened:I,close:ee,isMobile:V,children:g.jsx(dC,{isMobile:V,event:t,handleCloseDetailsModal:ee})}),Y&&!V&&g.jsx(afe,{fadeLeft:R,fadeRight:N})]}),s&&g.jsx(sk,{status:"Deleted",event:t,close:Q})]})})},$X="/assets/logo-en-Cd5ZDb0D.svg",BQe="/assets/logo-DvDSHu9P.svg",HQe="/assets/r7-info-bg-CK6upiXH.png",qQe="/assets/r7-logo-full-Bqyi7oVL.svg",UQe="_copyright_8dmtx_1",VQe="_copyrightModalBody_8dmtx_7",WQe="_copyrightWidth_8dmtx_14",YQe="_copyrightHeight_8dmtx_19",GQe="_copyrightText_8dmtx_24",tg={copyright:UQe,copyrightModalBody:VQe,copyrightWidth:WQe,copyrightHeight:YQe,copyrightText:GQe},$P=()=>{const t=Ve.c(47),[e,n]=Ps(!1),{open:r,close:s}=n,{t:i}=yt();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={alignSelf:"center",cursor:"pointer"},t[0]=o):o=t[0];let a;t[1]!==i?(a=i("footer.text"),t[1]=i,t[2]=a):a=t[2];let l;t[3]!==r||t[4]!==a?(l=g.jsx(le,{className:tg.copyright,children:g.jsxs(en,{variant:"light",color:"gray.6",size:"xs",fw:400,radius:"xl",style:o,onClick:r,children:[" ",a," "]})}),t[3]=r,t[4]=a,t[5]=l):l=t[5];let c,d;t[6]===Symbol.for("react.memo_cache_sentinel")?(c={body:tg.copyrightModalBody},d={body:{background:`url(${HQe}) no-repeat right top`,padding:"0",overflow:"hidden"}},t[6]=c,t[7]=d):(c=t[6],d=t[7]);let f,p;t[8]===Symbol.for("react.memo_cache_sentinel")?(f={position:"absolute",right:20,top:20},p=g.jsx(Tc,{}),t[8]=f,t[9]=p):(f=t[8],p=t[9]);let m;t[10]!==s?(m=g.jsx(gn,{variant:"transparent",color:"dark",onClick:s,style:f,children:p}),t[10]=s,t[11]=m):m=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(wt,{children:g.jsx(ov,{src:qQe})}),t[12]=v):v=t[12];let y;t[13]!==i?(y=i("copyrightModal.firstParagraph"),t[13]=i,t[14]=y):y=t[14];let x;t[15]!==y?(x=g.jsx(He,{fz:"sm",mt:"xs",className:tg.copyrightText,children:y}),t[15]=y,t[16]=x):x=t[16];let w;t[17]!==i?(w=i("copyrightModal.secondParagraph"),t[17]=i,t[18]=w):w=t[18];let C;t[19]!==w?(C=g.jsx(He,{fz:"sm",className:tg.copyrightText,children:w}),t[19]=w,t[20]=C):C=t[20];let E;t[21]!==i?(E=i("copyrightModal.thirdParagraph"),t[21]=i,t[22]=E):E=t[22];let D;t[23]!==E?(D=g.jsx(He,{fz:"sm",className:tg.copyrightText,children:E}),t[23]=E,t[24]=D):D=t[24];let T;t[25]!==i?(T=i("copyrightModal.button"),t[25]=i,t[26]=T):T=t[26];let A;t[27]!==T?(A=g.jsx(en,{onClick:KQe,children:T}),t[27]=T,t[28]=A):A=t[28];let _;t[29]!==i?(_=i("copyrightModal.rights"),t[29]=i,t[30]=_):_=t[30];let R;t[31]!==_?(R=g.jsx(He,{fz:"xs",c:"gray.6",children:_}),t[31]=_,t[32]=R):R=t[32];let N;t[33]!==x||t[34]!==C||t[35]!==D||t[36]!==A||t[37]!==R?(N=g.jsx(Is,{pt:"xl",pb:"md",px:"xl",h:380,className:tg.copyrightHeight,children:g.jsxs(Is,{align:"flex-start",gap:"sm",w:380,className:tg.copyrightWidth,children:[v,x,C,D,A,R]})}),t[33]=x,t[34]=C,t[35]=D,t[36]=A,t[37]=R,t[38]=N):N=t[38];let I;t[39]!==s||t[40]!==e||t[41]!==N||t[42]!==m?(I=g.jsxs(ks,{centered:!0,withCloseButton:!1,opened:e,size:640,padding:0,onClose:s,classNames:c,styles:d,children:[m,N]}),t[39]=s,t[40]=e,t[41]=N,t[42]=m,t[43]=I):I=t[43];let $;return t[44]!==I||t[45]!==l?($=g.jsxs(g.Fragment,{children:[l,I]}),t[44]=I,t[45]=l,t[46]=$):$=t[46],$};function KQe(){return window.open("https://r7-office.ru")}const ZQe=t=>{switch(t){case"ru":return BQe;case"en":return $X;default:return $X}},ffe=t=>{const e=Ve.c(16),{children:n,isMobile:r}=t,s=Kt(),{i18n:i}=yt();let o;e[0]!==s?(o=()=>{s(CA(!1)),s(qy(!1))},e[0]=s,e[1]=o):o=e[1];const a=o;let l;e[2]!==i.language?(l=ZQe(i.language),e[2]=i.language,e[3]=l):l=e[3];let c;e[4]!==a||e[5]!==l?(c=g.jsx(le,{px:"sm",py:"md",p:0,className:"navHeader",children:g.jsx(le,{children:g.jsx(le,{children:g.jsx("img",{className:"logo-header",src:l,onClick:a,alt:"R7-Mail"})})})}),e[4]=a,e[5]=l,e[6]=c):c=e[6];const d=r?0:"sm";let f;e[7]!==n||e[8]!==d?(f=g.jsx(le,{px:d,pb:20,children:n}),e[7]=n,e[8]=d,e[9]=f):f=e[9];let p;e[10]!==c||e[11]!==f?(p=g.jsxs(ei.Section,{grow:!0,component:Qs,mx:"-xs",children:[c,f]}),e[10]=c,e[11]=f,e[12]=p):p=e[12];let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsx($P,{}),e[13]=m):m=e[13];let v;return e[14]!==p?(v=g.jsxs(ei.Navbar,{px:"sm",top:0,h:"100%",zIndex:0,children:[p,m]}),e[14]=p,e[15]=v):v=e[15],v},zX=t=>{const e=Ve.c(22),n=ve(cf),r=ve(Pl),{t:s}=yt(),i=Kt(),o=ve(fv),a=O.useRef(null);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={left:0,top:0},e[0]=l):l=e[0];const[c,d]=O.useState(l);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{if(a.current){const N=a.current.getBoundingClientRect(),I=Math.max(N.right,300),$=N.bottom;d({left:I,top:$})}},e[1]=f):f=e[1];const p=f;let m,v;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{p()},v=[],e[2]=m,e[3]=v):(m=e[2],v=e[3]),O.useEffect(m,v);let y;e[4]!==r||e[5]!==i||e[6]!==n||e[7]!==c?(y=N=>{p(),i($p({opened:!0,event:{...n,start:xr(Lt(r),{hour:10,minute:0}),end:xr(Lt(r),{hour:11,minute:0})},coords:c}))},e[4]=r,e[5]=i,e[6]=n,e[7]=c,e[8]=y):y=e[8];const x=y;let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(gie,{size:16}),e[9]=w):w=e[9];let C;e[10]!==s?(C=s("buttons.createEvent"),e[10]=s,e[11]=C):C=e[11];let E;e[12]!==x||e[13]!==o||e[14]!==C?(E=g.jsx(en,{ref:a,mb:20,className:"createButton",leftSection:w,radius:"md",size:"md",fullWidth:!0,onClick:x,disabled:o,children:C}),e[12]=x,e[13]=o,e[14]=C,e[15]=E):E=e[15];let D,T,A;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx(fi,{miw:200,children:g.jsx(ZJe,{})}),A=g.jsx(Bo,{my:"sm"}),D=g.jsx(vn,{h:"md"}),e[16]=D,e[17]=T,e[18]=A):(D=e[16],T=e[17],A=e[18]);let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsxs(le,{children:[T,A,D,g.jsx(fi,{miw:200,children:g.jsx(Xde,{})})]}),e[19]=_):_=e[19];let R;return e[20]!==E?(R=g.jsxs(ffe,{children:[E,_]}),e[20]=E,e[21]=R):R=e[21],R},JQe=t=>{const e=Ve.c(10),{isMobile:n}=t;let r;e[0]!==n?(r=g.jsx(Gt,{children:g.jsx(tfe,{isMobile:n})}),e[0]=n,e[1]=r):r=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(Bo,{my:"md"}),e[2]=s):s=e[2];let i,o;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(Gt,{children:g.jsx(fi,{children:g.jsx(Qde,{})})}),o=g.jsx(Bo,{my:"md"}),e[3]=i,e[4]=o):(i=e[3],o=e[4]);let a;e[5]!==r?(a=g.jsxs(le,{children:[r,s,i,o]}),e[5]=r,e[6]=a):a=e[6];let l;return e[7]!==n||e[8]!==a?(l=g.jsx(ffe,{isMobile:n,children:a}),e[7]=n,e[8]=a,e[9]=l):l=e[9],l},XQe=t=>{const e=Ve.c(4),{isDesktop:n,isMobile:r}=Yt();let s;return e[0]!==n||e[1]!==r||e[2]!==t?(s=n?g.jsx(zX,{...t}):g.jsx(Qz,{withCloseButton:!1,opened:t.opened,onClose:()=>t.setOpened(!1),size:"xs",children:r?g.jsx(JQe,{isMobile:r}):g.jsx(zX,{...t})}),e[0]=n,e[1]=r,e[2]=t,e[3]=s):s=e[3],s},QQe=()=>{const t=Ve.c(19),e=Br(),{t:n}=yt(),{isMobile:r}=Yt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={height:"100%"},t[0]=s):s=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={flex:1},t[1]=i):i=t[1];let o;t[2]!==e?(o=()=>e("/"),t[2]=e,t[3]=o):o=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(T$,{size:"24px",strokeWidth:1.5,color:"black"}),t[4]=a):a=t[4];let l;t[5]!==o?(l=g.jsx(gn,{onClick:o,children:a}),t[5]=o,t[6]=l):l=t[6];let c;t[7]!==n?(c=n("settings.title"),t[7]=n,t[8]=c):c=t[8];let d;t[9]!==c?(d=g.jsx($g,{fz:22,order:2,fw:400,children:c}),t[9]=c,t[10]=d):d=t[10];let f;t[11]!==l||t[12]!==d?(f=g.jsxs(wt,{gap:0,style:i,children:[l,d]}),t[11]=l,t[12]=d,t[13]=f):f=t[13];let p;t[14]!==r?(p=!r&&g.jsx(wt,{justify:"flex-end",style:{flex:1},children:g.jsxs(wt,{gap:"sm",children:[g.jsx(efe,{}),g.jsx(nfe,{})]})}),t[14]=r,t[15]=p):p=t[15];let m;return t[16]!==f||t[17]!==p?(m=g.jsx(ei.Header,{children:g.jsxs(wt,{px:"md",style:s,children:[f,p]})}),t[16]=f,t[17]=p,t[18]=m):m=t[18],m},eet="_container_1tkzt_1",tet={container:eet},pfe=t=>{const e=Ve.c(8);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const i=`${tet.container} ${r}`;let o;return e[4]!==n||e[5]!==s||e[6]!==i?(o=g.jsx(le,{...s,className:i,children:n}),e[4]=n,e[5]=s,e[6]=i,e[7]=o):o=e[7],o},net="_navbar_bg8rc_1",ret="_section_bg8rc_5",set="_collectionsHeader_bg8rc_44",iet="_selectedLink_bg8rc_49",oet="_collectionLink_bg8rc_55",aet="_item_bg8rc_66",mu={navbar:net,section:ret,collectionsHeader:set,selectedLink:iet,collectionLink:oet,item:aet},FX=()=>{const t=Ve.c(11),{id:e}=Fu(),{t:n}=yt(),r=Kt(),{isMobile:s}=Yt();let i;t[0]!==r||t[1]!==s?(i=()=>{s&&r(Jz(!1))},t[0]=r,t[1]=s,t[2]=i):i=t[2];const o=i,a=`${mu.collectionLink} ${!e&&mu.selectedLink}`;let l;t[3]!==n?(l=n("settings.navBar.general"),t[3]=n,t[4]=l):l=t[4];let c;t[5]!==l?(c=g.jsx(pfe,{className:mu.item,children:g.jsx(He,{fw:600,children:l})}),t[5]=l,t[6]=c):c=t[6];let d;return t[7]!==o||t[8]!==a||t[9]!==c?(d=g.jsx(ei.Section,{mb:8,children:g.jsx("div",{children:g.jsx(qP,{to:"settings/general",onClick:o,className:a,children:c})})}),t[7]=o,t[8]=a,t[9]=c,t[10]=d):d=t[10],d},TD=t=>{const e=Ve.c(21),{calendarList:n,label:r}=t,{id:s}=Fu(),i=Kt(),{isMobile:o}=Yt(),{t:a}=yt(),{hideCalendar:l,unhideCalendar:c}=Jde();if(!n.length)return null;let d;e[0]!==i||e[1]!==o?(d=()=>{o&&i(Jz(!1))},e[0]=i,e[1]=o,e[2]=d):d=e[2];const f=d;let p;e[3]!==l||e[4]!==c?(p=(D,T,A)=>{A.preventDefault(),A.stopPropagation(),D&&(T?c(D):l(D))},e[3]=l,e[4]=c,e[5]=p):p=e[5];const m=p;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v={content:{padding:0},item:{border:0},label:{padding:8},chevron:{marginRight:10}},e[6]=v):v=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y={borderRadius:8},e[7]=y):y=e[7];let x;e[8]!==r?(x=g.jsx(Pi.Control,{style:y,p:0,children:g.jsx(wt,{className:mu.collectionsHeader,justify:"space-between",children:g.jsx(He,{fw:400,c:"dimmed",children:r})})}),e[8]=r,e[9]=x):x=e[9];let w;e[10]!==n||e[11]!==f||e[12]!==m||e[13]!==s||e[14]!==a?(w=!!(n!=null&&n.length)&&(n==null?void 0:n.map(D=>{const T=!!D.isHiddenFromList;return g.jsx(qP,{to:`settings/${D.id}`,onClick:f,state:{calendar:D},className:`${mu.collectionLink} ${D.id===Number(s)&&mu.selectedLink}`,children:g.jsx(pfe,{className:mu.item,children:g.jsxs(vt,{justify:"space-between",align:"center",gap:8,children:[g.jsx(He,{fw:500,style:{flex:1},children:D.name}),g.jsx(ss,{label:a(T?"calendarOptions.restoreToList":"calendarOptions.hideFromList"),withArrow:!0,children:g.jsx(gn,{variant:"transparent",color:"grey.6",size:"sm",onClick:A=>m(D.id,T,A),children:T?g.jsx(u4e,{size:18,stroke:1.5}):g.jsx(f4e,{size:18,stroke:1.5})})})]})})},D.id)})),e[10]=n,e[11]=f,e[12]=m,e[13]=s,e[14]=a,e[15]=w):w=e[15];let C;e[16]!==w?(C=g.jsx(Pi.Panel,{m:0,p:0,children:g.jsx("div",{className:mu.collections,children:w})}),e[16]=w,e[17]=C):C=e[17];let E;return e[18]!==x||e[19]!==C?(E=g.jsx(g.Fragment,{children:g.jsx(ei.Section,{className:mu.section,children:g.jsx(Pi,{defaultValue:"customization",styles:v,children:g.jsxs(Pi.Item,{p:0,value:"customization",children:[x,C]})})})}),e[18]=x,e[19]=C,e[20]=E):E=e[20],E};function cet(){const t=Ve.c(47),e=Kt(),n=ve(mJe),r=ve(dJe),s=ve(kr),{myCalendars:i,otherCalendars:o}=eF(n,s);let a,l;t[0]!==e?(a=()=>{e(oS())},l=[e],t[0]=e,t[1]=a,t[2]=l):(a=t[1],l=t[2]),O.useEffect(a,l);const{id:c}=Fu(),d=Br(),{t:f}=yt(),{isMobile:p}=Yt();let m,v;t[3]!==n||t[4]!==c||t[5]!==d?(m=()=>{if(n.length&&c){const N=n.find(I=>I.id===Number(c));d(N?`settings/${N.id}`:"settings/general")}},v=[n,c,d],t[3]=n,t[4]=c,t[5]=d,t[6]=m,t[7]=v):(m=t[6],v=t[7]),O.useEffect(m,v);let y;t[8]!==e||t[9]!==r?(y=()=>{e(Jz(!r))},t[8]=e,t[9]=r,t[10]=y):y=t[10];const x=y;if(p){let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(FX,{}),t[11]=N):N=t[11];let I;t[12]!==f?(I=f("settings.navBar.myCalendars"),t[12]=f,t[13]=I):I=t[13];let $;t[14]!==i||t[15]!==I?($=g.jsx(TD,{label:I,calendarList:i}),t[14]=i,t[15]=I,t[16]=$):$=t[16];let L;t[17]!==f?(L=f("settings.navBar.otherCalendars"),t[17]=f,t[18]=L):L=t[18];let z;t[19]!==o||t[20]!==L?(z=g.jsx(TD,{label:L,calendarList:o}),t[19]=o,t[20]=L,t[21]=z):z=t[21];let F;t[22]!==$||t[23]!==z?(F=g.jsxs(le,{h:"calc(100vh - 50px)",children:[N,$,z]}),t[22]=$,t[23]=z,t[24]=F):F=t[24];let q;t[25]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx($P,{}),t[25]=q):q=t[25];let H;return t[26]!==r||t[27]!==F||t[28]!==x?(H=g.jsxs(Qz,{withCloseButton:!1,opened:r,onClose:x,size:"80%",children:[F,q]}),t[26]=r,t[27]=F,t[28]=x,t[29]=H):H=t[29],H}let w;t[30]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(FX,{}),t[30]=w):w=t[30];let C;t[31]!==f?(C=f("settings.navBar.myCalendars"),t[31]=f,t[32]=C):C=t[32];let E;t[33]!==i||t[34]!==C?(E=g.jsx(fi,{children:g.jsx(TD,{label:C,calendarList:i})}),t[33]=i,t[34]=C,t[35]=E):E=t[35];let D;t[36]!==f?(D=f("settings.navBar.otherCalendars"),t[36]=f,t[37]=D):D=t[37];let T;t[38]!==o||t[39]!==D?(T=g.jsx(fi,{children:g.jsx(TD,{label:D,calendarList:o})}),t[38]=o,t[39]=D,t[40]=T):T=t[40];let A;t[41]!==E||t[42]!==T?(A=g.jsxs(Qs,{h:"100%",children:[w,E,T]}),t[41]=E,t[42]=T,t[43]=A):A=t[43];let _;t[44]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx($P,{}),t[44]=_):_=t[44];let R;return t[45]!==A?(R=g.jsxs(ei.Navbar,{visibleFrom:"xs",p:"md",className:mu.navbar,children:[A,_]}),t[45]=A,t[46]=R):R=t[46],R}const uet=()=>{const t=Br(),{t:e}=yt(),n=Kt(),r=ve(cf),[s]=O.useState(r),{isMobile:i}=Yt(),o=Fu(),a=(r==null?void 0:r.id)!=="1",l=O.useCallback(()=>{n(oRe()),n(rie()),t("/")},[]),c=O.useCallback(()=>{n(Hw({...r,resource:{...r.resource,saveType:rs.Duplicate}}))},[r]),d=O.useCallback(()=>n(oie(!0)),[]),f=O.useMemo(()=>s.resource.saveType===rs.Duplicate||r.resource.saveType===rs.Duplicate?e(i?"fullEventPage.shortCloneLabel":"fullEventPage.cloneLabel"):o!=null&&o.id?e(i?"fullEventPage.shortEditLabel":"fullEventPage.editLabel"):e(i?"fullEventPage.shortCreateLabel":"fullEventPage.createLabel"),[s,r,o]);return g.jsx(ei.Header,{withBorder:!1,children:g.jsxs(vt,{w:"100%",h:"100%",px:"md",align:"center",justify:"space-between",className:ti({"mobile-event":i,"is-edit":a&&s.resource.saveType!==rs.Duplicate}),children:[g.jsxs(vt,{align:"center",children:[g.jsx(gn,{mr:10,onClick:l,children:g.jsx(T$,{size:"24px",strokeWidth:1.5,color:"black"})}),g.jsx($g,{className:"eventPageTitle",fz:22,order:2,fw:400,children:f})]}),g.jsxs(vt,{gap:"xs",align:"center",children:[i&&g.jsx(en,{onClick:d,size:"xs",children:e(a?"buttons.save":"buttons.create")}),i&&a&&r.resource.saveType!==rs.Duplicate&&g.jsx(vt,{align:"center",pl:"xs",children:g.jsx(Wz,{event:s,handleCreateCopy:c,handleChangeOwner:l,isFullView:!0})})]})]})})},AD={navbar:{zIndex:5}},det=t=>{const e=Ve.c(28),{children:n}=t,[r,s]=O.useState(!1),{isMobile:i}=Yt(),o=EJe();let a;e:switch(o){case da.Settings:{let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_=Object.assign({main:{overflowY:"scroll"}},AD),e[0]=_):_=e[0],a=_;break e}case da.Home:{let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=Object.assign({main:{overflowY:"hidden"}},AD),e[1]=_):_=e[1],a=_;break e}case da.Event:{a=AD;break e}default:a=AD}const l=a,c=o===da.Settings?void 0:"alt";let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={height:64},e[2]=d):d=e[2];const f=d;let p;e:{if(o===da.Settings){let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N={width:{md:350,sm:300,base:0},breakpoint:"xs"},e[3]=N):N=e[3],p=N;break e}const _=o===da.Event;let R;e[4]!==_?(R={width:305,breakpoint:"lg",collapsed:{desktop:_}},e[4]=_,e[5]=R):R=e[5],p=R}const m=p;let v;e:{if(!i){let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N={height:56,collapsed:!0},e[6]=N):N=e[6],v=N;break e}const _=o!==da.Home;let R;e[7]!==_?(R={height:56,collapsed:_},e[7]=_,e[8]=R):R=e[8],v=R}const y=v;let x;e:switch(o){case da.Event:{let _;e[9]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(uet,{}),e[9]=_):_=e[9],x=_;break e}case da.Settings:{let _;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(QQe,{}),e[10]=_):_=e[10],x=_;break e}default:{let _;e[11]!==r?(_=g.jsx(GJe,{opened:r,setOpened:s}),e[11]=r,e[12]=_):_=e[12],x=_}}const w=x,C=i?"app-shell-mobile-wrapper":"";let E;e[13]!==r||e[14]!==o?(E=o===da.Settings?g.jsx(cet,{}):g.jsx(XQe,{opened:r,setOpened:s}),e[13]=r,e[14]=o,e[15]=E):E=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=g.jsx($Je,{}),e[16]=D):D=e[16];let T;e[17]!==n?(T=g.jsx(ei.Main,{children:n}),e[17]=n,e[18]=T):T=e[18];let A;return e[19]!==y||e[20]!==w||e[21]!==c||e[22]!==m||e[23]!==l||e[24]!==C||e[25]!==E||e[26]!==T?(A=g.jsxs(ei,{className:C,padding:0,styles:l,layout:c,header:f,navbar:m,footer:y,children:[w,E,D,T]}),e[19]=y,e[20]=w,e[21]=c,e[22]=m,e[23]=l,e[24]=C,e[25]=E,e[26]=T,e[27]=A):A=e[27],A},fet=t=>{var r,s;const e=(r=t.find(i=>i.Name==="Admin"))==null?void 0:r.Url;!((s=t.find(i=>i.Name==="Calendar"))==null?void 0:s.HasAccess)&&e&&window.location.replace(e+"/dashboard")},pet=()=>{const t=Ve.c(41),e=yh(),n=Kt(),r=ve($w),s=ve(oh),i=ve(Ev),o=ve(Cv),{Timezone:a}=ve(oh),[l,c]=O.useState(!1),[d,f]=O.useState(null),p=ve(aJe),m=ve(cOe),v=ve(Pl),[y,x]=O.useState(!0),w=ve(Xz);let C;t[0]!==a||t[1]!==o?(C=()=>{if(a!=null&&a.Id&&o){const q=Intl.DateTimeFormat().resolvedOptions(),H=o[a.Id];if((q==null?void 0:q.timeZone)!==(H==null?void 0:H.tzName)){localStorage.setItem("modalLastOpened",new Date().getTime().toString());let B=null;for(const V in o)if(o[V].tzName===q.timeZone){B=o[V];break}f(B),c(!0)}}},t[0]=a,t[1]=o,t[2]=C):C=t[2];const E=C;let D;t[3]!==m||t[4]!==E||t[5]!==o?(D=()=>{if(Object.keys(o).length&&m){const q=localStorage.getItem("modalLastOpened");q?new Date().getTime()-Number(q)>864e5&&E():E()}},t[3]=m,t[4]=E,t[5]=o,t[6]=D):D=t[6];let T;t[7]!==m||t[8]!==o?(T=[o,m],t[7]=m,t[8]=o,t[9]=T):T=t[9],O.useEffect(D,T),CJe(o,s.Timezone),xJe();let A;t[10]!==n||t[11]!==o?(A=()=>{n(cRe(o))},t[10]=n,t[11]=o,t[12]=A):A=t[12];let _;t[13]!==o?(_=[o],t[13]=o,t[14]=_):_=t[14],O.useEffect(A,_);let R;t[15]!==p||t[16]!==s||t[17]!==n?(R=()=>{const q=s.Timezone;q&&!q.Id&&p&&(n(Yse({data:{Id:p,SecondEnabled:q.SecondEnabled,SecondId:q.SecondId},showNotification:!1})),n(Kse({...s,Timezone:{...s.Timezone,Id:p}})))},t[15]=p,t[16]=s,t[17]=n,t[18]=R):R=t[18];let N;t[19]!==p?(N=[p],t[19]=p,t[20]=N):N=t[20],O.useEffect(R,N);let I;t[21]!==s.Timezone||t[22]!==s.UserId||t[23]!==n||t[24]!==r?(I=()=>((async()=>{if(x(!0),s.UserId>0&&r){const{ModuleUrls:H}=r;fet(H);try{await n(ZD()).unwrap(),s.Timezone&&await n(Ck(s.Timezone)).unwrap(),await n(Ek()).unwrap(),x(!1),await n(jg()).unwrap()}catch{console.log("error")}}x(!1)})(),()=>{s.UserId>0&&(n(iRe()),n(nJe()))}),t[21]=s.Timezone,t[22]=s.UserId,t[23]=n,t[24]=r,t[25]=I):I=t[25];let $;t[26]===Symbol.for("react.memo_cache_sentinel")?($=[],t[26]=$):$=t[26],O.useEffect(I,$);let L;t[27]!==w||t[28]!==v||t[29]!==i?(L=()=>{w==="fulfilled"&&i.onNavigate&&i.onNavigate("DATE",v)},t[27]=w,t[28]=v,t[29]=i,t[30]=L):L=t[30];let z;if(t[31]!==w||t[32]!==i?(z=[w,i],t[31]=w,t[32]=i,t[33]=z):z=t[33],O.useEffect(L,z),y){let q;return t[34]===Symbol.for("react.memo_cache_sentinel")?(q=g.jsx(vt,{justify:"center",align:"center",w:"100vw",h:"100vh",children:g.jsx(zi,{})}),t[34]=q):q=t[34],q}let F;return t[35]!==m||t[36]!==s.UserId||t[37]!==e||t[38]!==l||t[39]!==d?(F=s.UserId>0?g.jsx(det,{children:g.jsxs(g.Fragment,{children:[g.jsx(nQ,{}),g.jsx(bJe,{isOpen:l,onClose:()=>c(!1),newTimezone:d,askTimezoneChange:m})]})}):g.jsx(tQ,{to:"/login",state:{from:e},replace:!0}),t[35]=m,t[36]=s.UserId,t[37]=e,t[38]=l,t[39]=d,t[40]=F):F=t[40],F},het=()=>{const t=Ve.c(4),{t:e,i18n:n}=yt();let r,s;t[0]!==n||t[1]!==e?(r=()=>{const i=()=>{document.title=e("documentTitle")};return i(),n.on("languageChanged",i),()=>{n.off("languageChanged",i)}},s=[e,n],t[0]=n,t[1]=e,t[2]=r,t[3]=s):(r=t[2],s=t[3]),O.useEffect(r,s)},met="PROD-1773418532[13.03.2026, 18:15:32]-7a42cac6",get=new Set(Object.keys(ds).filter(t=>isNaN(Number(t)))),vet=()=>{const t=Ve.c(5),e=yh(),n=Br();let r;t[0]!==e.pathname||t[1]!==n?(r=()=>{const i=e.pathname.match(/^\/([^/]+)\/(\d{4})\/(\d{2})\/(\d{2})$/);if(i){const[,o,a,l,c]=i;get.has(o)||n(`/month/${a}/${l}/${c}`,{replace:!0})}},t[0]=e.pathname,t[1]=n,t[2]=r):r=t[2];let s;t[3]!==e.pathname?(s=[e.pathname],t[3]=e.pathname,t[4]=s):s=t[4],O.useEffect(r,s)},yet=Yu(()=>of(()=>import("./SettingsLayout-COW8vA2s.js"),__vite__mapDeps([2,3]))),bet=Yu(()=>of(()=>Promise.resolve().then(()=>GZe),void 0)),xet=Yu(()=>of(()=>import("./settingsGeneral-DVUJ7gUe.js"),__vite__mapDeps([4,5]))),BX=Yu(()=>of(()=>Promise.resolve().then(()=>ORe),void 0)),wet=Yu(()=>of(()=>import("./index-DyttC1tB.js"),[])),EI=Yu(()=>of(()=>import("./eventEdit-CgmAqoKn.js"),[]));window.appVersion=met;const Cet=()=>{const t=Ve.c(26),e=Br(),n=Kt(),r=ve(lOe),s=ve(oh);het();let i;t[0]!==n||t[1]!==e?(i=()=>{(async()=>{var L,z,F;mOe(e,n),hOe();const $=await n(JD()).unwrap();if($.UserId>0){const q=(L=$==null?void 0:$.ModuleSettings)==null?void 0:L.ModuleUrls,H=(z=q==null?void 0:q.find(Eet))==null?void 0:z.Url;if(!((F=q==null?void 0:q.find(Met))==null?void 0:F.HasAccess)){window.location.href=H+"/dashboard?from=Calendar";return}}})()},t[0]=n,t[1]=e,t[2]=i):i=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],t[3]=o):o=t[3],O.useEffect(i,o),vet();let a,l;if(t[4]!==s.Culture?(a=()=>{var I;Ln.changeLanguage(((I=s.Culture)==null?void 0:I.toLowerCase())||"ru").then()},l=[s.Culture],t[4]=s.Culture,t[5]=a,t[6]=l):(a=t[5],l=t[6]),O.useEffect(a,l),r==="initial"||r==="pending"){let I;return t[7]===Symbol.for("react.memo_cache_sentinel")?(I=g.jsx(vt,{justify:"center",align:"center",w:"100vw",h:"100vh",children:g.jsx(zi,{})}),t[7]=I):I=t[7],I}let c;t[8]===Symbol.for("react.memo_cache_sentinel")?(c={title:ct("errorsCatch.errorPage.title"),description:ct("errorsCatch.errorPage.description_404"),status:400},t[8]=c):c=t[8];const d=c,f=r==="rejected";let p;t[9]!==r?(p=r==="rejected"?ct("buttons.update"):null,t[9]=r,t[10]=p):p=t[10];let m;t[11]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsx(yJe,{}),t[11]=m):m=t[11];let v;t[12]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(ua,{element:m,children:g.jsx(ua,{path:"login",element:g.jsx(wet,{})})}),t[12]=v):v=t[12];let y;t[13]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(pet,{}),t[13]=y):y=t[13];let x;t[14]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(ua,{path:"/:paramView?/:year?/:month?/:day?/:eventId?",element:g.jsx(FQe,{})}),t[14]=x):x=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(yet,{}),t[15]=w):w=t[15];let C;t[16]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(ua,{path:":id",element:g.jsx(bet,{})}),t[16]=C):C=t[16];let E;t[17]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsxs(ua,{path:"settings",element:w,children:[C,g.jsx(ua,{path:"general",element:g.jsx(xet,{})})]}),t[17]=E):E=t[17];let D;t[18]===Symbol.for("react.memo_cache_sentinel")?(D=g.jsx(ua,{path:"*",element:g.jsx(BX,{error:d})}),t[18]=D):D=t[18];let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx(ua,{path:":id/:date",element:g.jsx(EI,{})}),t[19]=T):T=t[19];let A;t[20]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx(ua,{path:"new/:date",element:g.jsx(EI,{})}),t[20]=A):A=t[20];let _;t[21]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsxs(ua,{element:y,children:[x,E,g.jsxs(ua,{path:"event/*",children:[D,T,A,g.jsx(ua,{path:"new_event",element:g.jsx(EI,{})})]})]}),t[21]=_):_=t[21];let R;t[22]===Symbol.for("react.memo_cache_sentinel")?(R=g.jsxs(Lpe,{children:[v,_,g.jsx(ua,{path:"*",element:g.jsx(BX,{error:d})})]}),t[22]=R):R=t[22];let N;return t[23]!==f||t[24]!==p?(N=g.jsx(fi,{withFullPage:!0,additionalError:f,buttonTitle:p,children:R}),t[23]=f,t[24]=p,t[25]=N):N=t[25],N};function Eet(t){return t.Name==="Admin"}function Met(t){return t.Name==="Calendar"}const Det={...fSe,fontFamily:"Roboto, sans-serif",headings:{fontFamily:"Roboto, sans-serif"},components:{ActionIcon:gn.extend({defaultProps:{color:"gray",variant:"subtle"}}),Button:en.extend({defaultProps:{fw:400}}),PopoverDropdown:VA.extend({defaultProps:{p:"calc(0.25rem * var(--mantine-scale))"}}),MenuDropdown:i_.extend({defaultProps:{p:"calc(0.25rem * var(--mantine-scale))"}}),Select:uo.extend({defaultProps:{comboboxProps:{shadow:"sm"},allowDeselect:!1}}),Drawer:jl.extend({defaultProps:{overlayProps:{blur:2}}}),Modal:ks.extend({styles:{title:{fontSize:16,fontWeight:500},header:{padding:"16px"}}}),List:Fi.extend({styles:{root:{paddingInlineStart:0}}})}},ket=kQ({key:"color-scheme"}),Tet=t=>{const e=Ve.c(2),{children:n}=t;let r;return e[0]!==n?(r=g.jsx(RQ,{colorSchemeManager:ket,defaultColorScheme:"light",theme:Det,children:n}),e[0]=n,e[1]=r):r=e[1],r},cF=O.createContext(null);cF.displayName="@mantine/modals/ModalsContext";function Aet(){const t=O.useContext(cF);if(!t)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return t}function _et({id:t,cancelProps:e,confirmProps:n,labels:r={cancel:"",confirm:""},closeOnConfirm:s=!0,closeOnCancel:i=!0,groupProps:o,onCancel:a,onConfirm:l,children:c}){const{cancel:d,confirm:f}=r,p=Aet(),m=y=>{typeof(e==null?void 0:e.onClick)=="function"&&(e==null||e.onClick(y)),typeof a=="function"&&a(),i&&p.closeModal(t)},v=y=>{typeof(n==null?void 0:n.onClick)=="function"&&(n==null||n.onClick(y)),typeof l=="function"&&l(),s&&p.closeModal(t)};return g.jsxs(g.Fragment,{children:[c&&g.jsx(le,{mb:"md",children:c}),g.jsxs(wt,{mt:c?0:"md",justify:"flex-end",...o,children:[g.jsx(en,{variant:"default",...e,onClick:m,children:(e==null?void 0:e.children)||d}),g.jsx(en,{...n,onClick:v,children:(n==null?void 0:n.children)||f})]})]})}const[Oet,hfe]=cme("mantine-modals");hfe("closeModal");hfe("closeAllModals");function HX(t,e){var n,r,s,i;e&&t.type==="confirm"&&((r=(n=t.props).onCancel)==null||r.call(n)),(i=(s=t.props).onClose)==null||i.call(s)}function Ret(t,e){var n;switch(e.type){case"OPEN":return{current:e.modal,modals:[...t.modals,e.modal]};case"CLOSE":{const r=t.modals.find(i=>i.id===e.modalId);if(!r)return t;HX(r,e.canceled);const s=t.modals.filter(i=>i.id!==e.modalId);return{current:s[s.length-1]||t.current,modals:s}}case"CLOSE_ALL":return t.modals.length?(t.modals.concat().reverse().forEach(r=>{HX(r,e.canceled)}),{current:t.current,modals:[]}):t;case"UPDATE":{const{modalId:r,newProps:s}=e,i=t.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...s}}:a.type==="context"?{...a,props:{...a.props,...s,innerProps:{...a.props.innerProps,...s.innerProps}}}:a),o=((n=t.current)==null?void 0:n.id)===r&&i.find(a=>a.id===r)||t.current;return{...t,modals:i,current:o}}default:return t}}function Net(t){if(!t)return{confirmProps:{},modalProps:{}};const{id:e,children:n,onCancel:r,onConfirm:s,closeOnConfirm:i,closeOnCancel:o,cancelProps:a,confirmProps:l,groupProps:c,labels:d,...f}=t;return{confirmProps:{id:e,children:n,onCancel:r,onConfirm:s,closeOnConfirm:i,closeOnCancel:o,cancelProps:a,confirmProps:l,groupProps:c,labels:d},modalProps:{id:e,...f}}}function jet({children:t,modalProps:e,labels:n,modals:r}){const[s,i]=O.useReducer(Ret,{modals:[],current:null}),o=O.useRef(s);o.current=s;const a=O.useCallback(C=>{i({type:"CLOSE_ALL",canceled:C})},[o,i]),l=O.useCallback(({modalId:C,...E})=>{const D=C||Sg();return i({type:"OPEN",modal:{id:D,type:"content",props:E}}),D},[i]),c=O.useCallback(({modalId:C,...E})=>{const D=C||Sg();return i({type:"OPEN",modal:{id:D,type:"confirm",props:E}}),D},[i]),d=O.useCallback((C,{modalId:E,...D})=>{const T=E||Sg();return i({type:"OPEN",modal:{id:T,type:"context",props:D,ctx:C}}),T},[i]),f=O.useCallback((C,E)=>{i({type:"CLOSE",modalId:C,canceled:E})},[o,i]),p=O.useCallback(({modalId:C,...E})=>{i({type:"UPDATE",modalId:C,newProps:E})},[i]),m=O.useCallback(({modalId:C,...E})=>{i({type:"UPDATE",modalId:C,newProps:E})},[i]);Oet({openModal:l,openConfirmModal:c,openContextModal:({modal:C,...E})=>d(C,E),closeModal:f,closeContextModal:f,closeAllModals:a,updateModal:p,updateContextModal:m});const v={modalProps:e||{},modals:s.modals,openModal:l,openConfirmModal:c,openContextModal:d,closeModal:f,closeContextModal:f,closeAll:a,updateModal:p,updateContextModal:m},y=()=>{const C=o.current.current;switch(C==null?void 0:C.type){case"context":{const{innerProps:E,...D}=C.props,T=r[C.ctx];return{modalProps:D,content:g.jsx(T,{innerProps:E,context:v,id:C.id})}}case"confirm":{const{modalProps:E,confirmProps:D}=Net(C.props);return{modalProps:E,content:g.jsx(_et,{...D,id:C.id,labels:C.props.labels||n})}}case"content":{const{children:E,...D}=C.props;return{modalProps:D,content:E}}default:return{modalProps:{},content:null}}},{modalProps:x,content:w}=y();return g.jsxs(cF.Provider,{value:v,children:[g.jsx(ks,{zIndex:yi("modal")+1,...e,...x,opened:s.modals.length>0,onClose:()=>{var C;return f((C=s.current)==null?void 0:C.id)},children:w}),t]})}const Iet="";Rfe.createRoot(document.getElementById("root")).render(g.jsx(Yfe,{store:vJe,children:g.jsx(Tet,{children:g.jsxs(jet,{children:[g.jsx(lf,{position:"top-right"}),g.jsx(Hpe,{basename:Iet,children:g.jsx(Cet,{})})]})})}));export{ks as $,oz as A,en as B,o8 as C,due as D,Cu as E,Kd as F,jp as G,vz as H,O$ as I,zw as J,ct as K,nOe as L,nf as M,yt as N,nQ as O,tt as P,W3e as Q,xe as R,CZe as S,He as T,Gz as U,le as V,Xy as W,Kz as X,Fde as Y,wt as Z,wr as _,Kt as a,nGe as a$,ah as a0,ss as a1,vt as a2,Sie as a3,gn as a4,Mie as a5,Gde as a6,QZe as a7,eJe as a8,_4e as a9,xv as aA,Sv as aB,AVe as aC,ide as aD,tb as aE,nb as aF,cC as aG,vi as aH,$z as aI,bv as aJ,QYe as aK,Ede as aL,Dde as aM,xGe as aN,rGe as aO,xtt as aP,Stt as aQ,btt as aR,TGe as aS,_Ge as aT,uVe as aU,AGe as aV,gtt as aW,V_ as aX,kGe as aY,Ctt as aZ,vtt as a_,Eh as aa,ptt as ab,oh as ac,cOe as ad,utt as ae,gje as af,Yse as ag,Kse as ah,XD as ai,qe as aj,wv as ak,Wa as al,St as am,ti as an,wie as ao,co as ap,Lt as aq,HYe as ar,qGe as as,ha as at,nt as au,EGe as av,sw as aw,ytt as ax,wtt as ay,po as az,ve as b,Rie as b$,Mr as b0,df as b1,Yo as b2,Cv as b3,lie as b4,AKe as b5,_n as b6,Dg as b7,Tc as b8,Is as b9,pOe as bA,JD as bB,ltt as bC,Vet as bD,rs as bE,Tu as bF,mt as bG,$d as bH,X$ as bI,rRe as bJ,cf as bK,ctt as bL,kr as bM,uie as bN,Zse as bO,ftt as bP,sO as bQ,fRe as bR,Fu as bS,oRe as bT,rie as bU,D4 as bV,Ett as bW,Il as bX,SA as bY,dtt as bZ,Gp as b_,$g as ba,h3 as bb,uo as bc,Pp as bd,Mtt as be,Dtt as bf,fi as bg,Qs as bh,vn as bi,zi as bj,Fe as bk,Ce as bl,bi as bm,gi as bn,bt as bo,Ma as bp,C1 as bq,Pn as br,Ms as bs,Pet as bt,Qt as bu,Rl as bv,$w as bw,Br as bx,yh as by,lw as bz,Ve as c,Q_ as c0,pv as c1,H$ as c2,$Ae as c3,Uet as c4,rfe as c5,Yu as c6,of as c7,Hie as c8,Mn as c9,Vie as cA,ar as cB,lo as cC,rh as cD,SNe as cE,L$ as cF,Fie as cG,P$ as cH,$$ as cI,z$ as cJ,ONe as cK,RNe as cL,NNe as cM,r3 as cN,s3 as cO,i3 as cP,o3 as cQ,Dh as cR,a3 as cS,l3 as cT,c3 as cU,kh as cV,u3 as cW,d3 as cX,f3 as cY,Qe as ca,_$ as cb,or as cc,zie as cd,Eu as ce,Ys as cf,A8 as cg,Ru as ch,Ds as ci,A1 as cj,hs as ck,aoe as cl,Y1 as cm,zee as cn,ooe as co,Mh as cp,B$ as cq,ow as cr,F$ as cs,qie as ct,Ps as cu,p3 as cv,MNe as cw,gw as cx,cje as cy,Dr as cz,on as d,gY as e,vY as f,Oqe as g,Bqe as h,dJe as i,g as j,Ud as k,P3 as l,Uqe as m,az as n,I3 as o,jh as p,eC as q,O as r,Jz as s,Li as t,Yt as u,Y_ as v,G_ as w,rC as x,OY as y,EHe as z};
