attraverso 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -10
- package/package.json +1 -1
- package/server.js +40 -4
- package/viewer/assets/favicon-DAARTY8o.svg +24 -0
- package/viewer/assets/index-CndPhj7n.css +1 -0
- package/viewer/assets/index-xQN8YmLe.js +45 -0
- package/viewer/index.html +4 -4
- package/viewer/assets/favicon-BUxCK25s.svg +0 -13
- package/viewer/assets/index-BCFhE0FV.js +0 -45
- package/viewer/assets/index-CymP80IJ.css +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P={current:null},F={transition:null},I={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function ee(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,e.act=ee,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},e.unstable_act=ee,e.useCallback=function(e,t){return P.current.useCallback(e,t)},e.useContext=function(e){return P.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return P.current.useDeferredValue(e)},e.useEffect=function(e,t){return P.current.useEffect(e,t)},e.useId=function(){return P.current.useId()},e.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return P.current.useMemo(e,t)},e.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},e.useRef=function(e){return P.current.useRef(e)},e.useState=function(e){return P.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return P.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m){if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&N(b,t.startTime-e)}}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&N(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function N(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,M(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,N(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d(),n=p();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},m={};function h(e){return l.call(m,e)?!0:l.call(f,e)?!1:u.test(e)?m[e]=!0:(f[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),k=Symbol.for(`react.provider`),A=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),M=Symbol.for(`react.suspense`),N=Symbol.for(`react.suspense_list`),P=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),I=Symbol.for(`react.offscreen`),ee=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var L=Object.assign,ne;function R(e){if(ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ne=t&&t[1]||``}return`
|
|
2
|
-
`+ne+e}var z=!1;function re(e,t){if(!e||z)return``;z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
3
|
-
`),a=r.stack.split(`
|
|
4
|
-
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
5
|
-
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?R(e):``}function ie(e){switch(e.tag){case 5:return R(e.type);case 16:return R(`Lazy`);case 13:return R(`Suspense`);case 19:return R(`SuspenseList`);case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return``}}function B(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?B(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return B(e(t))}catch{}}return null}function ae(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return B(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function oe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function se(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ce(e){var t=se(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function le(e){e._valueTracker||=ce(e)}function ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=se(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function de(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function fe(e,t){var n=t.checked;return L({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pe(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=oe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function me(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function he(e,t){me(e,t);var n=oe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?_e(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&_e(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ge(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function _e(e,t,n){(t!==`number`||de(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var ve=Array.isArray;function ye(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+oe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function be(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return L({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function xe(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(ve(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:oe(n)}}function Se(e,t){var n=oe(t.value),r=oe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function we(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Te(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?we(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ee,De=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ee||=document.createElement(`div`),Ee.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ee.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Oe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ke={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(ke).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ke[t]=ke[e]})});function je(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||ke.hasOwnProperty(e)&&ke[e]?(``+t).trim():t+`px`}function Me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=je(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ne=L({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pe(e,t){if(t){if(Ne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Fe(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){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 Ie=null;function Le(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Re=null,ze=null,Be=null;function Ve(e){if(e=Hi(e)){if(typeof Re!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Wi(t),Re(e.stateNode,e.type,t))}}function He(e){ze?Be?Be.push(e):Be=[e]:ze=e}function Ue(){if(ze){var e=ze,t=Be;if(Be=ze=null,Ve(e),t)for(e=0;e<t.length;e++)Ve(t[e])}}function We(e,t){return e(t)}function Ge(){}var Ke=!1;function qe(e,t,n){if(Ke)return e(t,n);Ke=!0;try{return We(e,t,n)}finally{Ke=!1,(ze!==null||Be!==null)&&(Ge(),Ue())}}function Je(e,t){var n=e.stateNode;if(n===null)return null;var i=Wi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var Ye=!1;if(c)try{var Xe={};Object.defineProperty(Xe,"passive",{get:function(){Ye=!0}}),window.addEventListener(`test`,Xe,Xe),window.removeEventListener(`test`,Xe,Xe)}catch{Ye=!1}function Ze(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Qe=!1,$e=null,et=!1,tt=null,nt={onError:function(e){Qe=!0,$e=e}};function rt(e,t,n,r,i,a,o,s,c){Qe=!1,$e=null,Ze.apply(nt,arguments)}function it(e,t,n,i,a,o,s,c,l){if(rt.apply(this,arguments),Qe){if(Qe){var u=$e;Qe=!1,$e=null}else throw Error(r(198));et||(et=!0,tt=u)}}function at(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ot(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function st(e){if(at(e)!==e)throw Error(r(188))}function ct(e){var t=e.alternate;if(!t){if(t=at(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return st(a),e;if(o===i)return st(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function lt(e){return e=ct(e),e===null?null:ut(e)}function ut(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ut(e);if(t!==null)return t;e=e.sibling}return null}var dt=n.unstable_scheduleCallback,ft=n.unstable_cancelCallback,pt=n.unstable_shouldYield,mt=n.unstable_requestPaint,ht=n.unstable_now,gt=n.unstable_getCurrentPriorityLevel,_t=n.unstable_ImmediatePriority,vt=n.unstable_UserBlockingPriority,yt=n.unstable_NormalPriority,bt=n.unstable_LowPriority,xt=n.unstable_IdlePriority,St=null,Ct=null;function wt(e){if(Ct&&typeof Ct.onCommitFiberRoot==`function`)try{Ct.onCommitFiberRoot(St,e,void 0,(e.current.flags&128)==128)}catch{}}var Tt=Math.clz32?Math.clz32:Ot,Et=Math.log,Dt=Math.LN2;function Ot(e){return e>>>=0,e===0?32:31-(Et(e)/Dt|0)|0}var kt=64,At=4194304;function jt(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=jt(a))):r=jt(s)}else o=n&~i,o===0?a!==0&&(r=jt(a)):r=jt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tt(t),i=1<<n,r|=e[n],t&=~i;return r}function Nt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Tt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Nt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ft(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function It(){var e=kt;return kt<<=1,!(kt&4194240)&&(kt=64),e}function Lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Rt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function zt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Tt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Bt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Vt=0;function Ht(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ut,Wt,Gt,Kt,qt,Jt=!1,Yt=[],Xt=null,Zt=null,Qt=null,$t=new Map,en=new Map,tn=[],nn=`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 submit`.split(` `);function rn(e,t){switch(e){case`focusin`:case`focusout`:Xt=null;break;case`dragenter`:case`dragleave`:Zt=null;break;case`mouseover`:case`mouseout`:Qt=null;break;case`pointerover`:case`pointerout`:$t.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:en.delete(t.pointerId)}}function an(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Hi(t),t!==null&&Wt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function on(e,t,n,r,i){switch(t){case`focusin`:return Xt=an(Xt,e,t,n,r,i),!0;case`dragenter`:return Zt=an(Zt,e,t,n,r,i),!0;case`mouseover`:return Qt=an(Qt,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return $t.set(a,an($t.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,en.set(a,an(en.get(a)||null,e,t,n,r,i)),!0}return!1}function sn(e){var t=Vi(e.target);if(t!==null){var n=at(t);if(n!==null){if(t=n.tag,t===13){if(t=ot(n),t!==null){e.blockedOn=t,qt(e.priority,function(){Gt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ie=r,n.target.dispatchEvent(r),Ie=null}else return t=Hi(n),t!==null&&Wt(t),e.blockedOn=n,!1;t.shift()}return!0}function ln(e,t,n){cn(e)&&n.delete(t)}function un(){Jt=!1,Xt!==null&&cn(Xt)&&(Xt=null),Zt!==null&&cn(Zt)&&(Zt=null),Qt!==null&&cn(Qt)&&(Qt=null),$t.forEach(ln),en.forEach(ln)}function dn(e,t){e.blockedOn===t&&(e.blockedOn=null,Jt||(Jt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,un)))}function fn(e){function t(t){return dn(t,e)}if(0<Yt.length){dn(Yt[0],e);for(var n=1;n<Yt.length;n++){var r=Yt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xt!==null&&dn(Xt,e),Zt!==null&&dn(Zt,e),Qt!==null&&dn(Qt,e),$t.forEach(t),en.forEach(t),n=0;n<tn.length;n++)r=tn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<tn.length&&(n=tn[0],n.blockedOn===null);)sn(n),n.blockedOn===null&&tn.shift()}var pn=C.ReactCurrentBatchConfig,mn=!0;function hn(e,t,n,r){var i=Vt,a=pn.transition;pn.transition=null;try{Vt=1,_n(e,t,n,r)}finally{Vt=i,pn.transition=a}}function gn(e,t,n,r){var i=Vt,a=pn.transition;pn.transition=null;try{Vt=4,_n(e,t,n,r)}finally{Vt=i,pn.transition=a}}function _n(e,t,n,r){if(mn){var i=yn(e,t,n,r);if(i===null)pi(e,t,r,vn,n),rn(e,r);else if(on(i,e,t,n,r))r.stopPropagation();else if(rn(e,r),t&4&&-1<nn.indexOf(e)){for(;i!==null;){var a=Hi(i);if(a!==null&&Ut(a),a=yn(e,t,n,r),a===null&&pi(e,t,r,vn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else pi(e,t,r,null,n)}}var vn=null;function yn(e,t,n,r){if(vn=null,e=Le(r),e=Vi(e),e!==null){if(t=at(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ot(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}return vn=e,null}function bn(e){switch(e){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`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 1;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`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(gt()){case _t:return 1;case vt:return 4;case yt:case bt:return 16;case xt:return 536870912;default:return 16}default:return 16}}var xn=null,Sn=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=Sn,n=t.length,r,i=`value`in xn?xn.value:xn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Cn=i.slice(e,1<r?1-r:void 0)}function Tn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function En(){return!0}function Dn(){return!1}function On(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?En:Dn,this.isPropagationStopped=Dn,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),jn=L({},kn,{view:0,detail:0}),Mn=On(jn),Nn,Pn,Fn,In=L({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=On(In),Rn=On(L({},In,{dataTransfer:0})),zn=On(L({},jn,{relatedTarget:0})),Bn=On(L({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=On(L({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Hn=On(L({},kn,{data:0})),Un={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Wn={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`},Gn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gn[e])?!!t[e]:!1}function qn(){return Kn}var Jn=On(L({},jn,{key:function(e){if(e.key){var t=Un[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Yn=On(L({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Xn=On(L({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qn})),Zn=On(L({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Qn=On(L({},In,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),$n=[9,13,27,32],er=c&&`CompositionEvent`in window,tr=null;c&&`documentMode`in document&&(tr=document.documentMode);var nr=c&&`TextEvent`in window&&!tr,rr=c&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function sr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var cr=!1;function lr(e,t){switch(e){case`compositionend`:return sr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function ur(e,t){if(cr)return e===`compositionend`||!er&&or(e,t)?(e=wn(),Cn=Sn=xn=null,cr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return rr&&t.locale!==`ko`?null:t.data;default:return null}}var dr={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 fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!dr[e.type]:t===`textarea`}function pr(e,t,n,r){He(r),t=hi(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var mr=null,hr=null;function gr(e){si(e,0)}function _r(e){if(ue(Ui(e)))return e}function vr(e,t){if(e===`change`)return t}var yr=!1;if(c){var br;if(c){var xr=`oninput`in document;if(!xr){var Sr=document.createElement(`div`);Sr.setAttribute(`oninput`,`return;`),xr=typeof Sr.oninput==`function`}br=xr}else br=!1;yr=br&&(!document.documentMode||9<document.documentMode)}function Cr(){mr&&(mr.detachEvent(`onpropertychange`,wr),hr=mr=null)}function wr(e){if(e.propertyName===`value`&&_r(hr)){var t=[];pr(t,hr,e,Le(e)),qe(gr,t)}}function Tr(e,t,n){e===`focusin`?(Cr(),mr=t,hr=n,mr.attachEvent(`onpropertychange`,wr)):e===`focusout`&&Cr()}function Er(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return _r(hr)}function Dr(e,t){if(e===`click`)return _r(t)}function Or(e,t){if(e===`input`||e===`change`)return _r(t)}function kr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ar=typeof Object.is==`function`?Object.is:kr;function jr(e,t){if(Ar(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Ar(e[i],t[i]))return!1}return!0}function Mr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nr(e,t){var n=Mr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Mr(n)}}function Pr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fr(){for(var e=window,t=de();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=de(e.document)}return t}function Ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Lr(e){var t=Fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pr(n.ownerDocument.documentElement,n)){if(r!==null&&Ir(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Nr(n,a);var o=Nr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Rr=c&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==de(r)||(r=zr,`selectionStart`in r&&Ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&jr(Vr,r)||(Vr=r,r=hi(Br,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};c&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionend`),$r=new Map,ei=`abort auxClick 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(` `);function ti(e,t){$r.set(e,t),o(t,[e])}for(var ni=0;ni<ei.length;ni++){var ri=ei[ni];ti(ri.toLowerCase(),`on`+(ri[0].toUpperCase()+ri.slice(1)))}ti(Yr,`onAnimationEnd`),ti(Xr,`onAnimationIteration`),ti(Zr,`onAnimationStart`),ti(`dblclick`,`onDoubleClick`),ti(`focusin`,`onFocus`),ti(`focusout`,`onBlur`),ti(Qr,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ii=`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(` `),ai=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ii));function oi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,it(r,t,void 0,e),e.currentTarget=null}function si(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;oi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;oi(i,s,l),a=c}}}if(et)throw e=tt,et=!1,tt=null,e}function ci(e,t){var n=t[Ri];n===void 0&&(n=t[Ri]=new Set);var r=e+`__bubble`;n.has(r)||(fi(t,e,2,!1),n.add(r))}function li(e,t,n){var r=0;t&&(r|=4),fi(n,e,r,t)}var ui=`_reactListening`+Math.random().toString(36).slice(2);function di(e){if(!e[ui]){e[ui]=!0,i.forEach(function(t){t!==`selectionchange`&&(ai.has(t)||li(t,!1,e),li(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ui]||(t[ui]=!0,li(`selectionchange`,!1,t))}}function fi(e,t,n,r){switch(bn(t)){case 1:var i=hn;break;case 4:i=gn;break;default:i=_n}n=i.bind(null,t,n,e),i=void 0,!Ye||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function pi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Vi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}qe(function(){var r=a,i=Le(n),o=[];a:{var s=$r.get(e);if(s!==void 0){var c=An,l=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:c=Jn;break;case`focusin`:l=`focus`,c=zn;break;case`focusout`:l=`blur`,c=zn;break;case`beforeblur`:case`afterblur`:c=zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Xn;break;case Yr:case Xr:case Zr:c=Bn;break;case Qr:c=Zn;break;case`scroll`:c=Mn;break;case`wheel`:c=Qn;break;case`copy`:case`cut`:case`paste`:c=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Yn}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=Je(p,f),h!=null&&u.push(mi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ie&&(l=n.relatedTarget||n.fromElement)&&(Vi(l)||l[Li]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Vi(l):null,l!==null&&(d=at(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Ln,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Yn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ui(c),m=l==null?s:Ui(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Vi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=gi(m))p++;for(m=0,h=f;h;h=gi(h))m++;for(;0<p-m;)u=gi(u),p--;for(;0<m-p;)f=gi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=gi(u),f=gi(f)}u=null}else u=null;c!==null&&_i(o,s,c,u,!1),l!==null&&d!==null&&_i(o,d,l,u,!0)}}a:{if(s=r?Ui(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=vr;else if(fr(s)){if(yr)g=Or;else{g=Er;var _=Tr}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Dr);if(g&&=g(e,r)){pr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&_e(s,`number`,s.value)}switch(_=r?Ui(r):window,e){case`focusin`:(fr(_)||_.contentEditable===`true`)&&(zr=_,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(o,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(o,n,i)}var v;if(er)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else cr?or(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(rr&&n.locale!==`ko`&&(cr||y!==`onCompositionStart`?y===`onCompositionEnd`&&cr&&(v=wn()):(xn=i,Sn=`value`in xn?xn.value:xn.textContent,cr=!0)),_=hi(r,y),0<_.length&&(y=new Hn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=sr(n),v!==null&&(y.data=v)))),(v=nr?lr(e,n):ur(e,n))&&(r=hi(r,`onBeforeInput`),0<r.length&&(i=new Hn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}si(o,t)})}function mi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Je(e,n),a!=null&&r.unshift(mi(e,a,i)),a=Je(e,t),a!=null&&r.push(mi(e,a,i))),e=e.return}return r}function gi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function _i(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=Je(n,a),c!=null&&o.unshift(mi(n,c,s))):i||(c=Je(n,a),c!=null&&o.push(mi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var vi=/\r\n?/g,yi=/\u0000|\uFFFD/g;function bi(e){return(typeof e==`string`?e:``+e).replace(vi,`
|
|
6
|
-
`).replace(yi,``)}function xi(e,t,n){if(t=bi(t),bi(e)!==t&&n)throw Error(r(425))}function Si(){}var Ci=null,wi=null;function Ti(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ei=typeof setTimeout==`function`?setTimeout:void 0,Di=typeof clearTimeout==`function`?clearTimeout:void 0,Oi=typeof Promise==`function`?Promise:void 0,ki=typeof queueMicrotask==`function`?queueMicrotask:Oi===void 0?Ei:function(e){return Oi.resolve(null).then(e).catch(Ai)};function Ai(e){setTimeout(function(){throw e})}function ji(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),fn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);fn(t)}function Mi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ni(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Pi=Math.random().toString(36).slice(2),Fi=`__reactFiber$`+Pi,Ii=`__reactProps$`+Pi,Li=`__reactContainer$`+Pi,Ri=`__reactEvents$`+Pi,zi=`__reactListeners$`+Pi,Bi=`__reactHandles$`+Pi;function Vi(e){var t=e[Fi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Li]||n[Fi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ni(e);e!==null;){if(n=e[Fi])return n;e=Ni(e)}return t}e=n,n=e.parentNode}return null}function Hi(e){return e=e[Fi]||e[Li],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Wi(e){return e[Ii]||null}var Gi=[],Ki=-1;function qi(e){return{current:e}}function Ji(e){0>Ki||(e.current=Gi[Ki],Gi[Ki]=null,Ki--)}function Yi(e,t){Ki++,Gi[Ki]=e.current,e.current=t}var Xi={},Zi=qi(Xi),Qi=qi(!1),$i=Xi;function ea(e,t){var n=e.type.contextTypes;if(!n)return Xi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ta(e){return e=e.childContextTypes,e!=null}function na(){Ji(Qi),Ji(Zi)}function ra(e,t,n){if(Zi.current!==Xi)throw Error(r(168));Yi(Zi,t),Yi(Qi,n)}function ia(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ae(e)||`Unknown`,a));return L({},n,i)}function aa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Xi,$i=Zi.current,Yi(Zi,e),Yi(Qi,Qi.current),!0}function oa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ia(e,t,$i),i.__reactInternalMemoizedMergedChildContext=e,Ji(Qi),Ji(Zi),Yi(Zi,e)):Ji(Qi),Yi(Qi,n)}var sa=null,ca=!1,la=!1;function ua(e){sa===null?sa=[e]:sa.push(e)}function da(e){ca=!0,ua(e)}function fa(){if(!la&&sa!==null){la=!0;var e=0,t=Vt;try{var n=sa;for(Vt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}sa=null,ca=!1}catch(t){throw sa!==null&&(sa=sa.slice(e+1)),dt(_t,fa),t}finally{Vt=t,la=!1}}return null}var pa=[],ma=0,ha=null,ga=0,_a=[],va=0,ya=null,ba=1,xa=``;function Sa(e,t){pa[ma++]=ga,pa[ma++]=ha,ha=e,ga=t}function Ca(e,t,n){_a[va++]=ba,_a[va++]=xa,_a[va++]=ya,ya=e;var r=ba;e=xa;var i=32-Tt(r)-1;r&=~(1<<i),n+=1;var a=32-Tt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ba=1<<32-Tt(t)+i|n<<i|r,xa=a+e}else ba=1<<a|n<<i|r,xa=e}function wa(e){e.return!==null&&(Sa(e,1),Ca(e,1,0))}function Ta(e){for(;e===ha;)ha=pa[--ma],pa[ma]=null,ga=pa[--ma],pa[ma]=null;for(;e===ya;)ya=_a[--va],_a[va]=null,xa=_a[--va],_a[va]=null,ba=_a[--va],_a[va]=null}var Ea=null,Da=null,Oa=!1,ka=null;function Aa(e,t){var n=eu(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ja(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Ea=e,Da=Mi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Ea=e,Da=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=ya===null?null:{id:ba,overflow:xa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=eu(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ea=e,Da=null,!0);default:return!1}}function Ma(e){return!!(e.mode&1)&&!(e.flags&128)}function Na(e){if(Oa){var t=Da;if(t){var n=t;if(!ja(e,t)){if(Ma(e))throw Error(r(418));t=Mi(n.nextSibling);var i=Ea;t&&ja(e,t)?Aa(i,n):(e.flags=e.flags&-4097|2,Oa=!1,Ea=e)}}else{if(Ma(e))throw Error(r(418));e.flags=e.flags&-4097|2,Oa=!1,Ea=e}}}function Pa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ea=e}function Fa(e){if(e!==Ea)return!1;if(!Oa)return Pa(e),Oa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ti(e.type,e.memoizedProps)),t&&=Da){if(Ma(e))throw Ia(),Error(r(418));for(;t;)Aa(e,t),t=Mi(t.nextSibling)}if(Pa(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Da=Mi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Da=null}}else Da=Ea?Mi(e.stateNode.nextSibling):null;return!0}function Ia(){for(var e=Da;e;)e=Mi(e.nextSibling)}function La(){Da=Ea=null,Oa=!1}function Ra(e){ka===null?ka=[e]:ka.push(e)}var za=C.ReactCurrentBatchConfig;function Ba(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Va(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ha(e){var t=e._init;return t(e._payload)}function Ua(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=ru(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=su(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&Ha(i)===t.type)?(r=a(t,n.props),r.ref=Ba(e,t,n),r.return=e,r):(r=iu(n.type,n.key,n.props,null,e.mode,r),r.ref=Ba(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=cu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=au(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=su(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=iu(t.type,t.key,t.props,null,e.mode,n),n.ref=Ba(e,null,t),n.return=e,n;case T:return t=cu(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(ve(t)||te(t))return t=au(t,e.mode,n,null),t.return=e,t;Va(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case F:return i=n._init,p(e,t,i(n._payload),r)}if(ve(n)||te(n))return i===null?d(e,t,n,r,null):null;Va(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:var a=r._init;return m(e,t,n,a(r._payload),i)}if(ve(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);Va(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Oa&&Sa(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Oa&&Sa(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Oa&&Sa(r,h),l}function g(a,s,c,l){var u=te(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Oa&&Sa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Oa&&Sa(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Oa&&Sa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===F&&Ha(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ba(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===E?(r=au(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=iu(i.type,i.key,i.props,null,e.mode,o),o.ref=Ba(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=cu(i,e.mode,o),r.return=e,e=r}return s(e);case F:return l=i._init,_(e,r,l(i._payload),o)}if(ve(i))return h(e,r,i,o);if(te(i))return g(e,r,i,o);Va(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=su(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Wa=Ua(!0),Ga=Ua(!1),Ka=qi(null),qa=null,Ja=null,Ya=null;function Xa(){Ya=Ja=qa=null}function Za(e){var t=Ka.current;Ji(Ka),e._currentValue=t}function Qa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $a(e,t){qa=e,Ya=Ja=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Hs=!0),e.firstContext=null)}function eo(e){var t=e._currentValue;if(Ya!==e){if(e={context:e,memoizedValue:t,next:null},Ja===null){if(qa===null)throw Error(r(308));Ja=e,qa.dependencies={lanes:0,firstContext:e}}else Ja=Ja.next=e}return t}var to=null;function no(e){to===null?to=[e]:to.push(e)}function ro(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,no(t)):(n.next=i.next,i.next=n),t.interleaved=n,io(e,r)}function io(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ao=!1;function oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function so(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function co(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,U&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,io(e,n)}return i=r.interleaved,i===null?(t.next=t,no(r)):(t.next=i.next,i.next=t),r.interleaved=t,io(e,n)}function uo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bt(e,n)}}function fo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function po(e,t,n,r){var i=e.updateQueue;ao=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=L({},d,f);break a;case 2:ao=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);il|=o,e.lanes=o,e.memoizedState=d}}function mo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ho={},go=qi(ho),_o=qi(ho),vo=qi(ho);function yo(e){if(e===ho)throw Error(r(174));return e}function bo(e,t){switch(Yi(vo,t),Yi(_o,e),Yi(go,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Te(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Te(t,e)}Ji(go),Yi(go,t)}function xo(){Ji(go),Ji(_o),Ji(vo)}function So(e){yo(vo.current);var t=yo(go.current),n=Te(t,e.type);t!==n&&(Yi(_o,e),Yi(go,n))}function Co(e){_o.current===e&&(Ji(go),Ji(_o))}var wo=qi(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Eo=[];function V(){for(var e=0;e<Eo.length;e++)Eo[e]._workInProgressVersionPrimary=null;Eo.length=0}var Do=C.ReactCurrentDispatcher,Oo=C.ReactCurrentBatchConfig,ko=0,Ao=null,jo=null,Mo=null,No=!1,Po=!1,Fo=0,Io=0;function Lo(){throw Error(r(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ar(e[n],t[n]))return!1;return!0}function zo(e,t,n,i,a,o){if(ko=o,Ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Do.current=e===null||e.memoizedState===null?Ss:Cs,e=n(i,a),Po){o=0;do{if(Po=!1,Fo=0,25<=o)throw Error(r(301));o+=1,Mo=jo=null,t.updateQueue=null,Do.current=ws,e=n(i,a)}while(Po)}if(Do.current=xs,t=jo!==null&&jo.next!==null,ko=0,Mo=jo=Ao=null,No=!1,t)throw Error(r(300));return e}function Bo(){var e=Fo!==0;return Fo=0,e}function Vo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e,Mo}function Ho(){if(jo===null){var e=Ao.alternate;e=e===null?null:e.memoizedState}else e=jo.next;var t=Mo===null?Ao.memoizedState:Mo.next;if(t!==null)Mo=t,jo=e;else{if(e===null)throw Error(r(310));jo=e,e={memoizedState:jo.memoizedState,baseState:jo.baseState,baseQueue:jo.baseQueue,queue:jo.queue,next:null},Mo===null?Ao.memoizedState=Mo=e:Mo=Mo.next=e}return Mo}function Uo(e,t){return typeof t==`function`?t(e):t}function Wo(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=jo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((ko&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Ao.lanes|=d,il|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ar(i,t.memoizedState)||(Hs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Ao.lanes|=o,il|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Go(e){var t=Ho(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ar(o,t.memoizedState)||(Hs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Ko(){}function qo(e,t){var n=Ao,i=Ho(),a=t(),o=!Ar(i.memoizedState,a);if(o&&(i.memoizedState=a,Hs=!0),i=i.queue,as(Xo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Mo!==null&&Mo.memoizedState.tag&1){if(n.flags|=2048,es(9,Yo.bind(null,n,i,a,t),void 0,null),Zc===null)throw Error(r(349));ko&30||Jo(n,t,a)}return a}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Zo(t)&&Qo(e)}function Xo(e,t,n){return n(function(){Zo(t)&&Qo(e)})}function Zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ar(e,n)}catch{return!0}}function Qo(e){var t=io(e,1);t!==null&&Sl(t,e,1,-1)}function $o(e){var t=Vo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uo,lastRenderedState:e},t.queue=e,e=e.dispatch=_s.bind(null,Ao,e),[t.memoizedState,e]}function es(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ao.updateQueue,t===null?(t={lastEffect:null,stores:null},Ao.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ts(){return Ho().memoizedState}function ns(e,t,n,r){var i=Vo();Ao.flags|=e,i.memoizedState=es(1|t,n,void 0,r===void 0?null:r)}function rs(e,t,n,r){var i=Ho();r=r===void 0?null:r;var a=void 0;if(jo!==null){var o=jo.memoizedState;if(a=o.destroy,r!==null&&Ro(r,o.deps)){i.memoizedState=es(t,n,a,r);return}}Ao.flags|=e,i.memoizedState=es(1|t,n,a,r)}function is(e,t){return ns(8390656,8,e,t)}function as(e,t){return rs(2048,8,e,t)}function os(e,t){return rs(4,2,e,t)}function ss(e,t){return rs(4,4,e,t)}function cs(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ls(e,t,n){return n=n==null?null:n.concat([e]),rs(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Ho();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ro(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ps(e,t,n){return ko&21?(Ar(n,t)||(n=It(),Ao.lanes|=n,il|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Hs=!0),e.memoizedState=n)}function ms(e,t){var n=Vt;Vt=n!==0&&4>n?n:4,e(!0);var r=Oo.transition;Oo.transition={};try{e(!1),t()}finally{Vt=n,Oo.transition=r}}function hs(){return Ho().memoizedState}function gs(e,t,n){var r=xl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vs(e))ys(t,n);else if(n=ro(e,t,n,r),n!==null){var i=G();Sl(n,e,r,i),bs(n,t,r)}}function _s(e,t,n){var r=xl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vs(e))ys(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ar(s,o)){var c=t.interleaved;c===null?(i.next=i,no(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=ro(e,t,i,r),n!==null&&(i=G(),Sl(n,e,r,i),bs(n,t,r))}}function vs(e){var t=e.alternate;return e===Ao||t!==null&&t===Ao}function ys(e,t){Po=No=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bt(e,n)}}var xs={readContext:eo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useInsertionEffect:Lo,useLayoutEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useMutableSource:Lo,useSyncExternalStore:Lo,useId:Lo,unstable_isNewReconciler:!1},Ss={readContext:eo,useCallback:function(e,t){return Vo().memoizedState=[e,t===void 0?null:t],e},useContext:eo,useEffect:is,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ns(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){return ns(4,2,e,t)},useMemo:function(e,t){var n=Vo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=gs.bind(null,Ao,e),[r.memoizedState,e]},useRef:function(e){var t=Vo();return e={current:e},t.memoizedState=e},useState:$o,useDebugValue:us,useDeferredValue:function(e){return Vo().memoizedState=e},useTransition:function(){var e=$o(!1),t=e[0];return e=ms.bind(null,e[1]),Vo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Ao,a=Vo();if(Oa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Zc===null)throw Error(r(349));ko&30||Jo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,is(Xo.bind(null,i,o,e),[e]),i.flags|=2048,es(9,Yo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Vo(),t=Zc.identifierPrefix;if(Oa){var n=xa,r=ba;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Fo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Io++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Cs={readContext:eo,useCallback:ds,useContext:eo,useEffect:as,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:Wo,useRef:ts,useState:function(){return Wo(Uo)},useDebugValue:us,useDeferredValue:function(e){return ps(Ho(),jo.memoizedState,e)},useTransition:function(){return[Wo(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:hs,unstable_isNewReconciler:!1},ws={readContext:eo,useCallback:ds,useContext:eo,useEffect:as,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:Go,useRef:ts,useState:function(){return Go(Uo)},useDebugValue:us,useDeferredValue:function(e){var t=Ho();return jo===null?t.memoizedState=e:ps(t,jo.memoizedState,e)},useTransition:function(){return[Go(Uo)[0],Ho().memoizedState]},useMutableSource:Ko,useSyncExternalStore:qo,useId:hs,unstable_isNewReconciler:!1};function Ts(e,t){if(e&&e.defaultProps){for(var n in t=L({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Es(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ds={isMounted:function(e){return(e=e._reactInternals)?at(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=G(),i=xl(e),a=co(r,i);a.payload=t,n!=null&&(a.callback=n),t=lo(e,a,i),t!==null&&(Sl(t,e,i,r),uo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=G(),i=xl(e),a=co(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=lo(e,a,i),t!==null&&(Sl(t,e,i,r),uo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=G(),r=xl(e),i=co(n,r);i.tag=2,t!=null&&(i.callback=t),t=lo(e,i,r),t!==null&&(Sl(t,e,r,n),uo(t,e,r))}};function Os(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!jr(n,r)||!jr(i,a):!0}function ks(e,t,n){var r=!1,i=Xi,a=t.contextType;return typeof a==`object`&&a?a=eo(a):(i=ta(t)?$i:Zi.current,r=t.contextTypes,a=(r=r!=null)?ea(e,i):Xi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ds,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function As(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ds.enqueueReplaceState(t,t.state,null)}function js(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},oo(e);var a=t.contextType;typeof a==`object`&&a?i.context=eo(a):(a=ta(t)?$i:Zi.current,i.context=ea(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Es(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Ds.enqueueReplaceState(i,i.state,null),po(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Ms(e,t){try{var n=``,r=t;do n+=ie(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
7
|
-
Error generating stack: `+e.message+`
|
|
8
|
-
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Ns(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ps(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Fs=typeof WeakMap==`function`?WeakMap:Map;function Is(e,t,n){n=co(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fl||(fl=!0,pl=r),Ps(e,t)},n}function Ls(e,t,n){n=co(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ps(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ps(e,t),typeof r!=`function`&&(ml===null?ml=new Set([this]):ml.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Rs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ql.bind(null,e,t,n),t.then(e,e))}function zs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Bs(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=co(-1,1),t.tag=2,lo(n,t,1))),n.lanes|=1),e)}var Vs=C.ReactCurrentOwner,Hs=!1;function Us(e,t,n,r){t.child=e===null?Ga(t,null,n,r):Wa(t,e.child,n,r)}function Ws(e,t,n,r,i){n=n.render;var a=t.ref;return $a(t,i),r=zo(e,t,n,r,a,i),n=Bo(),e!==null&&!Hs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(Oa&&n&&wa(t),t.flags|=1,Us(e,t,r,i),t.child)}function Gs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!tu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ks(e,t,a,r,i)):(e=iu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?jr:n,n(o,r)&&e.ref===t.ref)return uc(e,t,i)}return t.flags|=1,e=ru(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ks(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(jr(a,r)&&e.ref===t.ref){if(Hs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Hs=!0);else return t.lanes=e.lanes,uc(e,t,i)}}return Ys(e,t,n,r,i)}function qs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Yi(tl,el),el|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Yi(tl,el),el|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Yi(tl,el),el|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Yi(tl,el),el|=r;return Us(e,t,i,n),t.child}function Js(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ys(e,t,n,r,i){var a=ta(n)?$i:Zi.current;return a=ea(t,a),$a(t,i),n=zo(e,t,n,r,a,i),r=Bo(),e!==null&&!Hs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,uc(e,t,i)):(Oa&&r&&wa(t),t.flags|=1,Us(e,t,n,i),t.child)}function Xs(e,t,n,r,i){if(ta(n)){var a=!0;aa(t)}else a=!1;if($a(t,i),t.stateNode===null)lc(e,t),ks(t,n,r),js(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=eo(l):(l=ta(n)?$i:Zi.current,l=ea(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&As(t,o,r,l),ao=!1;var f=t.memoizedState;o.state=f,po(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Qi.current||ao?(typeof u==`function`&&(Es(t,n,u,r),c=t.memoizedState),(s=ao||Os(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,so(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ts(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=eo(c):(c=ta(n)?$i:Zi.current,c=ea(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&As(t,o,r,c),ao=!1,f=t.memoizedState,o.state=f,po(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Qi.current||ao?(typeof p==`function`&&(Es(t,n,p,r),m=t.memoizedState),(l=ao||Os(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zs(e,t,n,r,a,i)}function Zs(e,t,n,r,i,a){Js(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&oa(t,n,!1),uc(e,t,a);r=t.stateNode,Vs.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Wa(t,e.child,null,a),t.child=Wa(t,null,s,a)):Us(e,t,s,a),t.memoizedState=r.state,i&&oa(t,n,!0),t.child}function Qs(e){var t=e.stateNode;t.pendingContext?ra(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ra(e,t.context,!1),bo(e,t.containerInfo)}function $s(e,t,n,r,i){return La(),Ra(i),t.flags|=256,Us(e,t,n,r),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0};function tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function nc(e,t,n){var r=t.pendingProps,i=wo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Yi(wo,i&1),e===null)return Na(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=ou(o,r,0,null),e=au(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=tc(n),t.memoizedState=ec,e):rc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return ac(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ru(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=au(a,o,n,null),a.flags|=2):a=ru(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?tc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=ec,r}return a=e.child,e=a.sibling,r=ru(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rc(e,t){return t=ou({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function ic(e,t,n,r){return r!==null&&Ra(r),Wa(t,e.child,null,n),e=rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ac(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Ns(Error(r(422))),ic(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=ou({mode:`visible`,children:i.children},a,0,null),o=au(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Wa(t,e.child,null,s),t.child.memoizedState=tc(s),t.memoizedState=ec,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return ic(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Ns(o,i,void 0),ic(e,t,s,i)}if(c=(s&e.childLanes)!==0,Hs||c){if(i=Zc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,io(e,a),Sl(i,e,a,-1))}return Il(),i=Ns(Error(r(421))),ic(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Yl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Da=Mi(a.nextSibling),Ea=t,Oa=!0,ka=null,e!==null&&(_a[va++]=ba,_a[va++]=xa,_a[va++]=ya,ba=e.id,xa=e.overflow,ya=t),t=rc(t,i.children),t.flags|=4096,t)}function oc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qa(e.return,t,n)}function sc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Us(e,t,r.children,n),r=wo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oc(e,n,t);else if(e.tag===19)oc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Yi(wo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&To(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),sc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&To(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}sc(t,!0,n,null,a);break;case`together`:sc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function lc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function uc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),il|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=ru(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ru(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dc(e,t,n){switch(t.tag){case 3:Qs(t),La();break;case 5:So(t);break;case 1:ta(t.type)&&aa(t);break;case 4:bo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Yi(Ka,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Yi(wo,wo.current&1),e=uc(e,t,n),e===null?null:e.sibling):nc(e,t,n):(Yi(wo,wo.current&1),t.flags|=128,null);Yi(wo,wo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Yi(wo,wo.current),r)break;return null;case 22:case 23:return t.lanes=0,qs(e,t,n)}return uc(e,t,n)}var fc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},pc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,yo(go.current);var o=null;switch(n){case`input`:i=fe(e,i),r=fe(e,r),o=[];break;case`select`:i=L({},i,{value:void 0}),r=L({},r,{value:void 0}),o=[];break;case`textarea`:i=be(e,i),r=be(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Si)}Pe(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&ci(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},mc=function(e,t,n,r){n!==r&&(t.flags|=4)};function hc(e,t){if(!Oa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function gc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _c(e,t,n){var i=t.pendingProps;switch(Ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gc(t),null;case 1:return ta(t.type)&&na(),gc(t),null;case 3:return i=t.stateNode,xo(),Ji(Qi),Ji(Zi),V(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Fa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ka!==null&&(El(ka),ka=null))),gc(t),null;case 5:Co(t);var o=yo(vo.current);if(n=t.type,e!==null&&t.stateNode!=null)pc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return gc(t),null}if(e=yo(go.current),Fa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Fi]=t,i[Ii]=s,e=!!(t.mode&1),n){case`dialog`:ci(`cancel`,i),ci(`close`,i);break;case`iframe`:case`object`:case`embed`:ci(`load`,i);break;case`video`:case`audio`:for(o=0;o<ii.length;o++)ci(ii[o],i);break;case`source`:ci(`error`,i);break;case`img`:case`image`:case`link`:ci(`error`,i),ci(`load`,i);break;case`details`:ci(`toggle`,i);break;case`input`:pe(i,s),ci(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},ci(`invalid`,i);break;case`textarea`:xe(i,s),ci(`invalid`,i)}for(var c in Pe(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&xi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&xi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&ci(`scroll`,i)}switch(n){case`input`:le(i),ge(i,s,!0);break;case`textarea`:le(i),Ce(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Si)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=we(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Fi]=t,e[Ii]=i,fc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Fe(n,i),n){case`dialog`:ci(`cancel`,e),ci(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:ci(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ii.length;o++)ci(ii[o],e);o=i;break;case`source`:ci(`error`,e),o=i;break;case`img`:case`image`:case`link`:ci(`error`,e),ci(`load`,e),o=i;break;case`details`:ci(`toggle`,e),o=i;break;case`input`:pe(e,i),o=fe(e,i),ci(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=L({},i,{value:void 0}),ci(`invalid`,e);break;case`textarea`:xe(e,i),o=be(e,i),ci(`invalid`,e);break;default:o=i}for(s in Pe(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Me(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&De(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Oe(e,u):typeof u==`number`&&Oe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&ci(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:le(e),ge(e,i,!1);break;case`textarea`:le(e),Ce(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+oe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&ye(e,!!i.multiple,i.defaultValue,!0):ye(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Si)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return gc(t),null;case 6:if(e&&t.stateNode!=null)mc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=yo(vo.current),yo(go.current),Fa(t)){if(i=t.stateNode,n=t.memoizedProps,i[Fi]=t,(s=i.nodeValue!==n)&&(e=Ea,e!==null))switch(e.tag){case 3:xi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&xi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Fi]=t,t.stateNode=i}return gc(t),null;case 13:if(Ji(wo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oa&&Da!==null&&t.mode&1&&!(t.flags&128))Ia(),La(),t.flags|=98560,s=!1;else if(s=Fa(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Fi]=t}else La(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gc(t),s=!1}else ka!==null&&(El(ka),ka=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||wo.current&1?nl===0&&(nl=3):Il())),t.updateQueue!==null&&(t.flags|=4),gc(t),null);case 4:return xo(),e===null&&di(t.stateNode.containerInfo),gc(t),null;case 10:return Za(t.type._context),gc(t),null;case 17:return ta(t.type)&&na(),gc(t),null;case 19:if(Ji(wo),s=t.memoizedState,s===null)return gc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)hc(s,!1);else{if(nl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=To(e),c!==null){for(t.flags|=128,hc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Yi(wo,wo.current&1|2),t.child}e=e.sibling}s.tail!==null&&ht()>ul&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=To(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Oa)return gc(t),null}else 2*ht()-s.renderingStartTime>ul&&n!==1073741824&&(t.flags|=128,i=!0,hc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(gc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ht(),t.sibling=null,n=wo.current,Yi(wo,i?n&1|2:n&1),t);case 22:case 23:return Ml(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?el&1073741824&&(gc(t),t.subtreeFlags&6&&(t.flags|=8192)):gc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function vc(e,t){switch(Ta(t),t.tag){case 1:return ta(t.type)&&na(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),Ji(Qi),Ji(Zi),V(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Co(t),null;case 13:if(Ji(wo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));La()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ji(wo),null;case 4:return xo(),null;case 10:return Za(t.type._context),null;case 22:case 23:return Ml(),null;case 24:return null;default:return null}}var yc=!1,bc=!1,xc=typeof WeakSet==`function`?WeakSet:Set,H=null;function Sc(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){Kl(e,t,n)}else n.current=null}}function Cc(e,t,n){try{n()}catch(n){Kl(e,t,n)}}var wc=!1;function Tc(e,t){if(Ci=mn,e=Fr(),Ir(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(wi={focusedElem:e,selectionRange:n},mn=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ts(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Kl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return h=wc,wc=!1,h}function Ec(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Cc(t,n,a)}i=i.next}while(i!==r)}}function Dc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Oc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function kc(e){var t=e.alternate;t!==null&&(e.alternate=null,kc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fi],delete t[Ii],delete t[Ri],delete t[zi],delete t[Bi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ac(e){return e.tag===5||e.tag===3||e.tag===4}function jc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Si));else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}function Nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nc(e,t,n),e=e.sibling;e!==null;)Nc(e,t,n),e=e.sibling}var Pc=null,Fc=!1;function Ic(e,t,n){for(n=n.child;n!==null;)Lc(e,t,n),n=n.sibling}function Lc(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount==`function`)try{Ct.onCommitFiberUnmount(St,n)}catch{}switch(n.tag){case 5:bc||Sc(n,t);case 6:var r=Pc,i=Fc;Pc=null,Ic(e,t,n),Pc=r,Fc=i,Pc!==null&&(Fc?(e=Pc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pc.removeChild(n.stateNode));break;case 18:Pc!==null&&(Fc?(e=Pc,n=n.stateNode,e.nodeType===8?ji(e.parentNode,n):e.nodeType===1&&ji(e,n),fn(e)):ji(Pc,n.stateNode));break;case 4:r=Pc,i=Fc,Pc=n.stateNode.containerInfo,Fc=!0,Ic(e,t,n),Pc=r,Fc=i;break;case 0:case 11:case 14:case 15:if(!bc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Cc(n,t,o),i=i.next}while(i!==r)}Ic(e,t,n);break;case 1:if(!bc&&(Sc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Kl(n,t,e)}Ic(e,t,n);break;case 21:Ic(e,t,n);break;case 22:n.mode&1?(bc=(r=bc)||n.memoizedState!==null,Ic(e,t,n),bc=r):Ic(e,t,n);break;default:Ic(e,t,n)}}function Rc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new xc),t.forEach(function(t){var r=Xl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function zc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Pc=c.stateNode,Fc=!1;break a;case 3:Pc=c.stateNode.containerInfo,Fc=!0;break a;case 4:Pc=c.stateNode.containerInfo,Fc=!0;break a}c=c.return}if(Pc===null)throw Error(r(160));Lc(o,s,a),Pc=null,Fc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Kl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bc(t,e),t=t.sibling}function Bc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zc(t,e),Vc(e),i&4){try{Ec(3,e,e.return),Dc(3,e)}catch(t){Kl(e,e.return,t)}try{Ec(5,e,e.return)}catch(t){Kl(e,e.return,t)}}break;case 1:zc(t,e),Vc(e),i&512&&n!==null&&Sc(n,n.return);break;case 5:if(zc(t,e),Vc(e),i&512&&n!==null&&Sc(n,n.return),e.flags&32){var a=e.stateNode;try{Oe(a,``)}catch(t){Kl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&me(a,o),Fe(c,s);var u=Fe(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Me(a,f):d===`dangerouslySetInnerHTML`?De(a,f):d===`children`?Oe(a,f):S(a,d,f,u)}switch(c){case`input`:he(a,o);break;case`textarea`:Se(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?ye(a,!!o.multiple,o.multiple?[]:``,!1):ye(a,!!o.multiple,o.defaultValue,!0)):ye(a,!!o.multiple,m,!1)}a[Ii]=o}catch(t){Kl(e,e.return,t)}}break;case 6:if(zc(t,e),Vc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Kl(e,e.return,t)}}break;case 3:if(zc(t,e),Vc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{fn(t.containerInfo)}catch(t){Kl(e,e.return,t)}break;case 4:zc(t,e),Vc(e);break;case 13:zc(t,e),Vc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(ll=ht())),i&4&&Rc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(bc=(u=bc)||d,zc(t,e),bc=u):zc(t,e),Vc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(f=H=d;H!==null;){switch(p=H,m=p.child,p.tag){case 0:case 11:case 14:case 15:Ec(4,p,p.return);break;case 1:Sc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Kl(i,n,e)}}break;case 5:Sc(p,p.return);break;case 22:if(p.memoizedState!==null){Gc(f);continue}}m===null?Gc(f):(m.return=p,H=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=je(`display`,s))}catch(t){Kl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Kl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:zc(t,e),Vc(e),i&4&&Rc(e);break;case 21:break;default:zc(t,e),Vc(e)}}function Vc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Ac(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Oe(a,``),i.flags&=-33),Nc(e,jc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Mc(e,jc(e),o);break;default:throw Error(r(161))}}catch(t){Kl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Hc(e,t,n){H=e,Uc(e,t,n)}function Uc(e,t,n){for(var r=!!(e.mode&1);H!==null;){var i=H,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||yc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||bc;s=yc;var l=bc;if(yc=o,(bc=c)&&!l)for(H=i;H!==null;)o=H,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Kc(i):(c.return=o,H=c);for(;a!==null;)H=a,Uc(a,t,n),a=a.sibling;H=i,yc=s,bc=l}Wc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,H=a):Wc(e,t,n)}}function Wc(e){for(;H!==null;){var t=H;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bc||Dc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!bc){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ts(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&mo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}mo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&fn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}bc||t.flags&512&&Oc(t)}catch(e){Kl(t,t.return,e)}}if(t===e){H=null;break}if(n=t.sibling,n!==null){n.return=t.return,H=n;break}H=t.return}}function Gc(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var n=t.sibling;if(n!==null){n.return=t.return,H=n;break}H=t.return}}function Kc(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Dc(4,t)}catch(e){Kl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Kl(t,i,e)}}var a=t.return;try{Oc(t)}catch(e){Kl(t,a,e)}break;case 5:var o=t.return;try{Oc(t)}catch(e){Kl(t,o,e)}}}catch(e){Kl(t,t.return,e)}if(t===e){H=null;break}var s=t.sibling;if(s!==null){s.return=t.return,H=s;break}H=t.return}}var qc=Math.ceil,Jc=C.ReactCurrentDispatcher,Yc=C.ReactCurrentOwner,Xc=C.ReactCurrentBatchConfig,U=0,Zc=null,Qc=null,$c=0,el=0,tl=qi(0),nl=0,rl=null,il=0,al=0,ol=0,sl=null,cl=null,ll=0,ul=1/0,dl=null,fl=!1,pl=null,ml=null,hl=!1,gl=null,_l=0,vl=0,yl=null,bl=-1,W=0;function G(){return U&6?ht():bl===-1?bl=ht():bl}function xl(e){return e.mode&1?U&2&&$c!==0?$c&-$c:za.transition===null?(e=Vt,e===0&&(e=window.event,e=e===void 0?16:bn(e.type)),e):(W===0&&(W=It()),W):1}function Sl(e,t,n,i){if(50<vl)throw vl=0,yl=null,Error(r(185));Rt(e,n,i),U&2&&e===Zc||(e===Zc&&(!(U&2)&&(al|=n),nl===4&&Ol(e,$c)),Cl(e,i),n===1&&U===0&&!(t.mode&1)&&(ul=ht()+500,ca&&fa()))}function Cl(e,t){var n=e.callbackNode;Pt(e,t);var r=Mt(e,e===Zc?$c:0);if(r===0)n!==null&&ft(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ft(n),t===1)e.tag===0?da(kl.bind(null,e)):ua(kl.bind(null,e)),ki(function(){!(U&6)&&fa()}),n=null;else{switch(Ht(r)){case 1:n=_t;break;case 4:n=vt;break;case 16:n=yt;break;case 536870912:n=xt;break;default:n=yt}n=Ql(n,wl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wl(e,t){if(bl=-1,W=0,U&6)throw Error(r(327));var n=e.callbackNode;if(Wl()&&e.callbackNode!==n)return null;var i=Mt(e,e===Zc?$c:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Ll(e,i);else{t=i;var a=U;U|=2;var o=Fl();(Zc!==e||$c!==t)&&(dl=null,ul=ht()+500,Nl(e,t));do try{zl();break}catch(t){Pl(e,t)}while(1);Xa(),Jc.current=o,U=a,Qc===null?(Zc=null,$c=0,t=nl):t=0}if(t!==0){if(t===2&&(a=Ft(e),a!==0&&(i=a,t=Tl(e,a))),t===1)throw n=rl,Nl(e,0),Ol(e,i),Cl(e,ht()),n;if(t===6)Ol(e,i);else{if(a=e.current.alternate,!(i&30)&&!Dl(a)&&(t=Ll(e,i),t===2&&(o=Ft(e),o!==0&&(i=o,t=Tl(e,o))),t===1))throw n=rl,Nl(e,0),Ol(e,i),Cl(e,ht()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Hl(e,cl,dl);break;case 3:if(Ol(e,i),(i&130023424)===i&&(t=ll+500-ht(),10<t)){if(Mt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){G(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ei(Hl.bind(null,e,cl,dl),t);break}Hl(e,cl,dl);break;case 4:if(Ol(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Tt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=ht()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*qc(i/1960))-i,10<i){e.timeoutHandle=Ei(Hl.bind(null,e,cl,dl),i);break}Hl(e,cl,dl);break;case 5:Hl(e,cl,dl);break;default:throw Error(r(329))}}}return Cl(e,ht()),e.callbackNode===n?wl.bind(null,e):null}function Tl(e,t){var n=sl;return e.current.memoizedState.isDehydrated&&(Nl(e,t).flags|=256),e=Ll(e,t),e!==2&&(t=cl,cl=n,t!==null&&El(t)),e}function El(e){cl===null?cl=e:cl.push.apply(cl,e)}function Dl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ar(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ol(e,t){for(t&=~ol,t&=~al,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tt(t),r=1<<n;e[n]=-1,t&=~r}}function kl(e){if(U&6)throw Error(r(327));Wl();var t=Mt(e,0);if(!(t&1))return Cl(e,ht()),null;var n=Ll(e,t);if(e.tag!==0&&n===2){var i=Ft(e);i!==0&&(t=i,n=Tl(e,i))}if(n===1)throw n=rl,Nl(e,0),Ol(e,t),Cl(e,ht()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hl(e,cl,dl),Cl(e,ht()),null}function Al(e,t){var n=U;U|=1;try{return e(t)}finally{U=n,U===0&&(ul=ht()+500,ca&&fa())}}function jl(e){gl!==null&&gl.tag===0&&!(U&6)&&Wl();var t=U;U|=1;var n=Xc.transition,r=Vt;try{if(Xc.transition=null,Vt=1,e)return e()}finally{Vt=r,Xc.transition=n,U=t,!(U&6)&&fa()}}function Ml(){el=tl.current,Ji(tl)}function Nl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Di(n)),Qc!==null)for(n=Qc.return;n!==null;){var r=n;switch(Ta(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&na();break;case 3:xo(),Ji(Qi),Ji(Zi),V();break;case 5:Co(r);break;case 4:xo();break;case 13:Ji(wo);break;case 19:Ji(wo);break;case 10:Za(r.type._context);break;case 22:case 23:Ml()}n=n.return}if(Zc=e,Qc=e=ru(e.current,null),$c=el=t,nl=0,rl=null,ol=al=il=0,cl=sl=null,to!==null){for(t=0;t<to.length;t++)if(n=to[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}to=null}return e}function Pl(e,t){do{var n=Qc;try{if(Xa(),Do.current=xs,No){for(var i=Ao.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}No=!1}if(ko=0,Mo=jo=Ao=null,Po=!1,Fo=0,Yc.current=null,n===null||n.return===null){nl=1,rl=t,Qc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=$c,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=zs(s);if(m!==null){m.flags&=-257,Bs(m,s,c,o,t),m.mode&1&&Rs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Rs(o,u,t),Il();break a}l=Error(r(426))}else if(Oa&&c.mode&1){var _=zs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Bs(_,s,c,o,t),Ra(Ms(l,c));break a}}o=l=Ms(l,c),nl!==4&&(nl=2),sl===null?sl=[o]:sl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Is(o,l,t);fo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(ml===null||!ml.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Ls(o,c,t);fo(o,x);break a}}o=o.return}while(o!==null)}Vl(n)}catch(e){t=e,Qc===n&&n!==null&&(Qc=n=n.return);continue}break}while(1)}function Fl(){var e=Jc.current;return Jc.current=xs,e===null?xs:e}function Il(){(nl===0||nl===3||nl===2)&&(nl=4),Zc===null||!(il&268435455)&&!(al&268435455)||Ol(Zc,$c)}function Ll(e,t){var n=U;U|=2;var i=Fl();(Zc!==e||$c!==t)&&(dl=null,Nl(e,t));do try{Rl();break}catch(t){Pl(e,t)}while(1);if(Xa(),U=n,Jc.current=i,Qc!==null)throw Error(r(261));return Zc=null,$c=0,nl}function Rl(){for(;Qc!==null;)Bl(Qc)}function zl(){for(;Qc!==null&&!pt();)Bl(Qc)}function Bl(e){var t=Zl(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Vl(e):Qc=t,Yc.current=null}function Vl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=vc(n,t),n!==null){n.flags&=32767,Qc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nl=6,Qc=null;return}}else if(n=_c(n,t,el),n!==null){Qc=n;return}if(t=t.sibling,t!==null){Qc=t;return}Qc=t=e}while(t!==null);nl===0&&(nl=5)}function Hl(e,t,n){var r=Vt,i=Xc.transition;try{Xc.transition=null,Vt=1,Ul(e,t,n,r)}finally{Xc.transition=i,Vt=r}return null}function Ul(e,t,n,i){do Wl();while(gl!==null);if(U&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(zt(e,o),e===Zc&&(Qc=Zc=null,$c=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||hl||(hl=!0,Ql(yt,function(){return Wl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=Xc.transition,Xc.transition=null;var s=Vt;Vt=1;var c=U;U|=4,Yc.current=null,Tc(e,n),Bc(n,e),Lr(wi),mn=!!Ci,wi=Ci=null,e.current=n,Hc(n,e,a),mt(),U=c,Vt=s,Xc.transition=o}else e.current=n;if(hl&&(hl=!1,gl=e,_l=a),o=e.pendingLanes,o===0&&(ml=null),wt(n.stateNode,i),Cl(e,ht()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(fl)throw fl=!1,e=pl,pl=null,e;return _l&1&&e.tag!==0&&Wl(),o=e.pendingLanes,o&1?e===yl?vl++:(vl=0,yl=e):vl=0,fa(),null}function Wl(){if(gl!==null){var e=Ht(_l),t=Xc.transition,n=Vt;try{if(Xc.transition=null,Vt=16>e?16:e,gl===null)var i=!1;else{if(e=gl,gl=null,_l=0,U&6)throw Error(r(331));var a=U;for(U|=4,H=e.current;H!==null;){var o=H,s=o.child;if(H.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:Ec(8,d,o)}var f=d.child;if(f!==null)f.return=d,H=f;else for(;H!==null;){d=H;var p=d.sibling,m=d.return;if(kc(d),d===u){H=null;break}if(p!==null){p.return=m,H=p;break}H=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}H=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,H=s;else b:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ec(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,H=v;break b}H=o.return}}var y=e.current;for(H=y;H!==null;){s=H;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,H=b;else b:for(s=y;H!==null;){if(c=H,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Dc(9,c)}}catch(e){Kl(c,c.return,e)}if(c===s){H=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,H=x;break b}H=c.return}}if(U=a,fa(),Ct&&typeof Ct.onPostCommitFiberRoot==`function`)try{Ct.onPostCommitFiberRoot(St,e)}catch{}i=!0}return i}finally{Vt=n,Xc.transition=t}}return!1}function Gl(e,t,n){t=Ms(n,t),t=Is(e,t,1),e=lo(e,t,1),t=G(),e!==null&&(Rt(e,1,t),Cl(e,t))}function Kl(e,t,n){if(e.tag===3)Gl(e,e,n);else for(;t!==null;){if(t.tag===3){Gl(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ml===null||!ml.has(r))){e=Ms(n,e),e=Ls(t,e,1),t=lo(t,e,1),e=G(),t!==null&&(Rt(t,1,e),Cl(t,e));break}}t=t.return}}function ql(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=G(),e.pingedLanes|=e.suspendedLanes&n,Zc===e&&($c&n)===n&&(nl===4||nl===3&&($c&130023424)===$c&&500>ht()-ll?Nl(e,0):ol|=n),Cl(e,t)}function Jl(e,t){t===0&&(e.mode&1?(t=At,At<<=1,!(At&130023424)&&(At=4194304)):t=1);var n=G();e=io(e,t),e!==null&&(Rt(e,t,n),Cl(e,n))}function Yl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jl(e,n)}function Xl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Jl(e,n)}var Zl=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||Qi.current)Hs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Hs=!1,dc(e,t,n);Hs=!!(e.flags&131072)}}else Hs=!1,Oa&&t.flags&1048576&&Ca(t,ga,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;lc(e,t),e=t.pendingProps;var a=ea(t,Zi.current);$a(t,n),a=zo(null,t,i,e,a,n);var o=Bo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ta(i)?(o=!0,aa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,oo(t),a.updater=Ds,t.stateNode=a,a._reactInternals=t,js(t,i,e,n),t=Zs(null,t,i,!0,o,n)):(t.tag=0,Oa&&o&&wa(t),Us(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(lc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=nu(i),e=Ts(i,e),a){case 0:t=Ys(null,t,i,e,n);break a;case 1:t=Xs(null,t,i,e,n);break a;case 11:t=Ws(null,t,i,e,n);break a;case 14:t=Gs(null,t,i,Ts(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ts(i,a),Ys(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ts(i,a),Xs(e,t,i,a,n);case 3:a:{if(Qs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,so(e,t),po(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ms(Error(r(423)),t),t=$s(e,t,i,n,a);break a}if(i!==a){a=Ms(Error(r(424)),t),t=$s(e,t,i,n,a);break a}for(Da=Mi(t.stateNode.containerInfo.firstChild),Ea=t,Oa=!0,ka=null,n=Ga(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(La(),i===a){t=uc(e,t,n);break a}Us(e,t,i,n)}t=t.child}return t;case 5:return So(t),e===null&&Na(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ti(i,a)?s=null:o!==null&&Ti(i,o)&&(t.flags|=32),Js(e,t),Us(e,t,s,n),t.child;case 6:return e===null&&Na(t),null;case 13:return nc(e,t,n);case 4:return bo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Wa(t,null,i,n):Us(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ts(i,a),Ws(e,t,i,a,n);case 7:return Us(e,t,t.pendingProps,n),t.child;case 8:return Us(e,t,t.pendingProps.children,n),t.child;case 12:return Us(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Yi(Ka,i._currentValue),i._currentValue=s,o!==null){if(Ar(o.value,s)){if(o.children===a.children&&!Qi.current){t=uc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=co(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Qa(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Qa(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}Us(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,$a(t,n),a=eo(a),i=i(a),t.flags|=1,Us(e,t,i,n),t.child;case 14:return i=t.type,a=Ts(i,t.pendingProps),a=Ts(i.type,a),Gs(e,t,i,a,n);case 15:return Ks(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ts(i,a),lc(e,t),t.tag=1,ta(i)?(e=!0,aa(t)):e=!1,$a(t,n),ks(t,i,a),js(t,i,a,n),Zs(null,t,i,!0,e,n);case 19:return cc(e,t,n);case 22:return qs(e,t,n)}throw Error(r(156,t.tag))};function Ql(e,t){return dt(e,t)}function $l(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function eu(e,t,n,r){return new $l(e,t,n,r)}function tu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function nu(e){if(typeof e==`function`)return+!!tu(e);if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===P)return 14}return 2}function ru(e,t){var n=e.alternate;return n===null?(n=eu(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function iu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)tu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return au(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=eu(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=eu(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=eu(19,n,t,a),e.elementType=N,e.lanes=o,e;case I:return ou(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case P:s=14;break a;case F:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=eu(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function au(e,t,n,r){return e=eu(7,e,r,t),e.lanes=n,e}function ou(e,t,n,r){return e=eu(22,e,r,t),e.elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function su(e,t,n){return e=eu(6,e,null,t),e.lanes=n,e}function cu(e,t,n){return t=eu(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Lt(0),this.expirationTimes=Lt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function uu(e,t,n,r,i,a,o,s,c){return e=new lu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=eu(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},oo(a),e}function du(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function fu(e){if(!e)return Xi;e=e._reactInternals;a:{if(at(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ta(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ta(n))return ia(e,n,t)}return t}function pu(e,t,n,r,i,a,o,s,c){return e=uu(n,r,!0,e,i,a,o,s,c),e.context=fu(null),n=e.current,r=G(),i=xl(n),a=co(r,i),a.callback=t??null,lo(n,a,i),e.current.lanes=i,Rt(e,i,r),Cl(e,r),e}function mu(e,t,n,r){var i=t.current,a=G(),o=xl(i);return n=fu(n),t.context===null?t.context=n:t.pendingContext=n,t=co(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=lo(i,t,o),e!==null&&(Sl(e,i,o,a),uo(e,i,o)),o}function hu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _u(e,t){gu(e,t),(e=e.alternate)&&gu(e,t)}function vu(){return null}var yu=typeof reportError==`function`?reportError:function(e){console.error(e)};function bu(e){this._internalRoot=e}xu.prototype.render=bu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));mu(e,t,null,null)},xu.prototype.unmount=bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jl(function(){mu(null,e,null,null)}),t[Li]=null}};function xu(e){this._internalRoot=e}xu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<tn.length&&t!==0&&t<tn[n].priority;n++);tn.splice(n,0,e),n===0&&sn(e)}};function Su(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function wu(){}function Tu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=hu(o);a.call(e)}}var o=pu(t,r,e,0,null,!1,!1,``,wu);return e._reactRootContainer=o,e[Li]=o.current,di(e.nodeType===8?e.parentNode:e),jl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=hu(c);s.call(e)}}var c=uu(e,0,!1,null,null,!1,!1,``,wu);return e._reactRootContainer=c,e[Li]=c.current,di(e.nodeType===8?e.parentNode:e),jl(function(){mu(t,c,n,r)}),c}function Eu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=hu(o);s.call(e)}}mu(t,o,e,i)}else o=Tu(n,t,e,i,r);return hu(o)}Ut=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=jt(t.pendingLanes);n!==0&&(Bt(t,n|1),Cl(t,ht()),!(U&6)&&(ul=ht()+500,fa()))}break;case 13:jl(function(){var t=io(e,1);t!==null&&Sl(t,e,1,G())}),_u(e,1)}},Wt=function(e){if(e.tag===13){var t=io(e,134217728);t!==null&&Sl(t,e,134217728,G()),_u(e,134217728)}},Gt=function(e){if(e.tag===13){var t=xl(e),n=io(e,t);n!==null&&Sl(n,e,t,G()),_u(e,t)}},Kt=function(){return Vt},qt=function(e,t){var n=Vt;try{return Vt=e,t()}finally{Vt=n}},Re=function(e,t,n){switch(t){case`input`:if(he(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Wi(i);if(!a)throw Error(r(90));ue(i),he(i,a)}}}break;case`textarea`:Se(e,n);break;case`select`:t=n.value,t!=null&&ye(e,!!n.multiple,t,!1)}},We=Al,Ge=jl;var Du={usingClientEntryPoint:!1,Events:[Hi,Ui,Wi,He,Ue,Al]},Ou={findFiberByHostInstance:Vi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},ku={bundleType:Ou.bundleType,version:Ou.version,rendererPackageName:Ou.rendererPackageName,rendererConfig:Ou.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lt(e),e===null?null:e.stateNode},findFiberByHostInstance:Ou.findFiberByHostInstance||vu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Au=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Au.isDisabled&&Au.supportsFiber)try{St=Au.inject(ku),Ct=Au}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Du,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Su(t))throw Error(r(200));return du(e,t,null,n)},e.createRoot=function(e,t){if(!Su(e))throw Error(r(299));var n=!1,i=``,a=yu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=uu(e,1,!1,null,null,n,!1,i,a),e[Li]=t.current,di(e.nodeType===8?e.parentNode:e),new bu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=lt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return jl(e)},e.hydrate=function(e,t,n){if(!Cu(t))throw Error(r(200));return Eu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Su(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=yu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=pu(t,null,e,1,n??null,a,!1,o,s),e[Li]=t.current,di(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new xu(t)},e.render=function(e,t,n){if(!Cu(t))throw Error(r(200));return Eu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Cu(e))throw Error(r(40));return e._reactRootContainer?(jl(function(){Eu(null,null,e,!1,function(){e._reactRootContainer=null,e[Li]=null})}),!0):!1},e.unstable_batchedUpdates=Al,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Cu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Eu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=h();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),_=l(d(),1),v=g(),y=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),b=o(((e,t)=>{t.exports=y()}))();function x(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=x(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var S={value:()=>{}};function C(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new w(n)}function w(e){this._=e}function T(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}w.prototype=C.prototype={constructor:w,on:function(e,t){var n=this._,r=T(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=E(n[i],e.name)))return i}else{if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=D(n[i],e.name,t);else if(t==null)for(i in n)n[i]=D(n[i],e.name,null);return this}},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new w(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function E(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function D(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=S,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var O=`http://www.w3.org/1999/xhtml`,k={svg:`http://www.w3.org/2000/svg`,xhtml:O,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function A(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),k.hasOwnProperty(t)?{space:k[t],local:e}:e}function j(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===O&&t.documentElement.namespaceURI===O?t.createElement(e):t.createElementNS(n,e)}}function M(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function N(e){var t=A(e);return(t.local?M:j)(t)}function P(){}function F(e){return e==null?P:function(){return this.querySelector(e)}}function I(e){typeof e!=`function`&&(e=F(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Lt(r,this._parents)}function ee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function te(){return[]}function L(e){return e==null?te:function(){return this.querySelectorAll(e)}}function ne(e){return function(){return ee(e.apply(this,arguments))}}function R(e){e=typeof e==`function`?ne(e):L(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Lt(r,i)}function z(e){return function(){return this.matches(e)}}function re(e){return function(t){return t.matches(e)}}var ie=Array.prototype.find;function B(e){return function(){return ie.call(this.children,e)}}function ae(){return this.firstElementChild}function oe(e){return this.select(e==null?ae:B(typeof e==`function`?e:re(e)))}var se=Array.prototype.filter;function ce(){return Array.from(this.children)}function le(e){return function(){return se.call(this.children,e)}}function ue(e){return this.selectAll(e==null?ce:le(typeof e==`function`?e:re(e)))}function de(e){typeof e!=`function`&&(e=z(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Lt(r,this._parents)}function fe(e){return Array(e.length)}function pe(){return new Lt(this._enter||this._groups.map(fe),this._parents)}function me(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}me.prototype={constructor:me,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function he(e){return function(){return e}}function ge(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new me(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function _e(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new me(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function ve(e){return e.__data__}function ye(e,t){if(!arguments.length)return Array.from(this,ve);var n=t?_e:ge,r=this._parents,i=this._groups;typeof e!=`function`&&(e=he(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=be(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Lt(o,r),o._enter=s,o._exit=c,o}function be(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function xe(){return new Lt(this._exit||this._groups.map(fe),this._parents)}function Se(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ce(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Lt(s,this._parents)}function we(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Te(e){e||=Ee;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Lt(i,this._parents).order()}function Ee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function De(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Oe(){return Array.from(this)}function ke(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Ae(){let e=0;for(let t of this)++e;return e}function je(){return!this.node()}function Me(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Ne(e){return function(){this.removeAttribute(e)}}function Pe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fe(e,t){return function(){this.setAttribute(e,t)}}function Ie(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Le(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Re(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function ze(e,t){var n=A(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Pe:Ne:typeof t==`function`?n.local?Re:Le:n.local?Ie:Fe)(n,t))}function Be(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ve(e){return function(){this.style.removeProperty(e)}}function He(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ue(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function We(e,t,n){return arguments.length>1?this.each((t==null?Ve:typeof t==`function`?Ue:He)(e,t,n??``)):Ge(this.node(),e)}function Ge(e,t){return e.style.getPropertyValue(t)||Be(e).getComputedStyle(e,null).getPropertyValue(t)}function Ke(e){return function(){delete this[e]}}function qe(e,t){return function(){this[e]=t}}function Je(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ye(e,t){return arguments.length>1?this.each((t==null?Ke:typeof t==`function`?Je:qe)(e,t)):this.node()[e]}function Xe(e){return e.trim().split(/^|\s+/)}function Ze(e){return e.classList||new Qe(e)}function Qe(e){this._node=e,this._names=Xe(e.getAttribute(`class`)||``)}Qe.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function $e(e,t){for(var n=Ze(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function et(e,t){for(var n=Ze(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function tt(e){return function(){$e(this,e)}}function nt(e){return function(){et(this,e)}}function rt(e,t){return function(){(t.apply(this,arguments)?$e:et)(this,e)}}function it(e,t){var n=Xe(e+``);if(arguments.length<2){for(var r=Ze(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?rt:t?tt:nt)(n,t))}function at(){this.textContent=``}function ot(e){return function(){this.textContent=e}}function st(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function ct(e){return arguments.length?this.each(e==null?at:(typeof e==`function`?st:ot)(e)):this.node().textContent}function lt(){this.innerHTML=``}function ut(e){return function(){this.innerHTML=e}}function dt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function ft(e){return arguments.length?this.each(e==null?lt:(typeof e==`function`?dt:ut)(e)):this.node().innerHTML}function pt(){this.nextSibling&&this.parentNode.appendChild(this)}function mt(){return this.each(pt)}function ht(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gt(){return this.each(ht)}function _t(e){var t=typeof e==`function`?e:N(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function vt(){return null}function yt(e,t){var n=typeof e==`function`?e:N(e),r=t==null?vt:typeof t==`function`?t:F(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function bt(){var e=this.parentNode;e&&e.removeChild(this)}function xt(){return this.each(bt)}function St(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ct(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wt(e){return this.select(e?Ct:St)}function Tt(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Et(e){return function(t){e.call(this,t,this.__data__)}}function Dt(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Ot(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function kt(e,t,n){return function(){var r=this.__on,i,a=Et(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function At(e,t,n){var r=Dt(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}}else{for(s=t?kt:Ot,i=0;i<a;++i)this.each(s(r[i],t,n));return this}}function jt(e,t,n){var r=Be(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Mt(e,t){return function(){return jt(this,e,t)}}function Nt(e,t){return function(){return jt(this,e,t.apply(this,arguments))}}function Pt(e,t){return this.each((typeof t==`function`?Nt:Mt)(e,t))}function*Ft(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var It=[null];function Lt(e,t){this._groups=e,this._parents=t}function Rt(){return new Lt([[document.documentElement]],It)}function zt(){return this}Lt.prototype=Rt.prototype={constructor:Lt,select:I,selectAll:R,selectChild:oe,selectChildren:ue,filter:de,data:ye,enter:pe,exit:xe,join:Se,merge:Ce,selection:zt,order:we,sort:Te,call:De,nodes:Oe,node:ke,size:Ae,empty:je,each:Me,attr:ze,style:We,property:Ye,classed:it,text:ct,html:ft,raise:mt,lower:gt,append:_t,insert:yt,remove:xt,clone:wt,datum:Tt,on:At,dispatch:Pt,[Symbol.iterator]:Ft};function Bt(e){return typeof e==`string`?new Lt([[document.querySelector(e)]],[document.documentElement]):new Lt([[e]],It)}var Vt=0;function Ht(){return new Ut}function Ut(){this._=`@`+(++Vt).toString(36)}Ut.prototype=Ht.prototype={constructor:Ut,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function Wt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Gt(e,t){if(e=Wt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Kt={passive:!1},qt={capture:!0,passive:!1};function Jt(e){e.stopImmediatePropagation()}function Yt(e){e.preventDefault(),e.stopImmediatePropagation()}function Xt(e){var t=e.document.documentElement,n=Bt(e).on(`dragstart.drag`,Yt,qt);`onselectstart`in t?n.on(`selectstart.drag`,Yt,qt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Zt(e,t){var n=e.document.documentElement,r=Bt(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Yt,qt),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Qt=e=>()=>e;function $t(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}$t.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function en(e){return!e.ctrlKey&&!e.button}function tn(){return this.parentNode}function nn(e,t){return t??{x:e.x,y:e.y}}function rn(){return navigator.maxTouchPoints||`ontouchstart`in this}function an(){var e=en,t=tn,n=nn,r=rn,i={},a=C(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,Kt).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!u&&e.call(this,n,r)){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(Bt(n.view).on(`mousemove.drag`,m,qt).on(`mouseup.drag`,h,qt),Xt(n.view),Jt(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(Yt(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){Bt(e.view).on(`mousemove.drag mouseup.drag`,null),Zt(e.view,l),Yt(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r))for(var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s=0,c;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(Jt(n),c(`start`,n,i[s]))}function _(e){for(var t=e.changedTouches,n=t.length,r=0,a;r<n;++r)(a=i[t[r].identifier])&&(Yt(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(Jt(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=Gt(l||r,t),p,m,h;if((h=n.call(e,new $t(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=Gt(l||a,t),_=o}u.call(r,e,new $t(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Qt(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:Qt(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Qt(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Qt(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function on(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function sn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function cn(){}var ln=.7,un=1/ln,dn=`\\s*([+-]?\\d+)\\s*`,fn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,pn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,mn=/^#([0-9a-f]{3,8})$/,hn=RegExp(`^rgb\\(${dn},${dn},${dn}\\)$`),gn=RegExp(`^rgb\\(${pn},${pn},${pn}\\)$`),_n=RegExp(`^rgba\\(${dn},${dn},${dn},${fn}\\)$`),vn=RegExp(`^rgba\\(${pn},${pn},${pn},${fn}\\)$`),yn=RegExp(`^hsl\\(${fn},${pn},${pn}\\)$`),bn=RegExp(`^hsla\\(${fn},${pn},${pn},${fn}\\)$`),xn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};on(cn,En,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Sn,formatHex:Sn,formatHex8:Cn,formatHsl:wn,formatRgb:Tn,toString:Tn});function Sn(){return this.rgb().formatHex()}function Cn(){return this.rgb().formatHex8()}function wn(){return zn(this).formatHsl()}function Tn(){return this.rgb().formatRgb()}function En(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=mn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Dn(t):n===3?new jn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?On(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?On(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=hn.exec(e))?new jn(t[1],t[2],t[3],1):(t=gn.exec(e))?new jn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=_n.exec(e))?On(t[1],t[2],t[3],t[4]):(t=vn.exec(e))?On(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yn.exec(e))?Rn(t[1],t[2]/100,t[3]/100,1):(t=bn.exec(e))?Rn(t[1],t[2]/100,t[3]/100,t[4]):xn.hasOwnProperty(e)?Dn(xn[e]):e===`transparent`?new jn(NaN,NaN,NaN,0):null}function Dn(e){return new jn(e>>16&255,e>>8&255,e&255,1)}function On(e,t,n,r){return r<=0&&(e=t=n=NaN),new jn(e,t,n,r)}function kn(e){return e instanceof cn||(e=En(e)),e?(e=e.rgb(),new jn(e.r,e.g,e.b,e.opacity)):new jn}function An(e,t,n,r){return arguments.length===1?kn(e):new jn(e,t,n,r??1)}function jn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}on(jn,An,sn(cn,{brighter(e){return e=e==null?un:un**+e,new jn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ln:ln**+e,new jn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jn(In(this.r),In(this.g),In(this.b),Fn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Mn,formatHex:Mn,formatHex8:Nn,formatRgb:Pn,toString:Pn}));function Mn(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}`}function Nn(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}${Ln((isNaN(this.opacity)?1:this.opacity)*255)}`}function Pn(){let e=Fn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${In(this.r)}, ${In(this.g)}, ${In(this.b)}${e===1?`)`:`, ${e})`}`}function Fn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function In(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ln(e){return e=In(e),(e<16?`0`:``)+e.toString(16)}function Rn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vn(e,t,n,r)}function zn(e){if(e instanceof Vn)return new Vn(e.h,e.s,e.l,e.opacity);if(e instanceof cn||(e=En(e)),!e)return new Vn;if(e instanceof Vn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Vn(o,s,c,e.opacity)}function Bn(e,t,n,r){return arguments.length===1?zn(e):new Vn(e,t,n,r??1)}function Vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}on(Vn,Bn,sn(cn,{brighter(e){return e=e==null?un:un**+e,new Vn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ln:ln**+e,new Vn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new jn(Wn(e>=240?e-240:e+120,i,r),Wn(e,i,r),Wn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Vn(Hn(this.h),Un(this.s),Un(this.l),Fn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Fn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Hn(this.h)}, ${Un(this.s)*100}%, ${Un(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Hn(e){return e=(e||0)%360,e<0?e+360:e}function Un(e){return Math.max(0,Math.min(1,e||0))}function Wn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Gn=Math.PI/180,Kn=180/Math.PI,qn=18,Jn=.96422,Yn=1,Xn=.82521,Zn=4/29,Qn=6/29,$n=3*Qn*Qn,er=Qn*Qn*Qn;function tr(e){if(e instanceof rr)return new rr(e.l,e.a,e.b,e.opacity);if(e instanceof ur)return dr(e);e instanceof jn||(e=kn(e));var t=sr(e.r),n=sr(e.g),r=sr(e.b),i=ir((.2225045*t+.7168786*n+.0606169*r)/Yn),a,o;return t===n&&n===r?a=o=i:(a=ir((.4360747*t+.3850649*n+.1430804*r)/Jn),o=ir((.0139322*t+.0971045*n+.7141733*r)/Xn)),new rr(116*i-16,500*(a-i),200*(i-o),e.opacity)}function nr(e,t,n,r){return arguments.length===1?tr(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}on(rr,nr,sn(cn,{brighter(e){return new rr(this.l+qn*(e??1),this.a,this.b,this.opacity)},darker(e){return new rr(this.l-qn*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Jn*ar(t),e=Yn*ar(e),n=Xn*ar(n),new jn(or(3.1338561*t-1.6168667*e-.4906146*n),or(-.9787684*t+1.9161415*e+.033454*n),or(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ir(e){return e>er?e**(1/3):e/$n+Zn}function ar(e){return e>Qn?e*e*e:$n*(e-Zn)}function or(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function sr(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function cr(e){if(e instanceof ur)return new ur(e.h,e.c,e.l,e.opacity);if(e instanceof rr||(e=tr(e)),e.a===0&&e.b===0)return new ur(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Kn;return new ur(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function lr(e,t,n,r){return arguments.length===1?cr(e):new ur(e,t,n,r??1)}function ur(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function dr(e){if(isNaN(e.h))return new rr(e.l,0,0,e.opacity);var t=e.h*Gn;return new rr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}on(ur,lr,sn(cn,{brighter(e){return new ur(this.h,this.c,this.l+qn*(e??1),this.opacity)},darker(e){return new ur(this.h,this.c,this.l-qn*(e??1),this.opacity)},rgb(){return dr(this).rgb()}}));var fr=-.14861,pr=1.78277,mr=-.29227,hr=-.90649,gr=1.97294,_r=gr*hr,vr=gr*pr,yr=pr*mr-hr*fr;function br(e){if(e instanceof Sr)return new Sr(e.h,e.s,e.l,e.opacity);e instanceof jn||(e=kn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(yr*r+_r*t-vr*n)/(yr+_r-vr),a=r-i,o=(gr*(n-i)-mr*a)/hr,s=Math.sqrt(o*o+a*a)/(gr*i*(1-i)),c=s?Math.atan2(o,a)*Kn-120:NaN;return new Sr(c<0?c+360:c,s,i,e.opacity)}function xr(e,t,n,r){return arguments.length===1?br(e):new Sr(e,t,n,r??1)}function Sr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}on(Sr,xr,sn(cn,{brighter(e){return e=e==null?un:un**+e,new Sr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ln:ln**+e,new Sr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Gn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new jn(255*(t+n*(fr*r+pr*i)),255*(t+n*(mr*r+hr*i)),255*(t+gr*r*n),this.opacity)}}));var Cr=e=>()=>e;function wr(e,t){return function(n){return e+n*t}}function Tr(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Er(e,t){var n=t-e;return n?wr(e,n>180||n<-180?n-360*Math.round(n/360):n):Cr(isNaN(e)?t:e)}function Dr(e){return(e=+e)==1?Or:function(t,n){return n-t?Tr(t,n,e):Cr(isNaN(t)?n:t)}}function Or(e,t){var n=t-e;return n?wr(e,n):Cr(isNaN(e)?t:e)}var kr=(function e(t){var n=Dr(t);function r(e,t){var r=n((e=An(e)).r,(t=An(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Or(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Ar(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function jr(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Mr(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=Vr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function Nr(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Fr(e,t){var n={},r={},i;for(i in typeof e==`object`&&e||(e={}),typeof t==`object`&&t||(t={}),t)i in e?n[i]=Vr(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var Ir=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lr=new RegExp(Ir.source,`g`);function Rr(e){return function(){return e}}function zr(e){return function(t){return e(t)+``}}function Br(e,t){var n=Ir.lastIndex=Lr.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Ir.exec(e))&&(i=Lr.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Pr(r,i)})),n=Lr.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?zr(c[0].x):Rr(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function Vr(e,t){var n=typeof t,r;return t==null||n===`boolean`?Cr(t):(n===`number`?Pr:n===`string`?(r=En(t))?(t=r,kr):Br:t instanceof En?kr:t instanceof Date?Nr:jr(t)?Ar:Array.isArray(t)?Mr:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?Fr:Pr)(e,t)}var Hr=180/Math.PI,Ur={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wr(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Hr,skewX:Math.atan(c)*Hr,scaleX:o,scaleY:s}}var Gr;function Kr(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Ur:Wr(t.a,t.b,t.c,t.d,t.e,t.f)}function qr(e){return e==null||(Gr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Gr.setAttribute(`transform`,e),!(e=Gr.transform.baseVal.consolidate()))?Ur:(e=e.matrix,Wr(e.a,e.b,e.c,e.d,e.e,e.f))}function Jr(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Pr(e,i)},{i:c-2,x:Pr(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Pr(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Pr(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Pr(e,n)},{i:s-2,x:Pr(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Yr=Jr(Kr,`px, `,`px)`,`deg)`),Xr=Jr(qr,`, `,`)`,`)`),Zr=1e-12;function Qr(e){return((e=Math.exp(e))+1/e)/2}function $r(e){return((e=Math.exp(e))-1/e)/2}function ei(e){return((e=Math.exp(2*e))-1)/(e+1)}var ti=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Zr)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=Qr(y),c=s/(n*g)*(i*ei(t*r+y)-$r(y));return[a+c*d,o+c*f,s*i/Qr(t*r+y)]}}return m.duration=Math.abs(h)*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4);function ni(e){return(function t(n){n=+n;function r(t,r){var i=e((t=xr(t)).h,(r=xr(r)).h),a=Or(t.s,r.s),o=Or(t.l,r.l),s=Or(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=a(e),t.l=o(e**+n),t.opacity=s(e),t+``}}return r.gamma=t,r})(1)}ni(Er),ni(Or);var ri=0,ii=0,ai=0,oi=1e3,si,ci,li=0,ui=0,di=0,fi=typeof performance==`object`&&performance.now?performance:Date,pi=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mi(){return ui||=(pi(hi),fi.now()+di)}function hi(){ui=0}function gi(){this._call=this._time=this._next=null}gi.prototype=_i.prototype={constructor:gi,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?mi():+n)+(t==null?0:+t),!this._next&&ci!==this&&(ci?ci._next=this:si=this,ci=this),this._call=e,this._time=n,Si()},stop:function(){this._call&&(this._call=null,this._time=1/0,Si())}};function _i(e,t,n){var r=new gi;return r.restart(e,t,n),r}function vi(){mi(),++ri;for(var e=si,t;e;)(t=ui-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ri}function yi(){ui=(li=fi.now())+di,ri=ii=0;try{vi()}finally{ri=0,xi(),ui=0}}function bi(){var e=fi.now(),t=e-li;t>oi&&(di-=t,li=e)}function xi(){for(var e,t=si,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:si=n);ci=e,Si(r)}function Si(e){ri||(ii&&=clearTimeout(ii),e-ui>24?(e<1/0&&(ii=setTimeout(yi,Math.ceil(e-fi.now()-di)+1)),ai&&=clearInterval(ai)):(ai||=(li=fi.now(),setInterval(bi,oi)),ri=1,pi(yi)))}function Ci(e,t,n){var r=new gi;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}function wi(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Ti=3;(function e(t){t=+t;function n(e){return e**+t}return n.exponent=e,n})(Ti),(function e(t){t=+t;function n(e){return 1-(1-e)**t}return n.exponent=e,n})(Ti),(function e(t){t=+t;function n(e){return((e*=2)<=1?e**+t:2-(2-e)**t)/2}return n.exponent=e,n})(Ti);function Ei(e){return(2**(-10*e)-.0009765625)*1.0009775171065494}var Di=4/11;1/Di/Di;var Oi=1.70158;(function e(t){t=+t;function n(e){return(e=+e)*e*(t*(e-1)+e)}return n.overshoot=e,n})(Oi),(function e(t){t=+t;function n(e){return--e*e*((e+1)*t+e)+1}return n.overshoot=e,n})(Oi),(function e(t){t=+t;function n(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return n.overshoot=e,n})(Oi);var ki=2*Math.PI,Ai=1,ji=.3;(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=ki);function i(e){return t*Ei(- --e)*Math.sin((r-e)/n)}return i.amplitude=function(t){return e(t,n*ki)},i.period=function(n){return e(t,n)},i})(Ai,ji),(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=ki);function i(e){return 1-t*Ei(e=+e)*Math.sin((e+r)/n)}return i.amplitude=function(t){return e(t,n*ki)},i.period=function(n){return e(t,n)},i})(Ai,ji),(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=ki);function i(e){return((e=e*2-1)<0?t*Ei(-e)*Math.sin((r-e)/n):2-t*Ei(e)*Math.sin((r+e)/n))/2}return i.amplitude=function(t){return e(t,n*ki)},i.period=function(n){return e(t,n)},i})(Ai,ji);var Mi=C(`start`,`end`,`cancel`,`interrupt`),Ni=[],Pi=0,Fi=1,Ii=2,Li=3,Ri=4,zi=5,Bi=6;function Vi(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Gi(e,n,{name:t,index:r,group:i,on:Mi,tween:Ni,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Pi})}function Hi(e,t){var n=Wi(e,t);if(n.state>Pi)throw Error(`too late; already scheduled`);return n}function Ui(e,t){var n=Wi(e,t);if(n.state>Li)throw Error(`too late; already running`);return n}function Wi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Gi(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=_i(a,0,n.time);function a(e){n.state=Fi,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==Fi)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===Li)return Ci(o);f.state===Ri?(f.state=Bi,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=Bi,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Ci(function(){n.state===Li&&(n.state=Ri,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=Ii,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===Ii){for(n.state=Li,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=zi,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===zi&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=Bi,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Ki(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n)(r=n[o]).name===t?(i=r.state>Ii&&r.state<zi,r.state=Bi,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]):a=!1;a&&delete e.__transition}}function qi(e){return this.each(function(){Ki(this,e)})}function Ji(e,t){var n,r;return function(){var i=Ui(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Yi(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Ui(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Xi(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Wi(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Ji:Yi)(n,e,t))}function Zi(e,t,n){var r=e._id;return e.each(function(){var e=Ui(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Wi(e,r).value[t]}}function Qi(e,t){var n;return(typeof t==`number`?Pr:t instanceof En?kr:(n=En(t))?(t=n,kr):Br)(e,t)}function $i(e){return function(){this.removeAttribute(e)}}function ea(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ta(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function na(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function ra(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function ia(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function aa(e,t){var n=A(e),r=n===`transform`?Xr:Qi;return this.attrTween(e,typeof t==`function`?(n.local?ia:ra)(n,r,Zi(this,`attr.`+e,t)):t==null?(n.local?ea:$i)(n):(n.local?na:ta)(n,r,t))}function oa(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function sa(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ca(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&sa(e,i)),n}return i._value=t,i}function la(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&oa(e,i)),n}return i._value=t,i}function ua(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=A(e);return this.tween(n,(r.local?ca:la)(r,t))}function da(e,t){return function(){Hi(this,e).delay=+t.apply(this,arguments)}}function fa(e,t){return t=+t,function(){Hi(this,e).delay=t}}function pa(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?da:fa)(t,e)):Wi(this.node(),t).delay}function ma(e,t){return function(){Ui(this,e).duration=+t.apply(this,arguments)}}function ha(e,t){return t=+t,function(){Ui(this,e).duration=t}}function ga(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?ma:ha)(t,e)):Wi(this.node(),t).duration}function _a(e,t){if(typeof t!=`function`)throw Error();return function(){Ui(this,e).ease=t}}function va(e){var t=this._id;return arguments.length?this.each(_a(t,e)):Wi(this.node(),t).ease}function ya(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Ui(this,e).ease=n}}function ba(e){if(typeof e!=`function`)throw Error();return this.each(ya(this._id,e))}function xa(e){typeof e!=`function`&&(e=z(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Xa(r,this._parents,this._name,this._id)}function Sa(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Xa(o,this._parents,this._name,this._id)}function Ca(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function wa(e,t,n){var r,i,a=Ca(t)?Hi:Ui;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Ta(e,t){var n=this._id;return arguments.length<2?Wi(this.node(),n).on.on(e):this.each(wa(n,e,t))}function Ea(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Da(){return this.on(`end.remove`,Ea(this._id))}function Oa(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=F(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Vi(l[f],t,n,f,l,Wi(u,n)));return new Xa(a,this._parents,t,n)}function ka(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=L(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Wi(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Vi(p,t,n,h,f,m);a.push(f),o.push(u)}return new Xa(a,o,t,n)}var Aa=Rt.prototype.constructor;function ja(){return new Aa(this._groups,this._parents)}function Ma(e,t){var n,r,i;return function(){var a=Ge(this,e),o=(this.style.removeProperty(e),Ge(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Na(e){return function(){this.style.removeProperty(e)}}function Pa(e,t,n){var r,i=n+``,a;return function(){var o=Ge(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fa(e,t,n){var r,i,a;return function(){var o=Ge(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ge(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Ia(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Ui(this,e),l=c.on,u=c.value[a]==null?s||=Na(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function La(e,t,n){var r=(e+=``)==`transform`?Yr:Qi;return t==null?this.styleTween(e,Ma(e,r)).on(`end.style.`+e,Na(e)):typeof t==`function`?this.styleTween(e,Fa(e,r,Zi(this,`style.`+e,t))).each(Ia(this._id,e)):this.styleTween(e,Pa(e,r,t),n).on(`end.style.`+e,null)}function Ra(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function za(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ra(e,a,n)),r}return a._value=t,a}function Ba(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,za(e,t,n??``))}function Va(e){return function(){this.textContent=e}}function Ha(e){return function(){var t=e(this);this.textContent=t??``}}function Ua(e){return this.tween(`text`,typeof e==`function`?Ha(Zi(this,`text`,e)):Va(e==null?``:e+``))}function Wa(e){return function(t){this.textContent=e.call(this,t)}}function Ga(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Wa(r)),t}return r._value=e,r}function Ka(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Ga(e))}function qa(){for(var e=this._name,t=this._id,n=Za(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Wi(c,t);Vi(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Xa(r,this._parents,e,n)}function Ja(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Ui(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ya=0;function Xa(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Za(){return++Ya}var Qa=Rt.prototype;Xa.prototype={constructor:Xa,select:Oa,selectAll:ka,selectChild:Qa.selectChild,selectChildren:Qa.selectChildren,filter:xa,merge:Sa,selection:ja,transition:qa,call:Qa.call,nodes:Qa.nodes,node:Qa.node,size:Qa.size,empty:Qa.empty,each:Qa.each,on:Ta,attr:aa,attrTween:ua,style:La,styleTween:Ba,text:Ua,textTween:Ka,remove:Da,tween:Xi,delay:pa,duration:ga,ease:va,easeVarying:ba,end:Ja,[Symbol.iterator]:Qa[Symbol.iterator]};var $a={time:null,delay:0,duration:250,ease:wi};function eo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function to(e){var t,n;e instanceof Xa?(t=e._id,e=e._name):(t=Za(),(n=$a).time=mi(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Vi(c,e,t,l,o,n||eo(c,t));return new Xa(r,this._parents,e,t)}Rt.prototype.interrupt=qi,Rt.prototype.transition=to;var no=e=>()=>e;function ro(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function io(e,t,n){this.k=e,this.x=t,this.y=n}io.prototype={constructor:io,scale:function(e){return e===1?this:new io(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new io(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var ao=new io(1,0,0);oo.prototype=io.prototype;function oo(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ao;return e.__zoom}function so(e){e.stopImmediatePropagation()}function co(e){e.preventDefault(),e.stopImmediatePropagation()}function lo(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function uo(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function fo(){return this.__zoom||ao}function po(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function mo(){return navigator.maxTouchPoints||`ontouchstart`in this}function ho(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function go(){var e=lo,t=uo,n=ho,r=po,i=mo,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=ti,l=C(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,fo).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,D).filter(i).on(`touchstart.zoom`,O).on(`touchmove.zoom`,k).on(`touchend.zoom touchcancel.zoom`,A).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,fo),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(ao.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new io(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new io(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new io(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=Bt(this.that).datum();l.call(e,this.that,new ro(e,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:l}),t)}};function T(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=Gt(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Ki(this),s.start();co(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function E(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=Bt(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=Gt(t,i),l=t.clientX,u=t.clientY;Xt(t.view),so(t),a.mouse=[c,this.__zoom.invert(c)],Ki(this),a.start();function d(e){if(co(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=Gt(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),Zt(e.view,a.moved),co(e),a.event(e).end()}}function D(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=Gt(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);co(r),s>0?Bt(this).transition().duration(s).call(x,d,c,r):Bt(this).call(_.transform,d,c,r)}}function O(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(so(t),s=0;s<i;++s)c=r[s],l=Gt(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),Ki(this),a.start())}}function k(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(co(e),s=0;s<a;++s)c=i[s],l=Gt(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function A(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(so(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=Gt(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=Bt(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:no(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:no(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:no(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:no([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var _o={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},vo=[[-1/0,-1/0],[1/0,1/0]],yo=[`Enter`,` `,`Escape`],bo={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},xo;(function(e){e.Strict=`strict`,e.Loose=`loose`})(xo||={});var So;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(So||={});var Co;(function(e){e.Partial=`partial`,e.Full=`full`})(Co||={});var wo={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},To;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(To||={});var Eo;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(Eo||={});var V;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(V||={});var Do={[V.Left]:V.Right,[V.Right]:V.Left,[V.Top]:V.Bottom,[V.Bottom]:V.Top},Oo=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,ko=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),Ao=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),jo=(e,t=[0,0])=>{let{width:n,height:r}=ds(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},Mo=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):Ao(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,Go(e,Yo(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?qo(r):{x:0,y:0,width:0,height:0}},No=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=Go(n,Yo(e)),r=!0)}),r?qo(n):{x:0,y:0,width:0,height:0}},Po=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=Zo(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d},Fo=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function Io(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=ds(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function Lo({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=cs(No(Io(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function Ro({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,_o.error005());else{let{width:e,height:t}=ds(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&us(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=us(d)?Vo(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,_o.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function zo({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=Fo(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var Bo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Vo=(e={x:0,y:0},t,n)=>({x:Bo(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Bo(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ho(e,t,n){let{width:r,height:i}=ds(n),{x:a,y:o}=n.internals.positionAbsolute;return Vo(e,[[a,o],[a+r,o+i]],t)}var Uo=(e,t,n)=>e<t?Bo(Math.abs(e-t),1,t)/t:e>n?-Bo(Math.abs(e-n),1,t)/t:0,Wo=(e,t,n=15,r=40)=>[Uo(e.x,r,t.width-r)*n,Uo(e.y,r,t.height-r)*n],Go=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ko=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),qo=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Jo=(e,t=[0,0])=>{let{x:n,y:r}=Ao(e)?e.internals.positionAbsolute:jo(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Yo=(e,t=[0,0])=>{let{x:n,y:r}=Ao(e)?e.internals.positionAbsolute:jo(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},Xo=(e,t)=>qo(Go(Ko(e),Ko(t))),Zo=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},Qo=(e,t)=>Zo(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),$o=e=>es(e.width)&&es(e.height)&&es(e.x)&&es(e.y),es=e=>!isNaN(e)&&isFinite(e),ts=(e,t)=>(e,t)=>{},ns=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rs=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?ns(s,o):s},is=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function as(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function os(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=as(e,n),i=as(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=as(e.top??e.y??0,n),i=as(e.bottom??e.y??0,n),a=as(e.left??e.x??0,t),o=as(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ss(e,t,n,r,i,a){let{x:o,y:s}=is(e,[t,n,r]),{x:c,y:l}=is({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var cs=(e,t,n,r,i,a)=>{let o=os(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=Bo(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=ss(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},ls=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function us(e){return e!=null&&e!==`parent`}function ds(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function fs(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function ps(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function ms(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function hs(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function gs(e){return{...bo,...e||{}}}function _s(e){return e===null?null:e?`valid`:`invalid`}function vs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=ws(e),s=rs({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?ns(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var ys=e=>({width:e.offsetWidth,height:e.offsetHeight}),bs=e=>e?.getRootNode?.()||window?.document,xs=[`INPUT`,`SELECT`,`TEXTAREA`];function Ss(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?xs.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var Cs=e=>`clientX`in e,ws=(e,t)=>{let n=Cs(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Ts=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...ys(t)}})};function Es({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function Ds(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Os({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case V.Left:return[t-Ds(t-r,a),n];case V.Right:return[t+Ds(r-t,a),n];case V.Top:return[t,n-Ds(n-i,a)];case V.Bottom:return[t,n+Ds(i-n,a)]}}function ks({sourceX:e,sourceY:t,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:a=V.Top,curvature:o=.25}){let[s,c]=Os({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=Os({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=Es({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function As({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function js({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function Ms({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=Go(Yo(e),Yo(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),Qo({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},qo(a))>0}var Ns=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,Ps=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),Fs=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,_o.error006()),t;let r=n.getEdgeId||Ns,i;return i=Oo(e)?{...e}:{...e,id:r(e)},Ps(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Is({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=As({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var Ls={[V.Left]:{x:-1,y:0},[V.Right]:{x:1,y:0},[V.Top]:{x:0,y:-1},[V.Bottom]:{x:0,y:1}},Rs=({source:e,sourcePosition:t=V.Bottom,target:n})=>t===V.Left||t===V.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},zs=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Bs=(e,t,n)=>e.x===t.x&&t.x===n.x&&(t.y-e.y)*(n.y-t.y)>=0||e.y===t.y&&t.y===n.y&&(t.x-e.x)*(n.x-t.x)>=0;function Vs({source:e,sourcePosition:t=V.Bottom,target:n,targetPosition:r=V.Top,center:i,offset:a,stepPosition:o}){let s=Ls[t],c=Ls[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=Rs({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=As({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y},C=[];for(let t of[e,x,...m,S,n]){let[e,n]=C.slice(-2);n&&Bs(e,n,t)&&C.pop(),C.push(t)}return[C,h,g,y,b]}function Hs(e,t,n,r){let i=Math.min(zs(e,t)/2,zs(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function Us({sourceX:e,sourceY:t,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:a=V.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=Vs({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=Hs(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Ws(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Gs(e){let{sourceNode:t,targetNode:n}=e;if(!Ws(t)||!Ws(n))return null;let r=t.internals.handleBounds||Ks(t.handles),i=n.internals.handleBounds||Ks(n.handles),a=Js(r?.source??[],e.sourceHandle),o=Js(e.connectionMode===xo.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,_o.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||V.Bottom,c=o?.position||V.Top,l=qs(t,a,s),u=qs(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function Ks(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function qs(e,t,n=V.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??ds(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case V.Top:return{x:i+o/2,y:a};case V.Right:return{x:i+o,y:a+s/2};case V.Bottom:return{x:i+o/2,y:a+s};case V.Left:return{x:i,y:a+s/2}}}function Js(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Ys(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function Xs(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Ys(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var Zs=1e3,Qs=10,$s={nodeOrigin:[0,0],nodeExtent:vo,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},ec={...$s,checkEquality:!0};function tc(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function nc(e,t,n){let r=tc($s,n);for(let n of e.values())if(n.parentId)sc(n,e,t,r);else{let e=Vo(jo(n,r.nodeOrigin),us(n.extent)?n.extent:r.nodeExtent,ds(n));n.internals.positionAbsolute=e}}function rc(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function ic(e){return e===`manual`}function ac(e,t,n,r={}){let i=tc(ec,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!ic(i.zIndexMode)?Zs:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=Vo(jo(u,i.nodeOrigin),us(u.extent)?u.extent:i.nodeExtent,ds(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:rc(u,e),z:cc(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}e.measured!==void 0&&e.measured.width!==void 0&&e.measured.height!==void 0||e.hidden||(c=!1),u.parentId&&sc(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function oc(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sc(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=tc($s,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}oc(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*Qs),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=lc(e,u,o,s,a&&!ic(c)?Zs:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function cc(e,t,n){let r=es(e.zIndex)?e.zIndex:0;return ic(n)?r:r+(e.selected?t:0)}function lc(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=ds(e),l=jo(e,n),u=us(e.extent)?Vo(l,e.extent,c):l,d=Vo({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=Ho(d,c,t));let f=cc(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function uc(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=Xo(a.get(n.parentId)?.expandedRect??Jo(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=ds(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function dc(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=ys(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=us(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;if(e.parentId&&e.extent===`parent`){let n=t.get(e.parentId);n&&(h=Ho(h,s,n))}else m&&(h=Vo(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:Ts(`source`,r.nodeElement,p,d,e.id),target:Ts(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&sc(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:Jo(g,i)}))}}if(f.length>0){let e=uc(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function fc({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function pc(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function mc(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;pc(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),pc(`target`,s,c,e,i,o),t.set(r.id,r)}}function hc(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:hc(n,t):!1}function gc(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function _c(e,t,n,r,i){let a=new Map;for(let[o,s]of e)if((i?s.id===r:s.selected||s.id===r)&&(i||!s.parentId||!hc(s,e))&&(s.draggable||t&&s.draggable===void 0)){let t=e.get(o);t&&a.set(o,{id:o,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return a}function vc({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function yc({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=ns(a,t);return{x:o.x-a.x,y:o.y-a.y}}function bc({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=Bt(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?Ko(No(s)):null,x=v&&l?yc({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:ns(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=Ro({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=vc({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=Wo(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0;let v=!!b&&!o&&!i.get(b)?.selected;m&&y||o||!b||i.get(b)?.selected||_(),y&&m&&b&&e?.(b);let x=vs(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=x,s=_c(i,c,x,b,v),s.size>0&&(n||h||!b&&g)){let[e,t]=vc({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=an().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=vs(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=ws(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=vs(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=ws(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=ws(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!d||p)p&&s.size>0&&t().updateNodePositions(s,!1);else if(c=!1,d=!1,cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=vc({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!gc(t,`.${g}`,v))&&(!_||gc(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function xc(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())Qo(i,Jo(e))>0&&r.push(e);return r}var H=250;function Sc(e,t,n,r){let i=[],a=1/0,o=xc(e,n,t+H);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=qs(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function Cc(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...qs(o,c,c.position,!0)}:c}function wc(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function Tc(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Ec=()=>!0;function Dc(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=Ec,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=bs(e.target),E=0,D,{x:O,y:k}=ws(e),A=wc(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=Cc(i,A,r,c,t);if(!N)return;let P=ws(e,j),F=!1,I=null,ee=!1,te=null;function L(){if(!u||!j)return;let[e,t]=Wo(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(L)}let ne={...N,nodeId:i,type:A,position:N.position},R=c.get(i),z={inProgress:!0,isValid:null,from:qs(R,ne,V.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:R,to:P,toHandle:null,toPosition:Do[ne.position],toNode:null,pointer:P};function re(){M=!0,y(z),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&re();function ie(e){if(!M){let{x:t,y:n}=ws(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;re()}if(!x()||!ne){B(e);return}let a=b();P=ws(e,j),D=Sc(rs(P,a,!1,[1,1]),n,c,ne),F||=(L(),!0);let s=Oc(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});te=s.handleDomNode,I=s.connection,ee=Tc(!!D,s.isValid);let u=c.get(i),f=u?qs(u,ne,V.Left,!0):z.from,p={...z,from:f,isValid:ee,to:s.toHandle&&ee?is({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:ee&&s.toHandle?s.toHandle.position:Do[ne.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),z=p}function B(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||te)&&I&&ee&&h?.(I);let{inProgress:t,...n}=z,r={...n,toPosition:z.toHandle?z.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,ee=!1,I=null,te=null,T.removeEventListener(`mousemove`,ie),T.removeEventListener(`mouseup`,B),T.removeEventListener(`touchmove`,ie),T.removeEventListener(`touchend`,B)}}T.addEventListener(`mousemove`,ie),T.addEventListener(`mouseup`,B),T.addEventListener(`touchmove`,ie),T.addEventListener(`touchend`,B)}function Oc(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=Ec,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=ws(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=wc(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===xo.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=Cc(t,e,a,u,n,!0)}return _}var kc={onPointerDown:Dc,isValid:Oc};function Ac({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=Bt(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&ls()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=go().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:Gt}}var jc=e=>({x:e.x,y:e.y,zoom:e.k}),Mc=({x:e,y:t,zoom:n})=>ao.translate(e,t).scale(n),Nc=(e,t)=>e.target.closest(`.${t}`),Pc=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Fc=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Ic=(e,t=0,n=Fc,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},Lc=e=>{let t=e.ctrlKey&&ls()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Rc({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(Nc(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=Gt(u),t=d*2**Lc(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===So.Vertical?0:u.deltaX*f,m=i===So.Horizontal?0:u.deltaY*f;!ls()&&u.shiftKey&&i!==So.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=jc(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(u,h):(e.isPanScrolling=!0,s?.(u,h)),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)}}function zc({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=Nc(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function Bc({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=jc(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function Vc({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&Pc(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,jc(a.transform))}}function Hc({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&Pc(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=jc(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function Uc({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if(f.button===1&&f.type===`mousedown`&&(Nc(f,`${u}-flow__node`)||Nc(f,`${u}-flow__edge`)||Nc(f,`${u}-flow__selection`)||Nc(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||Nc(f,c)&&h||Nc(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&f.type===`touchstart`&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&!i.includes(f.button)&&f.type===`mousedown`)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||h||e)&&g}}function Wc({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=[[0,0],[u.width,u.height]],f=typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t?.contentRect&&(d=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null;f?.observe(e);let p=go().extent(()=>d).scaleExtent([t,n]).translateExtent(r),m=Bt(e).call(p);b({x:i.x,y:i.y,zoom:Bo(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let h=m.on(`wheel.zoom`),g=m.on(`dblclick.zoom`);p.wheelDelta(Lc);async function _(e,t){return m?new Promise(n=>{p?.interpolate(t?.interpolate===`linear`?Vr:ti).transform(Ic(m,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function v({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:d,panOnScrollSpeed:f,preventScrolling:_,zoomOnPinch:v,zoomOnScroll:y,zoomOnDoubleClick:b,panActivationKeyPressed:x=!1,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneClickDistance:E,selectionOnDrag:D}){r&&!l.isZoomingOrPanning&&p.on(`zoom`,null);let O=i&&!S&&!r;p.clickDistance(D?1/0:!es(E)||E<0?0:E);let k=O?Rc({zoomPanValues:l,noWheelClassName:e,d3Selection:m,d3Zoom:p,panOnScrollMode:d,panOnScrollSpeed:f,zoomOnPinch:v,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):zc({noWheelClassName:e,preventScrolling:_,d3ZoomHandler:h});m.on(`wheel.zoom`,k,{passive:!1});let A=Bc({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});p.on(`start`,A);let j=Vc({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:w});p.on(`zoom`,j);let M=Hc({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});p.on(`end`,M);let N=Uc({panActivationKeyPressed:x,zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:y,panOnScroll:i,zoomOnDoubleClick:b,zoomOnPinch:v,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});p.filter(N),b?m.on(`dblclick.zoom`,g):m.on(`dblclick.zoom`,null)}function y(){p.on(`zoom`,null),f?.disconnect()}async function b(e,t,n){let r=Mc(e),i=p?.constrain()(r,t,n);return i&&await _(i),i}async function x(e,t){let n=Mc(e);return await _(n,t),n}function S(e){if(m){let t=Mc(e),n=m.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&p?.transform(m,t,null,{sync:!0})}}function C(){let e=m?oo(m.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function w(e,t){return m?new Promise(n=>{p?.interpolate(t?.interpolate===`linear`?Vr:ti).scaleTo(Ic(m,t?.duration,t?.ease,()=>n(!0)),e)}):!1}async function T(e,t){return m?new Promise(n=>{p?.interpolate(t?.interpolate===`linear`?Vr:ti).scaleBy(Ic(m,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function E(e){p?.scaleExtent(e)}function D(e){p?.translateExtent(e)}function O(e){let t=!es(e)||e<0?0:e;p?.clickDistance(t)}return{update:v,destroy:y,setViewport:x,setViewportConstrained:b,getViewport:C,scaleTo:w,scaleBy:T,setScaleExtent:E,setTranslateExtent:D,syncViewport:S,setClickDistance:O}}var Gc;(function(e){e.Line=`line`,e.Handle=`handle`})(Gc||={});var Kc=[`top-left`,`top-right`,`bottom-left`,`bottom-right`],qc=[`top`,`right`,`bottom`,`left`];function Jc({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function Yc(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function Xc(e,t){return Math.max(0,t-e)}function U(e,t){return Math.max(0,e-t)}function Zc(e,t,n){return Math.max(0,t-e,e-n)}function Qc(e,t){return e?!t:t}function $c(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=Zc(E,h,g),j=Zc(D,_,v);if(o){let e=0,t=0;c&&w<0?e=Xc(y+w+O,o[0][0]):!c&&w>0&&(e=U(y+E+O,o[1][0])),l&&T<0?t=Xc(b+T+k,o[0][1]):!l&&T>0&&(t=U(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=U(y+w,s[0][0]):!c&&w<0&&(e=Xc(y+E,s[1][0])),l&&T>0?t=U(b+T,s[0][1]):!l&&T<0&&(t=Xc(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=Zc(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?U(b+k+E/C,o[1][1])*C:Xc(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?Xc(b+E/C,s[1][1])*C:U(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=Zc(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?U(y+D*C+O,o[1][0])/C:Xc(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?Xc(y+D*C,s[1][0])/C:U(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(Qc(c,l)?-w:w)/C:w=(Qc(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var el={width:0,height:0,x:0,y:0},tl={...el,pointerX:0,pointerY:0,aspectRatio:1};function nl(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function rl({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=Bt(e),o={controlDirection:Yc(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...el},h={...tl};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:Yc(e)};let g,_=null,v=[],y,b,x,S=an().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=vs(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=us(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=nl(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=vs(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:O,y:k}=$c(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),A=E!==S,j=D!==C,M=O!==u&&A,N=k!==f&&j;if(!M&&!N&&!A&&!j)return;let P={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((M||N||T[0]===1||T[1]===1)&&(w.x=M?O:m.x,w.y=N?k:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=O-u,t=k-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((A||j)&&(w.width=A&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=j&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let F=Jc({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)===!1?(m=P.prevValues,h.x=P.startX,h.y=P.startY,v.forEach((e,t)=>{e.position=P.childNodes[t].position})):(d?.(e,I),r(w,l))}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var il=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),al=o(((e,t)=>{t.exports=il()})),ol=o((e=>{var t=d(),n=al();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),sl=l(o(((e,t)=>{t.exports=ol()}))(),1),cl=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},ll=e=>e?cl(e):cl,{useDebugValue:ul}=_.default,{useSyncExternalStoreWithSelector:dl}=sl.default,fl=e=>e;function pl(e,t=fl,n){let r=dl(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ul(r),r}var ml=(e,t)=>{let n=ll(e),r=(e,r=t)=>pl(n,e,r);return Object.assign(r,n),r},hl=(e,t)=>e?ml(e,t):ml;function gl(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var _l=h(),vl=(0,_.createContext)(null),yl=vl.Provider,bl=_o.error001(`react`);function W(e,t){let n=(0,_.useContext)(vl);if(n===null)throw Error(bl);return pl(n,e,t)}function G(){let e=(0,_.useContext)(vl);if(e===null)throw Error(bl);return(0,_.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var xl={display:`none`},Sl={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},Cl=`react-flow__node-desc`,wl=`react-flow__edge-desc`,Tl=`react-flow__aria-live`,El=e=>e.ariaLiveMessage,Dl=e=>e.ariaLabelConfig;function Ol({rfId:e}){let t=W(El);return(0,b.jsx)(`div`,{id:`${Tl}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:Sl,children:t})}function kl({rfId:e,disableKeyboardA11y:t}){let n=W(Dl);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{id:`${Cl}-${e}`,style:xl,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,b.jsx)(`div`,{id:`${wl}-${e}`,style:xl,children:n[`edge.a11yDescription.default`]}),!t&&(0,b.jsx)(Ol,{rfId:e})]})}var Al=(0,_.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split(`-`);return(0,b.jsx)(`div`,{className:x([`react-flow__panel`,n,...o]),style:r,ref:a,...i,children:t})});Al.displayName=`Panel`;var jl=`https://reactflow.dev?utm_source=attribution`;function Ml({proOptions:e,position:t=`bottom-right`}){return(0,_.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,b.jsx)(Al,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${jl}`,children:(0,b.jsx)(`a`,{href:jl,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var Nl=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Pl=e=>e.id;function Fl(e,t){return gl(e.selectedNodes.map(Pl),t.selectedNodes.map(Pl))&&gl(e.selectedEdges.map(Pl),t.selectedEdges.map(Pl))}function Il({onSelectionChange:e}){let t=G(),{selectedNodes:n,selectedEdges:r}=W(Nl,Fl);return(0,_.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var Ll=e=>!!e.onSelectionChangeHandlers;function Rl({onSelectionChange:e}){let t=W(Ll);return e||t?(0,b.jsx)(Il,{onSelectionChange:e}):null}var zl=[0,0],Bl={x:0,y:0,zoom:1},Vl=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],Hl=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Ul={translateExtent:vo,nodeOrigin:zl,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function Wl(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=W(Hl,gl),l=G();(0,_.useEffect)(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=Ul,s()}),[]);let u=(0,_.useRef)(Ul);return(0,_.useEffect)(()=>{for(let s of Vl){let c=e[s];c!==u.current[s]&&e[s]!==void 0&&(s===`nodes`?t(c):s===`edges`?n(c):s===`minZoom`?r(c):s===`maxZoom`?i(c):s===`translateExtent`?a(c):s===`nodeExtent`?o(c):s===`ariaLabelConfig`?l.setState({ariaLabelConfig:gs(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},Vl.map(t=>e[t])),null}function Gl(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function Kl(e){let[t,n]=(0,_.useState)(e===`system`?null:e);return(0,_.useEffect)(()=>{if(e!==`system`){n(e);return}let t=Gl(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?Gl()?.matches?`dark`:`light`:t}var ql=typeof document<`u`?document:null;function Jl(e=null,t={target:ql,actInsideInputWithModifier:!0}){let[n,r]=(0,_.useState)(!1),i=(0,_.useRef)(!1),a=(0,_.useRef)(new Set([])),[o,s]=(0,_.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
|
|
9
|
-
`).replace(`
|
|
10
|
-
|
|
11
|
-
`,`
|
|
12
|
-
+`).split(`
|
|
13
|
-
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,_.useEffect)(()=>{let n=t?.target??ql,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&Ss(e))return!1;let n=Xl(e.code,s);if(a.current.add(e[n]),Yl(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=Xl(e.code,s);Yl(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function Yl(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Xl(e,t){return t.includes(e)?`code`:`key`}var Zl=()=>{let e=G();return(0,_.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=cs(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return rs(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=is(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function Ql(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)$l(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function $l(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function eu(e,t){return Ql(e,t)}function tu(e,t){return Ql(e,t)}function nu(e,t){return{id:e,type:`select`,selected:t}}function ru(e,t=new Set){let n=[];for(let[r,i]of e){let e=t.has(r);(i.selected!==void 0||e)&&i.selected!==e&&n.push(nu(i.id,e))}return n}function iu({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function au(e){return{id:e.id,type:`remove`}}var ou=ts(`React Flow`,`https://reactflow.dev/`);function su(e,t,n={}){return Fs(e,t,{...n,onError:n.onError??ou})}var cu=e=>ko(e),lu=e=>Oo(e);function uu(e){return(0,_.forwardRef)(e)}var du=typeof window<`u`?_.useLayoutEffect:_.useEffect;function fu(e){let[t,n]=(0,_.useState)(BigInt(0)),[r]=(0,_.useState)(()=>pu(()=>n(e=>e+BigInt(1))));return du(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function pu(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var mu=(0,_.createContext)(null);function hu({children:e}){let t=G(),n=fu((0,_.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=iu({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=fu((0,_.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(iu({items:s,lookup:o}))},[])),i=(0,_.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,b.jsx)(mu.Provider,{value:i,children:e})}function gu(){let e=(0,_.useContext)(mu);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var _u=e=>!!e.panZoom;function vu(){let e=Zl(),t=G(),n=gu(),r=W(_u),i=(0,_.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=cu(e)?e:n.get(e.id),a=i.parentId?ps(i.position,i.measured,i.parentId,n,r):i.position;return Jo({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height},i.parentId?void 0:r)},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&cu(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&lu(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await zo({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(au);o?.(f),c(e)}if(m){let e=d.map(au);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=$o(e),o=i?e:a(e),s=r!==void 0;if(!o)return[];let{nodeOrigin:c}=t.getState();return(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let l=Jo(s?r:a,c),u=Qo(l,o);return n&&u>0||u>=l.width*l.height||u>=o.width*o.height})},isNodeIntersecting:(e,t,n=!0)=>{let r=$o(e)?e:a(e);if(!r)return!1;let i=Qo(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return Mo(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??hs();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,_.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var yu=e=>e.selected,bu=typeof window<`u`?window:void 0;function xu({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=G(),{deleteElements:r}=vu(),i=Jl(e,{actInsideInputWithModifier:!1}),a=Jl(t,{target:bu});(0,_.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(yu),edges:e.filter(yu)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,_.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Su(e){let t=G();(0,_.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=ys(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,_o.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t.disconnect()}}},[])}var Cu={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},wu=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Tu({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=So.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:v,onViewportChange:y,isControlledViewport:x,paneClickDistance:S,selectionOnDrag:C}){let w=G(),T=(0,_.useRef)(null),{userSelectionActive:E,lib:D,connectionInProgress:O}=W(wu,gl),k=Jl(p),A=(0,_.useRef)();Su(T);let j=(0,_.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),x||w.setState({transform:e})},[y,x]);return(0,_.useEffect)(()=>{if(T.current){A.current=Wc({domNode:T.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>w.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=w.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=w.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=w.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=A.current.getViewport();return w.setState({panZoom:A.current,transform:[e,t,n],domNode:T.current.closest(`.react-flow`)}),()=>{A.current?.destroy()}}},[]),(0,_.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:k,preventScrolling:m,noPanClassName:v,userSelectionActive:E,noWheelClassName:g,lib:D,onTransformChange:j,connectionInProgress:O,selectionOnDrag:C,paneClickDistance:S})},[e,t,n,r,i,a,o,s,c,k,m,v,E,g,D,j,O,C,S]),(0,b.jsx)(`div`,{className:`react-flow__renderer`,ref:T,style:Cu,children:h})}var Eu=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Du(){let{userSelectionActive:e,userSelectionRect:t}=W(Eu,gl);return e&&t?(0,b.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Ou=(e,t)=>n=>{n.target===t.current&&e?.(n)},ku=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Au({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Co.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,_.useRef)(0),v=G(),{userSelectionActive:y,elementsSelectable:S,dragging:C,panBy:w,autoPanSpeed:T}=W(ku,gl),E=S&&(e||y),D=(0,_.useRef)(null),O=(0,_.useRef)(),k=(0,_.useRef)(new Set),A=(0,_.useRef)(new Set),j=(0,_.useRef)(!1),M=(0,_.useRef)(!1),N=(0,_.useRef)({x:0,y:0}),P=(0,_.useRef)(!1),F=e=>{if(M.current||j.current||v.getState().connection.inProgress){M.current=!1,j.current=!1;return}let{connectionClickStartHandle:t,connection:n,onClickConnectEnd:r,resetSelectedElements:i}=v.getState();if(t){let t=structuredClone(n);delete t.inProgress,t.toPosition=t.toHandle?t.toHandle.position:null,r?.(e.nativeEvent,t),v.setState({connectionClickStartHandle:null})}l?.(e),i(),v.setState({nodesSelectionActive:!1})},I=e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():u?.(e)},ee=d?e=>d(e):void 0,te=e=>{M.current&&=(e.stopPropagation(),!1)},L=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=v.getState();if(O.current=i?.getBoundingClientRect(),!O.current)return;let s=n.target===D.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),M.current=!1;let{x:c,y:l}=ws(n.nativeEvent,O.current),u=rs({x:c,y:l},a);v.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function ne(e,t){let{userSelectionRect:r}=v.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=v.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=is(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=k.current,g=A.current;k.current=new Set(Po(a,m,i,n===Co.Partial,!0).map(e=>e.id)),A.current=new Set;let _=u?.selectable??!0;for(let e of k.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??_)&&A.current.add(e)}}ms(h,k.current)||c(ru(a,k.current)),ms(g,A.current)||l(ru(o,A.current)),v.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function R(){if(!i||!O.current)return;let[e,t]=Wo(N.current,O.current,T);w({x:e,y:t}).then(e=>{if(!M.current||!e){g.current=requestAnimationFrame(R);return}let{x:t,y:n}=N.current;ne(t,n),g.current=requestAnimationFrame(R)})}let z=()=>{cancelAnimationFrame(g.current),g.current=0,P.current=!1};(0,_.useEffect)(()=>()=>z(),[]);let re=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=v.getState();if(!O.current||!n)return;let{x:o,y:c}=ws(e.nativeEvent,O.current);N.current={x:o,y:c};let l=is({x:n.startX,y:n.startY},r);if(!M.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}M.current=!0,P.current||=(R(),!0),ne(o,c)},ie=e=>{E?e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!y&&e.target===D.current&&v.getState().userSelectionRect&&F?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null}),M.current&&(c?.(e),v.setState({nodesSelectionActive:k.current.size>0})),z()):e.target===D.current&&v.getState().connection.inProgress&&(j.current=!0)},B=e=>{e.target?.releasePointerCapture?.(e.pointerId),z()},ae=r===!0||Array.isArray(r)&&r.includes(0);return(0,b.jsxs)(`div`,{className:x([`react-flow__pane`,{draggable:ae,dragging:C,selection:e}]),onClick:E?void 0:Ou(F,D),onContextMenu:Ou(I,D),onWheel:Ou(ee,D),onPointerEnter:E?void 0:f,onPointerMove:E?re:p,onPointerUp:ie,onPointerCancel:E?B:void 0,onPointerDownCapture:E?L:void 0,onClickCapture:E?te:void 0,onPointerLeave:m,ref:D,style:Cu,children:[h,(0,b.jsx)(Du,{})]})}function ju({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);l?(t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])):c?.(`012`,_o.error012(e))}function Mu({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=G(),[c,l]=(0,_.useState)(!1),u=(0,_.useRef)();return(0,_.useEffect)(()=>{if(!t)return u.current=bc({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{ju({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,_.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var Nu=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function Pu(){let e=G();return(0,_.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Nu(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=ns(t,i));let{position:a,positionAbsolute:s}=Ro({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var Fu=(0,_.createContext)(null),Iu=Fu.Provider;Fu.Consumer;var Lu=()=>(0,_.useContext)(Fu),Ru=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),zu=(0,_.createContext)(null);function Bu({children:e}){let t=W(Ru,gl);return(0,b.jsx)(zu.Provider,{value:t,children:e})}function Vu(){let e=(0,_.useContext)(zu);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var Hu={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Uu=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return Hu;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===xo.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function Wu({type:e=`source`,position:t=V.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=G(),_=Lu(),{connectOnClick:v,noPanClassName:y,rfId:S}=Vu(),{connectingFrom:C,connectingTo:w,clickConnecting:T,isPossibleEndHandle:E,connectionInProcess:D,clickConnectionInProcess:O,valid:k}=W(Uu(_,m,e),gl);_||g.getState().onError?.(`010`,_o.error010());let A=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(su(i,e,{onError:n}))}n?.(i),s?.(i)},j=e=>{if(!_)return;let t=Cs(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();kc.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:A,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,b.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${S}-${_}-${m}-${e}`,className:x([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:T,connectingfrom:C,connectingto:w,valid:k,connectionindicator:r&&(!D||E)&&(D||O?a:i)}]),onMouseDown:j,onTouchStart:j,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=bs(t.target),h=n||c,{connection:v,isValid:y}=kc.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&A(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var Gu=(0,_.memo)(uu(Wu));function Ku({data:e,isConnectable:t,sourcePosition:n=V.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[e?.label,(0,b.jsx)(Gu,{type:`source`,position:n,isConnectable:t})]})}function qu({data:e,isConnectable:t,targetPosition:n=V.Top,sourcePosition:r=V.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Gu,{type:`target`,position:n,isConnectable:t}),e?.label,(0,b.jsx)(Gu,{type:`source`,position:r,isConnectable:t})]})}function Ju(){return null}function Yu({data:e,isConnectable:t,targetPosition:n=V.Top}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Gu,{type:`target`,position:n,isConnectable:t}),e?.label]})}var Xu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Zu={input:Ku,default:qu,output:Yu,group:Ju};function Qu(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var $u=e=>{let{width:t,height:n,x:r,y:i}=No(e.nodeLookup,{filter:e=>!!e.selected});return{width:es(t)?t:null,height:es(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function ed({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=G(),{width:i,height:a,transformString:o,userSelectionActive:s}=W($u,gl),c=Pu(),l=(0,_.useRef)(null);(0,_.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(Mu({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,b.jsx)(`div`,{className:x([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,b.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Xu,e.key)&&(e.preventDefault(),c({direction:Xu[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var td=typeof window<`u`?window:void 0,nd=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function rd({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:T,autoPanOnSelection:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,onSelectionContextMenu:M,noWheelClassName:N,noPanClassName:P,disableKeyboardA11y:F,onViewportChange:I,isControlledViewport:ee}){let{nodesSelectionActive:te,userSelectionActive:L}=W(nd,gl),ne=Jl(l,{target:td}),R=Jl(h,{target:td}),z=R||T,re=R||x,ie=u&&z!==!0,B=ne||L||ie;return xu({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,b.jsx)(Tu,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:re,panActivationKeyPressed:R,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:!ne&&z,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,zoomActivationKeyCode:g,preventScrolling:j,noWheelClassName:N,noPanClassName:P,onViewportChange:I,isControlledViewport:ee,paneClickDistance:s,selectionOnDrag:ie,children:(0,b.jsxs)(Au,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:z,autoPanOnSelection:E,isSelecting:!!B,selectionMode:d,selectionKeyPressed:ne,paneClickDistance:s,selectionOnDrag:ie,children:[e,te&&(0,b.jsx)(ed,{onSelectionContextMenu:M,noPanClassName:P,disableKeyboardA11y:F})]})})}rd.displayName=`FlowRenderer`;var id=(0,_.memo)(rd),ad=e=>t=>e?Po(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function od(e){return W((0,_.useCallback)(ad(e),[e]),gl)}var sd=e=>e.updateNodeInternals;function cd(){let e=W(sd),[t]=(0,_.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,_.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function ld({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=G(),a=(0,_.useRef)(null),o=(0,_.useRef)(null),s=(0,_.useRef)(e.sourcePosition),c=(0,_.useRef)(e.targetPosition),l=(0,_.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,_.useEffect)(()=>{!a.current||e.hidden||u&&o.current===a.current||(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,_.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,_.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function ud({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:S,isParent:C}=W(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},gl),w=y.type||`default`,T=g?.[w]||Zu[w];T===void 0&&(v?.(`003`,_o.error003(w)),w=`default`,T=g?.default||Zu.default);let E=!!(y.draggable||s&&y.draggable===void 0),D=!!(y.selectable||c&&y.selectable===void 0),O=!!(y.connectable||l&&y.connectable===void 0),k=!!(y.focusable||u&&y.focusable===void 0),A=G(),j=fs(y),M=ld({node:y,nodeType:w,hasDimensions:j,resizeObserver:d}),N=Mu({nodeRef:M,disabled:y.hidden||!E,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:_}),P=Pu();if(y.hidden)return null;let F=ds(y),I=Qu(y),ee=D||E||t||n||r||i,te=n?e=>n(e,{...S.userNode}):void 0,L=r?e=>r(e,{...S.userNode}):void 0,ne=i?e=>i(e,{...S.userNode}):void 0,R=a?e=>a(e,{...S.userNode}):void 0,z=o?e=>o(e,{...S.userNode}):void 0,re=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=A.getState();D&&(!r||!E||i>0)&&ju({id:e,store:A,nodeRef:M}),t&&t(n,{...S.userNode})},ie=t=>{if(!(Ss(t.nativeEvent)||m)){if(yo.includes(t.key)&&D){let n=t.key===`Escape`;ju({id:e,store:A,unselect:n,nodeRef:M})}else if(E&&y.selected&&Object.prototype.hasOwnProperty.call(Xu,t.key)){t.preventDefault();let{ariaLabelConfig:e}=A.getState();A.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),P({direction:Xu[t.key],factor:t.shiftKey?4:1})}}},B=()=>{if(m||!M.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=A.getState();i&&(Po(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+F.width/2,y.position.y+F.height/2,{zoom:t[2]}))};return(0,b.jsx)(`div`,{className:x([`react-flow__node`,`react-flow__node-${w}`,{[p]:E},y.className,{selected:y.selected,selectable:D,parent:C,draggable:E,dragging:N}]),ref:M,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:ee?`all`:`none`,visibility:j?`visible`:`hidden`,...y.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:te,onMouseMove:L,onMouseLeave:ne,onContextMenu:R,onClick:re,onDoubleClick:z,onKeyDown:k?ie:void 0,tabIndex:k?0:void 0,onFocus:k?B:void 0,role:y.ariaRole??(k?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${Cl}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,b.jsx)(Iu,{value:e,children:(0,b.jsx)(T,{id:e,data:y.data,type:w,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:E,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:N,dragHandle:y.dragHandle,zIndex:S.z,parentId:y.parentId,...F})})})}var dd=(0,_.memo)(ud),fd=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function pd(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=W(fd,gl),a=od(e.onlyRenderVisibleElements),o=cd();return(0,b.jsx)(`div`,{className:`react-flow__nodes`,style:Cu,children:a.map(a=>(0,b.jsx)(dd,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}pd.displayName=`NodeRenderer`;var md=(0,_.memo)(pd);function hd(e){return W((0,_.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&Ms({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),gl)}var gd=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,b.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},_d=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,b.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},vd={[Eo.Arrow]:gd,[Eo.ArrowClosed]:_d};function yd(e){let t=G();return(0,_.useMemo)(()=>Object.prototype.hasOwnProperty.call(vd,e)?vd[e]:(t.getState().onError?.(`009`,_o.error009(e)),null),[e])}var bd=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=yd(t);return c?(0,b.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,b.jsx)(c,{color:n,strokeWidth:o})}):null},xd=({defaultColor:e,rfId:t})=>{let n=W(e=>e.edges),r=W(e=>e.defaultEdgeOptions),i=(0,_.useMemo)(()=>Xs(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,b.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,b.jsx)(`defs`,{children:i.map(e=>(0,b.jsx)(bd,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};xd.displayName=`MarkerDefinitions`;var Sd=(0,_.memo)(xd);function Cd({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,_.useState)({x:1,y:0,width:0,height:0}),p=x([`react-flow__edge-textwrapper`,l]),m=(0,_.useRef)(null);return(0,_.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,b.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,b.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,b.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}Cd.displayName=`EdgeText`;var wd=(0,_.memo)(Cd);function Td({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{...u,d:e,fill:`none`,className:x([`react-flow__edge-path`,u.className])}),l?(0,b.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&es(t)&&es(n)?(0,b.jsx)(wd,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function Ed({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===V.Left||e===V.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Dd({sourceX:e,sourceY:t,sourcePosition:n=V.Bottom,targetX:r,targetY:i,targetPosition:a=V.Top}){let[o,s]=Ed({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=Ed({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Es({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function Od(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,x]=Dd({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),S=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:S,path:v,labelX:y,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var kd=Od({isInternal:!1}),Ad=Od({isInternal:!0});kd.displayName=`SimpleBezierEdge`,Ad.displayName=`SimpleBezierEdgeInternal`;function jd(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=V.Bottom,targetPosition:m=V.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,x,S]=Us({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),C=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:C,path:y,labelX:x,labelY:S,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var Md=jd({isInternal:!1}),Nd=jd({isInternal:!0});Md.displayName=`SmoothStepEdge`,Nd.displayName=`SmoothStepEdgeInternal`;function Pd(e){return(0,_.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,b.jsx)(Md,{...n,id:r,pathOptions:(0,_.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var Fd=Pd({isInternal:!1}),Id=Pd({isInternal:!0});Fd.displayName=`StepEdge`,Id.displayName=`StepEdgeInternal`;function Ld(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=Is({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var Rd=Ld({isInternal:!1}),zd=Ld({isInternal:!0});Rd.displayName=`StraightEdge`,zd.displayName=`StraightEdgeInternal`;function Bd(e){return(0,_.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=V.Bottom,targetPosition:s=V.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,x,S]=ks({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),C=e.isInternal?void 0:t;return(0,b.jsx)(Td,{id:C,path:y,labelX:x,labelY:S,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var Vd=Bd({isInternal:!1}),Hd=Bd({isInternal:!0});Vd.displayName=`BezierEdge`,Hd.displayName=`BezierEdgeInternal`;var Ud={default:Hd,straight:zd,step:Id,smoothstep:Nd,simplebezier:Ad},Wd={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Gd=(e,t,n)=>n===V.Left?e-t:n===V.Right?e+t:e,Kd=(e,t,n)=>n===V.Top?e-t:n===V.Bottom?e+t:e,qd=`react-flow__edgeupdater`;function Jd({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,b.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:x([qd,`${qd}-${s}`]),cx:Gd(t,r,e),cy:Kd(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function Yd({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=G(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;kc.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,b.jsxs)(b.Fragment,{children:[(e===!0||e===`source`)&&(0,b.jsx)(Jd,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,b.jsx)(Jd,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function Xd({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:v,disableKeyboardA11y:y}){let S=W(t=>t.edgeLookup.get(e)),C=W(e=>e.defaultEdgeOptions);S=C?{...C,...S}:S;let w=S.type||`default`,T=h?.[w]||Ud[w];T===void 0&&(v?.(`011`,_o.error011(w)),w=`default`,T=h?.default||Ud.default);let E=!!(S.focusable||t&&S.focusable===void 0),D=d!==void 0&&(S.reconnectable||n&&S.reconnectable===void 0),O=!!(S.selectable||r&&S.selectable===void 0),k=(0,_.useRef)(null),[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(!1),P=G(),{zIndex:F=S.zIndex,sourceX:I,sourceY:ee,targetX:te,targetY:L,sourcePosition:ne,targetPosition:R}=W((0,_.useCallback)(t=>{let n=t.nodeLookup.get(S.source),r=t.nodeLookup.get(S.target);if(!n||!r)return Wd;let i=Gs({id:e,sourceNode:n,targetNode:r,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:t.connectionMode,onError:v}),a=js({selected:S.selected,zIndex:S.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||Wd,zIndex:a}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex,v]),gl),z=(0,_.useMemo)(()=>S.markerStart?`url('#${Ys(S.markerStart,m)}')`:void 0,[S.markerStart,m]),re=(0,_.useMemo)(()=>S.markerEnd?`url('#${Ys(S.markerEnd,m)}')`:void 0,[S.markerEnd,m]);if(S.hidden||I===null||ee===null||te===null||L===null)return null;let ie=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=P.getState();O&&(P.setState({nodesSelectionActive:!1}),S.selected&&a?(r({nodes:[],edges:[S]}),k.current?.blur()):n([e])),i&&i(t,S)},B=a?e=>{a(e,{...S})}:void 0,ae=o?e=>{o(e,{...S})}:void 0,oe=s?e=>{s(e,{...S})}:void 0,se=c?e=>{c(e,{...S})}:void 0,ce=l?e=>{l(e,{...S})}:void 0;return(0,b.jsx)(`svg`,{style:{zIndex:F},children:(0,b.jsxs)(`g`,{className:x([`react-flow__edge`,`react-flow__edge-${w}`,S.className,g,{selected:S.selected,animated:S.animated,inactive:!O&&!i,updating:A,selectable:O}]),onClick:ie,onDoubleClick:B,onContextMenu:ae,onMouseEnter:oe,onMouseMove:se,onMouseLeave:ce,onKeyDown:E?t=>{if(!y&&yo.includes(t.key)&&O){let{unselectNodesAndEdges:n,addSelectedEdges:r}=P.getState();t.key===`Escape`?(k.current?.blur(),n({edges:[S]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:S.ariaRole??(E?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":E?`${wl}-${m}`:void 0,ref:k,...S.domAttributes,children:[!M&&(0,b.jsx)(T,{id:e,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:O,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:I,sourceY:ee,targetX:te,targetY:L,sourcePosition:ne,targetPosition:R,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:z,markerEnd:re,pathOptions:`pathOptions`in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),D&&(0,b.jsx)(Yd,{edge:S,isReconnectable:D,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:I,sourceY:ee,targetX:te,targetY:L,sourcePosition:ne,targetPosition:R,setUpdateHover:j,setReconnecting:N})]})})}var Zd=(0,_.memo)(Xd),Qd=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function $d({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=W(Qd,gl),x=hd(t);return(0,b.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,b.jsx)(Sd,{defaultColor:e,rfId:n}),x.map(e=>(0,b.jsx)(Zd,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}$d.displayName=`EdgeRenderer`;var ef=(0,_.memo)($d),tf=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function nf({children:e}){let t=G(),n=(0,_.useRef)(null),[r]=(0,_.useState)(()=>t.getState().transform);return du(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=tf(r)))};return r(),t.subscribe(r)},[t]),(0,b.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:tf(r)},children:e})}function rf(e){let t=vu(),n=(0,_.useRef)(!1);(0,_.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var af=e=>e.panZoom?.syncViewport;function of(e){let t=W(af),n=G();return(0,_.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function sf(e){return e.connection.inProgress?{...e.connection,to:rs(e.connection.to,e.transform)}:{...e.connection}}function cf(e){return e?t=>e(sf(t)):sf}function lf(e){return W(cf(e),gl)}var uf=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function df({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=W(uf,gl);return a&&i&&c?(0,b.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,b.jsx)(`g`,{className:x([`react-flow__connection`,_s(s)]),children:(0,b.jsx)(ff,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var ff=({style:e,type:t=To.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=lf();if(!i)return;if(n)return(0,b.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:_s(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case To.Bezier:[m]=ks(h);break;case To.SimpleBezier:[m]=Dd(h);break;case To.Step:[m]=Us({...h,borderRadius:0});break;case To.SmoothStep:[m]=Us(h);break;default:[m]=Is(h)}return(0,b.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};ff.displayName=`ConnectionLine`;var pf={};function mf(e=pf){(0,_.useRef)(e),G(),(0,_.useEffect)(()=>{},[e])}function hf(){G(),(0,_.useRef)(!1),(0,_.useEffect)(()=>{},[])}function gf({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:x,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,deleteKeyCode:T,onlyRenderVisibleElements:E,elementsSelectable:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,defaultMarkerColor:N,zoomOnScroll:P,zoomOnPinch:F,panOnScroll:I,panOnScrollSpeed:ee,panOnScrollMode:te,zoomOnDoubleClick:L,panOnDrag:ne,autoPanOnSelection:R,onPaneClick:z,onPaneMouseEnter:re,onPaneMouseMove:ie,onPaneMouseLeave:B,onPaneScroll:ae,onPaneContextMenu:oe,paneClickDistance:se,nodeClickDistance:ce,onEdgeContextMenu:le,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:fe,reconnectRadius:pe,onReconnect:me,onReconnectStart:he,onReconnectEnd:ge,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,disableKeyboardA11y:be,nodeExtent:xe,rfId:Se,viewport:Ce,onViewportChange:we,nodesDraggable:Te}){return mf(e),mf(t),hf(),rf(n),of(Ce),(0,b.jsx)(id,{onPaneClick:z,onPaneMouseEnter:re,onPaneMouseMove:ie,onPaneMouseLeave:B,onPaneContextMenu:oe,onPaneScroll:ae,paneClickDistance:se,deleteKeyCode:T,selectionKeyCode:v,selectionOnDrag:y,selectionMode:x,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,elementsSelectable:D,zoomOnScroll:P,zoomOnPinch:F,zoomOnDoubleClick:L,panOnScroll:I,panOnScrollSpeed:ee,panOnScrollMode:te,panOnDrag:ne,autoPanOnSelection:R,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:_e,noWheelClassName:ve,noPanClassName:ye,disableKeyboardA11y:be,onViewportChange:we,isControlledViewport:!!Ce,children:(0,b.jsxs)(nf,{children:[(0,b.jsx)(ef,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:me,onReconnectStart:he,onReconnectEnd:ge,onlyRenderVisibleElements:E,onEdgeContextMenu:le,onEdgeMouseEnter:ue,onEdgeMouseMove:de,onEdgeMouseLeave:fe,reconnectRadius:pe,defaultMarkerColor:N,noPanClassName:ye,disableKeyboardA11y:be,rfId:Se}),(0,b.jsx)(df,{style:h,type:m,component:g,containerStyle:_}),(0,b.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,b.jsx)(md,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:ce,onlyRenderVisibleElements:E,noPanClassName:ye,noDragClassName:_e,disableKeyboardA11y:be,nodeExtent:xe,rfId:Se,nodesDraggable:Te}),(0,b.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}gf.displayName=`GraphView`;var _f=(0,_.memo)(gf),vf=ts(`React Flow`,`https://reactflow.dev/`),yf=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??vo;mc(h,g,_);let{nodesInitialized:x}=ac(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=cs(No(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:vo,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:xo.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...wo},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:vf,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:bo,zIndexMode:f,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},bf=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>hl((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await Lo({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...yf({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=ac(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();mc(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=dc(e,n,r,i,a,o,l);d&&(nc(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=qs(e,o.fromHandle,V.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=uc(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(eu(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(tu(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?i(e.map(e=>nu(e,!0))):(i(ru(r,new Set([...e]))),a(ru(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();t?a(e.map(e=>nu(e,!0))):(a(ru(n,new Set([...e]))),i(ru(r,new Set)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s)e.selected&&l.push(nu(e.id,!1));let u=[];for(let e of c)e.selected&&u.push(nu(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,nu(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,nu(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(ac(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return fc({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...wo}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...yf()})}},Object.is);function xf({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,_.useState)(()=>bf({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,b.jsx)(yl,{value:m,children:(0,b.jsx)(hu,{children:(0,b.jsx)(Bu,{children:p})})})}function Sf({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,_.useContext)(vl)?(0,b.jsx)(b.Fragment,{children:e}):(0,b.jsx)(xf,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var Cf={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function wf({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onSelectionChange:M,onSelectionDragStart:N,onSelectionDrag:P,onSelectionDragStop:F,onSelectionContextMenu:I,onSelectionStart:ee,onSelectionEnd:te,onBeforeDelete:L,connectionMode:ne,connectionLineType:R=To.Bezier,connectionLineStyle:z,connectionLineComponent:re,connectionLineContainerStyle:ie,deleteKeyCode:B=`Backspace`,selectionKeyCode:ae=`Shift`,selectionOnDrag:oe=!1,selectionMode:se=Co.Full,panActivationKeyCode:ce=`Space`,multiSelectionKeyCode:le=ls()?`Meta`:`Control`,zoomActivationKeyCode:ue=ls()?`Meta`:`Control`,snapToGrid:de,snapGrid:fe,onlyRenderVisibleElements:pe=!1,selectNodesOnDrag:me,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,nodeOrigin:ye=zl,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se=!0,defaultViewport:Ce=Bl,minZoom:we=.5,maxZoom:Te=2,translateExtent:Ee=vo,preventScrolling:De=!0,nodeExtent:Oe,defaultMarkerColor:ke=`#b1b1b7`,zoomOnScroll:Ae=!0,zoomOnPinch:je=!0,panOnScroll:Me=!1,panOnScrollSpeed:Ne=.5,panOnScrollMode:Pe=So.Free,zoomOnDoubleClick:Fe=!0,panOnDrag:Ie=!0,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue=1,nodeClickDistance:We=0,children:Ge,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et=10,onNodesChange:tt,onEdgesChange:nt,noDragClassName:rt=`nodrag`,noWheelClassName:it=`nowheel`,noPanClassName:at=`nopan`,fitView:ot,fitViewOptions:st,connectOnClick:ct,attributionPosition:lt,proOptions:ut,defaultEdgeOptions:dt,elevateNodesOnSelect:ft=!0,elevateEdgesOnSelect:pt=!1,disableKeyboardA11y:mt=!1,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanOnSelection:_t=!0,autoPanSpeed:vt,connectionRadius:yt,isValidConnection:bt,onError:xt,style:St,id:Ct,nodeDragThreshold:wt,connectionDragThreshold:Tt,viewport:Et,onViewportChange:Dt,width:Ot,height:kt,colorMode:At=`light`,debug:jt,onScroll:Mt,ariaLabelConfig:Nt,zIndexMode:Pt=`basic`,...Ft},It){let Lt=Ct||`1`,Rt=Kl(At),zt=(0,_.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Mt?.(e)},[Mt]);return(0,b.jsx)(`div`,{"data-testid":`rf__wrapper`,...Ft,onScroll:zt,style:{...St,...Cf},ref:It,className:x([`react-flow`,i,Rt]),id:Ct,role:`application`,children:(0,b.jsxs)(Sf,{nodes:e,edges:t,width:Ot,height:kt,fitView:ot,fitViewOptions:st,minZoom:we,maxZoom:Te,nodeOrigin:ye,nodeExtent:Oe,zIndexMode:Pt,children:[(0,b.jsx)(Wl,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:v,nodesDraggable:he,autoPanOnNodeFocus:ge,nodesConnectable:_e,nodesFocusable:ve,edgesFocusable:be,edgesReconnectable:xe,elementsSelectable:Se,elevateNodesOnSelect:ft,elevateEdgesOnSelect:pt,minZoom:we,maxZoom:Te,nodeExtent:Oe,onNodesChange:tt,onEdgesChange:nt,snapToGrid:de,snapGrid:fe,connectionMode:ne,translateExtent:Ee,connectOnClick:ct,defaultEdgeOptions:dt,fitView:ot,fitViewOptions:st,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onSelectionDrag:P,onSelectionDragStart:N,onSelectionDragStop:F,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:at,nodeOrigin:ye,rfId:Lt,autoPanOnConnect:ht,autoPanOnNodeDrag:gt,autoPanSpeed:vt,onError:xt,connectionRadius:yt,isValidConnection:bt,selectNodesOnDrag:me,nodeDragThreshold:wt,connectionDragThreshold:Tt,onBeforeDelete:L,debug:jt,ariaLabelConfig:Nt,zIndexMode:Pt}),(0,b.jsx)(_f,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:o,connectionLineType:R,connectionLineStyle:z,connectionLineComponent:re,connectionLineContainerStyle:ie,selectionKeyCode:ae,selectionOnDrag:oe,selectionMode:se,deleteKeyCode:B,multiSelectionKeyCode:le,panActivationKeyCode:ce,zoomActivationKeyCode:ue,onlyRenderVisibleElements:pe,defaultViewport:Ce,translateExtent:Ee,minZoom:we,maxZoom:Te,preventScrolling:De,zoomOnScroll:Ae,zoomOnPinch:je,zoomOnDoubleClick:Fe,panOnScroll:Me,panOnScrollSpeed:Ne,panOnScrollMode:Pe,panOnDrag:Ie,autoPanOnSelection:_t,onPaneClick:Le,onPaneMouseEnter:Re,onPaneMouseMove:ze,onPaneMouseLeave:Be,onPaneScroll:Ve,onPaneContextMenu:He,paneClickDistance:Ue,nodeClickDistance:We,onSelectionContextMenu:I,onSelectionStart:ee,onSelectionEnd:te,onReconnect:Ke,onReconnectStart:qe,onReconnectEnd:Je,onEdgeContextMenu:Ye,onEdgeDoubleClick:Xe,onEdgeMouseEnter:Ze,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:et,defaultMarkerColor:ke,noDragClassName:rt,noWheelClassName:it,noPanClassName:at,rfId:Lt,disableKeyboardA11y:mt,nodeExtent:Oe,viewport:Et,onViewportChange:Dt,nodesDraggable:he}),(0,b.jsx)(Rl,{onSelectionChange:M}),Ge,(0,b.jsx)(Ml,{proOptions:ut,position:lt}),(0,b.jsx)(kl,{rfId:Lt,disableKeyboardA11y:mt})]})})}var Tf=uu(wf);function Ef(e){let[t,n]=(0,_.useState)(e);return[t,n,(0,_.useCallback)(e=>n(t=>eu(e,t)),[])]}function Df(e){let[t,n]=(0,_.useState)(e);return[t,n,(0,_.useCallback)(e=>n(t=>tu(e,t)),[])]}_o.error014();function Of({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,b.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:x([`react-flow__background-pattern`,n,r])})}function kf({radius:e,className:t}){return(0,b.jsx)(`circle`,{cx:e,cy:e,r:e,className:x([`react-flow__background-pattern`,`dots`,t])})}var Af;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Af||={});var jf={[Af.Dots]:1,[Af.Lines]:1,[Af.Cross]:6},Mf=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Nf({id:e,variant:t=Af.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,_.useRef)(null),{transform:f,patternId:p}=W(Mf,gl),m=r||jf[t],h=t===Af.Dots,g=t===Af.Cross,v=Array.isArray(n)?n:[n,n],y=[v[0]*f[2]||1,v[1]*f[2]||1],S=m*f[2],C=Array.isArray(a)?a:[a,a],w=g?[S,S]:y,T=[C[0]*f[2]+w[0]/2,C[1]*f[2]+w[1]/2],E=`${p}${e||``}`;return(0,b.jsxs)(`svg`,{className:x([`react-flow__background`,l]),style:{...c,...Cu,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,b.jsx)(`pattern`,{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${T[0]},-${T[1]})`,children:h?(0,b.jsx)(kf,{radius:S/2,className:u}):(0,b.jsx)(Of,{dimensions:w,lineWidth:i,variant:t,className:u})}),(0,b.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${E})`})]})}Nf.displayName=`Background`;var Pf=(0,_.memo)(Nf);function Ff(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,b.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function If(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,b.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function Lf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,b.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function Rf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,b.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function zf(){return(0,b.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,b.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function Bf({children:e,className:t,...n}){return(0,b.jsx)(`button`,{type:`button`,className:x([`react-flow__controls-button`,t]),...n,children:e})}var Vf=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Hf({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=G(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=W(Vf,gl),{zoomIn:y,zoomOut:S,fitView:C}=vu();return(0,b.jsxs)(Al,{className:x([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Bf,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,b.jsx)(Ff,{})}),(0,b.jsx)(Bf,{onClick:()=>{S(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,b.jsx)(If,{})})]}),n&&(0,b.jsx)(Bf,{className:`react-flow__controls-fitview`,onClick:()=>{C(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,b.jsx)(Lf,{})}),r&&(0,b.jsx)(Bf,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,b.jsx)(zf,{}):(0,b.jsx)(Rf,{})}),u]})}Hf.displayName=`Controls`;var Uf=(0,_.memo)(Hf);function Wf({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,b.jsx)(`rect`,{className:x([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var Gf=(0,_.memo)(Wf),Kf=e=>e.nodes.map(e=>e.id),qf=e=>e instanceof Function?e:()=>e;function Jf({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Gf,onClick:o}){let s=W(Kf,gl),c=qf(t),l=qf(e),u=qf(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,b.jsx)(b.Fragment,{children:s.map(e=>(0,b.jsx)(Xf,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function Yf({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=W(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=ds(r);return{node:r,x:i,y:a,width:o,height:s}},gl);return!l||l.hidden||!fs(l)?null:(0,b.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var Xf=(0,_.memo)(Yf),Zf=(0,_.memo)(Jf),Qf=200,$f=150,ep=e=>!e.hidden,tp=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?Xo(No(e.nodeLookup,{filter:ep}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},np=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,rp=(e,t)=>np(e.viewBB,t.viewBB)&&np(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,ip=`react-flow__minimap-desc`;function ap({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:v,inversePan:y,zoomStep:S=1,offsetScale:C=5}){let w=G(),T=(0,_.useRef)(null),{boundingRect:E,panZoom:D,viewBB:O,rfId:k,translateExtent:A,flowWidth:j,flowHeight:M,ariaLabelConfig:N}=W(tp,rp),P=e?.width??Qf,F=e?.height??$f,I=E.width/P,ee=E.height/F,te=Math.max(I,ee),L=te*P,ne=te*F,R=C*te,z=E.x-(L-E.width)/2-R,re=E.y-(ne-E.height)/2-R,ie=L+R*2,B=ne+R*2,ae=`${ip}-${k}`,oe=(0,_.useRef)(0),se=(0,_.useRef)();oe.current=te,(0,_.useEffect)(()=>{let e=w.getState().panZoom;if(T.current&&e)return se.current=Ac({domNode:T.current,panZoom:e,getTransform:()=>w.getState().transform,getViewScale:()=>oe.current}),()=>{se.current?.destroy()}},[D]),(0,_.useEffect)(()=>{se.current?.update({translateExtent:A,width:j,height:M,inversePan:y,pannable:h,zoomStep:S,zoomable:g})},[h,g,y,S,A,j,M]);let ce=p?e=>{let[t,n]=se.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,le=(0,_.useCallback)((e,t)=>{let n=w.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),ue=m?le:void 0,de=v??N[`minimap.ariaLabel`];return(0,b.jsx)(Al,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*te:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:x([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,b.jsxs)(`svg`,{width:P,height:F,viewBox:`${z} ${re} ${ie} ${B}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":ae,ref:T,onClick:ce,children:[de&&(0,b.jsx)(`title`,{id:ae,children:de}),(0,b.jsx)(Zf,{onClick:ue,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,b.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${z-R},${re-R}h${ie+R*2}v${B+R*2}h${-ie-R*2}z
|
|
14
|
-
M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}ap.displayName=`MiniMap`;var op=(0,_.memo)(ap),sp=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,cp={[Gc.Line]:`right`,[Gc.Handle]:`bottom-right`};function lp({nodeId:e,position:t,variant:n=Gc.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:v}){let y=Lu(),S=typeof e==`string`?e:y,C=G(),w=(0,_.useRef)(null),T=n===Gc.Handle,E=W((0,_.useCallback)(sp(T&&p),[T,p]),gl),D=(0,_.useRef)(null),O=t??cp[n];(0,_.useEffect)(()=>{if(w.current&&S)return D.current||=rl({domNode:w.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=C.getState(),o=[],s={x:e.x,y:e.y},c=r.get(S);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=uc([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...ps({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:S,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:S,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:S,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}}),D.current.update({controlPosition:O,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:v,shouldResize:m}),()=>{D.current?.destroy()}},[O,s,c,l,u,d,h,g,v,m]);let k=O.split(`-`);return(0,b.jsx)(`div`,{className:x([`react-flow__resize-control`,`nodrag`,...k,n,r]),ref:w,style:{...i,scale:E,...o&&{[T?`backgroundColor`:`borderColor`]:o}},children:a})}var up=(0,_.memo)(lp);function dp({nodeId:e,isVisible:t=!0,handleClassName:n,handleStyle:r,lineClassName:i,lineStyle:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,autoScale:f=!0,shouldResize:p,onResizeStart:m,onResize:h,onResizeEnd:g}){return t?(0,b.jsxs)(b.Fragment,{children:[qc.map(t=>(0,b.jsx)(up,{className:i,style:a,nodeId:e,position:t,variant:Gc.Line,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t)),Kc.map(t=>(0,b.jsx)(up,{className:n,style:r,nodeId:e,position:t,color:o,minWidth:s,minHeight:c,maxWidth:l,maxHeight:u,onResizeStart:m,keepAspectRatio:d,autoScale:f,shouldResize:p,onResize:h,onResizeEnd:g},t))]}):null}function fp(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var pp=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mp=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hp={};function gp(e,t){return((t||hp).jsx?mp:pp).test(e)}var _p=/[ \t\n\f\r]/g;function vp(e){return typeof e==`object`?e.type===`text`&&yp(e.value):yp(e)}function yp(e){return e.replace(_p,``)===``}var bp=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};bp.prototype.normal={},bp.prototype.property={},bp.prototype.space=void 0;function xp(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new bp(n,r,t)}function Sp(e){return e.toLowerCase()}var Cp=class{constructor(e,t){this.attribute=t,this.property=e}};Cp.prototype.attribute=``,Cp.prototype.booleanish=!1,Cp.prototype.boolean=!1,Cp.prototype.commaOrSpaceSeparated=!1,Cp.prototype.commaSeparated=!1,Cp.prototype.defined=!1,Cp.prototype.mustUseProperty=!1,Cp.prototype.number=!1,Cp.prototype.overloadedBoolean=!1,Cp.prototype.property=``,Cp.prototype.spaceSeparated=!1,Cp.prototype.space=void 0;var wp=s({boolean:()=>K,booleanish:()=>Ep,commaOrSpaceSeparated:()=>Ap,commaSeparated:()=>kp,number:()=>q,overloadedBoolean:()=>Dp,spaceSeparated:()=>Op}),Tp=0,K=jp(),Ep=jp(),Dp=jp(),q=jp(),Op=jp(),kp=jp(),Ap=jp();function jp(){return 2**++Tp}var Mp=Object.keys(wp),Np=class extends Cp{constructor(e,t,n,r){let i=-1;if(super(e,t),Pp(this,`space`,r),typeof n==`number`)for(;++i<Mp.length;){let e=Mp[i];Pp(this,Mp[i],(n&wp[e])===wp[e])}}};Np.prototype.defined=!0;function Pp(e,t,n){n&&(e[t]=n)}function Fp(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Np(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Sp(r)]=r,n[Sp(a.attribute)]=r}return new bp(t,n,e.space)}var Ip=Fp({properties:{ariaActiveDescendant:null,ariaAtomic:Ep,ariaAutoComplete:null,ariaBusy:Ep,ariaChecked:Ep,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Op,ariaCurrent:null,ariaDescribedBy:Op,ariaDetails:null,ariaDisabled:Ep,ariaDropEffect:Op,ariaErrorMessage:null,ariaExpanded:Ep,ariaFlowTo:Op,ariaGrabbed:Ep,ariaHasPopup:null,ariaHidden:Ep,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Op,ariaLevel:q,ariaLive:null,ariaModal:Ep,ariaMultiLine:Ep,ariaMultiSelectable:Ep,ariaOrientation:null,ariaOwns:Op,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:Ep,ariaReadOnly:Ep,ariaRelevant:null,ariaRequired:Ep,ariaRoleDescription:Op,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:Ep,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Lp(e,t){return t in e?e[t]:t}function Rp(e,t){return Lp(e,t.toLowerCase())}var zp=Fp({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:kp,acceptCharset:Op,accessKey:Op,action:null,allow:null,allowFullScreen:K,allowPaymentRequest:K,allowUserMedia:K,alpha:K,alt:null,as:null,async:K,autoCapitalize:null,autoComplete:Op,autoFocus:K,autoPlay:K,blocking:Op,capture:null,charSet:null,checked:K,cite:null,className:Op,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:Ep,controls:K,controlsList:Op,coords:q|kp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:K,defer:K,dir:null,dirName:null,disabled:K,download:Dp,draggable:Ep,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:K,formTarget:null,headers:Op,height:q,hidden:Dp,high:q,href:null,hrefLang:null,htmlFor:Op,httpEquiv:Op,id:null,imageSizes:null,imageSrcSet:null,inert:K,inputMode:null,integrity:null,is:null,isMap:K,itemId:null,itemProp:Op,itemRef:Op,itemScope:K,itemType:Op,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:K,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:K,muted:K,name:null,nonce:null,noModule:K,noValidate:K,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:K,optimum:q,pattern:null,ping:Op,placeholder:null,playsInline:K,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:K,referrerPolicy:null,rel:Op,required:K,reversed:K,rows:q,rowSpan:q,sandbox:Op,scope:null,scoped:K,seamless:K,selected:K,shadowRootClonable:K,shadowRootCustomElementRegistry:K,shadowRootDelegatesFocus:K,shadowRootMode:null,shadowRootSerializable:K,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:Ep,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:K,useMap:null,value:Ep,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Op,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:K,declare:K,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:K,noHref:K,noShade:K,noWrap:K,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:Ep,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:K,disablePictureInPicture:K,disableRemotePlayback:K,exportParts:kp,part:Op,prefix:null,property:null,results:q,security:null,unselectable:null},space:`html`,transform:Rp}),Bp=Fp({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ap,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Op,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:K,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:kp,g2:kp,glyphName:kp,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:Ap,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Op,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ap,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ap,rev:Ap,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ap,requiredFeatures:Ap,requiredFonts:Ap,requiredFormats:Ap,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:Ap,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ap,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ap,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Lp}),Vp=Fp({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Hp=Fp({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Rp}),Up=Fp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Wp={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Gp=/[A-Z]/g,Kp=/-[a-z]/g,qp=/^data[-\w.:]+$/i;function Jp(e,t){let n=Sp(t),r=t,i=Cp;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&qp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Kp,Xp);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Kp.test(e)){let n=e.replace(Gp,Yp);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Np}return new i(r,t)}function Yp(e){return`-`+e.toLowerCase()}function Xp(e){return e.charAt(1).toUpperCase()}var Zp=xp([Ip,zp,Vp,Hp,Up],`html`),Qp=xp([Ip,Bp,Vp,Hp,Up],`svg`);function $p(e){return e.join(` `).trim()}var em=/\/\*(?:[^*]|\*(?!\/))*\*\//g,tm=/\n/g,nm=/^\s*/,rm=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,im=/^:\s*/,am=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,om=/^[;\s]*/,sm=`
|
|
15
|
-
`,cm=`/`,lm=`*`,um=``,dm=`comment`,fm=`declaration`;function pm(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(tm);t&&(n+=t.length);var i=e.lastIndexOf(sm);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(nm)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(cm==e.charAt(0)&&lm==e.charAt(1)){for(var n=2;um!=e.charAt(n)&&(lm!=e.charAt(n)||cm!=e.charAt(n+1));)++n;if(n+=2,um===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:dm,comment:o})}}function f(){var e=a(),t=c(rm);if(t){if(d(),!c(im))return s(`property missing ':'`);var n=c(am),r=e({type:fm,property:t[0].replace(em,um).trim(),value:n?n[0].replace(em,um).trim():um});return c(om),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function mm(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=pm(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}var hm=_m(`end`),gm=_m(`start`);function _m(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function vm(e){let t=gm(e),n=hm(e);if(t&&n)return{start:t,end:n}}function ym(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?xm(e.position):`start`in e||`end`in e?xm(e):`line`in e||`column`in e?bm(e):``}function bm(e){return Sm(e&&e.line)+`:`+Sm(e&&e.column)}function xm(e){return bm(e&&e.start)+`-`+bm(e&&e.end)}function Sm(e){return e&&typeof e==`number`?e:1}var Cm=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ym(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(Cm.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var wm={}.hasOwnProperty,Tm=new Map,Em=/[A-Z]/g,Dm=/-([a-z])/g,Om=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),km=new Set([`td`,`th`]),Am=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function jm(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Hm(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Vm(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Qp:Zp,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Mm(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Mm(e,t,n){if(t.type===`element`)return Nm(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Pm(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Im(e,t,n);if(t.type===`mdxjsEsm`)return Fm(e,t);if(t.type===`root`)return Lm(e,t,n);if(t.type===`text`)return Rm(e,t)}function Nm(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Qp,e.schema=i),e.ancestors.push(t);let a=Jm(e,t.tagName,!1),o=Um(e,t),s=Gm(e,t);return Om.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!vp(e)})),zm(e,o,a,t),Bm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Pm(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ym(e,t.position)}function Fm(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ym(e,t.position)}function Im(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Qp,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Jm(e,t.name,!0),o=Wm(e,t),s=Gm(e,t);return zm(e,o,a,t),Bm(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Lm(e,t,n){let r={};return Bm(r,Gm(e,t)),e.create(t,e.Fragment,r,n)}function Rm(e,t){return t.value}function zm(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bm(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Vm(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Hm(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=gm(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Um(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&wm.call(t.properties,i)){let a=Km(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&km.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Wm(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ym(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Ym(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Gm(e,t){let n=[],r=-1,i=e.passKeys?new Map:Tm;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Mm(e,a,o);s!==void 0&&n.push(s)}return n}function Km(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=Jp(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?fp(n):$p(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:Xm(n):qm(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?Wp[r.property]||r.property:r.attribute,n]}function qm(e,t){let n={};try{mm(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(Dm,$m))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Cm("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Am+`#cannot-parse-style-attribute`,r}return n}function Jm(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=gp(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=gp(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return wm.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ym(e)}function Ym(e,t){let n=new Cm("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Am+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Xm(e){let t={},n;for(n in e)wm.call(e,n)&&(t[Zm(n)]=e[n]);return t}function Zm(e){if(e.slice(0,2)===`--`)return e;let t=e.replace(Em,Qm);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Qm(e){return`-`+e.toLowerCase()}function $m(e,t){return t.toUpperCase()}var eh={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},th={};function nh(e,t){let n=t||th;return rh(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function rh(e,t,n){if(ah(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return ih(e.children,t,n)}return Array.isArray(e)?ih(e,t,n):``}function ih(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rh(e[i],t,n);return r.join(``)}function ah(e){return!!(e&&typeof e==`object`)}var oh=document.createElement(`i`);function sh(e){let t=`&`+e+`;`;oh.innerHTML=t;let n=oh.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function ch(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function lh(e,t){return e.length>0?(ch(e,e.length,0,t),e):t}var uh={}.hasOwnProperty;function dh(e){let t={},n=-1;for(;++n<e.length;)fh(t,e[n]);return t}function fh(e,t){let n;for(n in t){let r=(uh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){uh.call(r,a)||(r[a]=[]);let e=i[a];ph(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ph(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ch(e,0,0,r)}function mh(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function hh(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gh=Eh(/[A-Za-z]/),_h=Eh(/[\dA-Za-z]/),vh=Eh(/[#-'*+\--9=?A-Z^-~]/);function yh(e){return e!==null&&(e<32||e===127)}var bh=Eh(/\d/),xh=Eh(/[\dA-Fa-f]/),Sh=Eh(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Ch(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var wh=Eh(/\p{P}|\p{S}/u),Th=Eh(/\s/);function Eh(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Dh(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_h(e.charCodeAt(n+1))&&_h(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Oh(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function kh(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&Y(t)?(e.enter(r),c(t)):l(t)}function c(t){return Y(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Ah={tokenize:jh};function jh(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Oh(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return J(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Mh=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Nh(this,e,t,n,!1)}addBefore(e,t,n){Nh(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Nh(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Ph={tokenize:Ih},Fh={tokenize:Lh};function Ih(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Mh;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Fh,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Fh,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return J(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Mh;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lh(e,t,n){return Oh(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Rh(e){if(e===null||Ch(e)||Th(e))return 1;if(wh(e))return 2}function zh(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Bh={name:`attention`,resolveAll:Vh,tokenize:Hh};function Vh(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Uh(o,-a),Uh(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=lh(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=lh(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=lh(r,zh(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=lh(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=lh(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ch(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Hh(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rh(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Rh(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Uh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Wh={name:`autolink`,tokenize:Gh};function Gh(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gh(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_h(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_h(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yh(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vh(t)?(e.consume(t),l):n(t)}function u(e){return _h(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_h(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Kh={partial:!0,tokenize:qh};function qh(e,t,n){return r;function r(t){return Y(t)?Oh(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||J(e)?t(e):n(e)}}var Jh={continuation:{tokenize:Xh},exit:Zh,name:`blockQuote`,tokenize:Yh};function Yh(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Y(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Xh(e,t,n){let r=this;return i;function i(t){return Y(t)?Oh(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Jh,t,n)(r)}}function Zh(e){e.exit(`blockQuote`)}var Qh={name:`characterEscape`,tokenize:$h};function $h(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Sh(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var eg={name:`characterReference`,tokenize:tg};function tg(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_h,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xh,u):(e.enter(`characterReferenceValue`),a=7,o=bh,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_h&&!sh(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var ng={partial:!0,tokenize:rg};function rg(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ig={concrete:!0,name:`codeFenced`,tokenize:ag};function ag(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Y(t)?Oh(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||J(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(ng,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Oh(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||J(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Y(t)?Oh(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(ng,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?Oh(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?Oh(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var og={name:`codeIndented`,tokenize:cg},sg={partial:!0,tokenize:lg};function cg(e,t,n){return r;function r(t){return e.enter(`codeIndented`),kh(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):J(t)?e.attempt(sg,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||J(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function lg(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):J(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):kh(e,t,a,`linePrefix`,4,4)(o)}function a(e){return J(e)?i(e):n(e)}}var ug={name:`codeText`,previous:fg,resolve:dg,tokenize:pg};function dg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function fg(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function pg(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||J(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var mg=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&hg(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),hg(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hg(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);hg(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);hg(this.left,t.reverse())}}}};function hg(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function gg(e){let t={},n=-1,r,i,a,o,s,c,l,u=new mg(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,_g(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ch(e,0,1/0,u.slice(0)),!l}function _g(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var vg={resolve:bg,tokenize:xg},yg={partial:!0,tokenize:Sg};function bg(e){return gg(e),e}function xg(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):J(t)?e.check(yg,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Sg(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Oh(e,a,`linePrefix`)}function a(i){if(i===null||J(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Cg(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yh(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ch(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yh(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function wg(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Tg(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Oh(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Eg(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?Oh(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Dg={name:`definition`,tokenize:kg},Og={partial:!0,tokenize:Ag};function kg(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return wg.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ch(t)?Eg(e,l)(t):l(t)}function l(t){return Cg(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Og,d,d)(t)}function d(t){return Y(t)?Oh(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Ag(e,t,n){return r;function r(t){return Ch(t)?Eg(e,i)(t):n(t)}function i(t){return Tg(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?Oh(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var jg={name:`hardBreakEscape`,tokenize:Mg};function Mg(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Ng={name:`headingAtx`,resolve:Pg,tokenize:Fg};function Pg(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ch(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Fg(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ch(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):Y(n)?Oh(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ch(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ig=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Lg=[`pre`,`script`,`style`,`textarea`],Rg={concrete:!0,name:`htmlFlow`,resolveTo:Bg,tokenize:Vg},zg={partial:!0,tokenize:Hg};function Bg(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Vg(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):gh(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gh(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return gh(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ch(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Lg.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ig.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_h(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gh(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ch(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||J(t)?O(t):Y(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(zg,te,k)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(ng,A,te)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||J(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Lg.includes(n)?(e.consume(t),ee):O(t)}return gh(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||J(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),ee)}function te(n){return e.exit(`htmlFlow`),t(n)}}function Hg(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Kh,t,n)}}var Ug={name:`htmlText`,tokenize:Wg};function Wg(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gh(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gh(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):J(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return gh(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_h(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,N(t)):Y(t)?(e.consume(t),C):M(t)}function w(t){return t===45||_h(t)?(e.consume(t),w):t===47||t===62||Ch(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||gh(t)?(e.consume(t),E):J(t)?(o=T,N(t)):Y(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||_h(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):J(t)?(o=D,N(t)):Y(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):J(t)?(o=O,N(t)):Y(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):J(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ch(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ch(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return Y(t)?Oh(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Gg={name:`labelEnd`,resolveAll:Yg,resolveTo:Xg,tokenize:Zg},Kg={tokenize:Qg},qg={tokenize:$g},Jg={tokenize:e_};function Yg(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ch(e,0,e.length,n),e}function Xg(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=lh(o,e.slice(i+1,i+r+3)),o=lh(o,[[`enter`,l,t]]),o=lh(o,zh(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=lh(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=lh(o,e.slice(a+1)),o=lh(o,[[`exit`,s,t]]),ch(e,i,e.length,o),e}function Zg(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hh(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kg,u,o?u:d)(t):t===91?e.attempt(qg,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jg,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Qg(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ch(t)?Eg(e,a)(t):a(t)}function a(t){return t===41?u(t):Cg(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ch(t)?Eg(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Tg(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ch(t)?Eg(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $g(e,t,n){let r=this;return i;function i(t){return wg.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hh(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function e_(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var t_={name:`labelStartImage`,resolveAll:Gg.resolveAll,tokenize:n_};function n_(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var r_={name:`labelStartLink`,resolveAll:Gg.resolveAll,tokenize:i_};function i_(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var a_={name:`lineEnding`,tokenize:o_};function o_(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Oh(e,t,`linePrefix`)}}var s_={name:`thematicBreak`,tokenize:c_};function c_(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?Oh(e,s,`whitespace`)(t):s(t))}}var l_={continuation:{tokenize:p_},exit:h_,name:`list`,tokenize:f_},u_={partial:!0,tokenize:g_},d_={partial:!0,tokenize:m_};function f_(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:bh(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(s_,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return bh(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Kh,r.interrupt?n:u,e.attempt(u_,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function p_(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Kh,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Oh(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(d_,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Oh(e,e.attempt(l_,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function m_(e,t,n){let r=this;return Oh(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function h_(e){e.exit(this.containerState.type)}function g_(e,t,n){let r=this;return Oh(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var __={name:`setextUnderline`,resolveTo:v_,tokenize:y_};function v_(e,t){let n=new Mh,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function y_(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?Oh(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var b_={tokenize:x_};function x_(e){let t=this,n=e.attempt(Kh,r,e.attempt(this.parser.constructs.flowInitial,i,Oh(e,e.attempt(this.parser.constructs.flow,i,e.attempt(vg,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var S_={resolveAll:E_()},C_=T_(`string`),w_=T_(`text`);function T_(e){return{resolveAll:E_(e===`text`?D_:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function E_(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function D_(e,t){let n=new Mh,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var O_=s({attentionMarkers:()=>I_,contentInitial:()=>A_,disable:()=>L_,document:()=>k_,flow:()=>M_,flowInitial:()=>j_,insideSpan:()=>F_,string:()=>N_,text:()=>P_}),k_={42:l_,43:l_,45:l_,48:l_,49:l_,50:l_,51:l_,52:l_,53:l_,54:l_,55:l_,56:l_,57:l_,62:Jh},A_={91:Dg},j_={[-2]:og,[-1]:og,32:og},M_={35:Ng,42:s_,45:[__,s_],60:Rg,61:__,95:s_,96:ig,126:ig},N_={38:eg,92:Qh},P_={[-5]:a_,[-4]:a_,[-3]:a_,33:t_,38:eg,42:Bh,60:[Wh,Ug],91:r_,92:[jg,Qh],93:Gg,95:Bh,96:ug},F_={null:[Bh,S_]},I_={null:[42,95]},L_={null:[]};function R_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=lh(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=zh(a,l.events,l),l.events):[]}function f(e,t){return B_(p(e),t)}function p(e){return z_(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){J(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ch(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function z_(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function B_(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
16
|
-
`;break;case-3:o=`\r
|
|
17
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function V_(e){let t={constructs:dh([O_,...(e||{}).extensions||[]]),content:n(Ah),defined:[],document:n(Ph),flow:n(b_),lazy:{},string:n(C_),text:n(w_)};return t;function n(e){return n;function n(n){return R_(t,e,n)}}}function H_(e){for(;!gg(e););return e}var U_=/[\0\t\n\r]/g;function W_(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){U_.lastIndex=c;let n=U_.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var G_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K_(e){return e.replace(G_,q_)}function q_(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return mh(n.slice(t?2:1),t?16:10)}return sh(n)||e}var J_={}.hasOwnProperty;function Y_(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),X_(n)(H_(V_(n).document().write(W_()(e,t,!0))))}function X_(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(he),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(de),blockQuote:o(oe),characterEscape:E,characterReference:E,codeFenced:o(se),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(se,s),codeText:o(ce,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(le),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(ue),hardBreakEscape:o(fe),hardBreakTrailing:o(fe),htmlFlow:o(pe,s),htmlFlowData:E,htmlText:o(pe,s),htmlTextData:E,image:o(me),label:s,link:o(he),listItem:o(_e),listItemValue:p,listOrdered:o(ge,f),listUnordered:o(ge),paragraph:o(ve),reference:ne,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(de),strong:o(ye),thematicBreak:o(xe)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ae,autolinkProtocol:B,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:re,characterReference:ie,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(P),label:I,labelText:F,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:R,resourceDestinationString:ee,resourceTitleString:te,resource:L,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Q_(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),J_.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||ev).call(o,void 0,e[0])}for(r.position={start:Z_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Z_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Z_(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+ym({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ev).call(this,e,r[0])),n.position.end=Z_(e.end)}function d(){return nh(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=be(),n.position={start:Z_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Z_(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Z_(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function F(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=K_(t),n.identifier=hh(t).toLowerCase()}function I(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function L(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function R(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function z(e){this.data.characterReferenceType=e.type}function re(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=mh(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sh(t);let i=this.stack[this.stack.length-1];i.value+=r}function ie(e){let t=this.stack.pop();t.position.end=Z_(e.end)}function B(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ae(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function oe(){return{type:`blockquote`,children:[],position:void 0}}function se(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ce(){return{type:`inlineCode`,value:``,position:void 0}}function le(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function ue(){return{type:`emphasis`,children:[],position:void 0}}function de(){return{type:`heading`,depth:0,children:[],position:void 0}}function fe(){return{type:`break`,position:void 0}}function pe(){return{type:`html`,value:``,position:void 0}}function me(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function he(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ge(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function _e(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ve(){return{type:`paragraph`,children:[],position:void 0}}function ye(){return{type:`strong`,children:[],position:void 0}}function be(){return{type:`text`,value:``,position:void 0}}function xe(){return{type:`thematicBreak`,position:void 0}}}function Z_(e){return{line:e.line,column:e.column,offset:e.offset}}function Q_(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Q_(e,r):$_(e,r)}}function $_(e,t){let n;for(n in t)if(J_.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ev(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+ym({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ym({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+ym({start:t.start,end:t.end})+`) is still open`)}function tv(e){let t=this;t.parser=n;function n(n){return Y_(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function nv(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function rv(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
18
|
-
`}]}function iv(e,t){let n=t.value?t.value+`
|
|
19
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function av(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ov(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sv(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Dh(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cv(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lv(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uv(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={src:Dh(r.url||``)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fv(e,t){let n={src:Dh(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pv(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mv(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uv(e,t);let i={href:Dh(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hv(e,t){let n={href:Dh(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gv(e,t,n){let r=e.all(t),i=n?_v(n):vv(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
20
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
21
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function _v(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let{children:n}=e,r=-1;for(;!t&&++r<n.length;)t=vv(n[r])}return t}function vv(e){let{spread:t}=e;return t??e.children.length>1}function yv(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function bv(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xv(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Sv(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Cv(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=gm(t.children[1]),o=hm(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wv(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Tv(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ev=9,Dv=32;function Ov(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(kv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kv(t.slice(i),i>0,!1)),a.join(``)}function kv(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ev||t===Dv;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ev||t===Dv;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Av(e,t){let n={type:`text`,value:Ov(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jv(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Mv={blockquote:nv,break:rv,code:iv,delete:av,emphasis:ov,footnoteReference:sv,heading:cv,html:lv,imageReference:dv,image:fv,inlineCode:pv,linkReference:mv,link:hv,listItem:gv,list:yv,paragraph:bv,root:xv,strong:Sv,table:Cv,tableCell:Tv,tableRow:wv,text:Av,thematicBreak:jv,toml:Nv,yaml:Nv,definition:Nv,footnoteDefinition:Nv};function Nv(){}var{defineProperty:Pv}=Object,Fv=typeof self==`object`?self:globalThis,Iv=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Fv[e](t)},Lv=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Pv(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Fv[e]==`function`?Iv(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Iv(a,o),i)};return r},Rv=e=>Lv(new Map,e)(0),zv=``,{toString:Bv}={},{keys:Vv,is:Hv}=Object,Uv=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bv.call(e).slice(8,-1);switch(n){case`Array`:return[1,zv];case`Object`:return[2,zv];case`Date`:return[3,zv];case`RegExp`:return[4,zv];case`Map`:return[5,zv];case`Set`:return[6,zv];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Wv=([e,t])=>e===0&&(t===`function`||t===`symbol`),Gv=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Uv(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Hv(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Vv(o))(e||!Wv(Uv(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?zv:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Wv(Uv(n))||Wv(Uv(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Wv(Uv(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Kv=(e,{json:t,lossy:n}={})=>{let r=[];return Gv(!(t||n),!!t,new Map,r)(e),r},qv=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Rv(Kv(e,t)):structuredClone(e):(e,t)=>Rv(Kv(e,t));function Jv(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Yv(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Xv(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Jv,r=e.options.footnoteBackLabel||Yv,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=[],l=-1;for(;++l<e.footnoteOrder.length;){let t=e.footnoteById.get(e.footnoteOrder[l]);t&&(s[l]=e.all(t))}for(l=-1;++l<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;let a=s[l],o=String(i.identifier).toUpperCase(),u=Dh(o.toLowerCase()),d=0,f=[],p=e.footnoteCounts.get(o);for(;p!==void 0&&++d<=p;){f.length>0&&f.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(l,d);typeof e==`string`&&(e={type:`text`,value:e}),f.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+u+(d>1?`-`+d:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(l,d),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let m=a[a.length-1];if(m&&m.type===`element`&&m.tagName===`p`){let e=m.children[m.children.length-1];e&&e.type===`text`?e.value+=` `:m.children.push({type:`text`,value:` `}),m.children.push(...f)}else a.push(...f);let h={type:`element`,tagName:`li`,properties:{id:t+`fn-`+u},children:e.wrap(a,!0)};e.patch(i,h),c.push(h)}if(c.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...qv(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
22
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(c,!0)},{type:`text`,value:`
|
|
23
|
-
`}]}}var Zv=(function(e){if(e==null)return ny;if(typeof e==`function`)return ty(e);if(typeof e==`object`)return Array.isArray(e)?Qv(e):$v(e);if(typeof e==`string`)return ey(e);throw Error(`Expected function, string, or object as test`)});function Qv(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Zv(e[n]);return ty(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function $v(e){let t=e;return ty(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ey(e){return ty(t);function t(t){return t&&t.type===e}}function ty(e){return t;function t(t,n,r){return!!(ry(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function ny(){return!0}function ry(e){return typeof e==`object`&&!!e&&`type`in e}function iy(e){return e}var ay=[],oy=`skip`;function sy(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=Zv(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+iy(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=ay;if(s&&r&&(o=cy(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=cy(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function cy(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ay:[e]}function ly(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?sy(e,i,dy(a),o):sy(e,i,uy(a),o)}function uy(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?dy(e.enter):e.enter,exit:typeof e.exit==`function`?dy(e.exit):e.exit}}function dy(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var fy={}.hasOwnProperty,py={};function my(e,t){let n=t||py,r=new Map,i=new Map,a={all:s,applyData:gy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Mv,...n.handlers},one:o,options:n,patch:hy,wrap:vy};return ly(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=String(e.identifier).toUpperCase();e.type===`definition`?r.has(t)||r.set(t,e):i.has(t)||i.set(t,e)}}),a;function o(e,t){let{type:n}=e,r=a.handlers[n];if(fy.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e;return{...qv(n),children:a.all(e)}}return qv(e)}return(a.options.unknownHandler||_y)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=yy(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=yy(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function hy(e,t){e.position&&(t.position=vm(e))}function gy(e,t){let n=t;if(e&&e.data){let{hChildren:t,hName:r,hProperties:i}=e.data;typeof r==`string`&&(n.type===`element`?n.tagName=r:n={type:`element`,tagName:r,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,qv(i)),`children`in n&&n.children&&t!=null&&(n.children=t)}return n}function _y(e,t){let n=t.data||{},r=`value`in t&&!(fy.call(n,`hProperties`)||fy.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vy(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
24
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
25
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
26
|
-
`}),n}function yy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function by(e,t){let n=my(e,t),r=n.one(e,void 0),i=Xv(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
27
|
-
`},i)),a}function xy(e,t){return e&&`run`in e?async function(n,r){let i=by(n,{file:r,...t});await e.run(i,r)}:function(n,r){return by(n,{file:r,...e||t})}}function Sy(e){if(e)throw e}var Cy=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function wy(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ty(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ey(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ey(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Dy={basename:Oy,dirname:ky,extname:Ay,join:jy,sep:`/`};function Oy(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Py(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ky(e){if(Py(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Ay(e){Py(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function jy(...e){let t=-1,n;for(;++t<e.length;)Py(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:My(n)}function My(e){Py(e);let t=e.codePointAt(0)===47,n=Ny(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ny(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Py(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Fy={cwd:Iy};function Iy(){return`/`}function Ly(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Ry(e){if(typeof e==`string`)e=new URL(e);else if(!Ly(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return zy(e)}function zy(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var By=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Vy=class{constructor(e){let t;t=e?Ly(e)?{path:e}:typeof e==`string`||Gy(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Fy.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<By.length;){let e=By[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)By.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Dy.basename(this.path):void 0}set basename(e){Uy(e,`basename`),Hy(e,`basename`),this.path=Dy.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Dy.dirname(this.path):void 0}set dirname(e){Wy(this.basename,`dirname`),this.path=Dy.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Dy.extname(this.path):void 0}set extname(e){if(Hy(e,`extname`),Wy(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Dy.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Ly(e)&&(e=Ry(e)),Uy(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Dy.basename(this.path,this.extname):void 0}set stem(e){Uy(e,`stem`),Hy(e,`stem`),this.path=Dy.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Cm(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Hy(e,t){if(e&&e.includes(Dy.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Dy.sep+"`")}function Uy(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Wy(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Gy(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ky=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),qy=l(Cy(),1),Jy={}.hasOwnProperty,Yy=new class e extends Ky{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Ty()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,qy.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Qy(`data`,this.frozen),this.namespace[e]=t,this):Jy.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Qy(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=tb(e),n=this.parser||this.Parser;return Xy(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Xy(`process`,this.parser||this.Parser),Zy(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=tb(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);rb(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Xy(`processSync`,this.parser||this.Parser),Zy(`processSync`,this.compiler||this.Compiler),this.process(e,r),eb(`processSync`,`process`,t),n;function r(e,r){t=!0,Sy(e),n=r}}run(e,t,n){$y(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=tb(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),eb(`runSync`,`run`,n),r;function i(e,t){Sy(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=tb(t),r=this.compiler||this.Compiler;return Zy(`stringify`,r),$y(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Qy(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,qy.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];wy(o)&&wy(r)&&(r=(0,qy.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Xy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Zy(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Qy(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $y(e){if(!wy(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function eb(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function tb(e){return nb(e)?e:new Vy(e)}function nb(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function rb(e){return typeof e==`string`||ib(e)}function ib(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var ab=[],ob={allowDangerousHtml:!0},sb=/^(https?|ircs?|mailto|xmpp)$/i,cb=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function lb(e){let t=ub(e),n=db(e);return fb(t.runSync(t.parse(n),n),e)}function ub(e){let t=e.rehypePlugins||ab,n=e.remarkPlugins||ab,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ob}:ob;return Yy().use(tv).use(n).use(xy,r).use(t)}function db(e){let t=e.children||``,n=new Vy;return typeof t==`string`?n.value=t:``+t,n}function fb(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||pb;for(let e of cb)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return t.className&&(e={type:`element`,tagName:`div`,properties:{className:t.className},children:e.type===`root`?e.children:[e]}),ly(e,l),jm(e,{Fragment:b.Fragment,components:i,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in eh)if(Object.hasOwn(eh,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=eh[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function pb(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||sb.test(e.slice(0,t))?e:``}function mb({title:e,count:t,open:n,onToggle:r,children:i}){return(0,b.jsxs)(`div`,{className:`section`,children:[(0,b.jsxs)(`button`,{className:`section__head`,onClick:r,"aria-expanded":n,children:[(0,b.jsx)(`span`,{className:`section__caret`,"aria-hidden":`true`,children:n?`▾`:`▸`}),e,t!==void 0&&t>0&&(0,b.jsx)(`span`,{className:`section__count`,children:t})]}),n&&(0,b.jsx)(`div`,{className:`section__body`,children:i})]})}var hb=null,gb=()=>hb===null?{}:{authorization:`Bearer ${hb}`};function _b(e,t){return e===void 0?Promise.resolve({mode:`local`}):e.start(t)}var vb=`/api/store`,yb=()=>new URLSearchParams(window.location.search).get(`t`),bb=()=>yb()!==null||Object.keys(gb()).length>0;function xb(e){let t=yb(),n=gb();if(t!==null)return{"x-apm-token":t,...n};if(Object.keys(n).length>0)return n;throw Error(`this viewer is read-only - open it with the open_viewer tool to ${e}`)}async function Sb(e,t,n){let r=await fetch(`/api/ticket?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`change a status`)},body:JSON.stringify({status:n})});if(!r.ok)throw Error((await r.json()).error??`could not change the status (${r.status})`)}async function Cb(e,t){let n=await fetch(`/api/layout?project=${encodeURIComponent(e)}`,{method:`POST`,headers:{"content-type":`application/json`,...xb(`save the layout`)},body:JSON.stringify({layout:t})});if(!n.ok)throw Error((await n.json()).error??`could not save the layout (${n.status})`)}var wb=`/api/changes`;async function Tb(e,t,n){let r=new URLSearchParams({project:e,ref:t}),i=await fetch(`/api/item?${r}`,{headers:gb(),signal:n});if(i.status===404)return null;if(!i.ok)throw Error(`/api/item returned ${i.status} ${i.statusText}`);return await i.json()}async function Eb(e,t,n){let r=new URLSearchParams({project:e,q:t}),i=await fetch(`/api/search?${r}`,{headers:gb(),signal:n});return i.ok?await i.json():null}async function Db(e,t){let n=await fetch(`/api/media/${t}?project=${encodeURIComponent(e)}`,{method:`DELETE`,headers:xb(`remove an image`)});if(!n.ok)throw Error((await n.json()).error??`remove failed (${n.status})`)}async function Ob(e,t,n){let r=await fetch(`/api/media?project=${encodeURIComponent(e)}&ref=${encodeURIComponent(t)}`,{method:`POST`,headers:{"content-type":n.type,...xb(`upload`)},body:n}),i=await r.json();if(!r.ok)throw Error(i.error??`upload failed (${r.status})`);return{hash:i.hash,mime:i.mime,bytes:i.bytes,at:new Date().toISOString()}}var kb=e=>Object.entries(e).map(([e,t])=>({heading:e,content:t})).sort((e,t)=>Number(t.heading===`protocol`)-Number(e.heading===`protocol`));function Ab(e,t){let n=new Map;for(let r of e)n.set(t(r),[...n.get(t(r))??[],r]);return n}function jb(e){let t=new Map;for(let n of e){let e=n.created_at??``,r=t.get(n.area);(r===void 0||e<r)&&t.set(n.area,e)}return[...t].sort(([e,t],[n,r])=>t===r?e.localeCompare(n):t<r?-1:1).map(([e])=>e)}async function Mb(){let e=await fetch(vb,{headers:gb()});if(!e.ok)throw Error(`${vb} returned ${e.status} ${e.statusText}`);let{path:t,store:n,metrics:r,uploadsDisabled:i,files:a}=await e.json();return{storePath:t,uploadsDisabled:i??null,projects:(n.projects??[]).map(e=>({key:e.key,name:e.name,items:e.items.map(e=>({id:e.ref,area:e.area,status:e.status,title:e.title,deps:e.deps??[],parent:e.parent??null,start:e.start,due:e.due,closed:e.closed_at})),next:(e.next??[]).filter(t=>e.items.some(e=>e.ref===t)),layout:Object.fromEntries(Object.entries(e.layout??{}).map(([e,t])=>{let[n,r]=t.split(`,`).map(Number);return[e,{x:n,y:r}]})),metrics:Ab(r?.[e.key]??[],e=>e.ref??``),context:kb(e.context??{}),file:a?.[e.key]??null,areaInfo:Object.fromEntries((e.areas??[]).map(e=>[e.key,{name:e.name,description:e.description}])),areaOrder:jb(e.items)}))}}function Nb(e){let t=decodeURIComponent(e.replace(/^#/,``)),n=t.indexOf(`/`);return{project:(n===-1?t:t.slice(0,n))||null,item:n===-1?null:t.slice(n+1)||null}}var Pb=`context:`,Fb=e=>e?.startsWith(`context:`)?e.slice(8):null;function Ib(e,t){if(e.length===0)return{project:null,notice:`This store has no projects yet. Create one and it will appear here.`};if(t!==null){let n=e.find(e=>e.key===t);return n?{project:n,notice:null}:{project:null,notice:`No project "${t}" in this store. It holds: ${e.map(e=>e.key).join(`, `)}.`}}return{project:e[0],notice:null}}var Lb=e=>e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`;function Rb({projectKey:e,ref_:t,images:n,uploadsDisabled:r,reload:i,open:a,onToggle:o}){let[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(null),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=bb(),h=m&&r===null;(0,_.useEffect)(()=>u(null),[t]);async function g(e){c(!0),u(null);try{await e()}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1),i()}}let v=n=>n===null||n.length===0?Promise.resolve():g(async()=>{for(let r of Array.from(n))await Ob(e,t,r)});return(0,b.jsxs)(mb,{title:`Images`,count:n.length,open:a,onToggle:o,children:[n.length>0&&(0,b.jsx)(`div`,{className:`attachments__grid`,children:n.map(t=>(0,b.jsxs)(`div`,{className:`attachments__item`,children:[(0,b.jsx)(`a`,{href:`/media/${t.hash}`,target:`_blank`,rel:`noreferrer`,children:(0,b.jsx)(`img`,{className:`attachments__thumb`,src:`/media/${t.hash}`,alt:t.caption??`attachment`,loading:`lazy`})}),(0,b.jsx)(`span`,{className:`attachments__meta`,children:Lb(t.bytes)}),m&&(0,b.jsx)(`button`,{className:`attachments__remove`,title:`Remove this image from the ticket`,disabled:s,onClick:()=>void g(()=>Db(e,t.hash)),children:`x`})]},t.hash))}),h?(0,b.jsxs)(`div`,{className:`attachments__drop${d?` attachments__drop--over`:``}`,onDragOver:e=>{e.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:e=>{e.preventDefault(),f(!1),v(e.dataTransfer.files)},onClick:()=>p.current?.click(),children:[(0,b.jsx)(`input`,{ref:p,type:`file`,accept:`image/png,image/jpeg,image/webp,image/gif`,multiple:!0,hidden:!0,onChange:e=>{v(e.target.files),e.target.value=``}}),s?`Uploading...`:`Drop an image on ${t}, or click to choose`]}):r===null?n.length===0&&(0,b.jsx)(`p`,{className:`attachments__readonly`,children:`Open the viewer with the open_viewer tool to add images.`}):(0,b.jsx)(`p`,{className:`attachments__readonly`,children:r}),l!==null&&(0,b.jsx)(`p`,{className:`attachments__error`,children:l})]})}var zb=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`}),Bb=e=>e.latest===null&&e.latestText===null;function Vb(e){if(e.latest!==null){let t=Number.isInteger(e.latest)?String(e.latest):e.latest.toFixed(2).replace(/\.?0+$/,``);return e.units.length>0?`${t} ${e.units.join(`/`)}`:t}if(e.values.length>1){let t=e.values.map(e=>`${e.text} x${e.count}`).join(`, `),n=e.distinctValues-e.values.length;return n>0?`${t}, +${n} more`:t}return e.latestText??``}function Hb({metrics:e,open:t,onToggle:n}){return e.length===0?null:(0,b.jsx)(mb,{title:`Metrics`,count:e.length,open:t,onToggle:n,children:(0,b.jsx)(`table`,{className:`metrics__table`,children:(0,b.jsx)(`tbody`,{children:e.map(e=>(0,b.jsxs)(`tr`,{children:[(0,b.jsx)(`td`,{className:`metrics__name`,children:e.metric}),(0,b.jsx)(`td`,{className:`metrics__value`,"data-mixed":e.units.length>1,"data-wrap":e.values.length>1,children:Vb(e)}),(0,b.jsx)(`td`,{className:`metrics__count`,children:Bb(e)?`${e.count} ${e.count===1?`occurrence`:`occurrences`}, to ${zb(e.latestAt)}`:e.count===1?zb(e.latestAt):`${e.count} readings, to ${zb(e.latestAt)}`})]},e.metric))})})})}function Ub(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wb(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Gb(e,t,n){let r=Zv((n||{}).ignore||[]),i=Kb(t),a=-1;for(;++a<i.length;)sy(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return oy}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Kb(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qb(e[0]),Jb(e[1])])}return t}function qb(e){return typeof e==`string`?new RegExp(Wb(e),`g`):e}function Jb(e){return typeof e==`function`?e:function(){return e}}var Yb=`phrasing`,Xb=[`autolink`,`link`,`image`,`label`];function Zb(){return{transforms:[ax],enter:{literalAutolink:$b,literalAutolinkEmail:ex,literalAutolinkHttp:ex,literalAutolinkWww:ex},exit:{literalAutolink:ix,literalAutolinkEmail:rx,literalAutolinkHttp:tx,literalAutolinkWww:nx}}}function Qb(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Yb,notInConstruct:Xb},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Yb,notInConstruct:Xb},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Yb,notInConstruct:Xb}]}}function $b(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function ex(e){this.config.enter.autolinkProtocol.call(this,e)}function tx(e){this.config.exit.autolinkProtocol.call(this,e)}function nx(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function rx(e){this.config.exit.autolinkEmail.call(this,e)}function ix(e){this.exit(e)}function ax(e){Gb(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,ox],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,lx],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,cx],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,sx]],{ignore:[`link`,`linkReference`]})}function ox(e,t,n,r,i){if(!fx(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),wh(n.charCodeAt(0))||!ux(n))return!1;let o=dx(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function sx(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function cx(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function lx(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function ux(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function dx(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=Ub(e,`(`),a=Ub(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function fx(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||Th(t)||wh(t)}Sx.peek=xx;function px(){this.buffer()}function mx(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hx(){this.buffer()}function gx(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _x(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vx(e){this.exit(e)}function yx(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hh(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bx(e){this.exit(e)}function xx(){return`[`}function Sx(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Cx(){return{enter:{gfmFootnoteCallString:px,gfmFootnoteCall:mx,gfmFootnoteDefinitionLabelString:hx,gfmFootnoteDefinition:gx},exit:{gfmFootnoteCallString:_x,gfmFootnoteCall:vx,gfmFootnoteDefinitionLabelString:yx,gfmFootnoteDefinition:bx}}}function wx(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Sx},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
28
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ex:Tx))),s(),o}}function Tx(e,t,n){return t===0?e:Ex(e,t,n)}function Ex(e,t,n){return(n?``:` `)+e}var Dx=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Mx.attention=Nx,Mx.peek=Px;function Ox(){return{canContainEols:[`delete`],enter:{strikethrough:Ax},exit:{strikethrough:jx}}}function kx(){return{handlers:{delete:Mx},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Dx}]}}function Ax(e){this.enter({type:`delete`,children:[],position:void 0},e)}function jx(e){this.exit(e)}function Mx(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Nx(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Px(){return`~`}function Fx(e){return e.length}function Ix(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Fx,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Lx(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Rx(r[d]);else{let e=Rx(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
|
|
29
|
-
`)}function Lx(e){return e==null?``:String(e)}function Rx(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var zx=Zv([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Bx(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Vx);return i(),o}function Vx(e,t,n){return`>`+(n?``:` `)+e}function Hx(e,t){return Ux(e,t.inConstruct,!0)&&!Ux(e,t.notInConstruct,!1)}function Ux(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Wx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
30
|
-
`&&!e.before&&!e.after&&Hx(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
31
|
-
`}function Gx(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Kx(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function qx(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Jx(e,t,n,r){let i=qx(n),a=e.value||``;if(Kx(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Yx);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(Gx(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
32
|
-
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
33
|
-
`),a&&(u+=o.move(a+`
|
|
34
|
-
`)),u+=o.move(s),c(),u}function Yx(e,t,n){return(n?``:` `)+e}function Xx(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Zx(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
35
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Qx(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function $x(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function eS(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function tS(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function nS(e,t,n){let r=Rh(e),i=Rh(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function rS(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:gh(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!gh(a))return;for(;a===45||_h(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&Lg.includes(o)?1:Ig.includes(o)?6:7}var iS=new Map([[`*`,!1],[`_`,!0]]);function aS(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function oS(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=iS.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=Rh(u.charCodeAt(u.length-1)),f=Rh((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(lS(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:aS(e,t,a),index:o}}}function sS(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?$x(n.value):eS(n.value),i=tS(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function cS(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=hS(e,c,r,i),u=oS(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function lS(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function uS(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!Sh(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function dS(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?$x(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
|
|
36
|
-
`)&&l.type===`html`&&rS(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(gS(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=fS(l,f.attention,t,c);if(!e)continue;a.push(e),s=eS(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=eS(n)}}return r.pop(),a}function fS(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=uS(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=dS(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(gS(d,c,c)),r.move(c),{children:d,sequences:s}}function pS(e,t,n,r){let i=hS(e,t,n,r),a=oS(i,n,r);for(;a;){let o=cS(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function mS(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&iS.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),mS(o.children,t,c,c),i=c}}function hS(e,t,n,r){let i=[],a,o=eS(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===$x(n)&&sS([e],!0),a=void 0,i.push(e),e.value&&(o=eS(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=$x(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=hS(n.children,t,c,c),m=p[0].value,h=nS(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&sS(p,!0);let g=eS(p[p.length-1].value),_=nS(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&sS(p,!1),h.outside&&d!==`
|
|
37
|
-
`&&d!==`\r`&&sS(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function gS(e,t,n){let r=new Map;mS(e,r,t,n);let i=(r.size>0?pS(e,r,t,n):void 0)||pS(e,new Map,t,n)||hS(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}_S.attention=vS,_S.peek=yS;function _S(e,t,n,r){let i=n.enter(`phrasing`),a=fS(e,vS,n,n.createTracker(r)),o=a?gS([a],r.before,r.after):``;return i(),o}function vS(e,t){return{construct:`emphasis`,markers:Qx(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function yS(e,t,n){return n.options.emphasis||`*`}function bS(e,t){let n=!1;return ly(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&nh(e)&&(t.options.setext||n))}function xS(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(bS(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
38
|
-
`,after:`
|
|
39
|
-
`});return r(),t(),o+`
|
|
40
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
41
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
42
|
-
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=tS(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}SS.peek=CS;function SS(e){return e.value||``}function CS(){return`<`}wS.peek=TS;function wS(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function TS(){return`!`}ES.peek=DS;function ES(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function DS(){return`!`}OS.peek=kS;function OS(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function kS(){return"`"}function AS(e,t){let n=nh(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}jS.peek=MS;function jS(e,t,n,r){let i=Xx(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(AS(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
|
|
43
|
-
`||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function MS(e,t,n){return AS(e,n)?`<`:`[`}NS.peek=PS;function NS(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function PS(){return`[`}function FS(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function IS(e){let t=FS(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function LS(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function RS(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zS(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?LS(n):FS(n),s=e.ordered?o===`.`?`)`:`.`:IS(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),RS(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function BS(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function VS(e,t,n,r){let i=BS(n),a=n.bulletCurrent||FS(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function HS(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function US(e,t,n,r){if(!e.children.some(function(e){return zx(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function WS(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GS.attention=KS,GS.peek=qS;function GS(e,t,n,r){let i=n.enter(`phrasing`),a=fS(e,KS,n,n.createTracker(r)),o=a?gS([a],r.before,r.after):``;return i(),o}function KS(e,t){return{construct:`strong`,markers:WS(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function qS(e,t,n){return n.options.strong||`*`}function JS(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function YS(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function XS(e,t,n){let r=(RS(n)+(n.options.ruleSpaces?` `:``)).repeat(YS(n));return n.options.ruleSpaces?r.slice(0,-1):r}var ZS={blockquote:Bx,break:Wx,code:Jx,definition:Zx,emphasis:_S,hardBreak:Wx,heading:xS,html:SS,image:wS,imageReference:ES,inlineCode:OS,link:jS,linkReference:NS,list:zS,listItem:VS,paragraph:HS,root:US,strong:GS,text:JS,thematicBreak:XS};function QS(){return{enter:{table:$S,tableData:rC,tableHeader:rC,tableRow:tC},exit:{codeText:iC,table:eC,tableData:nC,tableHeader:nC,tableRow:nC}}}function $S(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function eC(e){this.exit(e),this.data.inTable=void 0}function tC(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function nC(e){this.exit(e)}function rC(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function iC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aC(e,t){return t===`|`?t:e}function oC(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[sC],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
44
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
45
|
-
`))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Ix(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=ZS.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function sC(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&cC(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function cC(e,t){let n=!1;return ly(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&nh(e)&&(t.options.setext||n))}function lC(){return{exit:{taskListCheckValueChecked:dC,taskListCheckValueUnchecked:dC,paragraph:fC}}}function uC(){return{handlers:{paragraph:pC},join:[mC]}}function dC(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function fC(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function pC(e,t,n,r){if(!t||t.type!==`listItem`||hC(t)!==e)return ZS.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+ZS.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function mC(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=hC(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function hC(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function gC(){return[Zb(),Cx(),Ox(),QS(),lC()]}function _C(e){return{extensions:[Qb(),wx(e),kx(),oC(e),uC()]}}var vC={tokenize:MC,partial:!0},yC={tokenize:NC,partial:!0},bC={tokenize:PC,partial:!0},xC={tokenize:FC,partial:!0},SC={tokenize:IC,partial:!0},CC={name:`wwwAutolink`,tokenize:AC,previous:LC},wC={name:`protocolAutolink`,tokenize:jC,previous:RC},TC={name:`emailAutolink`,tokenize:kC,previous:zC},EC={};function DC(){return{text:EC}}for(var OC=48;OC<123;)EC[OC]=TC,OC++,OC===58?OC=65:OC===91&&(OC=97);EC[43]=TC,EC[45]=TC,EC[46]=TC,EC[95]=TC,EC[72]=[TC,wC],EC[104]=[TC,wC],EC[87]=[TC,CC],EC[119]=[TC,CC];function kC(e,t,n){let r=this,i,a;return o;function o(t){return!BC(t)||!zC.call(r,r.previous)||VC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return BC(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(SC,u,l)(t):t===45||t===95||_h(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&gh(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function AC(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!LC.call(r,r.previous)||VC(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(vC,e.attempt(yC,e.attempt(bC,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function jC(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&RC.call(r,r.previous)&&!VC(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(gh(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||yh(t)||Ch(t)||Th(t)||wh(t)?n(t):e.attempt(yC,e.attempt(bC,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function MC(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function NC(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(xC,c,s)(t):t===null||Ch(t)||Th(t)||t!==45&&wh(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function PC(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xC,t,a)(o):o===null||Ch(o)||Th(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function FC(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ch(o)||Th(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Ch(e)||Th(e)?t(e):r(e)}function a(e){return gh(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):gh(t)?(e.consume(t),o):n(t)}}function IC(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return _h(e)?n(e):t(e)}}function LC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ch(e)}function RC(e){return!gh(e)}function zC(e){return!(e===47||BC(e))}function BC(e){return e===43||e===45||e===46||e===95||_h(e)}function VC(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var HC={tokenize:XC,partial:!0};function UC(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:qC,continuation:{tokenize:JC},exit:YC}},text:{91:{name:`gfmFootnoteCall`,tokenize:KC},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:WC,resolveTo:GC}}}}function WC(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hh(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function GC(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function KC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Ch(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hh(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Ch(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function qC(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Ch(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hh(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Ch(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Oh(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function JC(e,t,n){return e.check(Kh,t,e.attempt(HC,t,n))}function YC(e){e.exit(`gfmFootnoteDefinition`)}function XC(e,t,n){let r=this;return Oh(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ZC(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ch(o,o.length,0,zh(s,e.slice(r+1,n),t)),ch(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ch(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Rh(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Rh(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var QC=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){$C(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function $C(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function ew(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function tw(){return{flow:{null:{name:`table`,tokenize:nw,resolveAll:rw}}}}function nw(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?Oh(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Ch(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?Oh(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?Oh(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?Oh(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):Y(n)?Oh(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Ch(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function rw(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new QC;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(aw(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=iw(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=iw(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=iw(f,t,o,i,n,d)):(o[0]=o[1],d=iw(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&aw(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=ew(t.events,n))}return e}function iw(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},ow(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=ow(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=ow(t.events,n[2]),a=ow(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},ow(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function aw(e,t,n,r,i){let a=[],o=ow(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function ow(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var sw={name:`tasklistCheck`,tokenize:lw};function cw(){return{text:{91:sw}}}function lw(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Ch(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):Y(r)?e.check({tokenize:uw},t,n)(r):n(r)}}function uw(e,t,n){return Oh(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function dw(e){return dh([DC(),UC(),ZC(e),tw(),cw()])}var fw={};function pw(e){let t=this,n=e||fw,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(dw(n)),a.push(gC()),o.push(_C(n))}var mw=(0,_.createContext)({}),hw=()=>(0,_.useContext)(mw),gw={done:{icon:`✓`,label:`done`,colour:`#34d399`,strike:!0},review:{icon:`◐`,label:`review`,colour:`#a884f3`,strike:!1},"in-progress":{icon:`●`,label:`in-progress`,colour:`#4f9dff`,strike:!1},"to-do":{icon:`○`,label:`to-do`,colour:`#fbbf24`,strike:!1},planning:{icon:`○`,label:`planning`,colour:`#e8590c`,strike:!1}};Object.keys(gw);var _w=/^[A-Z][A-Z0-9]*-[1-9]\d*(\.[1-9]\d*)*$/,vw=e=>_w.test(e);function yw(e){let t=e.indexOf(`:`);if(t<=0)return null;let n=e.slice(t+1);return vw(n)?{project:e.slice(0,t),ref:n}:null}function bw(e){let t=[];for(let n of e)t.includes(n.area)||t.push(n.area);return t}var xw=o(((e,t)=>{var n=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===`\0`)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,i,s=!1,c=arguments[0];typeof c==`object`&&c&&`v`in c?(e=c.v,t=c.w,n=c.name,arguments.length===2&&(i=arguments[1],s=!0)):(e=c,t=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var l=a(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,l))return s&&(this._edgeLabels[l]=i),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[l]=s?i:this._defaultEdgeLabelFn(e,t,n);var u=o(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[l]=u,r(this._preds[t],e),r(this._sucs[e],t),this._in[t][l]=u,this._out[e][l]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?s(this._isDirected,arguments[0]):a(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function r(e,t){e[t]?e[t]++:e[t]=1}function i(e,t){--e[t]||delete e[t]}function a(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+``+a+``+(r===void 0?`\0`:r)}function o(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function s(e,t){return a(e,t.v,t.w,t.name)}t.exports=n})),Sw=o(((e,t)=>{t.exports=`2.2.4`})),Cw=o(((e,t)=>{t.exports={Graph:xw(),version:Sw()}})),ww=o(((e,t)=>{var n=xw();t.exports={write:r,read:o};function r(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function i(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function a(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function o(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),Tw=o(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),Ew=o(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),Dw=o(((e,t)=>{var n=Ew();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),Ow=o(((e,t)=>{var n=Dw();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),kw=o(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),Aw=o(((e,t)=>{var n=kw();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),jw=o(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),Mw=o(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),Nw=o(((e,t)=>{var n=Mw();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),Pw=o(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),Fw=o(((e,t)=>{var n=Pw();t.exports=r;function r(e,t){return n(e,t,`post`)}})),Iw=o(((e,t)=>{var n=Pw();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),Lw=o(((e,t)=>{var n=xw(),r=Ew();t.exports=i;function i(e,t){var i=new n,a={},o=new r,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return i;e.nodes().forEach(function(e){o.add(e,1/0),i.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))i.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return i}})),Rw=o(((e,t)=>{t.exports={components:Tw(),dijkstra:Dw(),dijkstraAll:Ow(),findCycles:Aw(),floydWarshall:jw(),isAcyclic:Nw(),postorder:Fw(),preorder:Iw(),prim:Lw(),tarjan:kw(),topsort:Mw()}})),zw=o(((e,t)=>{var n=Cw();t.exports={Graph:n.Graph,json:ww(),alg:Rw(),version:n.version}})),Bw=o(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),Vw=o(((e,t)=>{var n=zw().Graph,r=Bw();t.exports=a;var i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),Hw=o(((e,t)=>{var n=zw().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:w,maxRank:g,normalizeRanks:u,notime:y,partition:_,pick:C,predecessorWeights:s,range:S,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:x,zipObject:T};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=x(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return T(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=S(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function y(e,t){return t()}var b=0;function x(e){return e+(``+ ++b)}function S(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function C(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function w(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function T(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),Uw=o(((e,t)=>{var n=Vw(),r=Hw().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),Ww=o(((e,t)=>{var n=Hw();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),Gw=o(((e,t)=>{var{applyWithChunking:n}=Hw();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),Kw=o(((e,t)=>{var n=zw().Graph,r=Gw().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),qw=o(((e,t)=>{var n=Kw(),r=Gw().slack,i=Gw().longestPath,a=zw().alg.preorder,o=zw().alg.postorder,s=Hw().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===y(e,e.node(t.v),c)&&l!==y(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),Jw=o(((e,t)=>{var n=Gw().longestPath,r=Kw(),i=qw();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),Yw=o(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),Xw=o(((e,t)=>{var n=Hw();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),Zw=o(((e,t)=>{var n=Hw();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),Qw=o(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),$w=o(((e,t)=>{var n=Hw();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){if(t[n])return;t[n]=!0;let r=e.node(n);o[r.rank].push(n),e.successors(n).forEach(s)}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),eT=o(((e,t)=>{var n=Hw().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),tT=o(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}})),nT=o(((e,t)=>{var n=Hw();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),rT=o(((e,t)=>{var n=Hw();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),iT=o(((e,t)=>{var n=tT(),r=nT(),i=rT();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),aT=o(((e,t)=>{var n=zw().Graph,r=Hw();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),oT=o(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),sT=o(((e,t)=>{var n=$w(),r=eT(),i=iT(),a=aT(),o=oT(),s=zw().Graph,c=Hw();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),cT=o(((e,t)=>{var n=zw().Graph,r=Hw();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),lT=o(((e,t)=>{var n=Hw(),r=cT().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),uT=o(((e,t)=>{var n=Uw(),r=Ww(),i=Jw(),a=Hw().normalizeRanks,o=Yw(),s=Hw().removeEmptyRanks,c=Xw(),l=Zw(),u=Qw(),d=sT(),f=lT(),p=Hw(),m=zw().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>E(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>D(e)),t(` removeSelfEdges`,()=>I(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>O(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>k(e)),t(` removeEdgeLabelProxies`,()=>A(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>ee(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>te(e)),t(` removeBorderNodes`,()=>F(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>N(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>j(e)),t(` assignNodeIntersects`,()=>M(e)),t(` reversePoints`,()=>P(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],y={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},b=[`acyclicer`,`ranker`,`rankdir`,`align`],x=[`width`,`height`,`rank`],S={width:0,height:0},C=[`minlen`,`weight`,`width`,`height`,`labeloffset`],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},T=[`labelpos`];function E(e){let t=new m({multigraph:!0,compound:!0}),n=ne(e.graph());return t.setGraph(Object.assign({},y,L(n,v),p.pick(n,b))),e.nodes().forEach(n=>{let r=L(ne(e.node(n)),x);Object.keys(S).forEach(e=>{r[e]===void 0&&(r[e]=S[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=ne(e.edge(n));t.setEdge(n,Object.assign({},w,L(r,C),p.pick(r,T)))}),t}function D(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function O(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function k(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function A(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function j(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function M(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function N(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function P(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function F(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function I(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function ee(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function te(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function L(e,t){return p.mapValues(p.pick(e,t),Number)}function ne(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),dT=o(((e,t)=>{var n=Hw(),r=zw().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),fT=o(((e,t)=>{t.exports=`1.1.8`})),pT=l(o(((e,t)=>{t.exports={graphlib:zw(),layout:uT(),debug:dT(),util:{time:Hw().time,notime:Hw().notime},version:fT()}}))(),1),mT=e=>`overview:${e}`,hT=(e,t)=>`elsewhere:${e}:${t}`,gT=e=>`elsewhere:${e}`;function _T(e){return e.flatMap(e=>e.deps.flatMap(t=>{let n=yw(t);return n===null?[]:[{ghostId:hT(n.project,n.ref),...n,dependent:e.id}]}))}var vT=[`#4f9dff`,`#f472b6`,`#34d399`,`#fb923c`,`#a884f3`,`#22d3ee`,`#fbbf24`,`#f87171`,`#a3e635`,`#e879f9`],yT=[`#9ec9ff`,`#f9b1d7`,`#8fe7c7`,`#fdc394`,`#cfbbf8`,`#85e7f6`,`#fddc87`,`#fbb1b1`,`#ccf190`,`#f2b5fc`];function bT(e){let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0)%vT.length}function xT(e,t=[]){let n=new Set(e),r=[...t.filter(e=>n.has(e)),...e.filter(e=>!t.includes(e))],i=[...vT,...yT],a=new Set,o={};for(let e of new Set(r)){let t=bT(e),n=Array.from({length:i.length},(e,n)=>n<vT.length?(t+n)%vT.length:vT.length+(t+n)%vT.length).find(e=>!a.has(e))??t;a.add(n),o[e]=i[n]}return o}var ST=212,CT=62,wT=3,TT=13,ET=17,DT=184,OT=42,kT=e=>` `.includes(e)?.28:"iljI.,:;'!|`".includes(e)?.3:`frt()[]{}-/\\"`.includes(e)?.4:`mwMW@%`.includes(e)?.9:e>=`A`&&e<=`Z`?.72:e>=`0`&&e<=`9`?.6:.57,AT=e=>[...e].reduce((e,t)=>e+kT(t),0)*TT*1.06;function jT(e){let t=1,n=0;for(let r of e.split(/\s+/).filter(Boolean)){let e=AT(r),i=n===0?e:n+AT(` `)+e;i<=DT?n=i:(t+=n===0?0:1,t+=Math.floor(e/DT),n=e%DT)}return Math.min(t,wT)}var MT=e=>Math.max(CT,OT+jT(e.title)*ET),NT=34,PT=18,FT=46,IT=52,LT=e=>e?.startsWith(`area:`)?IT:FT,RT=20,zT=68,BT={width:248,height:104},VT=e=>`area:${e}`,HT=34,UT=12,WT=92,GT=10,KT=e=>Math.round(e/GT)*GT,qT=e=>Math.ceil(e/GT)*GT,JT=30,YT=(e,t)=>e.filter(e=>e.parent===t),XT=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`);function ZT(e,t,n){let r=YT(t,e.id);if(r.length===0)return{width:ST,height:MT(e)};let i=iE(r,t,n).box;return{width:i.width,height:i.height}}function QT(e,t,n){let r=new pT.default.graphlib.Graph;r.setGraph({rankdir:`LR`,nodesep:JT,ranksep:WT}),r.setDefaultEdgeLabel(()=>({}));for(let t of e){let e=n.get(t.id);r.setNode(t.id,{width:e.width,height:e.height})}for(let[e,n]of t)r.setEdge(e,n);pT.default.layout(r);let i=new Map,a=1/0,o=1/0;for(let t of e){let e=r.node(t.id),s=n.get(t.id),c=e.x-s.width/2,l=e.y-s.height/2;i.set(t.id,{x:c,y:l,width:s.width,height:s.height}),a=Math.min(a,c),o=Math.min(o,l)}let s=0,c=0;for(let e of i.values())e.x-=a,e.y-=o,s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:i,extent:{width:s,height:c}}}function $T(e,t,n){let r=new Map,i=0,a=0,o=0,s=0;for(let c of e)i>0&&i+c.width>t&&(a+=o+n,i=0,o=0),r.set(c.id,{x:i,y:a,width:c.width,height:c.height}),i+=c.width+n,s=Math.max(s,i-n),o=Math.max(o,c.height);return{placements:r,extent:{width:s,height:a+o}}}function eE(e,t,n){let r=Math.max(t,...e.map(e=>e.width)),i=[{x:0,y:0,width:r}],a=new Map,o=[...e].sort((e,t)=>t.height-e.height||t.width-e.width);for(let e of o){let t=null;for(let n of i){let a=n.x;if(a+e.width>r)continue;let o=0;for(let t of i)t.x+t.width<=a||t.x>=a+e.width||(o=Math.max(o,t.y));(t===null||o<t.y||o===t.y&&a<t.x)&&(t={x:a,y:o})}let o=t??{x:0,y:0};a.set(e.id,{x:o.x,y:o.y,width:e.width,height:e.height}),i=tE(i,o.x,e.width+n,o.y+e.height+n)}let s=0,c=0;for(let e of a.values())s=Math.max(s,e.x+e.width),c=Math.max(c,e.y+e.height);return{placements:a,extent:{width:s,height:c}}}function tE(e,t,n,r){let i=t+n,a=[];for(let n of e){let e=n.x+n.width;e<=t||n.x>=i?a.push(n):(n.x<t&&a.push({x:n.x,y:n.y,width:t-n.x}),e>i&&a.push({x:i,y:n.y,width:e-i}))}a.push({x:t,y:r,width:n}),a.sort((e,t)=>e.x-t.x);let o=[];for(let e of a){let t=o[o.length-1];t&&t.y===e.y&&t.x+t.width===e.x?t.width+=e.width:o.push({...e})}return o}function nE(e,t,n=2.8){let r=e.reduce((e,n)=>e+(n.width+t)*(n.height+t),0),i=Math.max(...e.map(e=>e.width));return Math.max(i,Math.sqrt(r*n))}function rE(e,t){let n=new Set(e.map(e=>e.id)),r=e.flatMap(e=>e.deps.filter(e=>n.has(e)).map(t=>[t,e.id])),i=new Set(r.flat()),a=e.filter(e=>i.has(e.id)),o=e.filter(e=>!i.has(e.id)),s=new Map,c=a.length>0?QT(a,r,t):{placements:new Map,extent:{width:0,height:0}};for(let[e,t]of c.placements)s.set(e,t);if(o.length>0){let e=o.map(e=>({id:e.id,...t.get(e.id)})),n=$T(e,Math.max(c.extent.width,nE(e,NT)),NT),r=a.length>0?c.extent.height+NT:0;for(let[e,t]of n.placements)s.set(e,{...t,y:t.y+r})}return s}function iE(e,t,n){let r=new Map(e.map(e=>[e.id,ZT(e,t,n)])),i=new Set(e.map(e=>e.id)),a=cE(e.map(e=>({id:e.id,...r.get(e.id),deps:e.deps.filter(e=>i.has(e))})),e=>n[e],NT,2.8,()=>rE(e,r));return{placements:a,box:mE(a)}}var aE=e=>e===`x`?`width`:`height`,oE=e=>e===`x`?`y`:`x`,sE=(e,t,n,r)=>e[n]+e[aE(n)]+r>t[n]&&t[n]+t[aE(n)]+r>e[n];function cE(e,t,n,r,i,a=`after-previous`){let o=e.some(e=>t(e.id)!==void 0)?null:i(),s=new Map;for(let n of e){let e=o?o.get(n.id):t(n.id);e&&s.set(n.id,{id:n.id,x:KT(e.x),y:KT(e.y),width:n.width,height:n.height})}let c=new Set,l=nE(e,n,r);e.forEach((t,r)=>{if(s.has(t.id))return;c.add(t.id);let i=a===`best-fit`?uE(t,s,n,l):lE(t,e.slice(0,r),s,n,l);s.set(t.id,{id:t.id,x:qT(i.x),y:qT(i.y),width:t.width,height:t.height})});let u=[...s.values()];return dE(u,n,c),fE(u,n),new Map(u.map(({id:e,...t})=>[e,t]))}function lE(e,t,n,r,i){let a=e.deps.flatMap(e=>n.get(e)??[]);if(a.length>0){let e=a.reduce((e,t)=>t.x+t.width>e.x+e.width?t:e);return{x:e.x+e.width+r,y:e.y}}let o=[...t].reverse().flatMap(e=>n.get(e.id)??[])[0];return o&&o.x+o.width+r+e.width<=i?{x:o.x+o.width+r,y:o.y}:{x:0,y:Math.max(-r,...[...n.values()].map(e=>e.y+e.height))+r}}function uE(e,t,n,r){let i=[...t.values()],a=Math.max(0,...i.map(e=>e.x+e.width)),o=Math.max(0,...i.map(e=>e.y+e.height)),s=[{x:0,y:0},...i.flatMap(e=>[{x:e.x+e.width+n,y:e.y},{x:e.x,y:e.y+e.height+n}])],c=null;for(let t of s){let s={id:e.id,...t,width:e.width,height:e.height};if(i.some(e=>sE(s,e,`x`,n)&&sE(s,e,`y`,n)))continue;let l=Math.max(a,t.x+e.width),u=l*Math.max(o,t.y+e.height)*(l>r?4:1);(c===null||u<c.score||u===c.score&&(t.y<c.y||t.y===c.y&&t.x<c.x))&&(c={...t,score:u})}return c??{x:0,y:o+n}}function dE(e,t,n){for(let r=0;r<=e.length*e.length;r++){let r=null;search:for(let n=0;n<e.length;n++)for(let i=n+1;i<e.length;i++)if(sE(e[n],e[i],`x`,t)&&sE(e[n],e[i],`y`,t)){r=[e[n],e[i]];break search}if(r===null)return;let[i,a]=r,o=e=>{let[r,o]=i[e]<a[e]||i[e]===a[e]&&(n.has(i.id)||!n.has(a.id))?[i,a]:[a,i];return{axis:e,stays:r,moves:o,by:qT(r[e]+r[aE(e)]+t-o[e])}},s=e=>(Math.min(i[e]+i[aE(e)],a[e]+a[aE(e)])+t-Math.max(i[e],a[e]))/(Math.min(i[aE(e)],a[aE(e)])+t),{axis:c,stays:l,moves:u,by:d}=s(`x`)<=s(`y`)?o(`x`):o(`y`),f=u[c];for(let t of e)t!==l&&t[c]>=f&&(t[c]+=d)}}function fE(e,t){for(let n=0;n<32;n++){let n=e.map(e=>e.x+e.y*1e6);if(pE(e,`x`,t),pE(e,`y`,t),e.every((e,t)=>e.x+e.y*1e6===n[t]))return}}function pE(e,t,n){let r=oE(t),i=[...e].sort((e,n)=>e[t]-n[t]),a=new Map(i.map(e=>[e,e[t]])),o=[];for(let e of i){let i=0;for(let s of o)i=Math.max(i,s[t]+(a.get(s)<a.get(e)?GT:0)),sE(e,s,r,n)&&(i=Math.max(i,s[t]+s[aE(t)]+n));e[t]=qT(i),o.push(e)}}function mE(e){let t=0,n=0;for(let r of e.values())t=Math.max(t,r.x+r.width),n=Math.max(n,r.y+r.height);return{width:t+36,height:n+FT+RT}}function hE(e,t){let n=e=>e.split(`-`)[0]??e,r=new Map;for(let e of t)for(let t of e.deps){let i=yw(t),[a,o]=[i===null?n(t):gT(i.project),n(e.id)];if(a!==o){let e=r.get(o)??new Set;e.add(a),r.set(o,e)}}let i=new Map(e.map(e=>[e.area,e])),a=new Set,o=[],s=e=>{let t=i.get(e);if(t&&!a.has(e)){a.add(e);for(let t of r.get(e)??[])s(t);o.push(t)}};for(let t of e)s(t.area);return o}function gE(e,t,n,r,i,a,o={},s=new Set){let c=new Set(e.map(e=>e.id)),l=e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!XT(t,e.id)).map(t=>({id:`${t}->${e.id}`,source:t,target:e.id}))),u=new Map;for(let t of _T(e))c.has(t.dependent)&&u.set(t.ghostId,[...u.get(t.ghostId)??[],t.dependent]);let d=[...u].flatMap(([e,t])=>t.map(t=>({source:e,target:t}))),f=new Map(e.map(e=>[e.id,e.parent])),p=i?new Set([i,...[...l,...d].filter(e=>e.source===i||e.target===i).flatMap(e=>[e.source,e.target])].flatMap(e=>{let t=[e];for(let n=f.get(e);n;n=f.get(n))t.push(n);return t})):null,m=e=>e.split(`-`)[0]??e,h=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),g=new Set,_=new Set;for(let e of l){let t=a.has(e.source)||a.has(e.target),n=m(e.source)!==m(e.target)&&h.has(e.source);(t||n)&&(a.has(e.source)||_.add(e.source),a.has(e.target)||g.add(e.target))}let v=e=>r===`area`?n[e.area]??`#94a3b8`:gw[e.status]?.colour??`#94a3b8`,y=e=>({item:e,colour:v(e),statusColour:gw[e.status]?.colour??`#94a3b8`,selected:e.id===i,dimmed:p?!p.has(e.id):!1,hiddenLinkIn:g.has(e.id),hiddenLinkOut:_.has(e.id)}),b=(t,n)=>{let{placements:r,box:i}=iE(n,e,o);return{nodes:n.flatMap(n=>{let i=r.get(n.id),o={x:PT+i.x,y:LT(t)+i.y},s=YT(e,n.id);if(s.length>0){let e=b(n.id,s);return[{id:n.id,type:`ticket`,parentId:t,position:o,hidden:a.has(n.id),style:{width:e.box.width,height:e.box.height},data:{...y(n),count:s.length},zIndex:1},...e.nodes]}return[{id:n.id,type:`item`,parentId:t,position:o,hidden:a.has(n.id),style:{width:ST,height:MT(n)},data:y(n),zIndex:3}]}),box:i}},x=t.flatMap(t=>{let n=e.filter(e=>e.area===t&&e.parent===null);if(n.length===0)return[];if(s.has(t))return[{area:t,inner:{nodes:[],box:BT},size:BT}];let r=b(`area:${t}`,n),i={...r.box,height:r.box.height+IT-FT};return[{area:t,inner:{...r,box:i},size:i}]}),S=hE([...[...new Set([...u.keys()].map(e=>e.split(`:`)[1]))].sort().map(e=>{let t=[...u.keys()].filter(t=>t.startsWith(`elsewhere:${e}:`)).map(t=>t.slice(`elsewhere:${e}:`.length)).sort(),n=t.map((t,n)=>{let r=hT(e,t);return{id:r,type:`ghost`,parentId:`area:${gT(e)}`,position:{x:PT,y:IT+n*46},hidden:(u.get(r)??[]).every(e=>a.has(e)),data:{project:e,ref:t,dimmed:p?!p.has(r):!1},style:{width:ST,height:HT},zIndex:3}}),r={width:248,height:IT+t.length*HT+(t.length-1)*UT+RT};return{area:gT(e),foreign:e,inner:{nodes:n,box:r},size:r}}),...x],e),C=S.map(e=>({id:e.area,...e.size})),w={placements:cE(C.map(e=>({...e,deps:[]})),e=>o[`area:${e}`],zT,1.6,()=>eE(C,nE(C,zT,1.6),zT).placements,`best-fit`)};return S.flatMap(t=>{let r=w.placements.get(t.area);if(t.foreign!==void 0)return[{id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:t.inner.nodes.every(e=>e.hidden===!0),data:{area:t.foreign,colour:`#64748b`,count:t.inner.nodes.length,foreign:!0},style:{width:t.size.width,height:t.size.height},zIndex:0},...t.inner.nodes];let i=e.filter(e=>e.area===t.area),o=new Map;for(let e of i)o.set(e.status,(o.get(e.status)??0)+1);let c=Object.keys(gw).flatMap(e=>o.has(e)?[[e,o.get(e)]]:[]);if(s.has(t.area))return[{id:VT(t.area),type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,collapsed:{byStatus:c}},style:{width:BT.width,height:BT.height},zIndex:3}];let l={id:`area:${t.area}`,type:`area`,position:{x:r.x,y:r.y},hidden:i.every(e=>a.has(e.id)),data:{area:t.area,colour:n[t.area]??`#94a3b8`,count:i.length,byStatus:c},style:{width:t.size.width,height:t.size.height},zIndex:0},u={id:mT(t.area),type:`overview`,parentId:l.id,position:{x:0,y:0},hidden:l.hidden,data:l.data,style:{width:t.size.width,height:t.size.height},selectable:!1,draggable:!1,focusable:!1,zIndex:1e3};return[l,...t.inner.nodes,u]})}function _E(e){let t={};for(let n of e)n.type!==`ghost`&&n.type!==`overview`&&(t[n.id]=vE(n.parentId,n.position));return t}var vE=(e,t)=>e?{x:KT(t.x-PT),y:KT(t.y-LT(e))}:{x:KT(t.x),y:KT(t.y)};function yE(e,t,n,r,i,a,o,s=new Set){let c=new Set(e.map(e=>e.id)),l=e=>s.has(e.split(`-`)[0]??e)?VT(e.split(`-`)[0]??e):e,u=new Set(e.filter(e=>e.status===`done`).map(e=>e.id)),d=e=>e.split(`-`)[0]??e,f=e=>n===`area`?t[e.area]??`#94a3b8`:gw[e.status]?.colour??`#94a3b8`,p=_T(e).filter(e=>c.has(e.dependent)).map(e=>{let t=`${e.ghostId}->${e.dependent}`,n=r===e.ghostId||r===e.dependent,s=i!=null&&(e.ghostId===i||e.dependent===i),c=n||s||t===a,u=o.has(e.dependent);return{id:t,source:e.ghostId,target:l(e.dependent),type:`smoothstep`,pathOptions:{borderRadius:12},hidden:u&&!s,animated:n,zIndex:-1,style:{stroke:c?`#cbd5e1`:`#7c8aa0`,strokeWidth:c?2.5:1.2,strokeDasharray:`6 5`,opacity:c?1:r?.08:.4}}});return[...bE(e.flatMap(e=>e.deps.filter(t=>c.has(t)&&!XT(t,e.id)).map(t=>{let n=`${t}->${e.id}`,s=r===t||r===e.id,c=i!=null&&(t===i||e.id===i),l=d(t)!==d(e.id),p=s||c||n===a,m=l&&u.has(t),h=o.has(t)||o.has(e.id),g=c&&h;return{id:n,source:t,target:e.id,type:`smoothstep`,pathOptions:{borderRadius:12},hidden:h&&!g||m&&!p,animated:s,zIndex:-1,style:{stroke:p?f(e):`#7c8aa0`,strokeWidth:p?2.5:l?1.2:1.5,strokeDasharray:l?`6 5`:void 0,opacity:p?1:r?l?.08:.12:l?.4:.6}}})),l,s.size>0),...p.filter((e,t,n)=>n.findIndex(t=>t.source===e.source&&t.target===e.target)===t)]}function bE(e,t,n){if(!n)return e;let r=new Map;for(let n of e){let[e,i]=[t(n.source),t(n.target)];if(e===i)continue;let a=`${e}->${i}`,o=(n.style?.opacity??0)===1,s=r.get(a);s===void 0?r.set(a,{edge:{...n,id:a,source:e,target:i},count:1,allHidden:n.hidden===!0}):(s.count+=1,s.allHidden&&=n.hidden===!0,o&&(s.edge={...n,id:a,source:e,target:i}))}return[...r.values()].map(({edge:e,count:t,allHidden:n})=>({...e,hidden:n,...t>1?{label:String(t),labelBgPadding:[4,2],labelBgBorderRadius:4,labelStyle:{fill:`#dce3ec`,fontSize:11},labelBgStyle:{fill:`#1e2836`}}:{}}))}function xE({data:e}){let{item:t,colour:n,statusColour:r,selected:i,dimmed:a,hiddenLinkIn:o,hiddenLinkOut:s}=e,c=gw[t.status];return(0,b.jsxs)(`div`,{className:`item-node`,"data-selected":i,"data-dimmed":a,style:{"--area":n},children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:o?`handle--hidden-link`:void 0}),(0,b.jsx)(`div`,{className:`item-node__rail`}),(0,b.jsxs)(`div`,{className:`item-node__body`,children:[(0,b.jsxs)(`div`,{className:`item-node__meta`,children:[(0,b.jsx)(`span`,{className:`item-node__id`,children:t.id}),(0,b.jsx)(`span`,{className:`item-node__status`,title:c?.label??t.status,style:{color:r},children:c?.icon??`?`})]}),(0,b.jsx)(`div`,{className:`item-node__title`,"data-strike":c?.strike??!1,children:t.title})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:s?`handle--hidden-link`:void 0})]})}function SE({data:e,selected:t}){return e.collapsed===void 0?(0,b.jsxs)(`div`,{className:`area-box`,"data-foreign":e.foreign===!0,style:{"--area":e.colour},children:[(0,b.jsx)(dp,{isVisible:t,minWidth:220,minHeight:120,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:CE(e)?e.name:e.area}),CE(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]})]}):(0,b.jsxs)(`div`,{className:`area-box area-box--collapsed`,style:{"--area":e.colour},title:`Click to open this area`,children:[(0,b.jsx)(Gu,{type:`target`,position:V.Left}),(0,b.jsxs)(`div`,{className:`area-box__title`,children:[(0,b.jsx)(`span`,{className:`area-box__name`,children:CE(e)?e.name:e.area}),CE(e)&&(0,b.jsx)(`span`,{className:`area-box__label`,children:e.area}),(0,b.jsx)(`span`,{className:`area-box__count`,children:e.count})]}),(0,b.jsx)(`div`,{className:`area-box__summary`,children:e.collapsed.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{className:`area-box__status`,style:{color:gw[e].colour},title:e,children:[gw[e].icon,` `,t]},e))}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var CE=e=>e.name!==void 0&&e.name!==e.area;function wE({data:e}){if(e.byStatus===void 0)return null;let t=CE(e)?e.name:e.area;return(0,b.jsx)(`div`,{className:`area-overview`,style:{"--area":e.colour},"aria-hidden":`true`,children:(0,b.jsxs)(`div`,{className:`area-box__overview`,children:[(0,b.jsx)(`div`,{className:`area-box__overview-name`,style:{fontSize:`min(${140/Math.max(t.length,3)}cqw, 30cqh, 110px)`},children:t}),CE(e)&&(0,b.jsx)(`div`,{className:`area-box__overview-key`,children:e.area}),(0,b.jsx)(`div`,{className:`area-box__overview-bar`,children:e.byStatus.map(([e,t])=>(0,b.jsx)(`span`,{style:{flexGrow:t,background:gw[e].colour}},e))}),(0,b.jsx)(`div`,{className:`area-box__overview-counts`,children:e.byStatus.map(([e,t])=>(0,b.jsxs)(`span`,{style:{color:gw[e].colour},children:[gw[e].icon,` `,t]},e))}),e.description!==void 0&&e.description!==null&&(0,b.jsx)(`div`,{className:`area-box__overview-description`,children:e.description})]})})}function TE({data:e}){let{item:t,colour:n,statusColour:r,count:i,selected:a,dimmed:o,hiddenLinkIn:s,hiddenLinkOut:c}=e,l=gw[t.status];return(0,b.jsxs)(`div`,{className:`ticket-box`,"data-selected":a,"data-dimmed":o,style:{"--area":n},children:[(0,b.jsx)(dp,{isVisible:a,minWidth:200,minHeight:100,lineClassName:`box-resize-line`,handleClassName:`box-resize-handle`}),(0,b.jsx)(Gu,{type:`target`,position:V.Left,className:s?`handle--hidden-link`:void 0}),(0,b.jsxs)(`div`,{className:`ticket-box__title`,children:[(0,b.jsx)(`span`,{className:`ticket-box__id`,children:t.id}),(0,b.jsx)(`span`,{className:`ticket-box__status`,title:l?.label??t.status,style:{color:r},children:l?.icon??`?`}),(0,b.jsx)(`span`,{className:`ticket-box__label`,"data-strike":l?.strike??!1,children:t.title}),(0,b.jsx)(`span`,{className:`ticket-box__count`,children:i})]}),(0,b.jsx)(Gu,{type:`source`,position:V.Right,className:c?`handle--hidden-link`:void 0})]})}function EE({data:e}){let{project:t,ref:n,dimmed:r}=e;return(0,b.jsxs)(`div`,{className:`ghost-node`,"data-dimmed":r,title:`${n} lives in the ${t} project, which is not open here`,children:[(0,b.jsx)(`span`,{className:`ghost-node__ref`,children:n}),(0,b.jsx)(Gu,{type:`source`,position:V.Right})]})}var DE=`roadmap.positions.v2`,OE=`roadmap.layout.v1`,kE=`roadmap.sizes.v2`,AE=(e,t)=>`${e}:${t}`;function jE(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):{}}catch{return{}}}function ME(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}var NE=e=>jE(AE(OE,e)),PE=(e,t)=>ME(AE(OE,e),t),FE=e=>jE(AE(kE,e)),IE=(e,t)=>ME(AE(kE,e),t);function LE(e){try{localStorage.removeItem(AE(OE,e)),localStorage.removeItem(AE(DE,e)),localStorage.removeItem(AE(kE,e))}catch{}}var RE=e=>`${gw[e].icon} ${gw[e].label}`;function zE({projectKey:e,ref_:t,status:n,reload:r}){let[i,a]=(0,_.useState)(!1),[o,s]=(0,_.useState)(null);if((0,_.useEffect)(()=>s(null),[t]),!bb())return(0,b.jsx)(`span`,{className:`detail__status`,children:RE(n)});async function c(i){if(i!==n){a(!0),s(null);try{await Sb(e,t,i)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1),r()}}}return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`select`,{className:`detail__status detail__status--edit`,value:n,disabled:i,"aria-label":`Status`,onChange:e=>void c(e.target.value),children:Object.keys(gw).map(e=>(0,b.jsx)(`option`,{value:e,children:RE(e)},e))}),o!==null&&(0,b.jsx)(`span`,{className:`detail__status-error`,children:o})]})}var BE,X,VE,HE,UE,WE,GE,KE,qE,JE={},YE=[],XE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ZE(e,t){for(var n in t)e[n]=t[n];return e}function QE(e){var t=e.parentNode;t&&t.removeChild(e)}function Z(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?BE.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return $E(e,o,r,i,null)}function $E(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++VE};return i==null&&X.vnode!=null&&X.vnode(a),a}function eD(){return{current:null}}function tD(e){return e.children}function nD(e,t,n,r,i){for(var a in n)a===`children`||a===`key`||a in t||iD(e,a,null,n[a],r);for(a in t)i&&typeof t[a]!=`function`||a===`children`||a===`key`||a===`value`||a===`checked`||n[a]===t[a]||iD(e,a,t[a],n[a],r)}function rD(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||XE.test(t)?n:n+`px`}function iD(e,t,n,r,i){var a;n:if(t===`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||rD(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||rD(e.style,t,n[t])}}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/Capture$/,``)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r||e.addEventListener(t,a?oD:aD,a):e.removeEventListener(t,a?oD:aD,a);else if(t!==`dangerouslySetInnerHTML`){if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t.indexOf(`-`)==-1?e.removeAttribute(t):e.setAttribute(t,n))}}function aD(e){UE=!0;try{return this.l[e.type+!1](X.event?X.event(e):e)}finally{UE=!1}}function oD(e){UE=!0;try{return this.l[e.type+!0](X.event?X.event(e):e)}finally{UE=!1}}function sD(e,t){this.props=e,this.context=t}function cD(e,t){if(t==null)return e.__?cD(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?cD(e):null}function lD(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return lD(e)}}function uD(e){UE?setTimeout(e):KE(e)}function dD(e){(!e.__d&&(e.__d=!0)&&WE.push(e)&&!fD.__r++||GE!==X.debounceRendering)&&((GE=X.debounceRendering)||uD)(fD)}function fD(){var e,t,n,r,i,a,o,s;for(WE.sort(function(e,t){return e.__v.__b-t.__v.__b});e=WE.shift();)e.__d&&(t=WE.length,r=void 0,i=void 0,o=(a=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=ZE({},a)).__v=a.__v+1,vD(s,a,i,n.__n,s.ownerSVGElement!==void 0,a.__h==null?null:[o],r,o??cD(a),a.__h),yD(r,a),a.__e!=o&&lD(a)),WE.length>t&&WE.sort(function(e,t){return e.__v.__b-t.__v.__b}));fD.__r=0}function pD(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_=r&&r.__k||YE,v=_.length;for(n.__k=[],u=0;u<t.length;u++)if((p=n.__k[u]=(p=t[u])==null||typeof p==`boolean`?null:typeof p==`string`||typeof p==`number`||typeof p==`bigint`?$E(null,p,null,null,p):Array.isArray(p)?$E(tD,{children:p},null,null,null):p.__b>0?$E(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(f=_[u])===null||f&&p.key==f.key&&p.type===f.type)_[u]=void 0;else for(d=0;d<v;d++){if((f=_[d])&&p.key==f.key&&p.type===f.type){_[d]=void 0;break}f=null}vD(e,p,f||=JE,i,a,o,s,c,l),m=p.__e,(d=p.ref)&&f.ref!=d&&(g||=[],f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||m,p)),m==null?c&&f.__e==c&&c.parentNode!=e&&(c=cD(f)):(h??=m,typeof p.type==`function`&&p.__k===f.__k?p.__d=c=mD(p,c,e):c=gD(e,p,f,_,m,c),typeof n.type==`function`&&(n.__d=c))}for(n.__e=h,u=v;u--;)_[u]!=null&&(typeof n.type==`function`&&_[u].__e!=null&&_[u].__e==n.__d&&(n.__d=_D(r).nextSibling),SD(_[u],_[u]));if(g)for(u=0;u<g.length;u++)xD(g[u],g[++u],g[++u])}function mD(e,t,n){for(var r,i=e.__k,a=0;i&&a<i.length;a++)(r=i[a])&&(r.__=e,t=typeof r.type==`function`?mD(r,t,n):gD(n,r,r,i,r.__e,t));return t}function hD(e,t){return t||=[],e==null||typeof e==`boolean`||(Array.isArray(e)?e.some(function(e){hD(e,t)}):t.push(e)),t}function gD(e,t,n,r,i,a){var o,s,c;if(t.__d!==void 0)o=t.__d,t.__d=void 0;else if(n==null||i!=a||i.parentNode==null)n:if(a==null||a.parentNode!==e)e.appendChild(i),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<r.length;c+=1)if(s==i)break n;e.insertBefore(i,a),o=a}return o===void 0?i.nextSibling:o}function _D(e){var t,n,r;if(e.type==null||typeof e.type==`string`)return e.__e;if(e.__k){for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=_D(n)))return r}return null}function vD(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,s=t.__e=n.__e,t.__h=null,a=[s]),(l=X.__b)&&l(t);try{n:if(typeof w==`function`){if(g=t.props,_=(l=w.contextType)&&r[l.__c],v=l?_?_.props.value:l.__:r,n.__c?h=(u=t.__c=n.__c).__=u.__E:(`prototype`in w&&w.prototype.render?t.__c=u=new w(g,v):(t.__c=u=new sD(g,v),u.constructor=w,u.render=CD),_&&_.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),u.__s??(u.__s=u.state),w.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ZE({},u.__s)),ZE(u.__s,w.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)w.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(w.getDerivedStateFromProps==null&&g!==f&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,v),!u.__e&&u.shouldComponentUpdate!=null&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),y=0;y<u._sb.length;y++)u.__h.push(u._sb[y]);u._sb=[],u.__h.length&&o.push(u);break n}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,v),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(f,p,m)})}if(u.context=v,u.props=g,u.__P=e,b=X.__r,x=0,`prototype`in w&&w.prototype.render){for(u.state=u.__s,u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do u.__d=!1,b&&b(t),l=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++x<25);u.state=u.__s,u.getChildContext!=null&&(r=ZE(ZE({},r),u.getChildContext())),d||u.getSnapshotBeforeUpdate==null||(m=u.getSnapshotBeforeUpdate(f,p)),C=l!=null&&l.type===tD&&l.key==null?l.props.children:l,pD(e,Array.isArray(C)?C:[C],t,n,r,i,a,o,s,c),u.base=t.__e,t.__h=null,u.__h.length&&o.push(u),h&&(u.__E=u.__=null),u.__e=!1}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=bD(n.__e,t,n,r,i,a,o,c);(l=X.diffed)&&l(t)}catch(e){t.__v=null,(c||a!=null)&&(t.__e=s,t.__h=!!c,a[a.indexOf(s)]=null),X.__e(e,t,n)}}function yD(e,t){X.__c&&X.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){X.__e(e,t.__v)}})}function bD(e,t,n,r,i,a,o,s){var c,l,u,d=n.props,f=t.props,p=t.type,m=0;if(p===`svg`&&(i=!0),a!=null){for(;m<a.length;m++)if((c=a[m])&&`setAttribute`in c==!!p&&(p?c.localName===p:c.nodeType===3)){e=c,a[m]=null;break}}if(e==null){if(p===null)return document.createTextNode(f);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,p):document.createElement(p,f.is&&f),a=null,s=!1}if(p===null)d===f||s&&e.data===f||(e.data=f);else{if(a&&=BE.call(e.childNodes),l=(d=n.props||JE).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(a!=null)for(d={},m=0;m<e.attributes.length;m++)d[e.attributes[m].name]=e.attributes[m].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||``))}if(nD(e,f,d,i,s),u)t.__k=[];else if(m=t.props.children,pD(e,Array.isArray(m)?m:[m],t,n,r,i&&p!==`foreignObject`,a,o,a?a[0]:n.__k&&cD(n,0),s),a!=null)for(m=a.length;m--;)a[m]!=null&&QE(a[m]);s||(`value`in f&&(m=f.value)!==void 0&&(m!==e.value||p===`progress`&&!m||p===`option`&&m!==d.value)&&iD(e,`value`,m,d.value,!1),`checked`in f&&(m=f.checked)!==void 0&&m!==e.checked&&iD(e,`checked`,m,d.checked,!1))}return e}function xD(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){X.__e(e,n)}}function SD(e,t,n){var r,i;if(X.unmount&&X.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||xD(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){X.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&SD(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||QE(e.__e),e.__=e.__e=e.__d=void 0}function CD(e,t,n){return this.constructor(e,n)}function wD(e,t,n){var r,i,a;X.__&&X.__(e,t),i=(r=typeof n==`function`)?null:n&&n.__k||t.__k,a=[],vD(t,e=(!r&&n||t).__k=Z(tD,null,[e]),i||JE,JE,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?BE.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r),yD(a,e)}function TD(e,t){var n={__c:t=`__cC`+qE++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,dD(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}BE=YE.slice,X={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},VE=0,HE=function(e){return e!=null&&e.constructor===void 0},UE=!1,sD.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ZE({},this.state);typeof e==`function`&&(e=e(ZE({},n),this.props)),e&&ZE(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),dD(this))},sD.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),dD(this))},sD.prototype.render=tD,WE=[],KE=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,fD.__r=0,qE=0;var ED,DD,OD,kD=[],AD=[],jD=X.__b,MD=X.__r,ND=X.diffed,PD=X.__c,FD=X.unmount;function ID(){for(var e;e=kD.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(zD),e.__H.__h.forEach(BD),e.__H.__h=[]}catch(t){e.__H.__h=[],X.__e(t,e.__v)}}X.__b=function(e){ED=null,jD&&jD(e)},X.__r=function(e){MD&&MD(e);var t=(ED=e.__c).__H;t&&(DD===ED?(t.__h=[],ED.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=AD,e.__N=e.i=void 0})):(t.__h.forEach(zD),t.__h.forEach(BD),t.__h=[])),DD=ED},X.diffed=function(e){ND&&ND(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(kD.push(t)!==1&&OD===X.requestAnimationFrame||((OD=X.requestAnimationFrame)||RD)(ID)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==AD&&(e.__=e.__V),e.i=void 0,e.__V=AD})),DD=ED=null},X.__c=function(e,t){t.some(function(e){try{e.__h.forEach(zD),e.__h=e.__h.filter(function(e){return!e.__||BD(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],X.__e(n,e.__v)}}),PD&&PD(e,t)},X.unmount=function(e){FD&&FD(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{zD(e)}catch(e){t=e}}),n.__H=void 0,t&&X.__e(t,n.__v))};var LD=typeof requestAnimationFrame==`function`;function RD(e){var t,n=function(){clearTimeout(r),LD&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);LD&&(t=requestAnimationFrame(n))}function zD(e){var t=ED,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),ED=t}function BD(e){var t=ED;e.__c=e.__(),ED=t}function VD(e,t){for(var n in t)e[n]=t[n];return e}function HD(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function UD(e){this.props=e}(UD.prototype=new sD).isPureReactComponent=!0,UD.prototype.shouldComponentUpdate=function(e,t){return HD(this.props,e)||HD(this.state,t)};var WD=X.__b;X.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),WD&&WD(e)},typeof Symbol<`u`&&Symbol.for;var GD=X.__e;X.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}GD(e,t,n,r)};var KD=X.unmount;function qD(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=VD({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return qD(e,t,n)})),e}function JD(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return JD(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function YD(){this.__u=0,this.t=null,this.__b=null}function XD(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ZD(){this.u=null,this.o=null}X.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),KD&&KD(e)},(YD.prototype=new sD).__c=function(e,t){var n=t.__c,r=this;r.t??=[],r.t.push(n);var i=XD(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=JD(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},YD.prototype.componentWillUnmount=function(){this.t=[]},YD.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=qD(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Z(tD,null,e.fallback);return i&&(i.__h=null),[Z(tD,null,t.__a?null:e.children),i]};var QD=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!==`t`||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function $D(e){return this.getChildContext=function(){return e.context},e.children}function eO(e){var t=this,n=e.i;t.componentWillUnmount=function(){wD(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||=(t.i=n,{nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),wD(Z($D,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function tO(e,t){var n=Z(eO,{__v:e,i:t});return n.containerInfo=t,n}(ZD.prototype=new sD).__a=function(e){var t=this,n=XD(t.__v),r=t.o.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),QD(t,e,r)):i()};n?n(a):a()}},ZD.prototype.render=function(e){this.u=null,this.o=new Map;var t=hD(e.children);e.revealOrder&&e.revealOrder[0]===`b`&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},ZD.prototype.componentDidUpdate=ZD.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){QD(e,n,t)})};var nO=typeof Symbol<`u`&&Symbol.for&&Symbol.for(`react.element`)||60103,rO=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,iO=typeof document<`u`,aO=function(e){return(typeof Symbol<`u`&&typeof Symbol()==`symbol`?/fil|che|rad/i:/fil|che|ra/i).test(e)};sD.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(sD.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var oO=X.event;function sO(){}function cO(){return this.cancelBubble}function lO(){return this.defaultPrevented}X.event=function(e){return oO&&(e=oO(e)),e.persist=sO,e.isPropagationStopped=cO,e.isDefaultPrevented=lO,e.nativeEvent=e};var uO={configurable:!0,get:function(){return this.class}},dO=X.vnode;X.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t==`string`){var i=t.indexOf(`-`)===-1;for(var a in r={},n){var o=n[a];iO&&a===`children`&&t===`noscript`||a===`value`&&`defaultValue`in n&&o==null||(a===`defaultValue`&&`value`in n&&n.value==null?a=`value`:a===`download`&&!0===o?o=``:/ondoubleclick/i.test(a)?a=`ondblclick`:/^onchange(textarea|input)/i.test(a+t)&&!aO(n.type)?a=`oninput`:/^onfocus$/i.test(a)?a=`onfocusin`:/^onblur$/i.test(a)?a=`onfocusout`:/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&rO.test(a)?a=a.replace(/[A-Z0-9]/g,`-$&`).toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),r[a]&&(a=`oninputCapture`)),r[a]=o)}t==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=hD(n.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),t==`select`&&r.defaultValue!=null&&(r.value=hD(n.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(uO.enumerable=`className`in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",uO))}e.$$typeof=nO,dO&&dO(e)};var fO=X.__r;X.__r=function(e){fO&&fO(e),e.__c};var pO=[],mO=new Map;function hO(e){pO.push(e),mO.forEach(t=>{yO(t,e)})}function gO(e){e.isConnected&&e.getRootNode&&_O(e.getRootNode())}function _O(e){let t=mO.get(e);if(!t||!t.isConnected){if(t=e.querySelector(`style[data-fullcalendar]`),!t){t=document.createElement(`style`),t.setAttribute(`data-fullcalendar`,``);let n=xO();n&&(t.nonce=n);let r=e===document?document.head:e,i=e===document?r.querySelector(`script,link[rel=stylesheet],link[as=style],style`):r.firstChild;r.insertBefore(t,i)}mO.set(e,t),vO(t)}}function vO(e){for(let t of pO)yO(e,t)}function yO(e,t){let{sheet:n}=e,r=n.cssRules.length;t.split(`}`).forEach((e,t)=>{e=e.trim(),e&&n.insertRule(e+`}`,r+t)})}var bO;function xO(){return bO===void 0&&(bO=SO()),bO}function SO(){let e=document.querySelector(`meta[name="csp-nonce"]`);if(e&&e.hasAttribute(`content`))return e.getAttribute(`content`);let t=document.querySelector(`script[nonce]`);return t&&t.nonce||``}typeof document<`u`&&_O(document),hO(`:root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}`);var CO=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=``){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e=``,t){let{pauseDepths:n}=this;e in n&&(t?delete n[e]:(--n[e],n[e]<=0&&delete n[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&=(clearTimeout(this.timeoutId),0)}drained(){this.drainedOption&&this.drainedOption()}};function wO(e){e.parentNode&&e.parentNode.removeChild(e)}function TO(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(EO(e,t))return e;e=e.parentElement||e.parentNode}while(e!==null&&e.nodeType===1);return null}function EO(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function DO(e,t){let n=e instanceof HTMLElement?[e]:e,r=[];for(let e=0;e<n.length;e+=1){let i=n[e].querySelectorAll(t);for(let e=0;e<i.length;e+=1)r.push(i[e])}return r}var OO=/(top|left|right|bottom|width|height)$/i;function kO(e,t){for(let n in t)AO(e,n,t[n])}function AO(e,t,n){n==null?e.style[t]=``:typeof n==`number`&&OO.test(t)?e.style[t]=`${n}px`:e.style[t]=n}function jO(e){return e.composedPath?.call(e)[0]??e.target}var MO=0;function NO(){return MO+=1,`fc-dom-`+MO}function PO(e,t){return n=>{let r=TO(n.target,e);r&&t.call(r,n,r)}}function FO(e,t,n,r){let i=PO(n,r);return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}function IO(e,t,n,r){let i;return FO(e,`mouseover`,t,(e,t)=>{if(t!==i){i=t,n(e,t);let a=e=>{i=null,r(e,t),t.removeEventListener(`mouseleave`,a)};t.addEventListener(`mouseleave`,a)}})}function LO(e){return Object.assign({onClick:e},RO(e))}function RO(e){return{tabIndex:0,onKeyDown(t){(t.key===`Enter`||t.key===` `)&&(e(t),t.preventDefault())}}}var zO=0;function BO(){return zO+=1,String(zO)}function VO(e){let t=[],n=[],r,i;for(typeof e==`string`?n=e.split(/\s*,\s*/):typeof e==`function`?n=[e]:Array.isArray(e)&&(n=e),r=0;r<n.length;r+=1)i=n[r],typeof i==`string`?t.push(i.charAt(0)===`-`?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i==`function`&&t.push({func:i});return t}function HO(e,t,n){let r,i;for(r=0;r<n.length;r+=1)if(i=UO(e,t,n[r]),i)return i;return 0}function UO(e,t,n){return n.func?n.func(e,t):WO(e[n.field],t[n.field])*(n.order||1)}function WO(e,t){return!e&&!t?0:t==null?-1:e==null?1:typeof e==`string`||typeof t==`string`?String(e).localeCompare(String(t)):e-t}function GO(e,t){let n=String(e);return`000`.substr(0,t-n.length)+n}function KO(e,t,n){return typeof e==`function`?e(...t):typeof e==`string`?t.reduce((e,t,n)=>e.replace(`$`+n,t||``),e):n}function qO(e){return e%1==0}function JO(e){let t=e.querySelector(`.fc-scrollgrid-shrink-frame`),n=e.querySelector(`.fc-scrollgrid-shrink-cushion`);if(!t)throw Error(`needs fc-scrollgrid-shrink-frame className`);if(!n)throw Error(`needs fc-scrollgrid-shrink-cushion className`);return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var YO=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function XO(e,t){return typeof e==`string`?ZO(e):typeof e==`object`&&e?QO(e):typeof e==`number`?QO({[t||`milliseconds`]:e}):null}function ZO(e){let t=YO.exec(e);if(t){let e=t[1]?-1:1;return{years:0,months:0,days:e*(t[2]?parseInt(t[2],10):0),milliseconds:e*((t[3]?parseInt(t[3],10):0)*60*60*1e3+(t[4]?parseInt(t[4],10):0)*60*1e3+(t[5]?parseInt(t[5],10):0)*1e3+(t[6]?parseInt(t[6],10):0))}}return null}function QO(e){let t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:(e.hours||e.hour||0)*60*60*1e3+(e.minutes||e.minute||0)*60*1e3+(e.seconds||e.second||0)*1e3+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=n*7,t.specifiedWeeks=!0),t}function $O(e,t){return e.years===t.years&&e.months===t.months&&e.days===t.days&&e.milliseconds===t.milliseconds}function ek(e,t){return{years:e.years-t.years,months:e.months-t.months,days:e.days-t.days,milliseconds:e.milliseconds-t.milliseconds}}function tk(e){return rk(e)/365}function nk(e){return rk(e)/30}function rk(e){return ik(e)/864e5}function ik(e){return e.years*31536e6+e.months*2592e6+e.days*864e5+e.milliseconds}function ak(e){let t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:`millisecond`,value:t};if(t%6e4!=0)return{unit:`second`,value:t/1e3};if(t%36e5!=0)return{unit:`minute`,value:t/6e4};if(t)return{unit:`hour`,value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:`week`,value:e.days/7}:{unit:`day`,value:e.days}:e.months?{unit:`month`,value:e.months}:e.years?{unit:`year`,value:e.years}:{unit:`millisecond`,value:0}}function ok(e,t,n){if(e===t)return!0;let r=e.length,i;if(r!==t.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(e[i],t[i]):e[i]===t[i]))return!1;return!0}var sk=[`sun`,`mon`,`tue`,`wed`,`thu`,`fri`,`sat`];function ck(e,t){let n=Ok(e);return n[2]+=t*7,kk(n)}function lk(e,t){let n=Ok(e);return n[2]+=t,kk(n)}function uk(e,t){let n=Ok(e);return n[6]+=t,kk(n)}function dk(e,t){return fk(e,t)/7}function fk(e,t){return(t.valueOf()-e.valueOf())/864e5}function pk(e,t){return(t.valueOf()-e.valueOf())/36e5}function mk(e,t){return(t.valueOf()-e.valueOf())/6e4}function hk(e,t){return(t.valueOf()-e.valueOf())/1e3}function gk(e,t){let n=yk(e),r=yk(t);return{years:0,months:0,days:Math.round(fk(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function _k(e,t){let n=vk(e,t);return n!==null&&n%7==0?n/7:null}function vk(e,t){return jk(e)===jk(t)?Math.round(fk(e,t)):null}function yk(e){return kk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function bk(e){return kk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}function xk(e){return kk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}function Sk(e){return kk([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}function Ck(e,t,n){let r=e.getUTCFullYear(),i=wk(e,r,t,n);if(i<1)return wk(e,r-1,t,n);let a=wk(e,r+1,t,n);return a>=1?Math.min(i,a):i}function wk(e,t,n,r){let i=kk([t,0,1+Tk(t,n,r)]),a=yk(e),o=Math.round(fk(i,a));return Math.floor(o/7)+1}function Tk(e,t,n){let r=7+t-n;return-((7+kk([e,0,r]).getUTCDay()-t)%7)+r-1}function Ek(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Dk(e){return new Date(e[0],e[1]||0,e[2]==null?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function Ok(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function kk(e){return e.length===1&&(e=e.concat([0])),new Date(Date.UTC(...e))}function Ak(e){return!isNaN(e.valueOf())}function jk(e){return e.getUTCHours()*1e3*60*60+e.getUTCMinutes()*1e3*60+e.getUTCSeconds()*1e3+e.getUTCMilliseconds()}function Mk(e,t,n=!1){let r=e.toISOString();return r=r.replace(`.000`,``),n&&(r=r.replace(`T00:00:00Z`,``)),r.length>10&&(t==null?r=r.replace(`Z`,``):t!==0&&(r=r.replace(`Z`,Fk(t,!0)))),r}function Nk(e){return e.toISOString().replace(/T.*$/,``)}function Pk(e){return e.toISOString().match(/^\d{4}-\d{2}/)[0]}function Fk(e,t=!1){let n=e<0?`-`:`+`,r=Math.abs(e),i=Math.floor(r/60),a=Math.round(r%60);return t?`${n+GO(i,2)}:${GO(a,2)}`:`GMT${n}${i}${a?`:${GO(a,2)}`:``}`}function Q(e,t,n){let r,i;return function(...a){if(!r)i=e.apply(this,a);else if(!ok(r,a)){n&&n(i);let r=e.apply(this,a);t&&t(r,i)||(i=r)}return r=a,i}}function Ik(e,t,n){let r,i;return a=>{if(!r)i=e.call(this,a);else if(!xA(r,a)){n&&n(i);let r=e.call(this,a);t&&t(r,i)||(i=r)}return r=a,i}}var Lk={week:3,separator:9,omitZeroMinute:9,meridiem:9,omitCommas:9},Rk={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},zk=/\s*([ap])\.?m\.?/i,Bk=/,/g,Vk=/\s+/g,Hk=/\u200e/g,Uk=/UTC|GMT/,Wk=class{constructor(e){let t={},n={},r=9;for(let i in e)i in Lk?(n[i]=e[i],Lk[i]<9&&(r=Math.min(Lk[i],r))):(t[i]=e[i],i in Rk&&(r=Math.min(Rk[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.smallestUnitNum=r,this.buildFormattingFunc=Q(Gk)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,n,r){let{standardDateProps:i,extendedSettings:a}=this,o=Zk(e.marker,t.marker,n.calendarSystem);if(!o)return this.format(e,n);let s=o;s>1&&(i.year===`numeric`||i.year===`2-digit`)&&(i.month===`numeric`||i.month===`2-digit`)&&(i.day===`numeric`||i.day===`2-digit`)&&(s=1);let c=this.format(e,n),l=this.format(t,n);if(c===l)return c;let u=Gk(Qk(i,s),a,n),d=u(e),f=u(t),p=$k(c,d,l,f),m=a.separator||r||n.defaultSeparator||``;return p?p.before+d+m+f+p.after:c+m+l}getSmallestUnit(){switch(this.smallestUnitNum){case 7:case 6:case 5:return`year`;case 4:return`month`;case 3:return`week`;case 2:return`day`;default:return`time`}}};function Gk(e,t,n){let r=Object.keys(e).length;return r===1&&e.timeZoneName===`short`?e=>Fk(e.timeZoneOffset):r===0&&t.week?e=>Xk(n.computeWeekNumber(e.marker),n.weekText,n.weekTextLong,n.locale,t.week):Kk(e,t,n)}function Kk(e,t,n){e=Object.assign({},e),t=Object.assign({},t),qk(e,t),e.timeZone=`UTC`;let r=new Intl.DateTimeFormat(n.locale.codes,e),i;if(t.omitZeroMinute){let t=Object.assign({},e);delete t.minute,i=new Intl.DateTimeFormat(n.locale.codes,t)}return a=>{let{marker:o}=a,s;return s=i&&!o.getUTCMinutes()?i:r,Jk(s.format(o),a,e,t,n)}}function qk(e,t){e.timeZoneName&&(e.hour||=`2-digit`,e.minute||=`2-digit`),e.timeZoneName===`long`&&(e.timeZoneName=`short`),t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}function Jk(e,t,n,r,i){return e=e.replace(Hk,``),n.timeZoneName===`short`&&(e=Yk(e,i.timeZone===`UTC`||t.timeZoneOffset==null?`UTC`:Fk(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(Bk,``).trim()),r.omitZeroMinute&&(e=e.replace(`:00`,``)),r.meridiem===!1?e=e.replace(zk,``).trim():r.meridiem===`narrow`?e=e.replace(zk,(e,t)=>t.toLocaleLowerCase()):r.meridiem===`short`?e=e.replace(zk,(e,t)=>`${t.toLocaleLowerCase()}m`):r.meridiem===`lowercase`&&(e=e.replace(zk,e=>e.toLocaleLowerCase())),e=e.replace(Vk,` `),e=e.trim(),e}function Yk(e,t){let n=!1;return e=e.replace(Uk,()=>(n=!0,t)),n||(e+=` ${t}`),e}function Xk(e,t,n,r,i){let a=[];return i===`long`?a.push(n):(i===`short`||i===`narrow`)&&a.push(t),(i===`long`||i===`short`)&&a.push(` `),a.push(r.simpleNumberFormat.format(e)),r.options.direction===`rtl`&&a.reverse(),a.join(``)}function Zk(e,t,n){return n.getMarkerYear(e)===n.getMarkerYear(t)?n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerDay(e)===n.getMarkerDay(t)?jk(e)===jk(t)?0:1:2:4:5}function Qk(e,t){let n={};for(let r in e)(!(r in Rk)||Rk[r]<=t)&&(n[r]=e[r]);return n}function $k(e,t,n,r){let i=0;for(;i<e.length;){let a=e.indexOf(t,i);if(a===-1)break;let o=e.substr(0,a);i=a+t.length;let s=e.substr(i),c=0;for(;c<n.length;){let e=n.indexOf(r,c);if(e===-1)break;let t=n.substr(0,e);c=e+r.length;let i=n.substr(c);if(o===t&&s===i)return{before:o,after:s}}}return null}function eA(e,t){let n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function tA(e,t,n,r){let i=eA(e,n.calendarSystem);return{date:i,start:i,end:t?eA(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var nA=class{constructor(e){this.cmdStr=e}format(e,t,n){return t.cmdFormatter(this.cmdStr,tA(e,null,t,n))}formatRange(e,t,n,r){return n.cmdFormatter(this.cmdStr,tA(e,t,n,r))}},rA=class{constructor(e){this.func=e}format(e,t,n){return this.func(tA(e,null,t,n))}formatRange(e,t,n,r){return this.func(tA(e,t,n,r))}};function iA(e){return typeof e==`object`&&e?new Wk(e):typeof e==`string`?new nA(e):typeof e==`function`?new rA(e):null}var aA={navLinkDayClick:$,navLinkWeekClick:$,duration:XO,bootstrapFontAwesome:$,buttonIcons:$,customButtons:$,defaultAllDayEventDuration:XO,defaultTimedEventDuration:XO,nextDayThreshold:XO,scrollTime:XO,scrollTimeReset:Boolean,slotMinTime:XO,slotMaxTime:XO,dayPopoverFormat:iA,slotDuration:XO,snapDuration:XO,headerToolbar:$,footerToolbar:$,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:iA,dayHeaderClassNames:$,dayHeaderContent:$,dayHeaderDidMount:$,dayHeaderWillUnmount:$,dayCellClassNames:$,dayCellContent:$,dayCellDidMount:$,dayCellWillUnmount:$,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:$,weekNumbers:Boolean,weekNumberClassNames:$,weekNumberContent:$,weekNumberDidMount:$,weekNumberWillUnmount:$,editable:Boolean,viewClassNames:$,viewDidMount:$,viewWillUnmount:$,nowIndicator:Boolean,nowIndicatorSnap:$,nowIndicatorClassNames:$,nowIndicatorContent:$,nowIndicatorDidMount:$,nowIndicatorWillUnmount:$,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:$,locale:$,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:$,eventOrder:VO,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:$,contentHeight:$,direction:String,weekNumberFormat:iA,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:$,initialDate:$,now:$,eventDataTransform:$,stickyHeaderDates:$,stickyFooterScrollbar:$,viewHeight:$,defaultAllDay:Boolean,eventSourceFailure:$,eventSourceSuccess:$,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:$,eventConstraint:$,eventAllow:$,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:$,eventContent:$,eventDidMount:$,eventWillUnmount:$,selectConstraint:$,selectOverlap:$,selectAllow:$,droppable:Boolean,unselectCancel:String,slotLabelFormat:$,slotLaneClassNames:$,slotLaneContent:$,slotLaneDidMount:$,slotLaneWillUnmount:$,slotLabelClassNames:$,slotLabelContent:$,slotLabelDidMount:$,slotLabelWillUnmount:$,dayMaxEvents:$,dayMaxEventRows:$,dayMinWidth:Number,slotLabelInterval:XO,allDayText:String,allDayClassNames:$,allDayContent:$,allDayDidMount:$,allDayWillUnmount:$,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:iA,rerenderDelay:Number,moreLinkText:$,moreLinkHint:$,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:$,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:XO,hiddenDays:$,fixedWeekCount:Boolean,validRange:$,visibleRange:$,titleFormat:$,eventInteractive:Boolean,noEventsText:String,viewHint:$,navLinkHint:$,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:$,moreLinkClassNames:$,moreLinkContent:$,moreLinkDidMount:$,moreLinkWillUnmount:$,monthStartFormat:iA,handleCustomRendering:$,customRenderingMetaMap:$,customRenderingReplaces:Boolean},oA={eventDisplay:`auto`,defaultRangeSeparator:` - `,titleRangeSeparator:` – `,defaultTimedEventDuration:`01:00:00`,defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:`00:00:00`,dayHeaders:!0,initialView:``,aspectRatio:1.35,headerToolbar:{start:`title`,center:``,end:`today prev,next`},weekends:!0,weekNumbers:!1,weekNumberCalculation:`local`,editable:!1,nowIndicator:!1,scrollTime:`06:00:00`,scrollTimeReset:!0,slotMinTime:`00:00:00`,slotMaxTime:`24:00:00`,showNonCurrentDates:!0,lazyFetching:!0,startParam:`start`,endParam:`end`,timeZoneParam:`timeZone`,timeZone:`local`,locales:[],locale:``,themeSystem:`standard`,dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:`*`,eventOrder:`start,-duration,allDay,title`,dayPopoverFormat:{month:`long`,day:`numeric`,year:`numeric`},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:`long`,day:`numeric`},nowIndicatorSnap:`auto`},sA={datesSet:$,eventsSet:$,eventAdd:$,eventChange:$,eventRemove:$,windowResize:$,eventClick:$,eventMouseEnter:$,eventMouseLeave:$,select:$,unselect:$,loading:$,_unmount:$,_beforeprint:$,_afterprint:$,_noEventDrop:$,_noEventResize:$,_resize:$,_scrollRequest:$},cA={buttonText:$,buttonHints:$,views:$,plugins:$,initialEvents:$,events:$,eventSources:$},lA={headerToolbar:uA,footerToolbar:uA,buttonText:uA,buttonHints:uA,buttonIcons:uA,dateIncrement:uA,plugins:dA,events:dA,eventSources:dA,resources:dA};function uA(e,t){return typeof e==`object`&&typeof t==`object`&&e&&t?xA(e,t):e===t}function dA(e,t){return Array.isArray(e)&&Array.isArray(t)?ok(e,t):e===t}var fA={type:String,component:$,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:$,usesMinMaxTime:Boolean,classNames:$,content:$,didMount:$,willUnmount:$};function pA(e){return gA(e,lA)}function mA(e,t){let n={},r={};for(let r in t)r in e&&(n[r]=t[r](e[r]));for(let n in e)n in t||(r[n]=e[n]);return{refined:n,extra:r}}function $(e){return e}var{hasOwnProperty:hA}=Object.prototype;function gA(e,t){let n={};if(t){for(let r in t)if(t[r]===uA){let t=[];for(let i=e.length-1;i>=0;--i){let a=e[i][r];if(typeof a==`object`&&a)t.unshift(a);else if(a!==void 0){n[r]=a;break}}t.length&&(n[r]=gA(t))}}for(let t=e.length-1;t>=0;--t){let r=e[t];for(let e in r)e in n||(n[e]=r[e])}return n}function _A(e,t){let n={};for(let r in e)t(e[r],r)&&(n[r]=e[r]);return n}function vA(e,t){let n={};for(let r in e)n[r]=t(e[r],r);return n}function yA(e){let t={};for(let n of e)t[n]=!0;return t}function bA(e){let t=[];for(let n in e)t.push(e[n]);return t}function xA(e,t){if(e===t)return!0;for(let n in e)if(hA.call(e,n)&&!(n in t))return!1;for(let n in t)if(hA.call(t,n)&&e[n]!==t[n])return!1;return!0}var SA=/^on[A-Z]/;function CA(e,t){let n=wA(e,t);for(let e of n)if(!SA.test(e))return!1;return!0}function wA(e,t){let n=[];for(let r in e)hA.call(e,r)&&(r in t||n.push(r));for(let r in t)hA.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function TA(e,t,n={}){if(e===t)return!0;for(let r in t)if(!(r in e&&EA(e[r],t[r],n[r])))return!1;for(let n in e)if(!(n in t))return!1;return!0}function EA(e,t,n){return e===t||n===!0?!0:n?n(e,t):!1}function DA(e,t=0,n,r=1){let i=[];n??=Object.keys(e).length;for(let a=t;a<n;a+=r){let t=e[a];t!==void 0&&i.push(t)}return i}var OA={};function kA(e,t){OA[e]=t}function AA(e){return new OA[e]}kA(`gregory`,class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return kk(e)}markerToArray(e){return Ok(e)}});var jA=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function MA(e){let t=jA.exec(e);if(t){let e=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?Number(`0.${t[12]}`)*1e3:0));if(Ak(e)){let n=null;return t[13]&&(n=(t[15]===`-`?-1:1)*(Number(t[16]||0)*60+Number(t[18]||0))),{marker:e,isTimeUnspecified:!t[6],timeZoneOffset:n}}}return null}var NA=class{constructor(e){let t=this.timeZone=e.timeZone,n=t!==`local`&&t!==`UTC`;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=!(n&&!this.namedTimeZoneImpl),this.calendarSystem=AA(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation===`ISO`&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay==`number`&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation==`function`&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText==null?e.locale.options.weekText:e.weekText,this.weekTextLong=(e.weekTextLong==null?e.locale.options.weekTextLong:e.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):kk(Ek(new Date))}createMarkerMeta(e){if(typeof e==`string`)return this.parse(e);let t=null;return typeof e==`number`?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=kk(e)),t===null||!Ak(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=MA(e);if(t===null)return null;let{marker:n}=t,r=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-t.timeZoneOffset*60*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)}subtract(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)}addYears(e,t){let n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)}addMonths(e,t){let n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)}diffWholeYears(e,t){let{calendarSystem:n}=this;return jk(e)===jk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:n}=this;return jk(e)===jk(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+(n.getMarkerYear(t)-n.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let n=this.diffWholeYears(e,t);return n===null?(n=this.diffWholeMonths(e,t),n===null?(n=_k(e,t),n===null?(n=vk(e,t),n===null?(n=pk(e,t),qO(n)?{unit:`hour`,value:n}:(n=mk(e,t),qO(n)?{unit:`minute`,value:n}:(n=hk(e,t),qO(n)?{unit:`second`,value:n}:{unit:`millisecond`,value:t.valueOf()-e.valueOf()}))):{unit:`day`,value:n}):{unit:`week`,value:n}):{unit:`month`,value:n}):{unit:`year`,value:n}}countDurationsBetween(e,t,n){let r;return n.years&&(r=this.diffWholeYears(e,t),r!==null)?r/tk(n):n.months&&(r=this.diffWholeMonths(e,t),r!==null)?r/nk(n):n.days&&(r=vk(e,t),r!==null)?r/rk(n):(t.valueOf()-e.valueOf())/ik(n)}startOf(e,t){return t===`year`?this.startOfYear(e):t===`month`?this.startOfMonth(e):t===`week`?this.startOfWeek(e):t===`day`?yk(e):t===`hour`?bk(e):t===`minute`?xk(e):t===`second`?Sk(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):Ck(e,this.weekDow,this.weekDoy)}format(e,t,n={}){return t.format({marker:e,timeZoneOffset:n.forcedTzo==null?this.offsetForMarker(e):n.forcedTzo},this)}formatRange(e,t,n,r={}){return r.isEndExclusive&&(t=uk(t,-1)),n.formatRange({marker:e,timeZoneOffset:r.forcedStartTzo==null?this.offsetForMarker(e):r.forcedStartTzo},{marker:t,timeZoneOffset:r.forcedEndTzo==null?this.offsetForMarker(t):r.forcedEndTzo},this,r.defaultSeparator)}formatIso(e,t={}){let n=null;return t.omitTimeZoneOffset||(n=t.forcedTzo==null?this.offsetForMarker(e):t.forcedTzo),Mk(e,n,t.omitTime)}timestampToMarker(e){return this.timeZone===`local`?kk(Ek(new Date(e))):this.timeZone===`UTC`||!this.namedTimeZoneImpl?new Date(e):kk(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone===`local`?-Dk(Ok(e)).getTimezoneOffset():this.timeZone===`UTC`?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ok(e)):null}toDate(e,t){return this.timeZone===`local`?Dk(Ok(e)):this.timeZone===`UTC`?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ok(e))*1e3*60):new Date(e.valueOf()-(t||0))}},PA=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,n;if(typeof e==`object`&&e){for(n in t=Object.assign({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||``}getIconClass(e,t){let n;return n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e],n?`${this.baseIconClass} ${n}`:``}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:``}};PA.prototype.classes={},PA.prototype.iconClasses={},PA.prototype.baseIconClass=``,PA.prototype.iconOverridePrefix=``;function FA(e){e();let t=X.debounceRendering,n=[];function r(e){n.push(e)}for(X.debounceRendering=r,wD(Z(IA,{}),document.createElement(`div`));n.length;)n.shift()();X.debounceRendering=t}var IA=class extends sD{render(){return Z(`div`,{})}componentDidMount(){this.setState({})}};function LA(e){let t=TD(e),n=t.Provider;return t.Provider=function(){let e=!this.getChildContext,t=n.apply(this,arguments);if(e){let e=[];this.shouldComponentUpdate=t=>{this.props.value!==t.value&&e.forEach(e=>{e.context=t.value,e.forceUpdate()})},this.sub=t=>{e.push(t);let n=t.componentWillUnmount;t.componentWillUnmount=()=>{e.splice(e.indexOf(t),1),n&&n.call(t)}}}return t},t}var RA=class{constructor(e,t,n,r){this.execFunc=e,this.emitter=t,this.scrollTime=n,this.scrollTimeReset=r,this.handleScrollRequest=e=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},e),this.drain()},t.on(`_scrollRequest`,this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off(`_scrollRequest`,this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},zA=LA({});function BA(e,t,n,r,i,a,o,s,c,l,u,d,f,p){return{dateEnv:i,nowManager:a,options:n,pluginHooks:s,emitter:u,dispatch:c,getCurrentData:l,calendarApi:d,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:n.direction===`rtl`,addResizeHandler(e){u.on(`_resize`,e)},removeResizeHandler(e){u.off(`_resize`,e)},createScrollResponder(e){return new RA(e,u,XO(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:f,unregisterInteractiveComponent:p}}var VA=class extends sD{shouldComponentUpdate(e,t){return!TA(this.props,e,this.propEquality)||!TA(this.state,t,this.stateEquality)}safeSetState(e){TA(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};VA.addPropsEquality=UA,VA.addStateEquality=WA,VA.contextType=zA,VA.prototype.propEquality={},VA.prototype.stateEquality={};var HA=class extends VA{};HA.contextType=zA;function UA(e){let t=Object.create(this.prototype.propEquality);Object.assign(t,e),this.prototype.propEquality=t}function WA(e){let t=Object.create(this.prototype.stateEquality);Object.assign(t,e),this.prototype.stateEquality=t}function GA(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var KA=class extends HA{constructor(){super(...arguments),this.id=BO(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{let{options:t}=this.context,{generatorName:n}=this.props;t.customRenderingReplaces&&qA(n,t)||this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&GA(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:n}=t,{customGenerator:r,defaultGenerator:i,renderProps:a}=e,o=JA(e,[],this.handleEl),s=!1,c,l=[],u;if(r!=null){let e=typeof r==`function`?r(a,Z):r;if(e===!0)s=!0;else{let t=e&&typeof e==`object`;t&&`html`in e?o.dangerouslySetInnerHTML={__html:e.html}:t&&`domNodes`in e?l=Array.prototype.slice.call(e.domNodes):(t?HE(e):typeof e!=`function`)?c=e:u=e}}else s=!qA(e.generatorName,n);return s&&i&&(c=i(a)),this.queuedDomNodes=l,this.currentGeneratorMeta=u,Z(e.elTag,o,c)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){let{props:t,context:n}=this,{handleCustomRendering:r,customRenderingMetaMap:i}=n.options;if(r){let n=this.currentGeneratorMeta??i?.[t.generatorName];n&&r(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:n},t),{elClasses:(t.elClasses||[]).filter(YA)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,n=this.base;if(!ok(e,t)){t.forEach(wO);for(let t of e)n.appendChild(t);this.currentDomNodes=e}}};KA.addPropsEquality({elClasses:ok,elStyle:xA,elAttrs:CA,renderProps:xA});function qA(e,t){return!!(t.handleCustomRendering&&e&&t.customRenderingMetaMap?.[e])}function JA(e,t,n){let r=Object.assign(Object.assign({},e.elAttrs),{ref:n});return(e.elClasses||t)&&(r.className=(e.elClasses||[]).concat(t||[]).concat(r.className||[]).filter(Boolean).join(` `)),e.elStyle&&(r.style=e.elStyle),r}function YA(e){return!!e}var XA=LA(0),ZA=class extends sD{constructor(){super(...arguments),this.InnerContent=QA.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(GA(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){let{props:e}=this,t=$A(e.classNameGenerator,e.renderProps);if(e.children){let n=JA(e,t,this.handleEl),r=e.children(this.InnerContent,e.renderProps,n);return e.elTag?Z(e.elTag,n,r):r}return Z(KA,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||`div`,elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;this.el?(t=(e=this.props).didMount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)==null||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}};ZA.contextType=XA;function QA(e,t){let n=e.props;return Z(KA,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:e.context},t))}function $A(e,t){let n=typeof e==`function`?e(t):e||[];return typeof n==`string`?[n]:n}var ej=class extends HA{render(){let{props:e,context:t}=this,{options:n}=t,r={view:t.viewApi};return Z(ZA,{elRef:e.elRef,elTag:e.elTag||`div`,elAttrs:e.elAttrs,elClasses:[...tj(e.viewSpec),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,classNameGenerator:n.viewClassNames,generatorName:void 0,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount},()=>e.children)}};function tj(e){return[`fc-${e.type}-view`,`fc-view`]}function nj(e,t){let n=null,r=null;return e.start&&(n=t.createMarker(e.start)),e.end&&(r=t.createMarker(e.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function rj(e,t){let n=[],{start:r}=t,i,a;for(e.sort(ij),i=0;i<e.length;i+=1)a=e[i],a.start>r&&n.push({start:r,end:a.start}),a.end>r&&(r=a.end);return r<t.end&&n.push({start:r,end:t.end}),n}function ij(e,t){return e.start.valueOf()-t.start.valueOf()}function aj(e,t){let{start:n,end:r}=e,i=null;return t.start!==null&&(n=n===null?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),t.end!=null&&(r=r===null?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function oj(e,t){return(e.end===null||t.start===null||e.end>t.start)&&(e.start===null||t.end===null||e.start<t.end)}function sj(e,t){return(e.start===null||t>=e.start)&&(e.end===null||t<e.end)}function cj(e,t){return t.start!=null&&e<t.start?t.start:t.end!=null&&e>=t.end?new Date(t.end.valueOf()-1):e}function lj(e){let t=Math.floor(fk(e.start,e.end))||1,n=yk(e.start);return{start:n,end:lk(n,t)}}function uj(e,t=XO(0)){let n=null,r=null;if(e.end){r=yk(e.end);let n=e.end.valueOf()-r.valueOf();n&&n>=ik(t)&&(r=lk(r,1))}return e.start&&(n=yk(e.start),r&&r<=n&&(r=lk(n,1))),{start:n,end:r}}function dj(e,t,n,r){return r===`year`?XO(n.diffWholeYears(e,t),`year`):r===`month`?XO(n.diffWholeMonths(e,t),`month`):gk(e,t)}var fj=class{constructor(e){this.props=e,this.initHiddenDays()}buildPrev(e,t,n){let{dateEnv:r}=this.props,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)}buildNext(e,t,n){let{dateEnv:r}=this.props,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)}build(e,t,n=!0){let{props:r}=this,i,a,o,s,c,l;return i=this.buildValidRange(),i=this.trimHiddenDays(i),n&&(e=cj(e,i)),a=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(a.unit),s=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),s=this.trimHiddenDays(s),c=s,r.showNonCurrentDates||(c=aj(c,a.range)),c=this.adjustActiveRange(c),c=aj(c,i),l=oj(a.range,i),sj(s,e)||(e=s.start),{currentDate:e,validRange:i,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:c,renderRange:s,slotMinTime:r.slotMinTime,slotMaxTime:r.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e==`function`?e.call(this.props.calendarApi,this.props.dateEnv.toDate(this.props.nowManager.getDateMarker())):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:n}=this,r=null,i=null,a=null,o;return n.duration?(r=n.duration,i=n.durationUnit,a=this.buildRangeFromDuration(e,t,r,i)):(o=this.props.dayCount)?(i=`day`,a=this.buildRangeFromDayCount(e,t,o)):(a=this.buildCustomVisibleRange(e))?i=n.dateEnv.greatestWholeUnit(a.start,a.end).unit:(r=this.getFallbackDuration(),i=ak(r).unit,a=this.buildRangeFromDuration(e,t,r,i)),{duration:r,unit:i,range:a}}getFallbackDuration(){return XO({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:n,slotMinTime:r,slotMaxTime:i}=this.props,{start:a,end:o}=e;return n&&(rk(r)<0&&(a=yk(a),a=t.add(a,r)),rk(i)>1&&(o=yk(o),o=lk(o,-1),o=t.add(o,i))),{start:a,end:o}}buildRangeFromDuration(e,t,n,r){let{dateEnv:i,dateAlignment:a}=this.props,o,s,c;if(!a){let{dateIncrement:e}=this.props;a=e&&ik(e)<ik(n)?ak(e).unit:r}rk(n)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,t),o=yk(o));function l(){o=i.startOf(e,a),s=i.add(o,n),c={start:o,end:s}}return l(),this.trimHiddenDays(c)||(e=this.skipHiddenDays(e,t),l()),c}buildRangeFromDayCount(e,t,n){let{dateEnv:r,dateAlignment:i}=this.props,a=0,o=e,s;i&&(o=r.startOf(o,i)),o=yk(o),o=this.skipHiddenDays(o,t),s=o;do s=lk(s,1),this.isHiddenDay(s)||(a+=1);while(a<n);return{start:o,end:s}}buildCustomVisibleRange(e){let{props:t}=this,n=t.visibleRangeInput,r=typeof n==`function`?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,i=this.refineRange(r);return i&&(i.start==null||i.end==null)?null:i}buildRenderRange(e,t,n){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,n;return t||((n=this.props.dateAlignment)?XO(1,n):e||XO({days:1}))}refineRange(e){if(e){let t=nj(e,this.props.dateEnv);return t&&=uj(t),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],n=0,r;for(this.props.weekends===!1&&e.push(0,6),r=0;r<7;r+=1)(t[r]=e.indexOf(r)!==-1)||(n+=1);if(!n)throw Error(`invalid hiddenDays`);this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:n}=e;return t&&=this.skipHiddenDays(t),n&&=this.skipHiddenDays(n,-1,!0),t==null||n==null||t<n?{start:t,end:n}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,n=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=lk(e,t);return e}};function pj(e,t,n,r){return{instanceId:BO(),defId:e,range:t,forcedStartTzo:n??null,forcedEndTzo:r??null}}function mj(e,t,n,r){for(let i=0;i<r.length;i+=1){let a=r[i].parse(e,n);if(a){let{allDay:n}=e;return n??(n=t,n??(n=a.allDayGuess,n??=!1)),{allDay:n,duration:a.duration,typeData:a.typeData,typeId:i}}}return null}function hj(e,t,n){let{dateEnv:r,pluginHooks:i,options:a}=n,{defs:o,instances:s}=e;s=_A(s,e=>!o[e.defId].recurringDef);for(let e in o){let n=o[e];if(n.recurringDef){let{duration:o}=n.recurringDef;o||=n.allDay?a.defaultAllDayEventDuration:a.defaultTimedEventDuration;let c=gj(n,o,t,r,i.recurringTypes);for(let t of c){let n=pj(e,{start:t,end:r.add(t,o)});s[n.instanceId]=n}}}return{defs:o,instances:s}}function gj(e,t,n,r,i){let a=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(a=a.map(yk)),a}var _j={id:String,groupId:String,title:String,url:String,interactive:Boolean},vj={start:$,end:$,date:$,allDay:Boolean},yj=Object.assign(Object.assign(Object.assign({},_j),vj),{extendedProps:$});function bj(e,t,n,r,i=Sj(n),a,o){let{refined:s,extra:c}=xj(e,n,i),l=Tj(t,n),u=mj(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u){let e=Cj(s,c,t?t.sourceId:``,u.allDay,!!u.duration,n,a);return e.recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:e,instance:null}}let d=wj(s,l,n,r);if(d){let e=Cj(s,c,t?t.sourceId:``,d.allDay,d.hasEnd,n,a),r=pj(e.defId,d.range,d.forcedStartTzo,d.forcedEndTzo);return o&&e.publicId&&o[e.publicId]&&(r.instanceId=o[e.publicId]),{def:e,instance:r}}return null}function xj(e,t,n=Sj(t)){return mA(e,n)}function Sj(e){return Object.assign(Object.assign(Object.assign({},Ij),yj),e.pluginHooks.eventRefiners)}function Cj(e,t,n,r,i,a,o){let s={title:e.title||``,groupId:e.groupId||``,publicId:e.id||``,url:e.url||``,recurringDef:null,defId:(o&&e.id?o[e.id]:``)||BO(),sourceId:n,allDay:r,hasEnd:i,interactive:e.interactive,ui:Rj(e,a),extendedProps:Object.assign(Object.assign({},e.extendedProps||{}),t)};for(let t of a.pluginHooks.eventDefMemberAdders)Object.assign(s,t(e));return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function wj(e,t,n,r){let{allDay:i}=e,a,o=null,s=!1,c,l=null,u=e.start==null?e.date:e.start;if(a=n.dateEnv.createMarkerMeta(u),a)o=a.marker;else if(!r)return null;return e.end!=null&&(c=n.dateEnv.createMarkerMeta(e.end)),i??=t??((!a||a.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=yk(o)),c&&(l=c.marker,i&&(l=yk(l)),o&&l<=o&&(l=null)),l?s=!0:r||(s=n.options.forceEventDuration||!1,l=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:s,range:{start:o,end:l},forcedStartTzo:a?a.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function Tj(e,t){let n=null;return e&&(n=e.defaultAllDay),n??=t.options.defaultAllDay,n}function Ej(e,t,n,r,i,a){let o=Aj(),s=Sj(n);for(let c of e){let e=bj(c,t,n,r,s,i,a);e&&Dj(e,o)}return o}function Dj(e,t=Aj()){return t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Oj(e,t){let n=e.instances[t];if(n){let t=e.defs[n.defId],r=Mj(e,e=>kj(t,e));return r.defs[t.defId]=t,r.instances[n.instanceId]=n,r}return Aj()}function kj(e,t){return!!(e.groupId&&e.groupId===t.groupId)}function Aj(){return{defs:{},instances:{}}}function jj(e,t){return{defs:Object.assign(Object.assign({},e.defs),t.defs),instances:Object.assign(Object.assign({},e.instances),t.instances)}}function Mj(e,t){let n=_A(e.defs,t);return{defs:n,instances:_A(e.instances,e=>n[e.defId])}}function Nj(e,t){let{defs:n,instances:r}=e,i={},a={};for(let e in n)t.defs[e]||(i[e]=n[e]);for(let e in r)!t.instances[e]&&i[r[e].defId]&&(a[e]=r[e]);return{defs:i,instances:a}}function Pj(e,t){return Array.isArray(e)?Ej(e,null,t,!0):typeof e==`object`&&e?Ej([e],null,t,!0):e==null?null:String(e)}function Fj(e){return Array.isArray(e)?e:typeof e==`string`?e.split(/\s+/):[]}var Ij={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:$,overlap:$,allow:$,className:Fj,classNames:Fj,color:String,backgroundColor:String,borderColor:String,textColor:String},Lj={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]};function Rj(e,t){let n=Pj(e.constraint,t);return{display:e.display||null,startEditable:e.startEditable==null?e.editable:e.startEditable,durationEditable:e.durationEditable==null?e.editable:e.durationEditable,constraints:n==null?[]:[n],overlap:e.overlap==null?null:e.overlap,allows:e.allow==null?[]:[e.allow],backgroundColor:e.backgroundColor||e.color||``,borderColor:e.borderColor||e.color||``,textColor:e.textColor||``,classNames:(e.className||[]).concat(e.classNames||[])}}function zj(e){return e.reduce(Bj,Lj)}function Bj(e,t){return{display:t.display==null?e.display:t.display,startEditable:t.startEditable==null?e.startEditable:t.startEditable,durationEditable:t.durationEditable==null?e.durationEditable:t.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:typeof t.overlap==`boolean`?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Vj={id:String,defaultAllDay:Boolean,url:String,format:String,events:$,eventDataTransform:$,success:$,failure:$};function Hj(e,t,n=Uj(t)){let r;if(typeof e==`string`?r={url:e}:typeof e==`function`||Array.isArray(e)?r={events:e}:typeof e==`object`&&e&&(r=e),r){let{refined:i,extra:a}=mA(r,n),o=Wj(i,t);if(o)return{_raw:e,isFetching:!1,latestFetchId:``,fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||``,sourceId:BO(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Rj(i,t),extendedProps:a}}return null}function Uj(e){return Object.assign(Object.assign(Object.assign({},Ij),Vj),e.pluginHooks.eventSourceRefiners)}function Wj(e,t){let n=t.pluginHooks.eventSourceDefs;for(let t=n.length-1;t>=0;--t){let r=n[t].parseMeta(e);if(r)return{sourceDefId:t,meta:r}}return null}function Gj(e,t,n,r,i){switch(t.type){case`RECEIVE_EVENTS`:return Kj(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case`RESET_RAW_EVENTS`:return qj(e,n[t.sourceId],t.rawEvents,r.activeRange,i);case`ADD_EVENTS`:return Xj(e,t.eventStore,r?r.activeRange:null,i);case`RESET_EVENTS`:return t.eventStore;case`MERGE_EVENTS`:return jj(e,t.eventStore);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return r?hj(e,r.activeRange,i):e;case`REMOVE_EVENTS`:return Nj(e,t.eventStore);case`REMOVE_EVENT_SOURCE`:return Qj(e,t.sourceId);case`REMOVE_ALL_EVENT_SOURCES`:return Mj(e,e=>!e.sourceId);case`REMOVE_ALL_EVENTS`:return Aj();default:return e}}function Kj(e,t,n,r,i,a){if(t&&n===t.latestFetchId){let n=Ej(Jj(i,t,a),t,a);return r&&(n=hj(n,r,a)),jj(Qj(e,t.sourceId),n)}return e}function qj(e,t,n,r,i){let{defIdMap:a,instanceIdMap:o}=$j(e);return hj(Ej(Jj(n,t,i),t,i,!1,a,o),r,i)}function Jj(e,t,n){let r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Yj(e,i)),r&&(e=Yj(e,r)),e}function Yj(e,t){let n;if(!t)n=e;else{n=[];for(let r of e){let e=t(r);e?n.push(e):e??n.push(r)}}return n}function Xj(e,t,n,r){return n&&(t=hj(t,n,r)),jj(e,t)}function Zj(e,t,n){let{defs:r}=e;return{defs:r,instances:vA(e.instances,e=>r[e.defId].allDay?e:Object.assign(Object.assign({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo}))}}function Qj(e,t){return Mj(e,e=>e.sourceId!==t)}function $j(e){let{defs:t,instances:n}=e,r={},i={};for(let e in t){let{publicId:n}=t[e];n&&(r[n]=e)}for(let e in n){let{publicId:r}=t[n[e].defId];r&&(i[r]=e)}return{defIdMap:r,instanceIdMap:i}}var eM=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){tM(this.handlers,e,t)}off(e,t){nM(this.handlers,e,t)}trigger(e,...t){let n=this.handlers[e]||[],r=this.options&&this.options[e],i=[].concat(r||[],n);for(let e of i)e.apply(this.thisContext,t)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function tM(e,t,n){(e[t]||(e[t]=[])).push(n)}function nM(e,t,n){n?e[t]&&(e[t]=e[t].filter(e=>e!==n)):delete e[t]}var rM={startTime:`09:00`,endTime:`17:00`,daysOfWeek:[1,2,3,4,5],display:`inverse-background`,classNames:`fc-non-business`,groupId:`_businessHours`};function iM(e,t){return Ej(aM(e),null,t)}function aM(e){let t;return t=e===!0?[{}]:Array.isArray(e)?e.filter(e=>e.daysOfWeek):typeof e==`object`&&e?[e]:[],t=t.map(e=>Object.assign(Object.assign({},rM),e)),t}function oM(e,t,n){n.emitter.trigger(`select`,Object.assign(Object.assign({},cM(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function sM(e,t){t.emitter.trigger(`unselect`,{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}function cM(e,t){let n={};for(let r of t.pluginHooks.dateSpanTransforms)Object.assign(n,r(e,t));return Object.assign(n,FM(e,t.dateEnv)),n}function lM(e,t,n){let{dateEnv:r,options:i}=n,a=t;return e?(a=yk(a),a=r.add(a,i.defaultAllDayEventDuration)):a=r.add(a,i.defaultTimedEventDuration),a}function uM(e,t,n,r){let i=bM(e.defs,t),a=Aj();for(let t in e.defs){let o=e.defs[t];a.defs[t]=dM(o,i[t],n,r)}for(let t in e.instances){let o=e.instances[t],s=a.defs[o.defId];a.instances[t]=fM(o,s,i[o.defId],n,r)}return a}function dM(e,t,n,r){let i=n.standardProps||{};i.hasEnd==null&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let a=Object.assign(Object.assign(Object.assign({},e),i),{ui:Object.assign(Object.assign({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=Object.assign(Object.assign({},a.extendedProps),n.extendedProps));for(let e of r.pluginHooks.eventDefMutationAppliers)e(a,n,r);return!a.hasEnd&&r.options.forceEventDuration&&(a.hasEnd=!0),a}function fM(e,t,n,r,i){let{dateEnv:a}=i,o=r.standardProps&&r.standardProps.allDay===!0,s=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},e);return o&&(c.range=lj(c.range)),r.datesDelta&&n.startEditable&&(c.range={start:a.add(c.range.start,r.datesDelta),end:a.add(c.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(c.range={start:a.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:a.add(c.range.end,r.endDelta)}),s&&(c.range={start:c.range.start,end:lM(t.allDay,c.range.start,i)}),t.allDay&&(c.range={start:yk(c.range.start),end:yk(c.range.end)}),c.range.end<c.range.start&&(c.range.end=lM(t.allDay,c.range.start,i)),c}var pM=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:`FETCH_EVENT_SOURCES`,sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},mM=class e{constructor(e,t,n){this._context=e,this._def=t,this._instance=n||null}setProp(e,t){if(e in vj)console.warn(`Could not set date-related prop 'name'. Use one of the date-related methods instead.`);else if(e===`id`)t=_j[e](t),this.mutate({standardProps:{publicId:t}});else if(e in _j)t=_j[e](t),this.mutate({standardProps:{[e]:t}});else if(e in Ij){let n=Ij[e](t);n=e===`color`?{backgroundColor:t,borderColor:t}:e===`editable`?{startEditable:t,durationEditable:t}:{[e]:t},this.mutate({standardProps:{ui:n}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:n}=this._context,r=n.createMarker(e);if(r&&this._instance){let e=this._instance.range,i=dj(e.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}}setEnd(e,t={}){let{dateEnv:n}=this._context,r;if(!(e!=null&&(r=n.createMarker(e),!r))&&this._instance){if(r){let e=dj(this._instance.range.end,r,n,t.granularity);this.mutate({endDelta:e})}else this.mutate({standardProps:{hasEnd:!1}})}}setDates(e,t,n={}){let{dateEnv:r}=this._context,i={allDay:n.allDay},a=r.createMarker(e),o;if(a&&!(t!=null&&(o=r.createMarker(t),!o))&&this._instance){let e=this._instance.range;n.allDay===!0&&(e=lj(e));let t=dj(e.start,a,r,n.granularity);if(o){let a=dj(e.end,o,r,n.granularity);$O(t,a)?this.mutate({datesDelta:t,standardProps:i}):this.mutate({startDelta:t,endDelta:a,standardProps:i})}else i.hasEnd=!1,this.mutate({datesDelta:t,standardProps:i})}}moveStart(e){let t=XO(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=XO(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=XO(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let n={allDay:e},{maintainDuration:r}=t;r??=this._context.options.allDayMaintainDuration,this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})}formatRange(e){let{dateEnv:t}=this._context,n=this._instance,r=iA(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})}mutate(t){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:a}=i.getCurrentData(),o=Oj(a,n.instanceId);o=uM(o,{"":{display:``,startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:``,borderColor:``,textColor:``,classNames:[]}},t,i);let s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:`MERGE_EVENTS`,eventStore:o}),i.emitter.trigger(`eventChange`,{oldEvent:s,event:this,relatedEvents:gM(o,i,n),revert(){i.dispatch({type:`RESET_EVENTS`,eventStore:a})}})}}remove(){let e=this._context,t=hM(this);e.dispatch({type:`REMOVE_EVENTS`,eventStore:t}),e.emitter.trigger(`eventRemove`,{event:this,relatedEvents:[],revert(){e.dispatch({type:`MERGE_EVENTS`,eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new pM(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):``}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):``}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||`auto`}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:n}=t,{startStr:r,endStr:i}=this,a={allDay:t.allDay};return t.title&&(a.title=t.title),r&&(a.start=r),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&n.display!==`auto`&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,t.extendedProps):a.extendedProps=t.extendedProps),a}toJSON(){return this.toPlainObject()}};function hM(e){let t=e._def,n=e._instance;return{defs:{[t.defId]:t},instances:n?{[n.instanceId]:n}:{}}}function gM(e,t,n){let{defs:r,instances:i}=e,a=[],o=n?n.instanceId:``;for(let e in i){let n=i[e],s=r[n.defId];n.instanceId!==o&&a.push(new mM(t,s,n))}return a}function _M(e,t,n,r){let i={},a={},o={},s=[],c=[],l=bM(e.defs,t);for(let t in e.defs){let n=e.defs[t];l[n.defId].display===`inverse-background`&&(n.groupId?(i[n.groupId]=[],o[n.groupId]||(o[n.groupId]=n)):a[t]=[])}for(let t in e.instances){let o=e.instances[t],u=e.defs[o.defId],d=l[u.defId],f=o.range,p=!u.allDay&&r?uj(f,r):f,m=aj(p,n);m&&(d.display===`inverse-background`?u.groupId?i[u.groupId].push(m):a[o.defId].push(m):d.display!==`none`&&(d.display===`background`?s:c).push({def:u,ui:d,instance:o,range:m,isStart:p.start&&p.start.valueOf()===m.start.valueOf(),isEnd:p.end&&p.end.valueOf()===m.end.valueOf()}))}for(let e in i){let t=i[e],r=rj(t,n);for(let t of r){let n=o[e],r=l[n.defId];s.push({def:n,ui:r,instance:null,range:t,isStart:!1,isEnd:!1})}}for(let t in a){let r=a[t],i=rj(r,n);for(let n of i)s.push({def:e.defs[t],ui:l[t],instance:null,range:n,isStart:!1,isEnd:!1})}return{bg:s,fg:c}}function vM(e,t){e.fcSeg=t}function yM(e){return e.fcSeg||e.parentNode.fcSeg||null}function bM(e,t){return vA(e,e=>xM(e,t))}function xM(e,t){let n=[];return t[``]&&n.push(t[``]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),zj(n)}function SM(e,t){let n=e.map(CM);return n.sort((e,n)=>HO(e,n,t)),n.map(e=>e._seg)}function CM(e){let{eventRange:t}=e,n=t.def,r=t.instance?t.instance.range:t.range,i=r.start?r.start.valueOf():0,a=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function wM(e,t){let{pluginHooks:n}=t,r=n.isDraggableTransformers,{def:i,ui:a}=e.eventRange,o=a.startEditable;for(let e of r)o=e(o,i,a,t);return o}function TM(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function EM(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function DM(e,t,n,r,i,a,o){let{dateEnv:s,options:c}=n,{displayEventTime:l,displayEventEnd:u}=c,d=e.eventRange.def,f=e.eventRange.instance;l??=r!==!1,u??=i!==!1;let p=f.range.start,m=f.range.end,h=a||e.start||e.eventRange.range.start,g=o||e.end||e.eventRange.range.end,_=yk(p).valueOf()===yk(h).valueOf(),v=yk(uk(m,-1)).valueOf()===yk(uk(g,-1)).valueOf();return l&&!d.allDay&&(_||v)?(h=_?p:h,g=v?m:g,u&&d.hasEnd?s.formatRange(h,g,t,{forcedStartTzo:a?null:f.forcedStartTzo,forcedEndTzo:o?null:f.forcedEndTzo}):s.format(h,t,{forcedTzo:a?null:f.forcedStartTzo})):``}function OM(e,t,n){let r=e.eventRange.range;return{isPast:r.end<=(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sj(t,r.start)}}function kM(e){let t=[`fc-event`];return e.isMirror&&t.push(`fc-event-mirror`),e.isDraggable&&t.push(`fc-event-draggable`),(e.isStartResizable||e.isEndResizable)&&t.push(`fc-event-resizable`),e.isDragging&&t.push(`fc-event-dragging`),e.isResizing&&t.push(`fc-event-resizing`),e.isSelected&&t.push(`fc-event-selected`),e.isStart&&t.push(`fc-event-start`),e.isEnd&&t.push(`fc-event-end`),e.isPast&&t.push(`fc-event-past`),e.isToday&&t.push(`fc-event-today`),e.isFuture&&t.push(`fc-event-future`),t}function AM(e){return e.instance?e.instance.instanceId:`${e.def.defId}:${e.range.start.toISOString()}`}function jM(e,t){let{def:n,instance:r}=e.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:a,options:o}=t,{eventInteractive:s}=o;return s??(s=n.interactive,s??=!!a.hasHandlers(`eventClick`)),s?RO(e=>{a.trigger(`eventClick`,{el:e.target,event:new mM(t,n,r),jsEvent:e,view:t.viewApi})}):{}}var MM={start:$,end:$,allDay:Boolean};function NM(e,t,n){let r=PM(e,t),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=t.add(i.start,n)}return r}function PM(e,t){let{refined:n,extra:r}=mA(e,MM),i=n.start?t.createMarkerMeta(n.start):null,a=n.end?t.createMarkerMeta(n.end):null,{allDay:o}=n;return o??=i&&i.isTimeUnspecified&&(!a||a.isTimeUnspecified),Object.assign({range:{start:i?i.marker:null,end:a?a.marker:null},allDay:o},r)}function FM(e,t){return Object.assign(Object.assign({},LM(e.range,t,e.allDay)),{allDay:e.allDay})}function IM(e,t,n){return Object.assign(Object.assign({},LM(e,t,n)),{timeZone:t.timeZone})}function LM(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function RM(e,t,n){let r=xj({editable:!1},n),i=Cj(r.refined,r.extra,``,e.allDay,!0,n);return{def:i,ui:xM(i,t),instance:pj(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function zM(e,t,n){let r=!1,i=function(e){r||(r=!0,t(e))},a=function(e){r||(r=!0,n(e))},o=e(i,a);o&&typeof o.then==`function`&&o.then(i,a)}var BM=class extends Error{constructor(e,t){super(e),this.response=t}};function VM(e,t,n){e=e.toUpperCase();let r={method:e};return e===`GET`?t+=(t.indexOf(`?`)===-1?`?`:`&`)+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":`application/x-www-form-urlencoded`}),fetch(t,r).then(e=>{if(e.ok)return e.json().then(t=>[t,e],()=>{throw new BM(`Failure parsing JSON`,e)});throw new BM(`Request failed`,e)})}var HM;function UM(){return HM??=WM(),HM}function WM(){if(typeof document>`u`)return!0;let e=document.createElement(`div`);e.style.position=`absolute`,e.style.top=`0px`,e.style.left=`0px`,e.innerHTML=`<table><tr><td><div></div></td></tr></table>`,e.querySelector(`table`).style.height=`100px`,e.querySelector(`div`).style.height=`100%`,document.body.appendChild(e);let t=e.querySelector(`div`).offsetHeight>0;return document.body.removeChild(e),t}var GM=class extends HA{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{FA(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{FA(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:t}=e,{forPrint:n}=this.state,r=n||t.height===`auto`||t.contentHeight===`auto`,i=!r&&t.height!=null?t.height:``,a=[`fc`,n?`fc-media-print`:`fc-media-screen`,`fc-direction-${t.direction}`,e.theme.getClass(`root`)];return UM()||a.push(`fc-liquid-hack`),e.children(a,i,r,n)}componentDidMount(){let{emitter:e}=this.props;e.on(`_beforeprint`,this.handleBeforePrint),e.on(`_afterprint`,this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off(`_beforeprint`,this.handleBeforePrint),e.off(`_afterprint`,this.handleAfterPrint)}},KM=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function qM(e,t){return{component:e,el:t.el,useEventCenter:t.useEventCenter==null||t.useEventCenter,isHitComboAllowed:t.isHitComboAllowed||null}}var JM={},YM=class extends sD{constructor(e,t){super(e,t),this.handleRefresh=()=>{let e=this.computeTiming();e.state.nowDate.valueOf()!==this.state.nowDate.valueOf()&&this.setState(e.state),this.clearTimeout(),this.setTimeout(e.waitMs)},this.handleVisibilityChange=()=>{document.hidden||this.handleRefresh()},this.state=this.computeTiming().state}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout(),this.context.nowManager.addResetListener(this.handleRefresh),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout(),this.context.nowManager.removeResetListener(this.handleRefresh),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange)}computeTiming(){let{props:e,context:t}=this,n=t.nowManager.getDateMarker(),{nowIndicatorSnap:r}=t.options;r===`auto`&&(r=/year|month|week|day/.test(e.unit)||(e.unitValue||1)===1);let i,a;return r?(i=t.dateEnv.startOf(n,e.unit),a=t.dateEnv.add(i,XO(1,e.unit)).valueOf()-n.valueOf()):(i=n,a=6e4),a=Math.min(864e5,a),{state:{nowDate:i,todayRange:XM(i)},waitMs:a}}setTimeout(e=this.computeTiming().waitMs){this.timeoutId=setTimeout(()=>{let e=this.computeTiming();this.setState(e.state,()=>{this.setTimeout(e.waitMs)})},e)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};YM.contextType=zA;function XM(e){let t=yk(e);return{start:t,end:lk(t,1)}}var ZM=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger(`_resize`,!0)}setOption(e,t){this.dispatch({type:`SET_OPTION`,optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:n}=this;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t){if(t.start&&t.end)this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e}),this.dispatch({type:`SET_OPTION`,optionName:`visibleRange`,rawOptionValue:t});else{let{dateEnv:n}=this.getCurrentData();this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e,dateMarker:n.createMarker(t)})}}else this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:e})})}zoomTo(e,t){let n=this.getCurrentData(),r;t||=`day`,r=n.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),r?this.dispatch({type:`CHANGE_VIEW_TYPE`,viewType:r.type,dateMarker:e}):this.dispatch({type:`CHANGE_DATE`,dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:n}=this.getCurrentData(),r=[].concat(n.header?n.header.viewsWithButtons:[],n.footer?n.footer.viewsWithButtons:[]),i,a;for(let e in t)r.push(e);for(i=0;i<r.length;i+=1)if(a=t[r[i]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:`PREV`})}next(){this.unselect(),this.dispatch({type:`NEXT`})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:e.nowManager.getDateMarker()})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),n=XO(e);n&&(this.unselect(),this.dispatch({type:`CHANGE_DATE`,dateMarker:t.dateEnv.add(t.currentDate,n)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:n}=this.getCurrentData();return n.format(n.createMarker(e),iA(t))}formatRange(e,t,n){let{dateEnv:r}=this.getCurrentData();return r.formatRange(r.createMarker(e),r.createMarker(t),iA(n),n)}formatIso(e,t){let{dateEnv:n}=this.getCurrentData();return n.formatIso(n.createMarker(e),{omitTime:t})}select(e,t){let n;n=t==null?e.start==null?{start:e,end:null}:e:{start:e,end:t};let r=this.getCurrentData(),i=NM(n,r.dateEnv,XO({days:1}));i&&(this.dispatch({type:`SELECT_DATES`,selection:i}),oM(i,null,r))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:`UNSELECT_DATES`}),sM(e,t))}addEvent(e,t){if(e instanceof mM){let t=e._def,n=e._instance;return this.getCurrentData().eventStore.defs[t.defId]||(this.dispatch({type:`ADD_EVENTS`,eventStore:Dj({def:t,instance:n})}),this.triggerEventAdd(e)),e}let n=this.getCurrentData(),r;if(t instanceof pM)r=t.internalEventSource;else if(typeof t==`boolean`)t&&([r]=bA(n.eventSources));else if(t!=null){let e=this.getEventSourceById(t);if(!e)return console.warn(`Could not find an event source with ID "${t}"`),null;r=e.internalEventSource}let i=bj(e,r,n,!1);if(i){let e=new mM(n,i.def,i.def.recurringDef?null:i.instance);return this.dispatch({type:`ADD_EVENTS`,eventStore:Dj(i)}),this.triggerEventAdd(e),e}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger(`eventAdd`,{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:`REMOVE_EVENTS`,eventStore:hM(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:n,instances:r}=t.eventStore;e=String(e);for(let i in n){let a=n[i];if(a.publicId===e){if(a.recurringDef)return new mM(t,a,null);for(let e in r){let n=r[e];if(n.defId===a.defId)return new mM(t,a,n)}}}return null}getEvents(){let e=this.getCurrentData();return gM(e.eventStore,e)}removeAllEvents(){this.dispatch({type:`REMOVE_ALL_EVENTS`})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,n=[];for(let r in t)n.push(new pM(e,t[r]));return n}getEventSourceById(e){let t=this.getCurrentData(),n=t.eventSources;e=String(e);for(let r in n)if(n[r].publicId===e)return new pM(t,n[r]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof pM)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[e.internalEventSource]}),e;let n=Hj(e,t);return n?(this.dispatch({type:`ADD_EVENT_SOURCES`,sources:[n]}),new pM(t,n)):null}removeAllEventSources(){this.dispatch({type:`REMOVE_ALL_EVENT_SOURCES`})}refetchEvents(){this.dispatch({type:`FETCH_EVENT_SOURCES`,isRefetch:!0})}scrollToTime(e){let t=XO(e);t&&this.trigger(`_scrollRequest`,{time:t})}};function QM(e,t){let n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function $M(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:!(!r||r.activeRange&&sj(r.activeRange,e)),isOther:!(!r||sj(r.currentRange,e)),isToday:!!(t&&sj(t,e)),isPast:!!(n?e<n:t&&e<t.start),isFuture:!!(n?e>n:t&&e>=t.end)}}function eN(e,t){let n=[`fc-day`,`fc-day-${sk[e.dow]}`];return e.isDisabled?n.push(`fc-day-disabled`):(e.isToday&&(n.push(`fc-day-today`),n.push(t.getClass(`today`))),e.isPast&&n.push(`fc-day-past`),e.isFuture&&n.push(`fc-day-future`),e.isOther&&n.push(`fc-day-other`)),n}var tN=iA({year:`numeric`,month:`long`,day:`numeric`}),nN=iA({week:`long`});function rN(e,t,n=`day`,r=!0){let{dateEnv:i,options:a,calendarApi:o}=e,s=i.format(t,n===`week`?nN:tN);if(a.navLinks){let e=i.toDate(t),c=e=>{let r=n===`day`?a.navLinkDayClick:n===`week`?a.navLinkWeekClick:null;typeof r==`function`?r.call(o,i.toDate(t),e):(typeof r==`string`&&(n=r),o.zoomTo(t,n))};return Object.assign({title:KO(a.navLinkHint,[s,e],s),"data-navlink":``},r?LO(c):{onClick:c})}return{"aria-label":s}}var iN;function aN(){return iN||=oN(),iN}function oN(){let e=document.createElement(`div`);e.style.overflow=`scroll`,e.style.position=`absolute`,e.style.top=`-9999px`,e.style.left=`-9999px`,document.body.appendChild(e);let t=sN(e);return document.body.removeChild(e),t}function sN(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function cN(e){let t=lN(e),n=e.getBoundingClientRect();for(let e of t){let t=QM(n,e.getBoundingClientRect());if(t)n=t;else return null}return n}function lN(e){let t=[];for(;e instanceof HTMLElement;){let n=window.getComputedStyle(e);if(n.position===`fixed`)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}var uN=class{constructor(e,t,n,r){this.els=t;let i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}buildElHorizontals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n}buildElVerticals(e){let t=[],n=[];for(let r of this.els){let i=r.getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n}leftToIndex(e){let{lefts:t,rights:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}topToIndex(e){let{tops:t,bottoms:n}=this,r=t.length,i=0;for(;i<r;i+=1)if(e>=t[i]&&e<n[i])return i}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return dN(this.tops||[],e.tops||[])&&dN(this.bottoms||[],e.bottoms||[])&&dN(this.lefts||[],e.lefts||[])&&dN(this.rights||[],e.rights||[])}};function dN(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(Math.round(e[r])!==Math.round(t[r]))return!1;return!0}var fN=class extends HA{constructor(){super(...arguments),this.uid=BO()}prepareHits(){}queryHit(e,t,n,r){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!TO(e,`.fc-event-mirror`)}isValidDateDownEl(e){return!TO(e,`.fc-event:not(.fc-bg-event)`)&&!TO(e,`.fc-more-link`)&&!TO(e,`a[data-navlink]`)&&!TO(e,`.fc-popover`)}},pN=class{constructor(e=e=>e.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let n of e)this.insertEntry(n,t);return t}insertEntry(e,t){let n=this.findInsertion(e);this.isInsertionValid(n,e)?this.insertEntryAt(e,n):this.handleInvalidInsertion(n,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(t)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,n){if(this.allowReslicing&&e.touchingEntry){let r=Object.assign(Object.assign({},t),{span:gN(t.span,e.touchingEntry.span)});n.push(r),this.splitEntry(t,e.touchingEntry,n)}else n.push(t)}splitEntry(e,t,n){let r=e.span,i=t.span;r.start<i.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:r.start,end:i.start}},n),r.end>i.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.end,end:r.end}},n)}insertEntryAt(e,t){let{entriesByLevel:n,levelCoords:r}=this;t.lateral===-1?(_N(r,t.level,t.levelCoord),_N(n,t.level,[e])):_N(n[t.level],t.lateral,e),this.stackCnts[hN(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:n,strictOrder:r,stackCnts:i}=this,a=t.length,o=0,s=-1,c=-1,l=null,u=0;for(let d=0;d<a;d+=1){let a=t[d];if(!r&&a>=o+this.getEntryThickness(e))break;let f=n[d],p,m=vN(f,e.span.start,mN),h=m[0]+m[1];for(;(p=f[h])&&p.span.start<e.span.end;){let e=a+this.getEntryThickness(p);e>o&&(o=e,l=p,s=d,c=h),e===o&&(u=Math.max(u,i[hN(p)]+1)),h+=1}}let d=0;if(l)for(d=s+1;d<a&&t[d]<o;)d+=1;let f=-1;return d<a&&t[d]===o&&(f=vN(n[d],e.span.end,mN)[0]),{touchingLevel:s,touchingLateral:c,touchingEntry:l,stackCnt:u,levelCoord:o,level:d,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,n=e.length,r=[];for(let i=0;i<n;i+=1){let n=e[i],a=t[i];for(let e of n)r.push(Object.assign(Object.assign({},e),{thickness:this.getEntryThickness(e),levelCoord:a}))}return r}};function mN(e){return e.span.end}function hN(e){return e.index+`:`+e.span.start}function gN(e,t){let n=Math.max(e.start,t.start),r=Math.min(e.end,t.end);return n<r?{start:n,end:r}:null}function _N(e,t,n){e.splice(t,0,n)}function vN(e,t,n){let r=0,i=e.length;if(!i||t<n(e[r]))return[0,0];if(t>n(e[i-1]))return[i,0];for(;r<i;){let a=Math.floor(r+(i-r)/2),o=n(e[a]);if(t<o)i=a;else if(t>o)r=a+1;else return[a,1]}return[r,0]}function yN(e,t){return iA(!e||t>10?{weekday:`short`}:t>1?{weekday:`short`,month:`numeric`,day:`numeric`,omitCommas:!0}:{weekday:`long`})}var bN=`fc-col-header-cell`;function xN(e){return e.text}var SN=class extends HA{render(){let{dateEnv:e,options:t,theme:n,viewApi:r}=this.context,{props:i}=this,{date:a,dateProfile:o}=i,s=$M(a,i.todayRange,null,o),c=[bN].concat(eN(s,n)),l=e.format(a,i.dayHeaderFormat),u=!s.isDisabled&&i.colCnt>1?rN(this.context,a):{},d=e.toDate(a);e.namedTimeZoneImpl&&(d=uk(d,36e5));let f=Object.assign(Object.assign(Object.assign({date:d,view:r},i.extraRenderProps),{text:l}),s);return Z(ZA,{elTag:`th`,elClasses:c,elAttrs:Object.assign({role:`columnheader`,colSpan:i.colSpan,"data-date":s.isDisabled?void 0:Nk(a)},i.extraDataAttrs),renderProps:f,generatorName:`dayHeaderContent`,customGenerator:t.dayHeaderContent,defaultGenerator:xN,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},e=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},!s.isDisabled&&Z(e,{elTag:`a`,elAttrs:u,elClasses:[`fc-col-header-cell-cushion`,i.isSticky&&`fc-sticky`]})))}},CN=iA({weekday:`long`}),wN=class extends HA{render(){let{props:e}=this,{dateEnv:t,theme:n,viewApi:r,options:i}=this.context,a=lk(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},s=t.format(a,e.dayHeaderFormat),c=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:r}),e.extraRenderProps),{text:s});return Z(ZA,{elTag:`th`,elClasses:[bN,...eN(o,n),...e.extraClassNames||[]],elAttrs:Object.assign({role:`columnheader`,colSpan:e.colSpan},e.extraDataAttrs),renderProps:c,generatorName:`dayHeaderContent`,customGenerator:i.dayHeaderContent,defaultGenerator:xN,classNameGenerator:i.dayHeaderClassNames,didMount:i.dayHeaderDidMount,willUnmount:i.dayHeaderWillUnmount},n=>Z(`div`,{className:`fc-scrollgrid-sync-inner`},Z(n,{elTag:`a`,elClasses:[`fc-col-header-cell-cushion`,e.isSticky&&`fc-sticky`],elAttrs:{"aria-label":t.format(a,CN)}})))}},TN=class extends HA{constructor(){super(...arguments),this.createDayHeaderFormatter=Q(EN)}render(){let{context:e}=this,{dates:t,dateProfile:n,datesRepDistinctDays:r,renderIntro:i}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,r,t.length);return Z(YM,{unit:`day`},(e,o)=>Z(`tr`,{role:`row`},i&&i(`day`),t.map(e=>r?Z(SN,{key:e.toISOString(),date:e,dateProfile:n,todayRange:o,colCnt:t.length,dayHeaderFormat:a}):Z(wN,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a}))))}};function EN(e,t,n){return e||yN(t,n)}var DN=class{constructor(e,t){let n=e.start,{end:r}=e,i=[],a=[],o=-1;for(;n<r;)t.isHiddenDay(n)?i.push(o+.5):(o+=1,i.push(o),a.push(n)),n=lk(n,1);this.dates=a,this.indices=i,this.cnt=a.length}sliceRange(e){let t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(lk(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return r=Math.ceil(r),i=Math.floor(i),r<=i?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}:null}getDateDayIndex(e){let{indices:t}=this,n=Math.floor(fk(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]}},ON=class{constructor(e,t){let{dates:n}=e,r,i,a;if(t){for(i=n[0].getUTCDay(),r=1;r<n.length&&n[r].getUTCDay()!==i;r+=1);a=Math.ceil(n.length/r)}else a=1,r=n.length;this.rowCnt=a,this.colCnt=r,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let n=[];for(let e=0;e<this.colCnt;e+=1)n.push(this.buildCell(t,e));e.push(n)}return e}buildCell(e,t){let n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,n=this.daySeries.sliceRange(e),r=[];if(n){let{firstIndex:e,lastIndex:i}=n,a=e;for(;a<=i;){let o=Math.floor(a/t),s=Math.min((o+1)*t,i+1);r.push({row:o,firstCol:a%t,lastCol:(s-1)%t,isStart:n.isStart&&a===e,isEnd:n.isEnd&&s-1===i}),a=s}}return r}},kN=class{constructor(){this.sliceBusinessHours=Q(this._sliceBusinessHours),this.sliceDateSelection=Q(this._sliceDateSpan),this.sliceEventStore=Q(this._sliceEventStore),this.sliceEventDrag=Q(this._sliceInteraction),this.sliceEventResize=Q(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,n,r,...i){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,t,n,...i);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,n,a,r,...i),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,n,r,...i),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,t,n,...i),eventResize:this.sliceEventResize(e.eventResize,a,t,n,...i),eventSelection:e.eventSelection}}sliceNowDate(e,t,n,r,...i){return this._sliceDateSpan({range:{start:e,end:uk(e,1)},allDay:!1},t,n,{},r,...i)}_sliceBusinessHours(e,t,n,r,...i){return e?this._sliceEventStore(hj(e,AN(t,!!n),r),{},t,n,...i).bg:[]}_sliceEventStore(e,t,n,r,...i){if(e){let a=_M(e,t,AN(n,!!r),r);return{bg:this.sliceEventRanges(a.bg,i),fg:this.sliceEventRanges(a.fg,i)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,n,r,...i){if(!e)return null;let a=_M(e.mutatedEvents,t,AN(n,!!r),r);return{segs:this.sliceEventRanges(a.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,n,r,i,...a){if(!e)return[];let o=AN(t,!!n),s=aj(e.range,o);if(s){e=Object.assign(Object.assign({},e),{range:s});let t=RM(e,r,i),n=this.sliceRange(e.range,...a);for(let e of n)e.eventRange=t;return n}return[]}sliceEventRanges(e,t){let n=[];for(let r of e)n.push(...this.sliceEventRange(r,t));return n}sliceEventRange(e,t){let n=e.range;this.forceDayIfListItem&&e.ui.display===`list-item`&&(n={start:n.start,end:lk(n.start,1)});let r=this.sliceRange(n,...t);for(let t of r)t.eventRange=e,t.isStart=e.isStart&&t.isStart,t.isEnd=e.isEnd&&t.isEnd;return r}};function AN(e,t){let n=e.activeRange;return t?n:{start:uk(n.start,e.slotMinTime.milliseconds),end:uk(n.end,e.slotMaxTime.milliseconds-864e5)}}var jN=/^(visible|hidden)$/,MN=class extends HA{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,GA(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:n}=e,r=t&&n,i=[`fc-scroller`];return t&&(n?i.push(`fc-scroller-liquid-absolute`):i.push(`fc-scroller-liquid`)),Z(`div`,{ref:this.handleEl,className:i.join(` `),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||``,right:r&&-(e.overcomeRight||0)||``,bottom:r&&-(e.overcomeBottom||0)||``,marginLeft:!r&&-(e.overcomeLeft||0)||``,marginRight:!r&&-(e.overcomeRight||0)||``,marginBottom:!r&&-(e.overcomeBottom||0)||``,maxHeight:e.maxHeight||``}},e.children)}needsXScrolling(){if(jN.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(jN.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:n}=e;for(let e=0;e<n.length;e+=1)if(n[e].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return jN.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return jN.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},NN=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(e,t)=>{let{depths:n,currentMap:r}=this,i=!1,a=!1;e===null?(--n[t],n[t]||(delete r[t],delete this.callbackMap[t],i=!0)):(i=t in r,r[t]=e,n[t]=(n[t]||0)+1,a=!0),this.masterCallback&&(i&&this.masterCallback(null,String(t)),a&&this.masterCallback(e,String(t)))}}createRef(e){let t=this.callbackMap[e];return t||=this.callbackMap[e]=t=>{this.handleValue(t,String(e))},t}collect(e,t,n){return DA(this.currentMap,e,t,n)}getAll(){return bA(this.currentMap)}};function PN(e){let t=DO(e,`.fc-scrollgrid-shrink`),n=0;for(let e of t)n=Math.max(n,JO(e));return Math.ceil(n)}function FN(e,t){return e.liquid&&t.liquid}function IN(e,t){return t.maxHeight!=null||FN(e,t)}function LN(e,t,n,r){let{expandRows:i}=n;return typeof t.content==`function`?t.content(n):Z(`table`,{role:`presentation`,className:[t.tableClassName,e.syncRowHeights?`fc-scrollgrid-sync-table`:``].join(` `),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:``}},n.tableColGroupNode,Z(r?`thead`:`tbody`,{role:`presentation`},typeof t.rowContent==`function`?t.rowContent(n):t.rowContent))}function RN(e,t){return ok(e,t,xA)}function zN(e,t){let n=[];for(let r of e){let e=r.span||1;for(let i=0;i<e;i+=1)n.push(Z(`col`,{style:{width:r.width===`shrink`?BN(t):r.width||``,minWidth:r.minWidth||``}}))}return Z(`colgroup`,{},...n)}function BN(e){return e??4}function VN(e){for(let t of e)if(t.width===`shrink`)return!0;return!1}function HN(e,t){let n=[`fc-scrollgrid`,t.theme.getClass(`table`)];return e&&n.push(`fc-scrollgrid-liquid`),n}function UN(e,t){let n=[`fc-scrollgrid-section`,`fc-scrollgrid-section-${e.type}`,e.className];return t&&e.liquid&&e.maxHeight==null&&n.push(`fc-scrollgrid-section-liquid`),e.isSticky&&n.push(`fc-scrollgrid-section-sticky`),n}function WN(e){return Z(`div`,{className:`fc-scrollgrid-sticky-shim`,style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function GN(e){let{stickyHeaderDates:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}function KN(e){let{stickyFooterScrollbar:t}=e;return(t==null||t===`auto`)&&(t=e.height===`auto`||e.viewHeight===`auto`),t}var qN=class extends HA{constructor(){super(...arguments),this.processCols=Q(e=>e,RN),this.renderMicroColGroup=Q(zN),this.scrollerRefs=new NN,this.scrollerElRefs=new NN(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:n}=this,r=e.sections||[],i=this.processCols(e.cols),a=this.renderMicroColGroup(i,t.shrinkWidth),o=HN(e.liquid,n);e.collapsibleWidth&&o.push(`fc-scrollgrid-collapsible`);let s=r.length,c=0,l,u=[],d=[],f=[];for(;c<s&&(l=r[c]).type===`header`;)u.push(this.renderSection(l,a,!0)),c+=1;for(;c<s&&(l=r[c]).type===`body`;)d.push(this.renderSection(l,a,!1)),c+=1;for(;c<s&&(l=r[c]).type===`footer`;)f.push(this.renderSection(l,a,!0)),c+=1;let p=!UM(),m={role:`rowgroup`};return Z(`table`,{role:`grid`,className:o.join(` `),style:{height:e.height}},!(p||!u.length)&&Z(`thead`,m,...u),!(p||!d.length)&&Z(`tbody`,m,...d),!(p||!f.length)&&Z(`tfoot`,m,...f),p&&Z(`tbody`,m,...u,...d,...f))}renderSection(e,t,n){return`outerContent`in e?Z(tD,{key:e.key},e.outerContent):Z(`tr`,{key:e.key,role:`presentation`,className:UN(e,this.props.liquid).join(` `)},this.renderChunkTd(e,t,e.chunk,n))}renderChunkTd(e,t,n,r){if(`outerContent`in n)return n.outerContent;let{props:i}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:s}=this.state,c=IN(i,e),l=FN(i,e),u=i.liquid?a?`scroll`:c?`auto`:`hidden`:`visible`,d=e.key,f=LN(e,n,{tableColGroupNode:t,tableMinWidth:``,clientWidth:!i.collapsibleWidth&&o[d]!==void 0?o[d]:null,clientHeight:s[d]===void 0?null:s[d],expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},r);return Z(r?`th`:`td`,{ref:n.elRef,role:`presentation`},Z(`div`,{className:`fc-scroller-harness${l?` fc-scroller-harness-liquid`:``}`},Z(MN,{ref:this.scrollerRefs.createRef(d),elRef:this.scrollerElRefs.createRef(d),overflowY:u,overflowX:i.liquid?`hidden`:`visible`,maxHeight:e.maxHeight,liquid:l,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,t){let n=JN(this.props.sections,t);n&&GA(n.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return VN(this.props.cols)?PN(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=aN(),{scrollerRefs:t,scrollerElRefs:n}=this,r=!1,i={},a={};for(let e in t.currentMap){let n=t.currentMap[e];if(n&&n.needsYScrolling()){r=!0;break}}for(let t of this.props.sections){let o=t.key,s=n.currentMap[o];if(s){let t=s.parentNode;i[o]=Math.floor(t.getBoundingClientRect().width-(r?e.y:0)),a[o]=Math.floor(t.getBoundingClientRect().height)}}return{forceYScrollbars:r,scrollerClientWidths:i,scrollerClientHeights:a}}};qN.addStateEquality({scrollerClientWidths:xA,scrollerClientHeights:xA});function JN(e,t){for(let n of e)if(n.key===t)return n;return null}var YN=class extends HA{constructor(){super(...arguments),this.buildPublicEvent=Q((e,t,n)=>new mM(e,t,n)),this.handleEl=e=>{this.el=e,GA(this.props.elRef,e),e&&vM(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{eventRange:i}=r,{ui:a}=i,o={event:this.buildPublicEvent(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&wM(r,t),isStartResizable:!e.disableResizing&&TM(r,t),isEndResizable:!e.disableResizing&&EM(r),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!r.isStart,isEnd:!!r.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return Z(ZA,{elRef:this.handleEl,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:[...kM(o),...r.eventRange.ui.classNames,...e.elClasses||[]],elStyle:e.elStyle,renderProps:o,generatorName:`eventContent`,customGenerator:n.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:n.eventClassNames,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount},e.children)}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&vM(this.el,this.props.seg)}},XN=class extends HA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,{ui:i}=r.eventRange,a=DM(r,n.eventTimeFormat||e.defaultTimeFormat,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Z(YN,Object.assign({},e,{elTag:`a`,elStyle:{borderColor:i.borderColor,backgroundColor:i.backgroundColor},elAttrs:jM(r,t),defaultGenerator:ZN,timeText:a}),(e,t)=>Z(tD,null,Z(e,{elTag:`div`,elClasses:[`fc-event-main`],elStyle:{color:t.textColor}}),!!t.isStartResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-start`}),!!t.isEndResizable&&Z(`div`,{className:`fc-event-resizer fc-event-resizer-end`})))}};XN.addPropsEquality({seg:xA});function ZN(e){return Z(`div`,{className:`fc-event-main-frame`},e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title-container`},Z(`div`,{className:`fc-event-title fc-sticky`},e.event.title||Z(tD,null,`\xA0`))))}var QN=iA({day:`numeric`}),$N=class extends HA{constructor(){super(...arguments),this.refineRenderProps=Ik(tP)}render(){let{props:e,context:t}=this,{options:n}=t,r=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:n.monthStartFormat});return Z(ZA,{elRef:e.elRef,elTag:e.elTag,elAttrs:Object.assign(Object.assign({},e.elAttrs),r.isDisabled?{}:{"data-date":Nk(e.date)}),elClasses:[...eN(r,t.theme),...e.elClasses||[]],elStyle:e.elStyle,renderProps:r,generatorName:`dayCellContent`,customGenerator:n.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.isDisabled?void 0:n.dayCellClassNames,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount},e.children)}};function eP(e){return!!(e.dayCellContent||qA(`dayCellContent`,e))}function tP(e){let{date:t,dateEnv:n,dateProfile:r,isMonthStart:i}=e,a=$M(t,e.todayRange,null,r),o=e.showDayNumber?n.format(t,i?e.monthStartFormat:QN):``;return Object.assign(Object.assign(Object.assign({date:n.toDate(t),view:e.viewApi},a),{isMonthStart:i,dayNumberText:o}),e.extraRenderProps)}var nP=class extends HA{render(){let{props:e}=this,{seg:t}=e;return Z(YN,{elTag:`div`,elClasses:[`fc-bg-event`],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:rP,seg:t,timeText:``,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function rP(e){let{title:t}=e.event;return t&&Z(`div`,{className:`fc-event-title`},e.event.title)}function iP(e){return Z(`div`,{className:`fc-${e}`})}var aP=e=>Z(zA.Consumer,null,t=>{let{dateEnv:n,options:r}=t,{date:i}=e,a=r.weekNumberFormat||e.defaultFormat,o={num:n.computeWeekNumber(i),text:n.format(i,a),date:i};return Z(ZA,{elRef:e.elRef,elTag:e.elTag,elAttrs:e.elAttrs,elClasses:e.elClasses,elStyle:e.elStyle,renderProps:o,generatorName:`weekNumberContent`,customGenerator:r.weekNumberContent,defaultGenerator:oP,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)});function oP(e){return e.text}var sP=10,cP=class extends HA{constructor(){super(...arguments),this.state={titleId:NO()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&GA(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=jO(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key===`Escape`&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:n,state:r}=this,i=[`fc-popover`,e.getClass(`popover`)].concat(n.extraClassNames||[]);return tO(Z(`div`,Object.assign({},n.extraAttrs,{id:n.id,className:i.join(` `),"aria-labelledby":r.titleId,ref:this.handleRootEl}),Z(`div`,{className:`fc-popover-header `+e.getClass(`popoverHeader`)},Z(`span`,{className:`fc-popover-title`,id:r.titleId},n.title),Z(`span`,{className:`fc-popover-close `+e.getIconClass(`close`),title:t.closeHint,onClick:this.handleCloseClick})),Z(`div`,{className:`fc-popover-body `+e.getClass(`popoverContent`)},n.children)),n.parentEl)}componentDidMount(){document.addEventListener(`mousedown`,this.handleDocumentMouseDown),document.addEventListener(`keydown`,this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener(`mousedown`,this.handleDocumentMouseDown),document.removeEventListener(`keydown`,this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:n}=this.props,{rootEl:r}=this,i=cN(t);if(i){let a=r.getBoundingClientRect(),o=n?TO(t,`.fc-scrollgrid`).getBoundingClientRect().top:i.top,s=e?i.right-a.width:i.left;o=Math.max(o,sP),s=Math.min(s,document.documentElement.clientWidth-sP-a.width),s=Math.max(s,sP);let c=r.offsetParent.getBoundingClientRect();kO(r,{top:o-c.top,left:s-c.left})}}},lP=class extends fN{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:n}=this,{startDate:r,todayRange:i,dateProfile:a}=n,o=t.format(r,e.dayPopoverFormat);return Z($N,{elRef:this.handleRootEl,date:r,dateProfile:a,todayRange:i},(t,r,i)=>Z(cP,{elRef:i.ref,id:n.id,title:o,extraClassNames:[`fc-more-popover`].concat(i.className||[]),extraAttrs:i,parentEl:n.parentEl,alignmentEl:n.alignmentEl,alignGridTop:n.alignGridTop,onClose:n.onClose},eP(e)&&Z(t,{elTag:`div`,elClasses:[`fc-more-popover-misc`]}),n.children))}queryHit(e,t,n,r){let{rootEl:i,props:a}=this;return e>=0&&e<n&&t>=0&&t<r?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:i,rect:{left:0,top:0,right:n,bottom:r},layer:1}:null}},uP=class extends HA{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:NO()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&GA(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:n}=this,{moreLinkClick:r}=n.options,i=fP(t).start;function a(e){let{def:t,instance:r,range:i}=e.eventRange;return{event:new mM(n,t,r),start:n.dateEnv.toDate(i.start),end:n.dateEnv.toDate(i.end),isStart:e.isStart,isEnd:e.isEnd}}typeof r==`function`&&(r=r({date:i,allDay:!!t.allDayDate,allSegs:t.allSegs.map(a),hiddenSegs:t.hiddenSegs.map(a),jsEvent:e,view:n.viewApi})),!r||r===`popover`?this.setState({isPopoverOpen:!0}):typeof r==`string`&&n.calendarApi.zoomTo(i,r)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return Z(zA.Consumer,null,n=>{let{viewApi:r,options:i,calendarApi:a}=n,{moreLinkText:o}=i,{moreCnt:s}=e,c=fP(e),l=typeof o==`function`?o.call(a,s):`+${s} ${o}`,u=KO(i.moreLinkHint,[s],l),d={num:s,shortText:`+${s}`,text:l,view:r};return Z(tD,null,!!e.moreCnt&&Z(ZA,{elTag:e.elTag||`a`,elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],`fc-more-link`],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),LO(this.handleClick)),{title:u,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:``}),renderProps:d,generatorName:`moreLinkContent`,customGenerator:i.moreLinkContent,defaultGenerator:e.defaultGenerator||dP,classNameGenerator:i.moreLinkClassNames,didMount:i.moreLinkDidMount,willUnmount:i.moreLinkWillUnmount},e.children),t.isPopoverOpen&&Z(lP,{id:t.popoverId,startDate:c.start,endDate:c.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=TO(this.linkEl,`.fc-view-harness`))}};function dP(e){return e.text}function fP(e){if(e.allDayDate)return{start:e.allDayDate,end:lk(e.allDayDate,1)};let{hiddenSegs:t}=e;return{start:pP(t),end:hP(t)}}function pP(e){return e.reduce(mP).eventRange.range.start}function mP(e,t){return e.eventRange.range.start<t.eventRange.range.start?e:t}function hP(e){return e.reduce(gP).eventRange.range.end}function gP(e,t){return e.eventRange.range.end>t.eventRange.range.end?e:t}var _P=class{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let t of this.handlers)t(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}},vP=class extends _P{constructor(){super(...arguments),this.map=new Map}handle(e){let{map:t}=this,n=!1;e.isActive?(t.set(e.id,e),n=!0):t.has(e.id)&&(t.delete(e.id),n=!0),n&&this.set(t)}},yP=[],bP={code:`en`,week:{dow:0,doy:4},direction:`ltr`,buttonText:{prev:`prev`,next:`next`,prevYear:`prev year`,nextYear:`next year`,year:`year`,today:`today`,month:`month`,week:`week`,day:`day`,list:`list`},weekText:`W`,weekTextLong:`Week`,closeHint:`Close`,timeHint:`Time`,eventHint:`Event`,allDayText:`all-day`,moreLinkText:`more`,noEventsText:`No events to display`},xP=Object.assign(Object.assign({},bP),{buttonHints:{prev:`Previous $0`,next:`Next $0`,today(e,t){return t===`day`?`Today`:`This ${e}`}},viewHint:`$0 view`,navLinkHint:`Go to $0`,moreLinkHint(e){return`Show ${e} more event${e===1?``:`s`}`}});function SP(e){let t=e.length>0?e[0].code:`en`,n=yP.concat(e),r={en:xP};for(let e of n)r[e.code]=e;return{map:r,defaultCode:t}}function CP(e,t){return typeof e==`object`&&!Array.isArray(e)?EP(e.code,[e.code],e):wP(e,t)}function wP(e,t){let n=[].concat(e||[]);return EP(e,n,TP(n,t)||xP)}function TP(e,t){for(let n=0;n<e.length;n+=1){let r=e[n].toLocaleLowerCase().split(`-`);for(let e=r.length;e>0;--e){let n=r.slice(0,e).join(`-`);if(t[n])return t[n]}}return null}function EP(e,t,n){let r=gA([bP,n],[`buttonText`]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function DP(e){return{id:BO(),name:e.name,premiumReleaseDate:e.premiumReleaseDate?new Date(e.premiumReleaseDate):void 0,deps:e.deps||[],reducers:e.reducers||[],isLoadingFuncs:e.isLoadingFuncs||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||``,elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function OP(e,t){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:``,elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(let t of e){let e=t.name,a=n[e];a===void 0?(n[e]=t.id,i(t.deps),r=AP(r,t)):a!==t.id&&console.warn(`Duplicate plugin '${e}'`)}}return e&&i(e),i(t),r}function kP(){let e=[],t=[],n;return(r,i)=>(n&&ok(r,e)&&ok(i,t)||(n=OP(r,i)),e=r,t=i,n)}function AP(e,t){return{premiumReleaseDate:jP(e.premiumReleaseDate,t.premiumReleaseDate),reducers:e.reducers.concat(t.reducers),isLoadingFuncs:e.isLoadingFuncs.concat(t.isLoadingFuncs),contextInit:e.contextInit.concat(t.contextInit),eventRefiners:Object.assign(Object.assign({},e.eventRefiners),t.eventRefiners),eventDefMemberAdders:e.eventDefMemberAdders.concat(t.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},e.eventSourceRefiners),t.eventSourceRefiners),isDraggableTransformers:e.isDraggableTransformers.concat(t.isDraggableTransformers),eventDragMutationMassagers:e.eventDragMutationMassagers.concat(t.eventDragMutationMassagers),eventDefMutationAppliers:e.eventDefMutationAppliers.concat(t.eventDefMutationAppliers),dateSelectionTransformers:e.dateSelectionTransformers.concat(t.dateSelectionTransformers),datePointTransforms:e.datePointTransforms.concat(t.datePointTransforms),dateSpanTransforms:e.dateSpanTransforms.concat(t.dateSpanTransforms),views:Object.assign(Object.assign({},e.views),t.views),viewPropsTransformers:e.viewPropsTransformers.concat(t.viewPropsTransformers),isPropsValid:t.isPropsValid||e.isPropsValid,externalDefTransforms:e.externalDefTransforms.concat(t.externalDefTransforms),viewContainerAppends:e.viewContainerAppends.concat(t.viewContainerAppends),eventDropTransformers:e.eventDropTransformers.concat(t.eventDropTransformers),calendarInteractions:e.calendarInteractions.concat(t.calendarInteractions),componentInteractions:e.componentInteractions.concat(t.componentInteractions),themeClasses:Object.assign(Object.assign({},e.themeClasses),t.themeClasses),eventSourceDefs:e.eventSourceDefs.concat(t.eventSourceDefs),cmdFormatter:t.cmdFormatter||e.cmdFormatter,recurringTypes:e.recurringTypes.concat(t.recurringTypes),namedTimeZonedImpl:t.namedTimeZonedImpl||e.namedTimeZonedImpl,initialView:e.initialView||t.initialView,elementDraggingImpl:e.elementDraggingImpl||t.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},e.optionChangeHandlers),t.optionChangeHandlers),scrollGridImpl:t.scrollGridImpl||e.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},e.listenerRefiners),t.listenerRefiners),optionRefiners:Object.assign(Object.assign({},e.optionRefiners),t.optionRefiners),propSetHandlers:Object.assign(Object.assign({},e.propSetHandlers),t.propSetHandlers)}}function jP(e,t){return e===void 0?t:t===void 0?e:new Date(Math.max(e.valueOf(),t.valueOf()))}var MP=class extends PA{};MP.prototype.classes={root:`fc-theme-standard`,tableCellShaded:`fc-cell-shaded`,buttonGroup:`fc-button-group`,button:`fc-button fc-button-primary`,buttonActive:`fc-button-active`},MP.prototype.baseIconClass=`fc-icon`,MP.prototype.iconClasses={close:`fc-icon-x`,prev:`fc-icon-chevron-left`,next:`fc-icon-chevron-right`,prevYear:`fc-icon-chevrons-left`,nextYear:`fc-icon-chevrons-right`},MP.prototype.rtlIconClasses={prev:`fc-icon-chevron-right`,next:`fc-icon-chevron-left`,prevYear:`fc-icon-chevrons-right`,nextYear:`fc-icon-chevrons-left`},MP.prototype.iconOverrideOption=`buttonIcons`,MP.prototype.iconOverrideCustomButtonOption=`icon`,MP.prototype.iconOverridePrefix=`fc-icon-`;function NP(e,t){let n={},r;for(r in e)PP(r,n,e,t);for(r in t)PP(r,n,e,t);return n}function PP(e,t,n,r){if(t[e])return t[e];let i=FP(e,t,n,r);return i&&(t[e]=i),i}function FP(e,t,n,r){let i=n[e],a=r[e],o=e=>i&&i[e]!==null?i[e]:a&&a[e]!==null?a[e]:null,s=o(`component`),c=o(`superType`),l=null;if(c){if(c===e)throw Error(`Can't have a custom view type that references itself`);l=PP(c,t,n,r)}return!s&&l&&(s=l.component),s?{type:e,component:s,defaults:Object.assign(Object.assign({},l?l.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},l?l.overrides:{}),a?a.rawOptions:{})}:null}function IP(e){return vA(e,LP)}function LP(e){let t=typeof e==`function`?{component:e}:e,{component:n}=t;return t.content?n=RP(t):n&&!(n.prototype instanceof HA)&&(n=RP(Object.assign(Object.assign({},t),{content:n}))),{superType:t.type,component:n,rawOptions:t}}function RP(e){return t=>Z(zA.Consumer,null,n=>Z(ZA,{elTag:`div`,elClasses:tj(n.viewSpec),renderProps:Object.assign(Object.assign({},t),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:e.content,classNameGenerator:e.classNames,didMount:e.didMount,willUnmount:e.willUnmount}))}function zP(e,t,n,r){let i=IP(e),a=IP(t.views);return vA(NP(i,a),e=>BP(e,a,t,n,r))}function BP(e,t,n,r,i){let a=e.overrides.duration||e.defaults.duration||r.duration||n.duration,o=null,s=``,c=``,l={};if(a&&(o=HP(a),o)){let e=ak(o);s=e.unit,e.value===1&&(c=s,l=t[s]?t[s].rawOptions:{})}let u=t=>{let n=t.buttonText||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]},d=t=>{let n=t.buttonHints||{},r=e.defaults.buttonTextKey;return r!=null&&n[r]!=null?n[r]:n[e.type]==null?n[c]==null?null:n[c]:n[e.type]};return{type:e.type,component:e.component,duration:o,durationUnit:s,singleUnit:c,optionDefaults:e.defaults,optionOverrides:Object.assign(Object.assign({},l),e.overrides),buttonTextOverride:u(r)||u(n)||e.overrides.buttonText,buttonTextDefault:u(i)||e.defaults.buttonText||u(oA)||e.type,buttonTitleOverride:d(r)||d(n)||e.overrides.buttonHint,buttonTitleDefault:d(i)||e.defaults.buttonHint||d(oA)}}var VP={};function HP(e){let t=JSON.stringify(e),n=VP[t];return n===void 0&&(n=XO(e),VP[t]=n),n}function UP(e,t){return t.type===`CHANGE_VIEW_TYPE`&&(e=t.viewType),e}function WP(e,t){switch(t.type){case`CHANGE_DATE`:return t.dateMarker;default:return e}}function GP(e,t,n){let r=e.initialDate;return r==null?n.getDateMarker():t.createMarker(r)}function KP(e,t){switch(t.type){case`SET_OPTION`:return Object.assign(Object.assign({},e),{[t.optionName]:t.rawOptionValue});default:return e}}function qP(e,t,n,r){let i;switch(t.type){case`CHANGE_VIEW_TYPE`:return r.build(t.dateMarker||n);case`CHANGE_DATE`:return r.build(t.dateMarker);case`PREV`:if(i=r.buildPrev(e,n),i.isValid)return i;break;case`NEXT`:if(i=r.buildNext(e,n),i.isValid)return i}return e}function JP(e,t,n){let r=t?t.activeRange:null;return QP({},oF(e,n),r,n)}function YP(e,t,n,r){let i=n?n.activeRange:null;switch(t.type){case`ADD_EVENT_SOURCES`:return QP(e,t.sources,i,r);case`REMOVE_EVENT_SOURCE`:return $P(e,t.sourceId);case`PREV`:case`NEXT`:case`CHANGE_DATE`:case`CHANGE_VIEW_TYPE`:return n?eF(e,i,r):e;case`FETCH_EVENT_SOURCES`:return nF(e,t.sourceIds?yA(t.sourceIds):aF(e,r),i,t.isRefetch||!1,r);case`RECEIVE_EVENTS`:case`RECEIVE_EVENT_ERROR`:return iF(e,t.sourceId,t.fetchId,t.fetchRange);case`REMOVE_ALL_EVENT_SOURCES`:return{};default:return e}}function XP(e,t,n){let r=t?t.activeRange:null;return nF(e,aF(e,n),r,!0,n)}function ZP(e){for(let t in e)if(e[t].isFetching)return!0;return!1}function QP(e,t,n,r){let i={};for(let e of t)i[e.sourceId]=e;return n&&(i=eF(i,n,r)),Object.assign(Object.assign({},e),i)}function $P(e,t){return _A(e,e=>e.sourceId!==t)}function eF(e,t,n){return nF(e,_A(e,e=>tF(e,t,n)),t,!1,n)}function tF(e,t,n){return sF(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}function nF(e,t,n,r,i){let a={};for(let o in e){let s=e[o];a[o]=t[o]?rF(s,n,r,i):s}return a}function rF(e,t,n,r){let{options:i,calendarApi:a}=r,o=r.pluginHooks.eventSourceDefs[e.sourceDefId],s=BO();return o.fetch({eventSource:e,range:t,isRefetch:n,context:r},n=>{let{rawEvents:o}=n;i.eventSourceSuccess&&(o=i.eventSourceSuccess.call(a,o,n.response)||o),e.success&&(o=e.success.call(a,o,n.response)||o),r.dispatch({type:`RECEIVE_EVENTS`,sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:o})},n=>{let o=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(a,n),o=!0),e.failure&&(e.failure(n),o=!0),o||console.warn(n.message,n),r.dispatch({type:`RECEIVE_EVENT_ERROR`,sourceId:e.sourceId,fetchId:s,fetchRange:t,error:n})}),Object.assign(Object.assign({},e),{isFetching:!0,latestFetchId:s})}function iF(e,t,n,r){let i=e[t];return i&&n===i.latestFetchId?Object.assign(Object.assign({},e),{[t]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):e}function aF(e,t){return _A(e,e=>sF(e,t))}function oF(e,t){let n=Uj(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(let e of r){let r=Hj(e,t,n);r&&i.push(r)}return i}function sF(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function cF(e,t){switch(t.type){case`UNSELECT_DATES`:return null;case`SELECT_DATES`:return t.selection;default:return e}}function lF(e,t){switch(t.type){case`UNSELECT_EVENT`:return``;case`SELECT_EVENT`:return t.eventInstanceId;default:return e}}function uF(e,t){let n;switch(t.type){case`UNSET_EVENT_DRAG`:return null;case`SET_EVENT_DRAG`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function dF(e,t){let n;switch(t.type){case`UNSET_EVENT_RESIZE`:return null;case`SET_EVENT_RESIZE`:return n=t.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function fF(e,t,n,r,i){return{header:e.headerToolbar?pF(e.headerToolbar,e,t,n,r,i):null,footer:e.footerToolbar?pF(e.footerToolbar,e,t,n,r,i):null}}function pF(e,t,n,r,i,a){let o={},s=[],c=!1;for(let l in e){let u=e[l],d=mF(u,t,n,r,i,a);o[l]=d.widgets,s.push(...d.viewsWithButtons),c||=d.hasTitle}return{sectionWidgets:o,viewsWithButtons:s,hasTitle:c}}function mF(e,t,n,r,i,a){let o=t.direction===`rtl`,s=t.customButtons||{},c=n.buttonText||{},l=t.buttonText||{},u=n.buttonHints||{},d=t.buttonHints||{},f=e?e.split(` `):[],p=[],m=!1;return{widgets:f.map(e=>e.split(`,`).map(e=>{if(e===`title`)return m=!0,{buttonName:e};let n,f,h,g,_,v;if(n=s[e])h=e=>{n.click&&n.click.call(e.target,e,e.target)},(g=r.getCustomButtonIconClass(n))||(g=r.getIconClass(e,o))||(_=n.text),v=n.hint||n.text;else if(f=i[e]){p.push(e),h=()=>{a.changeView(e)},(_=f.buttonTextOverride)||(g=r.getIconClass(e,o))||(_=f.buttonTextDefault);let n=f.buttonTextOverride||f.buttonTextDefault;v=KO(f.buttonTitleOverride||f.buttonTitleDefault||t.viewHint,[n,e],n)}else if(a[e]){if(h=()=>{a[e]()},(_=c[e])||(g=r.getIconClass(e,o))||(_=l[e]),e===`prevYear`||e===`nextYear`){let t=e===`prevYear`?`prev`:`next`;v=KO(u[t]||d[t],[l.year||`year`,`year`],l[e])}else v=t=>KO(u[e]||d[e],[l[t]||t,t],l[e])}return{buttonName:e,buttonClick:h,buttonIcon:g,buttonText:_,buttonHint:v}})),viewsWithButtons:p,hasTitle:m}}var hF=class{constructor(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},gF=DP({name:`array-event-source`,eventSourceDefs:[{ignoreRange:!0,parseMeta(e){return Array.isArray(e.events)?e.events:null},fetch(e,t){t({rawEvents:e.eventSource.meta})}}]}),_F=DP({name:`func-event-source`,eventSourceDefs:[{parseMeta(e){return typeof e.events==`function`?e.events:null},fetch(e,t,n){let{dateEnv:r}=e.context,i=e.eventSource.meta;zM(i.bind(null,IM(e.range,r)),e=>t({rawEvents:e}),n)}}]}),vF=DP({name:`json-event-source`,eventSourceRefiners:{method:String,extraParams:$,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(e){return e.url&&(e.format===`json`||!e.format)?{url:e.url,format:`json`,method:(e.method||`GET`).toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch(e,t,n){let{meta:r}=e.eventSource,i=yF(r,e.range,e.context);VM(r.method,r.url,i).then(([e,n])=>{t({rawEvents:e,response:n})},n)}}]});function yF(e,t,n){let{dateEnv:r,options:i}=n,a,o,s,c,l={};return a=e.startParam,a??=i.startParam,o=e.endParam,o??=i.endParam,s=e.timeZoneParam,s??=i.timeZoneParam,c=typeof e.extraParams==`function`?e.extraParams():e.extraParams||{},Object.assign(l,c),l[a]=r.formatIso(t.start),l[o]=r.formatIso(t.end),r.timeZone!==`local`&&(l[s]=r.timeZone),l}var bF=DP({name:`simple-recurring-event`,recurringTypes:[{parse(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){let n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null,dateEnv:t},r;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(r=ek(e.endTime,e.startTime)),{allDayGuess:!e.startTime&&!e.endTime,duration:r,typeData:n}}return null},expand(e,t,n){let r=aj(t,{start:e.startRecur,end:e.endRecur});return r?xF(e.daysOfWeek,e.startTime,e.dateEnv,n,r):[]}}],eventRefiners:{daysOfWeek:$,startTime:XO,endTime:XO,duration:XO,startRecur:$,endRecur:$}});function xF(e,t,n,r,i){let a=e?yA(e):null,o=yk(i.start),s=i.end,c=[];for(t&&(t.milliseconds<0?s=lk(s,1):t.milliseconds>=864e5&&(o=lk(o,-1)));o<s;){let e;(!a||a[o.getUTCDay()])&&(e=t?r.add(o,t):o,c.push(r.createMarker(n.toDate(e)))),o=lk(o,1)}return c}var SF=DP({name:`change-handler`,optionChangeHandlers:{events(e,t){CF([e],t)},eventSources:CF}});function CF(e,t){let n=bA(t.getCurrentData().eventSources);if(n.length===1&&e.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(e[0])){t.dispatch({type:`RESET_RAW_EVENTS`,sourceId:n[0].sourceId,rawEvents:e[0]});return}let r=[];for(let t of e){let e=!1;for(let r=0;r<n.length;r+=1)if(n[r]._raw===t){n.splice(r,1),e=!0;break}e||r.push(t)}for(let e of n)t.dispatch({type:`REMOVE_EVENT_SOURCE`,sourceId:e.sourceId});for(let e of r)t.calendarApi.addEventSource(e)}function wF(e,t){t.emitter.trigger(`datesSet`,Object.assign(Object.assign({},IM(e.activeRange,t.dateEnv)),{view:t.viewApi}))}function TF(e,t){let{emitter:n}=t;n.hasHandlers(`eventsSet`)&&n.trigger(`eventsSet`,gM(e,t))}var EF=[gF,_F,vF,bF,SF,DP({name:`misc`,isLoadingFuncs:[e=>ZP(e.eventSources)],propSetHandlers:{dateProfile:wF,eventStore:TF}})],DF=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new CO(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],n;for(;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function OF(e,t,n){let r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,iA(t.titleFormat||kF(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}function kF(e){let{currentRangeUnit:t}=e;if(t===`year`)return{year:`numeric`};if(t===`month`)return{year:`numeric`,month:`long`};let n=vk(e.currentRange.start,e.currentRange.end);return n!==null&&n>1?{year:`numeric`,month:`short`,day:`numeric`}:{year:`numeric`,month:`long`,day:`numeric`}}var AF=class{constructor(){this.resetListeners=new Set}handleInput(e,t){let n=this.dateEnv;if(e!==n&&(typeof t==`function`?this.nowFn=t:n||(this.nowAnchorDate=e.toDate(t?e.createMarker(t):e.createNowMarker()),this.nowAnchorQueried=Date.now()),this.dateEnv=e,n))for(let e of this.resetListeners.values())e()}getDateMarker(){return this.nowAnchorDate?this.dateEnv.timestampToMarker(this.nowAnchorDate.valueOf()+(Date.now()-this.nowAnchorQueried)):this.dateEnv.createMarker(this.nowFn())}addResetListener(e){this.resetListeners.add(e)}removeResetListener(e){this.resetListeners.delete(e)}},jF=class{constructor(e){this.computeCurrentViewData=Q(this._computeCurrentViewData),this.organizeRawLocales=Q(SP),this.buildLocale=Q(CP),this.buildPluginHooks=kP(),this.buildDateEnv=Q(MF),this.buildTheme=Q(NF),this.parseToolbars=Q(fF),this.buildViewSpecs=Q(zP),this.buildDateProfileGenerator=Ik(PF),this.buildViewApi=Q(FF),this.buildViewUiProps=Ik(RF),this.buildEventUiBySource=Q(IF,xA),this.buildEventUiBases=Q(LF),this.parseContextBusinessHours=Ik(BF),this.buildTitle=Q(OF),this.nowManager=new AF,this.emitter=new eM,this.actionRunner=new DF(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=e=>{this.actionRunner.request(e)},this.props=e,this.actionRunner.pause(),this.nowManager=new AF;let t={},n=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),r=n.calendarOptions.initialView||n.pluginHooks.initialView,i=this.computeCurrentViewData(r,n,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(i.options);let a={nowManager:this.nowManager,dateEnv:n.dateEnv,options:n.calendarOptions,pluginHooks:n.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},o=GP(n.calendarOptions,n.dateEnv,this.nowManager),s=i.dateProfileGenerator.build(o);sj(s.activeRange,o)||(o=s.currentRange.start);for(let e of n.pluginHooks.contextInit)e(a);let c=JP(n.calendarOptions,s,a),l={dynamicOptionOverrides:t,currentViewType:r,currentDate:o,dateProfile:s,businessHours:this.parseContextBusinessHours(a),eventSources:c,eventUiBases:{},eventStore:Aj(),renderableEventStore:Aj(),dateSelection:null,eventSelection:``,eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(a).selectionConfig},u=Object.assign(Object.assign({},a),l);for(let e of n.pluginHooks.reducers)Object.assign(l,e(null,null,u));zF(l,a)&&this.emitter.trigger(`loading`,!0),this.state=l,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:n}=this;t===void 0?n.optionOverrides=e:(n.optionOverrides=Object.assign(Object.assign({},n.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:`NOTHING`})}_handleAction(e){let{props:t,state:n,emitter:r}=this,i=KP(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),o=UP(n.currentViewType,e),s=this.computeCurrentViewData(o,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,r.setThisContext(t.calendarApi),r.setOptions(s.options);let c={nowManager:this.nowManager,dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:r,getCurrentData:this.getCurrentData},{currentDate:l,dateProfile:u}=n;this.data&&this.data.dateProfileGenerator!==s.dateProfileGenerator&&(u=s.dateProfileGenerator.build(l)),l=WP(l,e),u=qP(u,e,l,s.dateProfileGenerator),e.type!==`PREV`&&e.type!==`NEXT`&&sj(u.currentRange,l)||(l=u.currentRange.start);let d=YP(n.eventSources,e,u,c),f=Gj(n.eventStore,e,d,u,c),p=ZP(d)&&!s.options.progressiveEventRendering&&n.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:h}=this.buildViewUiProps(c),g=this.buildEventUiBySource(d),_=this.buildEventUiBases(p.defs,m,g),v={dynamicOptionOverrides:i,currentViewType:o,currentDate:l,dateProfile:u,eventSources:d,eventStore:f,renderableEventStore:p,selectionConfig:h,eventUiBases:_,businessHours:this.parseContextBusinessHours(c),dateSelection:cF(n.dateSelection,e),eventSelection:lF(n.eventSelection,e),eventDrag:uF(n.eventDrag,e),eventResize:dF(n.eventResize,e)},y=Object.assign(Object.assign({},c),v);for(let t of a.pluginHooks.reducers)Object.assign(v,t(n,e,y));let b=zF(n,c),x=zF(v,c);!b&&x?r.trigger(`loading`,!0):b&&!x&&r.trigger(`loading`,!1),this.state=v,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,n=this.data,r=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),i=this.computeCurrentViewData(t.currentViewType,r,e.optionOverrides,t.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({nowManager:this.nowManager,viewTitle:this.buildTitle(t.dateProfile,i.options,r.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},r),i),t),o=r.pluginHooks.optionChangeHandlers,s=n&&n.calendarOptions,c=r.calendarOptions;if(s&&s!==c){s.timeZone!==c.timeZone&&(t.eventSources=a.eventSources=XP(a.eventSources,t.dateProfile,a),t.eventStore=a.eventStore=Zj(a.eventStore,n.dateEnv,a.dateEnv),t.renderableEventStore=a.renderableEventStore=Zj(a.renderableEventStore,n.dateEnv,a.dateEnv));for(let e in o)(this.optionsForHandling.indexOf(e)!==-1||s[e]!==c[e])&&o[e](c[e],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,t,n){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:r,pluginHooks:i,localeDefaults:a,availableLocaleData:o,extra:s}=this.processRawCalendarOptions(e,t);VF(s);let c=this.buildDateEnv(r.timeZone,r.locale,r.weekNumberCalculation,r.firstDay,r.weekText,i,o,r.defaultRangeSeparator),l=this.buildViewSpecs(i.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),u=this.buildTheme(r,i),d=this.parseToolbars(r,this.stableOptionOverrides,u,l,n);return this.stableCalendarOptionsData={calendarOptions:r,pluginHooks:i,dateEnv:c,viewSpecs:l,theme:u,toolbarConfig:d,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,t){let{locales:n,locale:r}=pA([oA,e,t]),i=this.organizeRawLocales(n),a=i.map,o=this.buildLocale(r||i.defaultCode,a).options,s=this.buildPluginHooks(e.plugins||[],EF),c=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},aA),sA),cA),s.listenerRefiners),s.optionRefiners),l={},u=pA([oA,o,e,t]),d={},f=this.currentCalendarOptionsInput,p=this.currentCalendarOptionsRefined,m=!1;for(let e in u)this.optionsForRefining.indexOf(e)===-1&&(u[e]===f[e]||lA[e]&&e in f&&lA[e](f[e],u[e]))?d[e]=p[e]:c[e]?(d[e]=c[e](u[e]),m=!0):l[e]=f[e];return m&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=d,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:s,availableLocaleData:i,localeDefaults:o,extra:l}}_computeCurrentViewData(e,t,n,r){let i=t.viewSpecs[e];if(!i)throw Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r);return VF(o),this.nowManager.handleInput(t.dateEnv,a.now),{viewSpec:i,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,nowManager:this.nowManager,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}}processRawViewOptions(e,t,n,r,i){let a=pA([oA,e.optionDefaults,n,r,e.optionOverrides,i]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},aA),sA),cA),fA),t.listenerRefiners),t.optionRefiners),s={},c=this.currentViewOptionsInput,l=this.currentViewOptionsRefined,u=!1,d={};for(let e in a)a[e]===c[e]||lA[e]&&lA[e](a[e],c[e])?s[e]=l[e]:(a[e]===this.currentCalendarOptionsInput[e]||lA[e]&&lA[e](a[e],this.currentCalendarOptionsInput[e])?e in this.currentCalendarOptionsRefined&&(s[e]=this.currentCalendarOptionsRefined[e]):o[e]?s[e]=o[e](a[e]):d[e]=a[e],u=!0);return u&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=s),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:d}}};function MF(e,t,n,r,i,a,o,s){let c=CP(t||o.defaultCode,o.map);return new NA({calendarSystem:`gregory`,timeZone:e,namedTimeZoneImpl:a.namedTimeZonedImpl,locale:c,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:a.cmdFormatter,defaultSeparator:s})}function NF(e,t){return new(t.themeClasses[e.themeSystem]||MP)(e)}function PF(e){return new(e.dateProfileGeneratorClass||fj)(e)}function FF(e,t,n){return new hF(e,t,n)}function IF(e){return vA(e,e=>e.ui)}function LF(e,t,n){let r={"":t};for(let t in e){let i=e[t];i.sourceId&&n[i.sourceId]&&(r[t]=n[i.sourceId])}return r}function RF(e){let{options:t}=e;return{eventUiSingleBase:Rj({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:typeof t.eventOverlap==`boolean`?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Rj({constraint:t.selectConstraint,overlap:typeof t.selectOverlap==`boolean`?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function zF(e,t){for(let n of t.pluginHooks.isLoadingFuncs)if(n(e))return!0;return!1}function BF(e){return iM(e.options.businessHours,e)}function VF(e,t){for(let n in e)console.warn(`Unknown option '${n}'`+(t?` for view '${t}'`:``))}var HF=class extends HA{render(){return Z(`div`,{className:`fc-toolbar-chunk`},...this.props.widgetGroups.map(e=>this.renderWidgetGroup(e)))}renderWidgetGroup(e){let{props:t}=this,{theme:n}=this.context,r=[],i=!0;for(let a of e){let{buttonName:e,buttonClick:o,buttonText:s,buttonIcon:c,buttonHint:l}=a;if(e===`title`)i=!1,r.push(Z(`h2`,{className:`fc-toolbar-title`,id:t.titleId},t.title));else{let i=e===t.activeButton,a=!t.isTodayEnabled&&e===`today`||!t.isPrevEnabled&&e===`prev`||!t.isNextEnabled&&e===`next`,u=[`fc-${e}-button`,n.getClass(`button`)];i&&u.push(n.getClass(`buttonActive`)),r.push(Z(`button`,{type:`button`,title:typeof l==`function`?l(t.navUnit):l,disabled:a,"aria-pressed":i,className:u.join(` `),onClick:o},s||(c?Z(`span`,{className:c,role:`img`}):``)))}}return r.length>1?Z(`div`,{className:i&&n.getClass(`buttonGroup`)||``},...r):r[0]}},UF=class extends HA{render(){let{model:e,extraClassName:t}=this.props,n=!1,r,i,a=e.sectionWidgets,o=a.center;return a.left?(n=!0,r=a.left):r=a.start,a.right?(n=!0,i=a.right):i=a.end,Z(`div`,{className:[t||``,`fc-toolbar`,n?`fc-toolbar-ltr`:``].join(` `)},this.renderSection(`start`,r||[]),this.renderSection(`center`,o||[]),this.renderSection(`end`,i||[]))}renderSection(e,t){let{props:n}=this;return Z(HF,{key:e,widgetGroups:t,title:n.title,navUnit:n.navUnit,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled,titleId:n.titleId})}},WF=class extends HA{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,GA(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:n}=e,r=[`fc-view-harness`,n||e.liquid||e.height?`fc-view-harness-active`:`fc-view-harness-passive`],i=``,a=``;return n?t.availableWidth===null?a=`${1/n*100}%`:i=t.availableWidth/n:i=e.height||``,Z(`div`,{"aria-labelledby":e.labeledById,ref:this.handleEl,className:r.join(` `),style:{height:i,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},GF=class extends KM{constructor(e){super(e),this.handleSegClick=(e,t)=>{let{component:n}=this,{context:r}=n,i=yM(t);if(i&&n.isValidSegDownEl(e.target)){let a=TO(e.target,`.fc-event-forced-url`),o=a?a.querySelector(`a[href]`).href:``;r.emitter.trigger(`eventClick`,{el:t,event:new mM(n.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:r.viewApi}),o&&!e.defaultPrevented&&(window.location.href=o)}},this.destroy=FO(e.el,`click`,`.fc-event`,this.handleSegClick)}},KF=class extends KM{constructor(e){super(e),this.handleEventElRemove=e=>{e===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(e,t)=>{yM(t)&&(this.currentSegEl=t,this.triggerEvent(`eventMouseEnter`,e,t))},this.handleSegLeave=(e,t)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent(`eventMouseLeave`,e,t))},this.removeHoverListeners=IO(e.el,`.fc-event`,this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,n){let{component:r}=this,{context:i}=r,a=yM(n);(!t||r.isValidSegDownEl(t.target))&&i.emitter.trigger(e,{el:n,event:new mM(i,a.eventRange.def,a.eventRange.instance),jsEvent:t,view:i.viewApi})}},qF=class extends VA{constructor(){super(...arguments),this.buildViewContext=Q(BA),this.buildViewPropTransformers=Q(YF),this.buildToolbarProps=Q(JF),this.headerRef=eD(),this.footerRef=eD(),this.interactionsStore={},this.state={viewLabelId:NO()},this.registerInteractiveComponent=(e,t)=>{let n=qM(e,t),r=[GF,KF].concat(this.props.pluginHooks.componentInteractions).map(e=>new e(n));this.interactionsStore[e.uid]=r,JM[e.uid]=n},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let e of t)e.destroy();delete this.interactionsStore[e.uid]}delete JM[e.uid]},this.resizeRunner=new CO(()=>{this.props.emitter.trigger(`_resize`,!0),this.props.emitter.trigger(`windowResize`,{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:n}=e,r=!1,i=``,a;e.isHeightAuto||e.forPrint?i=``:n.height==null?n.contentHeight==null?a=Math.max(n.aspectRatio,.5):i=n.contentHeight:r=!0;let o=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.nowManager,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),s=t.header&&t.header.hasTitle?this.state.viewLabelId:void 0;return Z(zA.Provider,{value:o},Z(YM,{unit:`day`},n=>{let o=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,n,e.viewTitle);return Z(tD,null,t.header&&Z(UF,Object.assign({ref:this.headerRef,extraClassName:`fc-header-toolbar`,model:t.header,titleId:s},o)),Z(WF,{liquid:r,height:i,aspectRatio:a,labeledById:s},this.renderView(e),this.buildAppendContent()),t.footer&&Z(UF,Object.assign({ref:this.footerRef,extraClassName:`fc-footer-toolbar`,model:t.footer,titleId:``},o)))}))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(t=>new t(e)),window.addEventListener(`resize`,this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let n in t)t[n](e[n],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:n}=t.pluginHooks;for(let r in n)t[r]!==e[r]&&n[r](t[r],t)}componentWillUnmount(){window.removeEventListener(`resize`,this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger(`_unmount`)}buildAppendContent(){let{props:e}=this;return Z(tD,{},...e.pluginHooks.viewContainerAppends.map(t=>t(e)))}renderView(e){let{pluginHooks:t}=e,{viewSpec:n}=e,r={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=this.buildViewPropTransformers(t.viewPropsTransformers);for(let t of i)Object.assign(r,t.transform(r,e));let a=n.component;return Z(a,Object.assign({},r))}};function JF(e,t,n,r,i,a){let o=n.build(i,void 0,!1),s=n.buildPrev(t,r,!1),c=n.buildNext(t,r,!1);return{title:a,activeButton:e.type,navUnit:e.singleUnit,isTodayEnabled:o.isValid&&!sj(t.currentRange,i),isPrevEnabled:s.isValid,isNextEnabled:c.isValid}}function YF(e){return e.map(e=>new e)}var XF=class extends ZM{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=e=>{switch(e.type){case`SET_EVENT_DRAG`:case`SET_EVENT_RESIZE`:this.renderRunner.tryDrain()}},this.handleData=e=>{this.currentData=e,this.renderRunner.request(e.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:e}=this;FA(()=>{wD(Z(GM,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(t,n,r,i)=>(this.setClassNames(t),this.setHeight(n),Z(XA.Provider,{value:this.customContentRenderId},Z(qF,Object.assign({isHeightAuto:r,forPrint:i},e))))),this.el)})}else this.isRendered&&(this.isRendered=!1,wD(null,this.el),this.setClassNames([]),this.setHeight(``))},gO(e),this.el=e,this.renderRunner=new CO(this.handleRenderRequest),new jF({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){FA(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause(`batchRendering`),e(),this.renderRunner.resume(`batchRendering`)}pauseRendering(){this.renderRunner.pause(`pauseRendering`)}resumeRendering(){this.renderRunner.resume(`pauseRendering`,!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!ok(e,this.currentClassNames)){let{classList:t}=this.el;for(let e of this.currentClassNames)t.remove(e);for(let n of e)t.add(n);this.currentClassNames=e}}setHeight(e){AO(this.el,`height`,e)}},ZF=parseInt(`18.3.1`.split(`.`)[0])<18,QF=class extends _.Component{constructor(){super(...arguments),this.elRef=(0,_.createRef)(),this.isUpdating=!1,this.isUnmounting=!1,this.state={customRenderingMap:new Map},this.requestResize=()=>{this.isUnmounting||(this.cancelResize(),this.resizeId=requestAnimationFrame(()=>{this.doResize()}))}}render(){let e=[];for(let t of this.state.customRenderingMap.values())e.push(_.createElement($F,{key:t.id,customRendering:t}));return _.createElement(`div`,{ref:this.elRef},e)}componentDidMount(){this.isUnmounting=!1;let e=new vP;this.handleCustomRendering=e.handle.bind(e),this.calendar=new XF(this.elRef.current,Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.calendar.render(),this.calendar.on(`_beforeprint`,()=>{(0,_l.flushSync)(()=>{})});let t;e.subscribe(e=>{let n=Date.now(),r=!t;(ZF||r||this.isUpdating||this.isUnmounting||n-t<100?eI:_l.flushSync)(()=>{this.setState({customRenderingMap:e},()=>{t=n,r?this.doResize():this.requestResize()})})})}componentDidUpdate(){this.isUpdating=!0,this.calendar.resetOptions(Object.assign(Object.assign({},this.props),{handleCustomRendering:this.handleCustomRendering})),this.isUpdating=!1}componentWillUnmount(){this.isUnmounting=!0,this.cancelResize(),this.calendar.destroy()}doResize(){this.calendar.updateSize()}cancelResize(){this.resizeId!==void 0&&(cancelAnimationFrame(this.resizeId),this.resizeId=void 0)}getApi(){return this.calendar}};QF.act=eI;var $F=class extends _.PureComponent{render(){let{customRendering:e}=this.props,{generatorMeta:t}=e,n=typeof t==`function`?t(e.renderProps):t;return(0,_l.createPortal)(n,e.containerEl)}};function eI(e){e()}var tI=class extends fN{constructor(){super(...arguments),this.headerElRef=eD()}renderSimpleLayout(e,t){let{props:n,context:r}=this,i=[],a=GN(r.options);return e&&i.push({type:`header`,key:`header`,isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}}),i.push({type:`body`,key:`body`,liquid:!0,chunk:{content:t}}),Z(ej,{elClasses:[`fc-daygrid`],viewSpec:r.viewSpec},Z(qN,{liquid:!n.isHeightAuto&&!n.forPrint,collapsibleWidth:n.forPrint,cols:[],sections:i}))}renderHScrollLayout(e,t,n,r){let i=this.context.pluginHooks.scrollGridImpl;if(!i)throw Error(`No ScrollGrid implementation`);let{props:a,context:o}=this,s=!a.forPrint&&GN(o.options),c=!a.forPrint&&KN(o.options),l=[];return e&&l.push({type:`header`,key:`header`,isSticky:s,chunks:[{key:`main`,elRef:this.headerElRef,tableClassName:`fc-col-header`,rowContent:e}]}),l.push({type:`body`,key:`body`,liquid:!0,chunks:[{key:`main`,content:t}]}),c&&l.push({type:`footer`,key:`footer`,isSticky:!0,chunks:[{key:`main`,content:WN}]}),Z(ej,{elClasses:[`fc-daygrid`],viewSpec:o.viewSpec},Z(i,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:l}))}};function nI(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.row].push(t);return n}function rI(e,t){let n=[];for(let e=0;e<t;e+=1)n[e]=[];for(let t of e)n[t.firstCol].push(t);return n}function iI(e,t){let n=[];if(e){for(let r=0;r<t;r+=1)n[r]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(let t of e.segs)n[t.row].segs.push(t)}else for(let e=0;e<t;e+=1)n[e]=null;return n}var aI=iA({hour:`numeric`,minute:`2-digit`,omitZeroMinute:!0,meridiem:`narrow`});function oI(e){let{display:t}=e.eventRange.ui;return t===`list-item`||t===`auto`&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var sI=class extends HA{render(){let{props:e}=this;return Z(XN,Object.assign({},e,{elClasses:[`fc-daygrid-event`,`fc-daygrid-block-event`,`fc-h-event`],defaultTimeFormat:aI,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},cI=class extends HA{render(){let{props:e,context:t}=this,{options:n}=t,{seg:r}=e,i=DM(r,n.eventTimeFormat||aI,t,!0,e.defaultDisplayEventEnd);return Z(YN,Object.assign({},e,{elTag:`a`,elClasses:[`fc-daygrid-event`,`fc-daygrid-dot-event`],elAttrs:jM(e.seg,t),defaultGenerator:lI,timeText:i,isResizing:!1,isDateSelecting:!1}))}};function lI(e){return Z(tD,null,Z(`div`,{className:`fc-daygrid-event-dot`,style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Z(`div`,{className:`fc-event-time`},e.timeText),Z(`div`,{className:`fc-event-title`},e.event.title||Z(tD,null,`\xA0`)))}var uI=class extends HA{constructor(){super(...arguments),this.compileSegs=Q(dI)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:n}=this.compileSegs(e.singlePlacements);return Z(uP,{elClasses:[`fc-daygrid-more-link`],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:n,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let n=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return Z(tD,null,t.map(t=>{let r=t.eventRange.instance.instanceId;return Z(`div`,{className:`fc-daygrid-event-harness`,key:r,style:{visibility:n[r]?`hidden`:``}},oI(t)?Z(cI,Object.assign({seg:t,isDragging:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},OM(t,e.todayRange))):Z(sI,Object.assign({seg:t,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:r===e.eventSelection,defaultDisplayEventEnd:!1},OM(t,e.todayRange))))}))}})}};function dI(e){let t=[],n=[];for(let r of e)t.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:t,invisibleSegs:n}}var fI=iA({week:`narrow`}),pI=class extends fN{constructor(){super(...arguments),this.rootElRef=eD(),this.state={dayNumberId:NO()},this.handleRootEl=e=>{GA(this.rootElRef,e),GA(this.props.elRef,e)}}render(){let{context:e,props:t,state:n,rootElRef:r}=this,{options:i,dateEnv:a}=e,{date:o,dateProfile:s}=t,c=t.showDayNumber&&hI(o,s.currentRange,a);return Z($N,{elTag:`td`,elRef:this.handleRootEl,elClasses:[`fc-daygrid-day`,...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":n.dayNumberId}:{}),{role:`gridcell`}),defaultGenerator:mI,date:o,dateProfile:s,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:c,extraRenderProps:t.extraRenderProps},(a,s)=>Z(`div`,{ref:t.innerElRef,className:`fc-daygrid-day-frame fc-scrollgrid-sync-inner`,style:{minHeight:t.minHeight}},t.showWeekNumber&&Z(aP,{elTag:`a`,elClasses:[`fc-daygrid-week-number`],elAttrs:rN(e,o,`week`),date:o,defaultFormat:fI}),!s.isDisabled&&(t.showDayNumber||eP(i)||t.forceDayTop)?Z(`div`,{className:`fc-daygrid-day-top`},Z(a,{elTag:`a`,elClasses:[`fc-daygrid-day-number`,c&&`fc-daygrid-month-start`],elAttrs:Object.assign(Object.assign({},rN(e,o)),{id:n.dayNumberId})})):t.showDayNumber?Z(`div`,{className:`fc-daygrid-day-top`,style:{visibility:`hidden`}},Z(`a`,{className:`fc-daygrid-day-number`},`\xA0`)):void 0,Z(`div`,{className:`fc-daygrid-day-events`,ref:t.fgContentElRef},t.fgContent,Z(`div`,{className:`fc-daygrid-day-bottom`,style:{marginTop:t.moreMarginTop}},Z(uI,{allDayDate:o,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:r,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),Z(`div`,{className:`fc-daygrid-day-bg`},t.bgContent)))}};function mI(e){return e.dayNumberText||Z(tD,null,`\xA0`)}function hI(e,t,n){let{start:r,end:i}=t,a=uk(i,-1),o=n.getYear(r),s=n.getMonth(r),c=n.getYear(a),l=n.getMonth(a);return(o!==c||s!==l)&&(e.valueOf()===r.valueOf()||n.getDay(e)===1&&e.valueOf()<i.valueOf())}function gI(e){return e.eventRange.instance.instanceId+`:`+e.firstCol}function _I(e){return gI(e)+`:`+e.lastCol}function vI(e,t,n,r,i,a,o){let s=new SI(t=>i[e[t.index].eventRange.instance.instanceId+`:`+t.span.start+`:`+(t.span.end-1)]||1);s.allowReslicing=!0,s.strictOrder=r,t===!0||n===!0?(s.maxCoord=a,s.hiddenConsumes=!0):typeof t==`number`?s.maxStackCnt=t:typeof n==`number`&&(s.maxStackCnt=n,s.hiddenConsumes=!0);let c=[],l=[];for(let t=0;t<e.length;t+=1){let n=e[t];i[_I(n)]==null?l.push(n):c.push({index:t,span:{start:n.firstCol,end:n.lastCol+1}})}let u=s.addSegs(c),{singleColPlacements:d,multiColPlacements:f,leftoverMargins:p}=yI(s.toRects(),e,o),m=[],h=[];for(let e of l){f[e.firstCol].push({seg:e,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let t=e.firstCol;t<=e.lastCol;t+=1)d[t].push({seg:xI(e,t,t+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)m.push(0);for(let t of u){let n=e[t.index],r=t.span;f[r.start].push({seg:xI(n,r.start,r.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let e=r.start;e<r.end;e+=1)m[e]+=1,d[e].push({seg:xI(n,e,e+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let e=0;e<o.length;e+=1)h.push(p[e]);return{singleColPlacements:d,multiColPlacements:f,moreCnts:m,moreMarginTops:h}}function yI(e,t,n){let r=bI(e,n.length),i=[],a=[],o=[];for(let e=0;e<n.length;e+=1){let s=r[e],c=[],l=0,u=0;for(let r of s){let i=t[r.index];c.push({seg:xI(i,e,e+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:r.levelCoord-l}),l=r.levelCoord+r.thickness}let d=[];l=0,u=0;for(let r of s){let i=t[r.index],a=r.span.end-r.span.start>1,o=r.span.start===e;u+=r.levelCoord-l,l=r.levelCoord+r.thickness,a?(u+=r.thickness,o&&d.push({seg:xI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:r.levelCoord,marginTop:0})):o&&(d.push({seg:xI(i,r.span.start,r.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:r.levelCoord,marginTop:u}),u=0)}i.push(c),a.push(d),o.push(u)}return{singleColPlacements:i,multiColPlacements:a,leftoverMargins:o}}function bI(e,t){let n=[];for(let e=0;e<t;e+=1)n.push([]);for(let t of e)for(let e=t.span.start;e<t.span.end;e+=1)n[e].push(t);return n}function xI(e,t,n,r){if(e.firstCol===t&&e.lastCol===n-1)return e;let i=e.eventRange,a=i.range,o=aj(a,{start:r[t].date,end:lk(r[n-1].date,1)});return Object.assign(Object.assign({},e),{firstCol:t,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:e.isStart&&o.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&o.end.valueOf()===a.end.valueOf()})}var SI=class extends pN{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:n}=this,r=e=>!this.forceHidden[hN(e)];for(let e=0;e<n.length;e+=1)n[e]=n[e].filter(r);return t}handleInvalidInsertion(e,t,n){let{entriesByLevel:r,forceHidden:i}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:s}=e;if(this.hiddenConsumes&&a){let e=hN(a);if(!i[e]){if(this.allowReslicing){let e=Object.assign(Object.assign({},a),{span:gN(a.span,t.span)}),c=hN(e);i[c]=!0,r[o][s]=e,n.push(e),this.splitEntry(a,t,n)}else i[e]=!0,n.push(a)}}super.handleInvalidInsertion(e,t,n)}},CI=class extends fN{constructor(){super(...arguments),this.cellElRefs=new NN,this.frameElRefs=new NN,this.fgElRefs=new NN,this.segHarnessRefs=new NN,this.rootElRef=eD(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:n}=this,{options:r}=n,i=e.cells.length,a=rI(e.businessHourSegs,i),o=rI(e.bgEventSegs,i),s=rI(this.getHighlightSegs(),i),c=rI(this.getMirrorSegs(),i),{singleColPlacements:l,multiColPlacements:u,moreCnts:d,moreMarginTops:f}=vI(SM(e.fgEventSegs,r.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,r.eventOrderStrict,t.segHeights,t.maxContentHeight,e.cells),p=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return Z(`tr`,{ref:this.rootElRef,role:`row`},e.renderIntro&&e.renderIntro(),e.cells.map((t,n)=>{let r=this.renderFgSegs(n,e.forPrint?l[n]:u[n],e.todayRange,p),i=this.renderFgSegs(n,wI(c[n],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return Z(pI,{key:t.key,elRef:this.cellElRefs.createRef(t.key),innerElRef:this.frameElRefs.createRef(t.key),dateProfile:e.dateProfile,date:t.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&n===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:t.extraRenderProps,extraDataAttrs:t.extraDataAttrs,extraClassNames:t.extraClassNames,extraDateSpan:t.extraDateSpan,moreCnt:d[n],moreMarginTop:f[n],singlePlacements:l[n],fgContentElRef:this.fgElRefs.createRef(t.key),fgContent:Z(tD,null,Z(tD,null,r),Z(tD,null,i)),bgContent:Z(tD,null,this.renderFillSegs(s[n],`highlight`),this.renderFillSegs(a[n],`non-business`),this.renderFillSegs(o[n],`bg-event`)),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let n=this.props;this.updateSizing(!xA(e,n))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,n,r,i,a,o){let{context:s}=this,{eventSelection:c}=this.props,{framePositions:l}=this.state,u=this.props.cells.length===1,d=i||a||o,f=[];if(l)for(let e of t){let{seg:t}=e,{instanceId:p}=t.eventRange.instance,m=e.isVisible&&!r[p],h=e.isAbsolute,g=``,_=``;h&&(s.isRtl?(_=0,g=l.lefts[t.lastCol]-l.lefts[t.firstCol]):(g=0,_=l.rights[t.firstCol]-l.rights[t.lastCol])),f.push(Z(`div`,{className:`fc-daygrid-event-harness`+(h?` fc-daygrid-event-harness-abs`:``),key:gI(t),ref:d?null:this.segHarnessRefs.createRef(_I(t)),style:{visibility:m?``:`hidden`,marginTop:h?``:e.marginTop,top:h?e.absoluteTop:``,left:g,right:_}},oI(t)?Z(cI,Object.assign({seg:t,isDragging:i,isSelected:p===c,defaultDisplayEventEnd:u},OM(t,n))):Z(sI,Object.assign({seg:t,isDragging:i,isResizing:a,isDateSelecting:o,isSelected:p===c,defaultDisplayEventEnd:u},OM(t,n)))))}return f}renderFillSegs(e,t){let{isRtl:n}=this.context,{todayRange:r}=this.props,{framePositions:i}=this.state,a=[];if(i)for(let o of e){let e=n?{right:0,left:i.lefts[o.lastCol]-i.lefts[o.firstCol]}:{left:0,right:i.rights[o.firstCol]-i.rights[o.lastCol]};a.push(Z(`div`,{key:AM(o.eventRange),className:`fc-daygrid-bg-harness`,style:e},t===`bg-event`?Z(nP,Object.assign({seg:o},OM(o,r))):iP(t)))}return Z(tD,{},...a)}updateSizing(e){let{props:t,state:n,frameElRefs:r}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let e=t.cells.map(e=>r.currentMap[e.key]);if(e.length){let t=this.rootElRef.current,r=new uN(t,e,!0,!1);n.framePositions&&n.framePositions.similarTo(r)||this.setState({framePositions:new uN(t,e,!0,!1)})}}let i=this.state.segHeights,a=this.querySegHeights(),o=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},i),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let n in e){let r=Math.round(e[n].getBoundingClientRect().height);t[n]=Math.max(t[n]||0,r)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};CI.addStateEquality({segHeights:xA});function wI(e,t){if(!e.length)return[];let n=TI(t);return e.map(e=>({seg:e,isVisible:!0,isAbsolute:!0,absoluteTop:n[e.eventRange.instance.instanceId],marginTop:0}))}function TI(e){let t={};for(let n of e)for(let e of n)t[e.seg.eventRange.instance.instanceId]=e.absoluteTop;return t}var EI=class extends fN{constructor(){super(...arguments),this.splitBusinessHourSegs=Q(nI),this.splitBgEventSegs=Q(DI),this.splitFgEventSegs=Q(nI),this.splitDateSelectionSegs=Q(nI),this.splitEventDrag=Q(iI),this.splitEventResize=Q(iI),this.rowRefs=new NN}render(){let{props:e,context:t}=this,n=e.cells.length,r=this.splitBusinessHourSegs(e.businessHourSegs,n),i=this.splitBgEventSegs(e.bgEventSegs,n),a=this.splitFgEventSegs(e.fgEventSegs,n),o=this.splitDateSelectionSegs(e.dateSelectionSegs,n),s=this.splitEventDrag(e.eventDrag,n),c=this.splitEventResize(e.eventResize,n),l=n>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return Z(YM,{unit:`day`},(t,u)=>Z(tD,null,e.cells.map((t,d)=>Z(CI,{ref:this.rowRefs.createRef(d),key:t.length?t[0].date.toISOString():d,showDayNumbers:n>1,showWeekNumbers:e.showWeekNumbers,todayRange:u,dateProfile:e.dateProfile,cells:t,renderIntro:e.renderRowIntro,businessHourSegs:r[d],eventSelection:e.eventSelection,bgEventSegs:i[d],fgEventSegs:a[d],dateSelectionSegs:o[d],eventDrag:s[d],eventResize:c[d],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:l,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){let e=this.rowRefs.currentMap[0].getCellEls()[0],t=e?e.closest(`.fc-daygrid-body`):null;t&&(this.rootEl=t,this.context.registerInteractiveComponent(this,{el:t,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&=(this.context.unregisterInteractiveComponent(this),null)}prepareHits(){this.rowPositions=new uN(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new uN(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:n,rowPositions:r}=this,i=n.leftToIndex(e),a=r.topToIndex(t);if(a!=null&&i!=null){let e=this.props.cells[a][i];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,i),allDay:!0},e.extraDateSpan),dayEl:this.getCellEl(a,i),rect:{left:n.lefts[i],right:n.rights[i],top:r.tops[a],bottom:r.bottoms[a]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let n=this.props.cells[e][t].date;return{start:n,end:lk(n,1)}}};function DI(e,t){return nI(e.filter(OI),t)}function OI(e){return e.eventRange.def.allDay}var kI=class extends fN{constructor(){super(...arguments),this.elRef=eD(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:n,expandRows:r}=e,i=n===!0||t===!0;i&&!r&&(i=!1,t=null,n=null);let a=[`fc-daygrid-body`,i?`fc-daygrid-body-balanced`:`fc-daygrid-body-unbalanced`,r?``:`fc-daygrid-body-natural`];return Z(`div`,{ref:this.elRef,className:a.join(` `),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Z(`table`,{role:`presentation`,className:`fc-scrollgrid-sync-table`,style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:r?e.clientHeight:``}},e.colGroupNode,Z(`tbody`,{role:`presentation`},Z(EI,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:n,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile===this.props.dateProfile?this.flushScrollReset():this.requestScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=AI(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(`.fc-daygrid-body`),n=t.closest(`.fc-scroller`),r=e.getBoundingClientRect().top-t.getBoundingClientRect().top;n.scrollTop=r?r+1:0}this.needsScrollReset=!1}}};function AI(e,t){let n;return t.currentRangeUnit.match(/year|month/)&&(n=e.querySelector(`[data-date="${Pk(t.currentDate)}-01"]`)),n||=e.querySelector(`[data-date="${Nk(t.currentDate)}"]`),n}var jI=class extends kN{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},MI=class extends fN{constructor(){super(...arguments),this.slicer=new jI,this.tableRef=eD()}render(){let{props:e,context:t}=this;return Z(kI,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},NI=class extends tI{constructor(){super(...arguments),this.buildDayTableModel=Q(PI),this.headerRef=eD(),this.tableRef=eD()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:n}=this,r=this.buildDayTableModel(n.dateProfile,t),i=e.dayHeaders&&Z(TN,{ref:this.headerRef,dateProfile:n.dateProfile,dates:r.headerDates,datesRepDistinctDays:r.rowCnt===1}),a=t=>Z(MI,{ref:this.tableRef,dateProfile:n.dateProfile,dayTableModel:r,businessHours:n.businessHours,dateSelection:n.dateSelection,eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!n.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:n.forPrint});return e.dayMinWidth?this.renderHScrollLayout(i,a,r.colCnt,e.dayMinWidth):this.renderSimpleLayout(i,a)}};function PI(e,t){return new ON(new DN(e.renderRange,t),/year|month|week/.test(e.currentRangeUnit))}var FI=class extends fj{buildRenderRange(e,t,n){let r=super.buildRenderRange(e,t,n),{props:i}=this;return II({currentRange:r,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:i.fixedWeekCount,dateEnv:i.dateEnv})}};function II(e){let{dateEnv:t,currentRange:n}=e,{start:r,end:i}=n,a;if(e.snapToWeek&&(r=t.startOfWeek(r),a=t.startOfWeek(i),a.valueOf()!==i.valueOf()&&(i=ck(a,1))),e.fixedWeekCount){let e=t.startOfWeek(t.startOfMonth(lk(n.end,-1))),r=Math.ceil(dk(e,i));i=ck(i,6-r)}return{start:r,end:i}}hO(`:root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}`);var LI=DP({name:`@fullcalendar/daygrid`,initialView:`dayGridMonth`,views:{dayGrid:{component:NI,dateProfileGeneratorClass:FI},dayGridDay:{type:`dayGrid`,duration:{days:1}},dayGridWeek:{type:`dayGrid`,duration:{weeks:1}},dayGridMonth:{type:`dayGrid`,duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:`dayGrid`,duration:{years:1}}}});function RI(e){let t=new Date(`${e}T00:00:00Z`);return t.setUTCDate(t.getUTCDate()+1),t.toISOString().slice(0,10)}function zI(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function BI(e){let t=e.start??e.due,n=e.due??e.start;if(t!==void 0&&n!==void 0)return{start:t,end:RI(n)};if(e.closed===void 0)return null;let r=zI(e.closed);return{start:r,end:RI(r)}}var VI=e=>e.filter(e=>BI(e)!==null).length;function HI({entries:e,multiProject:t,selected:n,onSelect:r}){let i=e.flatMap(({project:e,item:t,colour:n})=>{let r=BI(t);return r===null?[]:[{id:`${e}:${t.id}`,title:t.title,start:r.start,end:r.end,allDay:!0,backgroundColor:n,borderColor:n,extendedProps:{project:e,item:t}}]}),a=(e,t)=>n?.project===e&&n.ref===t;return(0,b.jsx)(`div`,{className:`cal`,children:(0,b.jsx)(QF,{plugins:[LI],initialView:`dayGridMonth`,headerToolbar:{left:`prev,next today`,center:`title`,right:`dayGridMonth,dayGridWeek`},buttonText:{today:`today`,month:`month`,week:`week`},timeZone:`UTC`,firstDay:1,height:`100%`,events:i,eventContent:({event:e})=>{let{project:n,item:r}=e.extendedProps,i=gw[r.status];return(0,b.jsxs)(`div`,{className:`cal__event`,"data-strike":i.strike,"data-on":a(n,r.id),title:`${r.id} [${i.label}] ${r.title}`,children:[(0,b.jsx)(`span`,{className:`cal__icon`,children:i.icon}),(0,b.jsx)(`span`,{className:`cal__ref`,children:t?`${n}:${r.id}`:r.id}),(0,b.jsx)(`span`,{className:`cal__title`,children:r.title})]})},eventClick:({event:e,jsEvent:t})=>{t.preventDefault();let{project:n,item:i}=e.extendedProps;r(n,i.id)},dayMaxEvents:!0})})}var UI={full:`55.9 59.4 271 154.5`,icon:`111.4 56.7 160 160`};function WI({className:e,crop:t=`full`}){return(0,b.jsx)(`svg`,{className:e,viewBox:UI[t],"aria-hidden":`true`,focusable:`false`,children:(0,b.jsxs)(`g`,{transform:`matrix(0.1, 0, 0, -0.1, 62.431001, 269.861486)`,fill:`currentColor`,children:[(0,b.jsx)(`path`,{d:`M 1191.17 2095.39 C 1155.17 2079.39 1133.17 2038.39 1142.17 2001.39 C 1150.17 1970.39 1184.17 1929.39 1202.17 1929.39 C 1211.17 1929.39 1236.17 1881.39 1236.17 1863.39 C 1236.17 1861.39 1206.17 1859.39 1169.17 1859.39 C 1053.17 1858.39 976.178 1816.39 936.178 1733.39 C 917.178 1692.39 915.178 1672.39 918.178 1588.39 C 921.178 1498.39 923.178 1488.39 952.178 1447.39 C 975.178 1416.39 999.178 1398.39 1037.17 1382.39 C 1086.17 1362.39 1108.17 1360.39 1273.17 1359.39 C 1486.17 1359.39 1543.17 1369.39 1593.17 1412.39 C 1647.17 1459.39 1666.17 1509.39 1666.17 1606.39 C 1666.17 1719.39 1638.17 1778.39 1562.17 1827.39 C 1526.17 1850.39 1509.17 1854.39 1415.17 1857.39 L 1309.17 1861.39 L 1297.17 1900.39 C 1287.17 1933.39 1288.17 1943.39 1301.17 1961.39 C 1323.17 1994.39 1320.17 2044.39 1294.17 2073.39 C 1265.17 2105.39 1230.17 2112.39 1191.17 2095.39 Z M 1359.17 1799.39 C 1419.17 1798.39 1469.17 1779.39 1452.17 1762.39 C 1448.17 1757.39 1386.17 1753.39 1315.17 1752.39 C 1243.17 1750.39 1176.17 1744.39 1165.17 1739.39 C 1123.17 1716.39 1111.17 1681.39 1110.17 1572.39 C 1110.17 1516.39 1106.17 1466.39 1102.17 1462.39 C 1098.17 1457.39 1086.17 1465.39 1075.17 1478.39 C 1060.17 1496.39 1056.17 1517.39 1056.17 1580.39 C 1056.17 1655.39 1055.17 1660.39 1031.17 1671.39 C 1017.18 1677.39 1006.18 1690.39 1006.18 1699.39 C 1006.18 1726.39 1062.17 1771.39 1108.17 1781.39 C 1167.17 1794.39 1268.17 1807.39 1284.17 1802.39 C 1292.17 1801.39 1325.17 1799.39 1359.17 1799.39 Z M 1314.17 1657.39 C 1321.17 1650.39 1326.17 1624.39 1326.17 1599.39 C 1326.17 1549.39 1313.17 1529.39 1282.17 1529.39 C 1249.17 1529.39 1236.17 1543.39 1230.17 1580.39 C 1221.17 1632.39 1240.17 1669.39 1274.17 1669.39 C 1289.17 1669.39 1307.17 1664.39 1314.17 1657.39 Z M 1545.17 1655.39 C 1552.17 1647.39 1556.17 1620.39 1554.17 1593.39 C 1551.17 1539.39 1528.17 1516.39 1499.17 1535.39 C 1476.17 1549.39 1468.17 1648.39 1488.17 1660.39 C 1508.17 1673.39 1532.17 1671.39 1545.17 1655.39 Z`}),(0,b.jsx)(`path`,{d:`M -65.514 1330.67 C -65.514 1290.67 -61.514 1279.67 -47.514 1276.67 C -30.514 1271.67 -28.514 1256.67 -26.514 1089.67 C -24.514 912.673 -24.514 908.673 -44.514 908.673 C -64.514 908.673 -65.514 902.673 -65.514 804.673 C -65.514 713.673 -63.514 699.673 -47.514 694.673 C -24.514 687.673 155.486 653.673 274.486 634.673 C 939.486 526.673 1794.49 535.673 2469.49 659.673 C 2557.49 675.673 2632.49 688.673 2637.49 688.673 C 2641.49 688.673 2644.49 738.673 2644.49 798.673 C 2644.49 898.673 2642.49 909.673 2627.49 906.673 C 2610.49 903.673 2609.49 918.673 2606.49 1086.67 C 2604.49 1263.67 2604.49 1270.67 2624.49 1275.67 C 2640.49 1279.67 2644.49 1289.67 2644.49 1324.67 C 2644.49 1348.67 2639.49 1368.67 2633.49 1368.67 C 2628.49 1368.67 2593.49 1361.67 2556.49 1353.67 C 2183.49 1272.67 1745.49 1228.67 1184.49 1217.67 C 1069.49 1215.67 622.486 1255.67 389.486 1289.67 C 252.486 1309.67 -42.514 1365.67 -57.514 1374.67 C -62.514 1377.67 -65.514 1357.67 -65.514 1330.67 Z M 169.486 1234.67 C 213.486 1226.67 278.486 1215.67 314.486 1209.67 C 350.486 1204.67 396.486 1196.67 417.486 1193.67 L 454.486 1187.67 L 454.486 1006.67 L 454.486 826.673 L 397.486 832.673 C 336.486 839.673 119.486 874.673 72.486 884.673 L 44.486 890.673 L 44.486 1043.67 C 44.486 1221.67 49.486 1261.67 73.486 1254.67 C 82.486 1251.67 125.486 1243.67 169.486 1234.67 Z M 2526.49 1123.67 C 2527.49 1054.67 2528.49 972.673 2529.49 941.673 L 2529.49 883.673 L 2394.49 862.673 C 2320.49 850.673 2226.49 837.673 2186.49 833.673 L 2114.49 826.673 L 2116.49 1004.67 L 2119.49 1182.67 L 2154.49 1189.67 C 2173.49 1193.67 2250.49 1206.67 2324.49 1218.67 C 2398.49 1230.67 2461.49 1242.67 2463.49 1244.67 C 2465.49 1246.67 2480.49 1248.67 2496.49 1248.67 L 2524.49 1248.67 L 2526.49 1123.67 Z M 709.486 1158.67 C 759.486 1153.67 829.486 1148.67 866.486 1148.67 C 971.486 1148.67 964.486 1161.67 964.486 962.673 L 964.486 788.673 L 922.486 788.673 C 871.486 788.673 612.486 807.673 567.486 814.673 L 534.486 819.673 L 534.486 992.673 C 534.486 1087.67 537.486 1167.67 540.486 1170.67 C 543.486 1173.67 562.486 1174.67 582.486 1172.67 C 602.486 1170.67 660.486 1164.67 709.486 1158.67 Z M 2042.49 995.673 L 2044.49 819.673 L 2012.49 814.673 C 1956.49 805.673 1739.49 788.673 1680.49 788.673 L 1624.49 788.673 L 1626.49 966.673 L 1629.49 1143.67 L 1744.49 1150.67 C 1807.49 1154.67 1895.49 1162.67 1939.49 1166.67 C 1983.49 1171.67 2024.49 1174.67 2029.49 1173.67 C 2035.49 1172.67 2040.49 1103.67 2042.49 995.673 Z M 1542.49 961.673 L 1539.49 783.673 L 1294.49 783.673 L 1049.49 783.673 L 1046.49 961.673 L 1044.49 1138.67 L 1294.49 1138.67 L 1544.49 1138.67 L 1542.49 961.673 Z`})]})})}function GI({projectKey:e,colours:t,hidden:n,titleOf:r,query:i,onQuery:a,onPick:o,onClose:s}){let[c,l]=(0,_.useState)([]),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(`idle`),[m,h]=(0,_.useState)(0),g=(0,_.useRef)(null);(0,_.useEffect)(()=>g.current?.focus(),[]),(0,_.useEffect)(()=>{if(i.trim()===``){l([]),p(`idle`);return}let t=new AbortController,n=setTimeout(()=>{p(`searching`),Eb(e,i,t.signal).then(e=>{if(e===null)return p(`unavailable`);l(e.hits),d(e.relaxed),h(0),p(`done`)}).catch(e=>{e.name!==`AbortError`&&p(`unavailable`)})},120);return()=>{clearTimeout(n),t.abort()}},[e,i]);let v=e=>e.source===`context`||e.ref!==null,y=e=>{e!==void 0&&v(e)&&o(e)};return(0,b.jsxs)(`aside`,{className:`detail search`,"aria-label":`Search`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Search`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:s,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`input`,{ref:g,className:`search__input`,type:`search`,placeholder:`Search items, comments and context, or type a ref`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{if(e.key===`Escape`)s();else if(e.key===`ArrowDown`)h(e=>Math.min(e+1,c.length-1));else if(e.key===`ArrowUp`)h(e=>Math.max(e-1,0));else if(e.key===`Enter`)y(c[m]);else return;e.preventDefault()},"aria-label":`Search`}),f===`unavailable`&&(0,b.jsx)(`div`,{className:`search__note`,children:`This server cannot search. Reconnect it to pick up the newer code.`}),f===`done`&&c.length===0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing matches.`}),f===`done`&&u&&c.length>0&&(0,b.jsx)(`div`,{className:`search__note`,children:`Nothing has every word, so these have some of them.`}),c.length>0&&(0,b.jsx)(`ul`,{className:`search__hits`,role:`listbox`,children:c.map((e,i)=>(0,b.jsx)(`li`,{role:`option`,"aria-selected":i===m,children:(0,b.jsxs)(`button`,{className:`search__hit`,"data-active":i===m,disabled:!v(e),onMouseEnter:()=>h(i),onClick:()=>y(e),children:[(0,b.jsxs)(`span`,{className:`search__line`,children:[(0,b.jsx)(`span`,{className:`search__source`,children:e.source===`context`?`context`:e.source===`comment`?e.audience===`agent`?`agent comment`:`comment`:`item`}),e.ref!==null&&(0,b.jsx)(`span`,{className:`search__ref`,style:{color:t[e.ref.split(`-`)[0]??``]},children:e.ref}),(0,b.jsx)(`span`,{className:`search__title`,children:e.source===`context`?e.id:e.title??(e.ref===null?``:r(e.ref))}),e.ref!==null&&n.has(e.ref)&&(0,b.jsx)(`span`,{className:`search__hidden`,children:`hidden`})]}),e.snippet!==``&&(0,b.jsx)(`span`,{className:`search__snippet`,children:KI(e.snippet)})]})},`${e.source}:${e.id}`))})]})}function KI(e){return e.replace(/\*\*|__/g,``).split(/⟦|⟧/).map((e,t)=>t%2==1?(0,b.jsx)(`mark`,{children:e},t):e)}var qI=e=>new Date(e).toLocaleDateString(void 0,{day:`numeric`,month:`short`,year:`numeric`});function JI({comments:e,open:t,onToggle:n}){let[r,i]=(0,_.useState)(!1),a=e.filter(e=>e.audience===`agent`).length,o=r?e:e.filter(e=>e.audience!==`agent`);return(0,b.jsxs)(mb,{title:`Comments`,count:e.length,open:t,onToggle:n,children:[o.length===0&&a===0&&(0,b.jsx)(`p`,{className:`comments__empty`,children:`No comments on this item yet.`}),(0,b.jsx)(`ul`,{className:`comments`,children:o.map(e=>(0,b.jsxs)(`li`,{className:`comment`,"data-agent":e.audience===`agent`,children:[(0,b.jsxs)(`div`,{className:`comment__meta`,children:[(0,b.jsx)(`span`,{children:e.actor}),(0,b.jsx)(`span`,{children:qI(e.at)}),e.audience===`agent`&&(0,b.jsx)(`span`,{className:`comment__tag`,children:`Claude's note`})]}),(0,b.jsx)(`div`,{className:`comment__body`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:e.body})})]},e.id))}),a>0&&(0,b.jsx)(`button`,{className:`comments__toggle`,onClick:()=>i(e=>!e),children:r?`Hide Claude's ${a===1?`note`:`${a} notes`}`:`Show Claude's ${a===1?`note`:`${a} notes`}`})]})}var YI=Object.keys(gw);function XI({area:e,name:t,description:n,colour:r,items:i,next:a,hidden:o,onPick:s,onZoom:c,onClose:l}){let u=new Map(YI.map(e=>[e,i.filter(t=>t.status===e).length])),d=i.filter(e=>e.status!==`done`),f=u.get(`done`)??0,p=(e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":o.has(e.id),onClick:()=>s(e),title:e.title,children:[(0,b.jsx)(`span`,{className:`next__pos`,style:typeof t==`string`?{color:gw[e.status].colour}:void 0,children:t}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:r},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id);return(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Area ${e}`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`div`,{className:`area-pane__tools`,children:(0,b.jsxs)(`button`,{className:`chip area-pane__zoom`,onClick:c,children:[(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.6`,fill:`currentColor`}),(0,b.jsx)(`path`,{d:`M8 0.5v2.5M8 13v2.5M0.5 8h2.5M13 8h2.5`,stroke:`currentColor`,strokeWidth:`1.5`})]}),`fit to view`]})}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:l,"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title area-pane__title`,children:t!==void 0&&t!==e?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`span`,{style:{color:r},children:t}),(0,b.jsx)(`span`,{className:`area-pane__key`,children:e})]}):(0,b.jsx)(`span`,{style:{color:r},children:e})}),(0,b.jsxs)(`div`,{className:`area-pane__progress`,children:[(0,b.jsx)(`div`,{className:`area-pane__bar`,role:`img`,"aria-label":`${f} of ${i.length} done`,children:YI.map(e=>(u.get(e)??0)>0?(0,b.jsx)(`span`,{style:{flexGrow:u.get(e),background:gw[e].colour},title:`${u.get(e)} ${gw[e].label}`},e):null)}),(0,b.jsx)(`div`,{className:`area-pane__counts`,children:YI.filter(e=>(u.get(e)??0)>0).map(e=>(0,b.jsxs)(`span`,{children:[(0,b.jsx)(`span`,{style:{color:gw[e].colour},children:gw[e].icon}),` `,u.get(e),` `,gw[e].label]},e))})]}),n!==void 0&&n!==``&&(0,b.jsx)(`div`,{className:`detail__doc area-pane__description`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:n})}),a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:`In the next list`}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:a.map(({item:e,position:t})=>p(e,t))})]}),(0,b.jsx)(`div`,{className:`settings__label area-pane__label`,children:d.length===0?`Nothing open`:`Open (${d.length})`}),d.length>0&&(0,b.jsx)(`ul`,{className:`next__list area-pane__list`,children:d.map(e=>p(e,gw[e.status].icon))})]})}var ZI={cardsFrom:.35,cardsTo:.1,overviewFrom:.35,overviewTo:.1},QI=(e,t,n)=>t===n?+(e<=n):Math.min(Math.max((t-e)/(t-n),0),1);function $I(){let e=W(e=>e.transform[2]),t=W(e=>e.domNode);return(0,_.useEffect)(()=>{if(t===null)return;let n=1-QI(e,ZI.cardsFrom,ZI.cardsTo);t.style.setProperty(`--cards`,n.toFixed(3)),t.style.setProperty(`--overview`,QI(e,ZI.overviewFrom,ZI.overviewTo).toFixed(3)),t.dataset.far=String(n<.5)},[e,t]),null}var eL={item:xE,area:SE,ticket:TE,ghost:EE,overview:wE},tL=Object.keys(gw),nL=[`status`,`area`],rL=20,iL=[],aL=[],oL=[],sL=[`graph`,`calendar`],cL=e=>(0,b.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:e}),lL=()=>cL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`16`,rx:`2`}),(0,b.jsx)(`path`,{d:`M3 10h18M8 3v4M16 3v4`})]})),uL=()=>cL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.5`}),(0,b.jsx)(`circle`,{cx:`9`,cy:`18`,r:`2.5`}),(0,b.jsx)(`path`,{d:`M8.3 7.2l7.4 0.6M7 8.4l1.6 7.2`})]})),dL=()=>cL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`6.5`}),(0,b.jsx)(`path`,{d:`M20 20l-4.2-4.2`})]})),fL=()=>cL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M4 7h10M18 7h2M4 17h4M12 17h8`}),(0,b.jsx)(`circle`,{cx:`16`,cy:`7`,r:`2`}),(0,b.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2`})]})),pL=()=>cL((0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`path`,{d:`M9 4l-6 2v14l6-2 6 2 6-2V4l-6 2-6-2z`}),(0,b.jsx)(`path`,{d:`M9 4v14M15 6v14`})]}));function mL(e,t,n){let[r,i]=(0,_.useState)(()=>{try{let r=localStorage.getItem(e);return n.includes(r)?r:t}catch{return t}});return[r,(0,_.useCallback)(t=>{i(t);try{localStorage.setItem(e,t)}catch{}},[e])]}var hL=e=>new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,timeZone:`UTC`});function gL({plan:e,selection:t,focus:n,reload:r}){let i=t.project,{MenuActions:a,EmptyPlan:o}=hw(),s=i?.key??``,c=i?.items??aL,l=(0,_.useMemo)(()=>bw(c),[c]),u=(0,_.useMemo)(()=>xT(l,i?.areaOrder),[l,i?.areaOrder]),d=e=>{let t=i?.areaInfo[e]?.name;return t===void 0||t===e?null:t},[f,p]=(0,_.useState)(new Set),[m,h]=(0,_.useState)(new Set([`done`])),[g,v]=(0,_.useState)(`area`),[y,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(()=>n===null&&(typeof window>`u`||window.innerWidth>=700)?`next`:null),[w,T]=(0,_.useState)(``),[E,D]=(0,_.useState)(null);(0,_.useEffect)(()=>{let e=e=>{let t=e.target,n=t!==null&&(t.isContentEditable||[`INPUT`,`TEXTAREA`,`SELECT`].includes(t.tagName));!(e.key===`k`&&(e.metaKey||e.ctrlKey)||e.key===`/`&&!n)||n&&e.key===`/`||(e.preventDefault(),L(`search`))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,_.useEffect)(()=>{if(!y)return;let e=e=>e.key===`Escape`&&x(!1);return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y]);let[O,k]=mL(`attraverso.lock`,`selected`,[`selected`,`free`]),A=O===`selected`,[j,M]=(0,_.useState)(Fb(n)===null?n:null),[N,P]=(0,_.useState)(()=>{let e=Fb(n);return e===null?null:{heading:e}}),F=(0,_.useCallback)(e=>{M(null),ee(null),C(null),P({heading:e})},[]),[I,ee]=(0,_.useState)(null),te=(0,_.useCallback)(e=>{M(null),P(null),C(null),ee(e)},[]);function L(e){M(null),P(null),ee(null),C(e)}let ne=e=>{D(null),typeof e==`string`?L(e):te(e.area)};(0,_.useEffect)(()=>{j!==null&&(P(null),ee(null),C(null))},[j]);let R=N?.heading??null;(0,_.useEffect)(()=>{if(i===null)return;let e=`#${encodeURIComponent(i.key)}`,t=R===null?null:`${e}/${encodeURIComponent(Pb+R)}`,n=window.location.hash;t!==null&&n!==t&&history.replaceState(null,``,t),t===null&&Fb(decodeURIComponent(n.slice(e.length+1)))!==null&&history.replaceState(null,``,e)},[R,i]);let[z,re]=(0,_.useState)(new Set),ie=(0,_.useCallback)(e=>{re(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]);(0,_.useEffect)(()=>{let e=j?.split(`-`)[0];e!==void 0&&ie(e)},[j,ie]),(0,_.useEffect)(()=>{let e=Fb(n);e===null?M(n):F(e)},[n,F]);let[B,ae]=mL(`attraverso.view`,`graph`,sL),oe=B===`graph`?`calendar`:`graph`,se=typeof window<`u`&&window.innerWidth<700,[ce,le]=mL(se?`attraverso.minimap.narrow`:`attraverso.minimap.wide`,se?`hidden`:`shown`,[`shown`,`hidden`]),[ue,de]=mL(`attraverso.calendar.span`,`all`,[`project`,`all`]),fe=ue===`all`&&e.projects.length>1,[pe,me]=(0,_.useState)(null),[he,ge]=(0,_.useState)(null),[_e,ve]=(0,_.useState)(0),[ye,be]=(0,_.useState)(()=>new Set([`images`,`comments`])),xe=e=>({open:!ye.has(e),onToggle:()=>be(t=>ut(t,e))}),Se=(0,_.useMemo)(()=>(i?.next??oL).flatMap(e=>c.find(t=>t.id===e)??[]),[i,c]),Ce=S===`next`&&Se.length===0?null:S,[we,Te]=(0,_.useState)(()=>{try{let e=Number(window.localStorage.getItem(_L));return e>=yL?e:vL}catch{return vL}}),Ee=e=>{e.preventDefault();let t=e.clientX,n=we,r=n,i=e=>{r=Math.round(Math.min(Math.max(n+t-e.clientX,yL),window.innerWidth-80)),Te(r)},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a);try{window.localStorage.setItem(_L,String(r))}catch{}};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},De=(0,_.useMemo)(()=>{let e=new Set;for(let t of c)for(let n of t.deps)e.add(n).add(t.id);return e},[c]),Oe=(0,_.useMemo)(()=>c.filter(e=>!f.has(e.area)&&!m.has(e.status)),[c,f,m]),ke=(0,_.useMemo)(()=>{let e=new Map;for(let t of c){if(!t.parent)continue;let n=e.get(t.parent);n?n.push(t):e.set(t.parent,[t])}let t=e=>f.has(e.area)||m.has(e.status),n=new Map,r=i=>{let a=n.get(i.id);if(a!==void 0)return a;let o=e.get(i.id),s=o?o.every(r):t(i);return n.set(i.id,s),s},i=new Set;for(let e of c)r(e)&&i.add(e.id);return i},[c,f,m]),Ae=(0,_.useMemo)(()=>{let e=(e,t)=>e===t||e.startsWith(`${t}.`)||t.startsWith(`${e}.`),t=new Map,n=(e,n)=>{let r=t.get(e)??new Set;r.add(n),t.set(e,r)};for(let t of c)for(let r of t.deps)e(r,t.id)||(ke.has(t.id)&&!ke.has(r)&&n(r,t.id),ke.has(r)&&!ke.has(t.id)&&n(t.id,r));return t},[c,ke]),[je,Me]=Ef([]),Ne=(0,_.useRef)(null),[Pe,Fe]=(0,_.useState)(null);(0,_.useEffect)(()=>{if(Pe===null||Ne.current===null)return;let e=je.find(e=>e.id===Pe);if(e===void 0||e.hidden===!0)return;let t=Pe.startsWith(`area:`);Ne.current.fitView({nodes:[{id:Pe}],duration:400,maxZoom:t?1.2:1.1,padding:t?.08:.6}),Fe(null)},[Pe,je]);let Ie=e=>{p(t=>t.has(e)?ut(t,e):t),Fe(`area:${e}`),se&&x(!1)},[Le,Re,ze]=Df([]),Be=(0,_.useMemo)(()=>bb(),[]),Ve=(0,_.useRef)(Be?i?.layout??{}:(()=>{let e=NE(s);return Object.keys(e).length>0?e:i?.layout??{}})()),He=(0,_.useRef)(null),Ue=(0,_.useRef)(!1),We=(0,_.useCallback)(e=>{if(!Be)return PE(s,e);He.current!==null&&clearTimeout(He.current),He.current=setTimeout(()=>{He.current=null,Cb(s,e).catch(t=>{console.warn(`the layout could not be saved to the plan; keeping it in this browser`,t),PE(s,e)})},400)},[s,Be]),Ge=(0,_.useRef)(FE(s)),Ke=(0,_.useRef)(new Map),qe=(0,_.useRef)({}),Je=(0,_.useCallback)(e=>{let t=[],n=!1;for(let r of e)r.type===`position`?(r.position&&(qe.current[r.id]=r.position),r.dragging===!1&&t.push(r.id)):r.type===`dimensions`&&r.dimensions&&r.resizing!==void 0&&(Ge.current[r.id]=r.dimensions,r.resizing===!1&&(n=!0));n&&IE(s,Ge.current);let r=new Map(e.flatMap(e=>e.type===`dimensions`&&e.resizing!==void 0&&e.dimensions&&e.id.startsWith(`area:`)?[[`overview:${e.id.slice(5)}`,e.dimensions]]:[]));if(Me(t=>{let n=eu(e,t);return r.size===0?n:n.map(e=>{let t=r.get(e.id);return t===void 0?e:{...e,style:{...e.style,width:t.width,height:t.height}}})}),t.length>0){for(let e of t){let t=qe.current[e];t&&(Ve.current={...Ve.current,[e]:vE(Ke.current.get(e),t)}),delete qe.current[e]}Ue.current=!0,ve(e=>e+1)}},[s,Me]),Ye=(0,_.useCallback)(()=>{window.confirm(`Lay the map out afresh? Everything moves, including anything you arranged by hand.`)&&(LE(s),Ve.current={},Ge.current={},Ue.current=!0,ve(e=>e+1))},[s]),Xe=(0,_.useRef)(i?.layout??{});(0,_.useEffect)(()=>{let e=i?.layout??{};Be&&!bL(e,Xe.current)&&(Xe.current=e,He.current!==null||Ue.current||bL(e,Ve.current)||(Ve.current=e,ve(e=>e+1)))},[i?.layout,Be]),(0,_.useEffect)(()=>{let e=gE(c,l,u,g,j,ke,Ve.current);Ke.current=new Map(e.map(e=>[e.id,e.parentId]));let t=_E(e);(Ue.current||!bL(t,Ve.current))&&(Ue.current=!1,Ve.current=t,We(t));let n=c.filter(e=>!ke.has(e.id)),r=e;if(n.length<c.length||z.size>0){let i=new Map(e.map(e=>[e.id,e])),a=gE(n,bw(n),u,g,j,new Set,t,z),o=new Set(a.map(e=>e.id)),s=e=>e.type!==`ghost`&&z.has(e.type===`overview`?e.data.area:e.id.split(`-`)[0]??``);r=[...a.map(e=>e.type===`area`&&e.data.collapsed!==void 0?e:{...e,data:i.get(e.id)?.data??e.data}),...e.filter(e=>!o.has(e.id)).map(e=>s(e)?{...e,hidden:!0}:e)]}Me(e=>{let t=new Set(e.filter(e=>e.selected===!0).map(e=>e.id));return r.map(e=>{let n=Ge.current[e.type===`overview`?`area:${e.data.area}`:e.id],r=n?{...e,style:{...e.style,width:n.width,height:n.height}}:e,a=e.type===`area`||e.type===`overview`?i?.areaInfo[e.data.area]:void 0;return a!==void 0&&(r={...r,data:{...r.data,name:a.name,description:a.description}}),t.has(e.id)?{...r,selected:!0}:r})})},[c,l,u,g,j,ke,z,_e,We,Me,i?.areaInfo]),(0,_.useEffect)(()=>{Re(yE(c,u,g,j,pe,he,ke,z))},[c,u,g,j,pe,he,ke,z,Re]);let Ze=(0,_.useRef)(new Set);(0,_.useEffect)(()=>{let e=(pe?Ae.get(pe):void 0)??new Set,t=Ze.current;(e.size!==0||t.size!==0)&&(Me(n=>n.map(n=>{if(e.has(n.id))return{...n,hidden:!1,style:{...n.style,opacity:.42}};if(t.has(n.id)){let e={...n.style};return delete e.opacity,{...n,hidden:ke.has(n.id),style:e}}return n})),Ze.current=e)},[pe,Ae,ke,Me]);let Qe=(0,_.useMemo)(()=>A?je.map(e=>e.selected||e.id===j?{...e,draggable:!0}:e):je,[je,A,j]),$e=j?c.find(e=>e.id===j)??null:null,et=$e!==null||N!==null||I!==null||Ce!==null,tt=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=tt.current;if(!et||e===null)return;let t=()=>{let t=e.querySelector(`.detail`),n=t!==null&&t.scrollHeight-t.scrollTop-t.clientHeight>2;e.dataset.more=String(n)};t(),e.addEventListener(`scroll`,t,!0);let n=new MutationObserver(t);n.observe(e,{childList:!0,subtree:!0,characterData:!0});let r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener(`scroll`,t,!0),n.disconnect(),r.disconnect()}},[et]);let nt=(0,_.useMemo)(()=>xT(e.projects.map(e=>e.key)),[e.projects]),rt=(0,_.useMemo)(()=>fe?e.projects.flatMap(e=>e.items.filter(e=>!m.has(e.status)).map(t=>({project:e.key,item:t,colour:nt[e.key]}))):i?Oe.map(e=>({project:i.key,item:e,colour:g===`status`?gw[e.status].colour:u[e.area]})):[],[fe,e.projects,m,nt,i,Oe,g,u]),it=(0,_.useMemo)(()=>VI(rt.map(e=>e.item)),[rt]),at=(e,t)=>{e===i?.key?M(t):window.location.hash=`${encodeURIComponent(e)}/${encodeURIComponent(t)}`},[ot,st]=(0,_.useState)(null),ct=$e?.id??null;(0,_.useEffect)(()=>{if(ct===null||i===null)return st(null);let e=new AbortController;return st(e=>e!==null&&e.ref===ct?e:{ref:ct,state:`loading`}),Tb(i.key,ct,e.signal).then(e=>st(e??{ref:ct,state:`missing`})).catch(e=>{e.name!==`AbortError`&&st({ref:ct,state:`failed`})}),()=>e.abort()},[ct,i,e]);let lt=ot!==null&&`body`in ot&&ot.ref===ct?ot:null,ut=(e,t)=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n},dt=e=>{if(e.source===`context`)return F(e.id);let t=e.ref===null?void 0:c.find(t=>t.id===e.ref);t!==void 0&&(ft(t),D(`search`))},ft=e=>{ke.has(e.id)&&(h(t=>t.has(e.status)?ut(t,e.status):t),p(t=>t.has(e.area)?ut(t,e.area):t)),ae(`graph`),M(e.id),Fe(e.id)},pt=(e,t)=>{(t.type===`item`||t.type===`ticket`)&&(M(t.data.item.id),D(null));let n=t.data;t.type===`area`&&n.area!==void 0&&(n.collapsed===void 0?n.foreign!==!0&&te(n.area):ie(n.area))},mt=(e,t)=>{let n=t.data;if(t.type===`area`&&n.collapsed===void 0&&n.foreign!==!0&&n.area!==void 0){let e=n.area;re(t=>new Set(t).add(e)),j?.split(`-`)[0]===e&&M(null)}},ht=(e,t)=>{De.has(t.id)&&me(t.id)},gt=()=>me(null),_t=(e,t)=>ge(t.id),vt=()=>ge(null),yt=(0,_.useMemo)(()=>{let e=new Map,t=new Map;for(let n of c)e.set(n.area,(e.get(n.area)??0)+1),t.set(n.status,(t.get(n.status)??0)+1);return{byArea:e,byStatus:t}},[c]),bt=c.length-Oe.length;return(0,b.jsxs)(`div`,{className:`app`,children:[(0,b.jsxs)(`header`,{className:`topbar`,children:[(0,b.jsx)(`div`,{className:`topbar__title`,children:(0,b.jsxs)(`span`,{className:`picker-wrap`,children:[(0,b.jsx)(WI,{className:`picker__logo`,crop:`icon`}),(()=>{let t=i?.file??(e.storePath===null?null:e.storePath.split(`,`)[0].split(`/`).pop()),n=t!==null&&(0,b.jsx)(`span`,{className:`picker__file`,title:e.storePath??void 0,children:t});return e.projects.length<=1?(0,b.jsxs)(`span`,{className:`picker picker--static`,children:[(0,b.jsx)(`strong`,{className:`picker__name`,children:i?.name??`no project`}),n]}):(0,b.jsxs)(`label`,{className:`picker`,title:`Switch project`,children:[(0,b.jsx)(`span`,{className:`picker__name`,children:i?.name??`choose a project`}),n,(0,b.jsxs)(`select`,{className:`picker__native`,"aria-label":`Project`,value:i?.key??``,onChange:e=>{window.location.hash=e.target.value},children:[i===null&&(0,b.jsx)(`option`,{value:``,children:`choose a project`}),e.projects.map(e=>(0,b.jsx)(`option`,{value:e.key,children:e.name},e.key))]})]})})()]})}),(0,b.jsxs)(`div`,{className:`filters`,children:[(0,b.jsxs)(`button`,{className:`toolbtn`,"aria-label":`Show the ${oe}`,title:`Show the ${oe}`,onClick:()=>ae(oe),children:[(0,b.jsx)(`span`,{className:`toolbtn__main`,children:oe===`calendar`?(0,b.jsx)(lL,{}):(0,b.jsx)(uL,{})}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:oe})]}),(0,b.jsxs)(`button`,{className:`toolbtn`,"data-on":y,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-label":`View settings`,onClick:()=>x(e=>!e),children:[(0,b.jsxs)(`span`,{className:`toolbtn__main`,children:[(0,b.jsx)(fL,{}),`view`]}),(0,b.jsx)(`span`,{className:`toolbtn__sub`,children:bt>0?`${bt} hidden`:`all shown`})]})]}),y&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__backdrop`,onClick:()=>x(!1)}),(0,b.jsxs)(`div`,{className:`settings`,role:`dialog`,"aria-label":`View settings`,children:[(0,b.jsxs)(`div`,{className:`settings__head`,title:e.storePath??void 0,children:[i?.name??`No project`,e.storePath!==null&&` - ${i?.file??e.storePath.split(`/`).pop()}`]}),!(B===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Areas`}),!(B===`calendar`&&fe)&&(0,b.jsx)(`div`,{className:`filters__group`,children:l.map(e=>B===`graph`?(0,b.jsxs)(`span`,{className:`chip-pair`,"data-off":f.has(e),children:[(0,b.jsxs)(`button`,{className:`chip`,style:{"--area":u[e]},onClick:()=>Ie(e),title:f.has(e)?`Show ${e} and zoom to it`:`Zoom to ${e}`,children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)}),(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]}),(0,b.jsx)(`button`,{className:`chip chip--eye`,onClick:()=>p(t=>ut(t,e)),title:f.has(e)?`Show ${e}`:`Hide ${e}`,"aria-label":f.has(e)?`Show ${e}`:`Hide ${e}`,children:(0,b.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,"aria-hidden":`true`,children:[(0,b.jsx)(`path`,{d:`M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`}),(0,b.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`,fill:`currentColor`}),f.has(e)&&(0,b.jsx)(`path`,{d:`M2.5 13.5l11-11`,stroke:`currentColor`,strokeWidth:`1.4`})]})})]},e):(0,b.jsxs)(`button`,{className:`chip`,"data-off":f.has(e),style:{"--area":u[e]},onClick:()=>p(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),e,d(e)!==null&&(0,b.jsx)(`span`,{className:`chip__name`,children:d(e)}),(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byArea.get(e)})]},e))}),!(B===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`settings__row`,children:[(0,b.jsx)(`button`,{className:`chip`,disabled:f.size===0,onClick:()=>p(new Set),children:`show all`}),(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>f.has(e)),onClick:()=>p(new Set(l)),children:`hide all`})]}),(0,b.jsx)(`div`,{className:`settings__label`,children:`Statuses`}),(0,b.jsx)(`div`,{className:`filters__group`,children:tL.map(e=>(0,b.jsxs)(`button`,{className:`chip`,"data-off":m.has(e),style:{"--area":gw[e].colour},onClick:()=>h(t=>ut(t,e)),children:[(0,b.jsx)(`span`,{className:`chip__dot`}),gw[e].label,(0,b.jsx)(`span`,{className:`chip__count`,children:yt.byStatus.get(e)??0})]},e))}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[!(B===`calendar`&&fe)&&(0,b.jsxs)(`div`,{className:`segmented`,role:`group`,"aria-label":`Colour by`,children:[(0,b.jsx)(`span`,{className:`segmented__label`,children:`colour`}),nL.map(e=>(0,b.jsx)(`button`,{className:`segmented__btn`,"data-on":g===e,onClick:()=>v(e),children:e},e))]}),B===`calendar`&&e.projects.length>1&&(0,b.jsx)(`button`,{className:`chip`,"data-on":fe,onClick:()=>de(fe?`project`:`all`),title:`Show every project's dated items on one calendar, coloured by project`,children:`all projects`})]}),B===`graph`&&(0,b.jsx)(`div`,{className:`settings__label`,children:`Layout`}),(0,b.jsxs)(`div`,{className:`settings__row`,children:[B===`graph`&&(0,b.jsx)(`button`,{className:`chip`,"data-on":A,onClick:()=>k(A?`free`:`selected`),title:A?`Only the selected item moves. Click to let everything move`:`Everything moves. Click to move only the selected item`,children:A?`🔒 move selected only`:`🔓 move anything`}),B===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:z.size===0,onClick:()=>re(new Set),title:`Open every area. Click a folded area to open just that one`,children:`expand all`}),B===`graph`&&(0,b.jsx)(`button`,{className:`chip`,disabled:l.every(e=>z.has(e)),onClick:()=>{M(null),re(new Set(l))},title:`Fold every area into a summary. Double-click an open area's frame to fold just that one`,children:`collapse all`}),B===`graph`&&(0,b.jsx)(`button`,{className:`chip`,onClick:Ye,title:`Lay the map out afresh, forgetting where everything was`,children:`reset layout`})]}),a!==void 0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`settings__label`,children:`Plan`}),(0,b.jsx)(`div`,{className:`settings__row`,children:(0,b.jsx)(a,{plan:e,project:i,reload:r})})]})]})]})]}),(0,b.jsxs)(`div`,{className:`body`,"data-pane":et?`open`:void 0,children:[(0,b.jsxs)(`div`,{className:`graph`,children:[e.projects.length===0&&o!==void 0?(0,b.jsx)(`div`,{className:`graph__notice`,children:(0,b.jsx)(o,{reload:r})}):t.notice!==null&&!(B===`calendar`&&fe)?(0,b.jsx)(`div`,{className:`graph__notice`,children:t.notice}):B===`calendar`&&it===0&&(0,b.jsxs)(`div`,{className:`graph__notice`,children:[`Nothing here has a date yet. Give an item a `,(0,b.jsx)(`code`,{children:`due`}),` (or a `,(0,b.jsx)(`code`,{children:`start`}),`) with`,` `,(0,b.jsx)(`code`,{children:`edit_item`}),` and it appears on the calendar.`]}),B===`graph`&&i!==null&&(0,b.jsxs)(`div`,{className:`fabs`,children:[Se.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":Ce===`next`,onClick:()=>Ce===`next`?C(null):L(`next`),title:`The order agreed with set_next`,children:[`Next`,(0,b.jsx)(`span`,{className:`chip__count`,children:Se.length})]}),i!==null&&i.context.length>0&&(0,b.jsxs)(`button`,{className:`next-fab`,"data-on":N!==null,onClick:()=>N===null?F(null):P(null),title:`The project's context sections: what it is, and how it is worked on`,children:[`Context`,(0,b.jsx)(`span`,{className:`chip__count`,children:i.context.length})]}),(0,b.jsx)(`button`,{className:`next-fab next-fab--icon`,"data-on":Ce===`search`,"aria-label":`Search`,title:`Search (/ or Cmd+K)`,onClick:()=>Ce===`search`?C(null):L(`search`),children:(0,b.jsx)(dL,{})})]}),B===`calendar`?(0,b.jsx)(HI,{entries:rt,multiProject:fe,selected:i&&j?{project:i.key,ref:j}:null,onSelect:at}):(0,b.jsxs)(Tf,{nodes:Qe,edges:Le,nodeTypes:eL,onNodesChange:Je,onEdgesChange:ze,onInit:e=>Ne.current=e,onNodeClick:pt,onNodeDoubleClick:mt,zoomOnDoubleClick:!1,onNodeMouseEnter:ht,onNodeMouseLeave:gt,onEdgeMouseEnter:_t,onEdgeMouseLeave:vt,onPaneClick:()=>M(null),nodesDraggable:!A,nodesConnectable:!1,fitView:!0,snapToGrid:!0,snapGrid:[rL,rL],minZoom:.05,maxZoom:1.75,proOptions:{hideAttribution:!0},children:[(0,b.jsx)(Pf,{gap:rL,color:`#232a33`}),(0,b.jsx)($I,{}),ce===`shown`&&(0,b.jsx)(op,{pannable:!0,zoomable:!0,nodeColor:e=>e.type===`overview`?`transparent`:e.data.colour??`#2b3644`,nodeStrokeColor:`#0b0f14`,nodeBorderRadius:4,maskColor:`rgba(11,15,20,0.6)`}),(0,b.jsx)(Uf,{showInteractive:!1,children:(0,b.jsx)(Bf,{onClick:()=>le(ce===`shown`?`hidden`:`shown`),title:ce===`shown`?`Hide the minimap`:`Show the minimap`,"aria-label":ce===`shown`?`Hide the minimap`:`Show the minimap`,children:(0,b.jsx)(pL,{})})})]})]}),et&&(0,b.jsxs)(`div`,{className:`pane`,ref:tt,style:{width:we},children:[(0,b.jsx)(`div`,{className:`pane__resize`,onPointerDown:Ee,title:`Drag to resize`,"aria-hidden":`true`}),$e&&(0,b.jsxs)(`aside`,{className:`detail`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[E!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>ne(E),"aria-label":`Back to ${typeof E==`string`?E===`next`?`Next`:`Search`:E.area}`,title:`Back to ${typeof E==`string`?E===`next`?`Next`:`Search`:E.area}`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,style:{color:u[$e.area]},children:$e.id}),i&&(0,b.jsx)(zE,{projectKey:i.key,ref_:$e.id,status:$e.status,reload:r})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>M(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`h2`,{className:`detail__title`,children:$e.title}),($e.start!==void 0||$e.due!==void 0)&&(0,b.jsx)(`div`,{className:`detail__deps`,children:[$e.start&&`starts ${hL($e.start)}`,$e.due&&`due ${hL($e.due)}`].filter(Boolean).join(`, `)}),$e.deps.length>0&&(0,b.jsxs)(`div`,{className:`detail__deps`,children:[`depends on:`,` `,$e.deps.map((e,t)=>{let n=yw(e);return(0,b.jsxs)(`span`,{children:[t>0&&`, `,n===null?(0,b.jsx)(`button`,{className:`detail__dep`,onClick:()=>M(e),children:e}):(0,b.jsx)(`span`,{className:`detail__dep detail__dep--elsewhere`,title:`${n.ref} in the ${n.project} project, which is not open here`,children:e})]},e)})]}),(0,b.jsx)(`div`,{className:`detail__doc`,children:lt===null?(0,b.jsx)(`p`,{className:`detail__pending`,children:ot!==null&&`state`in ot&&ot.state===`missing`?`This item is no longer in the plan.`:ot!==null&&`state`in ot&&ot.state===`failed`?`Could not load this item. Try reopening it.`:`Loading…`}):(0,b.jsx)(lb,{remarkPlugins:[pw],children:lt.body})}),i&&(0,b.jsx)(Hb,{metrics:i.metrics.get($e.id)??iL,...xe(`metrics`)}),i&&(0,b.jsx)(Rb,{...xe(`images`),projectKey:i.key,ref_:$e.id,images:lt?.attachments??iL,uploadsDisabled:e.uploadsDisabled,reload:r}),lt!==null&&(0,b.jsx)(JI,{comments:lt.comments,...xe(`comments`)})]}),!$e&&N===null&&I!==null&&i!==null&&(0,b.jsx)(XI,{area:I,name:i.areaInfo[I]?.name,description:i.areaInfo[I]?.description,colour:u[I],items:c.filter(e=>e.area===I),next:Se.flatMap((e,t)=>e.area===I?[{item:e,position:t+1}]:[]),hidden:ke,onPick:e=>{ft(e),D({area:I})},onZoom:()=>Ie(I),onClose:()=>ee(null)}),!$e&&N===null&&I===null&&Ce===`next`&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Next`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsx)(`span`,{className:`detail__id`,children:`Next`}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>C(null),"aria-label":`Close`,children:`×`})]}),(0,b.jsx)(`ol`,{className:`next__list area-pane__list`,children:Se.map((e,t)=>(0,b.jsx)(`li`,{children:(0,b.jsxs)(`button`,{className:`next__item`,"data-hidden":ke.has(e.id),onClick:()=>{ft(e),D(`next`)},children:[(0,b.jsx)(`span`,{className:`next__pos`,children:t+1}),(0,b.jsx)(`span`,{className:`next__id`,style:{color:u[e.area]},children:e.id}),(0,b.jsx)(`span`,{className:`next__title`,children:e.title})]})},e.id))})]}),!$e&&N===null&&I===null&&Ce===`search`&&i!==null&&(0,b.jsx)(GI,{projectKey:i.key,colours:u,hidden:ke,titleOf:e=>c.find(t=>t.id===e)?.title,query:w,onQuery:T,onPick:dt,onClose:()=>C(null)}),!$e&&N!==null&&i!==null&&(0,b.jsxs)(`aside`,{className:`detail`,"aria-label":`Context`,children:[(0,b.jsxs)(`div`,{className:`detail__head`,children:[(0,b.jsxs)(`div`,{children:[N.heading!==null&&(0,b.jsx)(`button`,{className:`detail__close detail__back`,onClick:()=>P({heading:null}),"aria-label":`Back to Context`,title:`Back to Context`,children:`‹`}),(0,b.jsx)(`span`,{className:`detail__id`,children:`Context`})]}),(0,b.jsx)(`button`,{className:`detail__close`,onClick:()=>P(null),"aria-label":`Close`,children:`×`})]}),N.heading===null?(0,b.jsx)(`ul`,{className:`context__list`,children:i.context.map(e=>(0,b.jsx)(`li`,{children:(0,b.jsx)(`button`,{className:`context__item`,onClick:()=>P({heading:e.heading}),children:e.heading})},e.heading))}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`h2`,{className:`detail__title`,children:N.heading}),(0,b.jsx)(`div`,{className:`detail__doc`,children:(0,b.jsx)(lb,{remarkPlugins:[pw],children:i.context.find(e=>e.heading===N.heading)?.content??`This section no longer exists.`})})]})]})]})]})]})}var _L=`attraverso.pane.width`,vL=420,yL=300;function bL(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>t[n]!==void 0&&e[n].x===t[n].x&&e[n].y===t[n].y)}function xL({extensions:e}){let[t,n]=(0,_.useState)(null),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(null),s=wL();(0,_.useEffect)(()=>{_b(e.session,o).then(o,()=>o({mode:`local`}))},[e.session]);let c=(0,_.useCallback)(()=>{Mb().then(n,e=>i(e instanceof Error?e.message:String(e)))},[]),l=(0,_.useCallback)(()=>{Mb().then(n,()=>{})},[]);if(CL(t!==null&&e.liveRefresh!==!1,l),(0,_.useEffect)(()=>{a!==null&&a.mode!==`anonymous`&&c()},[a,c]),a===null)return(0,b.jsx)(`div`,{className:`boot`,children:`Starting...`});if(a.mode===`anonymous`)return(0,b.jsxs)(`div`,{className:`boot`,children:[(0,b.jsx)(`strong`,{children:`Sign in to see your projects`}),(0,b.jsx)(`span`,{className:`boot__hint`,children:`This viewer is hosted, so it shows the projects belonging to your account.`}),(0,b.jsx)(`button`,{className:`boot__action`,onClick:a.signIn,children:a.signInLabel})]});if(r)return(0,b.jsxs)(`div`,{className:`boot boot--error`,children:[(0,b.jsx)(`strong`,{children:`Could not load the plan.`}),(0,b.jsx)(`span`,{children:r}),(0,b.jsxs)(`span`,{className:`boot__hint`,children:[`Nothing is serving `,(0,b.jsx)(`code`,{children:vb}),`. Run `,(0,b.jsx)(`code`,{children:`yarn viewer`}),`, or open the viewer from the MCP server so it serves the store it already has loaded.`]})]});if(!t)return(0,b.jsx)(`div`,{className:`boot`,children:`Loading the plan...`});let u=Ib(t.projects,s.project);return(0,b.jsx)(mw.Provider,{value:e,children:(0,b.jsx)(gL,{plan:t,selection:u,focus:s.item,reload:c},u.project?.key??`none`)})}var SL=5;function CL(e,t){(0,_.useEffect)(()=>{if(!e||typeof EventSource>`u`)return;let n,r=null,i=0,a=!1,o=()=>{r?.close(),r=null},s=()=>{if(a||r!==null||document.visibilityState!==`visible`)return;let e=new EventSource(wb);r=e,e.addEventListener(`open`,()=>i=0),e.addEventListener(`version`,e=>{let r=e.data;n!==void 0&&r!==n&&t(),n=r}),e.addEventListener(`error`,()=>{(e.readyState===EventSource.CLOSED||++i>=SL)&&(a=!0,o())})},c=()=>document.visibilityState===`visible`?s():o();return s(),document.addEventListener(`visibilitychange`,c),()=>{a=!0,o(),document.removeEventListener(`visibilitychange`,c)}},[e,t])}function wL(){let e=()=>Nb(window.location.hash),[t,n]=(0,_.useState)(e);return(0,_.useEffect)(()=>{let t=()=>n(e());return window.addEventListener(`hashchange`,t),()=>window.removeEventListener(`hashchange`,t)},[]),t}function TL(e={}){(0,v.createRoot)(document.getElementById(`root`)).render((0,b.jsx)(_.StrictMode,{children:(0,b.jsx)(xL,{extensions:e})}))}TL();
|