aizuchi 0.5.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,103 +0,0 @@
1
- var g_=Object.defineProperty;var y_=(e,t,r)=>t in e?g_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ei=(e,t,r)=>y_(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(l){if(l.ep)return;l.ep=!0;const a=r(l);fetch(l.href,a)}})();function cd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var au={exports:{}},ll={},ou={exports:{}},Xe={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Em;function v_(){if(Em)return Xe;Em=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function _(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function R(I,H,N){this.props=I,this.context=H,this.refs=E,this.updater=N||x}R.prototype.isReactComponent={},R.prototype.setState=function(I,H){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,H,"setState")},R.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function S(){}S.prototype=R.prototype;function A(I,H,N){this.props=I,this.context=H,this.refs=E,this.updater=N||x}var T=A.prototype=new S;T.constructor=A,k(T,R.prototype),T.isPureReactComponent=!0;var M=Array.isArray,P=Object.prototype.hasOwnProperty,j={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function X(I,H,N){var we,Pe={},xe=null,Fe=null;if(H!=null)for(we in H.ref!==void 0&&(Fe=H.ref),H.key!==void 0&&(xe=""+H.key),H)P.call(H,we)&&!V.hasOwnProperty(we)&&(Pe[we]=H[we]);var Le=arguments.length-2;if(Le===1)Pe.children=N;else if(1<Le){for(var U=Array(Le),ce=0;ce<Le;ce++)U[ce]=arguments[ce+2];Pe.children=U}if(I&&I.defaultProps)for(we in Le=I.defaultProps,Le)Pe[we]===void 0&&(Pe[we]=Le[we]);return{$$typeof:e,type:I,key:xe,ref:Fe,props:Pe,_owner:j.current}}function ee(I,H){return{$$typeof:e,type:I.type,key:H,ref:I.ref,props:I.props,_owner:I._owner}}function O(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function Y(I){var H={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(N){return H[N]})}var ie=/\/+/g;function ke(I,H){return typeof I=="object"&&I!==null&&I.key!=null?Y(""+I.key):H.toString(36)}function se(I,H,N,we,Pe){var xe=typeof I;(xe==="undefined"||xe==="boolean")&&(I=null);var Fe=!1;if(I===null)Fe=!0;else switch(xe){case"string":case"number":Fe=!0;break;case"object":switch(I.$$typeof){case e:case t:Fe=!0}}if(Fe)return Fe=I,Pe=Pe(Fe),I=we===""?"."+ke(Fe,0):we,M(Pe)?(N="",I!=null&&(N=I.replace(ie,"$&/")+"/"),se(Pe,H,N,"",function(ce){return ce})):Pe!=null&&(O(Pe)&&(Pe=ee(Pe,N+(!Pe.key||Fe&&Fe.key===Pe.key?"":(""+Pe.key).replace(ie,"$&/")+"/")+I)),H.push(Pe)),1;if(Fe=0,we=we===""?".":we+":",M(I))for(var Le=0;Le<I.length;Le++){xe=I[Le];var U=we+ke(xe,Le);Fe+=se(xe,H,N,U,Pe)}else if(U=_(I),typeof U=="function")for(I=U.call(I),Le=0;!(xe=I.next()).done;)xe=xe.value,U=we+ke(xe,Le++),Fe+=se(xe,H,N,U,Pe);else if(xe==="object")throw H=String(I),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return Fe}function J(I,H,N){if(I==null)return I;var we=[],Pe=0;return se(I,we,"","",function(xe){return H.call(N,xe,Pe++)}),we}function te(I){if(I._status===-1){var H=I._result;H=H(),H.then(function(N){(I._status===0||I._status===-1)&&(I._status=1,I._result=N)},function(N){(I._status===0||I._status===-1)&&(I._status=2,I._result=N)}),I._status===-1&&(I._status=0,I._result=H)}if(I._status===1)return I._result.default;throw I._result}var ye={current:null},G={transition:null},me={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:G,ReactCurrentOwner:j};function C(){throw Error("act(...) is not supported in production builds of React.")}return Xe.Children={map:J,forEach:function(I,H,N){J(I,function(){H.apply(this,arguments)},N)},count:function(I){var H=0;return J(I,function(){H++}),H},toArray:function(I){return J(I,function(H){return H})||[]},only:function(I){if(!O(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Xe.Component=R,Xe.Fragment=r,Xe.Profiler=l,Xe.PureComponent=A,Xe.StrictMode=s,Xe.Suspense=p,Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=me,Xe.act=C,Xe.cloneElement=function(I,H,N){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var we=k({},I.props),Pe=I.key,xe=I.ref,Fe=I._owner;if(H!=null){if(H.ref!==void 0&&(xe=H.ref,Fe=j.current),H.key!==void 0&&(Pe=""+H.key),I.type&&I.type.defaultProps)var Le=I.type.defaultProps;for(U in H)P.call(H,U)&&!V.hasOwnProperty(U)&&(we[U]=H[U]===void 0&&Le!==void 0?Le[U]:H[U])}var U=arguments.length-2;if(U===1)we.children=N;else if(1<U){Le=Array(U);for(var ce=0;ce<U;ce++)Le[ce]=arguments[ce+2];we.children=Le}return{$$typeof:e,type:I.type,key:Pe,ref:xe,props:we,_owner:Fe}},Xe.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},Xe.createElement=X,Xe.createFactory=function(I){var H=X.bind(null,I);return H.type=I,H},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(I){return{$$typeof:u,render:I}},Xe.isValidElement=O,Xe.lazy=function(I){return{$$typeof:g,_payload:{_status:-1,_result:I},_init:te}},Xe.memo=function(I,H){return{$$typeof:m,type:I,compare:H===void 0?null:H}},Xe.startTransition=function(I){var H=G.transition;G.transition={};try{I()}finally{G.transition=H}},Xe.unstable_act=C,Xe.useCallback=function(I,H){return ye.current.useCallback(I,H)},Xe.useContext=function(I){return ye.current.useContext(I)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(I){return ye.current.useDeferredValue(I)},Xe.useEffect=function(I,H){return ye.current.useEffect(I,H)},Xe.useId=function(){return ye.current.useId()},Xe.useImperativeHandle=function(I,H,N){return ye.current.useImperativeHandle(I,H,N)},Xe.useInsertionEffect=function(I,H){return ye.current.useInsertionEffect(I,H)},Xe.useLayoutEffect=function(I,H){return ye.current.useLayoutEffect(I,H)},Xe.useMemo=function(I,H){return ye.current.useMemo(I,H)},Xe.useReducer=function(I,H,N){return ye.current.useReducer(I,H,N)},Xe.useRef=function(I){return ye.current.useRef(I)},Xe.useState=function(I){return ye.current.useState(I)},Xe.useSyncExternalStore=function(I,H,N){return ye.current.useSyncExternalStore(I,H,N)},Xe.useTransition=function(){return ye.current.useTransition()},Xe.version="18.3.1",Xe}var Tm;function ud(){return Tm||(Tm=1,ou.exports=v_()),ou.exports}/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Im;function x_(){if(Im)return ll;Im=1;var e=ud(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(u,p,m){var g,y={},_=null,x=null;m!==void 0&&(_=""+m),p.key!==void 0&&(_=""+p.key),p.ref!==void 0&&(x=p.ref);for(g in p)s.call(p,g)&&!a.hasOwnProperty(g)&&(y[g]=p[g]);if(u&&u.defaultProps)for(g in p=u.defaultProps,p)y[g]===void 0&&(y[g]=p[g]);return{$$typeof:t,type:u,key:_,ref:x,props:y,_owner:l.current}}return ll.Fragment=r,ll.jsx=c,ll.jsxs=c,ll}var Dm;function __(){return Dm||(Dm=1,au.exports=x_()),au.exports}var f=__(),b=ud();const tr=cd(b);var Ba={},cu={exports:{}},Rn={},uu={exports:{}},du={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Am;function k_(){return Am||(Am=1,(function(e){function t(G,me){var C=G.length;G.push(me);e:for(;0<C;){var I=C-1>>>1,H=G[I];if(0<l(H,me))G[I]=me,G[C]=H,C=I;else break e}}function r(G){return G.length===0?null:G[0]}function s(G){if(G.length===0)return null;var me=G[0],C=G.pop();if(C!==me){G[0]=C;e:for(var I=0,H=G.length,N=H>>>1;I<N;){var we=2*(I+1)-1,Pe=G[we],xe=we+1,Fe=G[xe];if(0>l(Pe,C))xe<H&&0>l(Fe,Pe)?(G[I]=Fe,G[xe]=C,I=xe):(G[I]=Pe,G[we]=C,I=we);else if(xe<H&&0>l(Fe,C))G[I]=Fe,G[xe]=C,I=xe;else break e}}return me}function l(G,me){var C=G.sortIndex-me.sortIndex;return C!==0?C:G.id-me.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var p=[],m=[],g=1,y=null,_=3,x=!1,k=!1,E=!1,R=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var me=r(m);me!==null;){if(me.callback===null)s(m);else if(me.startTime<=G)s(m),me.sortIndex=me.expirationTime,t(p,me);else break;me=r(m)}}function M(G){if(E=!1,T(G),!k)if(r(p)!==null)k=!0,te(P);else{var me=r(m);me!==null&&ye(M,me.startTime-G)}}function P(G,me){k=!1,E&&(E=!1,S(X),X=-1),x=!0;var C=_;try{for(T(me),y=r(p);y!==null&&(!(y.expirationTime>me)||G&&!Y());){var I=y.callback;if(typeof I=="function"){y.callback=null,_=y.priorityLevel;var H=I(y.expirationTime<=me);me=e.unstable_now(),typeof H=="function"?y.callback=H:y===r(p)&&s(p),T(me)}else s(p);y=r(p)}if(y!==null)var N=!0;else{var we=r(m);we!==null&&ye(M,we.startTime-me),N=!1}return N}finally{y=null,_=C,x=!1}}var j=!1,V=null,X=-1,ee=5,O=-1;function Y(){return!(e.unstable_now()-O<ee)}function ie(){if(V!==null){var G=e.unstable_now();O=G;var me=!0;try{me=V(!0,G)}finally{me?ke():(j=!1,V=null)}}else j=!1}var ke;if(typeof A=="function")ke=function(){A(ie)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,J=se.port2;se.port1.onmessage=ie,ke=function(){J.postMessage(null)}}else ke=function(){R(ie,0)};function te(G){V=G,j||(j=!0,ke())}function ye(G,me){X=R(function(){G(e.unstable_now())},me)}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(G){G.callback=null},e.unstable_continueExecution=function(){k||x||(k=!0,te(P))},e.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<G?Math.floor(1e3/G):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return r(p)},e.unstable_next=function(G){switch(_){case 1:case 2:case 3:var me=3;break;default:me=_}var C=_;_=me;try{return G()}finally{_=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(G,me){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var C=_;_=G;try{return me()}finally{_=C}},e.unstable_scheduleCallback=function(G,me,C){var I=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?I+C:I):C=I,G){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=C+H,G={id:g++,callback:me,priorityLevel:G,startTime:C,expirationTime:H,sortIndex:-1},C>I?(G.sortIndex=C,t(m,G),r(p)===null&&G===r(m)&&(E?(S(X),X=-1):E=!0,ye(M,C-I))):(G.sortIndex=H,t(p,G),k||x||(k=!0,te(P))),G},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(G){var me=_;return function(){var C=_;_=me;try{return G.apply(this,arguments)}finally{_=C}}}})(du)),du}var Rm;function w_(){return Rm||(Rm=1,uu.exports=k_()),uu.exports}/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Pm;function b_(){if(Pm)return Rn;Pm=1;var e=ud(),t=w_();function r(n){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+n,o=1;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,l={};function a(n,i){c(n,i),c(n+"Capture",i)}function c(n,i){for(l[n]=i,n=0;n<i.length;n++)s.add(i[n])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,g={},y={};function _(n){return p.call(y,n)?!0:p.call(g,n)?!1:m.test(n)?y[n]=!0:(g[n]=!0,!1)}function x(n,i,o,d){if(o!==null&&o.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return d?!1:o!==null?!o.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,i,o,d){if(i===null||typeof i>"u"||x(n,i,o,d))return!0;if(d)return!1;if(o!==null)switch(o.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function E(n,i,o,d,h,v,w){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=d,this.attributeNamespace=h,this.mustUseProperty=o,this.propertyName=n,this.type=i,this.sanitizeURL=v,this.removeEmptyString=w}var R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){R[n]=new E(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var i=n[0];R[i]=new E(i,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){R[n]=new E(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){R[n]=new E(n,2,!1,n,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(n){R[n]=new E(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){R[n]=new E(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){R[n]=new E(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){R[n]=new E(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){R[n]=new E(n,5,!1,n.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function A(n){return n[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(n){var i=n.replace(S,A);R[i]=new E(i,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var i=n.replace(S,A);R[i]=new E(i,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var i=n.replace(S,A);R[i]=new E(i,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){R[n]=new E(n,1,!1,n.toLowerCase(),null,!1,!1)}),R.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){R[n]=new E(n,1,!1,n.toLowerCase(),null,!0,!0)});function T(n,i,o,d){var h=R.hasOwnProperty(i)?R[i]:null;(h!==null?h.type!==0:d||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(k(i,o,h,d)&&(o=null),d||h===null?_(i)&&(o===null?n.removeAttribute(i):n.setAttribute(i,""+o)):h.mustUseProperty?n[h.propertyName]=o===null?h.type===3?!1:"":o:(i=h.attributeName,d=h.attributeNamespace,o===null?n.removeAttribute(i):(h=h.type,o=h===3||h===4&&o===!0?"":""+o,d?n.setAttributeNS(d,i,o):n.setAttribute(i,o))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),j=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),Y=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),G=Symbol.iterator;function me(n){return n===null||typeof n!="object"?null:(n=G&&n[G]||n["@@iterator"],typeof n=="function"?n:null)}var C=Object.assign,I;function H(n){if(I===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);I=i&&i[1]||""}return`
34
- `+I+n}var N=!1;function we(n,i){if(!n||N)return"";N=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(W){var d=W}Reflect.construct(n,[],i)}else{try{i.call()}catch(W){d=W}n.call(i.prototype)}else{try{throw Error()}catch(W){d=W}n()}}catch(W){if(W&&d&&typeof W.stack=="string"){for(var h=W.stack.split(`
35
- `),v=d.stack.split(`
36
- `),w=h.length-1,D=v.length-1;1<=w&&0<=D&&h[w]!==v[D];)D--;for(;1<=w&&0<=D;w--,D--)if(h[w]!==v[D]){if(w!==1||D!==1)do if(w--,D--,0>D||h[w]!==v[D]){var L=`
37
- `+h[w].replace(" at new "," at ");return n.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",n.displayName)),L}while(1<=w&&0<=D);break}}}finally{N=!1,Error.prepareStackTrace=o}return(n=n?n.displayName||n.name:"")?H(n):""}function Pe(n){switch(n.tag){case 5:return H(n.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return n=we(n.type,!1),n;case 11:return n=we(n.type.render,!1),n;case 1:return n=we(n.type,!0),n;default:return""}}function xe(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case V:return"Fragment";case j:return"Portal";case ee:return"Profiler";case X:return"StrictMode";case ke:return"Suspense";case se:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Y:return(n.displayName||"Context")+".Consumer";case O:return(n._context.displayName||"Context")+".Provider";case ie:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case J:return i=n.displayName||null,i!==null?i:xe(n.type)||"Memo";case te:i=n._payload,n=n._init;try{return xe(n(i))}catch{}}return null}function Fe(n){var i=n.type;switch(n.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=i.render,n=n.displayName||n.name||"",i.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(i);case 8:return i===X?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Le(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function U(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ce(n){var i=U(n)?"checked":"value",o=Object.getOwnPropertyDescriptor(n.constructor.prototype,i),d=""+n[i];if(!n.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,v=o.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return h.call(this)},set:function(w){d=""+w,v.call(this,w)}}),Object.defineProperty(n,i,{enumerable:o.enumerable}),{getValue:function(){return d},setValue:function(w){d=""+w},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ut(n){n._valueTracker||(n._valueTracker=ce(n))}function Bt(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return n&&(d=U(n)?n.checked?"true":"false":n.value),n=d,n!==o?(i.setValue(n),!0):!1}function ot(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Nt(n,i){var o=i.checked;return C({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??n._wrapperState.initialChecked})}function mt(n,i){var o=i.defaultValue==null?"":i.defaultValue,d=i.checked!=null?i.checked:i.defaultChecked;o=Le(i.value!=null?i.value:o),n._wrapperState={initialChecked:d,initialValue:o,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ft(n,i){i=i.checked,i!=null&&T(n,"checked",i,!1)}function Kt(n,i){Ft(n,i);var o=Le(i.value),d=i.type;if(o!=null)d==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+o):n.value!==""+o&&(n.value=""+o);else if(d==="submit"||d==="reset"){n.removeAttribute("value");return}i.hasOwnProperty("value")?ln(n,i.type,o):i.hasOwnProperty("defaultValue")&&ln(n,i.type,Le(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(n.defaultChecked=!!i.defaultChecked)}function sn(n,i,o){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var d=i.type;if(!(d!=="submit"&&d!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+n._wrapperState.initialValue,o||i===n.value||(n.value=i),n.defaultValue=i}o=n.name,o!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,o!==""&&(n.name=o)}function ln(n,i,o){(i!=="number"||ot(n.ownerDocument)!==n)&&(o==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+o&&(n.defaultValue=""+o))}var jt=Array.isArray;function Et(n,i,o,d){if(n=n.options,i){i={};for(var h=0;h<o.length;h++)i["$"+o[h]]=!0;for(o=0;o<n.length;o++)h=i.hasOwnProperty("$"+n[o].value),n[o].selected!==h&&(n[o].selected=h),h&&d&&(n[o].defaultSelected=!0)}else{for(o=""+Le(o),i=null,h=0;h<n.length;h++){if(n[h].value===o){n[h].selected=!0,d&&(n[h].defaultSelected=!0);return}i!==null||n[h].disabled||(i=n[h])}i!==null&&(i.selected=!0)}}function gn(n,i){if(i.dangerouslySetInnerHTML!=null)throw Error(r(91));return C({},i,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Vt(n,i){var o=i.value;if(o==null){if(o=i.children,i=i.defaultValue,o!=null){if(i!=null)throw Error(r(92));if(jt(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),o=i}n._wrapperState={initialValue:Le(o)}}function ge(n,i){var o=Le(i.value),d=Le(i.defaultValue);o!=null&&(o=""+o,o!==n.value&&(n.value=o),i.defaultValue==null&&n.defaultValue!==o&&(n.defaultValue=o)),d!=null&&(n.defaultValue=""+d)}function be(n){var i=n.textContent;i===n._wrapperState.initialValue&&i!==""&&i!==null&&(n.value=i)}function $(n){switch(n){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 Q(n,i){return n==null||n==="http://www.w3.org/1999/xhtml"?$(i):n==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var q,ve=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,o,d,h){MSApp.execUnsafeLocalFunction(function(){return n(i,o,d,h)})}:n})(function(n,i){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=i;else{for(q=q||document.createElement("div"),q.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=q.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;i.firstChild;)n.appendChild(i.firstChild)}});function K(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var ne={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},_e=["Webkit","ms","Moz","O"];Object.keys(ne).forEach(function(n){_e.forEach(function(i){i=i+n.charAt(0).toUpperCase()+n.substring(1),ne[i]=ne[n]})});function Me(n,i,o){return i==null||typeof i=="boolean"||i===""?"":o||typeof i!="number"||i===0||ne.hasOwnProperty(n)&&ne[n]?(""+i).trim():i+"px"}function At(n,i){n=n.style;for(var o in i)if(i.hasOwnProperty(o)){var d=o.indexOf("--")===0,h=Me(o,i[o],d);o==="float"&&(o="cssFloat"),d?n.setProperty(o,h):n[o]=h}}var Ht=C({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 ht(n,i){if(i){if(Ht[n]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(r(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(r(61))}if(i.style!=null&&typeof i.style!="object")throw Error(r(62))}}function Ut(n,i){if(n.indexOf("-")===-1)return typeof i.is=="string";switch(n){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 Zt=null;function pi(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var mi=null,ir=null,wt=null;function Jt(n){if(n=Ws(n)){if(typeof mi!="function")throw Error(r(280));var i=n.stateNode;i&&(i=ta(i),mi(n.stateNode,n.type,i))}}function an(n){ir?wt?wt.push(n):wt=[n]:ir=n}function On(){if(ir){var n=ir,i=wt;if(wt=ir=null,Jt(n),i)for(n=0;n<i.length;n++)Jt(i[n])}}function on(n,i){return n(i)}function Yt(){}var cn=!1;function Kn(n,i,o){if(cn)return n(i,o);cn=!0;try{return on(n,i,o)}finally{cn=!1,(ir!==null||wt!==null)&&(Yt(),On())}}function bt(n,i){var o=n.stateNode;if(o===null)return null;var d=ta(o);if(d===null)return null;o=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var Z=!1;if(u)try{var pe={};Object.defineProperty(pe,"passive",{get:function(){Z=!0}}),window.addEventListener("test",pe,pe),window.removeEventListener("test",pe,pe)}catch{Z=!1}function Ke(n,i,o,d,h,v,w,D,L){var W=Array.prototype.slice.call(arguments,3);try{i.apply(o,W)}catch(oe){this.onError(oe)}}var xt=!1,mr=null,zn=!1,Cr=null,Ns={onError:function(n){xt=!0,mr=n}};function Sv(n,i,o,d,h,v,w,D,L){xt=!1,mr=null,Ke.apply(Ns,arguments)}function Cv(n,i,o,d,h,v,w,D,L){if(Sv.apply(this,arguments),xt){if(xt){var W=mr;xt=!1,mr=null}else throw Error(r(198));zn||(zn=!0,Cr=W)}}function hi(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function Qd(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function Xd(n){if(hi(n)!==n)throw Error(r(188))}function Nv(n){var i=n.alternate;if(!i){if(i=hi(n),i===null)throw Error(r(188));return i!==n?null:n}for(var o=n,d=i;;){var h=o.return;if(h===null)break;var v=h.alternate;if(v===null){if(d=h.return,d!==null){o=d;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===o)return Xd(h),n;if(v===d)return Xd(h),i;v=v.sibling}throw Error(r(188))}if(o.return!==d.return)o=h,d=v;else{for(var w=!1,D=h.child;D;){if(D===o){w=!0,o=h,d=v;break}if(D===d){w=!0,d=h,o=v;break}D=D.sibling}if(!w){for(D=v.child;D;){if(D===o){w=!0,o=v,d=h;break}if(D===d){w=!0,d=v,o=h;break}D=D.sibling}if(!w)throw Error(r(189))}}if(o.alternate!==d)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function Gd(n){return n=Nv(n),n!==null?Jd(n):null}function Jd(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var i=Jd(n);if(i!==null)return i;n=n.sibling}return null}var ef=t.unstable_scheduleCallback,tf=t.unstable_cancelCallback,jv=t.unstable_shouldYield,Ev=t.unstable_requestPaint,Wt=t.unstable_now,Tv=t.unstable_getCurrentPriorityLevel,jo=t.unstable_ImmediatePriority,nf=t.unstable_UserBlockingPriority,Ll=t.unstable_NormalPriority,Iv=t.unstable_LowPriority,rf=t.unstable_IdlePriority,Ml=null,hr=null;function Dv(n){if(hr&&typeof hr.onCommitFiberRoot=="function")try{hr.onCommitFiberRoot(Ml,n,void 0,(n.current.flags&128)===128)}catch{}}var sr=Math.clz32?Math.clz32:Pv,Av=Math.log,Rv=Math.LN2;function Pv(n){return n>>>=0,n===0?32:31-(Av(n)/Rv|0)|0}var Ol=64,zl=4194304;function js(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function $l(n,i){var o=n.pendingLanes;if(o===0)return 0;var d=0,h=n.suspendedLanes,v=n.pingedLanes,w=o&268435455;if(w!==0){var D=w&~h;D!==0?d=js(D):(v&=w,v!==0&&(d=js(v)))}else w=o&~h,w!==0?d=js(w):v!==0&&(d=js(v));if(d===0)return 0;if(i!==0&&i!==d&&(i&h)===0&&(h=d&-d,v=i&-i,h>=v||h===16&&(v&4194240)!==0))return i;if((d&4)!==0&&(d|=o&16),i=n.entangledLanes,i!==0)for(n=n.entanglements,i&=d;0<i;)o=31-sr(i),h=1<<o,d|=n[o],i&=~h;return d}function Lv(n,i){switch(n){case 1:case 2:case 4:return i+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 i+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 Mv(n,i){for(var o=n.suspendedLanes,d=n.pingedLanes,h=n.expirationTimes,v=n.pendingLanes;0<v;){var w=31-sr(v),D=1<<w,L=h[w];L===-1?((D&o)===0||(D&d)!==0)&&(h[w]=Lv(D,i)):L<=i&&(n.expiredLanes|=D),v&=~D}}function Eo(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function sf(){var n=Ol;return Ol<<=1,(Ol&4194240)===0&&(Ol=64),n}function To(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function Es(n,i,o){n.pendingLanes|=i,i!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,i=31-sr(i),n[i]=o}function Ov(n,i){var o=n.pendingLanes&~i;n.pendingLanes=i,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=i,n.mutableReadLanes&=i,n.entangledLanes&=i,i=n.entanglements;var d=n.eventTimes;for(n=n.expirationTimes;0<o;){var h=31-sr(o),v=1<<h;i[h]=0,d[h]=-1,n[h]=-1,o&=~v}}function Io(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var d=31-sr(o),h=1<<d;h&i|n[d]&i&&(n[d]|=i),o&=~h}}var gt=0;function lf(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var af,Do,of,cf,uf,Ao=!1,Bl=[],zr=null,$r=null,Br=null,Ts=new Map,Is=new Map,Fr=[],zv="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 df(n,i){switch(n){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":$r=null;break;case"mouseover":case"mouseout":Br=null;break;case"pointerover":case"pointerout":Ts.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Is.delete(i.pointerId)}}function Ds(n,i,o,d,h,v){return n===null||n.nativeEvent!==v?(n={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:v,targetContainers:[h]},i!==null&&(i=Ws(i),i!==null&&Do(i)),n):(n.eventSystemFlags|=d,i=n.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),n)}function $v(n,i,o,d,h){switch(i){case"focusin":return zr=Ds(zr,n,i,o,d,h),!0;case"dragenter":return $r=Ds($r,n,i,o,d,h),!0;case"mouseover":return Br=Ds(Br,n,i,o,d,h),!0;case"pointerover":var v=h.pointerId;return Ts.set(v,Ds(Ts.get(v)||null,n,i,o,d,h)),!0;case"gotpointercapture":return v=h.pointerId,Is.set(v,Ds(Is.get(v)||null,n,i,o,d,h)),!0}return!1}function ff(n){var i=gi(n.target);if(i!==null){var o=hi(i);if(o!==null){if(i=o.tag,i===13){if(i=Qd(o),i!==null){n.blockedOn=i,uf(n.priority,function(){of(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Fl(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Po(n.domEventName,n.eventSystemFlags,i[0],n.nativeEvent);if(o===null){o=n.nativeEvent;var d=new o.constructor(o.type,o);Zt=d,o.target.dispatchEvent(d),Zt=null}else return i=Ws(o),i!==null&&Do(i),n.blockedOn=o,!1;i.shift()}return!0}function pf(n,i,o){Fl(n)&&o.delete(i)}function Bv(){Ao=!1,zr!==null&&Fl(zr)&&(zr=null),$r!==null&&Fl($r)&&($r=null),Br!==null&&Fl(Br)&&(Br=null),Ts.forEach(pf),Is.forEach(pf)}function As(n,i){n.blockedOn===i&&(n.blockedOn=null,Ao||(Ao=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Bv)))}function Rs(n){function i(h){return As(h,n)}if(0<Bl.length){As(Bl[0],n);for(var o=1;o<Bl.length;o++){var d=Bl[o];d.blockedOn===n&&(d.blockedOn=null)}}for(zr!==null&&As(zr,n),$r!==null&&As($r,n),Br!==null&&As(Br,n),Ts.forEach(i),Is.forEach(i),o=0;o<Fr.length;o++)d=Fr[o],d.blockedOn===n&&(d.blockedOn=null);for(;0<Fr.length&&(o=Fr[0],o.blockedOn===null);)ff(o),o.blockedOn===null&&Fr.shift()}var zi=M.ReactCurrentBatchConfig,Vl=!0;function Fv(n,i,o,d){var h=gt,v=zi.transition;zi.transition=null;try{gt=1,Ro(n,i,o,d)}finally{gt=h,zi.transition=v}}function Vv(n,i,o,d){var h=gt,v=zi.transition;zi.transition=null;try{gt=4,Ro(n,i,o,d)}finally{gt=h,zi.transition=v}}function Ro(n,i,o,d){if(Vl){var h=Po(n,i,o,d);if(h===null)Xo(n,i,d,Hl,o),df(n,d);else if($v(h,n,i,o,d))d.stopPropagation();else if(df(n,d),i&4&&-1<zv.indexOf(n)){for(;h!==null;){var v=Ws(h);if(v!==null&&af(v),v=Po(n,i,o,d),v===null&&Xo(n,i,d,Hl,o),v===h)break;h=v}h!==null&&d.stopPropagation()}else Xo(n,i,d,null,o)}}var Hl=null;function Po(n,i,o,d){if(Hl=null,n=pi(d),n=gi(n),n!==null)if(i=hi(n),i===null)n=null;else if(o=i.tag,o===13){if(n=Qd(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null);return Hl=n,null}function mf(n){switch(n){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(Tv()){case jo:return 1;case nf:return 4;case Ll:case Iv:return 16;case rf:return 536870912;default:return 16}default:return 16}}var Vr=null,Lo=null,Ul=null;function hf(){if(Ul)return Ul;var n,i=Lo,o=i.length,d,h="value"in Vr?Vr.value:Vr.textContent,v=h.length;for(n=0;n<o&&i[n]===h[n];n++);var w=o-n;for(d=1;d<=w&&i[o-d]===h[v-d];d++);return Ul=h.slice(n,1<d?1-d:void 0)}function Wl(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function ql(){return!0}function gf(){return!1}function $n(n){function i(o,d,h,v,w){this._reactName=o,this._targetInst=h,this.type=d,this.nativeEvent=v,this.target=w,this.currentTarget=null;for(var D in n)n.hasOwnProperty(D)&&(o=n[D],this[D]=o?o(v):v[D]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?ql:gf,this.isPropagationStopped=gf,this}return C(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),i}var $i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mo=$n($i),Ps=C({},$i,{view:0,detail:0}),Hv=$n(Ps),Oo,zo,Ls,Kl=C({},Ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bo,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Ls&&(Ls&&n.type==="mousemove"?(Oo=n.screenX-Ls.screenX,zo=n.screenY-Ls.screenY):zo=Oo=0,Ls=n),Oo)},movementY:function(n){return"movementY"in n?n.movementY:zo}}),yf=$n(Kl),Uv=C({},Kl,{dataTransfer:0}),Wv=$n(Uv),qv=C({},Ps,{relatedTarget:0}),$o=$n(qv),Kv=C({},$i,{animationName:0,elapsedTime:0,pseudoElement:0}),Zv=$n(Kv),Yv=C({},$i,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Qv=$n(Yv),Xv=C({},$i,{data:0}),vf=$n(Xv),Gv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jv={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"},ex={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tx(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=ex[n])?!!i[n]:!1}function Bo(){return tx}var nx=C({},Ps,{key:function(n){if(n.key){var i=Gv[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Wl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Jv[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bo,charCode:function(n){return n.type==="keypress"?Wl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Wl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),rx=$n(nx),ix=C({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xf=$n(ix),sx=C({},Ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bo}),lx=$n(sx),ax=C({},$i,{propertyName:0,elapsedTime:0,pseudoElement:0}),ox=$n(ax),cx=C({},Kl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),ux=$n(cx),dx=[9,13,27,32],Fo=u&&"CompositionEvent"in window,Ms=null;u&&"documentMode"in document&&(Ms=document.documentMode);var fx=u&&"TextEvent"in window&&!Ms,_f=u&&(!Fo||Ms&&8<Ms&&11>=Ms),kf=" ",wf=!1;function bf(n,i){switch(n){case"keyup":return dx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sf(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Bi=!1;function px(n,i){switch(n){case"compositionend":return Sf(i);case"keypress":return i.which!==32?null:(wf=!0,kf);case"textInput":return n=i.data,n===kf&&wf?null:n;default:return null}}function mx(n,i){if(Bi)return n==="compositionend"||!Fo&&bf(n,i)?(n=hf(),Ul=Lo=Vr=null,Bi=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return _f&&i.locale!=="ko"?null:i.data;default:return null}}var hx={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 Cf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!hx[n.type]:i==="textarea"}function Nf(n,i,o,d){an(d),i=Gl(i,"onChange"),0<i.length&&(o=new Mo("onChange","change",null,o,d),n.push({event:o,listeners:i}))}var Os=null,zs=null;function gx(n){Uf(n,0)}function Zl(n){var i=Wi(n);if(Bt(i))return n}function yx(n,i){if(n==="change")return i}var jf=!1;if(u){var Vo;if(u){var Ho="oninput"in document;if(!Ho){var Ef=document.createElement("div");Ef.setAttribute("oninput","return;"),Ho=typeof Ef.oninput=="function"}Vo=Ho}else Vo=!1;jf=Vo&&(!document.documentMode||9<document.documentMode)}function Tf(){Os&&(Os.detachEvent("onpropertychange",If),zs=Os=null)}function If(n){if(n.propertyName==="value"&&Zl(zs)){var i=[];Nf(i,zs,n,pi(n)),Kn(gx,i)}}function vx(n,i,o){n==="focusin"?(Tf(),Os=i,zs=o,Os.attachEvent("onpropertychange",If)):n==="focusout"&&Tf()}function xx(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Zl(zs)}function _x(n,i){if(n==="click")return Zl(i)}function kx(n,i){if(n==="input"||n==="change")return Zl(i)}function wx(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var lr=typeof Object.is=="function"?Object.is:wx;function $s(n,i){if(lr(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var h=o[d];if(!p.call(i,h)||!lr(n[h],i[h]))return!1}return!0}function Df(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Af(n,i){var o=Df(n);n=0;for(var d;o;){if(o.nodeType===3){if(d=n+o.textContent.length,n<=i&&d>=i)return{node:o,offset:i-n};n=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Df(o)}}function Rf(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Rf(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Pf(){for(var n=window,i=ot();i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=ot(n.document)}return i}function Uo(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}function bx(n){var i=Pf(),o=n.focusedElem,d=n.selectionRange;if(i!==o&&o&&o.ownerDocument&&Rf(o.ownerDocument.documentElement,o)){if(d!==null&&Uo(o)){if(i=d.start,n=d.end,n===void 0&&(n=i),"selectionStart"in o)o.selectionStart=i,o.selectionEnd=Math.min(n,o.value.length);else if(n=(i=o.ownerDocument||document)&&i.defaultView||window,n.getSelection){n=n.getSelection();var h=o.textContent.length,v=Math.min(d.start,h);d=d.end===void 0?v:Math.min(d.end,h),!n.extend&&v>d&&(h=d,d=v,v=h),h=Af(o,v);var w=Af(o,d);h&&w&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==w.node||n.focusOffset!==w.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),n.removeAllRanges(),v>d?(n.addRange(i),n.extend(w.node,w.offset)):(i.setEnd(w.node,w.offset),n.addRange(i)))}}for(i=[],n=o;n=n.parentNode;)n.nodeType===1&&i.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<i.length;o++)n=i[o],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Sx=u&&"documentMode"in document&&11>=document.documentMode,Fi=null,Wo=null,Bs=null,qo=!1;function Lf(n,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;qo||Fi==null||Fi!==ot(d)||(d=Fi,"selectionStart"in d&&Uo(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Bs&&$s(Bs,d)||(Bs=d,d=Gl(Wo,"onSelect"),0<d.length&&(i=new Mo("onSelect","select",null,i,o),n.push({event:i,listeners:d}),i.target=Fi)))}function Yl(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var Vi={animationend:Yl("Animation","AnimationEnd"),animationiteration:Yl("Animation","AnimationIteration"),animationstart:Yl("Animation","AnimationStart"),transitionend:Yl("Transition","TransitionEnd")},Ko={},Mf={};u&&(Mf=document.createElement("div").style,"AnimationEvent"in window||(delete Vi.animationend.animation,delete Vi.animationiteration.animation,delete Vi.animationstart.animation),"TransitionEvent"in window||delete Vi.transitionend.transition);function Ql(n){if(Ko[n])return Ko[n];if(!Vi[n])return n;var i=Vi[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in Mf)return Ko[n]=i[o];return n}var Of=Ql("animationend"),zf=Ql("animationiteration"),$f=Ql("animationstart"),Bf=Ql("transitionend"),Ff=new Map,Vf="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 Hr(n,i){Ff.set(n,i),a(i,[n])}for(var Zo=0;Zo<Vf.length;Zo++){var Yo=Vf[Zo],Cx=Yo.toLowerCase(),Nx=Yo[0].toUpperCase()+Yo.slice(1);Hr(Cx,"on"+Nx)}Hr(Of,"onAnimationEnd"),Hr(zf,"onAnimationIteration"),Hr($f,"onAnimationStart"),Hr("dblclick","onDoubleClick"),Hr("focusin","onFocus"),Hr("focusout","onBlur"),Hr(Bf,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="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(" "),jx=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fs));function Hf(n,i,o){var d=n.type||"unknown-event";n.currentTarget=o,Cv(d,i,void 0,n),n.currentTarget=null}function Uf(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var d=n[o],h=d.event;d=d.listeners;e:{var v=void 0;if(i)for(var w=d.length-1;0<=w;w--){var D=d[w],L=D.instance,W=D.currentTarget;if(D=D.listener,L!==v&&h.isPropagationStopped())break e;Hf(h,D,W),v=L}else for(w=0;w<d.length;w++){if(D=d[w],L=D.instance,W=D.currentTarget,D=D.listener,L!==v&&h.isPropagationStopped())break e;Hf(h,D,W),v=L}}}if(zn)throw n=Cr,zn=!1,Cr=null,n}function Tt(n,i){var o=i[rc];o===void 0&&(o=i[rc]=new Set);var d=n+"__bubble";o.has(d)||(Wf(i,n,2,!1),o.add(d))}function Qo(n,i,o){var d=0;i&&(d|=4),Wf(o,n,d,i)}var Xl="_reactListening"+Math.random().toString(36).slice(2);function Vs(n){if(!n[Xl]){n[Xl]=!0,s.forEach(function(o){o!=="selectionchange"&&(jx.has(o)||Qo(o,!1,n),Qo(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Xl]||(i[Xl]=!0,Qo("selectionchange",!1,i))}}function Wf(n,i,o,d){switch(mf(i)){case 1:var h=Fv;break;case 4:h=Vv;break;default:h=Ro}o=h.bind(null,i,o,n),h=void 0,!Z||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),d?h!==void 0?n.addEventListener(i,o,{capture:!0,passive:h}):n.addEventListener(i,o,!0):h!==void 0?n.addEventListener(i,o,{passive:h}):n.addEventListener(i,o,!1)}function Xo(n,i,o,d,h){var v=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var D=d.stateNode.containerInfo;if(D===h||D.nodeType===8&&D.parentNode===h)break;if(w===4)for(w=d.return;w!==null;){var L=w.tag;if((L===3||L===4)&&(L=w.stateNode.containerInfo,L===h||L.nodeType===8&&L.parentNode===h))return;w=w.return}for(;D!==null;){if(w=gi(D),w===null)return;if(L=w.tag,L===5||L===6){d=v=w;continue e}D=D.parentNode}}d=d.return}Kn(function(){var W=v,oe=pi(o),ue=[];e:{var ae=Ff.get(n);if(ae!==void 0){var Se=Mo,Ee=n;switch(n){case"keypress":if(Wl(o)===0)break e;case"keydown":case"keyup":Se=rx;break;case"focusin":Ee="focus",Se=$o;break;case"focusout":Ee="blur",Se=$o;break;case"beforeblur":case"afterblur":Se=$o;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=Wv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=lx;break;case Of:case zf:case $f:Se=Zv;break;case Bf:Se=ox;break;case"scroll":Se=Hv;break;case"wheel":Se=ux;break;case"copy":case"cut":case"paste":Se=Qv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=xf}var Te=(i&4)!==0,qt=!Te&&n==="scroll",B=Te?ae!==null?ae+"Capture":null:ae;Te=[];for(var z=W,F;z!==null;){F=z;var he=F.stateNode;if(F.tag===5&&he!==null&&(F=he,B!==null&&(he=bt(z,B),he!=null&&Te.push(Hs(z,he,F)))),qt)break;z=z.return}0<Te.length&&(ae=new Se(ae,Ee,null,o,oe),ue.push({event:ae,listeners:Te}))}}if((i&7)===0){e:{if(ae=n==="mouseover"||n==="pointerover",Se=n==="mouseout"||n==="pointerout",ae&&o!==Zt&&(Ee=o.relatedTarget||o.fromElement)&&(gi(Ee)||Ee[Nr]))break e;if((Se||ae)&&(ae=oe.window===oe?oe:(ae=oe.ownerDocument)?ae.defaultView||ae.parentWindow:window,Se?(Ee=o.relatedTarget||o.toElement,Se=W,Ee=Ee?gi(Ee):null,Ee!==null&&(qt=hi(Ee),Ee!==qt||Ee.tag!==5&&Ee.tag!==6)&&(Ee=null)):(Se=null,Ee=W),Se!==Ee)){if(Te=yf,he="onMouseLeave",B="onMouseEnter",z="mouse",(n==="pointerout"||n==="pointerover")&&(Te=xf,he="onPointerLeave",B="onPointerEnter",z="pointer"),qt=Se==null?ae:Wi(Se),F=Ee==null?ae:Wi(Ee),ae=new Te(he,z+"leave",Se,o,oe),ae.target=qt,ae.relatedTarget=F,he=null,gi(oe)===W&&(Te=new Te(B,z+"enter",Ee,o,oe),Te.target=F,Te.relatedTarget=qt,he=Te),qt=he,Se&&Ee)t:{for(Te=Se,B=Ee,z=0,F=Te;F;F=Hi(F))z++;for(F=0,he=B;he;he=Hi(he))F++;for(;0<z-F;)Te=Hi(Te),z--;for(;0<F-z;)B=Hi(B),F--;for(;z--;){if(Te===B||B!==null&&Te===B.alternate)break t;Te=Hi(Te),B=Hi(B)}Te=null}else Te=null;Se!==null&&qf(ue,ae,Se,Te,!1),Ee!==null&&qt!==null&&qf(ue,qt,Ee,Te,!0)}}e:{if(ae=W?Wi(W):window,Se=ae.nodeName&&ae.nodeName.toLowerCase(),Se==="select"||Se==="input"&&ae.type==="file")var De=yx;else if(Cf(ae))if(jf)De=kx;else{De=xx;var ze=vx}else(Se=ae.nodeName)&&Se.toLowerCase()==="input"&&(ae.type==="checkbox"||ae.type==="radio")&&(De=_x);if(De&&(De=De(n,W))){Nf(ue,De,o,oe);break e}ze&&ze(n,ae,W),n==="focusout"&&(ze=ae._wrapperState)&&ze.controlled&&ae.type==="number"&&ln(ae,"number",ae.value)}switch(ze=W?Wi(W):window,n){case"focusin":(Cf(ze)||ze.contentEditable==="true")&&(Fi=ze,Wo=W,Bs=null);break;case"focusout":Bs=Wo=Fi=null;break;case"mousedown":qo=!0;break;case"contextmenu":case"mouseup":case"dragend":qo=!1,Lf(ue,o,oe);break;case"selectionchange":if(Sx)break;case"keydown":case"keyup":Lf(ue,o,oe)}var $e;if(Fo)e:{switch(n){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Bi?bf(n,o)&&(He="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(He="onCompositionStart");He&&(_f&&o.locale!=="ko"&&(Bi||He!=="onCompositionStart"?He==="onCompositionEnd"&&Bi&&($e=hf()):(Vr=oe,Lo="value"in Vr?Vr.value:Vr.textContent,Bi=!0)),ze=Gl(W,He),0<ze.length&&(He=new vf(He,n,null,o,oe),ue.push({event:He,listeners:ze}),$e?He.data=$e:($e=Sf(o),$e!==null&&(He.data=$e)))),($e=fx?px(n,o):mx(n,o))&&(W=Gl(W,"onBeforeInput"),0<W.length&&(oe=new vf("onBeforeInput","beforeinput",null,o,oe),ue.push({event:oe,listeners:W}),oe.data=$e))}Uf(ue,i)})}function Hs(n,i,o){return{instance:n,listener:i,currentTarget:o}}function Gl(n,i){for(var o=i+"Capture",d=[];n!==null;){var h=n,v=h.stateNode;h.tag===5&&v!==null&&(h=v,v=bt(n,o),v!=null&&d.unshift(Hs(n,v,h)),v=bt(n,i),v!=null&&d.push(Hs(n,v,h))),n=n.return}return d}function Hi(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function qf(n,i,o,d,h){for(var v=i._reactName,w=[];o!==null&&o!==d;){var D=o,L=D.alternate,W=D.stateNode;if(L!==null&&L===d)break;D.tag===5&&W!==null&&(D=W,h?(L=bt(o,v),L!=null&&w.unshift(Hs(o,L,D))):h||(L=bt(o,v),L!=null&&w.push(Hs(o,L,D)))),o=o.return}w.length!==0&&n.push({event:i,listeners:w})}var Ex=/\r\n?/g,Tx=/\u0000|\uFFFD/g;function Kf(n){return(typeof n=="string"?n:""+n).replace(Ex,`
38
- `).replace(Tx,"")}function Jl(n,i,o){if(i=Kf(i),Kf(n)!==i&&o)throw Error(r(425))}function ea(){}var Go=null,Jo=null;function ec(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var tc=typeof setTimeout=="function"?setTimeout:void 0,Ix=typeof clearTimeout=="function"?clearTimeout:void 0,Zf=typeof Promise=="function"?Promise:void 0,Dx=typeof queueMicrotask=="function"?queueMicrotask:typeof Zf<"u"?function(n){return Zf.resolve(null).then(n).catch(Ax)}:tc;function Ax(n){setTimeout(function(){throw n})}function nc(n,i){var o=i,d=0;do{var h=o.nextSibling;if(n.removeChild(o),h&&h.nodeType===8)if(o=h.data,o==="/$"){if(d===0){n.removeChild(h),Rs(i);return}d--}else o!=="$"&&o!=="$?"&&o!=="$!"||d++;o=h}while(o);Rs(i)}function Ur(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return n}function Yf(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"){if(i===0)return n;i--}else o==="/$"&&i++}n=n.previousSibling}return null}var Ui=Math.random().toString(36).slice(2),gr="__reactFiber$"+Ui,Us="__reactProps$"+Ui,Nr="__reactContainer$"+Ui,rc="__reactEvents$"+Ui,Rx="__reactListeners$"+Ui,Px="__reactHandles$"+Ui;function gi(n){var i=n[gr];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Nr]||o[gr]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=Yf(n);n!==null;){if(o=n[gr])return o;n=Yf(n)}return i}n=o,o=n.parentNode}return null}function Ws(n){return n=n[gr]||n[Nr],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Wi(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function ta(n){return n[Us]||null}var ic=[],qi=-1;function Wr(n){return{current:n}}function It(n){0>qi||(n.current=ic[qi],ic[qi]=null,qi--)}function St(n,i){qi++,ic[qi]=n.current,n.current=i}var qr={},yn=Wr(qr),En=Wr(!1),yi=qr;function Ki(n,i){var o=n.type.contextTypes;if(!o)return qr;var d=n.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===i)return d.__reactInternalMemoizedMaskedChildContext;var h={},v;for(v in o)h[v]=i[v];return d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=i,n.__reactInternalMemoizedMaskedChildContext=h),h}function Tn(n){return n=n.childContextTypes,n!=null}function na(){It(En),It(yn)}function Qf(n,i,o){if(yn.current!==qr)throw Error(r(168));St(yn,i),St(En,o)}function Xf(n,i,o){var d=n.stateNode;if(i=i.childContextTypes,typeof d.getChildContext!="function")return o;d=d.getChildContext();for(var h in d)if(!(h in i))throw Error(r(108,Fe(n)||"Unknown",h));return C({},o,d)}function ra(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||qr,yi=yn.current,St(yn,n),St(En,En.current),!0}function Gf(n,i,o){var d=n.stateNode;if(!d)throw Error(r(169));o?(n=Xf(n,i,yi),d.__reactInternalMemoizedMergedChildContext=n,It(En),It(yn),St(yn,n)):It(En),St(En,o)}var jr=null,ia=!1,sc=!1;function Jf(n){jr===null?jr=[n]:jr.push(n)}function Lx(n){ia=!0,Jf(n)}function Kr(){if(!sc&&jr!==null){sc=!0;var n=0,i=gt;try{var o=jr;for(gt=1;n<o.length;n++){var d=o[n];do d=d(!0);while(d!==null)}jr=null,ia=!1}catch(h){throw jr!==null&&(jr=jr.slice(n+1)),ef(jo,Kr),h}finally{gt=i,sc=!1}}return null}var Zi=[],Yi=0,sa=null,la=0,Zn=[],Yn=0,vi=null,Er=1,Tr="";function xi(n,i){Zi[Yi++]=la,Zi[Yi++]=sa,sa=n,la=i}function ep(n,i,o){Zn[Yn++]=Er,Zn[Yn++]=Tr,Zn[Yn++]=vi,vi=n;var d=Er;n=Tr;var h=32-sr(d)-1;d&=~(1<<h),o+=1;var v=32-sr(i)+h;if(30<v){var w=h-h%5;v=(d&(1<<w)-1).toString(32),d>>=w,h-=w,Er=1<<32-sr(i)+h|o<<h|d,Tr=v+n}else Er=1<<v|o<<h|d,Tr=n}function lc(n){n.return!==null&&(xi(n,1),ep(n,1,0))}function ac(n){for(;n===sa;)sa=Zi[--Yi],Zi[Yi]=null,la=Zi[--Yi],Zi[Yi]=null;for(;n===vi;)vi=Zn[--Yn],Zn[Yn]=null,Tr=Zn[--Yn],Zn[Yn]=null,Er=Zn[--Yn],Zn[Yn]=null}var Bn=null,Fn=null,Dt=!1,ar=null;function tp(n,i){var o=Jn(5,null,null,0);o.elementType="DELETED",o.stateNode=i,o.return=n,i=n.deletions,i===null?(n.deletions=[o],n.flags|=16):i.push(o)}function np(n,i){switch(n.tag){case 5:var o=n.type;return i=i.nodeType!==1||o.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(n.stateNode=i,Bn=n,Fn=Ur(i.firstChild),!0):!1;case 6:return i=n.pendingProps===""||i.nodeType!==3?null:i,i!==null?(n.stateNode=i,Bn=n,Fn=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(o=vi!==null?{id:Er,overflow:Tr}:null,n.memoizedState={dehydrated:i,treeContext:o,retryLane:1073741824},o=Jn(18,null,null,0),o.stateNode=i,o.return=n,n.child=o,Bn=n,Fn=null,!0):!1;default:return!1}}function oc(n){return(n.mode&1)!==0&&(n.flags&128)===0}function cc(n){if(Dt){var i=Fn;if(i){var o=i;if(!np(n,i)){if(oc(n))throw Error(r(418));i=Ur(o.nextSibling);var d=Bn;i&&np(n,i)?tp(d,o):(n.flags=n.flags&-4097|2,Dt=!1,Bn=n)}}else{if(oc(n))throw Error(r(418));n.flags=n.flags&-4097|2,Dt=!1,Bn=n}}}function rp(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Bn=n}function aa(n){if(n!==Bn)return!1;if(!Dt)return rp(n),Dt=!0,!1;var i;if((i=n.tag!==3)&&!(i=n.tag!==5)&&(i=n.type,i=i!=="head"&&i!=="body"&&!ec(n.type,n.memoizedProps)),i&&(i=Fn)){if(oc(n))throw ip(),Error(r(418));for(;i;)tp(n,i),i=Ur(i.nextSibling)}if(rp(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"){if(i===0){Fn=Ur(n.nextSibling);break e}i--}else o!=="$"&&o!=="$!"&&o!=="$?"||i++}n=n.nextSibling}Fn=null}}else Fn=Bn?Ur(n.stateNode.nextSibling):null;return!0}function ip(){for(var n=Fn;n;)n=Ur(n.nextSibling)}function Qi(){Fn=Bn=null,Dt=!1}function uc(n){ar===null?ar=[n]:ar.push(n)}var Mx=M.ReactCurrentBatchConfig;function qs(n,i,o){if(n=o.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(r(309));var d=o.stateNode}if(!d)throw Error(r(147,n));var h=d,v=""+n;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===v?i.ref:(i=function(w){var D=h.refs;w===null?delete D[v]:D[v]=w},i._stringRef=v,i)}if(typeof n!="string")throw Error(r(284));if(!o._owner)throw Error(r(290,n))}return n}function oa(n,i){throw n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n))}function sp(n){var i=n._init;return i(n._payload)}function lp(n){function i(B,z){if(n){var F=B.deletions;F===null?(B.deletions=[z],B.flags|=16):F.push(z)}}function o(B,z){if(!n)return null;for(;z!==null;)i(B,z),z=z.sibling;return null}function d(B,z){for(B=new Map;z!==null;)z.key!==null?B.set(z.key,z):B.set(z.index,z),z=z.sibling;return B}function h(B,z){return B=ti(B,z),B.index=0,B.sibling=null,B}function v(B,z,F){return B.index=F,n?(F=B.alternate,F!==null?(F=F.index,F<z?(B.flags|=2,z):F):(B.flags|=2,z)):(B.flags|=1048576,z)}function w(B){return n&&B.alternate===null&&(B.flags|=2),B}function D(B,z,F,he){return z===null||z.tag!==6?(z=tu(F,B.mode,he),z.return=B,z):(z=h(z,F),z.return=B,z)}function L(B,z,F,he){var De=F.type;return De===V?oe(B,z,F.props.children,he,F.key):z!==null&&(z.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===te&&sp(De)===z.type)?(he=h(z,F.props),he.ref=qs(B,z,F),he.return=B,he):(he=Aa(F.type,F.key,F.props,null,B.mode,he),he.ref=qs(B,z,F),he.return=B,he)}function W(B,z,F,he){return z===null||z.tag!==4||z.stateNode.containerInfo!==F.containerInfo||z.stateNode.implementation!==F.implementation?(z=nu(F,B.mode,he),z.return=B,z):(z=h(z,F.children||[]),z.return=B,z)}function oe(B,z,F,he,De){return z===null||z.tag!==7?(z=ji(F,B.mode,he,De),z.return=B,z):(z=h(z,F),z.return=B,z)}function ue(B,z,F){if(typeof z=="string"&&z!==""||typeof z=="number")return z=tu(""+z,B.mode,F),z.return=B,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case P:return F=Aa(z.type,z.key,z.props,null,B.mode,F),F.ref=qs(B,null,z),F.return=B,F;case j:return z=nu(z,B.mode,F),z.return=B,z;case te:var he=z._init;return ue(B,he(z._payload),F)}if(jt(z)||me(z))return z=ji(z,B.mode,F,null),z.return=B,z;oa(B,z)}return null}function ae(B,z,F,he){var De=z!==null?z.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return De!==null?null:D(B,z,""+F,he);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case P:return F.key===De?L(B,z,F,he):null;case j:return F.key===De?W(B,z,F,he):null;case te:return De=F._init,ae(B,z,De(F._payload),he)}if(jt(F)||me(F))return De!==null?null:oe(B,z,F,he,null);oa(B,F)}return null}function Se(B,z,F,he,De){if(typeof he=="string"&&he!==""||typeof he=="number")return B=B.get(F)||null,D(z,B,""+he,De);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case P:return B=B.get(he.key===null?F:he.key)||null,L(z,B,he,De);case j:return B=B.get(he.key===null?F:he.key)||null,W(z,B,he,De);case te:var ze=he._init;return Se(B,z,F,ze(he._payload),De)}if(jt(he)||me(he))return B=B.get(F)||null,oe(z,B,he,De,null);oa(z,he)}return null}function Ee(B,z,F,he){for(var De=null,ze=null,$e=z,He=z=0,fn=null;$e!==null&&He<F.length;He++){$e.index>He?(fn=$e,$e=null):fn=$e.sibling;var lt=ae(B,$e,F[He],he);if(lt===null){$e===null&&($e=fn);break}n&&$e&&lt.alternate===null&&i(B,$e),z=v(lt,z,He),ze===null?De=lt:ze.sibling=lt,ze=lt,$e=fn}if(He===F.length)return o(B,$e),Dt&&xi(B,He),De;if($e===null){for(;He<F.length;He++)$e=ue(B,F[He],he),$e!==null&&(z=v($e,z,He),ze===null?De=$e:ze.sibling=$e,ze=$e);return Dt&&xi(B,He),De}for($e=d(B,$e);He<F.length;He++)fn=Se($e,B,He,F[He],he),fn!==null&&(n&&fn.alternate!==null&&$e.delete(fn.key===null?He:fn.key),z=v(fn,z,He),ze===null?De=fn:ze.sibling=fn,ze=fn);return n&&$e.forEach(function(ni){return i(B,ni)}),Dt&&xi(B,He),De}function Te(B,z,F,he){var De=me(F);if(typeof De!="function")throw Error(r(150));if(F=De.call(F),F==null)throw Error(r(151));for(var ze=De=null,$e=z,He=z=0,fn=null,lt=F.next();$e!==null&&!lt.done;He++,lt=F.next()){$e.index>He?(fn=$e,$e=null):fn=$e.sibling;var ni=ae(B,$e,lt.value,he);if(ni===null){$e===null&&($e=fn);break}n&&$e&&ni.alternate===null&&i(B,$e),z=v(ni,z,He),ze===null?De=ni:ze.sibling=ni,ze=ni,$e=fn}if(lt.done)return o(B,$e),Dt&&xi(B,He),De;if($e===null){for(;!lt.done;He++,lt=F.next())lt=ue(B,lt.value,he),lt!==null&&(z=v(lt,z,He),ze===null?De=lt:ze.sibling=lt,ze=lt);return Dt&&xi(B,He),De}for($e=d(B,$e);!lt.done;He++,lt=F.next())lt=Se($e,B,He,lt.value,he),lt!==null&&(n&&lt.alternate!==null&&$e.delete(lt.key===null?He:lt.key),z=v(lt,z,He),ze===null?De=lt:ze.sibling=lt,ze=lt);return n&&$e.forEach(function(h_){return i(B,h_)}),Dt&&xi(B,He),De}function qt(B,z,F,he){if(typeof F=="object"&&F!==null&&F.type===V&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case P:e:{for(var De=F.key,ze=z;ze!==null;){if(ze.key===De){if(De=F.type,De===V){if(ze.tag===7){o(B,ze.sibling),z=h(ze,F.props.children),z.return=B,B=z;break e}}else if(ze.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===te&&sp(De)===ze.type){o(B,ze.sibling),z=h(ze,F.props),z.ref=qs(B,ze,F),z.return=B,B=z;break e}o(B,ze);break}else i(B,ze);ze=ze.sibling}F.type===V?(z=ji(F.props.children,B.mode,he,F.key),z.return=B,B=z):(he=Aa(F.type,F.key,F.props,null,B.mode,he),he.ref=qs(B,z,F),he.return=B,B=he)}return w(B);case j:e:{for(ze=F.key;z!==null;){if(z.key===ze)if(z.tag===4&&z.stateNode.containerInfo===F.containerInfo&&z.stateNode.implementation===F.implementation){o(B,z.sibling),z=h(z,F.children||[]),z.return=B,B=z;break e}else{o(B,z);break}else i(B,z);z=z.sibling}z=nu(F,B.mode,he),z.return=B,B=z}return w(B);case te:return ze=F._init,qt(B,z,ze(F._payload),he)}if(jt(F))return Ee(B,z,F,he);if(me(F))return Te(B,z,F,he);oa(B,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,z!==null&&z.tag===6?(o(B,z.sibling),z=h(z,F),z.return=B,B=z):(o(B,z),z=tu(F,B.mode,he),z.return=B,B=z),w(B)):o(B,z)}return qt}var Xi=lp(!0),ap=lp(!1),ca=Wr(null),ua=null,Gi=null,dc=null;function fc(){dc=Gi=ua=null}function pc(n){var i=ca.current;It(ca),n._currentValue=i}function mc(n,i,o){for(;n!==null;){var d=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),n===o)break;n=n.return}}function Ji(n,i){ua=n,dc=Gi=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&i)!==0&&(In=!0),n.firstContext=null)}function Qn(n){var i=n._currentValue;if(dc!==n)if(n={context:n,memoizedValue:i,next:null},Gi===null){if(ua===null)throw Error(r(308));Gi=n,ua.dependencies={lanes:0,firstContext:n}}else Gi=Gi.next=n;return i}var _i=null;function hc(n){_i===null?_i=[n]:_i.push(n)}function op(n,i,o,d){var h=i.interleaved;return h===null?(o.next=o,hc(i)):(o.next=h.next,h.next=o),i.interleaved=o,Ir(n,d)}function Ir(n,i){n.lanes|=i;var o=n.alternate;for(o!==null&&(o.lanes|=i),o=n,n=n.return;n!==null;)n.childLanes|=i,o=n.alternate,o!==null&&(o.childLanes|=i),o=n,n=n.return;return o.tag===3?o.stateNode:null}var Zr=!1;function gc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cp(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Dr(n,i){return{eventTime:n,lane:i,tag:0,payload:null,callback:null,next:null}}function Yr(n,i,o){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(it&2)!==0){var h=d.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),d.pending=i,Ir(n,o)}return h=d.interleaved,h===null?(i.next=i,hc(d)):(i.next=h.next,h.next=i),d.interleaved=i,Ir(n,o)}function da(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194240)!==0)){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,Io(n,o)}}function up(n,i){var o=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var h=null,v=null;if(o=o.firstBaseUpdate,o!==null){do{var w={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};v===null?h=v=w:v=v.next=w,o=o.next}while(o!==null);v===null?h=v=i:v=v.next=i}else h=v=i;o={baseState:d.baseState,firstBaseUpdate:h,lastBaseUpdate:v,shared:d.shared,effects:d.effects},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}function fa(n,i,o,d){var h=n.updateQueue;Zr=!1;var v=h.firstBaseUpdate,w=h.lastBaseUpdate,D=h.shared.pending;if(D!==null){h.shared.pending=null;var L=D,W=L.next;L.next=null,w===null?v=W:w.next=W,w=L;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,D=oe.lastBaseUpdate,D!==w&&(D===null?oe.firstBaseUpdate=W:D.next=W,oe.lastBaseUpdate=L))}if(v!==null){var ue=h.baseState;w=0,oe=W=L=null,D=v;do{var ae=D.lane,Se=D.eventTime;if((d&ae)===ae){oe!==null&&(oe=oe.next={eventTime:Se,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ee=n,Te=D;switch(ae=i,Se=o,Te.tag){case 1:if(Ee=Te.payload,typeof Ee=="function"){ue=Ee.call(Se,ue,ae);break e}ue=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Te.payload,ae=typeof Ee=="function"?Ee.call(Se,ue,ae):Ee,ae==null)break e;ue=C({},ue,ae);break e;case 2:Zr=!0}}D.callback!==null&&D.lane!==0&&(n.flags|=64,ae=h.effects,ae===null?h.effects=[D]:ae.push(D))}else Se={eventTime:Se,lane:ae,tag:D.tag,payload:D.payload,callback:D.callback,next:null},oe===null?(W=oe=Se,L=ue):oe=oe.next=Se,w|=ae;if(D=D.next,D===null){if(D=h.shared.pending,D===null)break;ae=D,D=ae.next,ae.next=null,h.lastBaseUpdate=ae,h.shared.pending=null}}while(!0);if(oe===null&&(L=ue),h.baseState=L,h.firstBaseUpdate=W,h.lastBaseUpdate=oe,i=h.shared.interleaved,i!==null){h=i;do w|=h.lane,h=h.next;while(h!==i)}else v===null&&(h.shared.lanes=0);bi|=w,n.lanes=w,n.memoizedState=ue}}function dp(n,i,o){if(n=i.effects,i.effects=null,n!==null)for(i=0;i<n.length;i++){var d=n[i],h=d.callback;if(h!==null){if(d.callback=null,d=o,typeof h!="function")throw Error(r(191,h));h.call(d)}}}var Ks={},yr=Wr(Ks),Zs=Wr(Ks),Ys=Wr(Ks);function ki(n){if(n===Ks)throw Error(r(174));return n}function yc(n,i){switch(St(Ys,i),St(Zs,n),St(yr,Ks),n=i.nodeType,n){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:Q(null,"");break;default:n=n===8?i.parentNode:i,i=n.namespaceURI||null,n=n.tagName,i=Q(i,n)}It(yr),St(yr,i)}function es(){It(yr),It(Zs),It(Ys)}function fp(n){ki(Ys.current);var i=ki(yr.current),o=Q(i,n.type);i!==o&&(St(Zs,n),St(yr,o))}function vc(n){Zs.current===n&&(It(yr),It(Zs))}var Rt=Wr(0);function pa(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var xc=[];function _c(){for(var n=0;n<xc.length;n++)xc[n]._workInProgressVersionPrimary=null;xc.length=0}var ma=M.ReactCurrentDispatcher,kc=M.ReactCurrentBatchConfig,wi=0,Pt=null,en=null,un=null,ha=!1,Qs=!1,Xs=0,Ox=0;function vn(){throw Error(r(321))}function wc(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!lr(n[o],i[o]))return!1;return!0}function bc(n,i,o,d,h,v){if(wi=v,Pt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,ma.current=n===null||n.memoizedState===null?Fx:Vx,n=o(d,h),Qs){v=0;do{if(Qs=!1,Xs=0,25<=v)throw Error(r(301));v+=1,un=en=null,i.updateQueue=null,ma.current=Hx,n=o(d,h)}while(Qs)}if(ma.current=va,i=en!==null&&en.next!==null,wi=0,un=en=Pt=null,ha=!1,i)throw Error(r(300));return n}function Sc(){var n=Xs!==0;return Xs=0,n}function vr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?Pt.memoizedState=un=n:un=un.next=n,un}function Xn(){if(en===null){var n=Pt.alternate;n=n!==null?n.memoizedState:null}else n=en.next;var i=un===null?Pt.memoizedState:un.next;if(i!==null)un=i,en=n;else{if(n===null)throw Error(r(310));en=n,n={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},un===null?Pt.memoizedState=un=n:un=un.next=n}return un}function Gs(n,i){return typeof i=="function"?i(n):i}function Cc(n){var i=Xn(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var d=en,h=d.baseQueue,v=o.pending;if(v!==null){if(h!==null){var w=h.next;h.next=v.next,v.next=w}d.baseQueue=h=v,o.pending=null}if(h!==null){v=h.next,d=d.baseState;var D=w=null,L=null,W=v;do{var oe=W.lane;if((wi&oe)===oe)L!==null&&(L=L.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),d=W.hasEagerState?W.eagerState:n(d,W.action);else{var ue={lane:oe,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};L===null?(D=L=ue,w=d):L=L.next=ue,Pt.lanes|=oe,bi|=oe}W=W.next}while(W!==null&&W!==v);L===null?w=d:L.next=D,lr(d,i.memoizedState)||(In=!0),i.memoizedState=d,i.baseState=w,i.baseQueue=L,o.lastRenderedState=d}if(n=o.interleaved,n!==null){h=n;do v=h.lane,Pt.lanes|=v,bi|=v,h=h.next;while(h!==n)}else h===null&&(o.lanes=0);return[i.memoizedState,o.dispatch]}function Nc(n){var i=Xn(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var d=o.dispatch,h=o.pending,v=i.memoizedState;if(h!==null){o.pending=null;var w=h=h.next;do v=n(v,w.action),w=w.next;while(w!==h);lr(v,i.memoizedState)||(In=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),o.lastRenderedState=v}return[v,d]}function pp(){}function mp(n,i){var o=Pt,d=Xn(),h=i(),v=!lr(d.memoizedState,h);if(v&&(d.memoizedState=h,In=!0),d=d.queue,jc(yp.bind(null,o,d,n),[n]),d.getSnapshot!==i||v||un!==null&&un.memoizedState.tag&1){if(o.flags|=2048,Js(9,gp.bind(null,o,d,h,i),void 0,null),dn===null)throw Error(r(349));(wi&30)!==0||hp(o,i,h)}return h}function hp(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Pt.updateQueue,i===null?(i={lastEffect:null,stores:null},Pt.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function gp(n,i,o,d){i.value=o,i.getSnapshot=d,vp(i)&&xp(n)}function yp(n,i,o){return o(function(){vp(i)&&xp(n)})}function vp(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!lr(n,o)}catch{return!0}}function xp(n){var i=Ir(n,1);i!==null&&dr(i,n,1,-1)}function _p(n){var i=vr();return typeof n=="function"&&(n=n()),i.memoizedState=i.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gs,lastRenderedState:n},i.queue=n,n=n.dispatch=Bx.bind(null,Pt,n),[i.memoizedState,n]}function Js(n,i,o,d){return n={tag:n,create:i,destroy:o,deps:d,next:null},i=Pt.updateQueue,i===null?(i={lastEffect:null,stores:null},Pt.updateQueue=i,i.lastEffect=n.next=n):(o=i.lastEffect,o===null?i.lastEffect=n.next=n:(d=o.next,o.next=n,n.next=d,i.lastEffect=n)),n}function kp(){return Xn().memoizedState}function ga(n,i,o,d){var h=vr();Pt.flags|=n,h.memoizedState=Js(1|i,o,void 0,d===void 0?null:d)}function ya(n,i,o,d){var h=Xn();d=d===void 0?null:d;var v=void 0;if(en!==null){var w=en.memoizedState;if(v=w.destroy,d!==null&&wc(d,w.deps)){h.memoizedState=Js(i,o,v,d);return}}Pt.flags|=n,h.memoizedState=Js(1|i,o,v,d)}function wp(n,i){return ga(8390656,8,n,i)}function jc(n,i){return ya(2048,8,n,i)}function bp(n,i){return ya(4,2,n,i)}function Sp(n,i){return ya(4,4,n,i)}function Cp(n,i){if(typeof i=="function")return n=n(),i(n),function(){i(null)};if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Np(n,i,o){return o=o!=null?o.concat([n]):null,ya(4,4,Cp.bind(null,i,n),o)}function Ec(){}function jp(n,i){var o=Xn();i=i===void 0?null:i;var d=o.memoizedState;return d!==null&&i!==null&&wc(i,d[1])?d[0]:(o.memoizedState=[n,i],n)}function Ep(n,i){var o=Xn();i=i===void 0?null:i;var d=o.memoizedState;return d!==null&&i!==null&&wc(i,d[1])?d[0]:(n=n(),o.memoizedState=[n,i],n)}function Tp(n,i,o){return(wi&21)===0?(n.baseState&&(n.baseState=!1,In=!0),n.memoizedState=o):(lr(o,i)||(o=sf(),Pt.lanes|=o,bi|=o,n.baseState=!0),i)}function zx(n,i){var o=gt;gt=o!==0&&4>o?o:4,n(!0);var d=kc.transition;kc.transition={};try{n(!1),i()}finally{gt=o,kc.transition=d}}function Ip(){return Xn().memoizedState}function $x(n,i,o){var d=Jr(n);if(o={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null},Dp(n))Ap(i,o);else if(o=op(n,i,o,d),o!==null){var h=Nn();dr(o,n,d,h),Rp(o,i,d)}}function Bx(n,i,o){var d=Jr(n),h={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null};if(Dp(n))Ap(i,h);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var w=i.lastRenderedState,D=v(w,o);if(h.hasEagerState=!0,h.eagerState=D,lr(D,w)){var L=i.interleaved;L===null?(h.next=h,hc(i)):(h.next=L.next,L.next=h),i.interleaved=h;return}}catch{}finally{}o=op(n,i,h,d),o!==null&&(h=Nn(),dr(o,n,d,h),Rp(o,i,d))}}function Dp(n){var i=n.alternate;return n===Pt||i!==null&&i===Pt}function Ap(n,i){Qs=ha=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function Rp(n,i,o){if((o&4194240)!==0){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,Io(n,o)}}var va={readContext:Qn,useCallback:vn,useContext:vn,useEffect:vn,useImperativeHandle:vn,useInsertionEffect:vn,useLayoutEffect:vn,useMemo:vn,useReducer:vn,useRef:vn,useState:vn,useDebugValue:vn,useDeferredValue:vn,useTransition:vn,useMutableSource:vn,useSyncExternalStore:vn,useId:vn,unstable_isNewReconciler:!1},Fx={readContext:Qn,useCallback:function(n,i){return vr().memoizedState=[n,i===void 0?null:i],n},useContext:Qn,useEffect:wp,useImperativeHandle:function(n,i,o){return o=o!=null?o.concat([n]):null,ga(4194308,4,Cp.bind(null,i,n),o)},useLayoutEffect:function(n,i){return ga(4194308,4,n,i)},useInsertionEffect:function(n,i){return ga(4,2,n,i)},useMemo:function(n,i){var o=vr();return i=i===void 0?null:i,n=n(),o.memoizedState=[n,i],n},useReducer:function(n,i,o){var d=vr();return i=o!==void 0?o(i):i,d.memoizedState=d.baseState=i,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:i},d.queue=n,n=n.dispatch=$x.bind(null,Pt,n),[d.memoizedState,n]},useRef:function(n){var i=vr();return n={current:n},i.memoizedState=n},useState:_p,useDebugValue:Ec,useDeferredValue:function(n){return vr().memoizedState=n},useTransition:function(){var n=_p(!1),i=n[0];return n=zx.bind(null,n[1]),vr().memoizedState=n,[i,n]},useMutableSource:function(){},useSyncExternalStore:function(n,i,o){var d=Pt,h=vr();if(Dt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),dn===null)throw Error(r(349));(wi&30)!==0||hp(d,i,o)}h.memoizedState=o;var v={value:o,getSnapshot:i};return h.queue=v,wp(yp.bind(null,d,v,n),[n]),d.flags|=2048,Js(9,gp.bind(null,d,v,o,i),void 0,null),o},useId:function(){var n=vr(),i=dn.identifierPrefix;if(Dt){var o=Tr,d=Er;o=(d&~(1<<32-sr(d)-1)).toString(32)+o,i=":"+i+"R"+o,o=Xs++,0<o&&(i+="H"+o.toString(32)),i+=":"}else o=Ox++,i=":"+i+"r"+o.toString(32)+":";return n.memoizedState=i},unstable_isNewReconciler:!1},Vx={readContext:Qn,useCallback:jp,useContext:Qn,useEffect:jc,useImperativeHandle:Np,useInsertionEffect:bp,useLayoutEffect:Sp,useMemo:Ep,useReducer:Cc,useRef:kp,useState:function(){return Cc(Gs)},useDebugValue:Ec,useDeferredValue:function(n){var i=Xn();return Tp(i,en.memoizedState,n)},useTransition:function(){var n=Cc(Gs)[0],i=Xn().memoizedState;return[n,i]},useMutableSource:pp,useSyncExternalStore:mp,useId:Ip,unstable_isNewReconciler:!1},Hx={readContext:Qn,useCallback:jp,useContext:Qn,useEffect:jc,useImperativeHandle:Np,useInsertionEffect:bp,useLayoutEffect:Sp,useMemo:Ep,useReducer:Nc,useRef:kp,useState:function(){return Nc(Gs)},useDebugValue:Ec,useDeferredValue:function(n){var i=Xn();return en===null?i.memoizedState=n:Tp(i,en.memoizedState,n)},useTransition:function(){var n=Nc(Gs)[0],i=Xn().memoizedState;return[n,i]},useMutableSource:pp,useSyncExternalStore:mp,useId:Ip,unstable_isNewReconciler:!1};function or(n,i){if(n&&n.defaultProps){i=C({},i),n=n.defaultProps;for(var o in n)i[o]===void 0&&(i[o]=n[o]);return i}return i}function Tc(n,i,o,d){i=n.memoizedState,o=o(d,i),o=o==null?i:C({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var xa={isMounted:function(n){return(n=n._reactInternals)?hi(n)===n:!1},enqueueSetState:function(n,i,o){n=n._reactInternals;var d=Nn(),h=Jr(n),v=Dr(d,h);v.payload=i,o!=null&&(v.callback=o),i=Yr(n,v,h),i!==null&&(dr(i,n,h,d),da(i,n,h))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var d=Nn(),h=Jr(n),v=Dr(d,h);v.tag=1,v.payload=i,o!=null&&(v.callback=o),i=Yr(n,v,h),i!==null&&(dr(i,n,h,d),da(i,n,h))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=Nn(),d=Jr(n),h=Dr(o,d);h.tag=2,i!=null&&(h.callback=i),i=Yr(n,h,d),i!==null&&(dr(i,n,d,o),da(i,n,d))}};function Pp(n,i,o,d,h,v,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,v,w):i.prototype&&i.prototype.isPureReactComponent?!$s(o,d)||!$s(h,v):!0}function Lp(n,i,o){var d=!1,h=qr,v=i.contextType;return typeof v=="object"&&v!==null?v=Qn(v):(h=Tn(i)?yi:yn.current,d=i.contextTypes,v=(d=d!=null)?Ki(n,h):qr),i=new i(o,v),n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=xa,n.stateNode=i,i._reactInternals=n,d&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=v),i}function Mp(n,i,o,d){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==n&&xa.enqueueReplaceState(i,i.state,null)}function Ic(n,i,o,d){var h=n.stateNode;h.props=o,h.state=n.memoizedState,h.refs={},gc(n);var v=i.contextType;typeof v=="object"&&v!==null?h.context=Qn(v):(v=Tn(i)?yi:yn.current,h.context=Ki(n,v)),h.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Tc(n,i,v,o),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(i=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),i!==h.state&&xa.enqueueReplaceState(h,h.state,null),fa(n,o,h,d),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function ts(n,i){try{var o="",d=i;do o+=Pe(d),d=d.return;while(d);var h=o}catch(v){h=`
39
- Error generating stack: `+v.message+`
40
- `+v.stack}return{value:n,source:i,stack:h,digest:null}}function Dc(n,i,o){return{value:n,source:null,stack:o??null,digest:i??null}}function Ac(n,i){try{console.error(i.value)}catch(o){setTimeout(function(){throw o})}}var Ux=typeof WeakMap=="function"?WeakMap:Map;function Op(n,i,o){o=Dr(-1,o),o.tag=3,o.payload={element:null};var d=i.value;return o.callback=function(){Na||(Na=!0,Kc=d),Ac(n,i)},o}function zp(n,i,o){o=Dr(-1,o),o.tag=3;var d=n.type.getDerivedStateFromError;if(typeof d=="function"){var h=i.value;o.payload=function(){return d(h)},o.callback=function(){Ac(n,i)}}var v=n.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(o.callback=function(){Ac(n,i),typeof d!="function"&&(Xr===null?Xr=new Set([this]):Xr.add(this));var w=i.stack;this.componentDidCatch(i.value,{componentStack:w!==null?w:""})}),o}function $p(n,i,o){var d=n.pingCache;if(d===null){d=n.pingCache=new Ux;var h=new Set;d.set(i,h)}else h=d.get(i),h===void 0&&(h=new Set,d.set(i,h));h.has(o)||(h.add(o),n=i_.bind(null,n,i,o),i.then(n,n))}function Bp(n){do{var i;if((i=n.tag===13)&&(i=n.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return n;n=n.return}while(n!==null);return null}function Fp(n,i,o,d,h){return(n.mode&1)===0?(n===i?n.flags|=65536:(n.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(i=Dr(-1,1),i.tag=2,Yr(o,i,1))),o.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var Wx=M.ReactCurrentOwner,In=!1;function Cn(n,i,o,d){i.child=n===null?ap(i,null,o,d):Xi(i,n.child,o,d)}function Vp(n,i,o,d,h){o=o.render;var v=i.ref;return Ji(i,h),d=bc(n,i,o,d,v,h),o=Sc(),n!==null&&!In?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,Ar(n,i,h)):(Dt&&o&&lc(i),i.flags|=1,Cn(n,i,d,h),i.child)}function Hp(n,i,o,d,h){if(n===null){var v=o.type;return typeof v=="function"&&!eu(v)&&v.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(i.tag=15,i.type=v,Up(n,i,v,d,h)):(n=Aa(o.type,null,d,i,i.mode,h),n.ref=i.ref,n.return=i,i.child=n)}if(v=n.child,(n.lanes&h)===0){var w=v.memoizedProps;if(o=o.compare,o=o!==null?o:$s,o(w,d)&&n.ref===i.ref)return Ar(n,i,h)}return i.flags|=1,n=ti(v,d),n.ref=i.ref,n.return=i,i.child=n}function Up(n,i,o,d,h){if(n!==null){var v=n.memoizedProps;if($s(v,d)&&n.ref===i.ref)if(In=!1,i.pendingProps=d=v,(n.lanes&h)!==0)(n.flags&131072)!==0&&(In=!0);else return i.lanes=n.lanes,Ar(n,i,h)}return Rc(n,i,o,d,h)}function Wp(n,i,o){var d=i.pendingProps,h=d.children,v=n!==null?n.memoizedState:null;if(d.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(rs,Vn),Vn|=o;else{if((o&1073741824)===0)return n=v!==null?v.baseLanes|o:o,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:n,cachePool:null,transitions:null},i.updateQueue=null,St(rs,Vn),Vn|=n,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=v!==null?v.baseLanes:o,St(rs,Vn),Vn|=d}else v!==null?(d=v.baseLanes|o,i.memoizedState=null):d=o,St(rs,Vn),Vn|=d;return Cn(n,i,h,o),i.child}function qp(n,i){var o=i.ref;(n===null&&o!==null||n!==null&&n.ref!==o)&&(i.flags|=512,i.flags|=2097152)}function Rc(n,i,o,d,h){var v=Tn(o)?yi:yn.current;return v=Ki(i,v),Ji(i,h),o=bc(n,i,o,d,v,h),d=Sc(),n!==null&&!In?(i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~h,Ar(n,i,h)):(Dt&&d&&lc(i),i.flags|=1,Cn(n,i,o,h),i.child)}function Kp(n,i,o,d,h){if(Tn(o)){var v=!0;ra(i)}else v=!1;if(Ji(i,h),i.stateNode===null)ka(n,i),Lp(i,o,d),Ic(i,o,d,h),d=!0;else if(n===null){var w=i.stateNode,D=i.memoizedProps;w.props=D;var L=w.context,W=o.contextType;typeof W=="object"&&W!==null?W=Qn(W):(W=Tn(o)?yi:yn.current,W=Ki(i,W));var oe=o.getDerivedStateFromProps,ue=typeof oe=="function"||typeof w.getSnapshotBeforeUpdate=="function";ue||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==d||L!==W)&&Mp(i,w,d,W),Zr=!1;var ae=i.memoizedState;w.state=ae,fa(i,d,w,h),L=i.memoizedState,D!==d||ae!==L||En.current||Zr?(typeof oe=="function"&&(Tc(i,o,oe,d),L=i.memoizedState),(D=Zr||Pp(i,o,D,d,ae,L,W))?(ue||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(i.flags|=4194308)):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=L),w.props=d,w.state=L,w.context=W,d=D):(typeof w.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{w=i.stateNode,cp(n,i),D=i.memoizedProps,W=i.type===i.elementType?D:or(i.type,D),w.props=W,ue=i.pendingProps,ae=w.context,L=o.contextType,typeof L=="object"&&L!==null?L=Qn(L):(L=Tn(o)?yi:yn.current,L=Ki(i,L));var Se=o.getDerivedStateFromProps;(oe=typeof Se=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(D!==ue||ae!==L)&&Mp(i,w,d,L),Zr=!1,ae=i.memoizedState,w.state=ae,fa(i,d,w,h);var Ee=i.memoizedState;D!==ue||ae!==Ee||En.current||Zr?(typeof Se=="function"&&(Tc(i,o,Se,d),Ee=i.memoizedState),(W=Zr||Pp(i,o,W,d,ae,Ee,L)||!1)?(oe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(d,Ee,L),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(d,Ee,L)),typeof w.componentDidUpdate=="function"&&(i.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof w.componentDidUpdate!="function"||D===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||D===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=Ee),w.props=d,w.state=Ee,w.context=L,d=W):(typeof w.componentDidUpdate!="function"||D===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||D===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),d=!1)}return Pc(n,i,o,d,v,h)}function Pc(n,i,o,d,h,v){qp(n,i);var w=(i.flags&128)!==0;if(!d&&!w)return h&&Gf(i,o,!1),Ar(n,i,v);d=i.stateNode,Wx.current=i;var D=w&&typeof o.getDerivedStateFromError!="function"?null:d.render();return i.flags|=1,n!==null&&w?(i.child=Xi(i,n.child,null,v),i.child=Xi(i,null,D,v)):Cn(n,i,D,v),i.memoizedState=d.state,h&&Gf(i,o,!0),i.child}function Zp(n){var i=n.stateNode;i.pendingContext?Qf(n,i.pendingContext,i.pendingContext!==i.context):i.context&&Qf(n,i.context,!1),yc(n,i.containerInfo)}function Yp(n,i,o,d,h){return Qi(),uc(h),i.flags|=256,Cn(n,i,o,d),i.child}var Lc={dehydrated:null,treeContext:null,retryLane:0};function Mc(n){return{baseLanes:n,cachePool:null,transitions:null}}function Qp(n,i,o){var d=i.pendingProps,h=Rt.current,v=!1,w=(i.flags&128)!==0,D;if((D=w)||(D=n!==null&&n.memoizedState===null?!1:(h&2)!==0),D?(v=!0,i.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),St(Rt,h&1),n===null)return cc(i),n=i.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((i.mode&1)===0?i.lanes=1:n.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(w=d.children,n=d.fallback,v?(d=i.mode,v=i.child,w={mode:"hidden",children:w},(d&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=w):v=Ra(w,d,0,null),n=ji(n,d,o,null),v.return=i,n.return=i,v.sibling=n,i.child=v,i.child.memoizedState=Mc(o),i.memoizedState=Lc,n):Oc(i,w));if(h=n.memoizedState,h!==null&&(D=h.dehydrated,D!==null))return qx(n,i,w,d,D,h,o);if(v){v=d.fallback,w=i.mode,h=n.child,D=h.sibling;var L={mode:"hidden",children:d.children};return(w&1)===0&&i.child!==h?(d=i.child,d.childLanes=0,d.pendingProps=L,i.deletions=null):(d=ti(h,L),d.subtreeFlags=h.subtreeFlags&14680064),D!==null?v=ti(D,v):(v=ji(v,w,o,null),v.flags|=2),v.return=i,d.return=i,d.sibling=v,i.child=d,d=v,v=i.child,w=n.child.memoizedState,w=w===null?Mc(o):{baseLanes:w.baseLanes|o,cachePool:null,transitions:w.transitions},v.memoizedState=w,v.childLanes=n.childLanes&~o,i.memoizedState=Lc,d}return v=n.child,n=v.sibling,d=ti(v,{mode:"visible",children:d.children}),(i.mode&1)===0&&(d.lanes=o),d.return=i,d.sibling=null,n!==null&&(o=i.deletions,o===null?(i.deletions=[n],i.flags|=16):o.push(n)),i.child=d,i.memoizedState=null,d}function Oc(n,i){return i=Ra({mode:"visible",children:i},n.mode,0,null),i.return=n,n.child=i}function _a(n,i,o,d){return d!==null&&uc(d),Xi(i,n.child,null,o),n=Oc(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function qx(n,i,o,d,h,v,w){if(o)return i.flags&256?(i.flags&=-257,d=Dc(Error(r(422))),_a(n,i,w,d)):i.memoizedState!==null?(i.child=n.child,i.flags|=128,null):(v=d.fallback,h=i.mode,d=Ra({mode:"visible",children:d.children},h,0,null),v=ji(v,h,w,null),v.flags|=2,d.return=i,v.return=i,d.sibling=v,i.child=d,(i.mode&1)!==0&&Xi(i,n.child,null,w),i.child.memoizedState=Mc(w),i.memoizedState=Lc,v);if((i.mode&1)===0)return _a(n,i,w,null);if(h.data==="$!"){if(d=h.nextSibling&&h.nextSibling.dataset,d)var D=d.dgst;return d=D,v=Error(r(419)),d=Dc(v,d,void 0),_a(n,i,w,d)}if(D=(w&n.childLanes)!==0,In||D){if(d=dn,d!==null){switch(w&-w){case 4:h=2;break;case 16:h=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:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(d.suspendedLanes|w))!==0?0:h,h!==0&&h!==v.retryLane&&(v.retryLane=h,Ir(n,h),dr(d,n,h,-1))}return Jc(),d=Dc(Error(r(421))),_a(n,i,w,d)}return h.data==="$?"?(i.flags|=128,i.child=n.child,i=s_.bind(null,n),h._reactRetry=i,null):(n=v.treeContext,Fn=Ur(h.nextSibling),Bn=i,Dt=!0,ar=null,n!==null&&(Zn[Yn++]=Er,Zn[Yn++]=Tr,Zn[Yn++]=vi,Er=n.id,Tr=n.overflow,vi=i),i=Oc(i,d.children),i.flags|=4096,i)}function Xp(n,i,o){n.lanes|=i;var d=n.alternate;d!==null&&(d.lanes|=i),mc(n.return,i,o)}function zc(n,i,o,d,h){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:h}:(v.isBackwards=i,v.rendering=null,v.renderingStartTime=0,v.last=d,v.tail=o,v.tailMode=h)}function Gp(n,i,o){var d=i.pendingProps,h=d.revealOrder,v=d.tail;if(Cn(n,i,d.children,o),d=Rt.current,(d&2)!==0)d=d&1|2,i.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Xp(n,o,i);else if(n.tag===19)Xp(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}d&=1}if(St(Rt,d),(i.mode&1)===0)i.memoizedState=null;else switch(h){case"forwards":for(o=i.child,h=null;o!==null;)n=o.alternate,n!==null&&pa(n)===null&&(h=o),o=o.sibling;o=h,o===null?(h=i.child,i.child=null):(h=o.sibling,o.sibling=null),zc(i,!1,h,o,v);break;case"backwards":for(o=null,h=i.child,i.child=null;h!==null;){if(n=h.alternate,n!==null&&pa(n)===null){i.child=h;break}n=h.sibling,h.sibling=o,o=h,h=n}zc(i,!0,o,null,v);break;case"together":zc(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function ka(n,i){(i.mode&1)===0&&n!==null&&(n.alternate=null,i.alternate=null,i.flags|=2)}function Ar(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),bi|=i.lanes,(o&i.childLanes)===0)return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,o=ti(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=ti(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function Kx(n,i,o){switch(i.tag){case 3:Zp(i),Qi();break;case 5:fp(i);break;case 1:Tn(i.type)&&ra(i);break;case 4:yc(i,i.stateNode.containerInfo);break;case 10:var d=i.type._context,h=i.memoizedProps.value;St(ca,d._currentValue),d._currentValue=h;break;case 13:if(d=i.memoizedState,d!==null)return d.dehydrated!==null?(St(Rt,Rt.current&1),i.flags|=128,null):(o&i.child.childLanes)!==0?Qp(n,i,o):(St(Rt,Rt.current&1),n=Ar(n,i,o),n!==null?n.sibling:null);St(Rt,Rt.current&1);break;case 19:if(d=(o&i.childLanes)!==0,(n.flags&128)!==0){if(d)return Gp(n,i,o);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),St(Rt,Rt.current),d)break;return null;case 22:case 23:return i.lanes=0,Wp(n,i,o)}return Ar(n,i,o)}var Jp,$c,em,tm;Jp=function(n,i){for(var o=i.child;o!==null;){if(o.tag===5||o.tag===6)n.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},$c=function(){},em=function(n,i,o,d){var h=n.memoizedProps;if(h!==d){n=i.stateNode,ki(yr.current);var v=null;switch(o){case"input":h=Nt(n,h),d=Nt(n,d),v=[];break;case"select":h=C({},h,{value:void 0}),d=C({},d,{value:void 0}),v=[];break;case"textarea":h=gn(n,h),d=gn(n,d),v=[];break;default:typeof h.onClick!="function"&&typeof d.onClick=="function"&&(n.onclick=ea)}ht(o,d);var w;o=null;for(W in h)if(!d.hasOwnProperty(W)&&h.hasOwnProperty(W)&&h[W]!=null)if(W==="style"){var D=h[W];for(w in D)D.hasOwnProperty(w)&&(o||(o={}),o[w]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(l.hasOwnProperty(W)?v||(v=[]):(v=v||[]).push(W,null));for(W in d){var L=d[W];if(D=h!=null?h[W]:void 0,d.hasOwnProperty(W)&&L!==D&&(L!=null||D!=null))if(W==="style")if(D){for(w in D)!D.hasOwnProperty(w)||L&&L.hasOwnProperty(w)||(o||(o={}),o[w]="");for(w in L)L.hasOwnProperty(w)&&D[w]!==L[w]&&(o||(o={}),o[w]=L[w])}else o||(v||(v=[]),v.push(W,o)),o=L;else W==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,D=D?D.__html:void 0,L!=null&&D!==L&&(v=v||[]).push(W,L)):W==="children"?typeof L!="string"&&typeof L!="number"||(v=v||[]).push(W,""+L):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(l.hasOwnProperty(W)?(L!=null&&W==="onScroll"&&Tt("scroll",n),v||D===L||(v=[])):(v=v||[]).push(W,L))}o&&(v=v||[]).push("style",o);var W=v;(i.updateQueue=W)&&(i.flags|=4)}},tm=function(n,i,o,d){o!==d&&(i.flags|=4)};function el(n,i){if(!Dt)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}function xn(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,d=0;if(i)for(var h=n.child;h!==null;)o|=h.lanes|h.childLanes,d|=h.subtreeFlags&14680064,d|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)o|=h.lanes|h.childLanes,d|=h.subtreeFlags,d|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=d,n.childLanes=o,i}function Zx(n,i,o){var d=i.pendingProps;switch(ac(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xn(i),null;case 1:return Tn(i.type)&&na(),xn(i),null;case 3:return d=i.stateNode,es(),It(En),It(yn),_c(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(n===null||n.child===null)&&(aa(i)?i.flags|=4:n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ar!==null&&(Qc(ar),ar=null))),$c(n,i),xn(i),null;case 5:vc(i);var h=ki(Ys.current);if(o=i.type,n!==null&&i.stateNode!=null)em(n,i,o,d,h),n.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!d){if(i.stateNode===null)throw Error(r(166));return xn(i),null}if(n=ki(yr.current),aa(i)){d=i.stateNode,o=i.type;var v=i.memoizedProps;switch(d[gr]=i,d[Us]=v,n=(i.mode&1)!==0,o){case"dialog":Tt("cancel",d),Tt("close",d);break;case"iframe":case"object":case"embed":Tt("load",d);break;case"video":case"audio":for(h=0;h<Fs.length;h++)Tt(Fs[h],d);break;case"source":Tt("error",d);break;case"img":case"image":case"link":Tt("error",d),Tt("load",d);break;case"details":Tt("toggle",d);break;case"input":mt(d,v),Tt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!v.multiple},Tt("invalid",d);break;case"textarea":Vt(d,v),Tt("invalid",d)}ht(o,v),h=null;for(var w in v)if(v.hasOwnProperty(w)){var D=v[w];w==="children"?typeof D=="string"?d.textContent!==D&&(v.suppressHydrationWarning!==!0&&Jl(d.textContent,D,n),h=["children",D]):typeof D=="number"&&d.textContent!==""+D&&(v.suppressHydrationWarning!==!0&&Jl(d.textContent,D,n),h=["children",""+D]):l.hasOwnProperty(w)&&D!=null&&w==="onScroll"&&Tt("scroll",d)}switch(o){case"input":ut(d),sn(d,v,!0);break;case"textarea":ut(d),be(d);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(d.onclick=ea)}d=h,i.updateQueue=d,d!==null&&(i.flags|=4)}else{w=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=$(o)),n==="http://www.w3.org/1999/xhtml"?o==="script"?(n=w.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof d.is=="string"?n=w.createElement(o,{is:d.is}):(n=w.createElement(o),o==="select"&&(w=n,d.multiple?w.multiple=!0:d.size&&(w.size=d.size))):n=w.createElementNS(n,o),n[gr]=i,n[Us]=d,Jp(n,i,!1,!1),i.stateNode=n;e:{switch(w=Ut(o,d),o){case"dialog":Tt("cancel",n),Tt("close",n),h=d;break;case"iframe":case"object":case"embed":Tt("load",n),h=d;break;case"video":case"audio":for(h=0;h<Fs.length;h++)Tt(Fs[h],n);h=d;break;case"source":Tt("error",n),h=d;break;case"img":case"image":case"link":Tt("error",n),Tt("load",n),h=d;break;case"details":Tt("toggle",n),h=d;break;case"input":mt(n,d),h=Nt(n,d),Tt("invalid",n);break;case"option":h=d;break;case"select":n._wrapperState={wasMultiple:!!d.multiple},h=C({},d,{value:void 0}),Tt("invalid",n);break;case"textarea":Vt(n,d),h=gn(n,d),Tt("invalid",n);break;default:h=d}ht(o,h),D=h;for(v in D)if(D.hasOwnProperty(v)){var L=D[v];v==="style"?At(n,L):v==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&ve(n,L)):v==="children"?typeof L=="string"?(o!=="textarea"||L!=="")&&K(n,L):typeof L=="number"&&K(n,""+L):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(l.hasOwnProperty(v)?L!=null&&v==="onScroll"&&Tt("scroll",n):L!=null&&T(n,v,L,w))}switch(o){case"input":ut(n),sn(n,d,!1);break;case"textarea":ut(n),be(n);break;case"option":d.value!=null&&n.setAttribute("value",""+Le(d.value));break;case"select":n.multiple=!!d.multiple,v=d.value,v!=null?Et(n,!!d.multiple,v,!1):d.defaultValue!=null&&Et(n,!!d.multiple,d.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=ea)}switch(o){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return xn(i),null;case 6:if(n&&i.stateNode!=null)tm(n,i,n.memoizedProps,d);else{if(typeof d!="string"&&i.stateNode===null)throw Error(r(166));if(o=ki(Ys.current),ki(yr.current),aa(i)){if(d=i.stateNode,o=i.memoizedProps,d[gr]=i,(v=d.nodeValue!==o)&&(n=Bn,n!==null))switch(n.tag){case 3:Jl(d.nodeValue,o,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Jl(d.nodeValue,o,(n.mode&1)!==0)}v&&(i.flags|=4)}else d=(o.nodeType===9?o:o.ownerDocument).createTextNode(d),d[gr]=i,i.stateNode=d}return xn(i),null;case 13:if(It(Rt),d=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Dt&&Fn!==null&&(i.mode&1)!==0&&(i.flags&128)===0)ip(),Qi(),i.flags|=98560,v=!1;else if(v=aa(i),d!==null&&d.dehydrated!==null){if(n===null){if(!v)throw Error(r(318));if(v=i.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[gr]=i}else Qi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;xn(i),v=!1}else ar!==null&&(Qc(ar),ar=null),v=!0;if(!v)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=o,i):(d=d!==null,d!==(n!==null&&n.memoizedState!==null)&&d&&(i.child.flags|=8192,(i.mode&1)!==0&&(n===null||(Rt.current&1)!==0?tn===0&&(tn=3):Jc())),i.updateQueue!==null&&(i.flags|=4),xn(i),null);case 4:return es(),$c(n,i),n===null&&Vs(i.stateNode.containerInfo),xn(i),null;case 10:return pc(i.type._context),xn(i),null;case 17:return Tn(i.type)&&na(),xn(i),null;case 19:if(It(Rt),v=i.memoizedState,v===null)return xn(i),null;if(d=(i.flags&128)!==0,w=v.rendering,w===null)if(d)el(v,!1);else{if(tn!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(w=pa(n),w!==null){for(i.flags|=128,el(v,!1),d=w.updateQueue,d!==null&&(i.updateQueue=d,i.flags|=4),i.subtreeFlags=0,d=o,o=i.child;o!==null;)v=o,n=d,v.flags&=14680066,w=v.alternate,w===null?(v.childLanes=0,v.lanes=n,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=w.childLanes,v.lanes=w.lanes,v.child=w.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=w.memoizedProps,v.memoizedState=w.memoizedState,v.updateQueue=w.updateQueue,v.type=w.type,n=w.dependencies,v.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),o=o.sibling;return St(Rt,Rt.current&1|2),i.child}n=n.sibling}v.tail!==null&&Wt()>is&&(i.flags|=128,d=!0,el(v,!1),i.lanes=4194304)}else{if(!d)if(n=pa(w),n!==null){if(i.flags|=128,d=!0,o=n.updateQueue,o!==null&&(i.updateQueue=o,i.flags|=4),el(v,!0),v.tail===null&&v.tailMode==="hidden"&&!w.alternate&&!Dt)return xn(i),null}else 2*Wt()-v.renderingStartTime>is&&o!==1073741824&&(i.flags|=128,d=!0,el(v,!1),i.lanes=4194304);v.isBackwards?(w.sibling=i.child,i.child=w):(o=v.last,o!==null?o.sibling=w:i.child=w,v.last=w)}return v.tail!==null?(i=v.tail,v.rendering=i,v.tail=i.sibling,v.renderingStartTime=Wt(),i.sibling=null,o=Rt.current,St(Rt,d?o&1|2:o&1),i):(xn(i),null);case 22:case 23:return Gc(),d=i.memoizedState!==null,n!==null&&n.memoizedState!==null!==d&&(i.flags|=8192),d&&(i.mode&1)!==0?(Vn&1073741824)!==0&&(xn(i),i.subtreeFlags&6&&(i.flags|=8192)):xn(i),null;case 24:return null;case 25:return null}throw Error(r(156,i.tag))}function Yx(n,i){switch(ac(i),i.tag){case 1:return Tn(i.type)&&na(),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return es(),It(En),It(yn),_c(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 5:return vc(i),null;case 13:if(It(Rt),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));Qi()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return It(Rt),null;case 4:return es(),null;case 10:return pc(i.type._context),null;case 22:case 23:return Gc(),null;case 24:return null;default:return null}}var wa=!1,_n=!1,Qx=typeof WeakSet=="function"?WeakSet:Set,je=null;function ns(n,i){var o=n.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(d){Ot(n,i,d)}else o.current=null}function Bc(n,i,o){try{o()}catch(d){Ot(n,i,d)}}var nm=!1;function Xx(n,i){if(Go=Vl,n=Pf(),Uo(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var h=d.anchorOffset,v=d.focusNode;d=d.focusOffset;try{o.nodeType,v.nodeType}catch{o=null;break e}var w=0,D=-1,L=-1,W=0,oe=0,ue=n,ae=null;t:for(;;){for(var Se;ue!==o||h!==0&&ue.nodeType!==3||(D=w+h),ue!==v||d!==0&&ue.nodeType!==3||(L=w+d),ue.nodeType===3&&(w+=ue.nodeValue.length),(Se=ue.firstChild)!==null;)ae=ue,ue=Se;for(;;){if(ue===n)break t;if(ae===o&&++W===h&&(D=w),ae===v&&++oe===d&&(L=w),(Se=ue.nextSibling)!==null)break;ue=ae,ae=ue.parentNode}ue=Se}o=D===-1||L===-1?null:{start:D,end:L}}else o=null}o=o||{start:0,end:0}}else o=null;for(Jo={focusedElem:n,selectionRange:o},Vl=!1,je=i;je!==null;)if(i=je,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,je=n;else for(;je!==null;){i=je;try{var Ee=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Ee!==null){var Te=Ee.memoizedProps,qt=Ee.memoizedState,B=i.stateNode,z=B.getSnapshotBeforeUpdate(i.elementType===i.type?Te:or(i.type,Te),qt);B.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var F=i.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(he){Ot(i,i.return,he)}if(n=i.sibling,n!==null){n.return=i.return,je=n;break}je=i.return}return Ee=nm,nm=!1,Ee}function tl(n,i,o){var d=i.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var h=d=d.next;do{if((h.tag&n)===n){var v=h.destroy;h.destroy=void 0,v!==void 0&&Bc(i,o,v)}h=h.next}while(h!==d)}}function ba(n,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var o=i=i.next;do{if((o.tag&n)===n){var d=o.create;o.destroy=d()}o=o.next}while(o!==i)}}function Fc(n){var i=n.ref;if(i!==null){var o=n.stateNode;switch(n.tag){case 5:n=o;break;default:n=o}typeof i=="function"?i(n):i.current=n}}function rm(n){var i=n.alternate;i!==null&&(n.alternate=null,rm(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&(delete i[gr],delete i[Us],delete i[rc],delete i[Rx],delete i[Px])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function im(n){return n.tag===5||n.tag===3||n.tag===4}function sm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||im(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Vc(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?o.nodeType===8?o.parentNode.insertBefore(n,i):o.insertBefore(n,i):(o.nodeType===8?(i=o.parentNode,i.insertBefore(n,o)):(i=o,i.appendChild(n)),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=ea));else if(d!==4&&(n=n.child,n!==null))for(Vc(n,i,o),n=n.sibling;n!==null;)Vc(n,i,o),n=n.sibling}function Hc(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(d!==4&&(n=n.child,n!==null))for(Hc(n,i,o),n=n.sibling;n!==null;)Hc(n,i,o),n=n.sibling}var mn=null,cr=!1;function Qr(n,i,o){for(o=o.child;o!==null;)lm(n,i,o),o=o.sibling}function lm(n,i,o){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(Ml,o)}catch{}switch(o.tag){case 5:_n||ns(o,i);case 6:var d=mn,h=cr;mn=null,Qr(n,i,o),mn=d,cr=h,mn!==null&&(cr?(n=mn,o=o.stateNode,n.nodeType===8?n.parentNode.removeChild(o):n.removeChild(o)):mn.removeChild(o.stateNode));break;case 18:mn!==null&&(cr?(n=mn,o=o.stateNode,n.nodeType===8?nc(n.parentNode,o):n.nodeType===1&&nc(n,o),Rs(n)):nc(mn,o.stateNode));break;case 4:d=mn,h=cr,mn=o.stateNode.containerInfo,cr=!0,Qr(n,i,o),mn=d,cr=h;break;case 0:case 11:case 14:case 15:if(!_n&&(d=o.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){h=d=d.next;do{var v=h,w=v.destroy;v=v.tag,w!==void 0&&((v&2)!==0||(v&4)!==0)&&Bc(o,i,w),h=h.next}while(h!==d)}Qr(n,i,o);break;case 1:if(!_n&&(ns(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=o.memoizedProps,d.state=o.memoizedState,d.componentWillUnmount()}catch(D){Ot(o,i,D)}Qr(n,i,o);break;case 21:Qr(n,i,o);break;case 22:o.mode&1?(_n=(d=_n)||o.memoizedState!==null,Qr(n,i,o),_n=d):Qr(n,i,o);break;default:Qr(n,i,o)}}function am(n){var i=n.updateQueue;if(i!==null){n.updateQueue=null;var o=n.stateNode;o===null&&(o=n.stateNode=new Qx),i.forEach(function(d){var h=l_.bind(null,n,d);o.has(d)||(o.add(d),d.then(h,h))})}}function ur(n,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var h=o[d];try{var v=n,w=i,D=w;e:for(;D!==null;){switch(D.tag){case 5:mn=D.stateNode,cr=!1;break e;case 3:mn=D.stateNode.containerInfo,cr=!0;break e;case 4:mn=D.stateNode.containerInfo,cr=!0;break e}D=D.return}if(mn===null)throw Error(r(160));lm(v,w,h),mn=null,cr=!1;var L=h.alternate;L!==null&&(L.return=null),h.return=null}catch(W){Ot(h,i,W)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)om(i,n),i=i.sibling}function om(n,i){var o=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(ur(i,n),xr(n),d&4){try{tl(3,n,n.return),ba(3,n)}catch(Te){Ot(n,n.return,Te)}try{tl(5,n,n.return)}catch(Te){Ot(n,n.return,Te)}}break;case 1:ur(i,n),xr(n),d&512&&o!==null&&ns(o,o.return);break;case 5:if(ur(i,n),xr(n),d&512&&o!==null&&ns(o,o.return),n.flags&32){var h=n.stateNode;try{K(h,"")}catch(Te){Ot(n,n.return,Te)}}if(d&4&&(h=n.stateNode,h!=null)){var v=n.memoizedProps,w=o!==null?o.memoizedProps:v,D=n.type,L=n.updateQueue;if(n.updateQueue=null,L!==null)try{D==="input"&&v.type==="radio"&&v.name!=null&&Ft(h,v),Ut(D,w);var W=Ut(D,v);for(w=0;w<L.length;w+=2){var oe=L[w],ue=L[w+1];oe==="style"?At(h,ue):oe==="dangerouslySetInnerHTML"?ve(h,ue):oe==="children"?K(h,ue):T(h,oe,ue,W)}switch(D){case"input":Kt(h,v);break;case"textarea":ge(h,v);break;case"select":var ae=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!v.multiple;var Se=v.value;Se!=null?Et(h,!!v.multiple,Se,!1):ae!==!!v.multiple&&(v.defaultValue!=null?Et(h,!!v.multiple,v.defaultValue,!0):Et(h,!!v.multiple,v.multiple?[]:"",!1))}h[Us]=v}catch(Te){Ot(n,n.return,Te)}}break;case 6:if(ur(i,n),xr(n),d&4){if(n.stateNode===null)throw Error(r(162));h=n.stateNode,v=n.memoizedProps;try{h.nodeValue=v}catch(Te){Ot(n,n.return,Te)}}break;case 3:if(ur(i,n),xr(n),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Rs(i.containerInfo)}catch(Te){Ot(n,n.return,Te)}break;case 4:ur(i,n),xr(n);break;case 13:ur(i,n),xr(n),h=n.child,h.flags&8192&&(v=h.memoizedState!==null,h.stateNode.isHidden=v,!v||h.alternate!==null&&h.alternate.memoizedState!==null||(qc=Wt())),d&4&&am(n);break;case 22:if(oe=o!==null&&o.memoizedState!==null,n.mode&1?(_n=(W=_n)||oe,ur(i,n),_n=W):ur(i,n),xr(n),d&8192){if(W=n.memoizedState!==null,(n.stateNode.isHidden=W)&&!oe&&(n.mode&1)!==0)for(je=n,oe=n.child;oe!==null;){for(ue=je=oe;je!==null;){switch(ae=je,Se=ae.child,ae.tag){case 0:case 11:case 14:case 15:tl(4,ae,ae.return);break;case 1:ns(ae,ae.return);var Ee=ae.stateNode;if(typeof Ee.componentWillUnmount=="function"){d=ae,o=ae.return;try{i=d,Ee.props=i.memoizedProps,Ee.state=i.memoizedState,Ee.componentWillUnmount()}catch(Te){Ot(d,o,Te)}}break;case 5:ns(ae,ae.return);break;case 22:if(ae.memoizedState!==null){dm(ue);continue}}Se!==null?(Se.return=ae,je=Se):dm(ue)}oe=oe.sibling}e:for(oe=null,ue=n;;){if(ue.tag===5){if(oe===null){oe=ue;try{h=ue.stateNode,W?(v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(D=ue.stateNode,L=ue.memoizedProps.style,w=L!=null&&L.hasOwnProperty("display")?L.display:null,D.style.display=Me("display",w))}catch(Te){Ot(n,n.return,Te)}}}else if(ue.tag===6){if(oe===null)try{ue.stateNode.nodeValue=W?"":ue.memoizedProps}catch(Te){Ot(n,n.return,Te)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===n)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===n)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===n)break e;oe===ue&&(oe=null),ue=ue.return}oe===ue&&(oe=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:ur(i,n),xr(n),d&4&&am(n);break;case 21:break;default:ur(i,n),xr(n)}}function xr(n){var i=n.flags;if(i&2){try{e:{for(var o=n.return;o!==null;){if(im(o)){var d=o;break e}o=o.return}throw Error(r(160))}switch(d.tag){case 5:var h=d.stateNode;d.flags&32&&(K(h,""),d.flags&=-33);var v=sm(n);Hc(n,v,h);break;case 3:case 4:var w=d.stateNode.containerInfo,D=sm(n);Vc(n,D,w);break;default:throw Error(r(161))}}catch(L){Ot(n,n.return,L)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function Gx(n,i,o){je=n,cm(n)}function cm(n,i,o){for(var d=(n.mode&1)!==0;je!==null;){var h=je,v=h.child;if(h.tag===22&&d){var w=h.memoizedState!==null||wa;if(!w){var D=h.alternate,L=D!==null&&D.memoizedState!==null||_n;D=wa;var W=_n;if(wa=w,(_n=L)&&!W)for(je=h;je!==null;)w=je,L=w.child,w.tag===22&&w.memoizedState!==null?fm(h):L!==null?(L.return=w,je=L):fm(h);for(;v!==null;)je=v,cm(v),v=v.sibling;je=h,wa=D,_n=W}um(n)}else(h.subtreeFlags&8772)!==0&&v!==null?(v.return=h,je=v):um(n)}}function um(n){for(;je!==null;){var i=je;if((i.flags&8772)!==0){var o=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:_n||ba(5,i);break;case 1:var d=i.stateNode;if(i.flags&4&&!_n)if(o===null)d.componentDidMount();else{var h=i.elementType===i.type?o.memoizedProps:or(i.type,o.memoizedProps);d.componentDidUpdate(h,o.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var v=i.updateQueue;v!==null&&dp(i,v,d);break;case 3:var w=i.updateQueue;if(w!==null){if(o=null,i.child!==null)switch(i.child.tag){case 5:o=i.child.stateNode;break;case 1:o=i.child.stateNode}dp(i,w,o)}break;case 5:var D=i.stateNode;if(o===null&&i.flags&4){o=D;var L=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&o.focus();break;case"img":L.src&&(o.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var W=i.alternate;if(W!==null){var oe=W.memoizedState;if(oe!==null){var ue=oe.dehydrated;ue!==null&&Rs(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}_n||i.flags&512&&Fc(i)}catch(ae){Ot(i,i.return,ae)}}if(i===n){je=null;break}if(o=i.sibling,o!==null){o.return=i.return,je=o;break}je=i.return}}function dm(n){for(;je!==null;){var i=je;if(i===n){je=null;break}var o=i.sibling;if(o!==null){o.return=i.return,je=o;break}je=i.return}}function fm(n){for(;je!==null;){var i=je;try{switch(i.tag){case 0:case 11:case 15:var o=i.return;try{ba(4,i)}catch(L){Ot(i,o,L)}break;case 1:var d=i.stateNode;if(typeof d.componentDidMount=="function"){var h=i.return;try{d.componentDidMount()}catch(L){Ot(i,h,L)}}var v=i.return;try{Fc(i)}catch(L){Ot(i,v,L)}break;case 5:var w=i.return;try{Fc(i)}catch(L){Ot(i,w,L)}}}catch(L){Ot(i,i.return,L)}if(i===n){je=null;break}var D=i.sibling;if(D!==null){D.return=i.return,je=D;break}je=i.return}}var Jx=Math.ceil,Sa=M.ReactCurrentDispatcher,Uc=M.ReactCurrentOwner,Gn=M.ReactCurrentBatchConfig,it=0,dn=null,Qt=null,hn=0,Vn=0,rs=Wr(0),tn=0,nl=null,bi=0,Ca=0,Wc=0,rl=null,Dn=null,qc=0,is=1/0,Rr=null,Na=!1,Kc=null,Xr=null,ja=!1,Gr=null,Ea=0,il=0,Zc=null,Ta=-1,Ia=0;function Nn(){return(it&6)!==0?Wt():Ta!==-1?Ta:Ta=Wt()}function Jr(n){return(n.mode&1)===0?1:(it&2)!==0&&hn!==0?hn&-hn:Mx.transition!==null?(Ia===0&&(Ia=sf()),Ia):(n=gt,n!==0||(n=window.event,n=n===void 0?16:mf(n.type)),n)}function dr(n,i,o,d){if(50<il)throw il=0,Zc=null,Error(r(185));Es(n,o,d),((it&2)===0||n!==dn)&&(n===dn&&((it&2)===0&&(Ca|=o),tn===4&&ei(n,hn)),An(n,d),o===1&&it===0&&(i.mode&1)===0&&(is=Wt()+500,ia&&Kr()))}function An(n,i){var o=n.callbackNode;Mv(n,i);var d=$l(n,n===dn?hn:0);if(d===0)o!==null&&tf(o),n.callbackNode=null,n.callbackPriority=0;else if(i=d&-d,n.callbackPriority!==i){if(o!=null&&tf(o),i===1)n.tag===0?Lx(mm.bind(null,n)):Jf(mm.bind(null,n)),Dx(function(){(it&6)===0&&Kr()}),o=null;else{switch(lf(d)){case 1:o=jo;break;case 4:o=nf;break;case 16:o=Ll;break;case 536870912:o=rf;break;default:o=Ll}o=wm(o,pm.bind(null,n))}n.callbackPriority=i,n.callbackNode=o}}function pm(n,i){if(Ta=-1,Ia=0,(it&6)!==0)throw Error(r(327));var o=n.callbackNode;if(ss()&&n.callbackNode!==o)return null;var d=$l(n,n===dn?hn:0);if(d===0)return null;if((d&30)!==0||(d&n.expiredLanes)!==0||i)i=Da(n,d);else{i=d;var h=it;it|=2;var v=gm();(dn!==n||hn!==i)&&(Rr=null,is=Wt()+500,Ci(n,i));do try{n_();break}catch(D){hm(n,D)}while(!0);fc(),Sa.current=v,it=h,Qt!==null?i=0:(dn=null,hn=0,i=tn)}if(i!==0){if(i===2&&(h=Eo(n),h!==0&&(d=h,i=Yc(n,h))),i===1)throw o=nl,Ci(n,0),ei(n,d),An(n,Wt()),o;if(i===6)ei(n,d);else{if(h=n.current.alternate,(d&30)===0&&!e_(h)&&(i=Da(n,d),i===2&&(v=Eo(n),v!==0&&(d=v,i=Yc(n,v))),i===1))throw o=nl,Ci(n,0),ei(n,d),An(n,Wt()),o;switch(n.finishedWork=h,n.finishedLanes=d,i){case 0:case 1:throw Error(r(345));case 2:Ni(n,Dn,Rr);break;case 3:if(ei(n,d),(d&130023424)===d&&(i=qc+500-Wt(),10<i)){if($l(n,0)!==0)break;if(h=n.suspendedLanes,(h&d)!==d){Nn(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=tc(Ni.bind(null,n,Dn,Rr),i);break}Ni(n,Dn,Rr);break;case 4:if(ei(n,d),(d&4194240)===d)break;for(i=n.eventTimes,h=-1;0<d;){var w=31-sr(d);v=1<<w,w=i[w],w>h&&(h=w),d&=~v}if(d=h,d=Wt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Jx(d/1960))-d,10<d){n.timeoutHandle=tc(Ni.bind(null,n,Dn,Rr),d);break}Ni(n,Dn,Rr);break;case 5:Ni(n,Dn,Rr);break;default:throw Error(r(329))}}}return An(n,Wt()),n.callbackNode===o?pm.bind(null,n):null}function Yc(n,i){var o=rl;return n.current.memoizedState.isDehydrated&&(Ci(n,i).flags|=256),n=Da(n,i),n!==2&&(i=Dn,Dn=o,i!==null&&Qc(i)),n}function Qc(n){Dn===null?Dn=n:Dn.push.apply(Dn,n)}function e_(n){for(var i=n;;){if(i.flags&16384){var o=i.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var d=0;d<o.length;d++){var h=o[d],v=h.getSnapshot;h=h.value;try{if(!lr(v(),h))return!1}catch{return!1}}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ei(n,i){for(i&=~Wc,i&=~Ca,n.suspendedLanes|=i,n.pingedLanes&=~i,n=n.expirationTimes;0<i;){var o=31-sr(i),d=1<<o;n[o]=-1,i&=~d}}function mm(n){if((it&6)!==0)throw Error(r(327));ss();var i=$l(n,0);if((i&1)===0)return An(n,Wt()),null;var o=Da(n,i);if(n.tag!==0&&o===2){var d=Eo(n);d!==0&&(i=d,o=Yc(n,d))}if(o===1)throw o=nl,Ci(n,0),ei(n,i),An(n,Wt()),o;if(o===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=i,Ni(n,Dn,Rr),An(n,Wt()),null}function Xc(n,i){var o=it;it|=1;try{return n(i)}finally{it=o,it===0&&(is=Wt()+500,ia&&Kr())}}function Si(n){Gr!==null&&Gr.tag===0&&(it&6)===0&&ss();var i=it;it|=1;var o=Gn.transition,d=gt;try{if(Gn.transition=null,gt=1,n)return n()}finally{gt=d,Gn.transition=o,it=i,(it&6)===0&&Kr()}}function Gc(){Vn=rs.current,It(rs)}function Ci(n,i){n.finishedWork=null,n.finishedLanes=0;var o=n.timeoutHandle;if(o!==-1&&(n.timeoutHandle=-1,Ix(o)),Qt!==null)for(o=Qt.return;o!==null;){var d=o;switch(ac(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&na();break;case 3:es(),It(En),It(yn),_c();break;case 5:vc(d);break;case 4:es();break;case 13:It(Rt);break;case 19:It(Rt);break;case 10:pc(d.type._context);break;case 22:case 23:Gc()}o=o.return}if(dn=n,Qt=n=ti(n.current,null),hn=Vn=i,tn=0,nl=null,Wc=Ca=bi=0,Dn=rl=null,_i!==null){for(i=0;i<_i.length;i++)if(o=_i[i],d=o.interleaved,d!==null){o.interleaved=null;var h=d.next,v=o.pending;if(v!==null){var w=v.next;v.next=h,d.next=w}o.pending=d}_i=null}return n}function hm(n,i){do{var o=Qt;try{if(fc(),ma.current=va,ha){for(var d=Pt.memoizedState;d!==null;){var h=d.queue;h!==null&&(h.pending=null),d=d.next}ha=!1}if(wi=0,un=en=Pt=null,Qs=!1,Xs=0,Uc.current=null,o===null||o.return===null){tn=1,nl=i,Qt=null;break}e:{var v=n,w=o.return,D=o,L=i;if(i=hn,D.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var W=L,oe=D,ue=oe.tag;if((oe.mode&1)===0&&(ue===0||ue===11||ue===15)){var ae=oe.alternate;ae?(oe.updateQueue=ae.updateQueue,oe.memoizedState=ae.memoizedState,oe.lanes=ae.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var Se=Bp(w);if(Se!==null){Se.flags&=-257,Fp(Se,w,D,v,i),Se.mode&1&&$p(v,W,i),i=Se,L=W;var Ee=i.updateQueue;if(Ee===null){var Te=new Set;Te.add(L),i.updateQueue=Te}else Ee.add(L);break e}else{if((i&1)===0){$p(v,W,i),Jc();break e}L=Error(r(426))}}else if(Dt&&D.mode&1){var qt=Bp(w);if(qt!==null){(qt.flags&65536)===0&&(qt.flags|=256),Fp(qt,w,D,v,i),uc(ts(L,D));break e}}v=L=ts(L,D),tn!==4&&(tn=2),rl===null?rl=[v]:rl.push(v),v=w;do{switch(v.tag){case 3:v.flags|=65536,i&=-i,v.lanes|=i;var B=Op(v,L,i);up(v,B);break e;case 1:D=L;var z=v.type,F=v.stateNode;if((v.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(Xr===null||!Xr.has(F)))){v.flags|=65536,i&=-i,v.lanes|=i;var he=zp(v,D,i);up(v,he);break e}}v=v.return}while(v!==null)}vm(o)}catch(De){i=De,Qt===o&&o!==null&&(Qt=o=o.return);continue}break}while(!0)}function gm(){var n=Sa.current;return Sa.current=va,n===null?va:n}function Jc(){(tn===0||tn===3||tn===2)&&(tn=4),dn===null||(bi&268435455)===0&&(Ca&268435455)===0||ei(dn,hn)}function Da(n,i){var o=it;it|=2;var d=gm();(dn!==n||hn!==i)&&(Rr=null,Ci(n,i));do try{t_();break}catch(h){hm(n,h)}while(!0);if(fc(),it=o,Sa.current=d,Qt!==null)throw Error(r(261));return dn=null,hn=0,tn}function t_(){for(;Qt!==null;)ym(Qt)}function n_(){for(;Qt!==null&&!jv();)ym(Qt)}function ym(n){var i=km(n.alternate,n,Vn);n.memoizedProps=n.pendingProps,i===null?vm(n):Qt=i,Uc.current=null}function vm(n){var i=n;do{var o=i.alternate;if(n=i.return,(i.flags&32768)===0){if(o=Zx(o,i,Vn),o!==null){Qt=o;return}}else{if(o=Yx(o,i),o!==null){o.flags&=32767,Qt=o;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{tn=6,Qt=null;return}}if(i=i.sibling,i!==null){Qt=i;return}Qt=i=n}while(i!==null);tn===0&&(tn=5)}function Ni(n,i,o){var d=gt,h=Gn.transition;try{Gn.transition=null,gt=1,r_(n,i,o,d)}finally{Gn.transition=h,gt=d}return null}function r_(n,i,o,d){do ss();while(Gr!==null);if((it&6)!==0)throw Error(r(327));o=n.finishedWork;var h=n.finishedLanes;if(o===null)return null;if(n.finishedWork=null,n.finishedLanes=0,o===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var v=o.lanes|o.childLanes;if(Ov(n,v),n===dn&&(Qt=dn=null,hn=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||ja||(ja=!0,wm(Ll,function(){return ss(),null})),v=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||v){v=Gn.transition,Gn.transition=null;var w=gt;gt=1;var D=it;it|=4,Uc.current=null,Xx(n,o),om(o,n),bx(Jo),Vl=!!Go,Jo=Go=null,n.current=o,Gx(o),Ev(),it=D,gt=w,Gn.transition=v}else n.current=o;if(ja&&(ja=!1,Gr=n,Ea=h),v=n.pendingLanes,v===0&&(Xr=null),Dv(o.stateNode),An(n,Wt()),i!==null)for(d=n.onRecoverableError,o=0;o<i.length;o++)h=i[o],d(h.value,{componentStack:h.stack,digest:h.digest});if(Na)throw Na=!1,n=Kc,Kc=null,n;return(Ea&1)!==0&&n.tag!==0&&ss(),v=n.pendingLanes,(v&1)!==0?n===Zc?il++:(il=0,Zc=n):il=0,Kr(),null}function ss(){if(Gr!==null){var n=lf(Ea),i=Gn.transition,o=gt;try{if(Gn.transition=null,gt=16>n?16:n,Gr===null)var d=!1;else{if(n=Gr,Gr=null,Ea=0,(it&6)!==0)throw Error(r(331));var h=it;for(it|=4,je=n.current;je!==null;){var v=je,w=v.child;if((je.flags&16)!==0){var D=v.deletions;if(D!==null){for(var L=0;L<D.length;L++){var W=D[L];for(je=W;je!==null;){var oe=je;switch(oe.tag){case 0:case 11:case 15:tl(8,oe,v)}var ue=oe.child;if(ue!==null)ue.return=oe,je=ue;else for(;je!==null;){oe=je;var ae=oe.sibling,Se=oe.return;if(rm(oe),oe===W){je=null;break}if(ae!==null){ae.return=Se,je=ae;break}je=Se}}}var Ee=v.alternate;if(Ee!==null){var Te=Ee.child;if(Te!==null){Ee.child=null;do{var qt=Te.sibling;Te.sibling=null,Te=qt}while(Te!==null)}}je=v}}if((v.subtreeFlags&2064)!==0&&w!==null)w.return=v,je=w;else e:for(;je!==null;){if(v=je,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:tl(9,v,v.return)}var B=v.sibling;if(B!==null){B.return=v.return,je=B;break e}je=v.return}}var z=n.current;for(je=z;je!==null;){w=je;var F=w.child;if((w.subtreeFlags&2064)!==0&&F!==null)F.return=w,je=F;else e:for(w=z;je!==null;){if(D=je,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:ba(9,D)}}catch(De){Ot(D,D.return,De)}if(D===w){je=null;break e}var he=D.sibling;if(he!==null){he.return=D.return,je=he;break e}je=D.return}}if(it=h,Kr(),hr&&typeof hr.onPostCommitFiberRoot=="function")try{hr.onPostCommitFiberRoot(Ml,n)}catch{}d=!0}return d}finally{gt=o,Gn.transition=i}}return!1}function xm(n,i,o){i=ts(o,i),i=Op(n,i,1),n=Yr(n,i,1),i=Nn(),n!==null&&(Es(n,1,i),An(n,i))}function Ot(n,i,o){if(n.tag===3)xm(n,n,o);else for(;i!==null;){if(i.tag===3){xm(i,n,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Xr===null||!Xr.has(d))){n=ts(o,n),n=zp(i,n,1),i=Yr(i,n,1),n=Nn(),i!==null&&(Es(i,1,n),An(i,n));break}}i=i.return}}function i_(n,i,o){var d=n.pingCache;d!==null&&d.delete(i),i=Nn(),n.pingedLanes|=n.suspendedLanes&o,dn===n&&(hn&o)===o&&(tn===4||tn===3&&(hn&130023424)===hn&&500>Wt()-qc?Ci(n,0):Wc|=o),An(n,i)}function _m(n,i){i===0&&((n.mode&1)===0?i=1:(i=zl,zl<<=1,(zl&130023424)===0&&(zl=4194304)));var o=Nn();n=Ir(n,i),n!==null&&(Es(n,i,o),An(n,o))}function s_(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),_m(n,o)}function l_(n,i){var o=0;switch(n.tag){case 13:var d=n.stateNode,h=n.memoizedState;h!==null&&(o=h.retryLane);break;case 19:d=n.stateNode;break;default:throw Error(r(314))}d!==null&&d.delete(i),_m(n,o)}var km;km=function(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps||En.current)In=!0;else{if((n.lanes&o)===0&&(i.flags&128)===0)return In=!1,Kx(n,i,o);In=(n.flags&131072)!==0}else In=!1,Dt&&(i.flags&1048576)!==0&&ep(i,la,i.index);switch(i.lanes=0,i.tag){case 2:var d=i.type;ka(n,i),n=i.pendingProps;var h=Ki(i,yn.current);Ji(i,o),h=bc(null,i,d,n,h,o);var v=Sc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Tn(d)?(v=!0,ra(i)):v=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,gc(i),h.updater=xa,i.stateNode=h,h._reactInternals=i,Ic(i,d,n,o),i=Pc(null,i,d,!0,v,o)):(i.tag=0,Dt&&v&&lc(i),Cn(null,i,h,o),i=i.child),i;case 16:d=i.elementType;e:{switch(ka(n,i),n=i.pendingProps,h=d._init,d=h(d._payload),i.type=d,h=i.tag=o_(d),n=or(d,n),h){case 0:i=Rc(null,i,d,n,o);break e;case 1:i=Kp(null,i,d,n,o);break e;case 11:i=Vp(null,i,d,n,o);break e;case 14:i=Hp(null,i,d,or(d.type,n),o);break e}throw Error(r(306,d,""))}return i;case 0:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:or(d,h),Rc(n,i,d,h,o);case 1:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:or(d,h),Kp(n,i,d,h,o);case 3:e:{if(Zp(i),n===null)throw Error(r(387));d=i.pendingProps,v=i.memoizedState,h=v.element,cp(n,i),fa(i,d,null,o);var w=i.memoizedState;if(d=w.element,v.isDehydrated)if(v={element:d,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){h=ts(Error(r(423)),i),i=Yp(n,i,d,o,h);break e}else if(d!==h){h=ts(Error(r(424)),i),i=Yp(n,i,d,o,h);break e}else for(Fn=Ur(i.stateNode.containerInfo.firstChild),Bn=i,Dt=!0,ar=null,o=ap(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Qi(),d===h){i=Ar(n,i,o);break e}Cn(n,i,d,o)}i=i.child}return i;case 5:return fp(i),n===null&&cc(i),d=i.type,h=i.pendingProps,v=n!==null?n.memoizedProps:null,w=h.children,ec(d,h)?w=null:v!==null&&ec(d,v)&&(i.flags|=32),qp(n,i),Cn(n,i,w,o),i.child;case 6:return n===null&&cc(i),null;case 13:return Qp(n,i,o);case 4:return yc(i,i.stateNode.containerInfo),d=i.pendingProps,n===null?i.child=Xi(i,null,d,o):Cn(n,i,d,o),i.child;case 11:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:or(d,h),Vp(n,i,d,h,o);case 7:return Cn(n,i,i.pendingProps,o),i.child;case 8:return Cn(n,i,i.pendingProps.children,o),i.child;case 12:return Cn(n,i,i.pendingProps.children,o),i.child;case 10:e:{if(d=i.type._context,h=i.pendingProps,v=i.memoizedProps,w=h.value,St(ca,d._currentValue),d._currentValue=w,v!==null)if(lr(v.value,w)){if(v.children===h.children&&!En.current){i=Ar(n,i,o);break e}}else for(v=i.child,v!==null&&(v.return=i);v!==null;){var D=v.dependencies;if(D!==null){w=v.child;for(var L=D.firstContext;L!==null;){if(L.context===d){if(v.tag===1){L=Dr(-1,o&-o),L.tag=2;var W=v.updateQueue;if(W!==null){W=W.shared;var oe=W.pending;oe===null?L.next=L:(L.next=oe.next,oe.next=L),W.pending=L}}v.lanes|=o,L=v.alternate,L!==null&&(L.lanes|=o),mc(v.return,o,i),D.lanes|=o;break}L=L.next}}else if(v.tag===10)w=v.type===i.type?null:v.child;else if(v.tag===18){if(w=v.return,w===null)throw Error(r(341));w.lanes|=o,D=w.alternate,D!==null&&(D.lanes|=o),mc(w,o,i),w=v.sibling}else w=v.child;if(w!==null)w.return=v;else for(w=v;w!==null;){if(w===i){w=null;break}if(v=w.sibling,v!==null){v.return=w.return,w=v;break}w=w.return}v=w}Cn(n,i,h.children,o),i=i.child}return i;case 9:return h=i.type,d=i.pendingProps.children,Ji(i,o),h=Qn(h),d=d(h),i.flags|=1,Cn(n,i,d,o),i.child;case 14:return d=i.type,h=or(d,i.pendingProps),h=or(d.type,h),Hp(n,i,d,h,o);case 15:return Up(n,i,i.type,i.pendingProps,o);case 17:return d=i.type,h=i.pendingProps,h=i.elementType===d?h:or(d,h),ka(n,i),i.tag=1,Tn(d)?(n=!0,ra(i)):n=!1,Ji(i,o),Lp(i,d,h),Ic(i,d,h,o),Pc(null,i,d,!0,n,o);case 19:return Gp(n,i,o);case 22:return Wp(n,i,o)}throw Error(r(156,i.tag))};function wm(n,i){return ef(n,i)}function a_(n,i,o,d){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(n,i,o,d){return new a_(n,i,o,d)}function eu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function o_(n){if(typeof n=="function")return eu(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ie)return 11;if(n===J)return 14}return 2}function ti(n,i){var o=n.alternate;return o===null?(o=Jn(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&14680064,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o}function Aa(n,i,o,d,h,v){var w=2;if(d=n,typeof n=="function")eu(n)&&(w=1);else if(typeof n=="string")w=5;else e:switch(n){case V:return ji(o.children,h,v,i);case X:w=8,h|=8;break;case ee:return n=Jn(12,o,i,h|2),n.elementType=ee,n.lanes=v,n;case ke:return n=Jn(13,o,i,h),n.elementType=ke,n.lanes=v,n;case se:return n=Jn(19,o,i,h),n.elementType=se,n.lanes=v,n;case ye:return Ra(o,h,v,i);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:w=10;break e;case Y:w=9;break e;case ie:w=11;break e;case J:w=14;break e;case te:w=16,d=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return i=Jn(w,o,i,h),i.elementType=n,i.type=d,i.lanes=v,i}function ji(n,i,o,d){return n=Jn(7,n,d,i),n.lanes=o,n}function Ra(n,i,o,d){return n=Jn(22,n,d,i),n.elementType=ye,n.lanes=o,n.stateNode={isHidden:!1},n}function tu(n,i,o){return n=Jn(6,n,null,i),n.lanes=o,n}function nu(n,i,o){return i=Jn(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}function c_(n,i,o,d,h){this.tag=i,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=To(0),this.expirationTimes=To(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=To(0),this.identifierPrefix=d,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function ru(n,i,o,d,h,v,w,D,L){return n=new c_(n,i,o,D,L),i===1?(i=1,v===!0&&(i|=8)):i=0,v=Jn(3,null,null,i),n.current=v,v.stateNode=n,v.memoizedState={element:d,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},gc(v),n}function u_(n,i,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:d==null?null:""+d,children:n,containerInfo:i,implementation:o}}function bm(n){if(!n)return qr;n=n._reactInternals;e:{if(hi(n)!==n||n.tag!==1)throw Error(r(170));var i=n;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Tn(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(r(171))}if(n.tag===1){var o=n.type;if(Tn(o))return Xf(n,o,i)}return i}function Sm(n,i,o,d,h,v,w,D,L){return n=ru(o,d,!0,n,h,v,w,D,L),n.context=bm(null),o=n.current,d=Nn(),h=Jr(o),v=Dr(d,h),v.callback=i??null,Yr(o,v,h),n.current.lanes=h,Es(n,h,d),An(n,d),n}function Pa(n,i,o,d){var h=i.current,v=Nn(),w=Jr(h);return o=bm(o),i.context===null?i.context=o:i.pendingContext=o,i=Dr(v,w),i.payload={element:n},d=d===void 0?null:d,d!==null&&(i.callback=d),n=Yr(h,i,w),n!==null&&(dr(n,h,w,v),da(n,h,w)),w}function La(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Cm(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function iu(n,i){Cm(n,i),(n=n.alternate)&&Cm(n,i)}function d_(){return null}var Nm=typeof reportError=="function"?reportError:function(n){console.error(n)};function su(n){this._internalRoot=n}Ma.prototype.render=su.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));Pa(n,i,null,null)},Ma.prototype.unmount=su.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Si(function(){Pa(null,n,null,null)}),i[Nr]=null}};function Ma(n){this._internalRoot=n}Ma.prototype.unstable_scheduleHydration=function(n){if(n){var i=cf();n={blockedOn:null,target:n,priority:i};for(var o=0;o<Fr.length&&i!==0&&i<Fr[o].priority;o++);Fr.splice(o,0,n),o===0&&ff(n)}};function lu(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Oa(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function jm(){}function f_(n,i,o,d,h){if(h){if(typeof d=="function"){var v=d;d=function(){var W=La(w);v.call(W)}}var w=Sm(i,d,n,0,null,!1,!1,"",jm);return n._reactRootContainer=w,n[Nr]=w.current,Vs(n.nodeType===8?n.parentNode:n),Si(),w}for(;h=n.lastChild;)n.removeChild(h);if(typeof d=="function"){var D=d;d=function(){var W=La(L);D.call(W)}}var L=ru(n,0,!1,null,null,!1,!1,"",jm);return n._reactRootContainer=L,n[Nr]=L.current,Vs(n.nodeType===8?n.parentNode:n),Si(function(){Pa(i,L,o,d)}),L}function za(n,i,o,d,h){var v=o._reactRootContainer;if(v){var w=v;if(typeof h=="function"){var D=h;h=function(){var L=La(w);D.call(L)}}Pa(i,w,n,h)}else w=f_(o,i,n,h,d);return La(w)}af=function(n){switch(n.tag){case 3:var i=n.stateNode;if(i.current.memoizedState.isDehydrated){var o=js(i.pendingLanes);o!==0&&(Io(i,o|1),An(i,Wt()),(it&6)===0&&(is=Wt()+500,Kr()))}break;case 13:Si(function(){var d=Ir(n,1);if(d!==null){var h=Nn();dr(d,n,1,h)}}),iu(n,1)}},Do=function(n){if(n.tag===13){var i=Ir(n,134217728);if(i!==null){var o=Nn();dr(i,n,134217728,o)}iu(n,134217728)}},of=function(n){if(n.tag===13){var i=Jr(n),o=Ir(n,i);if(o!==null){var d=Nn();dr(o,n,i,d)}iu(n,i)}},cf=function(){return gt},uf=function(n,i){var o=gt;try{return gt=n,i()}finally{gt=o}},mi=function(n,i,o){switch(i){case"input":if(Kt(n,o),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==n&&d.form===n.form){var h=ta(d);if(!h)throw Error(r(90));Bt(d),Kt(d,h)}}}break;case"textarea":ge(n,o);break;case"select":i=o.value,i!=null&&Et(n,!!o.multiple,i,!1)}},on=Xc,Yt=Si;var p_={usingClientEntryPoint:!1,Events:[Ws,Wi,ta,an,On,Xc]},sl={findFiberByHostInstance:gi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m_={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Gd(n),n===null?null:n.stateNode},findFiberByHostInstance:sl.findFiberByHostInstance||d_,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 $a=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$a.isDisabled&&$a.supportsFiber)try{Ml=$a.inject(m_),hr=$a}catch{}}return Rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p_,Rn.createPortal=function(n,i){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!lu(i))throw Error(r(200));return u_(n,i,null,o)},Rn.createRoot=function(n,i){if(!lu(n))throw Error(r(299));var o=!1,d="",h=Nm;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onRecoverableError!==void 0&&(h=i.onRecoverableError)),i=ru(n,1,!1,null,null,o,!1,d,h),n[Nr]=i.current,Vs(n.nodeType===8?n.parentNode:n),new su(i)},Rn.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Gd(i),n=n===null?null:n.stateNode,n},Rn.flushSync=function(n){return Si(n)},Rn.hydrate=function(n,i,o){if(!Oa(i))throw Error(r(200));return za(null,n,i,!0,o)},Rn.hydrateRoot=function(n,i,o){if(!lu(n))throw Error(r(405));var d=o!=null&&o.hydratedSources||null,h=!1,v="",w=Nm;if(o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(v=o.identifierPrefix),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),i=Sm(i,null,n,1,o??null,h,!1,v,w),n[Nr]=i.current,Vs(n),d)for(n=0;n<d.length;n++)o=d[n],h=o._getVersion,h=h(o._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[o,h]:i.mutableSourceEagerHydrationData.push(o,h);return new Ma(i)},Rn.render=function(n,i,o){if(!Oa(i))throw Error(r(200));return za(null,n,i,!1,o)},Rn.unmountComponentAtNode=function(n){if(!Oa(n))throw Error(r(40));return n._reactRootContainer?(Si(function(){za(null,null,n,!1,function(){n._reactRootContainer=null,n[Nr]=null})}),!0):!1},Rn.unstable_batchedUpdates=Xc,Rn.unstable_renderSubtreeIntoContainer=function(n,i,o,d){if(!Oa(o))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return za(n,i,o,!1,d)},Rn.version="18.3.1-next-f1338f8080-20240426",Rn}var Lm;function Sg(){if(Lm)return cu.exports;Lm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cu.exports=b_(),cu.exports}var Mm;function S_(){if(Mm)return Ba;Mm=1;var e=Sg();return Ba.createRoot=e.createRoot,Ba.hydrateRoot=e.hydrateRoot,Ba}var C_=S_();class br extends Error{constructor(r,s,l){super(s);Ei(this,"status");Ei(this,"issues");this.name="ApiError",this.status=r,this.issues=l}}class Un extends br{constructor(r){super(409,r.error);Ei(this,"serverContent");Ei(this,"serverMtimeMs");this.name="ConflictError",this.serverContent=r.serverContent,this.serverMtimeMs=r.serverMtimeMs}}async function ft(e){if(e.ok)return await e.json();let t={};try{t=await e.json()}catch{}throw new br(e.status,t.error??`エラー (${e.status})`,t.issues)}async function N_(e){return ft(await fetch("/api/board",{signal:e}))}async function j_(){return ft(await fetch("/api/mode"))}async function E_(e){return ft(await fetch("/api/overview",{signal:e}))}async function dd(e){return ft(await fetch("/api/archive",{signal:e}))}async function T_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/unarchive`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});await ft(t)}async function I_(e){return ft(await fetch("/api/trash",{signal:e}))}async function D_(e,t,r){const s={};t!==void 0&&(s.trashedAt=t),r!==void 0&&(s.overwrite=r);const l=await fetch(`/api/tasks/${encodeURIComponent(e)}/restore`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});await ft(l)}async function A_(e){const t=await fetch("/api/tasks",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});return ft(t)}async function R_(e){const{id:t,...r}=e,s=await fetch(`/api/tasks/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(r)});return ft(s)}async function fu(e,t,r){const s=await fetch(`/api/tasks/${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:t,baseMtimeMs:r})});if(s.status===409)throw new Un(await s.json());return ft(s)}async function P_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/approve`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return ft(t)}async function L_(e,t){const r=await fetch(`/api/tasks/${encodeURIComponent(e)}/reject`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({reason:t})});return ft(r)}async function Cg(e,t,r){const s={};t!==void 0&&(s.reason=t),r!==void 0&&(s.baseMtimeMs=r);const l=await fetch(`/api/tasks/${encodeURIComponent(e)}/revise`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(l.status===409){const a=await l.json();throw typeof a.serverContent=="string"&&typeof a.serverMtimeMs=="number"?new Un(a):new br(409,a.error??"エラー (409)")}return ft(l)}async function Om(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return ft(t)}async function M_(e){const t=await fetch(`/api/tasks/${encodeURIComponent(e)}/rename`,{method:"POST",headers:{"content-type":"application/json"},body:"{}"});return ft(t)}async function Ja(){const e=await fetch("/api/config"),t=await ft(e),r=e.headers.get("x-config-mtime-ms"),s=r!==null&&r!==""?Number(r):null;return{config:t,mtimeMs:s!==null&&Number.isFinite(s)?s:null}}async function fd(e,t){const r={"content-type":"application/json"};t!=null&&(r["x-base-mtime-ms"]=String(t));const s=await fetch("/api/config",{method:"PUT",headers:r,body:JSON.stringify(e)});if(s.status===409)throw new Un(await s.json());await ft(s)}async function O_(e,t){const r=await fetch("/api/members/rename",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({from:e,to:t})});return ft(r)}async function z_(e){try{const{config:t,mtimeMs:r}=await Ja();if(t.language===e)return;await fd({...t,language:e},r)}catch{}}async function zm(e){const{config:t,mtimeMs:r}=await Ja();await fd({...t,savedViews:e},r)}async function $_(e,t=!1){const r=t?"&scope=global":"";return ft(await fetch(`/api/files?path=${encodeURIComponent(e)}${r}`))}async function B_(e,t,r,s=!1){const l=await fetch("/api/files",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,content:t,baseMtimeMs:r,...s?{scope:"global"}:{}})});return ft(l)}async function F_(){return(await ft(await fetch("/api/files/tree"))).trees}async function Ng(e){return(await ft(await fetch("/api/docs/tree",{signal:e}))).trees}async function jg(e,t){return ft(await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{signal:t}))}async function V_(e){return(await ft(await fetch("/api/docs/write-tree",{signal:e}))).trees}async function H_(e,t){const r=await fetch("/api/docs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e,content:t})});return ft(r)}async function U_(e,t,r){const s=await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:t,baseMtimeMs:r})});if(s.status===409)throw new Un(await s.json());return ft(s)}async function W_(e){const t=await fetch(`/api/docs?path=${encodeURIComponent(e)}`,{method:"DELETE",headers:{"content-type":"application/json"}});await ft(t)}async function $m(e=!1){return(await ft(await fetch(`/api/files/catalog${e?"?scope=global":""}`))).items}async function q_(e,t){return(await ft(await fetch(`/api/tasks/${encodeURIComponent(e)}/commits`,{signal:t}))).commits}async function K_(e,t,r){const s=await fetch(`/api/tasks/${encodeURIComponent(e)}/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({member:t,message:r})});return ft(s)}function Z_(){const[e,t]=b.useState(null),[r,s]=b.useState(!0),[l,a]=b.useState(null),[c,u]=b.useState(!1),p=b.useRef(0),m=b.useCallback(async()=>{const g=++p.current;try{const y=await N_();g===p.current&&(t(y),a(null))}catch(y){g===p.current&&a(y instanceof Error?y.message:"ボードの取得に失敗しました")}finally{g===p.current&&s(!1)}},[]);return b.useEffect(()=>{m();const g=new EventSource("/api/events");return g.onopen=()=>{u(!0),m()},g.onmessage=y=>{try{const _=JSON.parse(y.data);_.type==="change"?m():_.type==="connected"&&u(!0)}catch{}},g.onerror=()=>{u(!1)},()=>{g.close()}},[m]),{board:e,loading:r,error:l,connected:c,refresh:m}}function Y_(e,t){const r=new Map;for(const a of e)r.set(a.id,a);const s=[],l=[];for(const a of t){const c=r.get(a.id);if(c===void 0){s.push(a.id);continue}(a.status!==c.status||Q_(a.updated,c.updated))&&l.push(a.id)}return{newIds:s,updatedIds:l,changedIds:new Set([...s,...l])}}function Q_(e,t){const r=Date.parse(e),s=Date.parse(t);return Number.isNaN(r)||Number.isNaN(s)?e!==t:r>s}const X_="aizuchi.seen.";function Eg(e){const t=(e??"").trim();return`${X_}${t===""?"default":t}`}function Bm(e){try{if(typeof localStorage>"u")return{};const t=localStorage.getItem(Eg(e));if(t===null)return{};const r=JSON.parse(t);if(r===null||typeof r!="object"||Array.isArray(r))return{};const s={};for(const[l,a]of Object.entries(r))typeof a=="string"&&(s[l]=a);return s}catch{return{}}}function Fa(e,t){try{if(typeof localStorage>"u")return;localStorage.setItem(Eg(e),JSON.stringify(t))}catch{}}function Va(e){return`${e.updated}|${e.status}`}function G_(e){return{id:e.frontmatter.id,updated:e.frontmatter.updated,status:e.frontmatter.status}}function J_(e,t){const[r,s]=b.useState(()=>Bm(t)),l=b.useRef(null),a=b.useRef(t);a.current=t,b.useEffect(()=>{s(Bm(t)),l.current=null},[t]),b.useEffect(()=>{if(e===null)return;const m=e.map(G_);if(l.current===null){l.current=m,s(_=>{if(Object.keys(_).length>0)return _;const x={};for(const k of e)x[k.frontmatter.id]=Va(k.frontmatter);return Fa(a.current,x),x});return}const g=Y_(l.current,m);l.current=m;const y=new Set(m.map(_=>_.id));s(_=>{let x=!1;const k={..._};for(const E of g.changedIds)E in k&&(delete k[E],x=!0);for(const E of Object.keys(k))y.has(E)||(delete k[E],x=!0);return x?(Fa(a.current,k),k):_})},[e]);const c=b.useMemo(()=>{if(e===null)return new Set;const m=new Set;for(const g of e)r[g.frontmatter.id]!==Va(g.frontmatter)&&m.add(g.frontmatter.id);return m},[e,r]),u=b.useCallback(m=>{const g=e==null?void 0:e.find(_=>_.frontmatter.id===m);if(!g)return;const y=Va(g.frontmatter);s(_=>{if(_[m]===y)return _;const x={..._,[m]:y};return Fa(a.current,x),x})},[e]),p=b.useCallback(()=>{e!==null&&s(()=>{const m={};for(const g of e)m[g.frontmatter.id]=Va(g.frontmatter);return Fa(a.current,m),m})},[e]);return{unreadIds:c,markRead:u,markAllRead:p}}var at;(function(e){e.assertEqual=l=>{};function t(l){}e.assertIs=t;function r(l){throw new Error}e.assertNever=r,e.arrayToEnum=l=>{const a={};for(const c of l)a[c]=c;return a},e.getValidEnumValues=l=>{const a=e.objectKeys(l).filter(u=>typeof l[l[u]]!="number"),c={};for(const u of a)c[u]=l[u];return e.objectValues(c)},e.objectValues=l=>e.objectKeys(l).map(function(a){return l[a]}),e.objectKeys=typeof Object.keys=="function"?l=>Object.keys(l):l=>{const a=[];for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&a.push(c);return a},e.find=(l,a)=>{for(const c of l)if(a(c))return c},e.isInteger=typeof Number.isInteger=="function"?l=>Number.isInteger(l):l=>typeof l=="number"&&Number.isFinite(l)&&Math.floor(l)===l;function s(l,a=" | "){return l.map(c=>typeof c=="string"?`'${c}'`:c).join(a)}e.joinValues=s,e.jsonStringifyReplacer=(l,a)=>typeof a=="bigint"?a.toString():a})(at||(at={}));var Fm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Fm||(Fm={}));const Ie=at.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return Ie.undefined;case"string":return Ie.string;case"number":return Number.isNaN(e)?Ie.nan:Ie.number;case"boolean":return Ie.boolean;case"function":return Ie.function;case"bigint":return Ie.bigint;case"symbol":return Ie.symbol;case"object":return Array.isArray(e)?Ie.array:e===null?Ie.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ie.promise:typeof Map<"u"&&e instanceof Map?Ie.map:typeof Set<"u"&&e instanceof Set?Ie.set:typeof Date<"u"&&e instanceof Date?Ie.date:Ie.object;default:return Ie.unknown}},de=at.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Lr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},s={_errors:[]},l=a=>{for(const c of a.issues)if(c.code==="invalid_union")c.unionErrors.map(l);else if(c.code==="invalid_return_type")l(c.returnTypeError);else if(c.code==="invalid_arguments")l(c.argumentsError);else if(c.path.length===0)s._errors.push(r(c));else{let u=s,p=0;for(;p<c.path.length;){const m=c.path[p];p===c.path.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(r(c))):u[m]=u[m]||{_errors:[]},u=u[m],p++}}};return l(this),s}static assert(t){if(!(t instanceof Lr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,at.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},s=[];for(const l of this.issues)if(l.path.length>0){const a=l.path[0];r[a]=r[a]||[],r[a].push(t(l))}else s.push(t(l));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}}Lr.create=e=>new Lr(e);const Ou=(e,t)=>{let r;switch(e.code){case de.invalid_type:e.received===Ie.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case de.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,at.jsonStringifyReplacer)}`;break;case de.unrecognized_keys:r=`Unrecognized key(s) in object: ${at.joinValues(e.keys,", ")}`;break;case de.invalid_union:r="Invalid input";break;case de.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${at.joinValues(e.options)}`;break;case de.invalid_enum_value:r=`Invalid enum value. Expected ${at.joinValues(e.options)}, received '${e.received}'`;break;case de.invalid_arguments:r="Invalid function arguments";break;case de.invalid_return_type:r="Invalid function return type";break;case de.invalid_date:r="Invalid date";break;case de.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:at.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case de.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case de.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case de.custom:r="Invalid input";break;case de.invalid_intersection_types:r="Intersection results could not be merged";break;case de.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case de.not_finite:r="Number must be finite";break;default:r=t.defaultError,at.assertNever(e)}return{message:r}};let ek=Ou;function tk(){return ek}const nk=e=>{const{data:t,path:r,errorMaps:s,issueData:l}=e,a=[...r,...l.path||[]],c={...l,path:a};if(l.message!==void 0)return{...l,path:a,message:l.message};let u="";const p=s.filter(m=>!!m).slice().reverse();for(const m of p)u=m(c,{data:t,defaultError:u}).message;return{...l,path:a,message:u}};function Ce(e,t){const r=tk(),s=nk({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Ou?void 0:Ou].filter(l=>!!l)});e.common.issues.push(s)}class qn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const s=[];for(const l of r){if(l.status==="aborted")return We;l.status==="dirty"&&t.dirty(),s.push(l.value)}return{status:t.value,value:s}}static async mergeObjectAsync(t,r){const s=[];for(const l of r){const a=await l.key,c=await l.value;s.push({key:a,value:c})}return qn.mergeObjectSync(t,s)}static mergeObjectSync(t,r){const s={};for(const l of r){const{key:a,value:c}=l;if(a.status==="aborted"||c.status==="aborted")return We;a.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof c.value<"u"||l.alwaysSet)&&(s[a.value]=c.value)}return{status:t.value,value:s}}}const We=Object.freeze({status:"aborted"}),fl=e=>({status:"dirty",value:e}),rr=e=>({status:"valid",value:e}),Vm=e=>e.status==="aborted",Hm=e=>e.status==="dirty",ps=e=>e.status==="valid",eo=e=>typeof Promise<"u"&&e instanceof Promise;var Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ae||(Ae={}));class ci{constructor(t,r,s,l){this._cachedPath=[],this.parent=t,this.data=r,this._path=s,this._key=l}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Um=(e,t)=>{if(ps(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Lr(e.common.issues);return this._error=r,this._error}}};function Je(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:s,description:l}=e;if(t&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:l}:{errorMap:(c,u)=>{const{message:p}=e;return c.code==="invalid_enum_value"?{message:p??u.defaultError}:typeof u.data>"u"?{message:p??s??u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:p??r??u.defaultError}},description:l}}class st{get description(){return this._def.description}_getType(t){return si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qn,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(eo(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const s=this.safeParse(t,r);if(s.success)return s.data;throw s.error}safeParse(t,r){const s={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},l=this._parseSync({data:t,path:s.path,parent:s});return Um(s,l)}"~validate"(t){var s,l;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:r});return ps(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(l=(s=a==null?void 0:a.message)==null?void 0:s.toLowerCase())!=null&&l.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(a=>ps(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(t,r){const s=await this.safeParseAsync(t,r);if(s.success)return s.data;throw s.error}async safeParseAsync(t,r){const s={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},l=this._parse({data:t,path:s.path,parent:s}),a=await(eo(l)?l:Promise.resolve(l));return Um(s,a)}refine(t,r){const s=l=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(l):r;return this._refinement((l,a)=>{const c=t(l),u=()=>a.addIssue({code:de.custom,...s(l)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(t,r){return this._refinement((s,l)=>t(s)?!0:(l.addIssue(typeof r=="function"?r(s,l):r),!1))}_refinement(t){return new gs({schema:this,typeName:qe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return oi.create(this,this._def)}nullable(){return ys.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wr.create(this)}promise(){return io.create(this,this._def)}or(t){return no.create([this,t],this._def)}and(t){return ro.create(this,t,this._def)}transform(t){return new gs({...Je(this._def),schema:this,typeName:qe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Bu({...Je(this._def),innerType:this,defaultValue:r,typeName:qe.ZodDefault})}brand(){return new Ck({typeName:qe.ZodBranded,type:this,...Je(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fu({...Je(this._def),innerType:this,catchValue:r,typeName:qe.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return pd.create(this,t)}readonly(){return Vu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const rk=/^c[^\s-]{8,}$/i,ik=/^[0-9a-z]+$/,sk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ak=/^[a-z0-9_-]{21}$/i,ok=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ck=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,uk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let pu;const fk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,mk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,hk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Tg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",vk=new RegExp(`^${Tg}$`);function Ig(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function xk(e){return new RegExp(`^${Ig(e)}$`)}function _k(e){let t=`${Tg}T${Ig(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function kk(e,t){return!!((t==="v4"||!t)&&fk.test(e)||(t==="v6"||!t)&&mk.test(e))}function wk(e,t){if(!ok.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),l=JSON.parse(atob(s));return!(typeof l!="object"||l===null||"typ"in l&&(l==null?void 0:l.typ)!=="JWT"||!l.alg||t&&l.alg!==t)}catch{return!1}}function bk(e,t){return!!((t==="v4"||!t)&&pk.test(e)||(t==="v6"||!t)&&hk.test(e))}class ai extends st{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ie.string){const a=this._getOrReturnCtx(t);return Ce(a,{code:de.invalid_type,expected:Ie.string,received:a.parsedType}),We}const s=new qn;let l;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="max")t.data.length>a.value&&(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const c=t.data.length>a.value,u=t.data.length<a.value;(c||u)&&(l=this._getOrReturnCtx(t,l),c?Ce(l,{code:de.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):u&&Ce(l,{code:de.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),s.dirty())}else if(a.kind==="email")uk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"email",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="emoji")pu||(pu=new RegExp(dk,"u")),pu.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"emoji",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="uuid")lk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"uuid",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="nanoid")ak.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"nanoid",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid")rk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"cuid",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="cuid2")ik.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"cuid2",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="ulid")sk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"ulid",code:de.invalid_string,message:a.message}),s.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{l=this._getOrReturnCtx(t,l),Ce(l,{validation:"url",code:de.invalid_string,message:a.message}),s.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"regex",code:de.invalid_string,message:a.message}),s.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),s.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:{startsWith:a.value},message:a.message}),s.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:{endsWith:a.value},message:a.message}),s.dirty()):a.kind==="datetime"?_k(a).test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:"datetime",message:a.message}),s.dirty()):a.kind==="date"?vk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:"date",message:a.message}),s.dirty()):a.kind==="time"?xk(a).test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.invalid_string,validation:"time",message:a.message}),s.dirty()):a.kind==="duration"?ck.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"duration",code:de.invalid_string,message:a.message}),s.dirty()):a.kind==="ip"?kk(t.data,a.version)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"ip",code:de.invalid_string,message:a.message}),s.dirty()):a.kind==="jwt"?wk(t.data,a.alg)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"jwt",code:de.invalid_string,message:a.message}),s.dirty()):a.kind==="cidr"?bk(t.data,a.version)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"cidr",code:de.invalid_string,message:a.message}),s.dirty()):a.kind==="base64"?gk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"base64",code:de.invalid_string,message:a.message}),s.dirty()):a.kind==="base64url"?yk.test(t.data)||(l=this._getOrReturnCtx(t,l),Ce(l,{validation:"base64url",code:de.invalid_string,message:a.message}),s.dirty()):at.assertNever(a);return{status:s.value,value:t.data}}_regex(t,r,s){return this.refinement(l=>t.test(l),{validation:r,code:de.invalid_string,...Ae.errToObj(s)})}_addCheck(t){return new ai({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ae.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ae.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ae.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ae.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ae.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ae.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ae.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ae.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ae.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ae.errToObj(r)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new ai({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ai({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ai({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}ai.create=e=>new ai({checks:[],typeName:qe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Je(e)});function Sk(e,t){const r=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,l=r>s?r:s,a=Number.parseInt(e.toFixed(l).replace(".","")),c=Number.parseInt(t.toFixed(l).replace(".",""));return a%c/10**l}class ms extends st{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ie.number){const a=this._getOrReturnCtx(t);return Ce(a,{code:de.invalid_type,expected:Ie.number,received:a.parsedType}),We}let s;const l=new qn;for(const a of this._def.checks)a.kind==="int"?at.isInteger(t.data)||(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.invalid_type,expected:"integer",received:"float",message:a.message}),l.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),l.dirty()):a.kind==="multipleOf"?Sk(t.data,a.value)!==0&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.not_finite,message:a.message}),l.dirty()):at.assertNever(a);return{status:l.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,s,l){return new ms({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Ae.toString(l)}]})}_addCheck(t){return new ms({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&at.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(t===null||s.value<t)&&(t=s.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ms.create=e=>new ms({checks:[],typeName:qe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class kl extends st{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ie.bigint)return this._getInvalidInput(t);let s;const l=new qn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),l.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(t,s),Ce(s,{code:de.not_multiple_of,multipleOf:a.value,message:a.message}),l.dirty()):at.assertNever(a);return{status:l.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return Ce(r,{code:de.invalid_type,expected:Ie.bigint,received:r.parsedType}),We}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,s,l){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:s,message:Ae.toString(l)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}kl.create=e=>new kl({checks:[],typeName:qe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Je(e)});class zu extends st{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ie.boolean){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.boolean,received:s.parsedType}),We}return rr(t.data)}}zu.create=e=>new zu({typeName:qe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class to extends st{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ie.date){const a=this._getOrReturnCtx(t);return Ce(a,{code:de.invalid_type,expected:Ie.date,received:a.parsedType}),We}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ce(a,{code:de.invalid_date}),We}const s=new qn;let l;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),s.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(l=this._getOrReturnCtx(t,l),Ce(l,{code:de.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):at.assertNever(a);return{status:s.value,value:new Date(t.data.getTime())}}_addCheck(t){return new to({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}to.create=e=>new to({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:qe.ZodDate,...Je(e)});class Wm extends st{_parse(t){if(this._getType(t)!==Ie.symbol){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.symbol,received:s.parsedType}),We}return rr(t.data)}}Wm.create=e=>new Wm({typeName:qe.ZodSymbol,...Je(e)});class qm extends st{_parse(t){if(this._getType(t)!==Ie.undefined){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.undefined,received:s.parsedType}),We}return rr(t.data)}}qm.create=e=>new qm({typeName:qe.ZodUndefined,...Je(e)});class Km extends st{_parse(t){if(this._getType(t)!==Ie.null){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.null,received:s.parsedType}),We}return rr(t.data)}}Km.create=e=>new Km({typeName:qe.ZodNull,...Je(e)});class Zm extends st{constructor(){super(...arguments),this._any=!0}_parse(t){return rr(t.data)}}Zm.create=e=>new Zm({typeName:qe.ZodAny,...Je(e)});class Ym extends st{constructor(){super(...arguments),this._unknown=!0}_parse(t){return rr(t.data)}}Ym.create=e=>new Ym({typeName:qe.ZodUnknown,...Je(e)});class ui extends st{_parse(t){const r=this._getOrReturnCtx(t);return Ce(r,{code:de.invalid_type,expected:Ie.never,received:r.parsedType}),We}}ui.create=e=>new ui({typeName:qe.ZodNever,...Je(e)});class Qm extends st{_parse(t){if(this._getType(t)!==Ie.undefined){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.void,received:s.parsedType}),We}return rr(t.data)}}Qm.create=e=>new Qm({typeName:qe.ZodVoid,...Je(e)});class wr extends st{_parse(t){const{ctx:r,status:s}=this._processInputParams(t),l=this._def;if(r.parsedType!==Ie.array)return Ce(r,{code:de.invalid_type,expected:Ie.array,received:r.parsedType}),We;if(l.exactLength!==null){const c=r.data.length>l.exactLength.value,u=r.data.length<l.exactLength.value;(c||u)&&(Ce(r,{code:c?de.too_big:de.too_small,minimum:u?l.exactLength.value:void 0,maximum:c?l.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:l.exactLength.message}),s.dirty())}if(l.minLength!==null&&r.data.length<l.minLength.value&&(Ce(r,{code:de.too_small,minimum:l.minLength.value,type:"array",inclusive:!0,exact:!1,message:l.minLength.message}),s.dirty()),l.maxLength!==null&&r.data.length>l.maxLength.value&&(Ce(r,{code:de.too_big,maximum:l.maxLength.value,type:"array",inclusive:!0,exact:!1,message:l.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((c,u)=>l.type._parseAsync(new ci(r,c,r.path,u)))).then(c=>qn.mergeArray(s,c));const a=[...r.data].map((c,u)=>l.type._parseSync(new ci(r,c,r.path,u)));return qn.mergeArray(s,a)}get element(){return this._def.type}min(t,r){return new wr({...this._def,minLength:{value:t,message:Ae.toString(r)}})}max(t,r){return new wr({...this._def,maxLength:{value:t,message:Ae.toString(r)}})}length(t,r){return new wr({...this._def,exactLength:{value:t,message:Ae.toString(r)}})}nonempty(t){return this.min(1,t)}}wr.create=(e,t)=>new wr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qe.ZodArray,...Je(t)});function us(e){if(e instanceof Gt){const t={};for(const r in e.shape){const s=e.shape[r];t[r]=oi.create(us(s))}return new Gt({...e._def,shape:()=>t})}else return e instanceof wr?new wr({...e._def,type:us(e.element)}):e instanceof oi?oi.create(us(e.unwrap())):e instanceof ys?ys.create(us(e.unwrap())):e instanceof Pi?Pi.create(e.items.map(t=>us(t))):e}class Gt extends st{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=at.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==Ie.object){const m=this._getOrReturnCtx(t);return Ce(m,{code:de.invalid_type,expected:Ie.object,received:m.parsedType}),We}const{status:s,ctx:l}=this._processInputParams(t),{shape:a,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof ui&&this._def.unknownKeys==="strip"))for(const m in l.data)c.includes(m)||u.push(m);const p=[];for(const m of c){const g=a[m],y=l.data[m];p.push({key:{status:"valid",value:m},value:g._parse(new ci(l,y,l.path,m)),alwaysSet:m in l.data})}if(this._def.catchall instanceof ui){const m=this._def.unknownKeys;if(m==="passthrough")for(const g of u)p.push({key:{status:"valid",value:g},value:{status:"valid",value:l.data[g]}});else if(m==="strict")u.length>0&&(Ce(l,{code:de.unrecognized_keys,keys:u}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const g of u){const y=l.data[g];p.push({key:{status:"valid",value:g},value:m._parse(new ci(l,y,l.path,g)),alwaysSet:g in l.data})}}return l.common.async?Promise.resolve().then(async()=>{const m=[];for(const g of p){const y=await g.key,_=await g.value;m.push({key:y,value:_,alwaysSet:g.alwaysSet})}return m}).then(m=>qn.mergeObjectSync(s,m)):qn.mergeObjectSync(s,p)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new Gt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,s)=>{var a,c;const l=((c=(a=this._def).errorMap)==null?void 0:c.call(a,r,s).message)??s.defaultError;return r.code==="unrecognized_keys"?{message:Ae.errToObj(t).message??l}:{message:l}}}:{}})}strip(){return new Gt({...this._def,unknownKeys:"strip"})}passthrough(){return new Gt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Gt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Gt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:qe.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new Gt({...this._def,catchall:t})}pick(t){const r={};for(const s of at.objectKeys(t))t[s]&&this.shape[s]&&(r[s]=this.shape[s]);return new Gt({...this._def,shape:()=>r})}omit(t){const r={};for(const s of at.objectKeys(this.shape))t[s]||(r[s]=this.shape[s]);return new Gt({...this._def,shape:()=>r})}deepPartial(){return us(this)}partial(t){const r={};for(const s of at.objectKeys(this.shape)){const l=this.shape[s];t&&!t[s]?r[s]=l:r[s]=l.optional()}return new Gt({...this._def,shape:()=>r})}required(t){const r={};for(const s of at.objectKeys(this.shape))if(t&&!t[s])r[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof oi;)a=a._def.innerType;r[s]=a}return new Gt({...this._def,shape:()=>r})}keyof(){return Dg(at.objectKeys(this.shape))}}Gt.create=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strip",catchall:ui.create(),typeName:qe.ZodObject,...Je(t)});Gt.strictCreate=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strict",catchall:ui.create(),typeName:qe.ZodObject,...Je(t)});Gt.lazycreate=(e,t)=>new Gt({shape:e,unknownKeys:"strip",catchall:ui.create(),typeName:qe.ZodObject,...Je(t)});class no extends st{_parse(t){const{ctx:r}=this._processInputParams(t),s=this._def.options;function l(a){for(const u of a)if(u.result.status==="valid")return u.result;for(const u of a)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;const c=a.map(u=>new Lr(u.ctx.common.issues));return Ce(r,{code:de.invalid_union,unionErrors:c}),We}if(r.common.async)return Promise.all(s.map(async a=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(l);{let a;const c=[];for(const p of s){const m={...r,common:{...r.common,issues:[]},parent:null},g=p._parseSync({data:r.data,path:r.path,parent:m});if(g.status==="valid")return g;g.status==="dirty"&&!a&&(a={result:g,ctx:m}),m.common.issues.length&&c.push(m.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const u=c.map(p=>new Lr(p));return Ce(r,{code:de.invalid_union,unionErrors:u}),We}}get options(){return this._def.options}}no.create=(e,t)=>new no({options:e,typeName:qe.ZodUnion,...Je(t)});function $u(e,t){const r=si(e),s=si(t);if(e===t)return{valid:!0,data:e};if(r===Ie.object&&s===Ie.object){const l=at.objectKeys(t),a=at.objectKeys(e).filter(u=>l.indexOf(u)!==-1),c={...e,...t};for(const u of a){const p=$u(e[u],t[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(r===Ie.array&&s===Ie.array){if(e.length!==t.length)return{valid:!1};const l=[];for(let a=0;a<e.length;a++){const c=e[a],u=t[a],p=$u(c,u);if(!p.valid)return{valid:!1};l.push(p.data)}return{valid:!0,data:l}}else return r===Ie.date&&s===Ie.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ro extends st{_parse(t){const{status:r,ctx:s}=this._processInputParams(t),l=(a,c)=>{if(Vm(a)||Vm(c))return We;const u=$u(a.value,c.value);return u.valid?((Hm(a)||Hm(c))&&r.dirty(),{status:r.value,value:u.data}):(Ce(s,{code:de.invalid_intersection_types}),We)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,c])=>l(a,c)):l(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ro.create=(e,t,r)=>new ro({left:e,right:t,typeName:qe.ZodIntersection,...Je(r)});class Pi extends st{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Ie.array)return Ce(s,{code:de.invalid_type,expected:Ie.array,received:s.parsedType}),We;if(s.data.length<this._def.items.length)return Ce(s,{code:de.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),We;!this._def.rest&&s.data.length>this._def.items.length&&(Ce(s,{code:de.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...s.data].map((c,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new ci(s,c,s.path,u)):null}).filter(c=>!!c);return s.common.async?Promise.all(a).then(c=>qn.mergeArray(r,c)):qn.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new Pi({...this._def,rest:t})}}Pi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pi({items:e,typeName:qe.ZodTuple,rest:null,...Je(t)})};class Xm extends st{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Ie.map)return Ce(s,{code:de.invalid_type,expected:Ie.map,received:s.parsedType}),We;const l=this._def.keyType,a=this._def.valueType,c=[...s.data.entries()].map(([u,p],m)=>({key:l._parse(new ci(s,u,s.path,[m,"key"])),value:a._parse(new ci(s,p,s.path,[m,"value"]))}));if(s.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const m=await p.key,g=await p.value;if(m.status==="aborted"||g.status==="aborted")return We;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),u.set(m.value,g.value)}return{status:r.value,value:u}})}else{const u=new Map;for(const p of c){const m=p.key,g=p.value;if(m.status==="aborted"||g.status==="aborted")return We;(m.status==="dirty"||g.status==="dirty")&&r.dirty(),u.set(m.value,g.value)}return{status:r.value,value:u}}}}Xm.create=(e,t,r)=>new Xm({valueType:t,keyType:e,typeName:qe.ZodMap,...Je(r)});class wl extends st{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.parsedType!==Ie.set)return Ce(s,{code:de.invalid_type,expected:Ie.set,received:s.parsedType}),We;const l=this._def;l.minSize!==null&&s.data.size<l.minSize.value&&(Ce(s,{code:de.too_small,minimum:l.minSize.value,type:"set",inclusive:!0,exact:!1,message:l.minSize.message}),r.dirty()),l.maxSize!==null&&s.data.size>l.maxSize.value&&(Ce(s,{code:de.too_big,maximum:l.maxSize.value,type:"set",inclusive:!0,exact:!1,message:l.maxSize.message}),r.dirty());const a=this._def.valueType;function c(p){const m=new Set;for(const g of p){if(g.status==="aborted")return We;g.status==="dirty"&&r.dirty(),m.add(g.value)}return{status:r.value,value:m}}const u=[...s.data.values()].map((p,m)=>a._parse(new ci(s,p,s.path,m)));return s.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(t,r){return new wl({...this._def,minSize:{value:t,message:Ae.toString(r)}})}max(t,r){return new wl({...this._def,maxSize:{value:t,message:Ae.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}wl.create=(e,t)=>new wl({valueType:e,minSize:null,maxSize:null,typeName:qe.ZodSet,...Je(t)});class Gm extends st{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Gm.create=(e,t)=>new Gm({getter:e,typeName:qe.ZodLazy,...Je(t)});class Jm extends st{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Ce(r,{received:r.data,code:de.invalid_literal,expected:this._def.value}),We}return{status:"valid",value:t.data}}get value(){return this._def.value}}Jm.create=(e,t)=>new Jm({value:e,typeName:qe.ZodLiteral,...Je(t)});function Dg(e,t){return new hs({values:e,typeName:qe.ZodEnum,...Je(t)})}class hs extends st{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),s=this._def.values;return Ce(r,{expected:at.joinValues(s),received:r.parsedType,code:de.invalid_type}),We}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),s=this._def.values;return Ce(r,{received:r.data,code:de.invalid_enum_value,options:s}),We}return rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return hs.create(t,{...this._def,...r})}exclude(t,r=this._def){return hs.create(this.options.filter(s=>!t.includes(s)),{...this._def,...r})}}hs.create=Dg;class eh extends st{_parse(t){const r=at.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(t);if(s.parsedType!==Ie.string&&s.parsedType!==Ie.number){const l=at.objectValues(r);return Ce(s,{expected:at.joinValues(l),received:s.parsedType,code:de.invalid_type}),We}if(this._cache||(this._cache=new Set(at.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const l=at.objectValues(r);return Ce(s,{received:s.data,code:de.invalid_enum_value,options:l}),We}return rr(t.data)}get enum(){return this._def.values}}eh.create=(e,t)=>new eh({values:e,typeName:qe.ZodNativeEnum,...Je(t)});class io extends st{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ie.promise&&r.common.async===!1)return Ce(r,{code:de.invalid_type,expected:Ie.promise,received:r.parsedType}),We;const s=r.parsedType===Ie.promise?r.data:Promise.resolve(r.data);return rr(s.then(l=>this._def.type.parseAsync(l,{path:r.path,errorMap:r.common.contextualErrorMap})))}}io.create=(e,t)=>new io({type:e,typeName:qe.ZodPromise,...Je(t)});class gs extends st{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:s}=this._processInputParams(t),l=this._def.effect||null,a={addIssue:c=>{Ce(s,c),c.fatal?r.abort():r.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),l.type==="preprocess"){const c=l.transform(s.data,a);if(s.common.async)return Promise.resolve(c).then(async u=>{if(r.value==="aborted")return We;const p=await this._def.schema._parseAsync({data:u,path:s.path,parent:s});return p.status==="aborted"?We:p.status==="dirty"||r.value==="dirty"?fl(p.value):p});{if(r.value==="aborted")return We;const u=this._def.schema._parseSync({data:c,path:s.path,parent:s});return u.status==="aborted"?We:u.status==="dirty"||r.value==="dirty"?fl(u.value):u}}if(l.type==="refinement"){const c=u=>{const p=l.refinement(u,a);if(s.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(s.common.async===!1){const u=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return u.status==="aborted"?We:(u.status==="dirty"&&r.dirty(),c(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(u=>u.status==="aborted"?We:(u.status==="dirty"&&r.dirty(),c(u.value).then(()=>({status:r.value,value:u.value}))))}if(l.type==="transform")if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ps(c))return We;const u=l.transform(c.value,a);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>ps(c)?Promise.resolve(l.transform(c.value,a)).then(u=>({status:r.value,value:u})):We);at.assertNever(l)}}gs.create=(e,t,r)=>new gs({schema:e,typeName:qe.ZodEffects,effect:t,...Je(r)});gs.createWithPreprocess=(e,t,r)=>new gs({schema:t,effect:{type:"preprocess",transform:e},typeName:qe.ZodEffects,...Je(r)});class oi extends st{_parse(t){return this._getType(t)===Ie.undefined?rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}oi.create=(e,t)=>new oi({innerType:e,typeName:qe.ZodOptional,...Je(t)});class ys extends st{_parse(t){return this._getType(t)===Ie.null?rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ys.create=(e,t)=>new ys({innerType:e,typeName:qe.ZodNullable,...Je(t)});class Bu extends st{_parse(t){const{ctx:r}=this._processInputParams(t);let s=r.data;return r.parsedType===Ie.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Bu.create=(e,t)=>new Bu({innerType:e,typeName:qe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Je(t)});class Fu extends st{_parse(t){const{ctx:r}=this._processInputParams(t),s={...r,common:{...r.common,issues:[]}},l=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return eo(l)?l.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Lr(s.common.issues)},input:s.data})})):{status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Lr(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Fu.create=(e,t)=>new Fu({innerType:e,typeName:qe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Je(t)});class th extends st{_parse(t){if(this._getType(t)!==Ie.nan){const s=this._getOrReturnCtx(t);return Ce(s,{code:de.invalid_type,expected:Ie.nan,received:s.parsedType}),We}return{status:"valid",value:t.data}}}th.create=e=>new th({typeName:qe.ZodNaN,...Je(e)});class Ck extends st{_parse(t){const{ctx:r}=this._processInputParams(t),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}}class pd extends st{_parse(t){const{status:r,ctx:s}=this._processInputParams(t);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?We:a.status==="dirty"?(r.dirty(),fl(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const l=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?We:l.status==="dirty"?(r.dirty(),{status:"dirty",value:l.value}):this._def.out._parseSync({data:l.value,path:s.path,parent:s})}}static create(t,r){return new pd({in:t,out:r,typeName:qe.ZodPipeline})}}class Vu extends st{_parse(t){const r=this._def.innerType._parse(t),s=l=>(ps(l)&&(l.value=Object.freeze(l.value)),l);return eo(r)?r.then(l=>s(l)):s(r)}unwrap(){return this._def.innerType}}Vu.create=(e,t)=>new Vu({innerType:e,typeName:qe.ZodReadonly,...Je(t)});var qe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(qe||(qe={}));const Ne=ai.create,$t=ms.create,go=zu.create;ui.create;const Mt=wr.create,nt=Gt.create;no.create;ro.create;Pi.create;const rn=hs.create;io.create;oi.create;ys.create;const _s=["proposed","backlog","todo","in_progress","pending","done"],md=["decision","external","dependency"],bl=["high","medium","low"],Ag=["human","ai"],Nk=["planned","active","done"],Rg=["en","ja"],jk=5151,nh=Ne().datetime({offset:!0,message:"ISO 8601 (タイムゾーン付き) の文字列で指定する (例: 2026-06-10T10:00:00+09:00)"}),rh=Ne().regex(/^[A-Za-z0-9_]+-\d{3,}$/,"タスク ID は <接頭辞>-<3 桁以上の数字> 形式 (例: TASK-001)"),Li=Ne().min(1).regex(/^[^\r\n]+$/,"1 行で書く (改行不可)"),Ek=nt({id:Ne().min(1),label:Ne().min(1).optional(),type:rn(Ag)}),Tk=nt({id:Ne().min(1),label:Ne().min(1).optional(),hideWhenEmpty:go().optional(),wipLimit:$t().int().positive().optional()}),Ik=nt({id:Ne().min(1),title:Ne().min(1),order:$t().int().default(0),status:rn(Nk).default("planned")}),Dk=nt({name:Ne().min(1),title:Ne().optional(),body:Ne().optional(),labels:Mt(Ne().min(1)).optional(),priority:rn(bl).optional()}).strict(),Ak=nt({name:Ne().min(1),query:Ne().optional(),label:Ne().optional(),assignee:Ne().optional(),statuses:Mt(rn(_s)).optional()}).strict(),Pg=nt({projectName:Ne().min(1).default("project"),idPrefix:Ne().regex(/^[A-Za-z0-9_]+$/,"idPrefix は英数字とアンダースコアのみ").default("TASK"),port:$t().int().min(1).max(65535).default(jk),aiTaskCreation:rn(["free","proposal"]).default("free"),language:rn(Rg).optional(),members:Mt(Ek).min(1).default([{id:"member1",type:"human"},{id:"member2",type:"human"},{id:"claude",type:"ai"},{id:"codex",type:"ai"}]).superRefine((e,t)=>{const r=new Set;for(const s of e)r.has(s.id)&&t.addIssue({code:de.custom,message:`member id が重複しています: ${s.id}`}),r.add(s.id)}),columns:Mt(Tk).min(1).default([{id:"proposed",hideWhenEmpty:!0},{id:"backlog"},{id:"todo"},{id:"in_progress",wipLimit:2},{id:"pending"},{id:"done"}]),instructionTemplate:Ne().default("タスク {id} の内容を {path} で確認し、CLAUDE.md の運用規約に従って実行してください。"),aiConfigPaths:nt({settingsFiles:Mt(Ne()).default([".claude/settings.json",".claude/settings.local.json"]),browseDirs:Mt(Ne()).default([".claude/skills",".claude/rules",".claude/agents"]),rootFiles:Mt(Ne()).default(["CLAUDE.md"])}).default({}),milestones:Mt(Ik).default([]),taskTemplates:Mt(Dk).default([]),savedViews:Mt(Ak).default([]),views:Mt(nt({id:Ne().min(1),hidden:go().optional()})).default([]),docsDirs:Mt(Ne().min(1)).default([]),docsWriteDirs:Mt(Ne().min(1)).default([]),trashKeep:$t().int().positive().optional(),stallThresholds:nt({in_progress:$t().int().positive(),todo:$t().int().positive(),pending:$t().int().positive()}).strict().partial().optional()}),Rk=nt({id:rh,title:Li,status:rn(_s),assignee:Ne().min(1).nullable().default(null),created_by:Ne().min(1),priority:rn(bl).default("medium"),labels:Mt(Ne().min(1)).default([]),blocked_type:rn(md).nullable().default(null),blocked_reason:Ne().min(1).nullable().default(null),depends_on:Mt(rh).default([]),milestone:Ne().min(1).nullable().default(null),related_docs:Mt(Ne().min(1)).optional(),created:nh,updated:nh}).strict().superRefine((e,t)=>{e.status==="pending"&&(e.blocked_type===null&&t.addIssue({code:de.custom,path:["blocked_type"],message:"pending のタスクは blocked_type (decision / external / dependency) が必須"}),e.blocked_reason===null&&t.addIssue({code:de.custom,path:["blocked_reason"],message:"pending のタスクは blocked_reason (誰の・何待ちか) が必須"}))}),Pk=["invalid_task","duplicate_id","unregistered_member","invalid_config","mode_violation"],Lk=nt({kind:rn(Pk),path:Ne(),taskId:Ne().nullable(),message:Ne()}),Mk=nt({frontmatter:Rk,path:Ne(),body:Ne(),raw:Ne(),mtimeMs:$t()});nt({tasks:Mt(Mk),config:Pg,warnings:Mt(Lk)});nt({title:Li,created_by:Ne().min(1),assignee:Ne().min(1).nullable().optional(),priority:rn(bl).optional(),labels:Mt(Ne().min(1)).optional(),body:Ne().optional(),related_docs:Mt(Ne().min(1)).optional()}).strict();nt({status:rn(_s),blocked_type:rn(md).nullable().optional(),blocked_reason:Li.nullable().optional()}).strict().superRefine((e,t)=>{e.status!=="pending"&&(e.blocked_type!=null&&t.addIssue({code:de.custom,path:["blocked_type"],message:"pending 以外への移動では blocked_type を指定しない"}),e.blocked_reason!=null&&t.addIssue({code:de.custom,path:["blocked_reason"],message:"pending 以外への移動では blocked_reason を指定しない"}))});nt({content:Ne().min(1),baseMtimeMs:$t()}).strict();nt({error:Ne(),serverContent:Ne(),serverMtimeMs:$t()});nt({type:rn(["connected","change"])});const Ok=nt({proposed:$t().int().nonnegative(),backlog:$t().int().nonnegative(),todo:$t().int().nonnegative(),in_progress:$t().int().nonnegative(),pending:$t().int().nonnegative(),done:$t().int().nonnegative()}),zk=nt({name:Ne().min(1),dir:Ne().min(1),root:Ne().min(1),statusCounts:Ok,warningCount:$t().int().nonnegative(),wipExceeded:go()}),$k=nt({id:Ne().min(1),title:Ne(),status:rn(["in_progress","pending","proposed"]),assignee:Ne().nullable(),blocked_type:rn(md).nullable(),blocked_reason:Ne().nullable(),project:Ne().min(1)});nt({projects:Mt(zk),attention:Mt($k)});nt({mode:rn(["board","overview"])});nt({reason:Li}).strict();nt({reason:Ne().max(2e3).optional(),baseMtimeMs:$t().optional()}).strict();nt({path:Ne(),content:Ne(),mtimeMs:$t()});nt({path:Ne().min(1),content:Ne(),baseMtimeMs:$t(),scope:rn(["local","global"]).optional()}).strict();nt({path:Ne(),name:Ne().nullable(),description:Ne().nullable()});nt({hash:Ne(),subject:Ne(),authorDate:Ne()});nt({member:Ne().min(1),message:Li}).strict();nt({}).strict();const Bk=nt({id:Ne().min(1),trashedAt:$t().int().nonnegative(),title:Ne().nullable(),status:rn(_s).nullable(),body:Ne()});nt({items:Mt(Bk)});nt({trashedAt:$t().int().nonnegative().optional(),overwrite:go().optional()}).strict();nt({from:Li,to:Li}).strict().refine(e=>e.from!==e.to,{message:"from と to が同じです"});const Lg={"header.live":"Live","header.live.title":"Live updates are active","header.reconnecting":"Reconnecting","header.reconnecting.title":"Reconnecting…","header.addTask":"+ Add task","header.settings":"Settings","header.help":"Keyboard shortcuts (?)","shortcuts.title":"Keyboard shortcuts","shortcuts.palette":"Open the command palette","shortcuts.help":"Show this help","shortcuts.openCard":"Open the focused card","shortcuts.grabCard":"Grab / drop the focused card","shortcuts.moveCard":"Move the grabbed card between columns","shortcuts.close":"Close the dialog / palette","shortcuts.aiInstruction.title":"Onboard your AI agent","shortcuts.aiInstruction.desc":"Copy an instruction that tells your AI agent (Claude etc.) how to take part in this project via AIzuchi.","shortcuts.aiInstruction.copy":"Copy AI instruction","shortcuts.aiInstruction.copied":"Copied","shortcuts.aiInstruction.failed":"Copy failed","banner.close":"Close","board.loading":"Loading…","board.unavailable":"Unable to display the board.","error.view.title":"Something went wrong displaying this view.","error.view.detail":"Try switching tabs or retrying. Your tasks are unaffected — this is only a display error.","error.view.retry":"Retry","board.empty.title":"No tasks yet","board.empty.lead":"Create your first task to get started. You (or your AI agent) manage tasks as plain Markdown files under .kanban/tasks/ — this board is just a view of them.","board.empty.addFirst":"+ Create the first task","board.empty.aiNote":"Working with an AI agent? The conventions are already in your project CLAUDE.md. Copy the prompt below and paste it into your AI session — it will read the rules and file the first task for you.","board.empty.copyInstruction":"Copy AI prompt","board.empty.copied":"Copied","board.empty.copyFailed":"Copy failed","board.empty.aiInstruction":'This project is managed with AIzuchi. Read the "AIzuchi operating conventions" section in CLAUDE.md, then create the first task under .kanban/tasks/ following the frontmatter schema (id = TASK-001, set created / updated to the current time with timezone). Pick a small, concrete first task and put it in the todo column.',"view.home":"Home","view.board":"Board","view.critical":"Critical path","view.milestones":"Milestones","view.digest":"Daily digest","view.files":"AI config","view.stats":"Statistics","view.docs":"Related docs","view.archive":"Archive","view.trash":"Trash","detail.tab.meta":"Meta","meta.priority":"Priority","meta.priority.hint":"Save or discard your edits in the Edit tab before changing the priority.","meta.priority.saveError":"Failed to save the priority","meta.dependsOn":"Depends on","meta.dependsOn.empty":"No dependencies.","meta.dependsOn.add":"+ Add dependency","meta.dependsOn.remove":"Remove dependency {id}","meta.dependsOn.pickerTitle":"Add a dependency","meta.dependsOn.pickerEmpty":"No other tasks to depend on.","meta.dependsOn.saveError":"Failed to save the dependencies","meta.dirtyHint":"Save or discard your edits in the Edit tab before changing meta fields.","meta.conflict":"The task was changed externally, so the update was not applied. The board has been refreshed — please try again.","meta.noChange":"Could not apply the change to this task file (unexpected file format).","detail.tab.docs":"Related docs","docs.empty":"No related docs linked yet.","docs.add":"+ Add a doc","docs.remove":"Remove","docs.broken":"Broken link","docs.pickerTitle":"Add a related doc","docs.pickerEmpty":"No .md files found under docsDirs.","docs.dirtyHint":"Save or discard your edits in the Edit tab before changing related docs.","docs.loadError":"Failed to load the document.","docs.treeError":"Failed to load the document list.","docs.conflict":"The task was changed externally, so the update was not applied. The list has been refreshed — please try again.","docs.noChange":"Could not apply the change to this task file (unexpected file format).","docs.view.treeTitle":"Documents","docs.view.selectPrompt":"Select a document to preview.","docs.view.referencedBy":"Tasks referencing this doc","docs.view.noRefs":"No tasks reference this doc yet.","docsEdit.new":"+ New doc","docsEdit.unsaved":"(unsaved new document)","docsEdit.editAria":"Document source (Markdown)","docsEdit.createTask":"Create task from this doc","docsEdit.delete":"Delete","docsEdit.deleteConfirm":"Delete this document?","docsEdit.deleteYes":"Delete","docsEdit.dirtyConfirm":"You have unsaved changes. Discard and continue?","docsSave.title":"Save new document","docsSave.parent":"Parent folder","docsSave.parentRoot":"(write root)","docsSave.newFolder":"New folder (optional)","docsSave.newFolder.placeholder":"e.g. design","docsSave.fileName":"File name","docsSave.fileName.placeholder":"e.g. spec.md","docsSave.confirm":"Save","files.settings":"Settings files","files.browse":"Browse","files.treeLoadError":"Failed to load the file tree / catalog. Individual file operations still work.","files.catalog":"Catalog","files.rootFiles":"Root files","files.selectPrompt":"Select a file to view or edit.","files.save":"Save","files.saving":"Saving…","files.saved":"Saved (.bak created)","files.saveError":"Failed to save","files.loadError":"Failed to load","files.notFound":"File not found (will be created on save).","files.invalidJson":"Invalid JSON","files.conflict":"Changed externally. Reload before saving.","files.reload":"Reload","files.restartNotice":"Changes take effect from a new AI session; restart any running session.","files.confirmSave.title":"Confirm save","files.confirmSave.intro":"Save the following changes to {file}? (a .bak is created on save)","files.confirmSave.diffAria":"Changes to be saved","files.confirmSave.confirm":"Save","files.confirmSave.cancel":"Cancel","files.catalogEmpty":"No skills / agents found.","files.globalCatalog":"Global (skills / agents)","files.globalCatalogEmpty":"No global skills / agents in ~/.claude.","files.globalBadge":"🌐 Global (~/.claude)","files.globalWarn":"This is a GLOBAL config (~/.claude). Saving affects ALL projects, not just this one.","files.noName":"(no name)","search.placeholder":"Search (title / labels / assignee)…","search.label":"Label","search.assignee":"Assignee","search.all":"All","archive.action":"Archive","archive.archiveDone":"Archive all Done","archive.confirm":"Archive {n} done task(s)?","archive.error":"Failed to archive","archive.view.listTitle":"Archived tasks","archive.view.searchPlaceholder":"Search (title / ID / labels / assignee / body)…","archive.view.empty":"No archived tasks yet.","archive.view.noMatch":"No archived tasks match your search.","archive.view.noMonth":"(no month)","archive.view.loadError":"Failed to load the archive.","archive.view.selectPrompt":"Select an archived task to preview.","archive.view.restore":"Restore to board","archive.view.restoreConfirm":"Restore {id} to the board?","archive.view.restoreError":"Failed to restore the task.","trash.view.listTitle":"Trashed snapshots","trash.view.searchPlaceholder":"Search (ID / title / body)…","trash.view.empty":"Nothing in the trash. Snapshots are saved before destructive edits.","trash.view.noMatch":"No snapshots match your search.","trash.view.loadError":"Failed to load the trash.","trash.view.selectPrompt":"Select a snapshot to preview.","trash.view.trashedAt":"Saved at {time}","trash.view.restore":"Restore to board","trash.view.restoreConfirm":"Restore {id} from this snapshot? (The board file must not already exist.)","trash.view.restoreOverwriteConfirm":"Overwrite the current {id} and restore from this snapshot? (The current version is also moved to the trash.)","trash.view.restoreError":"Failed to restore the snapshot.","trash.view.restoreConflict":"{id} already exists on the board, so it was not restored. Delete or rename it first.","trash.view.diffTitle":"Changes since this snapshot (snapshot → current)","trash.view.diff.add":"+ lines in the current task","trash.view.diff.remove":"- lines from the snapshot","trash.view.noDiff":"This snapshot is identical to the current task.","trash.view.noCurrent":"No task with this ID is on the board, so there is nothing to compare.","trash.view.previewTitle":"Snapshot content","bulkInstruction.select":"Select multiple","bulkInstruction.exit":"Done","bulkInstruction.selectedCount":"{n} selected","bulkInstruction.copy":"Copy combined instruction","bulkInstruction.clear":"Clear selection","bulkInstruction.copied":"Copied","bulkInstruction.copyFailed":"Copy failed","bulkInstruction.hint":"Click cards to select; copy them as one dependency-ordered instruction.","bulkInstruction.wrapper":"Please handle the following {n} task(s) in dependency order (do the earlier ones first).","bulkInstruction.checkbox":"Select {id}","savedView.save":"+ Save as view","savedView.saveHint":"Apply a filter first, then save it as a view.","savedView.namePlaceholder":"View name…","savedView.delete":'Delete view "{name}"',"savedView.saveError":"Failed to save the view","savedView.conflict":"config.json was changed externally, so the view was not saved. The board has been refreshed — please try again.","savedView.palette":"View: {name}","rename.action":"Rename to free ID","rename.error":"Failed to rename","comment.title":"Comments","comment.member":"Commenter","comment.placeholder":"Write a comment (use @member to address)…","comment.send":"Send","comment.empty":"No comments yet.","comment.error":"Failed to add comment","detail.tab.commits":"Commits","commits.empty":"No commits reference this task (or this is not a git repo).","commits.error":"Failed to load commits.","commits.copyHash":"Copy the full commit hash","commits.copied":"Copied","detail.tab.timeline":"Timeline","timeline.empty":"Nothing has happened on this task yet.","timeline.kind.log":"log","timeline.kind.comment":"comment","timeline.kind.commit":"commit","cp.empty":"No incomplete tasks (done tasks are excluded).","cp.level":"Level {n}","cp.dependsOn":"depends on:","cp.criticalPath":"critical path","cp.cycleWarning":"Circular dependency detected: {ids}. Fix depends_on (this chain cannot be ordered).","cp.cycleLevel":"Cycle","cp.copyReorg":"Copy reorganization request","cp.copied":"Copied","cp.copyFailed":"Copy failed","digest.empty":"No work log entries yet.","digest.entries":"{n} entries","digest.days":"Days","stats.empty":"No tasks yet. Statistics will appear once tasks exist.","stats.summary.title":"Overview","stats.summary.total":"Total tasks","stats.summary.done":"Completed","stats.completions.title":"Completions over time","stats.completions.byDay":"By day","stats.completions.byWeek":"By week (Mon)","stats.completions.empty":"No completed tasks yet.","stats.completions.barAria":"{count} completed on {key}","stats.completions.date":"Date","stats.completions.granularity":"Granularity","stats.cycleTime.title":"Cycle time (created → completed)","stats.cycleTime.median":"Median","stats.cycleTime.mean":"Mean","stats.cycleTime.sample":"Sample: {n} task(s)","stats.cycleTime.empty":"Not enough completed tasks to compute cycle time.","stats.days":"{n}d","stats.dwell.title":"Time in current status (approx.)","stats.dwell.note":"Approximation: there is no structured transition log, so this is the time elapsed in the current status only.","stats.dwell.status":"Status","stats.dwell.count":"Tasks","stats.dwell.avg":"Avg","stats.dwell.max":"Max","stats.member.title":"Completions by member","stats.member.name":"Member","stats.member.unassigned":"Unassigned","stats.member.empty":"No completed tasks yet.","stats.bottlenecks.title":"Bottlenecks (longest-pending)","stats.bottlenecks.empty":"No pending tasks.","stats.bottlenecks.task":"Task","stats.bottlenecks.dwell":"Pending for","stats.bottlenecks.type":"Type","stats.bottlenecks.reason":"Reason","stalled.title":"Quiet tasks (stalled)","stalled.note":"Tasks where the time since the last activity (work log / comments) exceeds the per-status threshold (in_progress / todo / pending). Tune them via stallThresholds in config.json (unit: days).","stalled.empty":"No stalled tasks. Everything is moving.","stalled.task":"Task","stalled.status":"Status","stalled.idle":"Idle for","stalled.badge":"Stalled","stalled.cardTitle":"No activity for {n}d (stalled)","stalled.palette":"Jump to stalled task: {id} — {title}","progress.label":"Progress {done}/{total}","newActivity.badge":"New","newActivity.cardTitle":"Changed while you were away (open it to mark as read)","newActivity.markAllRead":"Mark all read ({n})","newActivity.markAllRead.title":"Mark all new activity as read","decisionWaits.badge":"Awaiting decision: {n}","decisionWaits.title":"Tasks awaiting your decision","decisionWaits.empty":"No tasks are awaiting a decision.","decisionWaits.open":"Show tasks awaiting a decision","decisionWaits.assignee":"Assignee","decisionWaits.noReason":"No reason provided","home.lead":"What needs your attention, and what to do next.","home.empty":'No tasks yet — use "+ Add task" above to create your first one.',"home.allClear.title":"All clear","home.allClear.detail":"Nothing is waiting on you, nothing is stalled, and no column is over its WIP limit.","home.next.title":"Next action (critical path)","home.next.empty":"No active tasks — nothing is blocking progress.","home.next.startHere":"Start here","home.next.cycle":"A dependency cycle was detected. Open the Critical path view to resolve it.","home.wip.title":"WIP overflow","home.wip.empty":"No column is over its WIP limit.","home.wip.row":"{label}: {count} / limit {limit}","home.unread.title":"New since you were away","home.unread.empty":"Nothing new.","home.idleDays":"idle {n}d","home.openAria":"Open {id}","milestone.empty":"No milestones defined. Add a milestones[] array to config.json.","milestone.roadmap":"Roadmap","milestone.history":"History","milestone.unassignedTasks":"No milestone","milestone.tasks":"Tasks","milestone.status.planned":"planned","milestone.status.active":"active","milestone.status.done":"done","column.empty":"(no tasks)","column.wipLimit":"WIP limit {limit}","column.wipExceeded":"WIP limit {limit} exceeded","card.unassigned":"Unassigned","card.unregisteredMember":"Unregistered member","card.memberType":"Type: {type}","card.lastUpdated":"Updated {elapsed}","member.human":"human","member.ai":"AI","time.justNow":"just now","time.minutesAgo":"{n}m ago","time.hoursAgo":"{n}h ago","time.daysAgo":"{n}d ago","blocked.decision":"Awaiting decision","blocked.external":"Awaiting external","blocked.dependency":"Awaiting dependency","blocked.decision.option":"decision (waiting on a person)","blocked.external.option":"external (waiting on something external)","blocked.dependency.option":"dependency (waiting on another task)","revise.button":"Request rework","revise.dialog.title":"Request rework","revise.dialog.intro":'Send "{title}" back to Todo.',"revise.dialog.reason":"Reason (optional, multiple lines OK)","revise.dialog.placeholder":"e.g. The error handling does not cover the timeout case — please revisit it.","revise.dialog.confirm":"Send back to Todo","revise.error":"Failed to request rework","revise.conflict":"The task was changed externally, so the rework request was not applied. The board has been refreshed — please try again.","blockedDialog.title":"Reason for putting on hold","blockedDialog.intro":'Moving "{title}" to Pending.',"blockedDialog.type":"Type","blockedDialog.reason":"Reason (who / what you are waiting for, one line)","blockedDialog.reason.placeholder":"e.g. Waiting for RYU to review","blockedDialog.confirm":"Move to Pending","addTask.title":"Add a task","addTask.field.title":"Title (required)","addTask.field.title.placeholder":"e.g. Add validation to the login API","addTask.field.createdBy":"Reporter","addTask.field.assignee":"Assignee (optional)","addTask.field.priority":"Priority","addTask.field.labels":"Labels (optional, comma-separated)","addTask.field.labels.placeholder":"e.g. backend, auth","addTask.field.template":"Template (optional)","addTask.template.none":"(no template)","addTask.field.body":"Body (optional)","addTask.field.body.placeholder":"Task description / acceptance criteria…","addTask.submit":"Create","addTask.submitting":"Creating…","addTask.error":"Failed to create the task","addTask.field.fromDoc":"Linked from doc","palette.title":"Command palette","palette.placeholder":"Search tasks, switch views, create…","palette.empty":"No matching commands.","palette.go":"Go to","palette.addTask":"Add a task","palette.settings":"Open settings","status.proposed":"Proposed","status.backlog":"Backlog","status.todo":"Todo","status.in_progress":"In progress","status.pending":"Pending","status.done":"Done","overview.title":"Cross-project overview (read-only)","overview.projects":"Projects","overview.attention.title":"Attention tasks (in progress / pending / proposed)","overview.attention.empty":"No tasks in progress, pending, or proposed.","overview.col.project":"Project","overview.col.task":"Task","overview.col.status":"Status","overview.col.assignee":"Assignee","overview.col.blocked":"Blocked","overview.warnings":"{n} warning(s)","overview.wipExceeded":"WIP exceeded","overview.loadError":"Failed to load the overview.","mode.connectError":"Could not connect to the AIzuchi server. Check that it is running, then reload.","aiHealth.title":"AI onboarding diagnostics","aiHealth.noAiMembers":"No AI members are registered. Add an AI member (type: ai) to config.json.","aiHealth.allClear":"No issues — all AI members are properly configured.","aiHealth.member":"Member","aiHealth.warnings":"{n} warning(s)","aiHealth.noWarnings":"No issues","aiHealth.kind.invalid_task":"Invalid task file","aiHealth.kind.duplicate_id":"Duplicate task ID","aiHealth.kind.unregistered_member":"Unregistered member reference","aiHealth.kind.invalid_config":"Config error","aiHealth.kind.mode_violation":"Mode violation (proposal)","aiHealth.fix.invalid_task":"Fix the YAML frontmatter in the listed task file(s) so they conform to the schema (required fields, correct enum values).","aiHealth.fix.duplicate_id":'Rename the duplicate task ID using the "Rename to free ID" action in the Warnings banner, or manually change the id field in one of the files.',"aiHealth.fix.unregistered_member":"Add this member ID to config.json members[], or correct the created_by / assignee field in the task file.","aiHealth.fix.invalid_config":"Fix config.json so it parses as valid JSON and all fields conform to the schema. Open it from the AI config tab.","aiHealth.fix.mode_violation":'The AI filed a task outside the proposal workflow. Either approve / reject it via the board, or switch aiTaskCreation to "free" in config.json.',"common.cancel":"Cancel","common.save":"Save","common.saving":"Saving…","common.discard":"Discard changes","common.unset":"(unset)","move.error":"Failed to change the status","detail.aria":"Details of {id}","detail.close":"Close","detail.tab.preview":"Preview","detail.tab.edit":"Edit","detail.tab.split":"Split","detail.tab.log":"Work log","detail.editAria":"Edit the task file","detail.log.empty":"No work log yet.","detail.dirty":"You have unsaved changes","detail.saveError":"Failed to save","detail.copyInstruction":"Copy instruction for AI","detail.copyInstruction.done":"Copied","detail.copyInstruction.failed":"Copy failed","detail.copyInstruction.title":"Copy a ready-to-paste instruction for the AI to your clipboard","conflict.title":"Save conflict","conflict.intro":"This task was changed externally (by an editor or AI) after you started editing. Below is the diff of your edits against the server version (the base).","conflict.diffAria":"Conflict diff","conflict.legend.add":"+ your additions","conflict.legend.remove":"- lines from the server","conflict.reload":"Reload server version (discard edits)","conflict.overwrite":"Overwrite with my changes","warning.summary":"{n} warning(s) (the board keeps showing)","warning.kind.invalid_task":"Invalid task","warning.kind.duplicate_id":"Duplicate ID","warning.kind.unregistered_member":"Unregistered member","warning.kind.invalid_config":"Config error","warning.kind.mode_violation":"Mode violation","proposal.approve":"Approve","proposal.reject":"Reject","proposal.reject.prompt":"Reason for rejection (recorded in the work log)","proposal.approve.error":"Failed to approve","proposal.reject.error":"Failed to reject","settings.title":"Settings","settings.aiTaskCreation":"AI task creation mode","settings.aiTaskCreation.free":"free (AI may create directly)","settings.aiTaskCreation.proposal":"proposal (approval required)","settings.language":"Language","settings.language.en":"English","settings.language.ja":"日本語","settings.projectName":"Project name","settings.idPrefix":"ID prefix","settings.instructionTemplate":"Instruction template ({id} / {path} are expanded)","settings.members":"Members","settings.members.add":"+ Add member","settings.members.idPlaceholder":"ID (slug)","settings.members.labelPlaceholder":"Display name (optional)","settings.members.typePlaceholder":"Type","settings.migrate.title":"These member changes affect existing tasks","settings.migrate.rename":"{from} → {to}: reassign {n} referencing task(s)","settings.migrate.removed":"Removing {id} ({n} referencing task(s)). Reassign to:","settings.migrate.noTransfer":"Do not reassign (tasks will show warnings)","settings.migrate.execute":"Save and apply","settings.migrate.skipped":"Some task files could not be updated: {files}","settings.migrate.swap":"Swapping member IDs in one save is not supported. Save in two steps.","settings.migrate.failed":"Settings were saved, but reassigning task references failed. Save again to retry the rest.","settings.members.duplicate":"Duplicate member IDs: {ids}","settings.columns":"Columns","settings.columns.idPlaceholder":"id (e.g. todo)","settings.columns.labelPlaceholder":"Display name (optional)","settings.columns.wipPlaceholder":"WIP","settings.columns.wipAria":"WIP limit","settings.columns.hideWhenEmpty":"Hide when empty","settings.columns.moveUp":"Move up","settings.columns.moveDown":"Move down","settings.columns.remove":"Remove column","settings.columns.add":"+ Add column","settings.paths.settingsFiles":"AI config: settings files","settings.paths.browseDirs":"AI config: browse directories","settings.paths.rootFiles":"AI config: root files","settings.paths.placeholder":"Path from the project root","settings.paths.remove":"Remove path","settings.paths.add":"+ Add path","settings.docsDirs":"Related docs: read directories (docsDirs)","settings.docsDirs.placeholder":"Relative path from the project root (e.g. _docs)","settings.docsWriteDirs":"Related docs: write directories (docsWriteDirs)","settings.docsWriteDirs.placeholder":"Relative path from the project root (e.g. _docs)","settings.docsWriteDirs.note":"Adding a directory here enables document creation, saving, and deletion within it. Leave empty to disable write access.","settings.views":"Tabs (views)","settings.views.show":"Show","settings.views.moveUp":"Move up","settings.views.moveDown":"Move down","settings.advanced":"Advanced (raw JSON)","settings.advanced.aria":"Advanced settings (raw JSON)","settings.save":"Save","settings.saving":"Saving…","settings.saved":"Saved","settings.error":"Failed to save the settings","settings.reload":"Reload","settings.loadError":"Failed to load the settings","settings.conflict":"config.json was changed externally (by an editor or AI). Close and reopen Settings to reload, then save again."},Fk={"header.live":"ライブ","header.live.title":"ライブ反映が有効です","header.reconnecting":"再接続中","header.reconnecting.title":"再接続中…","header.addTask":"+ タスク追加","header.settings":"設定","header.help":"キーボードショートカット (?)","shortcuts.title":"キーボードショートカット","shortcuts.palette":"コマンドパレットを開く","shortcuts.help":"このヘルプを表示","shortcuts.openCard":"フォーカス中のカードを開く","shortcuts.grabCard":"フォーカス中のカードを掴む / 置く","shortcuts.moveCard":"掴んだカードを列間で移動","shortcuts.close":"ダイアログ / パレットを閉じる","shortcuts.aiInstruction.title":"AI への導入指示","shortcuts.aiInstruction.desc":"AI エージェント (Claude 等) にこのプロジェクトへ AIzuchi 経由で参加してもらうための指示文をコピーします。","shortcuts.aiInstruction.copy":"AI への指示をコピー","shortcuts.aiInstruction.copied":"コピーしました","shortcuts.aiInstruction.failed":"コピーに失敗しました","banner.close":"閉じる","board.loading":"読み込み中…","board.unavailable":"ボードを表示できません。","error.view.title":"このビューの表示中にエラーが発生しました。","error.view.detail":"タブを切り替えるか、再試行してください。タスクには影響しません(表示のみのエラーです)。","error.view.retry":"再試行","board.empty.title":"まだタスクがありません","board.empty.lead":"最初のタスクを起票して始めましょう。タスクは .kanban/tasks/ 配下のプレーンな Markdown ファイルとして、あなた (または AI エージェント) が管理します。このボードはそれを表示しているだけです。","board.empty.addFirst":"+ 最初のタスクを起票","board.empty.aiNote":"AI エージェントと一緒に進めますか? 運用規約はすでにプロジェクトの CLAUDE.md に追記済みです。下のプロンプトをコピーして AI セッションに貼り付ければ、規約を読んで最初のタスクを起票してくれます。","board.empty.copyInstruction":"AI へのプロンプトをコピー","board.empty.copied":"コピーしました","board.empty.copyFailed":"コピーに失敗しました","board.empty.aiInstruction":"このプロジェクトは AIzuchi でタスク管理しています。CLAUDE.md の「AIzuchi 運用規約」セクションを読んでから、.kanban/tasks/ 配下に最初のタスクを frontmatter スキーマに従って起票してください (id = TASK-001、created / updated は現在時刻をタイムゾーン付きで)。小さく具体的な最初のタスクを選び、todo カラムに置いてください。","view.home":"ホーム","view.board":"ボード","view.critical":"クリティカルパス","view.milestones":"マイルストーン","view.digest":"日次ダイジェスト","view.files":"AI 設定","view.stats":"統計","view.docs":"関連資料","view.archive":"アーカイブ","view.trash":"ごみ箱","detail.tab.meta":"メタ","meta.priority":"優先度","meta.priority.hint":"優先度を変更する前に、編集タブの変更を保存または破棄してください。","meta.priority.saveError":"優先度の保存に失敗しました","meta.dependsOn":"依存タスク","meta.dependsOn.empty":"依存タスクはありません。","meta.dependsOn.add":"+ 依存タスクを追加","meta.dependsOn.remove":"依存 {id} を削除","meta.dependsOn.pickerTitle":"依存タスクを追加","meta.dependsOn.pickerEmpty":"依存できる他のタスクがありません。","meta.dependsOn.saveError":"依存タスクの保存に失敗しました","meta.dirtyHint":"メタフィールドを変更する前に、編集タブの変更を保存または破棄してください。","meta.conflict":"外部で変更されたため反映できませんでした。ボードを最新化したので、もう一度操作してください。","meta.noChange":"タスクファイルへ変更を反映できませんでした(想定外のファイル形式です)。","detail.tab.docs":"関連資料","docs.empty":"関連資料はまだありません。","docs.add":"+ 資料を追加","docs.remove":"削除","docs.broken":"リンク切れ","docs.pickerTitle":"関連資料を追加","docs.pickerEmpty":"docsDirs 配下に .md ファイルがありません。","docs.dirtyHint":"編集タブの変更を保存または破棄してから関連資料を変更してください。","docs.loadError":"資料の読み込みに失敗しました。","docs.treeError":"資料一覧の読み込みに失敗しました。","docs.conflict":"外部で変更されたため反映できませんでした。一覧を最新化したので、もう一度操作してください。","docs.noChange":"タスクファイルへ変更を反映できませんでした(想定外のファイル形式です)。","docs.view.treeTitle":"資料","docs.view.selectPrompt":"プレビューする資料を選んでください。","docs.view.referencedBy":"この資料を参照しているタスク","docs.view.noRefs":"この資料を参照しているタスクはまだありません。","docsEdit.new":"+ 新規資料","docsEdit.unsaved":"(未保存の新規資料)","docsEdit.editAria":"資料のソース(Markdown)","docsEdit.createTask":"このファイルから起票","docsEdit.delete":"削除","docsEdit.deleteConfirm":"この資料を削除しますか?","docsEdit.deleteYes":"削除する","docsEdit.dirtyConfirm":"未保存の変更があります。破棄して続けますか?","docsSave.title":"新規資料を保存","docsSave.parent":"親フォルダ","docsSave.parentRoot":"(書込ルート)","docsSave.newFolder":"新規フォルダ(任意)","docsSave.newFolder.placeholder":"例: design","docsSave.fileName":"ファイル名","docsSave.fileName.placeholder":"例: spec.md","docsSave.confirm":"保存","files.settings":"設定ファイル","files.browse":"閲覧","files.treeLoadError":"ファイルツリー / カタログの読み込みに失敗しました。個別ファイルの操作は引き続き可能です。","files.catalog":"カタログ","files.rootFiles":"ルートファイル","files.selectPrompt":"閲覧・編集するファイルを選んでください。","files.save":"保存","files.saving":"保存中…","files.saved":"保存しました (.bak 作成)","files.saveError":"保存に失敗しました","files.loadError":"読み込みに失敗しました","files.notFound":"ファイルがありません (保存時に作成されます)。","files.invalidJson":"不正な JSON","files.conflict":"外部で変更されています。再読み込みしてから保存してください。","files.reload":"再読み込み","files.restartNotice":"変更は新しい AI セッションから有効です。実行中のセッションは再起動が必要です。","files.confirmSave.title":"保存前の確認","files.confirmSave.intro":"{file} に以下の変更を保存します。(保存時に .bak を作成します)","files.confirmSave.diffAria":"保存する変更の差分","files.confirmSave.confirm":"この内容で保存","files.confirmSave.cancel":"キャンセル","files.catalogEmpty":"skill / agent が見つかりません。","files.globalCatalog":"グローバル (skills / agents)","files.globalCatalogEmpty":"~/.claude/skills, agents に skill / agent がありません。","files.globalBadge":"🌐 グローバル (~/.claude)","files.globalWarn":"これはグローバル設定 (~/.claude) です。保存するとこのプロジェクトだけでなく全プロジェクトに影響します。","files.noName":"(名前なし)","search.placeholder":"検索 (タイトル / ラベル / 担当)…","search.label":"ラベル","search.assignee":"担当","search.all":"すべて","archive.action":"アーカイブ","archive.archiveDone":"完了した項目を一括アーカイブする","archive.confirm":"完了したタスク {n} 件をアーカイブしますか?","archive.error":"アーカイブに失敗しました","archive.view.listTitle":"アーカイブ済みタスク","archive.view.searchPlaceholder":"検索 (タイトル / ID / ラベル / 担当 / 本文)…","archive.view.empty":"アーカイブ済みのタスクはまだありません。","archive.view.noMatch":"検索条件に一致するアーカイブはありません。","archive.view.noMonth":"(月なし)","archive.view.loadError":"アーカイブの読み込みに失敗しました。","archive.view.selectPrompt":"プレビューするアーカイブを選んでください。","archive.view.restore":"ボードに戻す","archive.view.restoreConfirm":"{id} をボードに戻しますか?","archive.view.restoreError":"タスクの復元に失敗しました。","trash.view.listTitle":"退避した旧版","trash.view.searchPlaceholder":"検索 (ID / タイトル / 本文)…","trash.view.empty":"ごみ箱は空です。破壊的な編集の直前に旧版が自動退避されます。","trash.view.noMatch":"検索条件に一致する退避はありません。","trash.view.loadError":"ごみ箱の読み込みに失敗しました。","trash.view.selectPrompt":"プレビューする退避を選んでください。","trash.view.trashedAt":"退避日時 {time}","trash.view.restore":"ボードに戻す","trash.view.restoreConfirm":"この退避から {id} を復元しますか? (同じ ID がボードに無いことが前提です)","trash.view.restoreOverwriteConfirm":"現在の {id} を上書きして、この退避から復元しますか? (現行もごみ箱へ退避されます)","trash.view.restoreError":"退避の復元に失敗しました。","trash.view.restoreConflict":"{id} は既にボードに存在するため復元しませんでした。先に削除かリネームしてください。","trash.view.diffTitle":"この退避からの変更 (退避版 → 現行)","trash.view.diff.add":"+ 現行タスクにある行","trash.view.diff.remove":"- 退避版にあった行","trash.view.noDiff":"この退避は現行タスクと同一です。","trash.view.noCurrent":"この ID のタスクはボードに無いため、比較対象がありません。","trash.view.previewTitle":"退避内容","bulkInstruction.select":"複数選択","bulkInstruction.exit":"完了","bulkInstruction.selectedCount":"{n} 件選択中","bulkInstruction.copy":"まとめて指示をコピー","bulkInstruction.clear":"選択解除","bulkInstruction.copied":"コピーしました","bulkInstruction.copyFailed":"コピーに失敗","bulkInstruction.hint":"カードをクリックして選び、依存順の 1 つの指示文としてコピーします。","bulkInstruction.wrapper":"次の {n} 件を依存順に (先行するものから順に) 対応してください。","bulkInstruction.checkbox":"{id} を選択","savedView.save":"+ ビューとして保存","savedView.saveHint":"先に絞り込みを設定してから、ビューとして保存できます。","savedView.namePlaceholder":"ビュー名…","savedView.delete":"ビュー「{name}」を削除","savedView.saveError":"ビューの保存に失敗しました","savedView.conflict":"config.json が外部で変更されたため保存できませんでした。ボードを最新化したので、もう一度操作してください。","savedView.palette":"ビュー: {name}","rename.action":"空き ID にリネーム","rename.error":"リネームに失敗しました","comment.title":"やりとり","comment.member":"投稿者","comment.placeholder":"コメントを書く (@member で宛先指定)…","comment.send":"送信","comment.empty":"コメントはまだありません。","comment.error":"コメントの追加に失敗しました","detail.tab.commits":"コミット","commits.empty":"このタスクを参照しているコミットはありません (または git リポジトリではありません)。","commits.error":"コミットの読み込みに失敗しました。","commits.copyHash":"コミットハッシュ全体をコピー","commits.copied":"コピーしました","detail.tab.timeline":"タイムライン","timeline.empty":"このタスクではまだ何も起きていません。","timeline.kind.log":"作業ログ","timeline.kind.comment":"やりとり","timeline.kind.commit":"コミット","cp.empty":"未完了タスクがありません (done は除外)。","cp.level":"レベル {n}","cp.dependsOn":"依存:","cp.criticalPath":"クリティカルパス","cp.cycleWarning":"循環依存を検出しました: {ids}。depends_on を見直してください (この鎖は順序付けできません)。","cp.cycleLevel":"循環","cp.copyReorg":"再編成指示をコピー","cp.copied":"コピーしました","cp.copyFailed":"コピーに失敗","digest.empty":"作業ログがまだありません。","digest.entries":"{n} 件","digest.days":"日付","stats.empty":"タスクがまだありません。タスクができると統計が表示されます。","stats.summary.title":"概要","stats.summary.total":"タスク総数","stats.summary.done":"完了","stats.completions.title":"完了数の推移","stats.completions.byDay":"日別","stats.completions.byWeek":"週別 (月曜起点)","stats.completions.empty":"完了したタスクがまだありません。","stats.completions.barAria":"{key} に {count} 件完了","stats.completions.date":"日付","stats.completions.granularity":"集計粒度","stats.cycleTime.title":"サイクルタイム (作成 → 完了)","stats.cycleTime.median":"中央値","stats.cycleTime.mean":"平均","stats.cycleTime.sample":"対象: {n} 件","stats.cycleTime.empty":"サイクルタイムを算出できる完了タスクが足りません。","stats.days":"{n} 日","stats.dwell.title":"現ステータスでの滞留時間 (近似)","stats.dwell.note":"近似値: 構造化された遷移ログがないため、現在のステータスでの経過時間のみを示します。","stats.dwell.status":"ステータス","stats.dwell.count":"タスク数","stats.dwell.avg":"平均","stats.dwell.max":"最大","stats.member.title":"メンバー別完了数","stats.member.name":"メンバー","stats.member.unassigned":"未割り当て","stats.member.empty":"完了したタスクがまだありません。","stats.bottlenecks.title":"ボトルネック (滞留の長い保留)","stats.bottlenecks.empty":"保留中のタスクはありません。","stats.bottlenecks.task":"タスク","stats.bottlenecks.dwell":"保留期間","stats.bottlenecks.type":"種別","stats.bottlenecks.reason":"理由","stalled.title":"静かなタスク (停滞)","stalled.note":"最後の活動 (作業ログ・やりとり) からの経過がステータス別の閾値 (in_progress / todo / pending) を超えたタスクです。config.json の stallThresholds で調整できます (単位: 日)。","stalled.empty":"停滞しているタスクはありません。すべて動いています。","stalled.task":"タスク","stalled.status":"ステータス","stalled.idle":"停滞期間","stalled.badge":"停滞","stalled.cardTitle":"{n} 日更新なし (停滞)","stalled.palette":"停滞タスクへジャンプ: {id} — {title}","progress.label":"進捗 {done}/{total}","newActivity.badge":"新着","newActivity.cardTitle":"見ていない間に変わりました (開くと既読になります)","newActivity.markAllRead":"すべて既読 ({n})","newActivity.markAllRead.title":"新着をすべて既読にする","decisionWaits.badge":"判断待ち {n} 件","decisionWaits.title":"あなたの判断待ちのタスク","decisionWaits.empty":"判断待ちのタスクはありません。","decisionWaits.open":"判断待ちのタスクを表示","decisionWaits.assignee":"担当","decisionWaits.noReason":"理由の記載なし","home.lead":"今あなたの注意が必要なこと、そして次にやるべきこと。","home.empty":"まだタスクがありません。上の「+ タスク追加」から最初のタスクを作成してください。","home.allClear.title":"すべて順調","home.allClear.detail":"判断待ち・停滞はなく、WIP 上限を超えた列もありません。","home.next.title":"次の一手(クリティカルパス)","home.next.empty":"未完了タスクはありません(進行を止めているものはなし)。","home.next.startHere":"ここから着手","home.next.cycle":"依存関係に循環があります。クリティカルパスビューで解消してください。","home.wip.title":"WIP 超過","home.wip.empty":"WIP 上限を超えた列はありません。","home.wip.row":"{label}: {count} / 上限 {limit}","home.unread.title":"離席中の新着","home.unread.empty":"新着はありません。","home.idleDays":"{n}日 停滞","home.openAria":"{id} を開く","milestone.empty":"マイルストーンが未定義です。config.json に milestones[] を追加してください。","milestone.roadmap":"予定表","milestone.history":"対応履歴","milestone.unassignedTasks":"マイルストーン未設定","milestone.tasks":"所属タスク","milestone.status.planned":"予定","milestone.status.active":"進行中","milestone.status.done":"完了","column.empty":"(タスクなし)","column.wipLimit":"WIP 上限 {limit}","column.wipExceeded":"WIP 上限 {limit} 超過","card.unassigned":"未割当","card.unregisteredMember":"未登録のメンバー","card.memberType":"種別: {type}","card.lastUpdated":"最終更新 {elapsed}","member.human":"人間","member.ai":"AI","time.justNow":"たった今","time.minutesAgo":"{n}分前","time.hoursAgo":"{n}時間前","time.daysAgo":"{n}日前","blocked.decision":"判断待ち","blocked.external":"外部待ち","blocked.dependency":"依存待ち","blocked.decision.option":"decision(人の判断待ち)","blocked.external.option":"external(外部待ち)","blocked.dependency.option":"dependency(依存タスク待ち)","revise.button":"やり直しを依頼","revise.dialog.title":"やり直しを依頼","revise.dialog.intro":"「{title}」を Todo に差し戻します。","revise.dialog.reason":"理由(任意・複数行可)","revise.dialog.placeholder":"例: エラー処理がタイムアウト時を考慮できていないので見直してください。","revise.dialog.confirm":"Todo へ差し戻す","revise.error":"やり直し依頼に失敗しました","revise.conflict":"外部で変更されたため差し戻しを反映できませんでした。ボードを最新化したので、もう一度操作してください。","blockedDialog.title":"保留にする理由","blockedDialog.intro":"「{title}」を Pending に移動します。","blockedDialog.type":"種別","blockedDialog.reason":"理由(誰の・何待ちか。1 行)","blockedDialog.reason.placeholder":"例: RYU のレビュー待ち","blockedDialog.confirm":"Pending へ移動","addTask.title":"タスクを追加","addTask.field.title":"タイトル(必須)","addTask.field.title.placeholder":"例: ログインAPIのバリデーション追加","addTask.field.createdBy":"起票者","addTask.field.assignee":"担当者(任意)","addTask.field.priority":"優先度","addTask.field.labels":"ラベル(任意・カンマ区切り)","addTask.field.labels.placeholder":"例: backend, auth","addTask.field.template":"テンプレート(任意)","addTask.template.none":"(テンプレートなし)","addTask.field.body":"本文(任意)","addTask.field.body.placeholder":"タスクの説明 / 受け入れ条件など…","addTask.submit":"作成","addTask.submitting":"作成中…","addTask.error":"起票に失敗しました","addTask.field.fromDoc":"起票元の資料","palette.title":"コマンドパレット","palette.placeholder":"タスク検索・ビュー切替・起票…","palette.empty":"一致するコマンドがありません。","palette.go":"移動","palette.addTask":"タスクを追加","palette.settings":"設定を開く","status.proposed":"提案","status.backlog":"バックログ","status.todo":"未着手","status.in_progress":"進行中","status.pending":"保留","status.done":"完了","overview.title":"案件横断ビュー(閲覧専用)","overview.projects":"プロジェクト","overview.attention.title":"注目タスク(進行中 / 保留 / 提案)","overview.attention.empty":"進行中・保留・提案のタスクはありません。","overview.col.project":"案件","overview.col.task":"タスク","overview.col.status":"ステータス","overview.col.assignee":"担当","overview.col.blocked":"ブロック理由","overview.warnings":"警告 {n} 件","overview.wipExceeded":"WIP 超過","overview.loadError":"横断ビューの取得に失敗しました。","mode.connectError":"AIzuchi サーバーに接続できません。起動していることを確認して再読み込みしてください。","aiHealth.title":"AI オンボーディング診断","aiHealth.noAiMembers":"AI メンバーが登録されていません。config.json に type: ai のメンバーを追加してください。","aiHealth.allClear":"問題なし — 全 AI メンバーが正しく設定されています。","aiHealth.member":"メンバー","aiHealth.warnings":"警告 {n} 件","aiHealth.noWarnings":"問題なし","aiHealth.kind.invalid_task":"不正なタスクファイル","aiHealth.kind.duplicate_id":"タスク ID の重複","aiHealth.kind.unregistered_member":"未登録メンバーの参照","aiHealth.kind.invalid_config":"設定エラー","aiHealth.kind.mode_violation":"モード違反(提案制)","aiHealth.fix.invalid_task":"対象タスクの YAML frontmatter をスキーマに合わせて修正してください(必須フィールドの追加・enum 値の修正など)。","aiHealth.fix.duplicate_id":"警告バナーの「空き ID にリネーム」で重複を解消するか、タスクファイルの id フィールドを手動で修正してください。","aiHealth.fix.unregistered_member":"config.json の members[] にこのメンバー ID を追加するか、タスクファイルの created_by / assignee を修正してください。","aiHealth.fix.invalid_config":"config.json を正しい JSON に修正し、全フィールドがスキーマに合致するようにしてください。「AI 設定」タブから開けます。","aiHealth.fix.mode_violation":"AI が提案ワークフロー外でタスクを起票しました。ボードで承認・却下するか、config.json の aiTaskCreation を「free」に変更してください。","common.cancel":"キャンセル","common.save":"保存","common.saving":"保存中…","common.discard":"変更を取り消す","common.unset":"(未設定)","move.error":"ステータス変更に失敗しました","detail.aria":"{id} の詳細","detail.close":"閉じる","detail.tab.preview":"プレビュー","detail.tab.edit":"編集","detail.tab.split":"横並び","detail.tab.log":"作業ログ","detail.editAria":"タスクファイルの編集","detail.log.empty":"作業ログがありません。","detail.dirty":"未保存の変更があります","detail.saveError":"保存に失敗しました","detail.copyInstruction":"AI への指示をコピー","detail.copyInstruction.done":"コピーしました","detail.copyInstruction.failed":"コピーに失敗","detail.copyInstruction.title":"AI に渡せる指示文をクリップボードへコピーします","conflict.title":"保存が競合しました","conflict.intro":"このタスクは、あなたが編集を始めた後に外部(エディタや AI)で変更されています。以下はサーバー側の内容(基準)に対する、あなたの編集の差分です。","conflict.diffAria":"競合の差分","conflict.legend.add":"+ あなたの追加","conflict.legend.remove":"- サーバー側にあった行","conflict.reload":"サーバー側を読み込み直す(編集を破棄)","conflict.overwrite":"自分の内容で上書き","warning.summary":"{n} 件の警告(ボードは表示を継続しています)","warning.kind.invalid_task":"不正なタスク","warning.kind.duplicate_id":"重複 ID","warning.kind.unregistered_member":"未登録メンバー","warning.kind.invalid_config":"設定エラー","warning.kind.mode_violation":"モード違反","proposal.approve":"承認","proposal.reject":"却下","proposal.reject.prompt":"却下理由(作業ログに記録されます)","proposal.approve.error":"承認に失敗しました","proposal.reject.error":"却下に失敗しました","settings.title":"設定","settings.aiTaskCreation":"AI 起票モード","settings.aiTaskCreation.free":"free(AI が直接起票してよい)","settings.aiTaskCreation.proposal":"proposal(承認制)","settings.language":"言語","settings.language.en":"English","settings.language.ja":"日本語","settings.projectName":"プロジェクト名","settings.idPrefix":"ID 接頭辞","settings.instructionTemplate":"指示テンプレート({id} / {path} が展開されます)","settings.members":"メンバー","settings.members.add":"+ メンバー追加","settings.members.idPlaceholder":"ID(スラッグ)","settings.members.labelPlaceholder":"表示名(任意)","settings.members.typePlaceholder":"種別","settings.migrate.title":"このメンバー変更は既存タスクに影響します","settings.migrate.rename":"{from} → {to}: 参照タスク {n} 件を付け替えます","settings.migrate.removed":"{id} を削除します(参照タスク {n} 件)。移譲先:","settings.migrate.noTransfer":"移譲しない(警告表示のまま)","settings.migrate.execute":"保存して実行","settings.migrate.skipped":"一部のタスクを書き換えられませんでした: {files}","settings.migrate.swap":"メンバー ID の入れ替えは 1 回の保存では実行できません。2 回に分けて保存してください。","settings.migrate.failed":"設定は保存済みです。参照の付け替えに失敗しました — もう一度保存すると残りを再実行します。","settings.members.duplicate":"メンバー ID が重複しています: {ids}","settings.columns":"カラム","settings.columns.idPlaceholder":"id (例: todo)","settings.columns.labelPlaceholder":"表示名 (任意)","settings.columns.wipPlaceholder":"WIP","settings.columns.wipAria":"WIP 上限","settings.columns.hideWhenEmpty":"空のとき隠す","settings.columns.moveUp":"上へ","settings.columns.moveDown":"下へ","settings.columns.remove":"カラムを削除","settings.columns.add":"+ カラムを追加","settings.paths.settingsFiles":"AI 設定: 設定ファイル","settings.paths.browseDirs":"AI 設定: 閲覧ディレクトリ","settings.paths.rootFiles":"AI 設定: ルートファイル","settings.paths.placeholder":"プロジェクトルートからのパス","settings.paths.remove":"パスを削除","settings.paths.add":"+ パスを追加","settings.docsDirs":"関連資料: 閲覧ディレクトリ (docsDirs)","settings.docsDirs.placeholder":"プロジェクトルートからの相対パス(例: _docs)","settings.docsWriteDirs":"関連資料: 書込ディレクトリ (docsWriteDirs)","settings.docsWriteDirs.placeholder":"プロジェクトルートからの相対パス(例: _docs)","settings.docsWriteDirs.note":"ここにディレクトリを追加すると、その配下で資料の作成・保存・削除が有効になります。空のままにすると書込を無効にできます。","settings.views":"タブ (ビュー)","settings.views.show":"表示","settings.views.moveUp":"上へ","settings.views.moveDown":"下へ","settings.advanced":"詳細(生 JSON)","settings.advanced.aria":"詳細設定(生 JSON)","settings.save":"保存","settings.saving":"保存中…","settings.saved":"保存しました","settings.error":"設定の保存に失敗しました","settings.reload":"再読み込み","settings.loadError":"設定の読み込みに失敗しました","settings.conflict":"config.json が外部 (エディタや AI) で変更されました。設定を一度閉じて開き直して再読み込みしてから、保存し直してください。"},hd=Rg,Mg="aizuchi.lang",Vk={en:Lg,ja:Fk};function Hk(e,t){return t?e.replace(/\{(\w+)\}/g,(r,s)=>Object.prototype.hasOwnProperty.call(t,s)?String(t[s]):r):e}function Og(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(Mg);return e==="en"||e==="ja"?e:null}catch{return null}}function Uk(){return Og()!==null}const zg=b.createContext(null);function Wk({children:e}){const[t,r]=b.useState(()=>Og()??"en"),s=b.useRef(!1),l=b.useCallback(m=>{r(m),typeof document<"u"&&(document.documentElement.lang=m)},[]),a=b.useCallback(m=>{s.current=!0,r(m);try{typeof localStorage<"u"&&localStorage.setItem(Mg,m)}catch{}typeof document<"u"&&(document.documentElement.lang=m)},[]),c=b.useCallback(()=>s.current||Uk(),[]),u=b.useCallback((m,g)=>{const _=Vk[t][m]??Lg[m]??m;return Hk(_,g)},[t]),p=b.useMemo(()=>({lang:t,setLang:a,applyLang:l,hasUserChoice:c,t:u}),[t,a,l,c,u]);return f.jsx(zg.Provider,{value:p,children:e})}function pt(){const e=b.useContext(zg);if(!e)throw new Error("useI18n は I18nProvider の内側で使ってください");return e}function qk(e,t){switch(t.unit){case"justNow":return e("time.justNow");case"minutes":return e("time.minutesAgo",{n:t.n});case"hours":return e("time.hoursAgo",{n:t.n});case"days":return e("time.daysAgo",{n:t.n})}}const Kk=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");function Zk(e){return Array.from(e.querySelectorAll(Kk)).filter(r=>!r.hasAttribute("disabled")&&r.tabIndex!==-1)}function gd(e,t=!0){b.useEffect(()=>{if(!t)return;const r=e.current;if(!r)return;const s=l=>{if(l.key!=="Tab")return;const a=Zk(r);if(a.length===0){l.preventDefault(),r.focus();return}const c=a[0],u=a[a.length-1],p=document.activeElement;l.shiftKey?(p===c||p===r||!r.contains(p))&&(l.preventDefault(),u.focus()):p===u&&(l.preventDefault(),c.focus())};return r.addEventListener("keydown",s),()=>r.removeEventListener("keydown",s)},[e,t])}const Yk="_overlay_9olz3_1",Qk="_dialog_9olz3_12",Xk="_dialogWide_9olz3_23",Gk="_title_9olz3_27",Jk="_field_9olz3_32",ew="_label_9olz3_39",tw="_input_9olz3_45",nw="_select_9olz3_46",rw="_textarea_9olz3_47",iw="_actions_9olz3_69",sw="_btn_9olz3_76",lw="_btnPrimary_9olz3_88",aw="_btnDanger_9olz3_108",ow="_error_9olz3_114",le={overlay:Yk,dialog:Qk,dialogWide:Xk,title:Gk,field:Jk,label:ew,input:tw,select:nw,textarea:rw,actions:iw,btn:sw,btnPrimary:lw,btnDanger:aw,error:ow};function yd(e,t){return e===t}function Mr({title:e,onClose:t,children:r,wide:s}){const l=b.useRef(null);return gd(l),b.useEffect(()=>{var u;const a=document.activeElement,c=p=>{p.key==="Escape"&&t()};return document.addEventListener("keydown",c),(u=l.current)==null||u.focus(),()=>{var p;document.removeEventListener("keydown",c),(p=a==null?void 0:a.focus)==null||p.call(a)}},[t]),f.jsx("div",{className:le.overlay,onClick:a=>{yd(a.target,a.currentTarget)&&(a.stopPropagation(),t())},children:f.jsxs("div",{ref:l,className:`${le.dialog} ${s?le.dialogWide:""}`,role:"dialog","aria-modal":"true","aria-label":e,tabIndex:-1,children:[f.jsx("h2",{className:le.title,children:e}),r]})})}const ih="aizuchi.createdBy",cw=["high","medium","low"];function uw({members:e,templates:t=[],initialRelatedDocs:r=[],onCancel:s,onSubmit:l}){var J;const{t:a}=pt(),c=typeof localStorage<"u"?localStorage.getItem(ih):null,u=c&&e.some(te=>te.id===c)?c:((J=e[0])==null?void 0:J.id)??"",[p,m]=b.useState(""),[g,y]=b.useState(u),[_,x]=b.useState(""),[k,E]=b.useState("medium"),[R,S]=b.useState(""),[A,T]=b.useState(""),[M,P]=b.useState(-1),[j,V]=b.useState(null),[X,ee]=b.useState(!1),O=te=>{if(P(te),te<0||te>=t.length){m(""),T(""),S(""),E("medium");return}const ye=t[te];m((ye.title??"").replace(/[\r\n]/g,"")),T(ye.body??""),S((ye.labels??[]).join(", ")),E(ye.priority??"medium")},Y=b.useRef(!0);b.useEffect(()=>()=>{Y.current=!1},[]);const ie=p.trim(),ke=ie.length>0&&g.length>0&&!X,se=async()=>{if(ke){ee(!0),V(null);try{const te=R.split(",").map(G=>G.trim()).filter(G=>G.length>0),ye={title:ie,created_by:g,assignee:_||null,priority:k,labels:te,...A.length>0?{body:A}:{},...r.length>0?{related_docs:r}:{}};await l(ye),typeof localStorage<"u"&&localStorage.setItem(ih,g)}catch(te){Y.current&&(V(te instanceof Error?te.message:a("addTask.error")),ee(!1))}}};return f.jsxs(Mr,{title:a("addTask.title"),onClose:s,children:[j&&f.jsx("p",{className:le.error,children:j}),f.jsxs("form",{onSubmit:te=>{te.preventDefault(),se()},children:[t.length>0&&f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-template",children:a("addTask.field.template")}),f.jsxs("select",{id:"new-template",className:le.select,value:M,onChange:te=>O(Number(te.target.value)),children:[f.jsx("option",{value:-1,children:a("addTask.template.none")}),t.map((te,ye)=>f.jsx("option",{value:ye,children:te.name},ye))]})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-title",children:a("addTask.field.title")}),f.jsx("input",{id:"new-title",className:le.input,value:p,onChange:te=>m(te.target.value.replace(/[\r\n]/g,"")),placeholder:a("addTask.field.title.placeholder"),autoFocus:!0})]}),r.length>0&&f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,children:a("addTask.field.fromDoc")}),r.map(te=>f.jsx("p",{className:le.label,children:te},te))]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-created-by",children:a("addTask.field.createdBy")}),f.jsx("select",{id:"new-created-by",className:le.select,value:g,onChange:te=>y(te.target.value),children:e.map(te=>f.jsxs("option",{value:te.id,children:[te.label??te.id,"(",te.type,")"]},te.id))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-assignee",children:a("addTask.field.assignee")}),f.jsxs("select",{id:"new-assignee",className:le.select,value:_,onChange:te=>x(te.target.value),children:[f.jsx("option",{value:"",children:a("card.unassigned")}),e.map(te=>f.jsxs("option",{value:te.id,children:[te.label??te.id,"(",te.type,")"]},te.id))]})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-priority",children:a("addTask.field.priority")}),f.jsx("select",{id:"new-priority",className:le.select,value:k,onChange:te=>E(te.target.value),children:cw.map(te=>f.jsx("option",{value:te,children:te},te))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-labels",children:a("addTask.field.labels")}),f.jsx("input",{id:"new-labels",className:le.input,value:R,onChange:te=>S(te.target.value.replace(/[\r\n]/g,"")),placeholder:a("addTask.field.labels.placeholder")})]}),t.length>0&&f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"new-body",children:a("addTask.field.body")}),f.jsx("textarea",{id:"new-body",className:le.textarea,value:A,onChange:te=>T(te.target.value),placeholder:a("addTask.field.body.placeholder")})]}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:s,children:a("common.cancel")}),f.jsx("button",{type:"submit",className:`${le.btn} ${le.btnPrimary}`,disabled:!ke,children:a(X?"addTask.submitting":"addTask.submit")})]})]})]})}function dw(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const fw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mw={};function sh(e,t){return(mw.jsx?pw:fw).test(e)}const hw=/[ \t\n\f\r]/g;function gw(e){return typeof e=="object"?e.type==="text"?lh(e.value):!1:lh(e)}function lh(e){return e.replace(hw,"")===""}class El{constructor(t,r,s){this.normal=r,this.property=t,s&&(this.space=s)}}El.prototype.normal={};El.prototype.property={};El.prototype.space=void 0;function $g(e,t){const r={},s={};for(const l of e)Object.assign(r,l.property),Object.assign(s,l.normal);return new El(r,s,t)}function Hu(e){return e.toLowerCase()}class Ln{constructor(t,r){this.attribute=r,this.property=t}}Ln.prototype.attribute="";Ln.prototype.booleanish=!1;Ln.prototype.boolean=!1;Ln.prototype.commaOrSpaceSeparated=!1;Ln.prototype.commaSeparated=!1;Ln.prototype.defined=!1;Ln.prototype.mustUseProperty=!1;Ln.prototype.number=!1;Ln.prototype.overloadedBoolean=!1;Ln.prototype.property="";Ln.prototype.spaceSeparated=!1;Ln.prototype.space=void 0;let yw=0;const Ue=Oi(),Xt=Oi(),Uu=Oi(),fe=Oi(),_t=Oi(),Di=Oi(),Hn=Oi();function Oi(){return 2**++yw}const Wu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Xt,commaOrSpaceSeparated:Hn,commaSeparated:Di,number:fe,overloadedBoolean:Uu,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),mu=Object.keys(Wu);class vd extends Ln{constructor(t,r,s,l){let a=-1;if(super(t,r),ah(this,"space",l),typeof s=="number")for(;++a<mu.length;){const c=mu[a];ah(this,mu[a],(s&Wu[c])===Wu[c])}}}vd.prototype.defined=!0;function ah(e,t,r){r&&(e[t]=r)}function ks(e){const t={},r={};for(const[s,l]of Object.entries(e.properties)){const a=new vd(s,e.transform(e.attributes||{},s),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(a.mustUseProperty=!0),t[s]=a,r[Hu(s)]=s,r[Hu(a.attribute)]=s}return new El(t,r,e.space)}const Bg=ks({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:_t,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:fe,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:_t,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:Xt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Fg(e,t){return t in e?e[t]:t}function Vg(e,t){return Fg(e,t.toLowerCase())}const vw=ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Di,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alpha:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:_t,autoFocus:Ue,autoPlay:Ue,blocking:_t,capture:null,charSet:null,checked:Ue,cite:null,className:_t,closedBy:null,colorSpace:null,cols:fe,colSpan:fe,command:null,commandFor:null,content:null,contentEditable:Xt,controls:Ue,controlsList:_t,coords:fe|Di,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Uu,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:_t,height:fe,hidden:Uu,high:fe,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:_t,itemRef:_t,itemScope:Ue,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:fe,pattern:null,ping:_t,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:_t,required:Ue,reversed:Ue,rows:fe,rowSpan:fe,sandbox:_t,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootCustomElementRegistry:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shadowRootSerializable:Ue,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Xt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ue,disablePictureInPicture:Ue,disableRemotePlayback:Ue,exportParts:Di,part:_t,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Vg}),xw=ks({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:Hn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:_t,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:Di,g2:Di,glyphName:Di,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Fg}),Hg=ks({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()}}),Ug=ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Vg}),Wg=ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_w={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"},kw=/[A-Z]/g,oh=/-[a-z]/g,ww=/^data[-\w.:]+$/i;function bw(e,t){const r=Hu(t);let s=t,l=Ln;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ww.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(oh,Cw);s="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!oh.test(a)){let c=a.replace(kw,Sw);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=vd}return new l(s,t)}function Sw(e){return"-"+e.toLowerCase()}function Cw(e){return e.charAt(1).toUpperCase()}const Nw=$g([Bg,vw,Hg,Ug,Wg],"html"),xd=$g([Bg,xw,Hg,Ug,Wg],"svg");function jw(e){return e.join(" ").trim()}var ls={},hu,ch;function Ew(){if(ch)return hu;ch=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,p=`
41
- `,m="/",g="*",y="",_="comment",x="declaration";function k(R,S){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];S=S||{};var A=1,T=1;function M(se){var J=se.match(t);J&&(A+=J.length);var te=se.lastIndexOf(p);T=~te?se.length-te:T+se.length}function P(){var se={line:A,column:T};return function(J){return J.position=new j(se),ee(),J}}function j(se){this.start=se,this.end={line:A,column:T},this.source=S.source}j.prototype.content=R;function V(se){var J=new Error(S.source+":"+A+":"+T+": "+se);if(J.reason=se,J.filename=S.source,J.line=A,J.column=T,J.source=R,!S.silent)throw J}function X(se){var J=se.exec(R);if(J){var te=J[0];return M(te),R=R.slice(te.length),J}}function ee(){X(r)}function O(se){var J;for(se=se||[];J=Y();)J!==!1&&se.push(J);return se}function Y(){var se=P();if(!(m!=R.charAt(0)||g!=R.charAt(1))){for(var J=2;y!=R.charAt(J)&&(g!=R.charAt(J)||m!=R.charAt(J+1));)++J;if(J+=2,y===R.charAt(J-1))return V("End of comment missing");var te=R.slice(2,J-2);return T+=2,M(te),R=R.slice(J),T+=2,se({type:_,comment:te})}}function ie(){var se=P(),J=X(s);if(J){if(Y(),!X(l))return V("property missing ':'");var te=X(a),ye=se({type:x,property:E(J[0].replace(e,y)),value:te?E(te[0].replace(e,y)):y});return X(c),ye}}function ke(){var se=[];O(se);for(var J;J=ie();)J!==!1&&(se.push(J),O(se));return se}return ee(),ke()}function E(R){return R?R.replace(u,y):y}return hu=k,hu}var uh;function Tw(){if(uh)return ls;uh=1;var e=ls&&ls.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=r;const t=e(Ew());function r(s,l){let a=null;if(!s||typeof s!="string")return a;const c=(0,t.default)(s),u=typeof l=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:g}=p;u?l(m,g,p):g&&(a=a||{},a[m]=g)}),a}return ls}var al={},dh;function Iw(){if(dh)return al;dh=1,Object.defineProperty(al,"__esModule",{value:!0}),al.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(m){return!m||r.test(m)||e.test(m)},c=function(m,g){return g.toUpperCase()},u=function(m,g){return"".concat(g,"-")},p=function(m,g){return g===void 0&&(g={}),a(m)?m:(m=m.toLowerCase(),g.reactCompat?m=m.replace(l,u):m=m.replace(s,u),m.replace(t,c))};return al.camelCase=p,al}var ol,fh;function Dw(){if(fh)return ol;fh=1;var e=ol&&ol.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(Tw()),r=Iw();function s(l,a){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(u,p){u&&p&&(c[(0,r.camelCase)(u,a)]=p)}),c}return s.default=s,ol=s,ol}var Aw=Dw();const Rw=cd(Aw),qg=Kg("end"),_d=Kg("start");function Kg(e){return t;function t(r){const s=r&&r.position&&r.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function Pw(e){const t=_d(e),r=qg(e);if(t&&r)return{start:t,end:r}}function ml(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ph(e.position):"start"in e||"end"in e?ph(e):"line"in e||"column"in e?qu(e):""}function qu(e){return mh(e&&e.line)+":"+mh(e&&e.column)}function ph(e){return qu(e&&e.start)+"-"+qu(e&&e.end)}function mh(e){return e&&typeof e=="number"?e:1}class Sn extends Error{constructor(t,r,s){super(),typeof r=="string"&&(s=r,r=void 0);let l="",a={},c=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?l=t:!a.cause&&t&&(c=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof s=="string"){const p=s.indexOf(":");p===-1?a.ruleId=s:(a.source=s.slice(0,p),a.ruleId=s.slice(p+1))}if(!a.place&&a.ancestors&&a.ancestors){const p=a.ancestors[a.ancestors.length-1];p&&(a.place=p.position)}const u=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=u?u.line:void 0,this.name=ml(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=c&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Sn.prototype.file="";Sn.prototype.name="";Sn.prototype.reason="";Sn.prototype.message="";Sn.prototype.stack="";Sn.prototype.column=void 0;Sn.prototype.line=void 0;Sn.prototype.ancestors=void 0;Sn.prototype.cause=void 0;Sn.prototype.fatal=void 0;Sn.prototype.place=void 0;Sn.prototype.ruleId=void 0;Sn.prototype.source=void 0;const kd={}.hasOwnProperty,Lw=new Map,Mw=/[A-Z]/g,Ow=new Set(["table","tbody","thead","tfoot","tr"]),zw=new Set(["td","th"]),Zg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $w(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=Kw(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=qw(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?xd:Nw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Yg(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function Yg(e,t,r){if(t.type==="element")return Bw(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fw(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hw(e,t,r);if(t.type==="mdxjsEsm")return Vw(e,t);if(t.type==="root")return Uw(e,t,r);if(t.type==="text")return Ww(e,t)}function Bw(e,t,r){const s=e.schema;let l=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(l=xd,e.schema=l),e.ancestors.push(t);const a=Xg(e,t.tagName,!1),c=Zw(e,t);let u=bd(e,t);return Ow.has(t.tagName)&&(u=u.filter(function(p){return typeof p=="string"?!gw(p):!0})),Qg(e,c,a,t),wd(c,u),e.ancestors.pop(),e.schema=s,e.create(t,a,c,r)}function Fw(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Sl(e,t.position)}function Vw(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sl(e,t.position)}function Hw(e,t,r){const s=e.schema;let l=s;t.name==="svg"&&s.space==="html"&&(l=xd,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:Xg(e,t.name,!0),c=Yw(e,t),u=bd(e,t);return Qg(e,c,a,t),wd(c,u),e.ancestors.pop(),e.schema=s,e.create(t,a,c,r)}function Uw(e,t,r){const s={};return wd(s,bd(e,t)),e.create(t,e.Fragment,s,r)}function Ww(e,t){return t.value}function Qg(e,t,r,s){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=s)}function wd(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function qw(e,t,r){return s;function s(l,a,c,u){const m=Array.isArray(c.children)?r:t;return u?m(a,c,u):m(a,c)}}function Kw(e,t){return r;function r(s,l,a,c){const u=Array.isArray(a.children),p=_d(s);return t(l,a,c,u,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function Zw(e,t){const r={};let s,l;for(l in t.properties)if(l!=="children"&&kd.call(t.properties,l)){const a=Qw(e,l,t.properties[l]);if(a){const[c,u]=a;e.tableCellAlignToStyle&&c==="align"&&typeof u=="string"&&zw.has(t.tagName)?s=u:r[c]=u}}if(s){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return r}function Yw(e,t){const r={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const a=s.data.estree.body[0];a.type;const c=a.expression;c.type;const u=c.properties[0];u.type,Object.assign(r,e.evaluater.evaluateExpression(u.argument))}else Sl(e,t.position);else{const l=s.name;let a;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const u=s.value.data.estree.body[0];u.type,a=e.evaluater.evaluateExpression(u.expression)}else Sl(e,t.position);else a=s.value===null?!0:s.value;r[l]=a}return r}function bd(e,t){const r=[];let s=-1;const l=e.passKeys?new Map:Lw;for(;++s<t.children.length;){const a=t.children[s];let c;if(e.passKeys){const p=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(p){const m=l.get(p)||0;c=p+"-"+m,l.set(p,m+1)}}const u=Yg(e,a,c);u!==void 0&&r.push(u)}return r}function Qw(e,t,r){const s=bw(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=s.commaSeparated?dw(r):jw(r)),s.property==="style"){let l=typeof r=="object"?r:Xw(e,String(r));return e.stylePropertyNameCase==="css"&&(l=Gw(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&s.space?_w[s.property]||s.property:s.attribute,r]}}function Xw(e,t){try{return Rw(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const s=r,l=new Sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Zg+"#cannot-parse-style-attribute",l}}function Xg(e,t,r){let s;if(!r)s={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,c;for(;++a<l.length;){const u=sh(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};c=c?{type:"MemberExpression",object:c,property:u,computed:!!(a&&u.type==="Literal"),optional:!1}:u}s=c}else s=sh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const l=s.value;return kd.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(s);Sl(e)}function Sl(e,t){const r=new Sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Zg+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Gw(e){const t={};let r;for(r in e)kd.call(e,r)&&(t[Jw(r)]=e[r]);return t}function Jw(e){let t=e.replace(Mw,eb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function eb(e){return"-"+e.toLowerCase()}const gu={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"]},tb={};function Sd(e,t){const r=tb,s=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Gg(e,s,l)}function Gg(e,t,r){if(nb(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return hh(e.children,t,r)}return Array.isArray(e)?hh(e,t,r):""}function hh(e,t,r){const s=[];let l=-1;for(;++l<e.length;)s[l]=Gg(e[l],t,r);return s.join("")}function nb(e){return!!(e&&typeof e=="object")}const gh=document.createElement("i");function Cd(e){const t="&"+e+";";gh.innerHTML=t;const r=gh.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Wn(e,t,r,s){const l=e.length;let a=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,s.length<1e4)c=Array.from(s),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);a<s.length;)c=s.slice(a,a+1e4),c.unshift(t,0),e.splice(...c),a+=1e4,t+=1e4}function nr(e,t){return e.length>0?(Wn(e,e.length,0,t),e):t}const yh={}.hasOwnProperty;function Jg(e){const t={};let r=-1;for(;++r<e.length;)rb(t,e[r]);return t}function rb(e,t){let r;for(r in t){const l=(yh.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let c;if(a)for(c in a){yh.call(l,c)||(l[c]=[]);const u=a[c];ib(l[c],Array.isArray(u)?u:u?[u]:[])}}}function ib(e,t){let r=-1;const s=[];for(;++r<t.length;)(t[r].add==="after"?e:s).push(t[r]);Wn(e,0,0,s)}function ey(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jn=fi(/[A-Za-z]/),bn=fi(/[\dA-Za-z]/),sb=fi(/[#-'*+\--9=?A-Z^-~]/);function so(e){return e!==null&&(e<32||e===127)}const Ku=fi(/\d/),lb=fi(/[\dA-Fa-f]/),ab=fi(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function kt(e){return e!==null&&(e<0||e===32)}function et(e){return e===-2||e===-1||e===32}const yo=fi(new RegExp("\\p{P}|\\p{S}","u")),Mi=fi(/\s/);function fi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ws(e){const t=[];let r=-1,s=0,l=0;for(;++r<e.length;){const a=e.charCodeAt(r);let c="";if(a===37&&bn(e.charCodeAt(r+1))&&bn(e.charCodeAt(r+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(c=String.fromCharCode(a));else if(a>55295&&a<57344){const u=e.charCodeAt(r+1);a<56320&&u>56319&&u<57344?(c=String.fromCharCode(a,u),l=1):c="�"}else c=String.fromCharCode(a);c&&(t.push(e.slice(s,r),encodeURIComponent(c)),s=r+l+1,c=""),l&&(r+=l,l=0)}return t.join("")+e.slice(s)}function rt(e,t,r,s){const l=s?s-1:Number.POSITIVE_INFINITY;let a=0;return c;function c(p){return et(p)?(e.enter(r),u(p)):t(p)}function u(p){return et(p)&&a++<l?(e.consume(p),u):(e.exit(r),t(p))}}const ob={tokenize:cb};function cb(e){const t=e.attempt(this.parser.constructs.contentInitial,s,l);let r;return t;function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),rt(e,t,"linePrefix")}function l(u){return e.enter("paragraph"),a(u)}function a(u){const p=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=p),r=p,c(u)}function c(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Be(u)?(e.consume(u),e.exit("chunkText"),a):(e.consume(u),c)}}const ub={tokenize:db},vh={tokenize:fb};function db(e){const t=this,r=[];let s=0,l,a,c;return u;function u(T){if(s<r.length){const M=r[s];return t.containerState=M[1],e.attempt(M[0].continuation,p,m)(T)}return m(T)}function p(T){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&A();const M=t.events.length;let P=M,j;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){j=t.events[P][1].end;break}S(s);let V=M;for(;V<t.events.length;)t.events[V][1].end={...j},V++;return Wn(t.events,P+1,0,t.events.slice(M)),t.events.length=V,m(T)}return u(T)}function m(T){if(s===r.length){if(!l)return _(T);if(l.currentConstruct&&l.currentConstruct.concrete)return k(T);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vh,g,y)(T)}function g(T){return l&&A(),S(s),_(T)}function y(T){return t.parser.lazy[t.now().line]=s!==r.length,c=t.now().offset,k(T)}function _(T){return t.containerState={},e.attempt(vh,x,k)(T)}function x(T){return s++,r.push([t.currentConstruct,t.containerState]),_(T)}function k(T){if(T===null){l&&A(),S(0),e.consume(T);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),E(T)}function E(T){if(T===null){R(e.exit("chunkFlow"),!0),S(0),e.consume(T);return}return Be(T)?(e.consume(T),R(e.exit("chunkFlow")),s=0,t.interrupt=void 0,u):(e.consume(T),E)}function R(T,M){const P=t.sliceStream(T);if(M&&P.push(null),T.previous=a,a&&(a.next=T),a=T,l.defineSkip(T.start),l.write(P),t.parser.lazy[T.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const V=t.events.length;let X=V,ee,O;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){if(ee){O=t.events[X][1].end;break}ee=!0}for(S(s),j=V;j<t.events.length;)t.events[j][1].end={...O},j++;Wn(t.events,X+1,0,t.events.slice(V)),t.events.length=j}}function S(T){let M=r.length;for(;M-- >T;){const P=r[M];t.containerState=P[1],P[0].exit.call(t,e)}r.length=T}function A(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function fb(e,t,r){return rt(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vs(e){if(e===null||kt(e)||Mi(e))return 1;if(yo(e))return 2}function vo(e,t,r){const s=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!s.includes(a)&&(t=a(t,r),s.push(a))}return t}const Zu={name:"attention",resolveAll:pb,tokenize:mb};function pb(e,t){let r=-1,s,l,a,c,u,p,m,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(s=r;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[s][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;p=e[s][1].end.offset-e[s][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[s][1].end},_={...e[r][1].start};xh(y,-p),xh(_,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...e[s][1].end}},u={type:p>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:_},a={type:p>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[r][1].start}},l={type:p>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[s][1].end={...c.start},e[r][1].start={...u.end},m=[],e[s][1].end.offset-e[s][1].start.offset&&(m=nr(m,[["enter",e[s][1],t],["exit",e[s][1],t]])),m=nr(m,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",a,t]]),m=nr(m,vo(t.parser.constructs.insideSpan.null,e.slice(s+1,r),t)),m=nr(m,[["exit",a,t],["enter",u,t],["exit",u,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,m=nr(m,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,Wn(e,s-1,r-s+3,m),r=s+m.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function mb(e,t){const r=this.parser.constructs.attentionMarkers.null,s=this.previous,l=vs(s);let a;return c;function c(p){return a=p,e.enter("attentionSequence"),u(p)}function u(p){if(p===a)return e.consume(p),u;const m=e.exit("attentionSequence"),g=vs(p),y=!g||g===2&&l||r.includes(p),_=!l||l===2&&g||r.includes(s);return m._open=!!(a===42?y:y&&(l||!_)),m._close=!!(a===42?_:_&&(g||!y)),t(p)}}function xh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hb={name:"autolink",tokenize:gb};function gb(e,t,r){let s=0;return l;function l(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(x){return jn(x)?(e.consume(x),c):x===64?r(x):m(x)}function c(x){return x===43||x===45||x===46||bn(x)?(s=1,u(x)):m(x)}function u(x){return x===58?(e.consume(x),s=0,p):(x===43||x===45||x===46||bn(x))&&s++<32?(e.consume(x),u):(s=0,m(x))}function p(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||so(x)?r(x):(e.consume(x),p)}function m(x){return x===64?(e.consume(x),g):sb(x)?(e.consume(x),m):r(x)}function g(x){return bn(x)?y(x):r(x)}function y(x){return x===46?(e.consume(x),s=0,g):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):_(x)}function _(x){if((x===45||bn(x))&&s++<63){const k=x===45?_:y;return e.consume(x),k}return r(x)}}const Tl={partial:!0,tokenize:yb};function yb(e,t,r){return s;function s(a){return et(a)?rt(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||Be(a)?t(a):r(a)}}const ty={continuation:{tokenize:xb},exit:_b,name:"blockQuote",tokenize:vb};function vb(e,t,r){const s=this;return l;function l(c){if(c===62){const u=s.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),a}return r(c)}function a(c){return et(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function xb(e,t,r){const s=this;return l;function l(c){return et(c)?rt(e,a,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):a(c)}function a(c){return e.attempt(ty,t,r)(c)}}function _b(e){e.exit("blockQuote")}const ny={name:"characterEscape",tokenize:kb};function kb(e,t,r){return s;function s(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return ab(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const ry={name:"characterReference",tokenize:wb};function wb(e,t,r){const s=this;let l=0,a,c;return u;function u(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),p}function p(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),a=31,c=bn,g(y))}function m(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,c=lb,g):(e.enter("characterReferenceValue"),a=7,c=Ku,g(y))}function g(y){if(y===59&&l){const _=e.exit("characterReferenceValue");return c===bn&&!Cd(s.sliceSerialize(_))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(y)&&l++<a?(e.consume(y),g):r(y)}}const _h={partial:!0,tokenize:Sb},kh={concrete:!0,name:"codeFenced",tokenize:bb};function bb(e,t,r){const s=this,l={partial:!0,tokenize:P};let a=0,c=0,u;return p;function p(j){return m(j)}function m(j){const V=s.events[s.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,u=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(j)}function g(j){return j===u?(c++,e.consume(j),g):c<3?r(j):(e.exit("codeFencedFenceSequence"),et(j)?rt(e,y,"whitespace")(j):y(j))}function y(j){return j===null||Be(j)?(e.exit("codeFencedFence"),s.interrupt?t(j):e.check(_h,E,M)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(j))}function _(j){return j===null||Be(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):et(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rt(e,x,"whitespace")(j)):j===96&&j===u?r(j):(e.consume(j),_)}function x(j){return j===null||Be(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===null||Be(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===u?r(j):(e.consume(j),k)}function E(j){return e.attempt(l,M,R)(j)}function R(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),S}function S(j){return a>0&&et(j)?rt(e,A,"linePrefix",a+1)(j):A(j)}function A(j){return j===null||Be(j)?e.check(_h,E,M)(j):(e.enter("codeFlowValue"),T(j))}function T(j){return j===null||Be(j)?(e.exit("codeFlowValue"),A(j)):(e.consume(j),T)}function M(j){return e.exit("codeFenced"),t(j)}function P(j,V,X){let ee=0;return O;function O(J){return j.enter("lineEnding"),j.consume(J),j.exit("lineEnding"),Y}function Y(J){return j.enter("codeFencedFence"),et(J)?rt(j,ie,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):ie(J)}function ie(J){return J===u?(j.enter("codeFencedFenceSequence"),ke(J)):X(J)}function ke(J){return J===u?(ee++,j.consume(J),ke):ee>=c?(j.exit("codeFencedFenceSequence"),et(J)?rt(j,se,"whitespace")(J):se(J)):X(J)}function se(J){return J===null||Be(J)?(j.exit("codeFencedFence"),V(J)):X(J)}}}function Sb(e,t,r){const s=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a)}function a(c){return s.parser.lazy[s.now().line]?r(c):t(c)}}const yu={name:"codeIndented",tokenize:Nb},Cb={partial:!0,tokenize:jb};function Nb(e,t,r){const s=this;return l;function l(m){return e.enter("codeIndented"),rt(e,a,"linePrefix",5)(m)}function a(m){const g=s.events[s.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(m):r(m)}function c(m){return m===null?p(m):Be(m)?e.attempt(Cb,c,p)(m):(e.enter("codeFlowValue"),u(m))}function u(m){return m===null||Be(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),u)}function p(m){return e.exit("codeIndented"),t(m)}}function jb(e,t,r){const s=this;return l;function l(c){return s.parser.lazy[s.now().line]?r(c):Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):rt(e,a,"linePrefix",5)(c)}function a(c){const u=s.events[s.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):Be(c)?l(c):r(c)}}const Eb={name:"codeText",previous:Ib,resolve:Tb,tokenize:Db};function Tb(e){let t=e.length-4,r=3,s,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=r;++s<t;)if(e[s][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(s=r-1,t++;++s<=t;)l===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(l=s):(s===t||e[s][1].type==="lineEnding")&&(e[l][1].type="codeTextData",s!==l+2&&(e[l][1].end=e[s-1][1].end,e.splice(l+2,s-l-2),t-=s-l-2,s=l+2),l=void 0);return e}function Ib(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Db(e,t,r){let s=0,l,a;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),u(y)}function u(y){return y===96?(e.consume(y),s++,u):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(a=e.enter("codeTextSequence"),l=0,g(y)):Be(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||Be(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),m)}function g(y){return y===96?(e.consume(y),l++,g):l===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(a.type="codeTextData",m(y))}}class Ab{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const s=r??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,r,s){const l=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return s&&cl(this.left,s),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),cl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),cl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);cl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);cl(this.left,r.reverse())}}}function cl(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function iy(e){const t={};let r=-1,s,l,a,c,u,p,m;const g=new Ab(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(s=g.get(r),r&&s[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(p=s[1]._tokenizer.events,a=0,a<p.length&&p[a][1].type==="lineEndingBlank"&&(a+=2),a<p.length&&p[a][1].type==="content"))for(;++a<p.length&&p[a][1].type!=="content";)p[a][1].type==="chunkText"&&(p[a][1]._isInFirstContentOfListItem=!0,a++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,Rb(g,r)),r=t[r],m=!0);else if(s[1]._container){for(a=r,l=void 0;a--;)if(c=g.get(a),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=a);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(s[1].end={...g.get(l)[1].start},u=g.slice(l,r),u.unshift(s),g.splice(l,r-l+1,u))}}return Wn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!m}function Rb(e,t){const r=e.get(t)[1],s=e.get(t)[2];let l=t-1;const a=[];let c=r._tokenizer;c||(c=s.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const u=c.events,p=[],m={};let g,y,_=-1,x=r,k=0,E=0;const R=[E];for(;x;){for(;e.get(++l)[1]!==x;);a.push(l),x._tokenizer||(g=s.sliceStream(x),x.next||g.push(null),y&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=x,x=x.next}for(x=r;++_<u.length;)u[_][0]==="exit"&&u[_-1][0]==="enter"&&u[_][1].type===u[_-1][1].type&&u[_][1].start.line!==u[_][1].end.line&&(E=_+1,R.push(E),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):R.pop(),_=R.length;_--;){const S=u.slice(R[_],R[_+1]),A=a.pop();p.push([A,A+S.length-1]),e.splice(A,2,S)}for(p.reverse(),_=-1;++_<p.length;)m[k+p[_][0]]=k+p[_][1],k+=p[_][1]-p[_][0]-1;return m}const Pb={resolve:Mb,tokenize:Ob},Lb={partial:!0,tokenize:zb};function Mb(e){return iy(e),e}function Ob(e,t){let r;return s;function s(u){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(u)}function l(u){return u===null?a(u):Be(u)?e.check(Lb,c,a)(u):(e.consume(u),l)}function a(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function c(u){return e.consume(u),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function zb(e,t,r){const s=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),rt(e,a,"linePrefix")}function a(c){if(c===null||Be(c))return r(c);const u=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):e.interrupt(s.parser.constructs.flow,r,t)(c)}}function sy(e,t,r,s,l,a,c,u,p){const m=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(S){return S===60?(e.enter(s),e.enter(l),e.enter(a),e.consume(S),e.exit(a),_):S===null||S===32||S===41||so(S)?r(S):(e.enter(s),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),E(S))}function _(S){return S===62?(e.enter(a),e.consume(S),e.exit(a),e.exit(l),e.exit(s),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===62?(e.exit("chunkString"),e.exit(u),_(S)):S===null||S===60||Be(S)?r(S):(e.consume(S),S===92?k:x)}function k(S){return S===60||S===62||S===92?(e.consume(S),x):x(S)}function E(S){return!g&&(S===null||S===41||kt(S))?(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(s),t(S)):g<m&&S===40?(e.consume(S),g++,E):S===41?(e.consume(S),g--,E):S===null||S===32||S===40||so(S)?r(S):(e.consume(S),S===92?R:E)}function R(S){return S===40||S===41||S===92?(e.consume(S),E):E(S)}}function ly(e,t,r,s,l,a){const c=this;let u=0,p;return m;function m(x){return e.enter(s),e.enter(l),e.consume(x),e.exit(l),e.enter(a),g}function g(x){return u>999||x===null||x===91||x===93&&!p||x===94&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs?r(x):x===93?(e.exit(a),e.enter(l),e.consume(x),e.exit(l),e.exit(s),t):Be(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===null||x===91||x===93||Be(x)||u++>999?(e.exit("chunkString"),g(x)):(e.consume(x),p||(p=!et(x)),x===92?_:y)}function _(x){return x===91||x===92||x===93?(e.consume(x),u++,y):y(x)}}function ay(e,t,r,s,l,a){let c;return u;function u(_){return _===34||_===39||_===40?(e.enter(s),e.enter(l),e.consume(_),e.exit(l),c=_===40?41:_,p):r(_)}function p(_){return _===c?(e.enter(l),e.consume(_),e.exit(l),e.exit(s),t):(e.enter(a),m(_))}function m(_){return _===c?(e.exit(a),p(c)):_===null?r(_):Be(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),rt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(_))}function g(_){return _===c||_===null||Be(_)?(e.exit("chunkString"),m(_)):(e.consume(_),_===92?y:g)}function y(_){return _===c||_===92?(e.consume(_),g):g(_)}}function hl(e,t){let r;return s;function s(l){return Be(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,s):et(l)?rt(e,s,r?"linePrefix":"lineSuffix")(l):t(l)}}const $b={name:"definition",tokenize:Fb},Bb={partial:!0,tokenize:Vb};function Fb(e,t,r){const s=this;let l;return a;function a(x){return e.enter("definition"),c(x)}function c(x){return ly.call(s,e,u,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function u(x){return l=fr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),p):r(x)}function p(x){return kt(x)?hl(e,m)(x):m(x)}function m(x){return sy(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function g(x){return e.attempt(Bb,y,y)(x)}function y(x){return et(x)?rt(e,_,"whitespace")(x):_(x)}function _(x){return x===null||Be(x)?(e.exit("definition"),s.parser.defined.push(l),t(x)):r(x)}}function Vb(e,t,r){return s;function s(u){return kt(u)?hl(e,l)(u):r(u)}function l(u){return ay(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function a(u){return et(u)?rt(e,c,"whitespace")(u):c(u)}function c(u){return u===null||Be(u)?t(u):r(u)}}const Hb={name:"hardBreakEscape",tokenize:Ub};function Ub(e,t,r){return s;function s(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return Be(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const Wb={name:"headingAtx",resolve:qb,tokenize:Kb};function qb(e,t){let r=e.length-2,s=3,l,a;return e[s][1].type==="whitespace"&&(s+=2),r-2>s&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(s===r-1||r-4>s&&e[r-2][1].type==="whitespace")&&(r-=s+1===r?2:4),r>s&&(l={type:"atxHeadingText",start:e[s][1].start,end:e[r][1].end},a={type:"chunkText",start:e[s][1].start,end:e[r][1].end,contentType:"text"},Wn(e,s,r-s+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function Kb(e,t,r){let s=0;return l;function l(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&s++<6?(e.consume(g),c):g===null||kt(g)?(e.exit("atxHeadingSequence"),u(g)):r(g)}function u(g){return g===35?(e.enter("atxHeadingSequence"),p(g)):g===null||Be(g)?(e.exit("atxHeading"),t(g)):et(g)?rt(e,u,"whitespace")(g):(e.enter("atxHeadingText"),m(g))}function p(g){return g===35?(e.consume(g),p):(e.exit("atxHeadingSequence"),u(g))}function m(g){return g===null||g===35||kt(g)?(e.exit("atxHeadingText"),u(g)):(e.consume(g),m)}}const Zb=["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"],wh=["pre","script","style","textarea"],Yb={concrete:!0,name:"htmlFlow",resolveTo:Gb,tokenize:Jb},Qb={partial:!0,tokenize:t1},Xb={partial:!0,tokenize:e1};function Gb(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 Jb(e,t,r){const s=this;let l,a,c,u,p;return m;function m(N){return g(N)}function g(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),y}function y(N){return N===33?(e.consume(N),_):N===47?(e.consume(N),a=!0,E):N===63?(e.consume(N),l=3,s.interrupt?t:C):jn(N)?(e.consume(N),c=String.fromCharCode(N),R):r(N)}function _(N){return N===45?(e.consume(N),l=2,x):N===91?(e.consume(N),l=5,u=0,k):jn(N)?(e.consume(N),l=4,s.interrupt?t:C):r(N)}function x(N){return N===45?(e.consume(N),s.interrupt?t:C):r(N)}function k(N){const we="CDATA[";return N===we.charCodeAt(u++)?(e.consume(N),u===we.length?s.interrupt?t:ie:k):r(N)}function E(N){return jn(N)?(e.consume(N),c=String.fromCharCode(N),R):r(N)}function R(N){if(N===null||N===47||N===62||kt(N)){const we=N===47,Pe=c.toLowerCase();return!we&&!a&&wh.includes(Pe)?(l=1,s.interrupt?t(N):ie(N)):Zb.includes(c.toLowerCase())?(l=6,we?(e.consume(N),S):s.interrupt?t(N):ie(N)):(l=7,s.interrupt&&!s.parser.lazy[s.now().line]?r(N):a?A(N):T(N))}return N===45||bn(N)?(e.consume(N),c+=String.fromCharCode(N),R):r(N)}function S(N){return N===62?(e.consume(N),s.interrupt?t:ie):r(N)}function A(N){return et(N)?(e.consume(N),A):O(N)}function T(N){return N===47?(e.consume(N),O):N===58||N===95||jn(N)?(e.consume(N),M):et(N)?(e.consume(N),T):O(N)}function M(N){return N===45||N===46||N===58||N===95||bn(N)?(e.consume(N),M):P(N)}function P(N){return N===61?(e.consume(N),j):et(N)?(e.consume(N),P):T(N)}function j(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),p=N,V):et(N)?(e.consume(N),j):X(N)}function V(N){return N===p?(e.consume(N),p=null,ee):N===null||Be(N)?r(N):(e.consume(N),V)}function X(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||kt(N)?P(N):(e.consume(N),X)}function ee(N){return N===47||N===62||et(N)?T(N):r(N)}function O(N){return N===62?(e.consume(N),Y):r(N)}function Y(N){return N===null||Be(N)?ie(N):et(N)?(e.consume(N),Y):r(N)}function ie(N){return N===45&&l===2?(e.consume(N),te):N===60&&l===1?(e.consume(N),ye):N===62&&l===4?(e.consume(N),I):N===63&&l===3?(e.consume(N),C):N===93&&l===5?(e.consume(N),me):Be(N)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Qb,H,ke)(N)):N===null||Be(N)?(e.exit("htmlFlowData"),ke(N)):(e.consume(N),ie)}function ke(N){return e.check(Xb,se,H)(N)}function se(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),J}function J(N){return N===null||Be(N)?ke(N):(e.enter("htmlFlowData"),ie(N))}function te(N){return N===45?(e.consume(N),C):ie(N)}function ye(N){return N===47?(e.consume(N),c="",G):ie(N)}function G(N){if(N===62){const we=c.toLowerCase();return wh.includes(we)?(e.consume(N),I):ie(N)}return jn(N)&&c.length<8?(e.consume(N),c+=String.fromCharCode(N),G):ie(N)}function me(N){return N===93?(e.consume(N),C):ie(N)}function C(N){return N===62?(e.consume(N),I):N===45&&l===2?(e.consume(N),C):ie(N)}function I(N){return N===null||Be(N)?(e.exit("htmlFlowData"),H(N)):(e.consume(N),I)}function H(N){return e.exit("htmlFlow"),t(N)}}function e1(e,t,r){const s=this;return l;function l(c){return Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),a):r(c)}function a(c){return s.parser.lazy[s.now().line]?r(c):t(c)}}function t1(e,t,r){return s;function s(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Tl,t,r)}}const n1={name:"htmlText",tokenize:r1};function r1(e,t,r){const s=this;let l,a,c;return u;function u(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),p}function p(C){return C===33?(e.consume(C),m):C===47?(e.consume(C),P):C===63?(e.consume(C),T):jn(C)?(e.consume(C),X):r(C)}function m(C){return C===45?(e.consume(C),g):C===91?(e.consume(C),a=0,k):jn(C)?(e.consume(C),A):r(C)}function g(C){return C===45?(e.consume(C),x):r(C)}function y(C){return C===null?r(C):C===45?(e.consume(C),_):Be(C)?(c=y,ye(C)):(e.consume(C),y)}function _(C){return C===45?(e.consume(C),x):y(C)}function x(C){return C===62?te(C):C===45?_(C):y(C)}function k(C){const I="CDATA[";return C===I.charCodeAt(a++)?(e.consume(C),a===I.length?E:k):r(C)}function E(C){return C===null?r(C):C===93?(e.consume(C),R):Be(C)?(c=E,ye(C)):(e.consume(C),E)}function R(C){return C===93?(e.consume(C),S):E(C)}function S(C){return C===62?te(C):C===93?(e.consume(C),S):E(C)}function A(C){return C===null||C===62?te(C):Be(C)?(c=A,ye(C)):(e.consume(C),A)}function T(C){return C===null?r(C):C===63?(e.consume(C),M):Be(C)?(c=T,ye(C)):(e.consume(C),T)}function M(C){return C===62?te(C):T(C)}function P(C){return jn(C)?(e.consume(C),j):r(C)}function j(C){return C===45||bn(C)?(e.consume(C),j):V(C)}function V(C){return Be(C)?(c=V,ye(C)):et(C)?(e.consume(C),V):te(C)}function X(C){return C===45||bn(C)?(e.consume(C),X):C===47||C===62||kt(C)?ee(C):r(C)}function ee(C){return C===47?(e.consume(C),te):C===58||C===95||jn(C)?(e.consume(C),O):Be(C)?(c=ee,ye(C)):et(C)?(e.consume(C),ee):te(C)}function O(C){return C===45||C===46||C===58||C===95||bn(C)?(e.consume(C),O):Y(C)}function Y(C){return C===61?(e.consume(C),ie):Be(C)?(c=Y,ye(C)):et(C)?(e.consume(C),Y):ee(C)}function ie(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(e.consume(C),l=C,ke):Be(C)?(c=ie,ye(C)):et(C)?(e.consume(C),ie):(e.consume(C),se)}function ke(C){return C===l?(e.consume(C),l=void 0,J):C===null?r(C):Be(C)?(c=ke,ye(C)):(e.consume(C),ke)}function se(C){return C===null||C===34||C===39||C===60||C===61||C===96?r(C):C===47||C===62||kt(C)?ee(C):(e.consume(C),se)}function J(C){return C===47||C===62||kt(C)?ee(C):r(C)}function te(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):r(C)}function ye(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),G}function G(C){return et(C)?rt(e,me,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):me(C)}function me(C){return e.enter("htmlTextData"),c(C)}}const Nd={name:"labelEnd",resolveAll:a1,resolveTo:o1,tokenize:c1},i1={tokenize:u1},s1={tokenize:d1},l1={tokenize:f1};function a1(e){let t=-1;const r=[];for(;++t<e.length;){const s=e[t][1];if(r.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const l=s.type==="labelImage"?4:2;s.type="data",t+=l}}return e.length!==r.length&&Wn(e,0,e.length,r),e}function o1(e,t){let r=e.length,s=0,l,a,c,u;for(;r--;)if(l=e[r][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=r,l.type!=="labelLink")){s=2;break}}else l.type==="labelEnd"&&(c=r);const p={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[a][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[a+s+2][1].end},end:{...e[c-2][1].start}};return u=[["enter",p,t],["enter",m,t]],u=nr(u,e.slice(a+1,a+s+3)),u=nr(u,[["enter",g,t]]),u=nr(u,vo(t.parser.constructs.insideSpan.null,e.slice(a+s+4,c-3),t)),u=nr(u,[["exit",g,t],e[c-2],e[c-1],["exit",m,t]]),u=nr(u,e.slice(c+1)),u=nr(u,[["exit",p,t]]),Wn(e,a,e.length,u),e}function c1(e,t,r){const s=this;let l=s.events.length,a,c;for(;l--;)if((s.events[l][1].type==="labelImage"||s.events[l][1].type==="labelLink")&&!s.events[l][1]._balanced){a=s.events[l][1];break}return u;function u(_){return a?a._inactive?y(_):(c=s.parser.defined.includes(fr(s.sliceSerialize({start:a.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),p):r(_)}function p(_){return _===40?e.attempt(i1,g,c?g:y)(_):_===91?e.attempt(s1,g,c?m:y)(_):c?g(_):y(_)}function m(_){return e.attempt(l1,g,y)(_)}function g(_){return t(_)}function y(_){return a._balanced=!0,r(_)}}function u1(e,t,r){return s;function s(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return kt(y)?hl(e,a)(y):a(y)}function a(y){return y===41?g(y):sy(e,c,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return kt(y)?hl(e,p)(y):g(y)}function u(y){return r(y)}function p(y){return y===34||y===39||y===40?ay(e,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function m(y){return kt(y)?hl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):r(y)}}function d1(e,t,r){const s=this;return l;function l(u){return ly.call(s,e,a,c,"reference","referenceMarker","referenceString")(u)}function a(u){return s.parser.defined.includes(fr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(u):r(u)}function c(u){return r(u)}}function f1(e,t,r){return s;function s(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const p1={name:"labelStartImage",resolveAll:Nd.resolveAll,tokenize:m1};function m1(e,t,r){const s=this;return l;function l(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),c):r(u)}function c(u){return u===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(u):t(u)}}const h1={name:"labelStartLink",resolveAll:Nd.resolveAll,tokenize:g1};function g1(e,t,r){const s=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),a}function a(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?r(c):t(c)}}const vu={name:"lineEnding",tokenize:y1};function y1(e,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),rt(e,t,"linePrefix")}}const Qa={name:"thematicBreak",tokenize:v1};function v1(e,t,r){let s=0,l;return a;function a(m){return e.enter("thematicBreak"),c(m)}function c(m){return l=m,u(m)}function u(m){return m===l?(e.enter("thematicBreakSequence"),p(m)):s>=3&&(m===null||Be(m))?(e.exit("thematicBreak"),t(m)):r(m)}function p(m){return m===l?(e.consume(m),s++,p):(e.exit("thematicBreakSequence"),et(m)?rt(e,u,"whitespace")(m):u(m))}}const Pn={continuation:{tokenize:w1},exit:S1,name:"list",tokenize:k1},x1={partial:!0,tokenize:C1},_1={partial:!0,tokenize:b1};function k1(e,t,r){const s=this,l=s.events[s.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return u;function u(x){const k=s.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!s.containerState.marker||x===s.containerState.marker:Ku(x)){if(s.containerState.type||(s.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Qa,r,m)(x):m(x);if(!s.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return r(x)}function p(x){return Ku(x)&&++c<10?(e.consume(x),p):(!s.interrupt||c<2)&&(s.containerState.marker?x===s.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):r(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||x,e.check(Tl,s.interrupt?r:g,e.attempt(x1,_,y))}function g(x){return s.containerState.initialBlankLine=!0,a++,_(x)}function y(x){return et(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),_):r(x)}function _(x){return s.containerState.size=a+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function w1(e,t,r){const s=this;return s.containerState._closeFlow=void 0,e.check(Tl,l,a);function l(u){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,rt(e,t,"listItemIndent",s.containerState.size+1)(u)}function a(u){return s.containerState.furtherBlankLines||!et(u)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,c(u)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(_1,t,c)(u))}function c(u){return s.containerState._closeFlow=!0,s.interrupt=void 0,rt(e,e.attempt(Pn,t,r),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function b1(e,t,r){const s=this;return rt(e,l,"listItemIndent",s.containerState.size+1);function l(a){const c=s.events[s.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===s.containerState.size?t(a):r(a)}}function S1(e){e.exit(this.containerState.type)}function C1(e,t,r){const s=this;return rt(e,l,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const c=s.events[s.events.length-1];return!et(a)&&c&&c[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const bh={name:"setextUnderline",resolveTo:N1,tokenize:j1};function N1(e,t){let r=e.length,s,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){s=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const c={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",c,t]),e.splice(a+1,0,["exit",e[s][1],t]),e[s][1].end={...e[a][1].end}):e[s][1]=c,e.push(["exit",c,t]),e}function j1(e,t,r){const s=this;let l;return a;function a(m){let g=s.events.length,y;for(;g--;)if(s.events[g][1].type!=="lineEnding"&&s.events[g][1].type!=="linePrefix"&&s.events[g][1].type!=="content"){y=s.events[g][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||y)?(e.enter("setextHeadingLine"),l=m,c(m)):r(m)}function c(m){return e.enter("setextHeadingLineSequence"),u(m)}function u(m){return m===l?(e.consume(m),u):(e.exit("setextHeadingLineSequence"),et(m)?rt(e,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Be(m)?(e.exit("setextHeadingLine"),t(m)):r(m)}}const E1={tokenize:T1};function T1(e){const t=this,r=e.attempt(Tl,s,e.attempt(this.parser.constructs.flowInitial,l,rt(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Pb,l)),"linePrefix")));return r;function s(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const I1={resolveAll:cy()},D1=oy("string"),A1=oy("text");function oy(e){return{resolveAll:cy(e==="text"?R1:void 0),tokenize:t};function t(r){const s=this,l=this.parser.constructs[e],a=r.attempt(l,c,u);return c;function c(g){return m(g)?a(g):u(g)}function u(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),p}function p(g){return m(g)?(r.exit("data"),a(g)):(r.consume(g),p)}function m(g){if(g===null)return!0;const y=l[g];let _=-1;if(y)for(;++_<y.length;){const x=y[_];if(!x.previous||x.previous.call(s,s.previous))return!0}return!1}}}function cy(e){return t;function t(r,s){let l=-1,a;for(;++l<=r.length;)a===void 0?r[l]&&r[l][1].type==="data"&&(a=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==a+2&&(r[a][1].end=r[l-1][1].end,r.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(r,s):r}}function R1(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const s=e[r-1][1],l=t.sliceStream(s);let a=l.length,c=-1,u=0,p;for(;a--;){const m=l[a];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)u++,c--;if(c)break;c=-1}else if(m===-2)p=!0,u++;else if(m!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const m={type:r===e.length||p||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?c:s.start._bufferIndex+c,_index:s.start._index+a,line:s.end.line,column:s.end.column-u,offset:s.end.offset-u},end:{...s.end}};s.end={...m.start},s.start.offset===s.end.offset?Object.assign(s,m):(e.splice(r,0,["enter",m,t],["exit",m,t]),r+=2)}r++}return e}const P1={42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:ty},L1={91:$b},M1={[-2]:yu,[-1]:yu,32:yu},O1={35:Wb,42:Qa,45:[bh,Qa],60:Yb,61:bh,95:Qa,96:kh,126:kh},z1={38:ry,92:ny},$1={[-5]:vu,[-4]:vu,[-3]:vu,33:p1,38:ry,42:Zu,60:[hb,n1],91:h1,92:[Hb,ny],93:Nd,95:Zu,96:Eb},B1={null:[Zu,I1]},F1={null:[42,95]},V1={null:[]},H1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:F1,contentInitial:L1,disable:V1,document:P1,flow:O1,flowInitial:M1,insideSpan:B1,string:z1,text:$1},Symbol.toStringTag,{value:"Module"}));function U1(e,t,r){let s={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},a=[];let c=[],u=[];const p={attempt:V(P),check:V(j),consume:A,enter:T,exit:M,interrupt:V(j,{interrupt:!0})},m={code:null,containerState:{},defineSkip:E,events:[],now:k,parser:e,previous:null,sliceSerialize:_,sliceStream:x,write:y};let g=t.tokenize.call(m,p);return t.resolveAll&&a.push(t),m;function y(Y){return c=nr(c,Y),R(),c[c.length-1]!==null?[]:(X(t,0),m.events=vo(a,m.events,m),m.events)}function _(Y,ie){return q1(x(Y),ie)}function x(Y){return W1(c,Y)}function k(){const{_bufferIndex:Y,_index:ie,line:ke,column:se,offset:J}=s;return{_bufferIndex:Y,_index:ie,line:ke,column:se,offset:J}}function E(Y){l[Y.line]=Y.column,O()}function R(){let Y;for(;s._index<c.length;){const ie=c[s._index];if(typeof ie=="string")for(Y=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===Y&&s._bufferIndex<ie.length;)S(ie.charCodeAt(s._bufferIndex));else S(ie)}}function S(Y){g=g(Y)}function A(Y){Be(Y)?(s.line++,s.column=1,s.offset+=Y===-3?2:1,O()):Y!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===c[s._index].length&&(s._bufferIndex=-1,s._index++)),m.previous=Y}function T(Y,ie){const ke=ie||{};return ke.type=Y,ke.start=k(),m.events.push(["enter",ke,m]),u.push(ke),ke}function M(Y){const ie=u.pop();return ie.end=k(),m.events.push(["exit",ie,m]),ie}function P(Y,ie){X(Y,ie.from)}function j(Y,ie){ie.restore()}function V(Y,ie){return ke;function ke(se,J,te){let ye,G,me,C;return Array.isArray(se)?H(se):"tokenize"in se?H([se]):I(se);function I(xe){return Fe;function Fe(Le){const U=Le!==null&&xe[Le],ce=Le!==null&&xe.null,ut=[...Array.isArray(U)?U:U?[U]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return H(ut)(Le)}}function H(xe){return ye=xe,G=0,xe.length===0?te:N(xe[G])}function N(xe){return Fe;function Fe(Le){return C=ee(),me=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?Pe():xe.tokenize.call(ie?Object.assign(Object.create(m),ie):m,p,we,Pe)(Le)}}function we(xe){return Y(me,C),J}function Pe(xe){return C.restore(),++G<ye.length?N(ye[G]):te}}}function X(Y,ie){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&Wn(m.events,ie,m.events.length-ie,Y.resolve(m.events.slice(ie),m)),Y.resolveTo&&(m.events=Y.resolveTo(m.events,m))}function ee(){const Y=k(),ie=m.previous,ke=m.currentConstruct,se=m.events.length,J=Array.from(u);return{from:se,restore:te};function te(){s=Y,m.previous=ie,m.currentConstruct=ke,m.events.length=se,u=J,O()}}function O(){s.line in l&&s.column<2&&(s.column=l[s.line],s.offset+=l[s.line]-1)}}function W1(e,t){const r=t.start._index,s=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let c;if(r===l)c=[e[r].slice(s,a)];else{if(c=e.slice(r,l),s>-1){const u=c[0];typeof u=="string"?c[0]=u.slice(s):c.shift()}a>0&&c.push(e[l].slice(0,a))}return c}function q1(e,t){let r=-1;const s=[];let l;for(;++r<e.length;){const a=e[r];let c;if(typeof a=="string")c=a;else switch(a){case-5:{c="\r";break}case-4:{c=`
42
- `;break}case-3:{c=`\r
43
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(a)}l=a===-2,s.push(c)}return s.join("")}function K1(e){const s={constructs:Jg([H1,...(e||{}).extensions||[]]),content:l(ob),defined:[],document:l(ub),flow:l(E1),lazy:{},string:l(D1),text:l(A1)};return s;function l(a){return c;function c(u){return U1(s,a,u)}}}function Z1(e){for(;!iy(e););return e}const Sh=/[\0\t\n\r]/g;function Y1(){let e=1,t="",r=!0,s;return l;function l(a,c,u){const p=[];let m,g,y,_,x;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(c||void 0).decode(a)),y=0,t="",r&&(a.charCodeAt(0)===65279&&y++,r=void 0);y<a.length;){if(Sh.lastIndex=y,m=Sh.exec(a),_=m&&m.index!==void 0?m.index:a.length,x=a.charCodeAt(_),!m){t=a.slice(y);break}if(x===10&&y===_&&s)p.push(-3),s=void 0;else switch(s&&(p.push(-5),s=void 0),y<_&&(p.push(a.slice(y,_)),e+=_-y),x){case 0:{p.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,p.push(-2);e++<g;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:s=!0,e=1}y=_+1}return u&&(s&&p.push(-5),t&&p.push(t),p.push(null)),p}}const Q1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function X1(e){return e.replace(Q1,G1)}function G1(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),a=l===120||l===88;return ey(r.slice(a?2:1),a?16:10)}return Cd(r)||e}const uy={}.hasOwnProperty;function J1(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),e0(r)(Z1(K1(r).document().write(Y1()(e,t,!0))))}function e0(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ln),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:a(mt),blockQuote:a(ce),characterEscape:ee,characterReference:ee,codeFenced:a(ut),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:a(ut,c),codeText:a(Bt,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:a(ot),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:a(Nt),hardBreakEscape:a(Ft),hardBreakTrailing:a(Ft),htmlFlow:a(Kt,c),htmlFlowData:ee,htmlText:a(Kt,c),htmlTextData:ee,image:a(sn),label:c,link:a(ln),listItem:a(Et),listItemValue:_,listOrdered:a(jt,y),listUnordered:a(jt),paragraph:a(gn),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:a(mt),strong:a(Vt),thematicBreak:a(be)},exit:{atxHeading:p(),atxHeadingSequence:P,autolink:p(),autolinkEmail:U,autolinkProtocol:Le,blockQuote:p(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:xe,characterReference:Fe,codeFenced:p(R),codeFencedFence:E,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:O,codeIndented:p(S),codeText:p(J),codeTextData:O,data:O,definition:p(),definitionDestinationString:M,definitionLabelString:A,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(ie),hardBreakTrailing:p(ie),htmlFlow:p(ke),htmlFlowData:O,htmlText:p(se),htmlTextData:O,image:p(ye),label:me,labelText:G,lineEnding:Y,link:p(te),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:we,resourceDestinationString:C,resourceTitleString:I,resource:H,setextHeading:p(X),setextHeadingLineSequence:V,setextHeadingText:j,strong:p(),thematicBreak:p()}};dy(t,(e||{}).mdastExtensions||[]);const r={};return s;function s($){let Q={type:"root",children:[]};const q={stack:[Q],tokenStack:[],config:t,enter:u,exit:m,buffer:c,resume:g,data:r},ve=[];let K=-1;for(;++K<$.length;)if($[K][1].type==="listOrdered"||$[K][1].type==="listUnordered")if($[K][0]==="enter")ve.push(K);else{const ne=ve.pop();K=l($,ne,K)}for(K=-1;++K<$.length;){const ne=t[$[K][0]];uy.call(ne,$[K][1].type)&&ne[$[K][1].type].call(Object.assign({sliceSerialize:$[K][2].sliceSerialize},q),$[K][1])}if(q.tokenStack.length>0){const ne=q.tokenStack[q.tokenStack.length-1];(ne[1]||Ch).call(q,void 0,ne[0])}for(Q.position={start:ri($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:ri($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},K=-1;++K<t.transforms.length;)Q=t.transforms[K](Q)||Q;return Q}function l($,Q,q){let ve=Q-1,K=-1,ne=!1,_e,Me,At,Ht;for(;++ve<=q;){const ht=$[ve];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?K++:K--,Ht=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(_e&&!Ht&&!K&&!At&&(At=ve),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!K&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||K===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(_e){let Ut=ve;for(Me=void 0;Ut--;){const Zt=$[Ut];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;Me&&($[Me][1].type="lineEndingBlank",ne=!0),Zt[1].type="lineEnding",Me=Ut}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}At&&(!Me||At<Me)&&(_e._spread=!0),_e.end=Object.assign({},Me?$[Me][1].start:ht[1].end),$.splice(Me||ve,0,["exit",_e,ht[2]]),ve++,q++}if(ht[1].type==="listItemPrefix"){const Ut={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};_e=Ut,$.splice(ve,0,["enter",Ut,ht[2]]),ve++,q++,At=void 0,Ht=!0}}}return $[Q][1]._spread=ne,q}function a($,Q){return q;function q(ve){u.call(this,$(ve),ve),Q&&Q.call(this,ve)}}function c(){this.stack.push({type:"fragment",children:[]})}function u($,Q,q){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([Q,q||void 0]),$.position={start:ri(Q.start),end:void 0}}function p($){return Q;function Q(q){$&&$.call(this,q),m.call(this,q)}}function m($,Q){const q=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==$.type&&(Q?Q.call(this,$,ve[0]):(ve[1]||Ch).call(this,$,ve[0]));else throw new Error("Cannot close `"+$.type+"` ("+ml({start:$.start,end:$.end})+"): it’s not open");q.position.end=ri($.end)}function g(){return Sd(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function _($){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function x(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=$}function k(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=$}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$.replace(/(\r?\n|\r)$/g,"")}function A($){const Q=this.resume(),q=this.stack[this.stack.length-1];q.label=Q,q.identifier=fr(this.sliceSerialize($)).toLowerCase()}function T(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.title=$}function M(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.url=$}function P($){const Q=this.stack[this.stack.length-1];if(!Q.depth){const q=this.sliceSerialize($).length;Q.depth=q}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function V($){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function X(){this.data.setextHeadingSlurpLineEnding=void 0}function ee($){const q=this.stack[this.stack.length-1].children;let ve=q[q.length-1];(!ve||ve.type!=="text")&&(ve=ge(),ve.position={start:ri($.start),end:void 0},q.push(ve)),this.stack.push(ve)}function O($){const Q=this.stack.pop();Q.value+=this.sliceSerialize($),Q.position.end=ri($.end)}function Y($){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const q=Q.children[Q.children.length-1];q.position.end=ri($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(ee.call(this,$),O.call(this,$))}function ie(){this.data.atHardBreak=!0}function ke(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function se(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function J(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.value=$}function te(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Q,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ye(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=Q,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function G($){const Q=this.sliceSerialize($),q=this.stack[this.stack.length-2];q.label=X1(Q),q.identifier=fr(Q).toLowerCase()}function me(){const $=this.stack[this.stack.length-1],Q=this.resume(),q=this.stack[this.stack.length-1];if(this.data.inReference=!0,q.type==="link"){const ve=$.children;q.children=ve}else q.alt=Q}function C(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.url=$}function I(){const $=this.resume(),Q=this.stack[this.stack.length-1];Q.title=$}function H(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function we($){const Q=this.resume(),q=this.stack[this.stack.length-1];q.label=Q,q.identifier=fr(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function Pe($){this.data.characterReferenceType=$.type}function xe($){const Q=this.sliceSerialize($),q=this.data.characterReferenceType;let ve;q?(ve=ey(Q,q==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=Cd(Q);const K=this.stack[this.stack.length-1];K.value+=ve}function Fe($){const Q=this.stack.pop();Q.position.end=ri($.end)}function Le($){O.call(this,$);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize($)}function U($){O.call(this,$);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize($)}function ce(){return{type:"blockquote",children:[]}}function ut(){return{type:"code",lang:null,meta:null,value:""}}function Bt(){return{type:"inlineCode",value:""}}function ot(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Nt(){return{type:"emphasis",children:[]}}function mt(){return{type:"heading",depth:0,children:[]}}function Ft(){return{type:"break"}}function Kt(){return{type:"html",value:""}}function sn(){return{type:"image",title:null,url:"",alt:null}}function ln(){return{type:"link",title:null,url:"",children:[]}}function jt($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Et($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function gn(){return{type:"paragraph",children:[]}}function Vt(){return{type:"strong",children:[]}}function ge(){return{type:"text",value:""}}function be(){return{type:"thematicBreak"}}}function ri(e){return{line:e.line,column:e.column,offset:e.offset}}function dy(e,t){let r=-1;for(;++r<t.length;){const s=t[r];Array.isArray(s)?dy(e,s):t0(e,s)}}function t0(e,t){let r;for(r in t)if(uy.call(t,r))switch(r){case"canContainEols":{const s=t[r];s&&e[r].push(...s);break}case"transforms":{const s=t[r];s&&e[r].push(...s);break}case"enter":case"exit":{const s=t[r];s&&Object.assign(e[r],s);break}}}function Ch(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ml({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ml({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ml({start:t.start,end:t.end})+") is still open")}function n0(e){const t=this;t.parser=r;function r(s){return J1(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function r0(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function i0(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
44
- `}]}function s0(e,t){const r=t.value?t.value+`
45
- `:"",s={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(s.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:s,children:[{type:"text",value:r}]};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 l0(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function a0(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function o0(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),l=ws(s.toLowerCase()),a=e.footnoteOrder.indexOf(s);let c,u=e.footnoteCounts.get(s);u===void 0?(u=0,e.footnoteOrder.push(s),c=e.footnoteOrder.length):c=a+1,u+=1,e.footnoteCounts.set(s,u);const p={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,m),e.applyData(t,m)}function c0(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function u0(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function fy(e,t){const r=t.referenceType;let s="]";if(r==="collapsed"?s+="[]":r==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=s:l.push({type:"text",value:s}),l}function d0(e,t){const r=String(t.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return fy(e,t);const l={src:ws(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function f0(e,t){const r={src:ws(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const s={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,s),e.applyData(t,s)}function p0(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const s={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,s),e.applyData(t,s)}function m0(e,t){const r=String(t.identifier).toUpperCase(),s=e.definitionById.get(r);if(!s)return fy(e,t);const l={href:ws(s.url||"")};s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function h0(e,t){const r={href:ws(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const s={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function g0(e,t,r){const s=e.all(t),l=r?y0(r):py(t),a={},c=[];if(typeof t.checked=="boolean"){const g=s[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},s.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let u=-1;for(;++u<s.length;){const g=s[u];(l||u!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
46
- `}),g.type==="element"&&g.tagName==="p"&&!l?c.push(...g.children):c.push(g)}const p=s[s.length-1];p&&(l||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
47
- `});const m={type:"element",tagName:"li",properties:a,children:c};return e.patch(t,m),e.applyData(t,m)}function y0(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let s=-1;for(;!t&&++s<r.length;)t=py(r[s])}return t}function py(e){const t=e.spread;return t??e.children.length>1}function v0(e,t){const r={},s=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<s.length;){const c=s[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function x0(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _0(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function k0(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function w0(e,t){const r=e.all(t),s=r.shift(),l=[];if(s){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!0)};e.patch(t.children[0],c),l.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},u=_d(t.children[1]),p=qg(t.children[t.children.length-1]);u&&p&&(c.position={start:u,end:p}),l.push(c)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function b0(e,t,r){const s=r?r.children:void 0,a=(s?s.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,u=c?c.length:t.children.length;let p=-1;const m=[];for(;++p<u;){const y=t.children[p],_={},x=c?c[p]:void 0;x&&(_.align=x);let k={type:"element",tagName:a,properties:_,children:[]};y&&(k.children=e.all(y),e.patch(y,k),k=e.applyData(y,k)),m.push(k)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,g),e.applyData(t,g)}function S0(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Nh=9,jh=32;function C0(e){const t=String(e),r=/\r?\n|\r/g;let s=r.exec(t),l=0;const a=[];for(;s;)a.push(Eh(t.slice(l,s.index),l>0,!0),s[0]),l=s.index+s[0].length,s=r.exec(t);return a.push(Eh(t.slice(l),l>0,!1)),a.join("")}function Eh(e,t,r){let s=0,l=e.length;if(t){let a=e.codePointAt(s);for(;a===Nh||a===jh;)s++,a=e.codePointAt(s)}if(r){let a=e.codePointAt(l-1);for(;a===Nh||a===jh;)l--,a=e.codePointAt(l-1)}return l>s?e.slice(s,l):""}function N0(e,t){const r={type:"text",value:C0(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function j0(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const E0={blockquote:r0,break:i0,code:s0,delete:l0,emphasis:a0,footnoteReference:o0,heading:c0,html:u0,imageReference:d0,image:f0,inlineCode:p0,linkReference:m0,link:h0,listItem:g0,list:v0,paragraph:x0,root:_0,strong:k0,table:w0,tableCell:S0,tableRow:b0,text:N0,thematicBreak:j0,toml:Ha,yaml:Ha,definition:Ha,footnoteDefinition:Ha};function Ha(){}const my=-1,xo=0,gl=1,lo=2,jd=3,Ed=4,Td=5,Id=6,hy=7,gy=8,T0=typeof self=="object"?self:globalThis,Th=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new T0[e](t)},I0=(e,t)=>{const r=(l,a)=>(e.set(a,l),l),s=l=>{if(e.has(l))return e.get(l);const[a,c]=t[l];switch(a){case xo:case my:return r(c,l);case gl:{const u=r([],l);for(const p of c)u.push(s(p));return u}case lo:{const u=r({},l);for(const[p,m]of c)u[s(p)]=s(m);return u}case jd:return r(new Date(c),l);case Ed:{const{source:u,flags:p}=c;return r(new RegExp(u,p),l)}case Td:{const u=r(new Map,l);for(const[p,m]of c)u.set(s(p),s(m));return u}case Id:{const u=r(new Set,l);for(const p of c)u.add(s(p));return u}case hy:{const{name:u,message:p}=c;return r(Th(u,p),l)}case gy:return r(BigInt(c),l);case"BigInt":return r(Object(BigInt(c)),l);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:u}=new Uint8Array(c);return r(new DataView(u),c)}}return r(Th(a,c),l)};return s},Ih=e=>I0(new Map,e)(0),as="",{toString:D0}={},{keys:A0}=Object,ul=e=>{const t=typeof e;if(t!=="object"||!e)return[xo,t];const r=D0.call(e).slice(8,-1);switch(r){case"Array":return[gl,as];case"Object":return[lo,as];case"Date":return[jd,as];case"RegExp":return[Ed,as];case"Map":return[Td,as];case"Set":return[Id,as];case"DataView":return[gl,r]}return r.includes("Array")?[gl,r]:r.includes("Error")?[hy,r]:[lo,r]},Ua=([e,t])=>e===xo&&(t==="function"||t==="symbol"),R0=(e,t,r,s)=>{const l=(c,u)=>{const p=s.push(c)-1;return r.set(u,p),p},a=c=>{if(r.has(c))return r.get(c);let[u,p]=ul(c);switch(u){case xo:{let g=c;switch(p){case"bigint":u=gy,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return l([my],c)}return l([u,g],c)}case gl:{if(p){let _=c;return p==="DataView"?_=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(_=new Uint8Array(c)),l([p,[..._]],c)}const g=[],y=l([u,g],c);for(const _ of c)g.push(a(_));return y}case lo:{if(p)switch(p){case"BigInt":return l([p,c.toString()],c);case"Boolean":case"Number":case"String":return l([p,c.valueOf()],c)}if(t&&"toJSON"in c)return a(c.toJSON());const g=[],y=l([u,g],c);for(const _ of A0(c))(e||!Ua(ul(c[_])))&&g.push([a(_),a(c[_])]);return y}case jd:return l([u,c.toISOString()],c);case Ed:{const{source:g,flags:y}=c;return l([u,{source:g,flags:y}],c)}case Td:{const g=[],y=l([u,g],c);for(const[_,x]of c)(e||!(Ua(ul(_))||Ua(ul(x))))&&g.push([a(_),a(x)]);return y}case Id:{const g=[],y=l([u,g],c);for(const _ of c)(e||!Ua(ul(_)))&&g.push(a(_));return y}}const{message:m}=c;return l([u,{name:p,message:m}],c)};return a},Dh=(e,{json:t,lossy:r}={})=>{const s=[];return R0(!(t||r),!!t,new Map,s)(e),s},ao=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ih(Dh(e,t)):structuredClone(e):(e,t)=>Ih(Dh(e,t));function P0(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function L0(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function M0(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||P0,s=e.options.footnoteBackLabel||L0,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let p=-1;for(;++p<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[p]);if(!m)continue;const g=e.all(m),y=String(m.identifier).toUpperCase(),_=ws(y.toLowerCase());let x=0;const k=[],E=e.footnoteCounts.get(y);for(;E!==void 0&&++x<=E;){k.length>0&&k.push({type:"text",value:" "});let A=typeof r=="string"?r:r(p,x);typeof A=="string"&&(A={type:"text",value:A}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+_+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(p,x),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const R=g[g.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const A=R.children[R.children.length-1];A&&A.type==="text"?A.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...k)}else g.push(...k);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+_},children:e.wrap(g,!0)};e.patch(m,S),u.push(S)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ao(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
48
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
49
- `}]}}const _o=(function(e){if(e==null)return B0;if(typeof e=="function")return ko(e);if(typeof e=="object")return Array.isArray(e)?O0(e):z0(e);if(typeof e=="string")return $0(e);throw new Error("Expected function, string, or object as test")});function O0(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=_o(e[r]);return ko(s);function s(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function z0(e){const t=e;return ko(r);function r(s){const l=s;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function $0(e){return ko(t);function t(r){return r&&r.type===e}}function ko(e){return t;function t(r,s,l){return!!(F0(r)&&e.call(this,r,typeof s=="number"?s:void 0,l||void 0))}}function B0(){return!0}function F0(e){return e!==null&&typeof e=="object"&&"type"in e}const yy=[],V0=!0,Yu=!1,H0="skip";function vy(e,t,r,s){let l;typeof t=="function"&&typeof r!="function"?(s=r,r=t):l=t;const a=_o(l),c=s?-1:1;u(e,void 0,[])();function u(p,m,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const x=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return _;function _(){let x=yy,k,E,R;if((!t||a(p,m,g[g.length-1]||void 0))&&(x=U0(r(p,g)),x[0]===Yu))return x;if("children"in p&&p.children){const S=p;if(S.children&&x[0]!==H0)for(E=(s?S.children.length:-1)+c,R=g.concat(S);E>-1&&E<S.children.length;){const A=S.children[E];if(k=u(A,E,R)(),k[0]===Yu)return k;E=typeof k[1]=="number"?k[1]:E+c}}return x}}}function U0(e){return Array.isArray(e)?e:typeof e=="number"?[V0,e]:e==null?yy:[e]}function Dd(e,t,r,s){let l,a,c;typeof t=="function"&&typeof r!="function"?(a=void 0,c=t,l=r):(a=t,c=r,l=s),vy(e,a,u,l);function u(p,m){const g=m[m.length-1],y=g?g.children.indexOf(p):void 0;return c(p,y,g)}}const Qu={}.hasOwnProperty,W0={};function q0(e,t){const r=t||W0,s=new Map,l=new Map,a=new Map,c={...E0,...r.handlers},u={all:m,applyData:Z0,definitionById:s,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:c,one:p,options:r,patch:K0,wrap:Q0};return Dd(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?s:l,_=String(g.identifier).toUpperCase();y.has(_)||y.set(_,g)}}),u;function p(g,y){const _=g.type,x=u.handlers[_];if(Qu.call(u.handlers,_)&&x)return x(u,g,y);if(u.options.passThrough&&u.options.passThrough.includes(_)){if("children"in g){const{children:E,...R}=g,S=ao(R);return S.children=u.all(g),S}return ao(g)}return(u.options.unknownHandler||Y0)(u,g,y)}function m(g){const y=[];if("children"in g){const _=g.children;let x=-1;for(;++x<_.length;){const k=u.one(_[x],g);if(k){if(x&&_[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Ah(k.value)),!Array.isArray(k)&&k.type==="element")){const E=k.children[0];E&&E.type==="text"&&(E.value=Ah(E.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function K0(e,t){e.position&&(t.position=Pw(e))}function Z0(e,t){let r=t;if(e&&e.data){const s=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof s=="string")if(r.type==="element")r.tagName=s;else{const c="children"in r?r.children:[r];r={type:"element",tagName:s,properties:{},children:c}}r.type==="element"&&a&&Object.assign(r.properties,ao(a)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function Y0(e,t){const r=t.data||{},s="value"in t&&!(Qu.call(r,"hProperties")||Qu.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Q0(e,t){const r=[];let s=-1;for(t&&r.push({type:"text",value:`
50
- `});++s<e.length;)s&&r.push({type:"text",value:`
51
- `}),r.push(e[s]);return t&&e.length>0&&r.push({type:"text",value:`
52
- `}),r}function Ah(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Rh(e,t){const r=q0(e,t),s=r.one(e,void 0),l=M0(r),a=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
53
- `},l),a}function X0(e,t){return e&&"run"in e?async function(r,s){const l=Rh(r,{file:s,...t});await e.run(l,s)}:function(r,s){return Rh(r,{file:s,...e||t})}}function Ph(e){if(e)throw e}var xu,Lh;function G0(){if(Lh)return xu;Lh=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},a=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var g=e.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!g&&!y)return!1;var _;for(_ in m);return typeof _>"u"||e.call(m,_)},c=function(m,g){r&&g.name==="__proto__"?r(m,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):m[g.name]=g.newValue},u=function(m,g){if(g==="__proto__")if(e.call(m,g)){if(s)return s(m,g).value}else return;return m[g]};return xu=function p(){var m,g,y,_,x,k,E=arguments[0],R=1,S=arguments.length,A=!1;for(typeof E=="boolean"&&(A=E,E=arguments[1]||{},R=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});R<S;++R)if(m=arguments[R],m!=null)for(g in m)y=u(E,g),_=u(m,g),E!==_&&(A&&_&&(a(_)||(x=l(_)))?(x?(x=!1,k=y&&l(y)?y:[]):k=y&&a(y)?y:{},c(E,{name:g,newValue:p(A,k,_)})):typeof _<"u"&&c(E,{name:g,newValue:_}));return E},xu}var J0=G0();const _u=cd(J0);function Xu(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eS(){const e=[],t={run:r,use:s};return t;function r(...l){let a=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);u(null,...l);function u(p,...m){const g=e[++a];let y=-1;if(p){c(p);return}for(;++y<l.length;)(m[y]===null||m[y]===void 0)&&(m[y]=l[y]);l=m,g?tS(g,u)(...m):c(null,...m)}}function s(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function tS(e,t){let r;return s;function s(...c){const u=e.length>c.length;let p;u&&c.push(l);try{p=e.apply(this,c)}catch(m){const g=m;if(u&&r)throw g;return l(g)}u||(p&&p.then&&typeof p.then=="function"?p.then(a,l):p instanceof Error?l(p):a(p))}function l(c,...u){r||(r=!0,t(c,...u))}function a(c){l(null,c)}}const kr={basename:nS,dirname:rS,extname:iS,join:sS,sep:"/"};function nS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Il(e);let r=0,s=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else s<0&&(a=!0,s=l+1);return s<0?"":e.slice(r,s)}if(t===e)return"";let c=-1,u=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else c<0&&(a=!0,c=l+1),u>-1&&(e.codePointAt(l)===t.codePointAt(u--)?u<0&&(s=l):(u=-1,s=c));return r===s?s=c:s<0&&(s=e.length),e.slice(r,s)}function rS(e){if(Il(e),e.length===0)return".";let t=-1,r=e.length,s;for(;--r;)if(e.codePointAt(r)===47){if(s){t=r;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function iS(e){Il(e);let t=e.length,r=-1,s=0,l=-1,a=0,c;for(;t--;){const u=e.codePointAt(t);if(u===47){if(c){s=t+1;break}continue}r<0&&(c=!0,r=t+1),u===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||r<0||a===0||a===1&&l===r-1&&l===s+1?"":e.slice(l,r)}function sS(...e){let t=-1,r;for(;++t<e.length;)Il(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":lS(r)}function lS(e){Il(e);const t=e.codePointAt(0)===47;let r=aS(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function aS(e,t){let r="",s=0,l=-1,a=0,c=-1,u,p;for(;++c<=e.length;){if(c<e.length)u=e.codePointAt(c);else{if(u===47)break;u=47}if(u===47){if(!(l===c-1||a===1))if(l!==c-1&&a===2){if(r.length<2||s!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",s=0):(r=r.slice(0,p),s=r.length-1-r.lastIndexOf("/")),l=c,a=0;continue}}else if(r.length>0){r="",s=0,l=c,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",s=2)}else r.length>0?r+="/"+e.slice(l+1,c):r=e.slice(l+1,c),s=c-l-1;l=c,a=0}else u===46&&a>-1?a++:a=-1}return r}function Il(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const oS={cwd:cS};function cS(){return"/"}function Gu(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uS(e){if(typeof e=="string")e=new URL(e);else if(!Gu(e)){const t=new 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:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return dS(e)}function dS(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const s=t.codePointAt(r+2);if(s===70||s===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const ku=["history","path","basename","stem","extname","dirname"];class xy{constructor(t){let r;t?Gu(t)?r={path:t}:typeof t=="string"||fS(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":oS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<ku.length;){const a=ku[s];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let l;for(l in r)ku.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?kr.basename(this.path):void 0}set basename(t){bu(t,"basename"),wu(t,"basename"),this.path=kr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?kr.dirname(this.path):void 0}set dirname(t){Mh(this.basename,"dirname"),this.path=kr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?kr.extname(this.path):void 0}set extname(t){if(wu(t,"extname"),Mh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=kr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Gu(t)&&(t=uS(t)),bu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?kr.basename(this.path,this.extname):void 0}set stem(t){bu(t,"stem"),wu(t,"stem"),this.path=kr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,s){const l=this.message(t,r,s);throw l.fatal=!0,l}info(t,r,s){const l=this.message(t,r,s);return l.fatal=void 0,l}message(t,r,s){const l=new Sn(t,r,s);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function wu(e,t){if(e&&e.includes(kr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+kr.sep+"`")}function bu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Mh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function fS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pS=(function(e){const s=this.constructor.prototype,l=s[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,s),a}),mS={}.hasOwnProperty;class Ad extends pS{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=eS()}copy(){const t=new Ad;let r=-1;for(;++r<this.attachers.length;){const s=this.attachers[r];t.use(...s)}return t.data(_u(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Nu("data",this.frozen),this.namespace[t]=r,this):mS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Nu("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const l=r.call(t,...s);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Wa(t),s=this.parser||this.Parser;return Su("parse",s),s(String(r),r)}process(t,r){const s=this;return this.freeze(),Su("process",this.parser||this.Parser),Cu("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(a,c){const u=Wa(t),p=s.parse(u);s.run(p,u,function(g,y,_){if(g||!y||!_)return m(g);const x=y,k=s.stringify(x,_);yS(k)?_.value=k:_.result=k,m(g,_)});function m(g,y){g||!y?c(g):a?a(y):r(void 0,y)}}}processSync(t){let r=!1,s;return this.freeze(),Su("processSync",this.parser||this.Parser),Cu("processSync",this.compiler||this.Compiler),this.process(t,l),zh("processSync","process",r),s;function l(a,c){r=!0,Ph(a),s=c}}run(t,r,s){Oh(t),this.freeze();const l=this.transformers;return!s&&typeof r=="function"&&(s=r,r=void 0),s?a(void 0,s):new Promise(a);function a(c,u){const p=Wa(r);l.run(t,p,m);function m(g,y,_){const x=y||t;g?u(g):c?c(x):s(void 0,x,_)}}}runSync(t,r){let s=!1,l;return this.run(t,r,a),zh("runSync","run",s),l;function a(c,u){Ph(c),l=u,s=!0}}stringify(t,r){this.freeze();const s=Wa(r),l=this.compiler||this.Compiler;return Cu("stringify",l),Oh(t),l(t,s)}use(t,...r){const s=this.attachers,l=this.namespace;if(Nu("use",this.frozen),t!=null)if(typeof t=="function")p(t,r);else if(typeof t=="object")Array.isArray(t)?u(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[g,...y]=m;p(g,y)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new 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");u(m.plugins),m.settings&&(l.settings=_u(!0,l.settings,m.settings))}function u(m){let g=-1;if(m!=null)if(Array.isArray(m))for(;++g<m.length;){const y=m[g];a(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,g){let y=-1,_=-1;for(;++y<s.length;)if(s[y][0]===m){_=y;break}if(_===-1)s.push([m,...g]);else if(g.length>0){let[x,...k]=g;const E=s[_][1];Xu(E)&&Xu(x)&&(x=_u(!0,E,x)),s[_]=[m,x,...k]}}}}const hS=new Ad().freeze();function Su(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Nu(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oh(e){if(!Xu(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function zh(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wa(e){return gS(e)?e:new xy(e)}function gS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function yS(e){return typeof e=="string"||vS(e)}function vS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const xS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$h=[],Bh={allowDangerousHtml:!0},_S=/^(https?|ircs?|mailto|xmpp)$/i,kS=[{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 Ai(e){const t=wS(e),r=bS(e);return SS(t.runSync(t.parse(r),r),e)}function wS(e){const t=e.rehypePlugins||$h,r=e.remarkPlugins||$h,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bh}:Bh;return hS().use(n0).use(r).use(X0,s).use(t)}function bS(e){const t=e.children||"",r=new xy;return typeof t=="string"&&(r.value=t),r}function SS(e,t){const r=t.allowedElements,s=t.allowElement,l=t.components,a=t.disallowedElements,c=t.skipHtml,u=t.unwrapDisallowed,p=t.urlTransform||CS;for(const g of kS)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+xS+g.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Dd(e,m),$w(e,{Fragment:f.Fragment,components:l,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function m(g,y,_){if(g.type==="raw"&&_&&typeof y=="number")return c?_.children.splice(y,1):_.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let x;for(x in gu)if(Object.hasOwn(gu,x)&&Object.hasOwn(g.properties,x)){const k=g.properties[x],E=gu[x];(E===null||E.includes(g.tagName))&&(g.properties[x]=p(String(k||""),x,g))}}if(g.type==="element"){let x=r?!r.includes(g.tagName):a?a.includes(g.tagName):!1;if(!x&&s&&typeof y=="number"&&(x=!s(g,y,_)),x&&_&&typeof y=="number")return u&&g.children?_.children.splice(y,1,...g.children):_.children.splice(y,1),y}}}function CS(e){const t=e.indexOf(":"),r=e.indexOf("?"),s=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||s!==-1&&t>s||_S.test(e.slice(0,t))?e:""}function Fh(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,l=r.indexOf(t);for(;l!==-1;)s++,l=r.indexOf(t,l+t.length);return s}function NS(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jS(e,t,r){const l=_o((r||{}).ignore||[]),a=ES(t);let c=-1;for(;++c<a.length;)vy(e,"text",u);function u(m,g){let y=-1,_;for(;++y<g.length;){const x=g[y],k=_?_.children:void 0;if(l(x,k?k.indexOf(x):void 0,_))return;_=x}if(_)return p(m,g)}function p(m,g){const y=g[g.length-1],_=a[c][0],x=a[c][1];let k=0;const R=y.children.indexOf(m);let S=!1,A=[];_.lastIndex=0;let T=_.exec(m.value);for(;T;){const M=T.index,P={index:T.index,input:T.input,stack:[...g,m]};let j=x(...T,P);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?_.lastIndex=M+1:(k!==M&&A.push({type:"text",value:m.value.slice(k,M)}),Array.isArray(j)?A.push(...j):j&&A.push(j),k=M+T[0].length,S=!0),!_.global)break;T=_.exec(m.value)}return S?(k<m.value.length&&A.push({type:"text",value:m.value.slice(k)}),y.children.splice(R,1,...A)):A=[m],R+A.length}}function ES(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let s=-1;for(;++s<r.length;){const l=r[s];t.push([TS(l[0]),IS(l[1])])}return t}function TS(e){return typeof e=="string"?new RegExp(NS(e),"g"):e}function IS(e){return typeof e=="function"?e:function(){return e}}const ju="phrasing",Eu=["autolink","link","image","label"];function DS(){return{transforms:[zS],enter:{literalAutolink:RS,literalAutolinkEmail:Tu,literalAutolinkHttp:Tu,literalAutolinkWww:Tu},exit:{literalAutolink:OS,literalAutolinkEmail:MS,literalAutolinkHttp:PS,literalAutolinkWww:LS}}}function AS(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ju,notInConstruct:Eu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ju,notInConstruct:Eu},{character:":",before:"[ps]",after:"\\/",inConstruct:ju,notInConstruct:Eu}]}}function RS(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tu(e){this.config.enter.autolinkProtocol.call(this,e)}function PS(e){this.config.exit.autolinkProtocol.call(this,e)}function LS(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function MS(e){this.config.exit.autolinkEmail.call(this,e)}function OS(e){this.exit(e)}function zS(e){jS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,$S],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),BS]],{ignore:["link","linkReference"]})}function $S(e,t,r,s,l){let a="";if(!_y(l)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!FS(r)))return!1;const c=VS(r+s);if(!c[0])return!1;const u={type:"link",title:null,url:a+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function BS(e,t,r,s){return!_y(s,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function FS(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function VS(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],s=r.indexOf(")");const l=Fh(e,"(");let a=Fh(e,")");for(;s!==-1&&l>a;)e+=r.slice(0,s+1),r=r.slice(s+1),s=r.indexOf(")"),a++;return[e,r]}function _y(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Mi(r)||yo(r))&&(!t||r!==47)}ky.peek=XS;function HS(){this.buffer()}function US(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function WS(){this.buffer()}function qS(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function KS(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function ZS(e){this.exit(e)}function YS(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function QS(e){this.exit(e)}function XS(){return"["}function ky(e,t,r,s){const l=r.createTracker(s);let a=l.move("[^");const c=r.enter("footnoteReference"),u=r.enter("reference");return a+=l.move(r.safe(r.associationId(e),{after:"]",before:a})),u(),c(),a+=l.move("]"),a}function GS(){return{enter:{gfmFootnoteCallString:HS,gfmFootnoteCall:US,gfmFootnoteDefinitionLabelString:WS,gfmFootnoteDefinition:qS},exit:{gfmFootnoteCallString:KS,gfmFootnoteCall:ZS,gfmFootnoteDefinitionLabelString:YS,gfmFootnoteDefinition:QS}}}function JS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:ky},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(s,l,a,c){const u=a.createTracker(c);let p=u.move("[^");const m=a.enter("footnoteDefinition"),g=a.enter("label");return p+=u.move(a.safe(a.associationId(s),{before:p,after:"]"})),g(),p+=u.move("]:"),s.children&&s.children.length>0&&(u.shift(4),p+=u.move((t?`
54
- `:" ")+a.indentLines(a.containerFlow(s,u.current()),t?wy:eC))),m(),p}}function eC(e,t,r){return t===0?e:wy(e,t,r)}function wy(e,t,r){return(r?"":" ")+e}const tC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];by.peek=lC;function nC(){return{canContainEols:["delete"],enter:{strikethrough:iC},exit:{strikethrough:sC}}}function rC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tC}],handlers:{delete:by}}}function iC(e){this.enter({type:"delete",children:[]},e)}function sC(e){this.exit(e)}function by(e,t,r,s){const l=r.createTracker(s),a=r.enter("strikethrough");let c=l.move("~~");return c+=r.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),a(),c}function lC(){return"~"}function aC(e){return e.length}function oC(e,t){const r=t||{},s=(r.align||[]).concat(),l=r.stringLength||aC,a=[],c=[],u=[],p=[];let m=0,g=-1;for(;++g<e.length;){const E=[],R=[];let S=-1;for(e[g].length>m&&(m=e[g].length);++S<e[g].length;){const A=cC(e[g][S]);if(r.alignDelimiters!==!1){const T=l(A);R[S]=T,(p[S]===void 0||T>p[S])&&(p[S]=T)}E.push(A)}c[g]=E,u[g]=R}let y=-1;if(typeof s=="object"&&"length"in s)for(;++y<m;)a[y]=Vh(s[y]);else{const E=Vh(s);for(;++y<m;)a[y]=E}y=-1;const _=[],x=[];for(;++y<m;){const E=a[y];let R="",S="";E===99?(R=":",S=":"):E===108?R=":":E===114&&(S=":");let A=r.alignDelimiters===!1?1:Math.max(1,p[y]-R.length-S.length);const T=R+"-".repeat(A)+S;r.alignDelimiters!==!1&&(A=R.length+A+S.length,A>p[y]&&(p[y]=A),x[y]=A),_[y]=T}c.splice(1,0,_),u.splice(1,0,x),g=-1;const k=[];for(;++g<c.length;){const E=c[g],R=u[g];y=-1;const S=[];for(;++y<m;){const A=E[y]||"";let T="",M="";if(r.alignDelimiters!==!1){const P=p[y]-(R[y]||0),j=a[y];j===114?T=" ".repeat(P):j===99?P%2?(T=" ".repeat(P/2+.5),M=" ".repeat(P/2-.5)):(T=" ".repeat(P/2),M=T):M=" ".repeat(P)}r.delimiterStart!==!1&&!y&&S.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&A==="")&&(r.delimiterStart!==!1||y)&&S.push(" "),r.alignDelimiters!==!1&&S.push(T),S.push(A),r.alignDelimiters!==!1&&S.push(M),r.padding!==!1&&S.push(" "),(r.delimiterEnd!==!1||y!==m-1)&&S.push("|")}k.push(r.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
55
- `)}function cC(e){return e==null?"":String(e)}function Vh(e){const 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}function uC(e,t,r,s){const l=r.enter("blockquote"),a=r.createTracker(s);a.move("> "),a.shift(2);const c=r.indentLines(r.containerFlow(e,a.current()),dC);return l(),c}function dC(e,t,r){return">"+(r?"":" ")+e}function fC(e,t){return Hh(e,t.inConstruct,!0)&&!Hh(e,t.notInConstruct,!1)}function Hh(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function Uh(e,t,r,s){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
56
- `&&fC(r.stack,r.unsafe[l]))return/[ \t]/.test(s.before)?"":" ";return`\\
57
- `}function pC(e,t){const r=String(e);let s=r.indexOf(t),l=s,a=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===l?++a>c&&(c=a):a=1,l=s+t.length,s=r.indexOf(t,l);return c}function mC(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hC(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function gC(e,t,r,s){const l=hC(r),a=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(mC(e,r)){const y=r.enter("codeIndented"),_=r.indentLines(a,yC);return y(),_}const u=r.createTracker(s),p=l.repeat(Math.max(pC(a,l)+1,3)),m=r.enter("codeFenced");let g=u.move(p);if(e.lang){const y=r.enter(`codeFencedLang${c}`);g+=u.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...u.current()})),y()}if(e.lang&&e.meta){const y=r.enter(`codeFencedMeta${c}`);g+=u.move(" "),g+=u.move(r.safe(e.meta,{before:g,after:`
58
- `,encode:["`"],...u.current()})),y()}return g+=u.move(`
59
- `),a&&(g+=u.move(a+`
60
- `)),g+=u.move(p),m(),g}function yC(e,t,r){return(r?"":" ")+e}function Rd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vC(e,t,r,s){const l=Rd(r),a=l==='"'?"Quote":"Apostrophe",c=r.enter("definition");let u=r.enter("label");const p=r.createTracker(s);let m=p.move("[");return m+=p.move(r.safe(r.associationId(e),{before:m,after:"]",...p.current()})),m+=p.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(r.safe(e.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(u=r.enter("destinationRaw"),m+=p.move(r.safe(e.url,{before:m,after:e.title?" ":`
61
- `,...p.current()}))),u(),e.title&&(u=r.enter(`title${a}`),m+=p.move(" "+l),m+=p.move(r.safe(e.title,{before:m,after:l,...p.current()})),m+=p.move(l),u()),c(),m}function xC(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Cl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function oo(e,t,r){const s=vs(e),l=vs(t);return s===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Sy.peek=_C;function Sy(e,t,r,s){const l=xC(r),a=r.enter("emphasis"),c=r.createTracker(s),u=c.move(l);let p=c.move(r.containerPhrasing(e,{after:l,before:u,...c.current()}));const m=p.charCodeAt(0),g=oo(s.before.charCodeAt(s.before.length-1),m,l);g.inside&&(p=Cl(m)+p.slice(1));const y=p.charCodeAt(p.length-1),_=oo(s.after.charCodeAt(0),y,l);_.inside&&(p=p.slice(0,-1)+Cl(y));const x=c.move(l);return a(),r.attentionEncodeSurroundingInfo={after:_.outside,before:g.outside},u+p+x}function _C(e,t,r){return r.options.emphasis||"*"}function kC(e,t){let r=!1;return Dd(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return r=!0,Yu}),!!((!e.depth||e.depth<3)&&Sd(e)&&(t.options.setext||r))}function wC(e,t,r,s){const l=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(s);if(kC(e,r)){const g=r.enter("headingSetext"),y=r.enter("phrasing"),_=r.containerPhrasing(e,{...a.current(),before:`
62
- `,after:`
63
- `});return y(),g(),_+`
64
- `+(l===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
65
- `))+1))}const c="#".repeat(l),u=r.enter("headingAtx"),p=r.enter("phrasing");a.move(c+" ");let m=r.containerPhrasing(e,{before:"# ",after:`
66
- `,...a.current()});return/^[\t ]/.test(m)&&(m=Cl(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,r.options.closeAtx&&(m+=" "+c),p(),u(),m}Cy.peek=bC;function Cy(e){return e.value||""}function bC(){return"<"}Ny.peek=SC;function Ny(e,t,r,s){const l=Rd(r),a=l==='"'?"Quote":"Apostrophe",c=r.enter("image");let u=r.enter("label");const p=r.createTracker(s);let m=p.move("![");return m+=p.move(r.safe(e.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(r.safe(e.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(u=r.enter("destinationRaw"),m+=p.move(r.safe(e.url,{before:m,after:e.title?" ":")",...p.current()}))),u(),e.title&&(u=r.enter(`title${a}`),m+=p.move(" "+l),m+=p.move(r.safe(e.title,{before:m,after:l,...p.current()})),m+=p.move(l),u()),m+=p.move(")"),c(),m}function SC(){return"!"}jy.peek=CC;function jy(e,t,r,s){const l=e.referenceType,a=r.enter("imageReference");let c=r.enter("label");const u=r.createTracker(s);let p=u.move("![");const m=r.safe(e.alt,{before:p,after:"]",...u.current()});p+=u.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:p,after:"]",...u.current()});return c(),r.stack=g,a(),l==="full"||!m||m!==y?p+=u.move(y+"]"):l==="shortcut"?p=p.slice(0,-1):p+=u.move("]"),p}function CC(){return"!"}Ey.peek=NC;function Ey(e,t,r){let s=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(s);)l+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++a<r.unsafe.length;){const c=r.unsafe[a],u=r.compilePattern(c);let p;if(c.atBreak)for(;p=u.exec(s);){let m=p.index;s.charCodeAt(m)===10&&s.charCodeAt(m-1)===13&&m--,s=s.slice(0,m)+" "+s.slice(p.index+1)}}return l+s+l}function NC(){return"`"}function Ty(e,t){const r=Sd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Iy.peek=jC;function Iy(e,t,r,s){const l=Rd(r),a=l==='"'?"Quote":"Apostrophe",c=r.createTracker(s);let u,p;if(Ty(e,r)){const g=r.stack;r.stack=[],u=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),u(),r.stack=g,y}u=r.enter("link"),p=r.enter("label");let m=c.move("[");return m+=c.move(r.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=r.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(r.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=r.enter("destinationRaw"),m+=c.move(r.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=r.enter(`title${a}`),m+=c.move(" "+l),m+=c.move(r.safe(e.title,{before:m,after:l,...c.current()})),m+=c.move(l),p()),m+=c.move(")"),u(),m}function jC(e,t,r){return Ty(e,r)?"<":"["}Dy.peek=EC;function Dy(e,t,r,s){const l=e.referenceType,a=r.enter("linkReference");let c=r.enter("label");const u=r.createTracker(s);let p=u.move("[");const m=r.containerPhrasing(e,{before:p,after:"]",...u.current()});p+=u.move(m+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(e),{before:p,after:"]",...u.current()});return c(),r.stack=g,a(),l==="full"||!m||m!==y?p+=u.move(y+"]"):l==="shortcut"?p=p.slice(0,-1):p+=u.move("]"),p}function EC(){return"["}function Pd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function TC(e){const t=Pd(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function IC(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Ay(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function DC(e,t,r,s){const l=r.enter("list"),a=r.bulletCurrent;let c=e.ordered?IC(r):Pd(r);const u=e.ordered?c==="."?")":".":TC(r);let p=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(p=!0),Ay(r)===c&&g){let y=-1;for(;++y<e.children.length;){const _=e.children[y];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=u),r.bulletCurrent=c;const m=r.containerFlow(e,s);return r.bulletLastUsed=c,r.bulletCurrent=a,l(),m}function AC(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function RC(e,t,r,s){const l=AC(r);let a=r.bulletCurrent||Pd(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let c=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const u=r.createTracker(s);u.move(a+" ".repeat(c-a.length)),u.shift(c);const p=r.enter("listItem"),m=r.indentLines(r.containerFlow(e,u.current()),g);return p(),m;function g(y,_,x){return _?(x?"":" ".repeat(c))+y:(x?a:a+" ".repeat(c-a.length))+y}}function PC(e,t,r,s){const l=r.enter("paragraph"),a=r.enter("phrasing"),c=r.containerPhrasing(e,s);return a(),l(),c}const LC=_o(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MC(e,t,r,s){return(e.children.some(function(c){return LC(c)})?r.containerPhrasing:r.containerFlow).call(r,e,s)}function OC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ry.peek=zC;function Ry(e,t,r,s){const l=OC(r),a=r.enter("strong"),c=r.createTracker(s),u=c.move(l+l);let p=c.move(r.containerPhrasing(e,{after:l,before:u,...c.current()}));const m=p.charCodeAt(0),g=oo(s.before.charCodeAt(s.before.length-1),m,l);g.inside&&(p=Cl(m)+p.slice(1));const y=p.charCodeAt(p.length-1),_=oo(s.after.charCodeAt(0),y,l);_.inside&&(p=p.slice(0,-1)+Cl(y));const x=c.move(l+l);return a(),r.attentionEncodeSurroundingInfo={after:_.outside,before:g.outside},u+p+x}function zC(e,t,r){return r.options.strong||"*"}function $C(e,t,r,s){return r.safe(e.value,s)}function BC(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function FC(e,t,r){const s=(Ay(r)+(r.options.ruleSpaces?" ":"")).repeat(BC(r));return r.options.ruleSpaces?s.slice(0,-1):s}const Py={blockquote:uC,break:Uh,code:gC,definition:vC,emphasis:Sy,hardBreak:Uh,heading:wC,html:Cy,image:Ny,imageReference:jy,inlineCode:Ey,link:Iy,linkReference:Dy,list:DC,listItem:RC,paragraph:PC,root:MC,strong:Ry,text:$C,thematicBreak:FC};function VC(){return{enter:{table:HC,tableData:Wh,tableHeader:Wh,tableRow:WC},exit:{codeText:qC,table:UC,tableData:Iu,tableHeader:Iu,tableRow:Iu}}}function HC(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function UC(e){this.exit(e),this.data.inTable=void 0}function WC(e){this.enter({type:"tableRow",children:[]},e)}function Iu(e){this.exit(e)}function Wh(e){this.enter({type:"tableCell",children:[]},e)}function qC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KC));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function KC(e,t){return t==="|"?t:e}function ZC(e){const t=e||{},r=t.tableCellPadding,s=t.tablePipeAlign,l=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
67
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:c,tableCell:p,tableRow:u}};function c(x,k,E,R){return m(g(x,E,R),x.align)}function u(x,k,E,R){const S=y(x,E,R),A=m([S]);return A.slice(0,A.indexOf(`
68
- `))}function p(x,k,E,R){const S=E.enter("tableCell"),A=E.enter("phrasing"),T=E.containerPhrasing(x,{...R,before:a,after:a});return A(),S(),T}function m(x,k){return oC(x,{align:k,alignDelimiters:s,padding:r,stringLength:l})}function g(x,k,E){const R=x.children;let S=-1;const A=[],T=k.enter("table");for(;++S<R.length;)A[S]=y(R[S],k,E);return T(),A}function y(x,k,E){const R=x.children;let S=-1;const A=[],T=k.enter("tableRow");for(;++S<R.length;)A[S]=p(R[S],x,k,E);return T(),A}function _(x,k,E){let R=Py.inlineCode(x,k,E);return E.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function YC(){return{exit:{taskListCheckValueChecked:qh,taskListCheckValueUnchecked:qh,paragraph:XC}}}function QC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:GC}}}function qh(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function XC(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const s=r.children[0];if(s&&s.type==="text"){const l=t.children;let a=-1,c;for(;++a<l.length;){const u=l[a];if(u.type==="paragraph"){c=u;break}}c===r&&(s.value=s.value.slice(1),s.value.length===0?r.children.shift():r.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,r.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function GC(e,t,r,s){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",u=r.createTracker(s);a&&u.move(c);let p=Py.listItem(e,t,r,{...s,...u.current()});return a&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(g){return g+c}}function JC(){return[DS(),GS(),nC(),VC(),YC()]}function eN(e){return{extensions:[AS(),JS(e),rC(),ZC(e),QC()]}}const tN={tokenize:aN,partial:!0},Ly={tokenize:oN,partial:!0},My={tokenize:cN,partial:!0},Oy={tokenize:uN,partial:!0},nN={tokenize:dN,partial:!0},zy={name:"wwwAutolink",tokenize:sN,previous:By},$y={name:"protocolAutolink",tokenize:lN,previous:Fy},Or={name:"emailAutolink",tokenize:iN,previous:Vy},Sr={};function rN(){return{text:Sr}}let Ti=48;for(;Ti<123;)Sr[Ti]=Or,Ti++,Ti===58?Ti=65:Ti===91&&(Ti=97);Sr[43]=Or;Sr[45]=Or;Sr[46]=Or;Sr[95]=Or;Sr[72]=[Or,$y];Sr[104]=[Or,$y];Sr[87]=[Or,zy];Sr[119]=[Or,zy];function iN(e,t,r){const s=this;let l,a;return c;function c(y){return!Ju(y)||!Vy.call(s,s.previous)||Ld(s.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(y))}function u(y){return Ju(y)?(e.consume(y),u):y===64?(e.consume(y),p):r(y)}function p(y){return y===46?e.check(nN,g,m)(y):y===45||y===95||bn(y)?(a=!0,e.consume(y),p):g(y)}function m(y){return e.consume(y),l=!0,p}function g(y){return a&&l&&jn(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):r(y)}}function sN(e,t,r){const s=this;return l;function l(c){return c!==87&&c!==119||!By.call(s,s.previous)||Ld(s.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tN,e.attempt(Ly,e.attempt(My,a),r),r)(c))}function a(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function lN(e,t,r){const s=this;let l="",a=!1;return c;function c(y){return(y===72||y===104)&&Fy.call(s,s.previous)&&!Ld(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),u):r(y)}function u(y){if(jn(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),u;if(y===58){const _=l.toLowerCase();if(_==="http"||_==="https")return e.consume(y),p}return r(y)}function p(y){return y===47?(e.consume(y),a?m:(a=!0,p)):r(y)}function m(y){return y===null||so(y)||kt(y)||Mi(y)||yo(y)?r(y):e.attempt(Ly,e.attempt(My,g),r)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function aN(e,t,r){let s=0;return l;function l(c){return(c===87||c===119)&&s<3?(s++,e.consume(c),l):c===46&&s===3?(e.consume(c),a):r(c)}function a(c){return c===null?r(c):t(c)}}function oN(e,t,r){let s,l,a;return c;function c(m){return m===46||m===95?e.check(Oy,p,u)(m):m===null||kt(m)||Mi(m)||m!==45&&yo(m)?p(m):(a=!0,e.consume(m),c)}function u(m){return m===95?s=!0:(l=s,s=void 0),e.consume(m),c}function p(m){return l||s||!a?r(m):t(m)}}function cN(e,t){let r=0,s=0;return l;function l(c){return c===40?(r++,e.consume(c),l):c===41&&s<r?a(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Oy,t,a)(c):c===null||kt(c)||Mi(c)?t(c):(e.consume(c),l)}function a(c){return c===41&&s++,e.consume(c),l}}function uN(e,t,r){return s;function s(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),s):u===38?(e.consume(u),a):u===93?(e.consume(u),l):u===60||u===null||kt(u)||Mi(u)?t(u):r(u)}function l(u){return u===null||u===40||u===91||kt(u)||Mi(u)?t(u):s(u)}function a(u){return jn(u)?c(u):r(u)}function c(u){return u===59?(e.consume(u),s):jn(u)?(e.consume(u),c):r(u)}}function dN(e,t,r){return s;function s(a){return e.consume(a),l}function l(a){return bn(a)?r(a):t(a)}}function By(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kt(e)}function Fy(e){return!jn(e)}function Vy(e){return!(e===47||Ju(e))}function Ju(e){return e===43||e===45||e===46||e===95||bn(e)}function Ld(e){let t=e.length,r=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){r=!0;break}if(s._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const fN={tokenize:_N,partial:!0};function pN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yN,continuation:{tokenize:vN},exit:xN}},text:{91:{name:"gfmFootnoteCall",tokenize:gN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:mN,resolveTo:hN}}}}function mN(e,t,r){const s=this;let l=s.events.length;const a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let c;for(;l--;){const p=s.events[l][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return u;function u(p){if(!c||!c._balanced)return r(p);const m=fr(s.sliceSerialize({start:c.end,end:s.now()}));return m.codePointAt(0)!==94||!a.includes(m.slice(1))?r(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}function hN(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const s={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[e[r+1],e[r+2],["enter",s,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",c,t],["exit",c,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(r,e.length-r+1,...u),e}function gN(e,t,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a=0,c;return u;function u(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(y){if(a>999||y===93&&!c||y===null||y===91||kt(y))return r(y);if(y===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return l.includes(fr(s.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(y)}return kt(y)||(c=!0),a++,e.consume(y),y===92?g:m}function g(y){return y===91||y===92||y===93?(e.consume(y),a++,m):m(y)}}function yN(e,t,r){const s=this,l=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let a,c=0,u;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(k)}function g(k){if(c>999||k===93&&!u||k===null||k===91||kt(k))return r(k);if(k===93){e.exit("chunkString");const E=e.exit("gfmFootnoteDefinitionLabelString");return a=fr(s.sliceSerialize(E)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return kt(k)||(u=!0),c++,e.consume(k),k===92?y:g}function y(k){return k===91||k===92||k===93?(e.consume(k),c++,g):g(k)}function _(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(a)||l.push(a),rt(e,x,"gfmFootnoteDefinitionWhitespace")):r(k)}function x(k){return t(k)}}function vN(e,t,r){return e.check(Tl,t,e.attempt(fN,t,r))}function xN(e){e.exit("gfmFootnoteDefinition")}function _N(e,t,r){const s=this;return rt(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const c=s.events[s.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(a):r(a)}}function kN(e){let r=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:a,resolveAll:l};return r==null&&(r=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function l(c,u){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},_=[["enter",g,u],["enter",c[m][1],u],["exit",c[m][1],u],["enter",y,u]],x=u.parser.constructs.insideSpan.null;x&&Wn(_,_.length,0,vo(x,c.slice(m+1,p),u)),Wn(_,_.length,0,[["exit",y,u],["enter",c[p][1],u],["exit",c[p][1],u],["exit",g,u]]),Wn(c,m-1,p-m+3,_),p=m+_.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function a(c,u,p){const m=this.previous,g=this.events;let y=0;return _;function _(k){return m===126&&g[g.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const E=vs(m);if(k===126)return y>1?p(k):(c.consume(k),y++,x);if(y<2&&!r)return p(k);const R=c.exit("strikethroughSequenceTemporary"),S=vs(k);return R._open=!S||S===2&&!!E,R._close=!E||E===2&&!!S,u(k)}}}class wN{constructor(){this.map=[]}add(t,r,s){bN(this,t,r,s)}consume(t){if(this.map.sort(function(a,c){return a[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const s=[];for(;r>0;)r-=1,s.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];s.push(t.slice()),t.length=0;let l=s.pop();for(;l;){for(const a of l)t.push(a);l=s.pop()}this.map.length=0}}function bN(e,t,r,s){let l=0;if(!(r===0&&s.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...s);return}l+=1}e.map.push([t,r,s])}}function SN(e,t){let r=!1;const s=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=s.length-1;s[a]=s[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return s}function CN(){return{flow:{null:{name:"table",tokenize:NN,resolveAll:jN}}}}function NN(e,t,r){const s=this;let l=0,a=0,c;return u;function u(O){let Y=s.events.length-1;for(;Y>-1;){const se=s.events[Y][1].type;if(se==="lineEnding"||se==="linePrefix")Y--;else break}const ie=Y>-1?s.events[Y][1].type:null,ke=ie==="tableHead"||ie==="tableRow"?j:p;return ke===j&&s.parser.lazy[s.now().line]?r(O):ke(O)}function p(O){return e.enter("tableHead"),e.enter("tableRow"),m(O)}function m(O){return O===124||(c=!0,a+=1),g(O)}function g(O){return O===null?r(O):Be(O)?a>1?(a=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),x):r(O):et(O)?rt(e,g,"whitespace")(O):(a+=1,c&&(c=!1,l+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),y(O)))}function y(O){return O===null||O===124||kt(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?_:y)}function _(O){return O===92||O===124?(e.consume(O),y):y(O)}function x(O){return s.interrupt=!1,s.parser.lazy[s.now().line]?r(O):(e.enter("tableDelimiterRow"),c=!1,et(O)?rt(e,k,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):k(O))}function k(O){return O===45||O===58?R(O):O===124?(c=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),E):P(O)}function E(O){return et(O)?rt(e,R,"whitespace")(O):R(O)}function R(O){return O===58?(a+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),S):O===45?(a+=1,S(O)):O===null||Be(O)?M(O):P(O)}function S(O){return O===45?(e.enter("tableDelimiterFiller"),A(O)):P(O)}function A(O){return O===45?(e.consume(O),A):O===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(O))}function T(O){return et(O)?rt(e,M,"whitespace")(O):M(O)}function M(O){return O===124?k(O):O===null||Be(O)?!c||l!==a?P(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):P(O)}function P(O){return r(O)}function j(O){return e.enter("tableRow"),V(O)}function V(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),V):O===null||Be(O)?(e.exit("tableRow"),t(O)):et(O)?rt(e,V,"whitespace")(O):(e.enter("data"),X(O))}function X(O){return O===null||O===124||kt(O)?(e.exit("data"),V(O)):(e.consume(O),O===92?ee:X)}function ee(O){return O===92||O===124?(e.consume(O),X):X(O)}}function jN(e,t){let r=-1,s=!0,l=0,a=[0,0,0,0],c=[0,0,0,0],u=!1,p=0,m,g,y;const _=new wN;for(;++r<e.length;){const x=e[r],k=x[1];x[0]==="enter"?k.type==="tableHead"?(u=!1,p!==0&&(Kh(_,t,p,m,g),g=void 0,p=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},_.add(r,0,[["enter",m,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(s=!0,y=void 0,a=[0,0,0,0],c=[0,r+1,0,0],u&&(u=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},_.add(r,0,[["enter",g,t]])),l=k.type==="tableDelimiterRow"?2:g?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(s=!1,c[2]===0&&(a[1]!==0&&(c[0]=c[1],y=qa(_,t,a,l,void 0,y),a=[0,0,0,0]),c[2]=r)):k.type==="tableCellDivider"&&(s?s=!1:(a[1]!==0&&(c[0]=c[1],y=qa(_,t,a,l,void 0,y)),a=c,c=[a[1],r,0,0])):k.type==="tableHead"?(u=!0,p=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=r,a[1]!==0?(c[0]=c[1],y=qa(_,t,a,l,r,y)):c[1]!==0&&(y=qa(_,t,c,l,r,y)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=r)}for(p!==0&&Kh(_,t,p,m,g),_.consume(t.events),r=-1;++r<t.events.length;){const x=t.events[r];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=SN(t.events,r))}return e}function qa(e,t,r,s,l,a){const c=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",u="tableContent";r[0]!==0&&(a.end=Object.assign({},ds(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const p=ds(t.events,r[1]);if(a={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const m=ds(t.events,r[2]),g=ds(t.events,r[3]),y={type:u,start:Object.assign({},m),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",y,t]]),s!==2){const _=t.events[r[2]],x=t.events[r[3]];if(_[1].end=Object.assign({},x[1].end),_[1].type="chunkText",_[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,E=r[3]-r[2]-1;e.add(k,E,[])}}e.add(r[3]+1,0,[["exit",y,t]])}return l!==void 0&&(a.end=Object.assign({},ds(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function Kh(e,t,r,s,l){const a=[],c=ds(t.events,r);l&&(l.end=Object.assign({},c),a.push(["exit",l,t])),s.end=Object.assign({},c),a.push(["exit",s,t]),e.add(r+1,0,a)}function ds(e,t){const r=e[t],s=r[0]==="enter"?"start":"end";return r[1][s]}const EN={name:"tasklistCheck",tokenize:IN};function TN(){return{text:{91:EN}}}function IN(e,t,r){const s=this;return l;function l(p){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?r(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),a)}function a(p){return kt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):r(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):r(p)}function u(p){return Be(p)?t(p):et(p)?e.check({tokenize:DN},t,r)(p):r(p)}}function DN(e,t,r){return rt(e,s,"whitespace");function s(l){return l===null?r(l):t(l)}}function AN(e){return Jg([rN(),pN(),kN(e),CN(),TN()])}const RN={};function Ri(e){const t=this,r=e||RN,s=t.data(),l=s.micromarkExtensions||(s.micromarkExtensions=[]),a=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),c=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);l.push(AN(r)),a.push(JC()),c.push(eN(r))}const co={proposed:"status.proposed",backlog:"status.backlog",todo:"status.todo",in_progress:"status.in_progress",pending:"status.pending",done:"status.done"};function Md(e,t){if(t.label!==void 0)return t.label;const r=co[t.id];return r!==void 0?e(r):t.id}function Dl(e,t){const r=new Map(t.map(s=>[s.id,Md(e,s)]));return s=>r.get(s)??e(co[s])}function bs(e){const t=new Map(e.map(r=>[r.id,r.label??r.id]));return r=>t.get(r)??r}const PN="_view_13xsq_1",LN="_list_13xsq_8",MN="_search_13xsq_18",ON="_searchInput_13xsq_23",zN="_listScroll_13xsq_39",$N="_monthGroup_13xsq_45",BN="_monthName_13xsq_49",FN="_taskList_13xsq_57",VN="_taskBtn_13xsq_66",HN="_taskBtnActive_13xsq_89",UN="_taskId_13xsq_99",WN="_taskTitle_13xsq_105",qN="_detail_13xsq_113",KN="_detailHeader_13xsq_120",ZN="_detailHeadText_13xsq_127",YN="_detailTitle_13xsq_132",QN="_meta_13xsq_139",XN="_metaId_13xsq_148",GN="_labels_13xsq_152",JN="_label_13xsq_152",ej="_restoreBtn_13xsq_164",tj="_markdown_13xsq_191",nj="_muted_13xsq_210",rj="_error_13xsq_215",Ct={view:PN,list:LN,search:MN,searchInput:ON,listScroll:zN,monthGroup:$N,monthName:BN,taskList:FN,taskBtn:VN,taskBtnActive:HN,taskId:UN,taskTitle:WN,detail:qN,detailHeader:KN,detailHeadText:ZN,detailTitle:YN,meta:QN,metaId:XN,labels:GN,label:JN,restoreBtn:ej,markdown:tj,muted:nj,error:rj};function ij({board:e,onChanged:t,onError:r}){const{t:s}=pt(),[l,a]=b.useState(null),[c,u]=b.useState(!1),[p,m]=b.useState(""),[g,y]=b.useState(null),[_,x]=b.useState(!1);b.useEffect(()=>{let M=!0;const P=new AbortController;return(async()=>{try{const j=await dd(P.signal);M&&(a(j.tasks),u(!1))}catch{M&&(a([]),u(!0))}})(),()=>{M=!1,P.abort()}},[e]);const k=b.useMemo(()=>Dl(s,e.config.columns),[s,e.config.columns]),E=b.useMemo(()=>bs(e.config.members),[e.config.members]),R=b.useMemo(()=>{const M=l??[],P=p.trim().toLowerCase();return P===""?M:M.filter(j=>[j.id,j.title??"",(j.labels??[]).join(" "),j.assignee??"",j.body].some(X=>X.toLowerCase().includes(P)))},[l,p]),S=b.useMemo(()=>{const M=new Map;for(const P of R){const j=P.month??"",V=M.get(j);V?V.push(P):M.set(j,[P])}return[...M.entries()].sort((P,j)=>P[0]===""&&j[0]===""?0:P[0]===""?1:j[0]===""?-1:j[0].localeCompare(P[0])).map(([P,j])=>({month:P,tasks:j.slice().sort((V,X)=>V.id.localeCompare(X.id,"en",{numeric:!0}))}))},[R]),A=g!==null?R.find(M=>M.id===g)??null:null,T=async M=>{if(!(typeof window<"u"&&!window.confirm(s("archive.view.restoreConfirm",{id:M})))){x(!0);try{await T_(M),y(null),t()}catch(P){const j=P instanceof br||P instanceof Error?P.message:s("archive.view.restoreError");r(j)}finally{x(!1)}}};return f.jsxs("div",{className:Ct.view,children:[f.jsxs("nav",{className:Ct.list,"aria-label":s("archive.view.listTitle"),children:[f.jsx("div",{className:Ct.search,children:f.jsx("input",{className:Ct.searchInput,type:"search",value:p,onChange:M=>m(M.target.value),placeholder:s("archive.view.searchPlaceholder"),"aria-label":s("archive.view.searchPlaceholder")})}),f.jsx("div",{className:Ct.listScroll,children:c?f.jsx("p",{className:Ct.error,role:"alert",children:s("archive.view.loadError")}):l===null?f.jsx("p",{className:Ct.muted,children:s("board.loading")}):R.length===0?f.jsx("p",{className:Ct.muted,children:p.trim()===""?s("archive.view.empty"):s("archive.view.noMatch")}):S.map(M=>f.jsxs("div",{className:Ct.monthGroup,children:[f.jsx("span",{className:Ct.monthName,children:M.month||s("archive.view.noMonth")}),f.jsx("ul",{className:Ct.taskList,children:M.tasks.map(P=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${Ct.taskBtn} ${g===P.id?Ct.taskBtnActive:""}`,onClick:()=>y(P.id),"aria-current":g===P.id?"true":void 0,children:[f.jsx("span",{className:Ct.taskId,children:P.id})," ",f.jsx("span",{className:Ct.taskTitle,children:P.title??P.id})]})},P.id))})]},M.month||"__none__"))})]}),f.jsx("section",{className:Ct.detail,"aria-label":s("view.archive"),children:A===null?f.jsx("p",{className:Ct.muted,children:s("archive.view.selectPrompt")}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ct.detailHeader,children:[f.jsxs("div",{className:Ct.detailHeadText,children:[f.jsx("h2",{className:Ct.detailTitle,children:A.title??A.id}),f.jsxs("p",{className:Ct.meta,children:[f.jsx("span",{className:Ct.metaId,children:A.id}),A.status!==void 0&&f.jsx("span",{children:k(A.status)}),A.month!==null&&f.jsx("span",{children:A.month}),A.assignee!=null&&A.assignee!==""&&f.jsx("span",{children:E(A.assignee)}),A.labels!==void 0&&A.labels.length>0&&f.jsx("span",{className:Ct.labels,children:A.labels.map(M=>f.jsx("span",{className:Ct.label,children:M},M))})]})]}),f.jsx("button",{type:"button",className:Ct.restoreBtn,onClick:()=>void T(A.id),disabled:_,children:s("archive.view.restore")})]}),f.jsx("div",{className:Ct.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:A.body})})]})})]})}var pl=Sg();const wo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ss(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Od(e){return"nodeType"in e}function Mn(e){var t,r;return e?Ss(e)?e:Od(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function zd(e){const{Document:t}=Mn(e);return e instanceof t}function Al(e){return Ss(e)?!1:e instanceof Mn(e).HTMLElement}function Hy(e){return e instanceof Mn(e).SVGElement}function Cs(e){return e?Ss(e)?e.document:Od(e)?zd(e)?e:Al(e)||Hy(e)?e.ownerDocument:document:document:document}const di=wo?b.useLayoutEffect:b.useEffect;function $d(e){const t=b.useRef(e);return di(()=>{t.current=e}),b.useCallback(function(){for(var r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];return t.current==null?void 0:t.current(...s)},[])}function sj(){const e=b.useRef(null),t=b.useCallback((s,l)=>{e.current=setInterval(s,l)},[]),r=b.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Nl(e,t){t===void 0&&(t=[e]);const r=b.useRef(e);return di(()=>{r.current!==e&&(r.current=e)},t),r}function Rl(e,t){const r=b.useRef();return b.useMemo(()=>{const s=e(r.current);return r.current=s,s},[...t])}function uo(e){const t=$d(e),r=b.useRef(null),s=b.useCallback(l=>{l!==r.current&&(t==null||t(l,r.current)),r.current=l},[]);return[r,s]}function ed(e){const t=b.useRef();return b.useEffect(()=>{t.current=e},[e]),t.current}let Du={};function bo(e,t){return b.useMemo(()=>{if(t)return t;const r=Du[e]==null?0:Du[e]+1;return Du[e]=r,e+"-"+r},[e,t])}function Uy(e){return function(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return s.reduce((a,c)=>{const u=Object.entries(c);for(const[p,m]of u){const g=a[p];g!=null&&(a[p]=g+e*m)}return a},{...t})}}const fs=Uy(1),fo=Uy(-1);function lj(e){return"clientX"in e&&"clientY"in e}function Wy(e){if(!e)return!1;const{KeyboardEvent:t}=Mn(e.target);return t&&e instanceof t}function aj(e){if(!e)return!1;const{TouchEvent:t}=Mn(e.target);return t&&e instanceof t}function td(e){if(aj(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return lj(e)?{x:e.clientX,y:e.clientY}:null}const nd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[nd.Translate.toString(e),nd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:s}=e;return t+" "+r+"ms "+s}}}),Zh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function oj(e){return e.matches(Zh)?e:e.querySelector(Zh)}const cj={display:"none"};function uj(e){let{id:t,value:r}=e;return tr.createElement("div",{id:t,style:cj},r)}function dj(e){let{id:t,announcement:r,ariaLiveType:s="assertive"}=e;const l={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return tr.createElement("div",{id:t,style:l,role:"status","aria-live":s,"aria-atomic":!0},r)}function fj(){const[e,t]=b.useState("");return{announce:b.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const qy=b.createContext(null);function pj(e){const t=b.useContext(qy);b.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function mj(){const[e]=b.useState(()=>new Set),t=b.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[b.useCallback(s=>{let{type:l,event:a}=s;e.forEach(c=>{var u;return(u=c[l])==null?void 0:u.call(c,a)})},[e]),t]}const hj={draggable:`
69
- To pick up a draggable item, press the space bar.
70
- While dragging, use the arrow keys to move the item.
71
- Press space again to drop the item in its new position, or press escape to cancel.
72
- `},gj={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function yj(e){let{announcements:t=gj,container:r,hiddenTextDescribedById:s,screenReaderInstructions:l=hj}=e;const{announce:a,announcement:c}=fj(),u=bo("DndLiveRegion"),[p,m]=b.useState(!1);if(b.useEffect(()=>{m(!0)},[]),pj(b.useMemo(()=>({onDragStart(y){let{active:_}=y;a(t.onDragStart({active:_}))},onDragMove(y){let{active:_,over:x}=y;t.onDragMove&&a(t.onDragMove({active:_,over:x}))},onDragOver(y){let{active:_,over:x}=y;a(t.onDragOver({active:_,over:x}))},onDragEnd(y){let{active:_,over:x}=y;a(t.onDragEnd({active:_,over:x}))},onDragCancel(y){let{active:_,over:x}=y;a(t.onDragCancel({active:_,over:x}))}}),[a,t])),!p)return null;const g=tr.createElement(tr.Fragment,null,tr.createElement(uj,{id:s,value:l.draggable}),tr.createElement(dj,{id:u,announcement:c}));return r?pl.createPortal(g,r):g}var nn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(nn||(nn={}));function po(){}function Yh(e,t){return b.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function vj(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return b.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const pr=Object.freeze({x:0,y:0});function xj(e,t){let{data:{value:r}}=e,{data:{value:s}}=t;return s-r}function _j(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function kj(e,t){const r=Math.max(t.top,e.top),s=Math.max(t.left,e.left),l=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),c=l-s,u=a-r;if(s<l&&r<a){const p=t.width*t.height,m=e.width*e.height,g=c*u,y=g/(p+m-g);return Number(y.toFixed(4))}return 0}const wj=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:s}=e;const l=[];for(const a of s){const{id:c}=a,u=r.get(c);if(u){const p=kj(u,t);p>0&&l.push({id:c,data:{droppableContainer:a,value:p}})}}return l.sort(xj)};function bj(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Ky(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pr}function Sj(e){return function(r){for(var s=arguments.length,l=new Array(s>1?s-1:0),a=1;a<s;a++)l[a-1]=arguments[a];return l.reduce((c,u)=>({...c,top:c.top+e*u.y,bottom:c.bottom+e*u.y,left:c.left+e*u.x,right:c.right+e*u.x}),{...r})}}const Cj=Sj(1);function Nj(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function jj(e,t,r){const s=Nj(t);if(!s)return e;const{scaleX:l,scaleY:a,x:c,y:u}=s,p=e.left-c-(1-l)*parseFloat(r),m=e.top-u-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),g=l?e.width/l:e.width,y=a?e.height/a:e.height;return{width:g,height:y,top:m,right:p+g,bottom:m+y,left:p}}const Ej={ignoreTransform:!1};function Pl(e,t){t===void 0&&(t=Ej);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:m,transformOrigin:g}=Mn(e).getComputedStyle(e);m&&(r=jj(r,m,g))}const{top:s,left:l,width:a,height:c,bottom:u,right:p}=r;return{top:s,left:l,width:a,height:c,bottom:u,right:p}}function Qh(e){return Pl(e,{ignoreTransform:!0})}function Tj(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function Ij(e,t){return t===void 0&&(t=Mn(e).getComputedStyle(e)),t.position==="fixed"}function Dj(e,t){t===void 0&&(t=Mn(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(l=>{const a=t[l];return typeof a=="string"?r.test(a):!1})}function Bd(e,t){const r=[];function s(l){if(t!=null&&r.length>=t||!l)return r;if(zd(l)&&l.scrollingElement!=null&&!r.includes(l.scrollingElement))return r.push(l.scrollingElement),r;if(!Al(l)||Hy(l)||r.includes(l))return r;const a=Mn(e).getComputedStyle(l);return l!==e&&Dj(l,a)&&r.push(l),Ij(l,a)?r:s(l.parentNode)}return e?s(e):r}function Zy(e){const[t]=Bd(e,1);return t??null}function Au(e){return!wo||!e?null:Ss(e)?e:Od(e)?zd(e)||e===Cs(e).scrollingElement?window:Al(e)?e:null:null}function Yy(e){return Ss(e)?e.scrollX:e.scrollLeft}function Qy(e){return Ss(e)?e.scrollY:e.scrollTop}function rd(e){return{x:Yy(e),y:Qy(e)}}var pn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(pn||(pn={}));function Xy(e){return!wo||!e?!1:e===document.scrollingElement}function Gy(e){const t={x:0,y:0},r=Xy(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},l=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,c=e.scrollTop>=s.y,u=e.scrollLeft>=s.x;return{isTop:l,isLeft:a,isBottom:c,isRight:u,maxScroll:s,minScroll:t}}const Aj={x:.2,y:.2};function Rj(e,t,r,s,l){let{top:a,left:c,right:u,bottom:p}=r;s===void 0&&(s=10),l===void 0&&(l=Aj);const{isTop:m,isBottom:g,isLeft:y,isRight:_}=Gy(e),x={x:0,y:0},k={x:0,y:0},E={height:t.height*l.y,width:t.width*l.x};return!m&&a<=t.top+E.height?(x.y=pn.Backward,k.y=s*Math.abs((t.top+E.height-a)/E.height)):!g&&p>=t.bottom-E.height&&(x.y=pn.Forward,k.y=s*Math.abs((t.bottom-E.height-p)/E.height)),!_&&u>=t.right-E.width?(x.x=pn.Forward,k.x=s*Math.abs((t.right-E.width-u)/E.width)):!y&&c<=t.left+E.width&&(x.x=pn.Backward,k.x=s*Math.abs((t.left+E.width-c)/E.width)),{direction:x,speed:k}}function Pj(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:c}=window;return{top:0,left:0,right:a,bottom:c,width:a,height:c}}const{top:t,left:r,right:s,bottom:l}=e.getBoundingClientRect();return{top:t,left:r,right:s,bottom:l,width:e.clientWidth,height:e.clientHeight}}function Jy(e){return e.reduce((t,r)=>fs(t,rd(r)),pr)}function Lj(e){return e.reduce((t,r)=>t+Yy(r),0)}function Mj(e){return e.reduce((t,r)=>t+Qy(r),0)}function Oj(e,t){if(t===void 0&&(t=Pl),!e)return;const{top:r,left:s,bottom:l,right:a}=t(e);Zy(e)&&(l<=0||a<=0||r>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const zj=[["x",["left","right"],Lj],["y",["top","bottom"],Mj]];class Fd{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Bd(r),l=Jy(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,c,u]of zj)for(const p of c)Object.defineProperty(this,p,{get:()=>{const m=u(s),g=l[a]-m;return this.rect[p]+g},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yl{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...r)})},this.target=t}add(t,r,s){var l;(l=this.target)==null||l.addEventListener(t,r,s),this.listeners.push([t,r,s])}}function $j(e){const{EventTarget:t}=Mn(e);return e instanceof t?e:Cs(e)}function Ru(e,t){const r=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+s**2)>t:"x"in t&&"y"in t?r>t.x&&s>t.y:"x"in t?r>t.x:"y"in t?s>t.y:!1}var er;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(er||(er={}));function Xh(e){e.preventDefault()}function Bj(e){e.stopPropagation()}var ct;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ct||(ct={}));const ev={start:[ct.Space,ct.Enter],cancel:[ct.Esc],end:[ct.Space,ct.Enter,ct.Tab]},Fj=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case ct.Right:return{...r,x:r.x+25};case ct.Left:return{...r,x:r.x-25};case ct.Down:return{...r,y:r.y+25};case ct.Up:return{...r,y:r.y-25}}};class Vd{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new yl(Cs(r)),this.windowListeners=new yl(Mn(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(er.Resize,this.handleCancel),this.windowListeners.add(er.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(er.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,s=t.node.current;s&&Oj(s),r(pr)}handleKeyDown(t){if(Wy(t)){const{active:r,context:s,options:l}=this.props,{keyboardCodes:a=ev,coordinateGetter:c=Fj,scrollBehavior:u="smooth"}=l,{code:p}=t;if(a.end.includes(p)){this.handleEnd(t);return}if(a.cancel.includes(p)){this.handleCancel(t);return}const{collisionRect:m}=s.current,g=m?{x:m.left,y:m.top}:pr;this.referenceCoordinates||(this.referenceCoordinates=g);const y=c(t,{active:r,context:s.current,currentCoordinates:g});if(y){const _=fo(y,g),x={x:0,y:0},{scrollableAncestors:k}=s.current;for(const E of k){const R=t.code,{isTop:S,isRight:A,isLeft:T,isBottom:M,maxScroll:P,minScroll:j}=Gy(E),V=Pj(E),X={x:Math.min(R===ct.Right?V.right-V.width/2:V.right,Math.max(R===ct.Right?V.left:V.left+V.width/2,y.x)),y:Math.min(R===ct.Down?V.bottom-V.height/2:V.bottom,Math.max(R===ct.Down?V.top:V.top+V.height/2,y.y))},ee=R===ct.Right&&!A||R===ct.Left&&!T,O=R===ct.Down&&!M||R===ct.Up&&!S;if(ee&&X.x!==y.x){const Y=E.scrollLeft+_.x,ie=R===ct.Right&&Y<=P.x||R===ct.Left&&Y>=j.x;if(ie&&!_.y){E.scrollTo({left:Y,behavior:u});return}ie?x.x=E.scrollLeft-Y:x.x=R===ct.Right?E.scrollLeft-P.x:E.scrollLeft-j.x,x.x&&E.scrollBy({left:-x.x,behavior:u});break}else if(O&&X.y!==y.y){const Y=E.scrollTop+_.y,ie=R===ct.Down&&Y<=P.y||R===ct.Up&&Y>=j.y;if(ie&&!_.x){E.scrollTo({top:Y,behavior:u});return}ie?x.y=E.scrollTop-Y:x.y=R===ct.Down?E.scrollTop-P.y:E.scrollTop-j.y,x.y&&E.scrollBy({top:-x.y,behavior:u});break}}this.handleMove(t,fs(fo(y,this.referenceCoordinates),x))}}}handleMove(t,r){const{onMove:s}=this.props;t.preventDefault(),s(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Vd.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:s=ev,onActivation:l}=t,{active:a}=r;const{code:c}=e.nativeEvent;if(s.start.includes(c)){const u=a.activatorNode.current;return u&&e.target!==u?!1:(e.preventDefault(),l==null||l({event:e.nativeEvent}),!0)}return!1}}];function Gh(e){return!!(e&&"distance"in e)}function Jh(e){return!!(e&&"delay"in e)}class Hd{constructor(t,r,s){var l;s===void 0&&(s=$j(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:a}=t,{target:c}=a;this.props=t,this.events=r,this.document=Cs(c),this.documentListeners=new yl(this.document),this.listeners=new yl(s),this.windowListeners=new yl(Mn(c)),this.initialCoordinates=(l=td(a))!=null?l:pr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(er.Resize,this.handleCancel),this.windowListeners.add(er.DragStart,Xh),this.windowListeners.add(er.VisibilityChange,this.handleCancel),this.windowListeners.add(er.ContextMenu,Xh),this.documentListeners.add(er.Keydown,this.handleKeydown),r){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jh(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Gh(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:s,onPending:l}=this.props;l(s,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(er.Click,Bj,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(er.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:s,initialCoordinates:l,props:a}=this,{onMove:c,options:{activationConstraint:u}}=a;if(!l)return;const p=(r=td(t))!=null?r:pr,m=fo(l,p);if(!s&&u){if(Gh(u)){if(u.tolerance!=null&&Ru(m,u.tolerance))return this.handleCancel();if(Ru(m,u.distance))return this.handleStart()}if(Jh(u)&&Ru(m,u.tolerance))return this.handleCancel();this.handlePending(u,m);return}t.cancelable&&t.preventDefault(),c(p)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===ct.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Vj={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ud extends Hd{constructor(t){const{event:r}=t,s=Cs(r.target);super(t,Vj,s)}}Ud.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return!r.isPrimary||r.button!==0?!1:(s==null||s({event:r}),!0)}}];const Hj={move:{name:"mousemove"},end:{name:"mouseup"}};var id;(function(e){e[e.RightClick=2]="RightClick"})(id||(id={}));class Uj extends Hd{constructor(t){super(t,Hj,Cs(t.event.target))}}Uj.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;return r.button===id.RightClick?!1:(s==null||s({event:r}),!0)}}];const Pu={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Wj extends Hd{constructor(t){super(t,Pu)}static setup(){return window.addEventListener(Pu.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Pu.move.name,t)};function t(){}}}Wj.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:s}=t;const{touches:l}=r;return l.length>1?!1:(s==null||s({event:r}),!0)}}];var vl;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vl||(vl={}));var mo;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(mo||(mo={}));function qj(e){let{acceleration:t,activator:r=vl.Pointer,canScroll:s,draggingRect:l,enabled:a,interval:c=5,order:u=mo.TreeOrder,pointerCoordinates:p,scrollableAncestors:m,scrollableAncestorRects:g,delta:y,threshold:_}=e;const x=Zj({delta:y,disabled:!a}),[k,E]=sj(),R=b.useRef({x:0,y:0}),S=b.useRef({x:0,y:0}),A=b.useMemo(()=>{switch(r){case vl.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case vl.DraggableRect:return l}},[r,l,p]),T=b.useRef(null),M=b.useCallback(()=>{const j=T.current;if(!j)return;const V=R.current.x*S.current.x,X=R.current.y*S.current.y;j.scrollBy(V,X)},[]),P=b.useMemo(()=>u===mo.TreeOrder?[...m].reverse():m,[u,m]);b.useEffect(()=>{if(!a||!m.length||!A){E();return}for(const j of P){if((s==null?void 0:s(j))===!1)continue;const V=m.indexOf(j),X=g[V];if(!X)continue;const{direction:ee,speed:O}=Rj(j,X,A,t,_);for(const Y of["x","y"])x[Y][ee[Y]]||(O[Y]=0,ee[Y]=0);if(O.x>0||O.y>0){E(),T.current=j,k(M,c),R.current=O,S.current=ee;return}}R.current={x:0,y:0},S.current={x:0,y:0},E()},[t,M,s,E,a,c,JSON.stringify(A),JSON.stringify(x),k,m,P,g,JSON.stringify(_)])}const Kj={x:{[pn.Backward]:!1,[pn.Forward]:!1},y:{[pn.Backward]:!1,[pn.Forward]:!1}};function Zj(e){let{delta:t,disabled:r}=e;const s=ed(t);return Rl(l=>{if(r||!s||!l)return Kj;const a={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[pn.Backward]:l.x[pn.Backward]||a.x===-1,[pn.Forward]:l.x[pn.Forward]||a.x===1},y:{[pn.Backward]:l.y[pn.Backward]||a.y===-1,[pn.Forward]:l.y[pn.Forward]||a.y===1}}},[r,t,s])}function Yj(e,t){const r=t!=null?e.get(t):void 0,s=r?r.node.current:null;return Rl(l=>{var a;return t==null?null:(a=s??l)!=null?a:null},[s,t])}function Qj(e,t){return b.useMemo(()=>e.reduce((r,s)=>{const{sensor:l}=s,a=l.activators.map(c=>({eventName:c.eventName,handler:t(c.handler,s)}));return[...r,...a]},[]),[e,t])}var jl;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(jl||(jl={}));var sd;(function(e){e.Optimized="optimized"})(sd||(sd={}));const eg=new Map;function Xj(e,t){let{dragging:r,dependencies:s,config:l}=t;const[a,c]=b.useState(null),{frequency:u,measure:p,strategy:m}=l,g=b.useRef(e),y=R(),_=Nl(y),x=b.useCallback(function(S){S===void 0&&(S=[]),!_.current&&c(A=>A===null?S:A.concat(S.filter(T=>!A.includes(T))))},[_]),k=b.useRef(null),E=Rl(S=>{if(y&&!r)return eg;if(!S||S===eg||g.current!==e||a!=null){const A=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){A.set(T.id,T.rect.current);continue}const M=T.node.current,P=M?new Fd(p(M),M):null;T.rect.current=P,P&&A.set(T.id,P)}return A}return S},[e,a,r,y,p]);return b.useEffect(()=>{g.current=e},[e]),b.useEffect(()=>{y||x()},[r,y]),b.useEffect(()=>{a&&a.length>0&&c(null)},[JSON.stringify(a)]),b.useEffect(()=>{y||typeof u!="number"||k.current!==null||(k.current=setTimeout(()=>{x(),k.current=null},u))},[u,y,x,...s]),{droppableRects:E,measureDroppableContainers:x,measuringScheduled:a!=null};function R(){switch(m){case jl.Always:return!1;case jl.BeforeDragging:return r;default:return!r}}}function tv(e,t){return Rl(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Gj(e,t){return tv(e,t)}function Jj(e){let{callback:t,disabled:r}=e;const s=$d(t),l=b.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(s)},[s,r]);return b.useEffect(()=>()=>l==null?void 0:l.disconnect(),[l]),l}function So(e){let{callback:t,disabled:r}=e;const s=$d(t),l=b.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(s)},[r]);return b.useEffect(()=>()=>l==null?void 0:l.disconnect(),[l]),l}function eE(e){return new Fd(Pl(e),e)}function tg(e,t,r){t===void 0&&(t=eE);const[s,l]=b.useState(null);function a(){l(p=>{if(!e)return null;if(e.isConnected===!1){var m;return(m=p??r)!=null?m:null}const g=t(e);return JSON.stringify(p)===JSON.stringify(g)?p:g})}const c=Jj({callback(p){if(e)for(const m of p){const{type:g,target:y}=m;if(g==="childList"&&y instanceof HTMLElement&&y.contains(e)){a();break}}}}),u=So({callback:a});return di(()=>{a(),e?(u==null||u.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(u==null||u.disconnect(),c==null||c.disconnect())},[e]),s}function tE(e){const t=tv(e);return Ky(e,t)}const ng=[];function nE(e){const t=b.useRef(e),r=Rl(s=>e?s&&s!==ng&&e&&t.current&&e.parentNode===t.current.parentNode?s:Bd(e):ng,[e]);return b.useEffect(()=>{t.current=e},[e]),r}function rE(e){const[t,r]=b.useState(null),s=b.useRef(e),l=b.useCallback(a=>{const c=Au(a.target);c&&r(u=>u?(u.set(c,rd(c)),new Map(u)):null)},[]);return b.useEffect(()=>{const a=s.current;if(e!==a){c(a);const u=e.map(p=>{const m=Au(p);return m?(m.addEventListener("scroll",l,{passive:!0}),[m,rd(m)]):null}).filter(p=>p!=null);r(u.length?new Map(u):null),s.current=e}return()=>{c(e),c(a)};function c(u){u.forEach(p=>{const m=Au(p);m==null||m.removeEventListener("scroll",l)})}},[l,e]),b.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,c)=>fs(a,c),pr):Jy(e):pr,[e,t])}function rg(e,t){t===void 0&&(t=[]);const r=b.useRef(null);return b.useEffect(()=>{r.current=null},t),b.useEffect(()=>{const s=e!==pr;s&&!r.current&&(r.current=e),!s&&r.current&&(r.current=null)},[e]),r.current?fo(e,r.current):pr}function iE(e){b.useEffect(()=>{if(!wo)return;const t=e.map(r=>{let{sensor:s}=r;return s.setup==null?void 0:s.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function sE(e,t){return b.useMemo(()=>e.reduce((r,s)=>{let{eventName:l,handler:a}=s;return r[l]=c=>{a(c,t)},r},{}),[e,t])}function nv(e){return b.useMemo(()=>e?Tj(e):null,[e])}const ig=[];function lE(e,t){t===void 0&&(t=Pl);const[r]=e,s=nv(r?Mn(r):null),[l,a]=b.useState(ig);function c(){a(()=>e.length?e.map(p=>Xy(p)?s:new Fd(t(p),p)):ig)}const u=So({callback:c});return di(()=>{u==null||u.disconnect(),c(),e.forEach(p=>u==null?void 0:u.observe(p))},[e]),l}function aE(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Al(t)?t:e}function oE(e){let{measure:t}=e;const[r,s]=b.useState(null),l=b.useCallback(m=>{for(const{target:g}of m)if(Al(g)){s(y=>{const _=t(g);return y?{...y,width:_.width,height:_.height}:_});break}},[t]),a=So({callback:l}),c=b.useCallback(m=>{const g=aE(m);a==null||a.disconnect(),g&&(a==null||a.observe(g)),s(g?t(g):null)},[t,a]),[u,p]=uo(c);return b.useMemo(()=>({nodeRef:u,rect:r,setRef:p}),[r,u,p])}const cE=[{sensor:Ud,options:{}},{sensor:Vd,options:{}}],uE={current:{}},Xa={draggable:{measure:Qh},droppable:{measure:Qh,strategy:jl.WhileDragging,frequency:sd.Optimized},dragOverlay:{measure:Pl}};class xl extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,s;return(r=(s=this.get(t))==null?void 0:s.node.current)!=null?r:void 0}}const dE={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xl,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:po},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xa,measureDroppableContainers:po,windowRect:null,measuringScheduled:!1},fE={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:po,draggableNodes:new Map,over:null,measureDroppableContainers:po},Co=b.createContext(fE),pE=b.createContext(dE);function mE(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xl}}}function hE(e,t){switch(t.type){case nn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case nn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case nn.DragEnd:case nn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case nn.RegisterDroppable:{const{element:r}=t,{id:s}=r,l=new xl(e.droppable.containers);return l.set(s,r),{...e,droppable:{...e.droppable,containers:l}}}case nn.SetDroppableDisabled:{const{id:r,key:s,disabled:l}=t,a=e.droppable.containers.get(r);if(!a||s!==a.key)return e;const c=new xl(e.droppable.containers);return c.set(r,{...a,disabled:l}),{...e,droppable:{...e.droppable,containers:c}}}case nn.UnregisterDroppable:{const{id:r,key:s}=t,l=e.droppable.containers.get(r);if(!l||s!==l.key)return e;const a=new xl(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function gE(e){let{disabled:t}=e;const{active:r,activatorEvent:s,draggableNodes:l}=b.useContext(Co),a=ed(s),c=ed(r==null?void 0:r.id);return b.useEffect(()=>{if(!t&&!s&&a&&c!=null){if(!Wy(a)||document.activeElement===a.target)return;const u=l.get(c);if(!u)return;const{activatorNode:p,node:m}=u;if(!p.current&&!m.current)return;requestAnimationFrame(()=>{for(const g of[p.current,m.current]){if(!g)continue;const y=oj(g);if(y){y.focus();break}}})}},[s,t,l,c,a]),null}function yE(e,t){let{transform:r,...s}=t;return e!=null&&e.length?e.reduce((l,a)=>a({transform:l,...s}),r):r}function vE(e){return b.useMemo(()=>({draggable:{...Xa.draggable,...e==null?void 0:e.draggable},droppable:{...Xa.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Xa.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function xE(e){let{activeNode:t,measure:r,initialRect:s,config:l=!0}=e;const a=b.useRef(!1),{x:c,y:u}=typeof l=="boolean"?{x:l,y:l}:l;di(()=>{if(!c&&!u||!t){a.current=!1;return}if(a.current||!s)return;const m=t==null?void 0:t.node.current;if(!m||m.isConnected===!1)return;const g=r(m),y=Ky(g,s);if(c||(y.x=0),u||(y.y=0),a.current=!0,Math.abs(y.x)>0||Math.abs(y.y)>0){const _=Zy(m);_&&_.scrollBy({top:y.y,left:y.x})}},[t,c,u,s,r])}const rv=b.createContext({...pr,scaleX:1,scaleY:1});var li;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(li||(li={}));const _E=b.memo(function(t){var r,s,l,a;let{id:c,accessibility:u,autoScroll:p=!0,children:m,sensors:g=cE,collisionDetection:y=wj,measuring:_,modifiers:x,...k}=t;const E=b.useReducer(hE,void 0,mE),[R,S]=E,[A,T]=mj(),[M,P]=b.useState(li.Uninitialized),j=M===li.Initialized,{draggable:{active:V,nodes:X,translate:ee},droppable:{containers:O}}=R,Y=V!=null?X.get(V):null,ie=b.useRef({initial:null,translated:null}),ke=b.useMemo(()=>{var wt;return V!=null?{id:V,data:(wt=Y==null?void 0:Y.data)!=null?wt:uE,rect:ie}:null},[V,Y]),se=b.useRef(null),[J,te]=b.useState(null),[ye,G]=b.useState(null),me=Nl(k,Object.values(k)),C=bo("DndDescribedBy",c),I=b.useMemo(()=>O.getEnabled(),[O]),H=vE(_),{droppableRects:N,measureDroppableContainers:we,measuringScheduled:Pe}=Xj(I,{dragging:j,dependencies:[ee.x,ee.y],config:H.droppable}),xe=Yj(X,V),Fe=b.useMemo(()=>ye?td(ye):null,[ye]),Le=ir(),U=Gj(xe,H.draggable.measure);xE({activeNode:V!=null?X.get(V):null,config:Le.layoutShiftCompensation,initialRect:U,measure:H.draggable.measure});const ce=tg(xe,H.draggable.measure,U),ut=tg(xe?xe.parentElement:null),Bt=b.useRef({activatorEvent:null,active:null,activeNode:xe,collisionRect:null,collisions:null,droppableRects:N,draggableNodes:X,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ot=O.getNodeFor((r=Bt.current.over)==null?void 0:r.id),Nt=oE({measure:H.dragOverlay.measure}),mt=(s=Nt.nodeRef.current)!=null?s:xe,Ft=j?(l=Nt.rect)!=null?l:ce:null,Kt=!!(Nt.nodeRef.current&&Nt.rect),sn=tE(Kt?null:ce),ln=nv(mt?Mn(mt):null),jt=nE(j?ot??xe:null),Et=lE(jt),gn=yE(x,{transform:{x:ee.x-sn.x,y:ee.y-sn.y,scaleX:1,scaleY:1},activatorEvent:ye,active:ke,activeNodeRect:ce,containerNodeRect:ut,draggingNodeRect:Ft,over:Bt.current.over,overlayNodeRect:Nt.rect,scrollableAncestors:jt,scrollableAncestorRects:Et,windowRect:ln}),Vt=Fe?fs(Fe,ee):null,ge=rE(jt),be=rg(ge),$=rg(ge,[ce]),Q=fs(gn,be),q=Ft?Cj(Ft,gn):null,ve=ke&&q?y({active:ke,collisionRect:q,droppableRects:N,droppableContainers:I,pointerCoordinates:Vt}):null,K=_j(ve,"id"),[ne,_e]=b.useState(null),Me=Kt?gn:fs(gn,$),At=bj(Me,(a=ne==null?void 0:ne.rect)!=null?a:null,ce),Ht=b.useRef(null),ht=b.useCallback((wt,Jt)=>{let{sensor:an,options:On}=Jt;if(se.current==null)return;const on=X.get(se.current);if(!on)return;const Yt=wt.nativeEvent,cn=new an({active:se.current,activeNode:on,event:Yt,options:On,context:Bt,onAbort(bt){if(!X.get(bt))return;const{onDragAbort:pe}=me.current,Ke={id:bt};pe==null||pe(Ke),A({type:"onDragAbort",event:Ke})},onPending(bt,Z,pe,Ke){if(!X.get(bt))return;const{onDragPending:mr}=me.current,zn={id:bt,constraint:Z,initialCoordinates:pe,offset:Ke};mr==null||mr(zn),A({type:"onDragPending",event:zn})},onStart(bt){const Z=se.current;if(Z==null)return;const pe=X.get(Z);if(!pe)return;const{onDragStart:Ke}=me.current,xt={activatorEvent:Yt,active:{id:Z,data:pe.data,rect:ie}};pl.unstable_batchedUpdates(()=>{Ke==null||Ke(xt),P(li.Initializing),S({type:nn.DragStart,initialCoordinates:bt,active:Z}),A({type:"onDragStart",event:xt}),te(Ht.current),G(Yt)})},onMove(bt){S({type:nn.DragMove,coordinates:bt})},onEnd:Kn(nn.DragEnd),onCancel:Kn(nn.DragCancel)});Ht.current=cn;function Kn(bt){return async function(){const{active:pe,collisions:Ke,over:xt,scrollAdjustedTranslate:mr}=Bt.current;let zn=null;if(pe&&mr){const{cancelDrop:Cr}=me.current;zn={activatorEvent:Yt,active:pe,collisions:Ke,delta:mr,over:xt},bt===nn.DragEnd&&typeof Cr=="function"&&await Promise.resolve(Cr(zn))&&(bt=nn.DragCancel)}se.current=null,pl.unstable_batchedUpdates(()=>{S({type:bt}),P(li.Uninitialized),_e(null),te(null),G(null),Ht.current=null;const Cr=bt===nn.DragEnd?"onDragEnd":"onDragCancel";if(zn){const Ns=me.current[Cr];Ns==null||Ns(zn),A({type:Cr,event:zn})}})}}},[X]),Ut=b.useCallback((wt,Jt)=>(an,On)=>{const on=an.nativeEvent,Yt=X.get(On);if(se.current!==null||!Yt||on.dndKit||on.defaultPrevented)return;const cn={active:Yt};wt(an,Jt.options,cn)===!0&&(on.dndKit={capturedBy:Jt.sensor},se.current=On,ht(an,Jt))},[X,ht]),Zt=Qj(g,Ut);iE(g),di(()=>{ce&&M===li.Initializing&&P(li.Initialized)},[ce,M]),b.useEffect(()=>{const{onDragMove:wt}=me.current,{active:Jt,activatorEvent:an,collisions:On,over:on}=Bt.current;if(!Jt||!an)return;const Yt={active:Jt,activatorEvent:an,collisions:On,delta:{x:Q.x,y:Q.y},over:on};pl.unstable_batchedUpdates(()=>{wt==null||wt(Yt),A({type:"onDragMove",event:Yt})})},[Q.x,Q.y]),b.useEffect(()=>{const{active:wt,activatorEvent:Jt,collisions:an,droppableContainers:On,scrollAdjustedTranslate:on}=Bt.current;if(!wt||se.current==null||!Jt||!on)return;const{onDragOver:Yt}=me.current,cn=On.get(K),Kn=cn&&cn.rect.current?{id:cn.id,rect:cn.rect.current,data:cn.data,disabled:cn.disabled}:null,bt={active:wt,activatorEvent:Jt,collisions:an,delta:{x:on.x,y:on.y},over:Kn};pl.unstable_batchedUpdates(()=>{_e(Kn),Yt==null||Yt(bt),A({type:"onDragOver",event:bt})})},[K]),di(()=>{Bt.current={activatorEvent:ye,active:ke,activeNode:xe,collisionRect:q,collisions:ve,droppableRects:N,draggableNodes:X,draggingNode:mt,draggingNodeRect:Ft,droppableContainers:O,over:ne,scrollableAncestors:jt,scrollAdjustedTranslate:Q},ie.current={initial:Ft,translated:q}},[ke,xe,ve,q,X,mt,Ft,N,O,ne,jt,Q]),qj({...Le,delta:ee,draggingRect:q,pointerCoordinates:Vt,scrollableAncestors:jt,scrollableAncestorRects:Et});const pi=b.useMemo(()=>({active:ke,activeNode:xe,activeNodeRect:ce,activatorEvent:ye,collisions:ve,containerNodeRect:ut,dragOverlay:Nt,draggableNodes:X,droppableContainers:O,droppableRects:N,over:ne,measureDroppableContainers:we,scrollableAncestors:jt,scrollableAncestorRects:Et,measuringConfiguration:H,measuringScheduled:Pe,windowRect:ln}),[ke,xe,ce,ye,ve,ut,Nt,X,O,N,ne,we,jt,Et,H,Pe,ln]),mi=b.useMemo(()=>({activatorEvent:ye,activators:Zt,active:ke,activeNodeRect:ce,ariaDescribedById:{draggable:C},dispatch:S,draggableNodes:X,over:ne,measureDroppableContainers:we}),[ye,Zt,ke,ce,S,C,X,ne,we]);return tr.createElement(qy.Provider,{value:T},tr.createElement(Co.Provider,{value:mi},tr.createElement(pE.Provider,{value:pi},tr.createElement(rv.Provider,{value:At},m)),tr.createElement(gE,{disabled:(u==null?void 0:u.restoreFocus)===!1})),tr.createElement(yj,{...u,hiddenTextDescribedById:C}));function ir(){const wt=(J==null?void 0:J.autoScrollEnabled)===!1,Jt=typeof p=="object"?p.enabled===!1:p===!1,an=j&&!wt&&!Jt;return typeof p=="object"?{...p,enabled:an}:{enabled:an}}}),kE=b.createContext(null),sg="button",wE="Draggable";function bE(e){let{id:t,data:r,disabled:s=!1,attributes:l}=e;const a=bo(wE),{activators:c,activatorEvent:u,active:p,activeNodeRect:m,ariaDescribedById:g,draggableNodes:y,over:_}=b.useContext(Co),{role:x=sg,roleDescription:k="draggable",tabIndex:E=0}=l??{},R=(p==null?void 0:p.id)===t,S=b.useContext(R?rv:kE),[A,T]=uo(),[M,P]=uo(),j=sE(c,t),V=Nl(r);di(()=>(y.set(t,{id:t,key:a,node:A,activatorNode:M,data:V}),()=>{const ee=y.get(t);ee&&ee.key===a&&y.delete(t)}),[y,t]);const X=b.useMemo(()=>({role:x,tabIndex:E,"aria-disabled":s,"aria-pressed":R&&x===sg?!0:void 0,"aria-roledescription":k,"aria-describedby":g.draggable}),[s,x,E,R,k,g.draggable]);return{active:p,activatorEvent:u,activeNodeRect:m,attributes:X,isDragging:R,listeners:s?void 0:j,node:A,over:_,setNodeRef:T,setActivatorNodeRef:P,transform:S}}const SE="Droppable",CE={timeout:25};function NE(e){let{data:t,disabled:r=!1,id:s,resizeObserverConfig:l}=e;const a=bo(SE),{active:c,dispatch:u,over:p,measureDroppableContainers:m}=b.useContext(Co),g=b.useRef({disabled:r}),y=b.useRef(!1),_=b.useRef(null),x=b.useRef(null),{disabled:k,updateMeasurementsFor:E,timeout:R}={...CE,...l},S=Nl(E??s),A=b.useCallback(()=>{if(!y.current){y.current=!0;return}x.current!=null&&clearTimeout(x.current),x.current=setTimeout(()=>{m(Array.isArray(S.current)?S.current:[S.current]),x.current=null},R)},[R]),T=So({callback:A,disabled:k||!c}),M=b.useCallback((X,ee)=>{T&&(ee&&(T.unobserve(ee),y.current=!1),X&&T.observe(X))},[T]),[P,j]=uo(M),V=Nl(t);return b.useEffect(()=>{!T||!P.current||(T.disconnect(),y.current=!1,T.observe(P.current))},[P,T]),b.useEffect(()=>(u({type:nn.RegisterDroppable,element:{id:s,key:a,disabled:r,node:P,rect:_,data:V}}),()=>u({type:nn.UnregisterDroppable,key:a,id:s})),[s]),b.useEffect(()=>{r!==g.current.disabled&&(u({type:nn.SetDroppableDisabled,id:s,key:a,disabled:r}),g.current.disabled=r)},[s,a,r,u]),{active:c,rect:_,isOver:(p==null?void 0:p.id)===s,node:P,over:p,setNodeRef:j}}const jE=/^\s*[-*]\s*(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2})\s+\[([^\]]+)\]\s*(.*)$/;function Wd(e){const t=[];for(const r of e.split(`
73
- `)){const s=r.match(jE);if(!s)continue;const[,l,a,c,u]=s;t.push({date:l,time:a,member:c,message:u})}return t}function EE(e){const t=new Map;for(const s of e)for(const{date:l,time:a,member:c,message:u}of Wd(s.body)){const p=t.get(l)??[];p.push({taskId:s.id,time:a,member:c,message:u}),t.set(l,p)}const r=[...t.entries()].map(([s,l])=>({date:s,entries:l.sort((a,c)=>a.time.localeCompare(c.time)||a.taskId.localeCompare(c.taskId,"en",{numeric:!0}))}));return r.sort((s,l)=>l.date.localeCompare(s.date)),r}const qd=1440*60*1e3,TE=5,IE=["in_progress","todo","pending"],DE={in_progress:2,todo:7,pending:5};function iv(e){return e.filter(t=>t.status==="pending"&&t.blocked_type==="decision").map(t=>({id:t.id,title:t.title,blocked_reason:t.blocked_reason,assignee:t.assignee})).sort((t,r)=>t.id.localeCompare(r.id,"en",{numeric:!0}))}function AE(e){return IE.includes(e)}const RE=/^\s{0,3}#{1,6}\s+作業ログ\s*$/,PE=/^\s{0,3}#{1,6}\s+/;function sv(e){const t=e.split(`
74
- `);let r=-1;for(let l=0;l<t.length;l++)if(RE.test(t[l])){r=l+1;break}if(r===-1)return e;const s=[];for(let l=r;l<t.length&&!PE.test(t[l]);l++)s.push(t[l]);return s.join(`
75
- `)}function LE(e){const t=Wd(sv(e.body));let r=null;for(const l of t){const a=`${l.date}T${l.time}`,c=Date.parse(a);Number.isNaN(c)||(r===null||c>r.ms)&&(r={ms:c,iso:a})}if(r!==null)return r;const s=_l(e.updated);return s===null?null:{ms:s,iso:e.updated}}function No(e,t,r={}){const s=[];for(const l of e){if(!AE(l.status))continue;const a=LE(l);if(a===null)continue;const c=r[l.status]??DE[l.status],u=t-a.ms;u<=c*qd||s.push({id:l.id,title:l.title,status:l.status,lastActivityIso:a.iso,idleDays:Ga(u)})}return s.sort((l,a)=>a.idleDays-l.idleDays||l.id.localeCompare(a.id,"en",{numeric:!0}))}const ME=/未完了|未完|完了予定|完了見込|完了せず|undone|not\s+(done|finished|closed)|n['’]t\s+(done|finished|closed)/i,OE=/完了(した|しました|です|済)?[。.!!]?\s*$/,zE=/\b(done|closed|finished)\b[.!]?\s*$/i;function Ga(e){return Math.max(0,Math.round(e/qd*10)/10)}function _l(e){const t=Date.parse(e);return Number.isNaN(t)?null:t}function $E(e){const t=e.trim();return ME.test(t)?!1:OE.test(t)||zE.test(t)}function BE(e){const t=Wd(sv(e.body));for(let r=t.length-1;r>=0;r--)if($E(t[r].message)){const s=Date.parse(`${t[r].date}T${t[r].time}`);if(!Number.isNaN(s))return s}return _l(e.updated)}function ld(e){const t=new Date(e),r=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");return`${r}-${s}-${l}`}function lg(e){const t=new Date(e);t.setHours(0,0,0,0);const r=(t.getDay()+6)%7;return t.setDate(t.getDate()-r),ld(t.getTime())}function FE(e){const t=e.length;if(t===0)return 0;const r=Math.floor(t/2);return t%2===0?(e[r-1]+e[r])/2:e[r]}function ag(e){return[...e.entries()].map(([t,r])=>({key:t,count:r})).sort((t,r)=>t.key.localeCompare(r.key))}function VE(e,t,r={}){const s=r.maxBottlenecks??TE,l=e.filter(k=>k.status==="done"),a=new Map,c=new Map,u=[],p=new Map;for(const k of l){const E=BE(k);if(p.set(k.assignee,(p.get(k.assignee)??0)+1),E===null)continue;a.set(ld(E),(a.get(ld(E))??0)+1),c.set(lg(E),(c.get(lg(E))??0)+1);const R=_l(k.created);R!==null&&E>=R&&u.push((E-R)/qd)}const m=[...u].sort((k,E)=>k-E),g={sampleSize:m.length,medianDays:m.length>0?Math.round(FE(m)*10)/10:null,meanDays:m.length>0?Math.round(m.reduce((k,E)=>k+E,0)/m.length*10)/10:null},y=_s.map(k=>{const E=e.filter(A=>A.status===k),R=E.map(A=>_l(A.updated)).filter(A=>A!==null).map(A=>t-A);if(R.length===0)return{status:k,count:E.length,avgDays:null,maxDays:null};const S=R.reduce((A,T)=>A+T,0)/R.length;return{status:k,count:E.length,avgDays:Ga(S),maxDays:Ga(Math.max(...R))}}),_=[...p.entries()].map(([k,E])=>({member:k,count:E})).sort((k,E)=>E.count-k.count||(k.member??"￿").localeCompare(E.member??"￿")),x=e.filter(k=>k.status==="pending").map(k=>{const E=_l(k.updated);return{id:k.id,title:k.title,blockedType:k.blocked_type,blockedReason:k.blocked_reason,dwellDays:E!==null?Ga(t-E):0}}).sort((k,E)=>E.dwellDays-k.dwellDays||k.id.localeCompare(E.id,"en",{numeric:!0})).slice(0,s);return{totalTasks:e.length,doneTasks:l.length,completionsByDay:ag(a),completionsByWeek:ag(c),cycleTime:g,dwellByStatus:y,completionsByMember:_,bottlenecks:x}}function lv(e,t,r){const s=t.query.trim().toLowerCase(),l=t.statuses;return e.filter(a=>{const c=a.frontmatter;if(t.label!==""&&!c.labels.includes(t.label)||t.assignee!==""&&c.assignee!==t.assignee||l!==void 0&&l.length>0&&!l.includes(c.status))return!1;if(s==="")return!0;const u=c.assignee!==null?[c.assignee,(r==null?void 0:r(c.assignee))??""]:[""];return[c.id,c.title,...u,...c.labels].join(" ").toLowerCase().includes(s)})}function HE(e){const t=new Set;for(const r of e)for(const s of r.frontmatter.labels)t.add(s);return[...t].sort((r,s)=>r.localeCompare(s))}function Kd(e){const t=new Set(e.map(T=>T.id)),r=new Map;for(const T of e)r.set(T.id,T.dependsOn.filter(M=>t.has(M)&&M!==T.id));const s=0,l=1,a=2,c=new Map,u=new Set;for(const T of t)c.set(T,s);const p=[],m=new Set,g=T=>{c.set(T,l),p.push(T),m.add(T);for(const M of r.get(T)??[])if(c.get(M)===l){const P=p.indexOf(M);for(let j=P;j<p.length;j++)u.add(p[j])}else c.get(M)===s&&g(M);c.set(T,a),p.pop(),m.delete(T)};for(const T of t)c.get(T)===s&&g(T);const y=new Map,_=new Set,x=T=>{if(u.has(T))return null;if(y.has(T))return y.get(T)??null;if(_.has(T))return null;_.add(T);let M=-1;for(const j of r.get(T)??[]){const V=x(j);if(V===null)return _.delete(T),y.set(T,null),null;V>M&&(M=V)}_.delete(T);const P=M+1;return y.set(T,P),P};let k=-1;for(const T of t){const M=x(T);M!==null&&M>k&&(k=M)}const E=(T,M)=>T.localeCompare(M,"en",{numeric:!0});let R=[];if(k>=0){const T=[...t].filter(M=>y.get(M)===k).sort(E);if(T.length>0){const M=[];let P=T[0];for(;P!==void 0;){M.push(P);const j=y.get(P);P=(r.get(P)??[]).filter(X=>y.get(X)===(j??0)-1).sort(E)[0]}R=M.reverse()}}const S=new Set(R);return{nodes:e.map(T=>({id:T.id,level:y.get(T.id)??null,dependsOn:r.get(T.id)??[],onCriticalPath:S.has(T.id)})).sort((T,M)=>T.id.localeCompare(M.id,"en",{numeric:!0})),criticalPath:R,cycleNodes:[...u].sort((T,M)=>T.localeCompare(M,"en",{numeric:!0})),maxLevel:k}}function av(e,t,r,s){const l=e.replaceAll("{id}",()=>t).replaceAll("{path}",()=>r),a=(s??"").trim();return a.length>0?`${l}
76
-
77
- 差し戻し理由: ${a}`:l}function ov(e){return`.kanban/tasks/${e}.md`}function UE(e={}){const t=(e.projectName??"").trim()||"このプロジェクト",r=(e.aiMemberId??"").trim()||"claude",s=e.aiTaskCreation==="proposal"?"起票モードは「proposal」です。新規タスクは status=proposed で起票し、承認されるまで作業を進めないでください。":"起票モードは「free」です。新規タスクは backlog / todo へ直接起票してかまいません。";return[`「${t}」は AIzuchi(ローカル専用カンバン)でタスクを管理しています。あなた(AI エージェント)も参加してください。`,"","- タスクは .kanban/tasks/<ID>.md(Markdown + YAML frontmatter)が唯一の正です。",`- あなたのメンバー ID は \`${r}\` です(created_by / assignee / 作業ログに使用)。`,"- 運用規約と frontmatter スキーマの正典は CLAUDE.md の「AIzuchi 運用規約」セクションです。必ず読んで従ってください。","","タスク操作(CLI が安全・推奨。生ファイル直接編集も可):","- 読取: npx aizuchi task list / show <ID> / next(next は次に着手できるタスクを依存順に提示)",'- 書込: npx aizuchi task add / move <ID> <status> / done <ID> / block <ID> --type --reason / log <ID> "msg" / comment <ID> "msg"',"- いずれも --json 対応。終了コード 0 成功 / 1 入力エラー / 2 不在 / 3 競合。","","進め方: 着手で status=in_progress(assignee 未設定なら自分に)+ 作業ログに着手記録 → 進展ごとに作業ログを 1 行追記 →","完了で受け入れ条件のチェックを更新し status=done。ブロックは status=pending + blocked_type(decision/external/dependency) + blocked_reason。","",s].join(`
78
- `)}function WE(e,t,r={}){if(e.length===0)return"";const s=qE(e),l=s.map((u,p)=>{const m=av(t,u.id,ov(u.id));return`${p+1}. ${m}`}),a=(r.wrapper??"").trim(),c=a.length>0?a.replaceAll("{n}",()=>String(s.length)):"";return c.length>0?`${c}
79
-
80
- ${l.join(`
81
-
82
- `)}`:l.join(`
83
-
84
- `)}function qE(e){const t=Kd(e.map(l=>({id:l.id,dependsOn:l.dependsOn}))),r=new Map(t.nodes.map(l=>[l.id,l.level])),s=l=>{const a=r.get(l);return a??Number.POSITIVE_INFINITY};return[...e].sort((l,a)=>{const c=s(l.id),u=s(a.id);return c!==u?c-u:l.id.localeCompare(a.id,"en",{numeric:!0})})}async function xs(e){var t;try{if(typeof navigator<"u"&&((t=navigator.clipboard)!=null&&t.writeText))return await navigator.clipboard.writeText(e),!0}catch{}try{if(typeof document>"u")return!1;const r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();const s=document.execCommand("copy");return document.body.removeChild(r),s}catch{return!1}}const og=25,cg=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function KE(e,t,r){if(e.length===0)return;if(r==="up")return{x:t.x,y:t.y-og};if(r==="down")return{x:t.x,y:t.y+og};const s=[...e].sort((u,p)=>u.left-p.left);let l=0,a=Number.POSITIVE_INFINITY;for(let u=0;u<s.length;u++){const p=Math.abs(cg(s[u]).x-t.x);p<a&&(a=p,l=u)}const c=r==="left"?l-1:l+1;if(!(c<0||c>=s.length))return cg(s[c])}const ZE='[role="button"], button, input, select, textarea, a',YE=5;function QE(e,t){return Math.abs(t-e)>=YE}function XE(e){if(e===null)return!0;const t=e;return typeof t.closest!="function"?!0:t.closest(ZE)!==null}function GE(e,t,r){return e-(r-t)}function JE(e,t,r){const s=e.getBoundingClientRect();return t>s.left+e.clientWidth||r>s.top+e.clientHeight}function eT(){const e=b.useRef(null),t=b.useRef(null),r=b.useCallback(a=>{const c=e.current,u=t.current;if(!(c===null||u===null||u.pointerId!==a.pointerId)&&(t.current=null,!!u.active)){try{c.releasePointerCapture(a.pointerId)}catch{}c.style.cursor="",c.style.userSelect=""}},[]),s=b.useCallback(a=>{const c=e.current;c!==null&&(a.pointerType!=="mouse"||a.button!==0||XE(a.target)||a.target instanceof Element&&JE(a.target,a.clientX,a.clientY)||(t.current={pointerId:a.pointerId,startX:a.clientX,startScrollLeft:c.scrollLeft,active:!1}))},[]),l=b.useCallback(a=>{const c=e.current,u=t.current;if(!(c===null||u===null||u.pointerId!==a.pointerId)){if(!u.active){if(!QE(u.startX,a.clientX))return;u.active=!0,u.startX=a.clientX,u.startScrollLeft=c.scrollLeft;try{c.setPointerCapture(a.pointerId)}catch{}c.style.cursor="grabbing",c.style.userSelect="none";return}c.scrollLeft=GE(u.startScrollLeft,u.startX,a.clientX)}},[]);return{ref:e,handlers:{onPointerDown:s,onPointerMove:l,onPointerUp:r,onPointerCancel:r}}}function cv(e=3e4){const[t,r]=b.useState(()=>Date.now());return b.useEffect(()=>{const s=setInterval(()=>r(Date.now()),e);return()=>clearInterval(s)},[e]),t}const tT=[{value:"decision",labelKey:"blocked.decision.option"},{value:"external",labelKey:"blocked.external.option"},{value:"dependency",labelKey:"blocked.dependency.option"}];function nT({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=b.useState("decision"),[c,u]=b.useState(""),p=c.trim(),m=p.length>0;return f.jsxs(Mr,{title:s("blockedDialog.title"),onClose:t,children:[f.jsx("p",{className:le.label,style:{marginBottom:12},children:s("blockedDialog.intro",{title:e})}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"blocked-type",children:s("blockedDialog.type")}),f.jsx("select",{id:"blocked-type",className:le.select,value:l,onChange:g=>a(g.target.value),children:tT.map(g=>f.jsx("option",{value:g.value,children:s(g.labelKey)},g.value))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"blocked-reason",children:s("blockedDialog.reason")}),f.jsx("input",{id:"blocked-reason",className:le.input,value:c,onChange:g=>u(g.target.value.replace(/[\r\n]/g,"")),placeholder:s("blockedDialog.reason.placeholder"),autoFocus:!0})]}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:t,children:s("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,disabled:!m,onClick:()=>r(l,p),children:s("blockedDialog.confirm")})]})]})}function rT(e,t=Date.now()){const r=Date.parse(e);if(Number.isNaN(r))return null;const s=Math.max(0,Math.floor((t-r)/1e3));if(s<60)return{unit:"justNow"};const l=Math.floor(s/60);if(l<60)return{unit:"minutes",n:l};const a=Math.floor(l/60);return a<24?{unit:"hours",n:a}:{unit:"days",n:Math.floor(a/24)}}const iT=/^-\s*(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2})\s+\[([^\]]+)\]\s*(.*)$/,sT=/^#{1,6}\s*(?:作業ログ|work log)\s*$/i,lT=/^#{1,6}\s*(?:やりとり|comments?|discussion)\s*$/i;function uv(e,t){const r=e.split(`
85
- `),s=r.findIndex(a=>t.test(a.trim()));if(s===-1)return[];const l=[];for(let a=s+1;a<r.length;a++){const c=r[a];if(/^#{1,6}\s/.test(c))break;if(c.trim()==="")continue;const u=c.match(iT);u?l.push({raw:c,timestamp:u[1],member:u[2],message:u[3]}):c.trim().startsWith("-")&&l.push({raw:c,timestamp:null,member:null,message:c.replace(/^-\s*/,"")})}return l}function Zd(e){return uv(e,sT)}function aT(e){return uv(e,lT)}const oT=/^差し戻し(?:[::]\s*(.*))?$/;function cT(e){const t=Zd(e);for(let r=t.length-1;r>=0;r--){const s=t[r].message.match(oT);if(!s)continue;const l=(s[1]??"").trim();return l.length>0?l:null}return null}const uT=/^\s*[-*]\s+\[([ xX])\]\s/;function dT(e){let t=0,r=0;for(const s of e.split(`
86
- `)){const l=s.match(uT);l&&(r+=1,l[1]!==" "&&(t+=1))}return{done:t,total:r}}const fT="_wrap_12hxw_1",pT="_track_12hxw_7",mT="_fill_12hxw_15",hT="_fillComplete_12hxw_22",gT="_label_12hxw_26",dl={wrap:fT,track:pT,fill:mT,fillComplete:hT,label:gT};function dv({done:e,total:t,label:r}){const{t:s}=pt(),l=t>0?Math.round(e/t*100):0,a=t>0&&e>=t,c=r??s("progress.label",{done:e,total:t});return f.jsxs("div",{className:dl.wrap,children:[f.jsx("div",{className:dl.track,role:"progressbar","aria-label":c,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,"aria-valuetext":t>0?`${e}/${t}`:"—",children:f.jsx("div",{className:`${dl.fill} ${a?dl.fillComplete:""}`,style:{width:`${l}%`}})}),f.jsx("span",{className:dl.label,children:t>0?`${e}/${t}`:"—"})]})}const yT="_card_i0no9_1",vT="_dragging_i0no9_29",xT="_inProgress_i0no9_35",_T="_unread_i0no9_42",kT="_unreadFade_i0no9_1",wT="_selected_i0no9_58",bT="_selectBox_i0no9_65",ST="_selectBoxOn_i0no9_80",CT="_unreadBadge_i0no9_86",NT="_unreadDot_i0no9_98",jT="_topRow_i0no9_106",ET="_id_i0no9_113",TT="_stalledBadge_i0no9_121",IT="_stalledDot_i0no9_134",DT="_priority_i0no9_142",AT="_priorityhigh_i0no9_150",RT="_prioritymedium_i0no9_155",PT="_prioritylow_i0no9_160",LT="_title_i0no9_165",MT="_metaRow_i0no9_172",OT="_assignee_i0no9_179",zT="_memberDot_i0no9_187",$T="_memberhuman_i0no9_194",BT="_memberai_i0no9_198",FT="_memberunknown_i0no9_202",VT="_labels_i0no9_206",HT="_label_i0no9_206",UT="_elapsed_i0no9_220",WT="_elapsedStrong_i0no9_226",qT="_blocked_i0no9_231",KT="_blockedBadge_i0no9_239",ZT="_blockeddecision_i0no9_247",YT="_blockedexternal_i0no9_252",QT="_blockeddependency_i0no9_257",XT="_blockedReason_i0no9_262",GT="_proposalActions_i0no9_268",JT="_actionBtn_i0no9_277",eI="_approveBtn_i0no9_296",tI="_rejectBtn_i0no9_302",Qe={card:yT,dragging:vT,inProgress:xT,unread:_T,unreadFade:kT,selected:wT,selectBox:bT,selectBoxOn:ST,unreadBadge:CT,unreadDot:NT,topRow:jT,id:ET,stalledBadge:TT,stalledDot:IT,priority:DT,priorityhigh:AT,prioritymedium:RT,prioritylow:PT,title:LT,metaRow:MT,assignee:OT,memberDot:zT,memberhuman:$T,memberai:BT,memberunknown:FT,labels:VT,label:HT,elapsed:UT,elapsedStrong:WT,blocked:qT,blockedBadge:KT,blockeddecision:ZT,blockedexternal:YT,blockeddependency:QT,blockedReason:XT,proposalActions:GT,actionBtn:JT,approveBtn:eI,rejectBtn:tI},nI={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function rI({task:e,memberType:t,memberLabel:r,now:s,stalledIdleDays:l,unread:a,onOpen:c,onApprove:u,onReject:p,onArchive:m,onRevise:g,selectionMode:y,selected:_,onToggleSelect:x}){const{t:k}=pt(),{id:E,title:R,status:S,priority:A,labels:T,assignee:M,blocked_type:P,blocked_reason:j,updated:V}=e.frontmatter,{attributes:X,listeners:ee,setNodeRef:O,transform:Y,isDragging:ie}=bE({id:E,data:{status:S},disabled:y}),ke=()=>{y?x==null||x(e):c(e)},se=y?{}:{...ee,...X},J=M?t(M):void 0,te=J==="human"?Qe.memberhuman:J==="ai"?Qe.memberai:Qe.memberunknown,ye=rT(V,s),G=dT(e.body),me=l!==void 0,C=me?k("stalled.cardTitle",{n:l}):void 0;return f.jsxs("div",{ref:O,className:`${Qe.card} ${ie?Qe.dragging:""} ${S==="in_progress"?Qe.inProgress:""} ${a?Qe.unread:""} ${y&&_?Qe.selected:""}`,style:{transform:nd.Translate.toString(Y)},...se,role:y?"checkbox":"button","aria-checked":y?_:void 0,tabIndex:0,onClick:ke,onKeyDown:I=>{var H,N;if(y){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),x==null||x(e));return}if(ie){(H=ee==null?void 0:ee.onKeyDown)==null||H.call(ee,I);return}if(I.key==="Enter"){I.preventDefault(),c(e);return}(N=ee==null?void 0:ee.onKeyDown)==null||N.call(ee,I)},"aria-label":`${E} ${R}`,children:[f.jsxs("div",{className:Qe.topRow,children:[y&&f.jsx("span",{className:`${Qe.selectBox} ${_?Qe.selectBoxOn:""}`,"aria-hidden":"true",title:k("bulkInstruction.checkbox",{id:E}),children:_?"✓":""}),f.jsx("span",{className:Qe.id,children:E}),a&&f.jsxs("span",{className:Qe.unreadBadge,title:k("newActivity.cardTitle"),children:[f.jsx("span",{className:Qe.unreadDot,"aria-hidden":"true"}),k("newActivity.badge")]}),me&&f.jsxs("span",{className:Qe.stalledBadge,title:C,children:[f.jsx("span",{className:Qe.stalledDot,"aria-hidden":"true"}),k("stalled.badge")]}),f.jsx("span",{className:`${Qe.priority} ${Qe[`priority${A}`]}`,children:A})]}),f.jsx("div",{className:Qe.title,children:R}),T.length>0&&f.jsx("div",{className:Qe.labels,children:T.map(I=>f.jsx("span",{className:Qe.label,children:I},I))}),G.total>0&&f.jsx(dv,{done:G.done,total:G.total}),f.jsxs("div",{className:Qe.metaRow,children:[M?f.jsxs("span",{className:Qe.assignee,title:J?k("card.memberType",{type:k(J==="human"?"member.human":"member.ai")}):k("card.unregisteredMember"),children:[f.jsx("span",{className:`${Qe.memberDot} ${te}`,"aria-hidden":"true"}),r(M)]}):f.jsx("span",{className:Qe.assignee,children:k("card.unassigned")}),ye&&f.jsx("span",{className:`${Qe.elapsed} ${S==="in_progress"?Qe.elapsedStrong:""}`,children:k("card.lastUpdated",{elapsed:qk(k,ye)})})]}),S==="pending"&&(P||j)&&f.jsxs("div",{className:Qe.blocked,children:[P&&f.jsx("span",{className:`${Qe.blockedBadge} ${Qe[`blocked${P}`]}`,children:k(nI[P])}),j&&f.jsx("span",{className:Qe.blockedReason,children:j})]}),!y&&S==="proposed"&&(u||p)&&f.jsxs("div",{className:Qe.proposalActions,onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:[p&&f.jsx("button",{type:"button",className:`${Qe.actionBtn} ${Qe.rejectBtn}`,onClick:()=>p(e),children:k("proposal.reject")}),u&&f.jsx("button",{type:"button",className:`${Qe.actionBtn} ${Qe.approveBtn}`,onClick:()=>u(e),children:k("proposal.approve")})]}),!y&&(S==="done"||S==="in_progress"||S==="pending")&&(S==="done"&&m||g)&&f.jsxs("div",{className:Qe.proposalActions,onPointerDown:I=>I.stopPropagation(),onClick:I=>I.stopPropagation(),children:[g&&f.jsx("button",{type:"button",className:Qe.actionBtn,onClick:()=>g(e),children:k("revise.button")}),S==="done"&&m&&f.jsx("button",{type:"button",className:Qe.actionBtn,onClick:()=>m(e),children:k("archive.action")})]})]})}const iI="_column_d1l7j_1",sI="_header_d1l7j_13",lI="_columnOver_d1l7j_22",aI="_headerOver_d1l7j_27",oI="_label_d1l7j_27",cI="_count_d1l7j_37",uI="_countOver_d1l7j_46",dI="_list_d1l7j_51",fI="_over_d1l7j_60",pI="_empty_d1l7j_67",_r={column:iI,header:sI,columnOver:lI,headerOver:aI,label:oI,count:cI,countOver:uI,list:dI,over:fI,empty:pI};function mI({column:e,tasks:t,memberType:r,memberLabel:s,now:l,stalledById:a,unreadIds:c,onOpen:u,onApprove:p,onReject:m,onArchive:g,onRevise:y,selectionMode:_,selectedIds:x,onToggleSelect:k}){const{t:E}=pt(),{setNodeRef:R,isOver:S}=NE({id:e.id}),A=e.wipLimit!==void 0&&t.length>e.wipLimit,T=Md(E,e);return f.jsxs("section",{className:`${_r.column} ${A?_r.columnOver:""}`,"aria-label":T,children:[f.jsxs("header",{className:`${_r.header} ${A?_r.headerOver:""}`,children:[f.jsx("span",{className:_r.label,children:T}),f.jsx("span",{className:`${_r.count} ${A?_r.countOver:""}`,title:e.wipLimit!==void 0?A?E("column.wipExceeded",{limit:e.wipLimit}):E("column.wipLimit",{limit:e.wipLimit}):void 0,children:e.wipLimit!==void 0?`${t.length} / ${e.wipLimit}`:t.length})]}),f.jsx("div",{ref:R,className:`${_r.list} ${S?_r.over:""}`,children:t.length===0?f.jsx("div",{className:_r.empty,children:E("column.empty")}):t.map(M=>f.jsx(rI,{task:M,memberType:r,memberLabel:s,now:l,stalledIdleDays:a.get(M.frontmatter.id),unread:c.has(M.frontmatter.id),onOpen:u,onApprove:p,onReject:m,onArchive:g,onRevise:y,selectionMode:_,selected:x==null?void 0:x.has(M.frontmatter.id),onToggleSelect:k},M.frontmatter.id))})]})}function hI({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=b.useState(""),c=l.trim();return f.jsxs(Mr,{title:s("proposal.reject"),onClose:t,children:[f.jsx("p",{className:le.label,style:{marginBottom:12},children:e}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"reject-reason",children:s("proposal.reject.prompt")}),f.jsx("input",{id:"reject-reason",className:le.input,value:l,onChange:u=>a(u.target.value.replace(/[\r\n]/g,"")),autoFocus:!0})]}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:t,children:s("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnDanger}`,disabled:c.length===0,onClick:()=>r(c),children:s("proposal.reject")})]})]})}function fv({taskTitle:e,onCancel:t,onConfirm:r}){const{t:s}=pt(),[l,a]=b.useState("");return f.jsxs(Mr,{title:s("revise.dialog.title"),onClose:t,children:[f.jsx("p",{className:le.label,style:{marginBottom:12},children:s("revise.dialog.intro",{title:e})}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"revise-reason",children:s("revise.dialog.reason")}),f.jsx("textarea",{id:"revise-reason",className:le.textarea,value:l,onChange:c=>a(c.target.value),placeholder:s("revise.dialog.placeholder"),rows:4,autoFocus:!0})]}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:t,children:s("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,onClick:()=>r(l.trim()),children:s("revise.dialog.confirm")})]})]})}const gI="_filterBar_xll91_1",yI="_search_xll91_12",vI="_filterSpacer_xll91_26",xI="_archiveAllBtn_xll91_30",_I="_selectModeBtn_xll91_42",kI="_selectModeBtnOn_xll91_53",wI="_selectBar_xll91_61",bI="_selectCount_xll91_71",SI="_bulkCopyBtn_xll91_77",CI="_selectClearBtn_xll91_95",NI="_selectHint_xll91_112",jI="_viewsBar_xll91_118",EI="_chip_xll91_128",TI="_chipApply_xll91_137",II="_chipActive_xll91_150",DI="_chipDelete_xll91_160",AI="_saveViewBtn_xll91_179",RI="_saveViewForm_xll91_198",PI="_saveViewInput_xll91_204",LI="_saveViewConfirm_xll91_211",MI="_saveViewCancel_xll91_212",OI="_emptyBoard_xll91_231",zI="_emptyCard_xll91_240",$I="_emptyTitle_xll91_250",BI="_emptyLead_xll91_256",FI="_emptyAddBtn_xll91_262",VI="_emptyAi_xll91_276",HI="_emptyAiNote_xll91_282",UI="_emptyCopyBtn_xll91_289",WI="_board_xll91_301",dt={filterBar:gI,search:yI,filterSpacer:vI,archiveAllBtn:xI,selectModeBtn:_I,selectModeBtnOn:kI,selectBar:wI,selectCount:bI,bulkCopyBtn:SI,selectClearBtn:CI,selectHint:NI,viewsBar:jI,chip:EI,chipApply:TI,chipActive:II,chipDelete:DI,saveViewBtn:AI,saveViewForm:RI,saveViewInput:PI,saveViewConfirm:LI,saveViewCancel:MI,emptyBoard:OI,emptyCard:zI,emptyTitle:$I,emptyLead:BI,emptyAddBtn:FI,emptyAi:VI,emptyAiNote:HI,emptyCopyBtn:UI,board:WI};function qI({board:e,onOpen:t,onChanged:r,onError:s,unreadIds:l,applyView:a,onViewApplied:c,onAddTask:u}){const{t:p}=pt(),m=cv(),[g,y]=b.useState(null),[_,x]=b.useState(null),[k,E]=b.useState(null),[R,S]=b.useState(""),[A,T]=b.useState(""),[M,P]=b.useState(""),[j,V]=b.useState([]),[X,ee]=b.useState(null),[O,Y]=b.useState(!1),[ie,ke]=b.useState(!1),[se,J]=b.useState(()=>new Set),[te,ye]=b.useState(null),[G,me]=b.useState(null),C=e.config.savedViews,I=K=>{S(K.query??""),T(K.label??""),P(K.assignee??""),V(K.statuses??[])};b.useEffect(()=>{a&&(I(a),c==null||c())},[a]);const H={[ct.Left]:"left",[ct.Right]:"right",[ct.Up]:"up",[ct.Down]:"down"},N=(K,{currentCoordinates:ne,context:_e})=>{const Me=H[K.code];if(!Me)return;const At=_e.collisionRect,Ht=At?{x:At.left+At.width/2,y:At.top+At.height/2}:ne,ht=[];return _e.droppableRects.forEach((Ut,Zt)=>{ht.push({id:String(Zt),left:Ut.left,top:Ut.top,width:Ut.width,height:Ut.height})}),KE(ht,Ht,Me)},we=vj(Yh(Ud,{activationConstraint:{distance:5}}),Yh(Vd,{coordinateGetter:N})),Pe=eT(),xe=b.useMemo(()=>{const K=new Map(e.config.members.map(ne=>[ne.id,ne.type]));return ne=>K.get(ne)},[e.config.members]),Fe=b.useMemo(()=>bs(e.config.members),[e.config.members]);b.useEffect(()=>{M!==""&&!e.config.members.some(K=>K.id===M)&&P("")},[e.config.members,M]),b.useEffect(()=>{J(K=>{if(K.size===0)return K;const ne=new Set([...K].filter(_e=>e.tasks.some(Me=>Me.frontmatter.id===_e)));return ne.size===K.size?K:ne})},[e.tasks]);const Le=b.useMemo(()=>HE(e.tasks),[e.tasks]),U=b.useMemo(()=>lv(e.tasks,{query:R,label:A,assignee:M,statuses:j},Fe),[e.tasks,R,A,M,j,Fe]),ce=b.useMemo(()=>{const K=(ne,_e)=>ne.length===_e.length&&ne.every(Me=>_e.includes(Me));return C.findIndex(ne=>(ne.query??"")===R&&(ne.label??"")===A&&(ne.assignee??"")===M&&K(ne.statuses??[],j))},[C,R,A,M,j]),ut=R!==""||A!==""||M!==""||j.length>0,Bt=async K=>{const ne=K.trim();if(ne===""||O)return;Y(!0);const _e={name:ne};R!==""&&(_e.query=R),A!==""&&(_e.label=A),M!==""&&(_e.assignee=M);try{await zm([...C,_e]),ee(null),r()}catch(Me){Me instanceof Un?(s(p("savedView.conflict")),r()):s(Me instanceof Error?Me.message:p("savedView.saveError"))}finally{Y(!1)}},ot=async K=>{if(!O){Y(!0);try{await zm(C.filter((ne,_e)=>_e!==K)),r()}catch(ne){ne instanceof Un?(s(p("savedView.conflict")),r()):s(ne instanceof Error?ne.message:p("savedView.saveError"))}finally{Y(!1)}}},Nt=b.useMemo(()=>{const K=new Map;for(const ne of U){const _e=K.get(ne.frontmatter.status)??[];_e.push(ne),K.set(ne.frontmatter.status,_e)}return K},[U]),mt=b.useMemo(()=>e.tasks.filter(K=>K.frontmatter.status==="done"),[e.tasks]),Ft=b.useMemo(()=>{const K=e.tasks.map(_e=>({id:_e.frontmatter.id,title:_e.frontmatter.title,status:_e.frontmatter.status,updated:_e.frontmatter.updated,body:_e.body})),ne=new Map;for(const _e of No(K,m,e.config.stallThresholds))ne.set(_e.id,_e.idleDays);return ne},[e.tasks,e.config.stallThresholds,m]),Kt=e.config.columns.filter(K=>{var _e;const ne=((_e=Nt.get(K.id))==null?void 0:_e.length)??0;return!(K.hideWhenEmpty&&ne===0)}),sn=async(K,ne,_e)=>{try{await R_({id:K,status:ne,..._e}),r()}catch(Me){s(Me instanceof Error?Me.message:p("move.error"))}},ln=async K=>{try{await P_(K.frontmatter.id),r()}catch(ne){s(ne instanceof Error?ne.message:p("proposal.approve.error"))}},jt=async(K,ne)=>{try{await L_(K,ne),r()}catch(_e){s(_e instanceof Error?_e.message:p("proposal.reject.error"))}},Et=async K=>{try{await Om(K.frontmatter.id),r()}catch(ne){s(ne instanceof Error?ne.message:p("archive.error"))}},gn=async(K,ne,_e)=>{try{await Cg(K,ne.length>0?ne:void 0,_e),r()}catch(Me){Me instanceof Un?(s(p("revise.conflict")),r()):s(Me instanceof Error?Me.message:p("revise.error"))}},Vt=async()=>{if(mt.length!==0&&!(typeof window<"u"&&!window.confirm(p("archive.confirm",{n:mt.length})))){for(const K of mt)try{await Om(K.frontmatter.id)}catch(ne){s(ne instanceof Error?ne.message:p("archive.error"));break}r()}},ge=()=>{ke(K=>(K&&(J(new Set),ye(null)),!K))},be=K=>{const ne=K.frontmatter.id;J(_e=>{const Me=new Set(_e);return Me.has(ne)?Me.delete(ne):Me.add(ne),Me})},$=()=>{J(new Set),ye(null)},Q=async()=>{if(se.size===0)return;const K=e.tasks.filter(Me=>se.has(Me.frontmatter.id)).map(Me=>({id:Me.frontmatter.id,dependsOn:Me.frontmatter.depends_on})),ne=WE(K,e.config.instructionTemplate,{wrapper:p("bulkInstruction.wrapper")}),_e=await xs(ne);ye(_e?"done":"failed"),window.setTimeout(()=>ye(null),2e3)},q=async()=>{const K=p("board.empty.aiInstruction"),ne=await xs(K);me(ne?"done":"failed"),window.setTimeout(()=>me(null),2e3)},ve=K=>{var ht;const{active:ne,over:_e}=K;if(!_e)return;const Me=_e.id,At=(ht=ne.data.current)==null?void 0:ht.status;if(Me===At)return;const Ht=e.tasks.find(Ut=>Ut.frontmatter.id===ne.id);if(Ht){if(Me==="pending"){y({task:Ht});return}sn(String(ne.id),Me)}};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:dt.filterBar,children:[f.jsx("input",{className:dt.search,value:R,onChange:K=>S(K.target.value),placeholder:p("search.placeholder"),"aria-label":p("search.placeholder")}),f.jsxs("select",{value:A,onChange:K=>T(K.target.value),"aria-label":p("search.label"),children:[f.jsxs("option",{value:"",children:[p("search.label"),": ",p("search.all")]}),Le.map(K=>f.jsx("option",{value:K,children:K},K))]}),f.jsxs("select",{value:M,onChange:K=>P(K.target.value),"aria-label":p("search.assignee"),children:[f.jsxs("option",{value:"",children:[p("search.assignee"),": ",p("search.all")]}),e.config.members.map(K=>f.jsx("option",{value:K.id,children:K.label??K.id},K.id))]}),f.jsx("span",{className:dt.filterSpacer}),f.jsx("button",{type:"button",className:`${dt.selectModeBtn} ${ie?dt.selectModeBtnOn:""}`,"aria-pressed":ie,onClick:ge,children:p(ie?"bulkInstruction.exit":"bulkInstruction.select")}),mt.length>0&&f.jsx("button",{type:"button",className:dt.archiveAllBtn,onClick:()=>void Vt(),children:p("archive.archiveDone")})]}),ie&&f.jsxs("div",{className:dt.selectBar,role:"toolbar","aria-label":p("bulkInstruction.select"),children:[f.jsx("span",{className:dt.selectCount,children:p("bulkInstruction.selectedCount",{n:se.size})}),f.jsx("button",{type:"button",className:dt.bulkCopyBtn,disabled:se.size===0,onClick:()=>void Q(),children:p(te==="done"?"bulkInstruction.copied":te==="failed"?"bulkInstruction.copyFailed":"bulkInstruction.copy")}),f.jsx("button",{type:"button",className:dt.selectClearBtn,disabled:se.size===0,onClick:$,children:p("bulkInstruction.clear")}),f.jsx("span",{className:dt.selectHint,children:p("bulkInstruction.hint")})]}),f.jsxs("div",{className:dt.viewsBar,children:[C.map((K,ne)=>f.jsxs("span",{className:dt.chip,children:[f.jsx("button",{type:"button",className:`${dt.chipApply} ${ne===ce?dt.chipActive:""}`,"aria-pressed":ne===ce,onClick:()=>I(K),children:K.name}),f.jsx("button",{type:"button",className:dt.chipDelete,"aria-label":p("savedView.delete",{name:K.name}),title:p("savedView.delete",{name:K.name}),disabled:O,onClick:()=>void ot(ne),children:"×"})]},`${K.name}-${ne}`)),X===null?f.jsx("button",{type:"button",className:dt.saveViewBtn,disabled:!ut,title:p(ut?"savedView.save":"savedView.saveHint"),onClick:()=>ee(""),children:p("savedView.save")}):f.jsxs("form",{className:dt.saveViewForm,onSubmit:K=>{K.preventDefault(),Bt(X)},children:[f.jsx("input",{className:dt.saveViewInput,value:X,autoFocus:!0,placeholder:p("savedView.namePlaceholder"),"aria-label":p("savedView.namePlaceholder"),onChange:K=>ee(K.target.value),onKeyDown:K=>{K.key==="Escape"&&(K.preventDefault(),ee(null))}}),f.jsx("button",{type:"submit",className:dt.saveViewConfirm,disabled:X.trim()===""||O,children:p(O?"common.saving":"common.save")}),f.jsx("button",{type:"button",className:dt.saveViewCancel,onClick:()=>ee(null),children:p("common.cancel")})]})]}),e.tasks.length===0?f.jsx("div",{className:dt.emptyBoard,children:f.jsxs("div",{className:dt.emptyCard,children:[f.jsx("h2",{className:dt.emptyTitle,children:p("board.empty.title")}),f.jsx("p",{className:dt.emptyLead,children:p("board.empty.lead")}),u&&f.jsx("button",{type:"button",className:dt.emptyAddBtn,onClick:u,children:p("board.empty.addFirst")}),f.jsxs("div",{className:dt.emptyAi,children:[f.jsx("p",{className:dt.emptyAiNote,children:p("board.empty.aiNote")}),f.jsx("button",{type:"button",className:dt.emptyCopyBtn,onClick:()=>void q(),children:p(G==="done"?"board.empty.copied":G==="failed"?"board.empty.copyFailed":"board.empty.copyInstruction")})]})]})}):f.jsx(_E,{sensors:we,onDragEnd:ve,children:f.jsx("div",{className:dt.board,ref:Pe.ref,...Pe.handlers,children:Kt.map(K=>f.jsx(mI,{column:K,tasks:Nt.get(K.id)??[],memberType:xe,memberLabel:Fe,now:m,stalledById:Ft,unreadIds:l,onOpen:t,onApprove:ne=>void ln(ne),onReject:ne=>x(ne),onArchive:ne=>void Et(ne),onRevise:ne=>E(ne),selectionMode:ie,selectedIds:se,onToggleSelect:be},K.id))})}),g&&f.jsx(nT,{taskTitle:g.task.frontmatter.title,onCancel:()=>y(null),onConfirm:(K,ne)=>{const _e=g.task.frontmatter.id;y(null),sn(_e,"pending",{blocked_type:K,blocked_reason:ne})}}),_&&f.jsx(hI,{taskTitle:_.frontmatter.title,onCancel:()=>x(null),onConfirm:K=>{const ne=_.frontmatter.id;x(null),jt(ne,K)}}),k&&f.jsx(fv,{taskTitle:k.frontmatter.title,onCancel:()=>E(null),onConfirm:K=>{const ne=k.frontmatter.id,_e=k.mtimeMs;E(null),gn(ne,K,_e)}})]})}const pv=[{id:"home",labelKey:"view.home"},{id:"board",labelKey:"view.board"},{id:"critical",labelKey:"view.critical"},{id:"milestones",labelKey:"view.milestones"},{id:"digest",labelKey:"view.digest"},{id:"docs",labelKey:"view.docs"},{id:"archive",labelKey:"view.archive"},{id:"trash",labelKey:"view.trash"},{id:"stats",labelKey:"view.stats"},{id:"files",labelKey:"view.files"}],ho=pv.map(e=>e.id),KI=new Map(pv.map(e=>[e.id,e.labelKey]));function Yd(e){return KI.get(e)}function mv(e,t){const r=new Set(e),s=new Set,l=[];for(const a of t)!r.has(a.id)||s.has(a.id)||(s.add(a.id),l.push({id:a.id,hidden:a.hidden??!1}));for(const a of e)s.has(a)||l.push({id:a,hidden:!1});return l}function hv(e,t){return mv(e,t).filter(r=>!r.hidden).map(r=>r.id)}const ZI="_overlay_dbkt0_1",YI="_palette_dbkt0_12",QI="_input_dbkt0_24",XI="_list_dbkt0_39",GI="_option_dbkt0_46",JI="_optionActive_dbkt0_56",e2="_empty_dbkt0_61",Ii={overlay:ZI,palette:YI,input:QI,list:XI,option:GI,optionActive:JI,empty:e2},t2=8;function n2({board:e,onClose:t,onSelectView:r,onOpenAdd:s,onOpenSettings:l,onOpenTask:a,onApplySavedView:c}){const{t:u}=pt(),[p,m]=b.useState(""),[g,y]=b.useState(0),[_]=b.useState(()=>Date.now()),x=b.useRef(null),k=b.useRef(null),E=b.useRef(null);gd(E),b.useEffect(()=>{var j;const P=document.activeElement;return(j=x.current)==null||j.focus(),()=>{var V;return(V=P==null?void 0:P.focus)==null?void 0:V.call(P)}},[]);const R=b.useMemo(()=>{const P=e.tasks.map(j=>({id:j.frontmatter.id,title:j.frontmatter.title,status:j.frontmatter.status,updated:j.frontmatter.updated,body:j.body}));return No(P,_,e.config.stallThresholds).map(j=>({id:`stalled:${j.id}`,kind:"task",label:u("stalled.palette",{id:j.id,title:j.title}),taskId:j.id}))},[e.tasks,e.config.stallThresholds,_,u]),S=b.useMemo(()=>{const P=p.trim().toLowerCase(),j=Y=>P===""||Y.toLowerCase().includes(P),X=[...hv(ho,e.config.views).filter(Y=>Y!=="docs"||e.config.docsDirs.length>0).map(Y=>({id:`view:${Y}`,kind:"view",label:`${u("palette.go")}: ${u(Yd(Y)??"view.board")}`,view:Y})),{id:"action:add",kind:"add",label:u("palette.addTask")},{id:"action:settings",kind:"settings",label:u("palette.settings")},...e.config.savedViews.map((Y,ie)=>({id:`savedView:${ie}`,kind:"savedView",label:u("savedView.palette",{name:Y.name}),savedView:Y})),...R].filter(Y=>j(Y.label)),ee=new Set(X.filter(Y=>Y.kind==="task").map(Y=>Y.taskId)),O=P===""?[]:lv(e.tasks,{query:p,label:"",assignee:""}).filter(Y=>!ee.has(Y.frontmatter.id)).slice(0,t2).map(Y=>({id:`task:${Y.frontmatter.id}`,kind:"task",label:`${Y.frontmatter.id} — ${Y.frontmatter.title}`,taskId:Y.frontmatter.id}));return[...X,...O]},[p,e.tasks,e.config.docsDirs,e.config.savedViews,e.config.views,R,u]);b.useEffect(()=>{y(0)},[p]),b.useEffect(()=>{var j;const P=(j=k.current)==null?void 0:j.querySelector(`[data-idx="${g}"]`);P==null||P.scrollIntoView({block:"nearest"})},[g]);const A=P=>{if(P){switch(P.kind){case"view":r(P.view);break;case"add":s();break;case"settings":l();break;case"task":a(P.taskId);break;case"savedView":c(P.savedView);break}t()}},T=P=>{P.nativeEvent.isComposing||(P.key==="Escape"?(P.preventDefault(),P.stopPropagation(),t()):P.key==="ArrowDown"?(P.preventDefault(),P.stopPropagation(),y(j=>S.length===0?0:(j+1)%S.length)):P.key==="ArrowUp"?(P.preventDefault(),P.stopPropagation(),y(j=>S.length===0?0:(j-1+S.length)%S.length)):P.key==="Enter"&&(P.preventDefault(),P.stopPropagation(),A(S[g])))},M=S[g]?`cmd-opt-${S[g].id}`:void 0;return f.jsx("div",{className:Ii.overlay,onClick:P=>{yd(P.target,P.currentTarget)&&(P.stopPropagation(),t())},children:f.jsxs("div",{ref:E,className:Ii.palette,role:"dialog","aria-modal":"true","aria-label":u("palette.title"),children:[f.jsx("input",{ref:x,className:Ii.input,type:"text",role:"combobox","aria-expanded":S.length>0?"true":"false","aria-controls":"cmd-listbox","aria-activedescendant":M,"aria-label":u("palette.title"),placeholder:u("palette.placeholder"),value:p,onChange:P=>m(P.target.value),onKeyDown:T}),S.length===0?f.jsx("p",{className:Ii.empty,children:u("palette.empty")}):f.jsx("ul",{id:"cmd-listbox",className:Ii.list,role:"listbox","aria-label":u("palette.title"),ref:k,children:S.map((P,j)=>f.jsx("li",{id:`cmd-opt-${P.id}`,"data-idx":j,role:"option","aria-selected":j===g,className:`${Ii.option} ${j===g?Ii.optionActive:""}`,onMouseDown:V=>{V.preventDefault(),A(P)},onMouseEnter:()=>y(j),children:P.label},P.id))})]})})}const r2="_view_ubr9h_2",i2="_toolbar_ubr9h_12",s2="_cycleWarn_ubr9h_20",l2="_levels_ubr9h_2",a2="_level_ubr9h_2",o2="_levelCycle_ubr9h_55",c2="_levelHeader_ubr9h_60",u2="_levelLabel_ubr9h_69",d2="_levelCount_ubr9h_75",f2="_levelList_ubr9h_85",p2="_node_ubr9h_95",m2="_nodeCp_ubr9h_116",h2="_nodeCycle_ubr9h_121",g2="_statusproposed_ubr9h_127",y2="_statusbacklog_ubr9h_130",v2="_statustodo_ubr9h_133",x2="_statusin_progress_ubr9h_136",_2="_statuspending_ubr9h_139",k2="_nodeTop_ubr9h_143",w2="_nodeId_ubr9h_149",b2="_cpTag_ubr9h_155",S2="_nodeTitle_ubr9h_161",C2="_deps_ubr9h_166",N2="_depsLabel_ubr9h_173",j2="_depChip_ubr9h_178",E2="_pendingBadge_ubr9h_186",T2="_empty_ubr9h_196",I2="_copyBtn_ubr9h_208",yt={view:r2,toolbar:i2,cycleWarn:s2,levels:l2,level:a2,levelCycle:o2,levelHeader:c2,levelLabel:u2,levelCount:d2,levelList:f2,node:p2,nodeCp:m2,nodeCycle:h2,statusproposed:g2,statusbacklog:y2,statustodo:v2,statusin_progress:x2,statuspending:_2,nodeTop:k2,nodeId:w2,cpTag:b2,nodeTitle:S2,deps:C2,depsLabel:N2,depChip:j2,pendingBadge:E2,empty:T2,copyBtn:I2};function D2({board:e,onOpen:t}){const{t:r}=pt(),[s,l]=b.useState(null),a=b.useMemo(()=>e.tasks.filter(x=>x.frontmatter.status!=="done"),[e.tasks]),c=b.useMemo(()=>new Map(a.map(x=>[x.frontmatter.id,x])),[a]),u=b.useMemo(()=>Kd(a.map(x=>({id:x.frontmatter.id,dependsOn:x.frontmatter.depends_on}))),[a]),p=b.useMemo(()=>{const x=new Map,k=[];for(const E of u.nodes)if(E.level===null)k.push(E);else{const R=x.get(E.level)??[];R.push(E),x.set(E.level,R)}return{map:x,cyclic:k}},[u.nodes]),m=async()=>{const k=["このプロジェクトのタスク依存関係 (depends_on) を見直し、クリティカルパスを最短化できないか検討してください。","CLAUDE.md の運用規約に従い、各タスクファイルの frontmatter `depends_on` を必要に応じて編集してください。","","現在の未完了タスクと依存:",...a.map(R=>`- ${R.frontmatter.id} (${R.frontmatter.status})`+(R.frontmatter.depends_on.length>0?` depends_on: ${R.frontmatter.depends_on.join(", ")}`:""))].join(`
87
- `),E=await xs(k);l(E?"done":"failed"),window.setTimeout(()=>l(null),2e3)},g=[...p.map.keys()].sort((x,k)=>x-k),y=a.length>0,_=x=>{const k=c.get(x.id),E=x.level===null,R=k?yt[`status${k.frontmatter.status}`]:"";return f.jsxs("div",{className:`${yt.node} ${x.onCriticalPath?yt.nodeCp:""} ${E?yt.nodeCycle:R}`,role:"button",tabIndex:0,onClick:()=>k&&t(k),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&k&&(S.preventDefault(),t(k))},children:[f.jsxs("div",{className:yt.nodeTop,children:[f.jsx("span",{className:yt.nodeId,children:x.id}),x.onCriticalPath&&f.jsxs("span",{className:yt.cpTag,children:["★ ",r("cp.criticalPath")]})]}),f.jsx("div",{className:yt.nodeTitle,children:(k==null?void 0:k.frontmatter.title)??x.id}),(k==null?void 0:k.frontmatter.status)==="pending"&&f.jsx("span",{className:yt.pendingBadge,children:r("status.pending")}),x.dependsOn.length>0&&f.jsxs("div",{className:yt.deps,children:[f.jsx("span",{className:yt.depsLabel,children:r("cp.dependsOn")}),x.dependsOn.map(S=>f.jsx("span",{className:yt.depChip,children:S},S))]})]},x.id)};return f.jsxs("div",{className:yt.view,children:[f.jsx("div",{className:yt.toolbar,children:f.jsx("button",{type:"button",className:yt.copyBtn,onClick:()=>void m(),disabled:!y,children:r(s==="done"?"cp.copied":s==="failed"?"cp.copyFailed":"cp.copyReorg")})}),u.cycleNodes.length>0&&f.jsxs("div",{className:yt.cycleWarn,role:"alert",children:["⚠ ",r("cp.cycleWarning",{ids:u.cycleNodes.join(", ")})]}),y?f.jsxs("div",{className:yt.levels,children:[g.map(x=>{const k=p.map.get(x)??[];return f.jsxs("div",{className:yt.level,children:[f.jsxs("div",{className:yt.levelHeader,children:[f.jsx("span",{className:yt.levelLabel,children:r("cp.level",{n:x})}),f.jsx("span",{className:yt.levelCount,children:k.length})]}),f.jsx("div",{className:yt.levelList,children:k.map(_)})]},x)}),p.cyclic.length>0&&f.jsxs("div",{className:`${yt.level} ${yt.levelCycle}`,children:[f.jsxs("div",{className:yt.levelHeader,children:[f.jsxs("span",{className:yt.levelLabel,children:["⚠ ",r("cp.cycleLevel")]}),f.jsx("span",{className:yt.levelCount,children:p.cyclic.length})]}),f.jsx("div",{className:yt.levelList,children:p.cyclic.map(_)})]})]}):f.jsx("div",{className:yt.empty,children:r("cp.empty")})]})}const A2="_root_y75j1_1",R2="_badge_y75j1_6",P2="_badgeActive_y75j1_28",L2="_badgeMuted_y75j1_39",M2="_badgeDot_y75j1_51",O2="_popover_y75j1_62",z2="_popoverTitle_y75j1_77",$2="_empty_y75j1_84",B2="_list_y75j1_90",F2="_item_y75j1_99",V2="_itemHead_y75j1_124",H2="_itemId_y75j1_130",U2="_itemTitle_y75j1_137",W2="_itemReason_y75j1_143",q2="_itemReasonMuted_y75j1_148",K2="_itemAssignee_y75j1_154",kn={root:A2,badge:R2,badgeActive:P2,badgeMuted:L2,badgeDot:M2,popover:O2,popoverTitle:z2,empty:$2,list:B2,item:F2,itemHead:V2,itemId:H2,itemTitle:U2,itemReason:W2,itemReasonMuted:q2,itemAssignee:K2};function Z2({board:e,onOpenTask:t}){const{t:r}=pt(),[s,l]=b.useState(!1),a=b.useRef(null),c=b.useId(),u=b.useMemo(()=>bs(e.config.members),[e.config.members]),p=b.useMemo(()=>{const y=e.tasks.map(_=>({id:_.frontmatter.id,title:_.frontmatter.title,status:_.frontmatter.status,assignee:_.frontmatter.assignee,blocked_type:_.frontmatter.blocked_type,blocked_reason:_.frontmatter.blocked_reason}));return iv(y)},[e.tasks]),m=p.length;b.useEffect(()=>{m===0&&l(!1)},[m]),b.useEffect(()=>{if(!s)return;const y=x=>{a.current&&!a.current.contains(x.target)&&l(!1)},_=x=>{x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),l(!1))};return document.addEventListener("pointerdown",y),document.addEventListener("keydown",_,!0),()=>{document.removeEventListener("pointerdown",y),document.removeEventListener("keydown",_,!0)}},[s]);const g=y=>{t(y),l(!1)};return f.jsxs("div",{className:kn.root,ref:a,children:[f.jsxs("button",{type:"button",className:`${kn.badge} ${m>0?kn.badgeActive:kn.badgeMuted}`,onClick:()=>l(y=>!y),"aria-haspopup":"true","aria-expanded":s,"aria-controls":s?c:void 0,title:r("decisionWaits.open"),children:[f.jsx("span",{className:kn.badgeDot,"aria-hidden":"true"}),r("decisionWaits.badge",{n:m})]}),s&&f.jsxs("div",{id:c,className:kn.popover,role:"region","aria-label":r("decisionWaits.title"),children:[f.jsx("h2",{className:kn.popoverTitle,children:r("decisionWaits.title")}),m===0?f.jsx("p",{className:kn.empty,children:r("decisionWaits.empty")}):f.jsx("ul",{className:kn.list,children:p.map(y=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:kn.item,onClick:()=>g(y.id),children:[f.jsxs("span",{className:kn.itemHead,children:[f.jsx("span",{className:kn.itemId,children:y.id}),f.jsx("span",{className:kn.itemTitle,children:y.title})]}),y.blocked_reason!==null&&y.blocked_reason!==""?f.jsx("span",{className:kn.itemReason,children:y.blocked_reason}):f.jsx("span",{className:kn.itemReasonMuted,children:r("decisionWaits.noReason")}),y.assignee!==null&&f.jsxs("span",{className:kn.itemAssignee,children:[r("decisionWaits.assignee"),": ",u(y.assignee)]})]})},y.id))})]})]})}const Y2="_view_5mig8_1",Q2="_viewEmpty_5mig8_7",X2="_sidebar_5mig8_19",G2="_sidebarTitle_5mig8_28",J2="_navList_5mig8_34",eD="_navBtn_5mig8_40",tD="_navBtnActive_5mig8_67",nD="_navCount_5mig8_73",rD="_detail_5mig8_83",iD="_day_5mig8_89",sD="_dayHeader_5mig8_93",lD="_date_5mig8_102",aD="_count_5mig8_107",oD="_entry_5mig8_112",cD="_time_5mig8_120",uD="_taskId_5mig8_127",dD="_member_5mig8_134",fD="_memberDot_5mig8_142",pD="_memberhuman_5mig8_148",mD="_memberai_5mig8_152",hD="_memberunknown_5mig8_156",gD="_message_5mig8_160",yD="_empty_5mig8_164",Lt={view:Y2,viewEmpty:Q2,sidebar:X2,sidebarTitle:G2,navList:J2,navBtn:eD,navBtnActive:tD,navCount:nD,detail:rD,day:iD,dayHeader:sD,date:lD,count:aD,entry:oD,time:cD,taskId:uD,member:dD,memberDot:fD,memberhuman:pD,memberai:mD,memberunknown:hD,message:gD,empty:yD};function vD({board:e}){const{t}=pt(),[r,s]=b.useState([]),[l,a]=b.useState(null);b.useEffect(()=>{let y=!0;const _=new AbortController;return(async()=>{try{const x=await dd(_.signal);y&&s(x.tasks)}catch{y&&s([])}})(),()=>{y=!1,_.abort()}},[e]);const c=b.useMemo(()=>{const y=new Map(e.config.members.map(_=>[_.id,_.type]));return _=>y.get(_)},[e.config.members]),u=b.useMemo(()=>bs(e.config.members),[e.config.members]),p=b.useMemo(()=>{const y=e.tasks.map(k=>({id:k.frontmatter.id,body:k.body})),_=new Set(y.map(k=>k.id)),x=r.filter(k=>!_.has(k.id));return EE([...y,...x])},[e.tasks,r]),m=y=>{const _=c(y);return _==="human"?Lt.memberhuman:_==="ai"?Lt.memberai:Lt.memberunknown},g=p.find(y=>y.date===l)??p[0]??null;return p.length===0||g===null?f.jsx("div",{className:Lt.viewEmpty,children:f.jsx("div",{className:Lt.empty,children:t("digest.empty")})}):f.jsxs("div",{className:Lt.view,children:[f.jsxs("aside",{className:Lt.sidebar,"aria-label":t("digest.days"),children:[f.jsx("p",{className:Lt.sidebarTitle,children:t("digest.days")}),f.jsx("ul",{className:Lt.navList,children:p.map(y=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${Lt.navBtn} ${y.date===g.date?Lt.navBtnActive:""}`,onClick:()=>a(y.date),children:[f.jsx("span",{children:y.date}),f.jsx("span",{className:Lt.navCount,children:t("digest.entries",{n:y.entries.length})})]})},y.date))})]}),f.jsx("div",{className:Lt.detail,children:f.jsxs("section",{className:Lt.day,children:[f.jsxs("div",{className:Lt.dayHeader,children:[f.jsx("span",{className:Lt.date,children:g.date}),f.jsx("span",{className:Lt.count,children:t("digest.entries",{n:g.entries.length})})]}),g.entries.map((y,_)=>f.jsxs("div",{className:Lt.entry,children:[f.jsx("span",{className:Lt.time,children:y.time}),f.jsx("span",{className:Lt.taskId,children:y.taskId}),f.jsxs("span",{className:Lt.member,children:[f.jsx("span",{className:`${Lt.memberDot} ${m(y.member)}`,"aria-hidden":"true"}),u(y.member)]}),f.jsx("span",{className:Lt.message,children:y.message})]},_))]})})]})}function xD(e,t){return e.filter(r=>(r.related_docs??[]).includes(t)).map(({id:r,title:s,status:l})=>({id:r,title:s,status:l})).sort((r,s)=>r.id.localeCompare(s.id,"en",{numeric:!0}))}const _D=/^---[ \t]*\r?\n/,kD=/^---[ \t]*$/,ug="\uFEFF";function wD(e,t){const r=e.startsWith(ug),s=r?e.slice(1):e,l=bD(s,t);return r?ug+l:l}function bD(e,t){if(!_D.test(e))return e;const r=e.split(`
88
- `);let s=-1;for(let m=1;m<r.length;m++)if(kD.test(r[m].replace(/\r$/,""))){s=m;break}if(s===-1)return e;const l=[];let a=1;for(;a<s;){const m=r[a].replace(/\r$/,"");if(/^related_docs\s*:/.test(m)){for(a++;a<s&&/^\s*-\s/.test(r[a].replace(/\r$/,""));)a++;continue}l.push(r[a]),a++}const c=t.length>0?`related_docs: [${t.map(m=>JSON.stringify(m)).join(", ")}]`:null;if(c!==null){const m=l.findIndex(g=>/^created\s*:/.test(g.replace(/\r$/,"")));m!==-1?l.splice(m,0,c):l.push(c)}const u=[r[0],...l].join(`
89
- `),p=r.slice(s).join(`
90
- `);return`${u}
91
- ${p}`}const SD=/^---[ \t]*\r?\n/,CD=/^---[ \t]*$/,ND="\uFEFF";function Lu(e){const r=e.startsWith(ND)?e.slice(1):e;if(!SD.test(r))return e;const s=r.split(`
92
- `);for(let l=1;l<s.length;l++)if(CD.test(s[l].replace(/\r$/,"")))return s.slice(l+1).join(`
93
- `).replace(/^\r?\n/,"");return e}const jD=25e4;function gv(e,t){const r=e.split(`
94
- `),s=t.split(`
95
- `),l=r.length,a=s.length;if(l*a>jD){const g=[];for(const y of r)g.push({op:"remove",text:y});for(const y of s)g.push({op:"add",text:y});return g}const c=Array.from({length:l+1},()=>new Array(a+1).fill(0));for(let g=l-1;g>=0;g--)for(let y=a-1;y>=0;y--)c[g][y]=r[g]===s[y]?c[g+1][y+1]+1:Math.max(c[g+1][y],c[g][y+1]);const u=[];let p=0,m=0;for(;p<l&&m<a;)r[p]===s[m]?(u.push({op:"equal",text:r[p]}),p++,m++):c[p+1][m]>=c[p][m+1]?(u.push({op:"remove",text:r[p]}),p++):(u.push({op:"add",text:s[m]}),m++);for(;p<l;)u.push({op:"remove",text:r[p++]});for(;m<a;)u.push({op:"add",text:s[m++]});return u}const ED="_diff_1xtfr_1",TD="_line_1xtfr_12",ID="_sign_1xtfr_19",DD="_equal_1xtfr_25",AD="_add_1xtfr_29",RD="_remove_1xtfr_34",os={diff:ED,line:TD,sign:ID,equal:DD,add:AD,remove:RD};function yv({before:e,after:t,ariaLabel:r}){const s=b.useMemo(()=>gv(e,t),[e,t]);return f.jsx("div",{className:os.diff,role:"region","aria-label":r,children:s.map((l,a)=>f.jsxs("div",{className:`${os.line} ${l.op==="add"?os.add:l.op==="remove"?os.remove:os.equal}`,children:[f.jsx("span",{className:os.sign,children:l.op==="add"?"+":l.op==="remove"?"-":" "}),f.jsx("span",{children:l.text})]},a))})}const PD="_intro_u1sm3_1",LD="_legend_u1sm3_8",dg={intro:PD,legend:LD};function vv({serverContent:e,localContent:t,onClose:r,onOverwrite:s,onReload:l}){const{t:a}=pt();return f.jsxs(Mr,{title:a("conflict.title"),onClose:r,wide:!0,children:[f.jsx("p",{className:dg.intro,children:a("conflict.intro")}),f.jsx(yv,{before:e,after:t,ariaLabel:a("conflict.diffAria")}),f.jsxs("p",{className:dg.legend,children:[f.jsx("span",{children:a("conflict.legend.add")}),f.jsx("span",{children:a("conflict.legend.remove")})]}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:l,children:a("conflict.reload")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnDanger}`,onClick:s,children:a("conflict.overwrite")})]})]})}const MD="_dirList_82mry_1",OD="_dirBtn_82mry_12",zD="_dirBtnActive_82mry_30",$D="_preview_82mry_36",cs={dirList:MD,dirBtn:OD,dirBtnActive:zD,preview:$D};function BD(e){const t=[],r=s=>{for(const l of s)l.type==="dir"&&(t.push(l.path),l.children&&r(l.children))};return r(e),t.sort((s,l)=>s.localeCompare(l,"en"))}function FD(e){const t=e.trim().replace(/[/\\]/g,"").replace(/ /g,"");return t.length===0?"":t.toLowerCase().endsWith(".md")?t:`${t}.md`}function VD({onCancel:e,onConfirm:t}){const{t:r}=pt(),[s,l]=b.useState(null),[a,c]=b.useState(!1),[u,p]=b.useState(null),[m,g]=b.useState(""),[y,_]=b.useState("");b.useEffect(()=>{let A=!0;return(async()=>{try{const T=await V_();if(!A)return;l(T);const M=T.find(P=>P.type==="dir");p(M?M.path:"")}catch{A&&c(!0)}})(),()=>{A=!1}},[]);const x=b.useMemo(()=>s?BD(s):[],[s]),k=FD(y),E=m.trim().replace(/[/\\]/g,"").replace(/ /g,""),R=[u??"",E,k].filter(A=>A.length>0).join("/"),S=k.length>0&&u!==null;return f.jsxs(Mr,{title:r("docsSave.title"),onClose:e,children:[a&&f.jsx("p",{className:le.error,children:r("docs.treeError")}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,children:r("docsSave.parent")}),s===null?f.jsx("p",{className:le.label,children:r("board.loading")}):f.jsxs("ul",{className:cs.dirList,"aria-label":r("docsSave.parent"),children:[f.jsx("li",{children:f.jsx("button",{type:"button",className:`${cs.dirBtn} ${u===""?cs.dirBtnActive:""}`,"aria-current":u===""?"true":void 0,onClick:()=>p(""),children:r("docsSave.parentRoot")})}),x.map(A=>f.jsx("li",{children:f.jsx("button",{type:"button",className:`${cs.dirBtn} ${u===A?cs.dirBtnActive:""}`,"aria-current":u===A?"true":void 0,onClick:()=>p(A),children:A})},A))]})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"doc-new-folder",children:r("docsSave.newFolder")}),f.jsx("input",{id:"doc-new-folder",className:le.input,value:m,onChange:A=>g(A.target.value.replace(/[\r\n]/g,"")),placeholder:r("docsSave.newFolder.placeholder")})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"doc-file-name",children:r("docsSave.fileName")}),f.jsx("input",{id:"doc-file-name",className:le.input,value:y,onChange:A=>_(A.target.value.replace(/[\r\n]/g,"")),placeholder:r("docsSave.fileName.placeholder"),autoFocus:!0})]}),R.length>0&&f.jsx("p",{className:cs.preview,children:R}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:e,children:r("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,onClick:()=>t(R),disabled:!S,children:r("docsSave.confirm")})]})]})}function*HD(e){let t=0;for(;t<e.length;){const r=e.indexOf(`
96
- `,t);if(r===-1){yield{line:e.slice(t),nl:""};break}yield{line:e.slice(t,r),nl:`
97
- `},t=r+1}}const UD=[{re:/\[([^\]]*)\]\([^)]*\)/,type:"link"},{re:/`[^`]+`/,type:"code"},{re:/\*\*[^*]+\*\*|__[^_]+__/,type:"bold"},{re:/\*[^*]+\*|_[^_]+_/,type:"italic"}];function Mu(e){if(e.length===0)return[];const t=[];let r=e;for(;r.length>0;){let s=-1,l=0,a="text";for(const{re:c,type:u}of UD){const p=c.exec(r);p!==null&&(s===-1||p.index<s)&&(s=p.index,l=p[0].length,a=u)}if(s===-1){t.push({text:r,type:"text"});break}s>0&&t.push({text:r.slice(0,s),type:"text"}),t.push({text:r.slice(s,s+l),type:a}),r=r.slice(s+l)}return t}const WD=/^#{1,6} /,qD=/^(\s*)([-*+])(\s+)/,KD=/^(\s*)(\d+[.)])(\s+)/,ZD=/^>/,YD=/^\s*(---+|\*\*\*+|___+)\s*$/,QD=/^```/;function XD(e){if(e.length===0)return[];const t=[];let r=!1;for(const{line:s,nl:l}of HD(e)){const a=l;if(QD.test(s)){t.push({text:s+a,type:"fence"}),r=!r;continue}if(r){t.push({text:s+a,type:"codeblock"});continue}if(YD.test(s)){t.push({text:s+a,type:"hr"});continue}if(WD.test(s)){t.push({text:s+a,type:"heading"});continue}if(ZD.test(s)){t.push({text:s+a,type:"blockquote"});continue}const c=qD.exec(s);if(c!==null){const m=c[1]+c[2]+c[3];t.push({text:m,type:"listMarker"});const g=s.slice(m.length);t.push(...Mu(g)),a&&t.push({text:a,type:"text"});continue}const u=KD.exec(s);if(u!==null){const m=u[1]+u[2]+u[3];t.push({text:m,type:"listMarker"});const g=s.slice(m.length);t.push(...Mu(g)),a&&t.push({text:a,type:"text"});continue}const p=Mu(s);t.push(...p),a&&t.push({text:a,type:"text"})}return t}const GD="_wrapper_e02fo_5",JD="_highlight_e02fo_6",eA="_textarea_e02fo_7",tA="_tokenText_e02fo_106",nA="_tokenHeading_e02fo_111",rA="_tokenBold_e02fo_116",iA="_tokenItalic_e02fo_121",sA="_tokenCode_e02fo_126",lA="_tokenCodeblock_e02fo_133",aA="_tokenFence_e02fo_138",oA="_tokenListMarker_e02fo_143",cA="_tokenLink_e02fo_149",uA="_tokenBlockquote_e02fo_155",dA="_tokenHr_e02fo_161",Ka={wrapper:GD,highlight:JD,textarea:eA,tokenText:tA,tokenHeading:nA,tokenBold:rA,tokenItalic:iA,tokenCode:sA,tokenCodeblock:lA,tokenFence:aA,tokenListMarker:oA,tokenLink:cA,tokenBlockquote:uA,tokenHr:dA};function fA(e){return e.endsWith(`
98
- `)?e+" ":e}const pA={text:"tokenText",heading:"tokenHeading",bold:"tokenBold",italic:"tokenItalic",code:"tokenCode",codeblock:"tokenCodeblock",listMarker:"tokenListMarker",link:"tokenLink",blockquote:"tokenBlockquote",hr:"tokenHr",fence:"tokenFence"};function mA({value:e,onChange:t,ariaLabel:r,placeholder:s,id:l}){const a=b.useRef(null),c=m=>{a.current&&(a.current.scrollTop=m.currentTarget.scrollTop,a.current.scrollLeft=m.currentTarget.scrollLeft)},u=fA(e),p=XD(u);return f.jsxs("div",{className:Ka.wrapper,children:[f.jsx("pre",{ref:a,"aria-hidden":"true",className:Ka.highlight,children:p.map((m,g)=>f.jsx("span",{className:Ka[pA[m.type]],children:m.text},g))}),f.jsx("textarea",{id:l,className:Ka.textarea,value:e,onChange:m=>t(m.target.value),onScroll:c,spellCheck:!1,"aria-label":r,placeholder:s})]})}const hA="_view_hliei_1",gA="_tree_hliei_8",yA="_treeTitle_hliei_17",vA="_treeRoot_hliei_23",xA="_treeChildren_hliei_24",_A="_dirName_hliei_34",kA="_fileBtn_hliei_42",wA="_fileBtnActive_hliei_67",bA="_detail_hliei_78",SA="_docPath_hliei_85",CA="_refs_hliei_92",NA="_refsTitle_hliei_100",jA="_refsList_hliei_106",EA="_refBtn_hliei_115",TA="_refId_hliei_139",IA="_refStatus_hliei_146",DA="_markdown_hliei_153",AA="_muted_hliei_172",RA="_broken_hliei_177",PA="_error_hliei_182",LA="_newDocBtn_hliei_188",MA="_toolbar_hliei_201",OA="_toolBtn_hliei_209",zA="_toolBtnPrimary_hliei_221",$A="_toolBtnDanger_hliei_228",BA="_confirm_hliei_234",FA="_tabs_hliei_242",VA="_tab_hliei_242",HA="_tabActive_hliei_260",UA="_editorWrapper_hliei_266",WA="_splitView_hliei_273",qA="_splitPane_hliei_278",KA="_splitPreview_hliei_282",ZA="_editFooter_hliei_299",YA="_dirty_hliei_307",Ve={view:hA,tree:gA,treeTitle:yA,treeRoot:vA,treeChildren:xA,dirName:_A,fileBtn:kA,fileBtnActive:wA,detail:bA,docPath:SA,refs:CA,refsTitle:NA,refsList:jA,refBtn:EA,refId:TA,refStatus:IA,markdown:DA,muted:AA,broken:RA,error:PA,newDocBtn:LA,toolbar:MA,toolBtn:OA,toolBtnPrimary:zA,toolBtnDanger:$A,confirm:BA,tabs:FA,tab:VA,tabActive:HA,editorWrapper:UA,splitView:WA,splitPane:qA,splitPreview:KA,editFooter:ZA,dirty:YA};function QA({board:e,onOpen:t,docsWriteEnabled:r,onCreateTaskFromDoc:s}){const{t:l}=pt(),[a,c]=b.useState(null),[u,p]=b.useState(!1),[m,g]=b.useState(null),[y,_]=b.useState(null),[x,k]=b.useState(null),E=b.useRef(null),[R,S]=b.useState("split"),[A,T]=b.useState(""),[M,P]=b.useState(null),[j,V]=b.useState(!1),[X,ee]=b.useState(!1),[O,Y]=b.useState(null),[ie,ke]=b.useState(!1),[se,J]=b.useState(!1),te=b.useMemo(()=>Dl(l,e.config.columns),[l,e.config.columns]);b.useEffect(()=>{let U=!0;const ce=new AbortController;return(async()=>{try{const ut=await Ng(ce.signal);U&&(c(ut),p(!1))}catch{U&&p(!0)}})(),()=>{U=!1,ce.abort()}},[e]);const ye=async U=>{if(!(me&&typeof window<"u"&&!window.confirm(l("docsEdit.dirtyConfirm")))){g(U),E.current=U,_(null),k(null),J(!1),S("split"),ke(!1);try{const ce=await jg(U);if(E.current!==U)return;_(ce),T(ce.content),P(ce.mtimeMs)}catch(ce){if(E.current!==U)return;ce instanceof br&&(ce.status===404||ce.status===403)?_("broken"):k(ce instanceof Error?ce.message:l("docs.loadError"))}}},G=y!==null&&y!=="broken"?y:null,me=se?A.trim().length>0:G!==null&&A!==G.content,C=()=>{me&&typeof window<"u"&&!window.confirm(l("docsEdit.dirtyConfirm"))||(g(null),E.current=null,_(null),k(null),J(!0),T(""),P(null),S("split"),ke(!1))},I=async(U=M)=>{if(!(m===null||U===null)){V(!0),k(null);try{const ce=await U_(m,A,U);_({path:ce.path,content:A,mtimeMs:ce.mtimeMs}),P(ce.mtimeMs),Y(null),S("split")}catch(ce){ce instanceof Un?Y({serverContent:ce.serverContent,serverMtimeMs:ce.serverMtimeMs}):k(ce instanceof Error?ce.message:l("detail.saveError"))}finally{V(!1)}}},H=async U=>{ee(!1),V(!0),k(null);try{const ce=await H_(U,A);J(!1),g(ce.path),E.current=ce.path,_({path:ce.path,content:A,mtimeMs:ce.mtimeMs}),P(ce.mtimeMs),S("split")}catch(ce){k(ce instanceof Error?ce.message:l("detail.saveError"))}finally{V(!1)}},N=async()=>{if(m!==null){V(!0),k(null);try{await W_(m),ke(!1),g(null),E.current=null,_(null),T(""),P(null)}catch(U){k(U instanceof Error?U.message:l("detail.saveError"))}finally{V(!1)}}},we=b.useMemo(()=>m===null?[]:xD(e.tasks.map(U=>({id:U.frontmatter.id,title:U.frontmatter.title,status:U.frontmatter.status,related_docs:U.frontmatter.related_docs})),m),[e.tasks,m]),Pe=b.useMemo(()=>new Map(e.tasks.map(U=>[U.frontmatter.id,U])),[e.tasks]),xe=U=>f.jsx("li",{children:U.type==="dir"?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:Ve.dirName,children:U.name}),U.children&&U.children.length>0&&f.jsx("ul",{className:Ve.treeChildren,children:U.children.map(xe)})]}):f.jsx("button",{type:"button",className:`${Ve.fileBtn} ${m===U.path?Ve.fileBtnActive:""}`,onClick:()=>void ye(U.path),"aria-current":m===U.path?"true":void 0,children:U.name})},U.path),Fe=f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ve.editorWrapper,children:f.jsx(mA,{value:A,onChange:T,ariaLabel:l("docsEdit.editAria")})}),f.jsxs("div",{className:Ve.editFooter,children:[me&&f.jsx("span",{className:Ve.dirty,children:l("detail.dirty")}),!se&&f.jsx("button",{type:"button",className:Ve.toolBtn,onClick:()=>{G&&T(G.content),k(null)},disabled:!me||j,children:l("common.discard")}),f.jsx("button",{type:"button",className:`${Ve.toolBtn} ${Ve.toolBtnPrimary}`,onClick:()=>se?ee(!0):void I(),disabled:!me||j,children:l(j?"common.saving":"common.save")})]})]}),Le=f.jsx("div",{className:Ve.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:Lu(A)})});return f.jsxs("div",{className:Ve.view,children:[f.jsxs("nav",{className:Ve.tree,"aria-label":l("docs.view.treeTitle"),children:[f.jsx("h2",{className:Ve.treeTitle,children:l("docs.view.treeTitle")}),r&&f.jsx("button",{type:"button",className:Ve.newDocBtn,onClick:C,children:l("docsEdit.new")}),u?f.jsx("p",{className:Ve.error,role:"alert",children:l("docs.treeError")}):a===null?f.jsx("p",{className:Ve.muted,children:l("board.loading")}):a.length===0?f.jsx("p",{className:Ve.muted,children:l("docs.pickerEmpty")}):f.jsx("ul",{className:Ve.treeRoot,children:a.map(xe)})]}),f.jsxs("section",{className:Ve.detail,"aria-label":l("view.docs"),children:[x&&f.jsx("p",{className:Ve.error,role:"alert",children:x}),m===null&&!se?f.jsx("p",{className:Ve.muted,children:l("docs.view.selectPrompt")}):f.jsxs(f.Fragment,{children:[f.jsx("p",{className:Ve.docPath,children:se?l("docsEdit.unsaved"):m}),r&&f.jsxs("div",{className:Ve.toolbar,children:[!se&&m!==null&&f.jsx("button",{type:"button",className:Ve.toolBtn,onClick:()=>s(m),children:l("docsEdit.createTask")}),!se&&m!==null&&!ie&&f.jsx("button",{type:"button",className:Ve.toolBtnDanger,onClick:()=>ke(!0),disabled:j,children:l("docsEdit.delete")}),ie&&f.jsxs("span",{className:Ve.confirm,children:[l("docsEdit.deleteConfirm"),f.jsx("button",{type:"button",className:Ve.toolBtnDanger,onClick:()=>void N(),disabled:j,children:l("docsEdit.deleteYes")}),f.jsx("button",{type:"button",className:Ve.toolBtn,onClick:()=>ke(!1),disabled:j,children:l("common.cancel")})]})]}),!se&&f.jsxs("div",{className:Ve.refs,children:[f.jsx("h3",{className:Ve.refsTitle,children:l("docs.view.referencedBy")}),we.length===0?f.jsx("p",{className:Ve.muted,children:l("docs.view.noRefs")}):f.jsx("ul",{className:Ve.refsList,children:we.map(U=>{const ce=Pe.get(U.id);return f.jsx("li",{children:f.jsxs("button",{type:"button",className:Ve.refBtn,onClick:()=>ce&&t(ce),disabled:!ce,children:[f.jsx("span",{className:Ve.refId,children:U.id})," ",U.title,f.jsx("span",{className:Ve.refStatus,children:te(U.status)})]})},U.id)})})]}),r?f.jsxs(f.Fragment,{children:[f.jsxs("nav",{className:Ve.tabs,children:[f.jsx("button",{type:"button",className:`${Ve.tab} ${R==="split"?Ve.tabActive:""}`,onClick:()=>S("split"),children:l("detail.tab.split")}),f.jsx("button",{type:"button",className:`${Ve.tab} ${R==="edit"?Ve.tabActive:""}`,onClick:()=>S("edit"),children:l("detail.tab.edit")}),f.jsx("button",{type:"button",className:`${Ve.tab} ${R==="preview"?Ve.tabActive:""}`,onClick:()=>S("preview"),children:l("detail.tab.preview")})]}),R==="split"?f.jsxs("div",{className:Ve.splitView,children:[f.jsx("div",{className:Ve.splitPane,children:Fe}),f.jsx("div",{className:`${Ve.splitPane} ${Ve.splitPreview}`,children:Le})]}):R==="edit"?Fe:f.jsx("div",{className:Ve.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:Lu(se?A:(G==null?void 0:G.content)??A)})})]}):y===null?f.jsx("p",{className:Ve.muted,children:l("board.loading")}):y==="broken"?f.jsx("p",{className:Ve.broken,children:l("docs.broken")}):f.jsx("div",{className:Ve.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:Lu(y.content)})})]})]}),O&&f.jsx(vv,{serverContent:O.serverContent,localContent:A,onClose:()=>Y(null),onOverwrite:()=>void I(O.serverMtimeMs),onReload:()=>{T(O.serverContent),P(O.serverMtimeMs),_({path:m??"",content:O.serverContent,mtimeMs:O.serverMtimeMs}),Y(null),k(null)}}),X&&f.jsx(VD,{onCancel:()=>ee(!1),onConfirm:U=>void H(U)})]})}const XA="_boundary_xnu0x_1",GA="_title_xnu0x_10",JA="_detail_xnu0x_16",eR="_retry_xnu0x_22",Za={boundary:XA,title:GA,detail:JA,retry:eR};class tR extends b.Component{constructor(){super(...arguments);Ei(this,"state",{error:null});Ei(this,"handleRetry",()=>{this.setState({error:null})})}static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,s){console.error("AIzuchi view render error:",r,s.componentStack)}render(){return this.state.error!==null?f.jsxs("div",{className:Za.boundary,role:"alert",children:[f.jsx("p",{className:Za.title,children:this.props.title}),f.jsx("p",{className:Za.detail,children:this.props.detail}),f.jsx("button",{type:"button",className:Za.retry,onClick:this.handleRetry,children:this.props.retryLabel})]}):this.props.children}}const nR=new Set(["skills","agents","rules"]),rR=new Set(["skill.md","agent.md"]);function iR(e){const t=e.split("/");for(let r=0;r<t.length-1;r++)if(nR.has(t[r]))return t.slice(0,r+2).join("/");return t.slice(0,-1).join("/")||e}function sR(e){const t=[],r=new Map;for(const s of e){const l=iR(s.path);let a=r.get(l);if(!a){const p=l.split("/").pop()??l;a={key:l,name:p,items:[]},r.set(l,a),t.push(l)}const c=s.path.startsWith(`${l}/`)?s.path.slice(l.length+1):s.path.split("/").pop()??s.path;a.items.push({...s,label:c});const u=(s.path.split("/").pop()??"").toLowerCase();rR.has(u)&&s.name&&(a.name=s.name)}return t.map(s=>r.get(s))}function lR(e,t){const r=t.filter(l=>l.type==="ai");return r.length===0?{members:[],noAiMembers:!0}:{members:r.map(l=>{const a=e.filter(p=>aR(p,l.id)),c=new Map;for(const p of a){const m=c.get(p.kind);m?m.push(p):c.set(p.kind,[p])}const u=Array.from(c.entries()).map(([p,m])=>({kind:p,warnings:m}));return{member:l,groups:u,totalWarnings:a.length}}),noAiMembers:!1}}function aR(e,t){switch(e.kind){case"mode_violation":return e.message.includes(`(${t})`);case"unregistered_member":return e.message.includes(`"${t}"`);case"invalid_task":case"duplicate_id":case"invalid_config":return!0;default:return!1}}const oR="_panel_bonm7_3",cR="_title_bonm7_11",uR="_notice_bonm7_19",dR="_memberList_bonm7_25",fR="_memberCard_bonm7_31",pR="_memberHeader_bonm7_38",mR="_memberId_bonm7_45",hR="_badgeOk_bonm7_52",gR="_badgeWarn_bonm7_62",yR="_groupList_bonm7_73",vR="_group_bonm7_73",xR="_groupKind_bonm7_83",_R="_groupFix_bonm7_89",kR="_warningPaths_bonm7_96",wR="_warningPath_bonm7_96",wn={panel:oR,title:cR,notice:uR,memberList:dR,memberCard:fR,memberHeader:pR,memberId:mR,badgeOk:hR,badgeWarn:gR,groupList:yR,group:vR,groupKind:xR,groupFix:_R,warningPaths:kR,warningPath:wR},fg={invalid_task:"aiHealth.kind.invalid_task",duplicate_id:"aiHealth.kind.duplicate_id",unregistered_member:"aiHealth.kind.unregistered_member",invalid_config:"aiHealth.kind.invalid_config",mode_violation:"aiHealth.kind.mode_violation"},bR={invalid_task:"aiHealth.fix.invalid_task",duplicate_id:"aiHealth.fix.duplicate_id",unregistered_member:"aiHealth.fix.unregistered_member",invalid_config:"aiHealth.fix.invalid_config",mode_violation:"aiHealth.fix.mode_violation"};function SR({board:e}){const{t}=pt(),r=b.useMemo(()=>lR(e.warnings,e.config.members),[e.warnings,e.config.members]),s=!r.noAiMembers&&r.members.every(l=>l.totalWarnings===0);return f.jsxs("section",{className:wn.panel,"aria-label":t("aiHealth.title"),children:[f.jsx("h3",{className:wn.title,children:t("aiHealth.title")}),r.noAiMembers?f.jsx("p",{className:wn.notice,children:t("aiHealth.noAiMembers")}):s?f.jsx("p",{className:wn.notice,children:t("aiHealth.allClear")}):f.jsx("ul",{className:wn.memberList,"aria-label":t("aiHealth.member"),children:r.members.map(l=>f.jsxs("li",{className:wn.memberCard,children:[f.jsxs("div",{className:wn.memberHeader,children:[f.jsx("span",{className:wn.memberId,children:l.member.label??l.member.id}),l.totalWarnings===0?f.jsx("span",{className:wn.badgeOk,children:t("aiHealth.noWarnings")}):f.jsx("span",{className:wn.badgeWarn,children:t("aiHealth.warnings",{n:l.totalWarnings})})]}),l.groups.length>0&&f.jsx("ul",{className:wn.groupList,"aria-label":l.member.label??l.member.id,children:l.groups.map(a=>f.jsxs("li",{className:wn.group,children:[f.jsx("div",{className:wn.groupKind,children:t(fg[a.kind])}),f.jsx("div",{className:wn.groupFix,children:t(bR[a.kind])}),f.jsx("ul",{className:wn.warningPaths,"aria-label":t(fg[a.kind]),children:a.warnings.map((c,u)=>f.jsx("li",{className:wn.warningPath,children:c.path},`${c.path}-${u}`))})]},a.kind))})]},l.member.id))})]})}const CR="_view_7aej0_1",NR="_sidebar_7aej0_7",jR="_sectionTitle_7aej0_15",ER="_fileItem_7aej0_24",TR="_fileItemActive_7aej0_47",IR="_tree_7aej0_53",DR="_treeDir_7aej0_57",AR="_catalogItem_7aej0_63",RR="_catalogName_7aej0_68",PR="_catalogDesc_7aej0_72",LR="_catalogGroup_7aej0_77",MR="_catalogGroupSummary_7aej0_81",OR="_catalogCount_7aej0_98",zR="_main_7aej0_109",$R="_mainHeader_7aej0_117",BR="_mainPath_7aej0_124",FR="_editor_7aej0_131",VR="_notice_7aej0_143",HR="_confirmIntro_7aej0_153",UR="_globalBadge_7aej0_160",WR="_globalWarn_7aej0_172",qR="_footer_7aej0_182",KR="_error_7aej0_189",ZR="_loadError_7aej0_195",YR="_saved_7aej0_202",QR="_btn_7aej0_207",XR="_btnPrimary_7aej0_224",GR="_empty_7aej0_245",Ge={view:CR,sidebar:NR,sectionTitle:jR,fileItem:ER,fileItemActive:TR,tree:IR,treeDir:DR,catalogItem:AR,catalogName:RR,catalogDesc:PR,catalogGroup:LR,catalogGroupSummary:MR,catalogCount:OR,main:zR,mainHeader:$R,mainPath:BR,editor:FR,notice:VR,confirmIntro:HR,globalBadge:UR,globalWarn:WR,footer:qR,error:KR,loadError:ZR,saved:YR,btn:QR,btnPrimary:XR,empty:GR};function JR({board:e}){const{t}=pt(),r=e.config.aiConfigPaths,s=e.config.aiConfigPaths.rootFiles,[l,a]=b.useState([]),[c,u]=b.useState([]),[p,m]=b.useState(null),[g,y]=b.useState(""),[_,x]=b.useState(0),[k,E]=b.useState(""),[R,S]=b.useState("idle"),[A,T]=b.useState(null),[M,P]=b.useState(!1),[j,V]=b.useState(!1),[X,ee]=b.useState([]),[O,Y]=b.useState(!1);b.useEffect(()=>{let I=!0;return(async()=>{try{const[H,N,we]=await Promise.all([F_(),$m(),$m(!0)]);I&&(a(H),u(N),ee(we),P(!1))}catch{I&&P(!0)}})(),()=>{I=!1}},[e]);const ie=b.useMemo(()=>p!==null&&s.includes(p),[p,s]),ke=p!==null&&p.endsWith(".json"),se=k!==g,J=async(I,H=!1)=>{m(I),Y(H),T(null),S("idle");try{const N=await $_(I,H);y(N.content),E(N.content),x(N.mtimeMs)}catch(N){N instanceof br&&N.status===404?(y(""),E(""),x(0),T(t("files.notFound"))):(T(N instanceof Error?N.message:t("files.loadError")),y(""),E(""))}},te=()=>{if(p!==null){if(ke)try{JSON.parse(k)}catch{T(t("files.invalidJson"));return}T(null),V(!0)}},ye=async()=>{if(p!==null){V(!1),S("saving"),T(null);try{const I=await B_(p,k,_,O);y(I.content),x(I.mtimeMs),S("saved")}catch(I){S("idle"),I instanceof br&&I.status===409?T(t("files.conflict")):T(I instanceof Error?I.message:t("files.saveError"))}}},G=(I,H=0)=>I.flatMap(N=>N.type==="dir"?[f.jsxs("div",{className:Ge.treeDir,style:{paddingLeft:H*12},children:[N.name,"/"]},N.path),...G(N.children??[],H+1)]:[f.jsx("button",{type:"button",className:`${Ge.fileItem} ${p===N.path?Ge.fileItemActive:""}`,style:{paddingLeft:H*12+6},onClick:()=>void J(N.path),children:N.name},N.path)]),me=(I,H,N)=>f.jsxs("button",{type:"button",className:`${Ge.fileItem} ${p===I.path&&O===H?Ge.fileItemActive:""}`,onClick:()=>void J(I.path,H),children:[f.jsx("span",{className:Ge.catalogName,children:N?I.label:I.name??I.label}),I.description&&f.jsx("div",{className:Ge.catalogDesc,children:I.description})]},I.path),C=(I,H)=>sR(I).map(N=>N.items.length===1?f.jsx("div",{className:Ge.catalogItem,children:me(N.items[0],H,!1)},N.key):f.jsxs("details",{className:Ge.catalogGroup,children:[f.jsxs("summary",{className:Ge.catalogGroupSummary,children:[N.name," ",f.jsx("span",{className:Ge.catalogCount,children:N.items.length})]}),N.items.map(we=>me(we,H,!0))]},N.key));return f.jsxs("div",{className:Ge.view,children:[f.jsxs("div",{className:Ge.sidebar,children:[f.jsx(SR,{board:e}),f.jsx("div",{className:Ge.sectionTitle,children:t("files.settings")}),[...r.settingsFiles,...s].map(I=>f.jsx("button",{type:"button",className:`${Ge.fileItem} ${p===I?Ge.fileItemActive:""}`,onClick:()=>void J(I),children:I},I)),f.jsx("div",{className:Ge.sectionTitle,children:t("files.browse")}),M&&f.jsx("div",{className:Ge.loadError,children:t("files.treeLoadError")}),f.jsx("div",{className:Ge.tree,children:G(l)}),f.jsx("div",{className:Ge.sectionTitle,children:t("files.catalog")}),c.length===0?f.jsx("div",{className:Ge.catalogDesc,children:t("files.catalogEmpty")}):C(c,!1),f.jsx("div",{className:Ge.sectionTitle,children:t("files.globalCatalog")}),X.length===0?f.jsx("div",{className:Ge.catalogDesc,children:t("files.globalCatalogEmpty")}):C(X,!0)]}),f.jsx("div",{className:Ge.main,children:p===null?f.jsx("div",{className:Ge.empty,children:t("files.selectPrompt")}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:Ge.mainHeader,children:[O&&f.jsx("span",{className:Ge.globalBadge,children:t("files.globalBadge")}),f.jsx("span",{className:Ge.mainPath,children:p})]}),f.jsx("textarea",{className:Ge.editor,value:k,onChange:I=>{E(I.target.value),S("idle")},spellCheck:!1,"aria-label":p}),ie&&f.jsx("div",{className:Ge.notice,children:t("files.restartNotice")}),f.jsxs("div",{className:Ge.footer,children:[A&&f.jsx("span",{className:Ge.error,children:A}),R==="saved"&&!se&&f.jsx("span",{className:Ge.saved,children:t("files.saved")}),f.jsx("span",{style:{flex:1}}),f.jsx("button",{type:"button",className:Ge.btn,onClick:()=>void J(p),children:t("files.reload")}),f.jsx("button",{type:"button",className:`${Ge.btn} ${Ge.btnPrimary}`,onClick:()=>void te(),disabled:!se||R==="saving",children:t(R==="saving"?"files.saving":"files.save")})]})]})}),j&&p!==null&&f.jsxs(Mr,{title:t("files.confirmSave.title"),onClose:()=>V(!1),wide:!0,children:[O&&f.jsxs("p",{className:Ge.globalWarn,children:["⚠ ",t("files.globalWarn")]}),f.jsx("p",{className:Ge.confirmIntro,children:t("files.confirmSave.intro",{file:p})}),f.jsx(yv,{before:g,after:k,ariaLabel:t("files.confirmSave.diffAria")}),f.jsxs("div",{className:le.actions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:()=>V(!1),children:t("files.confirmSave.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,onClick:()=>void ye(),children:t("files.confirmSave.confirm")})]})]})]})}function eP(e,t,r,s,l){const a=iv(e.map(k=>k.frontmatter)),c=No(e.map(k=>({id:k.frontmatter.id,title:k.frontmatter.title,status:k.frontmatter.status,updated:k.frontmatter.updated,body:k.body})),r,s),u=e.filter(k=>k.frontmatter.status!=="done"),p=Kd(u.map(k=>({id:k.frontmatter.id,dependsOn:k.frontmatter.depends_on}))),m=p.criticalPath.length>0?p.criticalPath[0]:null,g=new Map;for(const k of e)g.set(k.frontmatter.status,(g.get(k.frontmatter.status)??0)+1);const y=[];for(const k of t){if(k.wipLimit===void 0)continue;const E=g.get(k.id)??0;E>k.wipLimit&&y.push({columnId:k.id,count:E,limit:k.wipLimit})}const _=e.map(k=>k.frontmatter.id).filter(k=>l.has(k)),x=a.length===0&&c.length===0&&y.length===0&&_.length===0;return{decisions:a,stalled:c,criticalPath:p.criticalPath,hasCycle:p.cycleNodes.length>0,nextActionId:m,wipOverflows:y,unreadIds:_,allClear:x}}const tP="_home_1yzyl_1",nP="_intro_1yzyl_8",rP="_title_1yzyl_14",iP="_lead_1yzyl_19",sP="_allClear_1yzyl_25",lP="_allClearTitle_1yzyl_32",aP="_allClearDetail_1yzyl_38",oP="_hero_1yzyl_44",cP="_sectionTitle_1yzyl_51",uP="_count_1yzyl_60",dP="_chain_1yzyl_74",fP="_arrow_1yzyl_81",pP="_chip_1yzyl_86",mP="_chipNext_1yzyl_109",hP="_startBadge_1yzyl_114",gP="_chipId_1yzyl_124",yP="_chipTitle_1yzyl_130",vP="_grid_1yzyl_135",xP="_card_1yzyl_141",_P="_list_1yzyl_148",kP="_item_1yzyl_157",wP="_itemId_1yzyl_179",bP="_itemTitle_1yzyl_185",SP="_itemMeta_1yzyl_190",CP="_wipRow_1yzyl_195",NP="_empty_1yzyl_204",jP="_cycle_1yzyl_210",Oe={home:tP,intro:nP,title:rP,lead:iP,allClear:sP,allClearTitle:lP,allClearDetail:aP,hero:oP,sectionTitle:cP,count:uP,chain:dP,arrow:fP,chip:pP,chipNext:mP,startBadge:hP,chipId:gP,chipTitle:yP,grid:vP,card:xP,list:_P,item:kP,itemId:wP,itemTitle:bP,itemMeta:SP,wipRow:CP,empty:NP,cycle:jP};function EP({board:e,unreadIds:t,onOpen:r}){const{t:s}=pt(),l=cv(),a=b.useMemo(()=>new Map(e.tasks.map(g=>[g.frontmatter.id,g])),[e.tasks]),c=b.useMemo(()=>new Map(e.config.columns.map(g=>[g.id,g])),[e.config.columns]),u=b.useMemo(()=>eP(e.tasks,e.config.columns,l,e.config.stallThresholds??{},t),[e.tasks,e.config.columns,e.config.stallThresholds,l,t]),p=g=>{const y=a.get(g);y&&r(y)},m=g=>Md(s,c.get(g)??{id:g});return f.jsxs("div",{className:Oe.home,children:[f.jsxs("header",{className:Oe.intro,children:[f.jsx("h2",{className:Oe.title,children:s("view.home")}),f.jsx("p",{className:Oe.lead,children:s("home.lead")})]}),e.tasks.length===0?f.jsx("div",{className:Oe.allClear,children:f.jsx("p",{className:Oe.allClearDetail,children:s("home.empty")})}):f.jsxs(f.Fragment,{children:[u.allClear&&f.jsxs("div",{className:Oe.allClear,role:"status",children:[f.jsxs("p",{className:Oe.allClearTitle,children:["✓ ",s("home.allClear.title")]}),f.jsx("p",{className:Oe.allClearDetail,children:s("home.allClear.detail")})]}),f.jsxs("section",{className:Oe.hero,children:[f.jsx("h3",{className:Oe.sectionTitle,children:s("home.next.title")}),u.hasCycle?f.jsx("p",{className:Oe.cycle,role:"alert",children:s("home.next.cycle")}):u.criticalPath.length===0?f.jsx("p",{className:Oe.empty,children:s("home.next.empty")}):f.jsx("div",{className:Oe.chain,children:u.criticalPath.map((g,y)=>{const _=a.get(g),x=g===u.nextActionId;return f.jsxs(b.Fragment,{children:[y>0&&f.jsx("span",{className:Oe.arrow,"aria-hidden":"true",children:"→"}),f.jsxs("button",{type:"button",className:`${Oe.chip} ${x?Oe.chipNext:""}`,onClick:()=>p(g),"aria-label":s("home.openAria",{id:g}),children:[x&&f.jsx("span",{className:Oe.startBadge,children:s("home.next.startHere")}),f.jsx("span",{className:Oe.chipId,children:g}),_&&f.jsx("span",{className:Oe.chipTitle,children:_.frontmatter.title})]})]},g)})})]}),f.jsxs("div",{className:Oe.grid,children:[f.jsxs("section",{className:Oe.card,children:[f.jsxs("h3",{className:Oe.sectionTitle,children:[s("decisionWaits.title"),u.decisions.length>0&&f.jsx("span",{className:Oe.count,children:u.decisions.length})]}),u.decisions.length===0?f.jsx("p",{className:Oe.empty,children:s("decisionWaits.empty")}):f.jsx("ul",{className:Oe.list,children:u.decisions.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:Oe.item,onClick:()=>p(g.id),"aria-label":s("home.openAria",{id:g.id}),children:[f.jsx("span",{className:Oe.itemId,children:g.id}),f.jsx("span",{className:Oe.itemTitle,children:g.title}),f.jsx("span",{className:Oe.itemMeta,children:g.blocked_reason??s("decisionWaits.noReason")})]})},g.id))})]}),f.jsxs("section",{className:Oe.card,children:[f.jsxs("h3",{className:Oe.sectionTitle,children:[s("stalled.title"),u.stalled.length>0&&f.jsx("span",{className:Oe.count,children:u.stalled.length})]}),u.stalled.length===0?f.jsx("p",{className:Oe.empty,children:s("stalled.empty")}):f.jsx("ul",{className:Oe.list,children:u.stalled.map(g=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:Oe.item,onClick:()=>p(g.id),"aria-label":s("home.openAria",{id:g.id}),children:[f.jsx("span",{className:Oe.itemId,children:g.id}),f.jsx("span",{className:Oe.itemTitle,children:g.title}),f.jsxs("span",{className:Oe.itemMeta,children:[m(g.status)," · ",s("home.idleDays",{n:g.idleDays})]})]})},g.id))})]}),f.jsxs("section",{className:Oe.card,children:[f.jsxs("h3",{className:Oe.sectionTitle,children:[s("home.wip.title"),u.wipOverflows.length>0&&f.jsx("span",{className:Oe.count,children:u.wipOverflows.length})]}),u.wipOverflows.length===0?f.jsx("p",{className:Oe.empty,children:s("home.wip.empty")}):f.jsx("ul",{className:Oe.list,children:u.wipOverflows.map(g=>f.jsx("li",{className:Oe.wipRow,children:s("home.wip.row",{label:m(g.columnId),count:g.count,limit:g.limit})},g.columnId))})]}),f.jsxs("section",{className:Oe.card,children:[f.jsxs("h3",{className:Oe.sectionTitle,children:[s("home.unread.title"),u.unreadIds.length>0&&f.jsx("span",{className:Oe.count,children:u.unreadIds.length})]}),u.unreadIds.length===0?f.jsx("p",{className:Oe.empty,children:s("home.unread.empty")}):f.jsx("ul",{className:Oe.list,children:u.unreadIds.map(g=>{const y=a.get(g);return f.jsx("li",{children:f.jsxs("button",{type:"button",className:Oe.item,onClick:()=>p(g),"aria-label":s("home.openAria",{id:g}),children:[f.jsx("span",{className:Oe.itemId,children:g}),y&&f.jsx("span",{className:Oe.itemTitle,children:y.frontmatter.title})]})},g)})})]})]})]})]})}function TP(e,t){const r=[],s=new Set;for(const u of e)s.has(u.id)||(s.add(u.id),r.push(u));const l=new Map;for(const u of r)l.set(u.id,{done:0,total:0});const a={done:0,total:0};for(const u of t){const p=u.milestone!==null&&s.has(u.milestone)?l.get(u.milestone):a;p.total+=1,u.done&&(p.done+=1)}return{milestones:r.map(u=>({milestone:u,...l.get(u.id)})).sort((u,p)=>u.milestone.order-p.milestone.order||u.milestone.id.localeCompare(p.milestone.id)),unassigned:a}}const IP="_view_z2hgn_1",DP="_viewEmpty_z2hgn_7",AP="_sidebar_z2hgn_19",RP="_sidebarTitle_z2hgn_28",PP="_navList_z2hgn_35",LP="_sideEmpty_z2hgn_36",MP="_navBtn_z2hgn_52",OP="_navBtnActive_z2hgn_76",zP="_navLabel_z2hgn_82",$P="_navCount_z2hgn_88",BP="_detail_z2hgn_100",FP="_sectionTitle_z2hgn_106",VP="_histStatus_z2hgn_115",HP="_milestone_z2hgn_122",UP="_milestoneactive_z2hgn_131",WP="_milestonedone_z2hgn_135",qP="_milestoneplanned_z2hgn_139",KP="_msInfo_z2hgn_143",ZP="_msTitle_z2hgn_148",YP="_msStatus_z2hgn_152",QP="_msProgress_z2hgn_157",XP="_month_z2hgn_161",GP="_monthHeader_z2hgn_165",JP="_histEntry_z2hgn_173",eL="_histId_z2hgn_185",tL="_histTitle_z2hgn_192",nL="_histSummary_z2hgn_197",rL="_empty_z2hgn_218",Ze={view:IP,viewEmpty:DP,sidebar:AP,sidebarTitle:RP,navList:PP,sideEmpty:LP,navBtn:MP,navBtnActive:OP,navLabel:zP,navCount:$P,detail:BP,sectionTitle:FP,histStatus:VP,milestone:HP,milestoneactive:UP,milestonedone:WP,milestoneplanned:qP,msInfo:KP,msTitle:ZP,msStatus:YP,msProgress:QP,month:XP,monthHeader:GP,histEntry:JP,histId:eL,histTitle:tL,histSummary:nL,empty:rL},iL={planned:"milestone.status.planned",active:"milestone.status.active",done:"milestone.status.done"};function pg(e){var s;const t=Zd(e),r=t[t.length-1];return r?{summary:r.message,date:((s=r.timestamp)==null?void 0:s.slice(0,7))??null}:{summary:"",date:null}}function sL({board:e,onOpen:t}){const{t:r}=pt(),[s,l]=b.useState([]),[a,c]=b.useState(null);b.useEffect(()=>{let S=!0;const A=new AbortController;return(async()=>{try{const T=await dd(A.signal);S&&l(T.tasks)}catch{S&&l([])}})(),()=>{S=!1,A.abort()}},[e]);const u=b.useMemo(()=>TP(e.config.milestones,e.tasks.map(S=>({milestone:S.frontmatter.milestone,done:S.frontmatter.status==="done"}))),[e.config.milestones,e.tasks]),p=b.useMemo(()=>{const S=[],A=new Set;for(const M of e.tasks){if(M.frontmatter.status!=="done")continue;A.add(M.frontmatter.id);const{summary:P,date:j}=pg(M.body);S.push({id:M.frontmatter.id,title:M.frontmatter.title,month:j??M.frontmatter.updated.slice(0,7),summary:P,task:M})}for(const M of s){if(A.has(M.id))continue;const{summary:P,date:j}=pg(M.body);S.push({id:M.id,title:M.id,month:j??"----",summary:P})}const T=new Map;for(const M of S){const P=T.get(M.month)??[];P.push(M),T.set(M.month,P)}return[...T.entries()].sort((M,P)=>P[0].localeCompare(M[0])).map(([M,P])=>({month:M,items:P.sort((j,V)=>j.id.localeCompare(V.id,"en",{numeric:!0}))}))},[e.tasks,s]),m=b.useMemo(()=>Dl(r,e.config.columns),[r,e.config.columns]),g=b.useMemo(()=>new Set(e.config.milestones.map(S=>S.id)),[e.config.milestones]),y=S=>e.tasks.filter(A=>S===null?A.frontmatter.milestone===null||!g.has(A.frontmatter.milestone):A.frontmatter.milestone===S).sort((A,T)=>A.frontmatter.id.localeCompare(T.frontmatter.id,"en",{numeric:!0})),x=a!==null&&(a.kind==="milestone"&&u.milestones.some(S=>S.milestone.id===a.id)||a.kind==="unassigned"&&u.unassigned.total>0||a.kind==="month"&&p.some(S=>S.month===a.month))?a:p.length>0?{kind:"month",month:p[0].month}:u.milestones.length>0?{kind:"milestone",id:u.milestones[0].milestone.id}:u.unassigned.total>0?{kind:"unassigned"}:null,k=S=>x===null?!1:S.kind==="milestone"?x.kind==="milestone"&&x.id===S.id:S.kind==="month"?x.kind==="month"&&x.month===S.month:x.kind==="unassigned";if(x===null)return f.jsx("div",{className:Ze.viewEmpty,children:f.jsx("div",{className:Ze.empty,children:r("milestone.empty")})});const E=S=>{const A=S!==null?S.milestone.title:r("milestone.unassignedTasks"),T=S!==null?Ze[`milestone${S.milestone.status}`]:Ze.milestoneplanned,M=S!==null?S.done:u.unassigned.done,P=S!==null?S.total:u.unassigned.total,j=y(S!==null?S.milestone.id:null);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`${Ze.milestone} ${T}`,children:[f.jsxs("div",{className:Ze.msInfo,children:[f.jsx("div",{className:Ze.msTitle,children:A}),S!==null&&f.jsx("span",{className:Ze.msStatus,children:r(iL[S.milestone.status])})]}),f.jsx("div",{className:Ze.msProgress,children:f.jsx(dv,{done:M,total:P})})]}),f.jsx("p",{className:Ze.sectionTitle,children:r("milestone.tasks")}),j.length===0?f.jsx("div",{className:Ze.empty,children:r("column.empty")}):j.map(V=>f.jsxs("div",{className:Ze.histEntry,role:"button",tabIndex:0,onClick:()=>t(V),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),t(V))},children:[f.jsx("span",{className:Ze.histId,children:V.frontmatter.id}),f.jsx("span",{className:Ze.histTitle,children:V.frontmatter.title}),f.jsx("span",{className:Ze.histStatus,children:m(V.frontmatter.status)})]},V.frontmatter.id))]})},R=S=>{const A=p.find(T=>T.month===S);return A?f.jsxs("section",{className:Ze.month,children:[f.jsx("div",{className:Ze.monthHeader,children:A.month}),A.items.map(T=>f.jsxs("div",{className:Ze.histEntry,role:T.task?"button":void 0,tabIndex:T.task?0:void 0,onClick:()=>T.task&&t(T.task),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&T.task&&(M.preventDefault(),t(T.task))},children:[f.jsx("span",{className:Ze.histId,children:T.id}),f.jsx("span",{className:Ze.histTitle,title:T.title,children:T.title}),T.summary&&f.jsx("span",{className:Ze.histSummary,children:T.summary})]},T.id))]}):null};return f.jsxs("div",{className:Ze.view,children:[f.jsxs("aside",{className:Ze.sidebar,"aria-label":r("view.milestones"),children:[f.jsx("p",{className:Ze.sidebarTitle,children:r("milestone.roadmap")}),u.milestones.length===0&&u.unassigned.total===0?f.jsx("p",{className:Ze.sideEmpty,children:r("milestone.empty")}):f.jsxs("ul",{className:Ze.navList,children:[u.milestones.map(S=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${Ze.navBtn} ${k({kind:"milestone",id:S.milestone.id})?Ze.navBtnActive:""}`,onClick:()=>c({kind:"milestone",id:S.milestone.id}),children:[f.jsx("span",{className:Ze.navLabel,children:S.milestone.title}),f.jsxs("span",{className:Ze.navCount,children:[S.done,"/",S.total]})]})},S.milestone.id)),u.unassigned.total>0&&f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${Ze.navBtn} ${k({kind:"unassigned"})?Ze.navBtnActive:""}`,onClick:()=>c({kind:"unassigned"}),children:[f.jsx("span",{className:Ze.navLabel,children:r("milestone.unassignedTasks")}),f.jsxs("span",{className:Ze.navCount,children:[u.unassigned.done,"/",u.unassigned.total]})]})})]}),f.jsx("p",{className:Ze.sidebarTitle,children:r("milestone.history")}),p.length===0?f.jsx("p",{className:Ze.sideEmpty,children:r("digest.empty")}):f.jsx("ul",{className:Ze.navList,children:p.map(S=>f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${Ze.navBtn} ${k({kind:"month",month:S.month})?Ze.navBtnActive:""}`,onClick:()=>c({kind:"month",month:S.month}),children:[f.jsx("span",{className:Ze.navLabel,children:S.month}),f.jsx("span",{className:Ze.navCount,children:S.items.length})]})},S.month))})]}),f.jsx("div",{className:Ze.detail,children:x.kind==="month"?R(x.month):E(x.kind==="milestone"?u.milestones.find(S=>S.milestone.id===x.id)??null:null)})]})}function mg(e,t){return e.filter(r=>r.frontmatter.created_by===t||r.frontmatter.assignee===t).length}function lL(e,t,r){const s=[];for(const _ of t)_.originalId===null||_.id.trim()===""||_.id===_.originalId||s.push({from:_.originalId,to:_.id,count:mg(r,_.originalId)});const l=new Set(t.map(_=>_.originalId).filter(_=>_!==null)),a=t.map(_=>_.id).filter(_=>_.trim()!==""),c=new Set(a),u=e.filter(_=>!l.has(_)&&!c.has(_)).map(_=>({id:_,count:mg(r,_)})),p=new Set([...s.map(_=>_.from),...u.map(_=>_.id)]),m=s.some(_=>p.has(_.to)),g=new Set,y=[];for(const _ of a)g.has(_)&&!y.includes(_)&&y.push(_),g.add(_);return{renames:s,removals:u,swap:m,duplicates:y}}const aL="_section_yrpf3_1",oL="_sectionTitle_yrpf3_5",cL="_modeBox_yrpf3_14",uL="_memberRow_yrpf3_22",dL="_memberId_yrpf3_41",fL="_removeBtn_yrpf3_45",pL="_addBtn_yrpf3_57",mL="_pathNote_yrpf3_71",hL="_colRow_yrpf3_79",gL="_colId_yrpf3_97",yL="_viewName_yrpf3_103",vL="_colWip_yrpf3_109",xL="_colCheck_yrpf3_113",_L="_moveBtn_yrpf3_122",kL="_advanced_yrpf3_140",wL="_jsonEditor_yrpf3_148",bL="_saved_yrpf3_163",SL="_reloadBtn_yrpf3_169",CL="_migrateBox_yrpf3_185",NL="_migrateTitle_yrpf3_194",jL="_migrateItem_yrpf3_200",EL="_migrateActions_yrpf3_220",Ye={section:aL,sectionTitle:oL,modeBox:cL,memberRow:uL,memberId:dL,removeBtn:fL,addBtn:pL,pathNote:mL,colRow:hL,colId:gL,viewName:yL,colWip:vL,colCheck:xL,moveBtn:_L,advanced:kL,jsonEditor:wL,saved:bL,reloadBtn:SL,migrateBox:CL,migrateTitle:NL,migrateItem:jL,migrateActions:EL};function Ya(e,t,r){if(r<0||r>=e.length)return e;const s=e.slice(),[l]=s.splice(t,1);return s.splice(r,0,l),s}let hg=0;function gg(){return hg+=1,`m${hg}`}let yg=0;function vg(){return yg+=1,`c${yg}`}function TL({onClose:e,onSaved:t,tasks:r=[]}){const{t:s,lang:l,setLang:a}=pt(),[c,u]=b.useState(null),[p,m]=b.useState(null),[g,y]=b.useState(null),[_,x]=b.useState(""),[k,E]=b.useState(""),[R,S]=b.useState(""),[A,T]=b.useState("free"),[M,P]=b.useState([]),[j,V]=b.useState([]),[X,ee]=b.useState([]),[O,Y]=b.useState([]),[ie,ke]=b.useState([]),[se,J]=b.useState([]),[te,ye]=b.useState([]),[G,me]=b.useState([]),[C,I]=b.useState([]),[H,N]=b.useState(""),[we,Pe]=b.useState(!1),[xe,Fe]=b.useState(null),[Le,U]=b.useState({}),[ce,ut]=b.useState(!1),[Bt,ot]=b.useState(!1),[Nt,mt]=b.useState(null),[Ft,Kt]=b.useState(!1),sn=b.useCallback(async()=>{const{config:ge,mtimeMs:be}=await Ja(),$=Pg.parse(ge);u(ge),m(be),x($.projectName),E($.idPrefix),S($.instructionTemplate),T($.aiTaskCreation),P($.members.map(Q=>({key:gg(),id:Q.id,label:Q.label??"",type:Q.type,originalId:Q.id}))),V($.members.map(Q=>Q.id)),Fe(null),U({}),ee($.columns.map(Q=>({key:vg(),id:Q.id,label:Q.label??"",wipLimit:Q.wipLimit!=null?String(Q.wipLimit):"",hideWhenEmpty:Q.hideWhenEmpty??!1}))),Y($.aiConfigPaths.settingsFiles),ke($.aiConfigPaths.browseDirs),J($.aiConfigPaths.rootFiles),ye($.docsDirs),me($.docsWriteDirs),I(mv(ho,$.views)),N(JSON.stringify({milestones:$.milestones},null,2)),Kt(!1),mt(null)},[]);b.useEffect(()=>{let ge=!0;return(async()=>{try{await sn()}catch(be){ge&&y(be instanceof Error?be.message:"load failed")}})(),()=>{ge=!1}},[sn]);const ln=async()=>{try{await sn()}catch(ge){mt(ge instanceof Error?ge.message:s("settings.loadError"))}},jt=async ge=>{if(c){ut(!0),ot(!1),mt(null),Kt(!1);try{let be={};if(H.trim().length>0){be=JSON.parse(H);for(const q of["members","projectName","idPrefix","instructionTemplate","aiTaskCreation","language","columns","aiConfigPaths","views","docsDirs","docsWriteDirs"])delete be[q]}const $={...c,projectName:_,idPrefix:k,instructionTemplate:R,aiTaskCreation:A,...we?{language:l}:{},members:M.map(q=>({id:q.id,...q.label.trim()!==""?{label:q.label.trim()}:{},type:q.type})),columns:X.map(q=>{const ve=Number(q.wipLimit);return{id:q.id.trim(),...q.label.trim()!==""?{label:q.label.trim()}:{},...q.hideWhenEmpty?{hideWhenEmpty:!0}:{},...q.wipLimit.trim()!==""&&Number.isInteger(ve)&&ve>0?{wipLimit:ve}:{}}}),aiConfigPaths:{settingsFiles:O.map(q=>q.trim()).filter(q=>q!==""),browseDirs:ie.map(q=>q.trim()).filter(q=>q!==""),rootFiles:se.map(q=>q.trim()).filter(q=>q!=="")},docsDirs:te.map(q=>q.trim()).filter(q=>q!==""),docsWriteDirs:G.map(q=>q.trim()).filter(q=>q!==""),views:C.map(q=>({id:q.id,...q.hidden?{hidden:!0}:{}})),...be};await fd($,p);try{const{mtimeMs:q}=await Ja();m(q)}catch{}const Q=[];try{for(const q of ge){const ve=await O_(q.from,q.to);Q.push(...ve.skipped)}}catch{mt(s("settings.migrate.failed"));return}try{for(const q of ge)for(const ve of["aizuchi.createdBy","aizuchi.commentMember"])typeof localStorage<"u"&&localStorage.getItem(ve)===q.from&&localStorage.setItem(ve,q.to)}catch{}try{await sn()}catch{}Q.length>0&&mt(s("settings.migrate.skipped",{files:Q.join(", ")})),ot(!0),t(),window.setTimeout(()=>ot(!1),2e3)}catch(be){be instanceof Un?(m(be.serverMtimeMs),Kt(!0),mt(s("settings.conflict"))):mt(be instanceof Error?be.message:s("settings.error"))}finally{ut(!1)}}},Et=async()=>{if(!c)return;const ge=lL(j,M,r);if(ge.duplicates.length>0){mt(s("settings.members.duplicate",{ids:ge.duplicates.join(", ")}));return}if(ge.swap){mt(s("settings.migrate.swap"));return}const be=ge.removals.filter($=>$.count>0);if(ge.renames.some($=>$.count>0)||be.length>0){mt(null),Fe({renames:ge.renames,removals:be}),U({});return}await jt(ge.renames.map($=>({from:$.from,to:$.to})))},gn=async()=>{if(xe===null)return;const ge=[...xe.renames.map(be=>({from:be.from,to:be.to})),...xe.removals.filter(be=>(Le[be.id]??"")!=="").map(be=>({from:be.id,to:Le[be.id]}))];Fe(null),await jt(ge)},Vt=(ge,be,$,Q="settings.paths.placeholder",q)=>f.jsxs("div",{className:Ye.section,children:[f.jsx("p",{className:Ye.sectionTitle,children:s(ge)}),be.map((ve,K)=>f.jsxs("div",{className:Ye.memberRow,children:[f.jsx("input",{type:"text",className:Ye.memberId,value:ve,placeholder:s(Q),"aria-label":s(ge),onChange:ne=>$(_e=>_e.map((Me,At)=>At===K?ne.target.value.replace(/[\r\n]/g,""):Me))}),f.jsx("button",{type:"button",className:Ye.removeBtn,"aria-label":s("settings.paths.remove"),onClick:()=>$(ne=>ne.filter((_e,Me)=>Me!==K)),children:"×"})]},K)),f.jsx("button",{type:"button",className:Ye.addBtn,onClick:()=>$(ve=>[...ve,""]),children:s("settings.paths.add")}),q&&f.jsx("p",{className:Ye.pathNote,children:s(q)})]});return f.jsx(Mr,{title:s("settings.title"),onClose:e,wide:!0,children:g?f.jsx("p",{className:le.error,children:g==="load failed"?s("settings.loadError"):g}):c?f.jsxs(f.Fragment,{children:[Nt&&f.jsxs("p",{className:le.error,role:"alert",children:[Nt,Ft&&f.jsxs(f.Fragment,{children:[" ",f.jsx("button",{type:"button",className:Ye.reloadBtn,onClick:()=>void ln(),children:s("settings.reload")})]})]}),f.jsxs("div",{className:Ye.modeBox,children:[f.jsx("label",{className:le.label,htmlFor:"ai-mode",children:s("settings.aiTaskCreation")}),f.jsxs("select",{id:"ai-mode",className:le.select,value:A,onChange:ge=>T(ge.target.value),children:[f.jsx("option",{value:"free",children:s("settings.aiTaskCreation.free")}),f.jsx("option",{value:"proposal",children:s("settings.aiTaskCreation.proposal")})]})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"set-lang",children:s("settings.language")}),f.jsx("select",{id:"set-lang",className:le.select,value:l,onChange:ge=>{a(ge.target.value),Pe(!0)},children:hd.map(ge=>f.jsx("option",{value:ge,children:s(ge==="en"?"settings.language.en":"settings.language.ja")},ge))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"set-project",children:s("settings.projectName")}),f.jsx("input",{id:"set-project",className:le.input,value:_,onChange:ge=>x(ge.target.value.replace(/[\r\n]/g,""))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"set-prefix",children:s("settings.idPrefix")}),f.jsx("input",{id:"set-prefix",className:le.input,value:k,onChange:ge=>E(ge.target.value.replace(/[\r\n]/g,""))})]}),f.jsxs("div",{className:le.field,children:[f.jsx("label",{className:le.label,htmlFor:"set-instruction",children:s("settings.instructionTemplate")}),f.jsx("input",{id:"set-instruction",className:le.input,value:R,onChange:ge=>S(ge.target.value.replace(/[\r\n]/g,""))})]}),f.jsxs("div",{className:Ye.section,children:[f.jsx("p",{className:Ye.sectionTitle,children:s("settings.members")}),M.map((ge,be)=>f.jsxs("div",{className:Ye.memberRow,children:[f.jsx("input",{className:Ye.memberId,value:ge.id,placeholder:s("settings.members.idPlaceholder"),"aria-label":s("settings.members.idPlaceholder"),onChange:$=>P(Q=>Q.map((q,ve)=>ve===be?{...q,id:$.target.value.replace(/[\r\n]/g,"")}:q))}),f.jsx("input",{className:Ye.memberId,value:ge.label,placeholder:s("settings.members.labelPlaceholder"),"aria-label":s("settings.members.labelPlaceholder"),onChange:$=>P(Q=>Q.map((q,ve)=>ve===be?{...q,label:$.target.value.replace(/[\r\n]/g,"")}:q))}),f.jsx("select",{value:ge.type,onChange:$=>P(Q=>Q.map((q,ve)=>ve===be?{...q,type:$.target.value}:q)),"aria-label":s("settings.members.typePlaceholder"),children:Ag.map($=>f.jsx("option",{value:$,children:$},$))}),f.jsx("button",{type:"button",className:Ye.removeBtn,onClick:()=>P($=>$.filter((Q,q)=>q!==be)),children:"×"})]},ge.key)),f.jsx("button",{type:"button",className:Ye.addBtn,onClick:()=>P(ge=>[...ge,{key:gg(),id:"",label:"",type:"ai",originalId:null}]),children:s("settings.members.add")})]}),f.jsxs("div",{className:Ye.section,children:[f.jsx("p",{className:Ye.sectionTitle,children:s("settings.columns")}),X.map((ge,be)=>f.jsxs("div",{className:Ye.colRow,children:[f.jsx("input",{type:"text",className:Ye.colId,value:ge.id,placeholder:s("settings.columns.idPlaceholder"),"aria-label":s("settings.columns.idPlaceholder"),onChange:$=>ee(Q=>Q.map((q,ve)=>ve===be?{...q,id:$.target.value.replace(/[\r\n]/g,"")}:q))}),f.jsx("input",{type:"text",className:Ye.colId,value:ge.label,placeholder:s("settings.columns.labelPlaceholder"),"aria-label":s("settings.columns.labelPlaceholder"),onChange:$=>ee(Q=>Q.map((q,ve)=>ve===be?{...q,label:$.target.value.replace(/[\r\n]/g,"")}:q))}),f.jsx("input",{type:"number",min:"1",className:Ye.colWip,value:ge.wipLimit,placeholder:s("settings.columns.wipPlaceholder"),"aria-label":s("settings.columns.wipAria"),onChange:$=>ee(Q=>Q.map((q,ve)=>ve===be?{...q,wipLimit:$.target.value}:q))}),f.jsxs("label",{className:Ye.colCheck,children:[f.jsx("input",{type:"checkbox",checked:ge.hideWhenEmpty,onChange:$=>ee(Q=>Q.map((q,ve)=>ve===be?{...q,hideWhenEmpty:$.target.checked}:q))}),s("settings.columns.hideWhenEmpty")]}),f.jsx("button",{type:"button",className:Ye.moveBtn,disabled:be===0,"aria-label":s("settings.columns.moveUp"),onClick:()=>ee($=>Ya($,be,be-1)),children:"↑"}),f.jsx("button",{type:"button",className:Ye.moveBtn,disabled:be===X.length-1,"aria-label":s("settings.columns.moveDown"),onClick:()=>ee($=>Ya($,be,be+1)),children:"↓"}),f.jsx("button",{type:"button",className:Ye.removeBtn,disabled:X.length<=1,"aria-label":s("settings.columns.remove"),onClick:()=>ee($=>$.filter((Q,q)=>q!==be)),children:"×"})]},ge.key)),f.jsx("button",{type:"button",className:Ye.addBtn,onClick:()=>ee(ge=>[...ge,{key:vg(),id:"",label:"",wipLimit:"",hideWhenEmpty:!1}]),children:s("settings.columns.add")})]}),Vt("settings.paths.settingsFiles",O,Y),Vt("settings.paths.browseDirs",ie,ke),Vt("settings.paths.rootFiles",se,J),Vt("settings.docsDirs",te,ye,"settings.docsDirs.placeholder"),Vt("settings.docsWriteDirs",G,me,"settings.docsWriteDirs.placeholder","settings.docsWriteDirs.note"),f.jsxs("div",{className:Ye.section,children:[f.jsx("p",{className:Ye.sectionTitle,children:s("settings.views")}),C.map((ge,be)=>f.jsxs("div",{className:Ye.colRow,children:[f.jsx("span",{className:Ye.viewName,children:s(Yd(ge.id)??"view.board")}),f.jsxs("label",{className:Ye.colCheck,children:[f.jsx("input",{type:"checkbox",checked:!ge.hidden,onChange:$=>I(Q=>Q.map((q,ve)=>ve===be?{...q,hidden:!$.target.checked}:q))}),s("settings.views.show")]}),f.jsx("button",{type:"button",className:Ye.moveBtn,disabled:be===0,"aria-label":s("settings.views.moveUp"),onClick:()=>I($=>Ya($,be,be-1)),children:"↑"}),f.jsx("button",{type:"button",className:Ye.moveBtn,disabled:be===C.length-1,"aria-label":s("settings.views.moveDown"),onClick:()=>I($=>Ya($,be,be+1)),children:"↓"})]},ge.id))]}),f.jsxs("details",{className:Ye.advanced,children:[f.jsx("summary",{children:s("settings.advanced")}),f.jsx("textarea",{className:Ye.jsonEditor,value:H,onChange:ge=>N(ge.target.value),spellCheck:!1,"aria-label":s("settings.advanced.aria")})]}),xe!==null&&f.jsxs("div",{className:Ye.migrateBox,role:"alert",children:[f.jsx("p",{className:Ye.migrateTitle,children:s("settings.migrate.title")}),xe.renames.map(ge=>f.jsx("p",{className:Ye.migrateItem,children:s("settings.migrate.rename",{from:ge.from,to:ge.to,n:ge.count})},`rename-${ge.from}`)),xe.removals.map(ge=>f.jsxs("div",{className:Ye.migrateItem,children:[f.jsx("span",{children:s("settings.migrate.removed",{id:ge.id,n:ge.count})})," ",f.jsxs("select",{value:Le[ge.id]??"",onChange:be=>U($=>({...$,[ge.id]:be.target.value})),"aria-label":s("settings.migrate.removed",{id:ge.id,n:ge.count}),children:[f.jsx("option",{value:"",children:s("settings.migrate.noTransfer")}),M.filter(be=>be.id.trim()!=="").map(be=>f.jsx("option",{value:be.id,children:be.label.trim()!==""?be.label:be.id},be.key))]})]},`remove-${ge.id}`)),f.jsxs("div",{className:Ye.migrateActions,children:[f.jsx("button",{type:"button",className:le.btn,onClick:()=>Fe(null),children:s("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,onClick:()=>void gn(),disabled:ce,children:s("settings.migrate.execute")})]})]}),f.jsxs("div",{className:le.actions,children:[Bt&&f.jsx("span",{className:Ye.saved,children:s("settings.saved")}),f.jsx("button",{type:"button",className:le.btn,onClick:e,children:s("common.cancel")}),f.jsx("button",{type:"button",className:`${le.btn} ${le.btnPrimary}`,onClick:()=>void Et(),disabled:ce||xe!==null,children:s(ce?"settings.saving":"settings.save")})]})]}):f.jsx("p",{children:s("board.loading")})})}const IL="_list_uhebt_1",DL="_row_uhebt_8",AL="_keys_uhebt_15",RL="_kbd_uhebt_21",PL="_desc_uhebt_31",LL="_aiSection_uhebt_38",ML="_aiTitle_uhebt_44",OL="_aiDesc_uhebt_50",zL="_copyBtn_uhebt_56",Pr={list:IL,row:DL,keys:AL,kbd:RL,desc:PL,aiSection:LL,aiTitle:ML,aiDesc:OL,copyBtn:zL};function $L({onClose:e,instructionText:t}){const{t:r}=pt(),[s,l]=b.useState(null),a=[{keys:"⌘K / Ctrl+K",descKey:"shortcuts.palette"},{keys:"?",descKey:"shortcuts.help"},{keys:"Enter",descKey:"shortcuts.openCard"},{keys:"Space",descKey:"shortcuts.grabCard"},{keys:"← → ↑ ↓",descKey:"shortcuts.moveCard"},{keys:"Esc",descKey:"shortcuts.close"}],c=async()=>{const p=await xs(t);l(p?"done":"failed"),window.setTimeout(()=>l(null),2e3)},u=r(s==="done"?"shortcuts.aiInstruction.copied":s==="failed"?"shortcuts.aiInstruction.failed":"shortcuts.aiInstruction.copy");return f.jsxs(Mr,{title:r("shortcuts.title"),onClose:e,children:[f.jsx("dl",{className:Pr.list,children:a.map(p=>f.jsxs("div",{className:Pr.row,children:[f.jsx("dt",{className:Pr.keys,children:f.jsx("kbd",{className:Pr.kbd,children:p.keys})}),f.jsx("dd",{className:Pr.desc,children:r(p.descKey)})]},p.keys))}),f.jsxs("div",{className:Pr.aiSection,children:[f.jsx("p",{className:Pr.aiTitle,children:r("shortcuts.aiInstruction.title")}),f.jsx("p",{className:Pr.aiDesc,children:r("shortcuts.aiInstruction.desc")}),f.jsx("button",{type:"button",className:Pr.copyBtn,onClick:()=>void c(),children:u})]})]})}const BL="_view_1dkqw_1",FL="_card_1dkqw_18",VL="_cardHead_1dkqw_26",HL="_cardTitle_1dkqw_34",UL="_note_1dkqw_44",WL="_metrics_1dkqw_52",qL="_metric_1dkqw_52",KL="_metricValue_1dkqw_65",ZL="_metricLabel_1dkqw_72",YL="_metricSub_1dkqw_77",QL="_toggle_1dkqw_83",XL="_toggleBtn_1dkqw_90",GL="_toggleActive_1dkqw_103",JL="_chartWrap_1dkqw_109",eM="_chart_1dkqw_109",tM="_bar_1dkqw_121",nM="_barCount_1dkqw_125",rM="_barLabel_1dkqw_131",iM="_table_1dkqw_138",sM="_bId_1dkqw_166",lM="_empty_1dkqw_172",aM="_srOnly_1dkqw_186",Re={view:BL,card:FL,cardHead:VL,cardTitle:HL,note:UL,metrics:WL,metric:qL,metricValue:KL,metricLabel:ZL,metricSub:YL,toggle:QL,toggleBtn:XL,toggleActive:GL,chartWrap:JL,chart:eM,bar:tM,barCount:nM,barLabel:rM,table:iM,bId:sM,empty:lM,srOnly:aM},oM=5,cM={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function uM({board:e}){const{t}=pt(),[r]=b.useState(()=>Date.now()),s=b.useMemo(()=>Dl(t,e.config.columns),[t,e.config.columns]),l=b.useMemo(()=>bs(e.config.members),[e.config.members]),a=k=>k===null?"—":t(cM[k]),c=b.useMemo(()=>e.tasks.map(k=>({id:k.frontmatter.id,title:k.frontmatter.title,status:k.frontmatter.status,assignee:k.frontmatter.assignee,blocked_type:k.frontmatter.blocked_type,blocked_reason:k.frontmatter.blocked_reason,created:k.frontmatter.created,updated:k.frontmatter.updated,body:k.body})),[e.tasks]),u=b.useMemo(()=>VE(c,r,{maxBottlenecks:oM}),[c,r]),p=b.useMemo(()=>No(c,r,e.config.stallThresholds),[c,r,e.config.stallThresholds]),[m,g]=b.useState("day");if(u.totalTasks===0)return f.jsx("div",{className:Re.view,children:f.jsx("div",{className:Re.empty,children:t("stats.empty")})});const y=m==="day"?u.completionsByDay:u.completionsByWeek,_=y.reduce((k,E)=>Math.max(k,E.count),0),x=k=>k===null?"—":t("stats.days",{n:k});return f.jsxs("div",{className:Re.view,children:[f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-summary",children:[f.jsx("h2",{id:"stats-summary",className:Re.cardTitle,children:t("stats.summary.title")}),f.jsxs("div",{className:Re.metrics,children:[f.jsxs("div",{className:Re.metric,children:[f.jsx("span",{className:Re.metricValue,children:u.totalTasks}),f.jsx("span",{className:Re.metricLabel,children:t("stats.summary.total")})]}),f.jsxs("div",{className:Re.metric,children:[f.jsx("span",{className:Re.metricValue,children:u.doneTasks}),f.jsx("span",{className:Re.metricLabel,children:t("stats.summary.done")})]})]})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-completions",children:[f.jsxs("div",{className:Re.cardHead,children:[f.jsx("h2",{id:"stats-completions",className:Re.cardTitle,children:t("stats.completions.title")}),f.jsxs("div",{className:Re.toggle,role:"group","aria-label":t("stats.completions.granularity"),children:[f.jsx("button",{type:"button",className:`${Re.toggleBtn} ${m==="day"?Re.toggleActive:""}`,"aria-pressed":m==="day",onClick:()=>g("day"),children:t("stats.completions.byDay")}),f.jsx("button",{type:"button",className:`${Re.toggleBtn} ${m==="week"?Re.toggleActive:""}`,"aria-pressed":m==="week",onClick:()=>g("week"),children:t("stats.completions.byWeek")})]})]}),y.length===0?f.jsx("p",{className:Re.note,children:t("stats.completions.empty")}):f.jsx(dM,{bins:y,maxCount:_,ariaLabel:k=>t("stats.completions.barAria",k)})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-cycle",children:[f.jsx("h2",{id:"stats-cycle",className:Re.cardTitle,children:t("stats.cycleTime.title")}),u.cycleTime.sampleSize===0?f.jsx("p",{className:Re.note,children:t("stats.cycleTime.empty")}):f.jsxs("div",{className:Re.metrics,children:[f.jsxs("div",{className:Re.metric,children:[f.jsx("span",{className:Re.metricValue,children:x(u.cycleTime.medianDays)}),f.jsx("span",{className:Re.metricLabel,children:t("stats.cycleTime.median")})]}),f.jsxs("div",{className:Re.metric,children:[f.jsx("span",{className:Re.metricValue,children:x(u.cycleTime.meanDays)}),f.jsx("span",{className:Re.metricLabel,children:t("stats.cycleTime.mean")})]}),f.jsx("div",{className:Re.metric,children:f.jsx("span",{className:Re.metricSub,children:t("stats.cycleTime.sample",{n:u.cycleTime.sampleSize})})})]})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-dwell",children:[f.jsx("h2",{id:"stats-dwell",className:Re.cardTitle,children:t("stats.dwell.title")}),f.jsx("p",{className:Re.note,children:t("stats.dwell.note")}),f.jsxs("table",{className:Re.table,children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:t("stats.dwell.status")}),f.jsx("th",{scope:"col",children:t("stats.dwell.count")}),f.jsx("th",{scope:"col",children:t("stats.dwell.avg")}),f.jsx("th",{scope:"col",children:t("stats.dwell.max")})]})}),f.jsx("tbody",{children:u.dwellByStatus.filter(k=>k.count>0).map(k=>f.jsxs("tr",{children:[f.jsx("td",{children:s(k.status)}),f.jsx("td",{children:k.count}),f.jsx("td",{children:x(k.avgDays)}),f.jsx("td",{children:x(k.maxDays)})]},k.status))})]})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-member",children:[f.jsx("h2",{id:"stats-member",className:Re.cardTitle,children:t("stats.member.title")}),u.completionsByMember.length===0?f.jsx("p",{className:Re.note,children:t("stats.member.empty")}):f.jsxs("table",{className:Re.table,children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:t("stats.member.name")}),f.jsx("th",{scope:"col",children:t("stats.summary.done")})]})}),f.jsx("tbody",{children:u.completionsByMember.map(k=>f.jsxs("tr",{children:[f.jsx("td",{children:k.member!==null?l(k.member):t("stats.member.unassigned")}),f.jsx("td",{children:k.count})]},k.member??"(unassigned)"))})]})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-bottleneck",children:[f.jsx("h2",{id:"stats-bottleneck",className:Re.cardTitle,children:t("stats.bottlenecks.title")}),u.bottlenecks.length===0?f.jsx("p",{className:Re.note,children:t("stats.bottlenecks.empty")}):f.jsxs("table",{className:Re.table,children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:t("stats.bottlenecks.task")}),f.jsx("th",{scope:"col",children:t("stats.bottlenecks.dwell")}),f.jsx("th",{scope:"col",children:t("stats.bottlenecks.type")}),f.jsx("th",{scope:"col",children:t("stats.bottlenecks.reason")})]})}),f.jsx("tbody",{children:u.bottlenecks.map(k=>f.jsxs("tr",{children:[f.jsxs("td",{children:[f.jsx("span",{className:Re.bId,children:k.id})," ",k.title]}),f.jsx("td",{children:t("stats.days",{n:k.dwellDays})}),f.jsx("td",{children:a(k.blockedType)}),f.jsx("td",{children:k.blockedReason??"—"})]},k.id))})]})]}),f.jsxs("section",{className:Re.card,"aria-labelledby":"stats-stalled",children:[f.jsx("h2",{id:"stats-stalled",className:Re.cardTitle,children:t("stalled.title")}),f.jsx("p",{className:Re.note,children:t("stalled.note")}),p.length===0?f.jsx("p",{className:Re.note,children:t("stalled.empty")}):f.jsxs("table",{className:Re.table,children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:t("stalled.task")}),f.jsx("th",{scope:"col",children:t("stalled.status")}),f.jsx("th",{scope:"col",children:t("stalled.idle")})]})}),f.jsx("tbody",{children:p.map(k=>f.jsxs("tr",{children:[f.jsxs("td",{children:[f.jsx("span",{className:Re.bId,children:k.id})," ",k.title]}),f.jsx("td",{children:s(k.status)}),f.jsx("td",{children:t("stats.days",{n:k.idleDays})})]},k.id))})]})]})]})}function dM({bins:e,maxCount:t,ariaLabel:r}){const{t:s}=pt(),l=28,a=8,c=120,u=28,p=e.length*(l+a)+a,m=c+u;return f.jsxs("div",{className:Re.chartWrap,children:[f.jsx("svg",{className:Re.chart,viewBox:`0 0 ${p} ${m}`,role:"img","aria-label":s("stats.completions.title"),preserveAspectRatio:"xMinYMid meet",children:e.map((g,y)=>{const _=t>0?Math.max(2,Math.round(g.count/t*c)):2,x=a+y*(l+a),k=c-_;return f.jsxs("g",{children:[f.jsx("title",{children:r(g)}),f.jsx("rect",{x,y:k,width:l,height:_,className:Re.bar,rx:2}),f.jsx("text",{x:x+l/2,y:k-4,className:Re.barCount,textAnchor:"middle",children:g.count}),f.jsx("text",{x:x+l/2,y:c+16,className:Re.barLabel,textAnchor:"middle",children:g.key.slice(5)})]},g.key)})}),f.jsxs("table",{className:Re.srOnly,children:[f.jsx("caption",{children:s("stats.completions.title")}),f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:s("stats.completions.date")}),f.jsx("th",{scope:"col",children:s("stats.summary.done")})]})}),f.jsx("tbody",{children:e.map(g=>f.jsxs("tr",{children:[f.jsx("td",{children:g.key}),f.jsx("td",{children:g.count})]},g.key))})]})]})}const fM=/^---[ \t]*\r?\n/,pM=/^---[ \t]*$/,xg="\uFEFF";function xv(e,t){const r=e.startsWith(xg),s=r?e.slice(1):e,l=t(s);return r?xg+l:l}function _v(e){if(!fM.test(e))return null;const t=e.split(`
99
- `);let r=-1;for(let s=1;s<t.length;s++)if(pM.test(t[s].replace(/\r$/,""))){r=s;break}return r===-1?null:{lines:t,closeIdx:r}}function kv(e,t,r){const s=new RegExp(`^${r}\\s*:`),l=[];let a=1;for(;a<t;){const c=e[a].replace(/\r$/,"");if(s.test(c)){for(a++;a<t&&/^\s*-\s/.test(e[a].replace(/\r$/,""));)a++;continue}l.push(e[a]),a++}return l}function wv(e,t,r,s){if(s!==null){const c=r.findIndex(u=>/^created\s*:/.test(u.replace(/\r$/,"")));c!==-1?r.splice(c,0,s):r.push(s)}const l=[e[0],...r].join(`
100
- `),a=e.slice(t).join(`
101
- `);return`${l}
102
- ${a}`}function mM(e,t){return xv(e,r=>hM(r,t))}function hM(e,t){const r=_v(e);if(!r)return e;const{lines:s,closeIdx:l}=r,a=kv(s,l,"depends_on"),c=t.length>0?`depends_on: [${t.map(u=>JSON.stringify(u)).join(", ")}]`:null;return wv(s,l,a,c)}function gM(e,t){return xv(e,r=>yM(r,t))}function yM(e,t){const r=_v(e);if(!r)return e;const{lines:s,closeIdx:l}=r,a=kv(s,l,"priority"),c=`priority: ${t}`;return wv(s,l,a,c)}const ad=Number.MAX_SAFE_INTEGER;function _g(e){if(e===null)return ad;const t=Date.parse(e.replace(" ","T"));return Number.isNaN(t)?ad:t}function vM(e,t,r){const s=[];for(const l of e)s.push({kind:"log",timestamp:l.timestamp,sortMs:_g(l.timestamp),member:l.member,text:l.message,hash:null});for(const l of t)s.push({kind:"comment",timestamp:l.timestamp,sortMs:_g(l.timestamp),member:l.member,text:l.message,hash:null});for(const l of r){const a=Date.parse(l.authorDate);s.push({kind:"commit",timestamp:/^\d{4}-\d{2}-\d{2}/.test(l.authorDate)?l.authorDate.slice(0,10):l.authorDate,sortMs:Number.isNaN(a)?ad:a,member:null,text:l.subject,hash:l.hash.slice(0,7)})}return s.sort((l,a)=>l.sortMs-a.sortMs)}const xM=/@([A-Za-z0-9_-]+)/g;function _M(e,t){const r=[];let s=0;for(const l of e.matchAll(xM)){const a=l[1],c=l.index??0,u=c===0?"":e[c-1];!(c===0||/\s/.test(u))||!t.has(a)||(c>s&&r.push({kind:"text",value:e.slice(s,c)}),r.push({kind:"mention",id:a}),s=c+l[0].length)}return s<e.length&&r.push({kind:"text",value:e.slice(s)}),r}const kM="_overlay_1iuvc_1",wM="_panel_1iuvc_10",bM="_header_1iuvc_20",SM="_id_1iuvc_28",CM="_title_1iuvc_34",NM="_copyBtn_1iuvc_41",jM="_close_1iuvc_59",EM="_tabs_1iuvc_72",TM="_tab_1iuvc_72",IM="_tabActive_1iuvc_96",DM="_body_1iuvc_101",AM="_markdown_1iuvc_107",RM="_editor_1iuvc_142",PM="_timeline_1iuvc_155",LM="_entry_1iuvc_164",MM="_entryMeta_1iuvc_183",OM="_entryMember_1iuvc_190",zM="_entryMessage_1iuvc_195",$M="_mention_1iuvc_200",BM="_mentionSelf_1iuvc_205",FM="_emptyTimeline_1iuvc_211",VM="_timelineKind_1iuvc_217",HM="_footer_1iuvc_241",UM="_dirty_1iuvc_249",WM="_error_1iuvc_254",qM="_spacer_1iuvc_260",KM="_btn_1iuvc_264",ZM="_btnPrimary_1iuvc_279",YM="_commentInput_1iuvc_290",QM="_commentField_1iuvc_305",XM="_docsHint_1iuvc_313",GM="_docsList_1iuvc_323",JM="_docRow_1iuvc_332",eO="_docLink_1iuvc_338",tO="_docLinkActive_1iuvc_361",nO="_docBroken_1iuvc_365",rO="_docRemove_1iuvc_374",iO="_docsActions_1iuvc_393",sO="_docsPicker_1iuvc_397",lO="_docsPreview_1iuvc_407",aO="_docsPreviewPath_1iuvc_412",oO="_metaSection_1iuvc_420",cO="_metaLabel_1iuvc_438",uO="_depId_1iuvc_447",re={overlay:kM,panel:wM,header:bM,id:SM,title:CM,copyBtn:NM,close:jM,tabs:EM,tab:TM,tabActive:IM,body:DM,markdown:AM,editor:RM,timeline:PM,entry:LM,entryMeta:MM,entryMember:OM,entryMessage:zM,mention:$M,mentionSelf:BM,emptyTimeline:FM,timelineKind:VM,footer:HM,dirty:UM,error:WM,spacer:qM,btn:KM,btnPrimary:ZM,commentInput:YM,commentField:QM,docsHint:XM,docsList:GM,docRow:JM,docLink:eO,docLinkActive:tO,docBroken:nO,docRemove:rO,docsActions:iO,docsPicker:sO,docsPreview:lO,docsPreviewPath:aO,metaSection:oO,metaLabel:cO,depId:uO},kg="aizuchi.commentMember";function od(e){const t=[];for(const r of e)r.type==="file"?t.push(r.path):r.children&&t.push(...od(r.children));return t}const dO={log:"timeline.kind.log",comment:"timeline.kind.comment",commit:"timeline.kind.commit"};function fO({task:e,instructionTemplate:t,members:r,allTasks:s=[],docsEnabled:l=!1,onClose:a,onSaved:c}){var bt;const{t:u}=pt(),[p,m]=b.useState("preview"),[g,y]=b.useState(e.raw),[_,x]=b.useState(e.mtimeMs),[k,E]=b.useState(!1),[R,S]=b.useState(null),[A,T]=b.useState(null),[M,P]=b.useState(null),[j,V]=b.useState(!1),X=typeof localStorage<"u"?localStorage.getItem(kg):null,[ee,O]=b.useState(X&&r.some(Z=>Z.id===X)?X:((bt=r[0])==null?void 0:bt.id)??""),[Y,ie]=b.useState(""),[ke,se]=b.useState(null),J=b.useMemo(()=>bs(r),[r]),te=b.useMemo(()=>new Set(r.map(Z=>Z.id)),[r]),ye=(Z,pe)=>_M(Z,te).map((Ke,xt)=>Ke.kind==="text"?f.jsx("span",{children:Ke.value},xt):f.jsxs("span",{className:`${re.mention} ${pe!=null&&Ke.id===pe?re.mentionSelf:""}`,children:["@",J(Ke.id)]},xt)),[G,me]=b.useState(null),[C,I]=b.useState(!1),[H,N]=b.useState(!1),[we,Pe]=b.useState(null),[xe,Fe]=b.useState(null),Le=b.useRef(null),[U,ce]=b.useState(null),[ut,Bt]=b.useState(!1),[ot,Nt]=b.useState(null),[mt,Ft]=b.useState(null),[Kt,sn]=b.useState(!1),[ln,jt]=b.useState(!1),[Et,gn]=b.useState(null),[Vt,ge]=b.useState(!1),[be,$]=b.useState(null),Q=(ot==null?void 0:ot.raw)??e.raw,q=[...new Set((ot==null?void 0:ot.relatedDocs)??e.frontmatter.related_docs??[])],ve=(ot==null?void 0:ot.dependsOn)??e.frontmatter.depends_on??[],K=(ot==null?void 0:ot.priority)??e.frontmatter.priority??"medium",ne=l||q.length>0,_e=g!==e.raw;b.useEffect(()=>{ot!==null&&e.raw===ot.raw&&Nt(null)},[e.raw,ot]);const Me=H||ln;b.useEffect(()=>{const Z=pe=>{var xt;if(pe.key!=="Escape"||A||j||Me)return;const Ke=(xt=pe.target)==null?void 0:xt.tagName;Ke==="TEXTAREA"||Ke==="INPUT"||Ke==="SELECT"||a()};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[A,j,Me,a]);const At=b.useRef(null);gd(At,!A&&!j&&!Me);const Ht=b.useRef(e.raw);b.useEffect(()=>{e.raw!==Ht.current&&(y(Z=>Z===Ht.current?e.raw:Z),x(Z=>g===Ht.current?e.mtimeMs:Z),Ht.current=e.raw)},[e.raw,e.mtimeMs]);const ht=async(Z=_)=>{E(!0),S(null);try{const pe=await fu(e.frontmatter.id,g,Z);x(pe.mtimeMs),T(null),c(),m("preview")}catch(pe){pe instanceof Un?T({serverContent:pe.serverContent,serverMtimeMs:pe.serverMtimeMs}):S(pe instanceof Error?pe.message:u("detail.saveError"))}finally{E(!1)}},Ut=async()=>{const Z=cT(e.body)??void 0,pe=av(t,e.frontmatter.id,ov(e.frontmatter.id),Z),Ke=await xs(pe);P(Ke?"done":"failed"),window.setTimeout(()=>P(null),2e3)},Zt=async Z=>{S(null);try{await Cg(e.frontmatter.id,Z.length>0?Z:void 0,_),c()}catch(pe){pe instanceof Un?T({serverContent:pe.serverContent,serverMtimeMs:pe.serverMtimeMs}):S(pe instanceof Error?pe.message:u("revise.error"))}},pi=e.frontmatter.status==="done"||e.frontmatter.status==="in_progress"||e.frontmatter.status==="pending";b.useEffect(()=>{if(p!=="docs"||G!==null||C)return;let Z=!0;return(async()=>{try{const pe=await Ng();Z&&me(pe)}catch{Z&&I(!0)}})(),()=>{Z=!1}},[p,G,C]),b.useEffect(()=>{if(p!=="commits"&&p!=="timeline"||Et!==null||Vt)return;let Z=!0;return(async()=>{try{const pe=await q_(e.frontmatter.id);Z&&gn(pe)}catch{Z&&ge(!0)}})(),()=>{Z=!1}},[p,Et,Vt,e.frontmatter.id]);const mi=async Z=>{await xs(Z)&&($(Z),window.setTimeout(()=>$(Ke=>Ke===Z?null:Ke),2e3))},ir=async Z=>{Bt(!0),ce(null);try{const pe=wD(Q,Z);if(pe===Q){ce(u("docs.noChange"));return}const Ke=await fu(e.frontmatter.id,pe,_);x(Ke.mtimeMs),Nt({raw:Ke.raw,relatedDocs:Ke.frontmatter.related_docs??[],dependsOn:Ke.frontmatter.depends_on??[],priority:Ke.frontmatter.priority??"medium"}),c()}catch(pe){pe instanceof Un?(Nt(null),ce(u("docs.conflict")),c()):ce(pe instanceof Error?pe.message:u("detail.saveError"))}finally{Bt(!1)}},wt=async(Z,pe,Ke)=>{sn(!0),Ft(null);try{if(Z===Q){Ft(u("meta.noChange"));return}const xt=await fu(e.frontmatter.id,Z,_);x(xt.mtimeMs),Nt({raw:xt.raw,relatedDocs:xt.frontmatter.related_docs??[],dependsOn:pe,priority:Ke}),c()}catch(xt){xt instanceof Un?(Nt(null),Ft(u("meta.conflict")),c()):Ft(xt instanceof Error?xt.message:u("detail.saveError"))}finally{sn(!1)}},Jt=Z=>{const pe=mM(Q,Z);wt(pe,Z,K)},an=Z=>{const pe=gM(Q,Z);wt(pe,ve,Z)},On=async Z=>{Fe(Z),Le.current=Z,Pe(null),ce(null);try{const pe=await jg(Z);if(Le.current!==Z)return;Pe(pe)}catch(pe){if(Le.current!==Z)return;pe instanceof br&&(pe.status===404||pe.status===403)?Pe("broken"):ce(pe instanceof Error?pe.message:u("docs.loadError"))}},on=async()=>{const Z=Y.trim();if(!(Z.length===0||ee==="")){se(null);try{await K_(e.frontmatter.id,ee,Z),ie(""),typeof localStorage<"u"&&localStorage.setItem(kg,ee),c()}catch(pe){se(pe instanceof Error?pe.message:u("comment.error"))}}},Yt=Zd(e.body),cn=aT(e.body),Kn=vM(Yt,cn,Et??[]);return f.jsxs("div",{className:re.overlay,onClick:Z=>{yd(Z.target,Z.currentTarget)&&a()},children:[f.jsxs("aside",{ref:At,className:re.panel,role:"dialog","aria-modal":"true","aria-label":u("detail.aria",{id:e.frontmatter.id}),children:[f.jsxs("header",{className:re.header,children:[f.jsx("span",{className:re.id,children:e.frontmatter.id}),f.jsx("span",{className:re.title,children:e.frontmatter.title}),f.jsx("button",{type:"button",className:re.copyBtn,onClick:()=>void Ut(),title:u("detail.copyInstruction.title"),children:u(M==="done"?"detail.copyInstruction.done":M==="failed"?"detail.copyInstruction.failed":"detail.copyInstruction")}),pi&&f.jsx("button",{type:"button",className:re.copyBtn,onClick:()=>V(!0),disabled:_e,title:_e?u("docs.dirtyHint"):void 0,children:u("revise.button")}),f.jsx("button",{type:"button",className:re.close,onClick:a,"aria-label":u("detail.close"),children:"×"})]}),f.jsxs("nav",{className:re.tabs,children:[f.jsx("button",{type:"button",className:`${re.tab} ${p==="preview"?re.tabActive:""}`,onClick:()=>m("preview"),children:u("detail.tab.preview")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="edit"?re.tabActive:""}`,onClick:()=>m("edit"),children:u("detail.tab.edit")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="log"?re.tabActive:""}`,onClick:()=>m("log"),children:u("detail.tab.log")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="comment"?re.tabActive:""}`,onClick:()=>m("comment"),children:u("comment.title")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="meta"?re.tabActive:""}`,onClick:()=>m("meta"),children:u("detail.tab.meta")}),ne&&f.jsx("button",{type:"button",className:`${re.tab} ${p==="docs"?re.tabActive:""}`,onClick:()=>m("docs"),children:u("detail.tab.docs")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="commits"?re.tabActive:""}`,onClick:()=>m("commits"),children:u("detail.tab.commits")}),f.jsx("button",{type:"button",className:`${re.tab} ${p==="timeline"?re.tabActive:""}`,onClick:()=>m("timeline"),children:u("detail.tab.timeline")})]}),f.jsxs("div",{className:re.body,children:[p==="preview"&&f.jsx("div",{className:re.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:e.body})}),p==="edit"&&f.jsx("textarea",{className:re.editor,value:g,onChange:Z=>y(Z.target.value),spellCheck:!1,"aria-label":u("detail.editAria")}),p==="log"&&f.jsx(f.Fragment,{children:Yt.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("detail.log.empty")}):f.jsx("ol",{className:re.timeline,children:Yt.map((Z,pe)=>f.jsxs("li",{className:re.entry,children:[f.jsxs("span",{className:re.entryMeta,children:[Z.timestamp??"—",Z.member&&f.jsxs("span",{className:re.entryMember,children:[" [",J(Z.member),"]"]})]}),f.jsx("span",{className:re.entryMessage,children:ye(Z.message)})]},pe))})}),p==="comment"&&f.jsxs(f.Fragment,{children:[cn.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("comment.empty")}):f.jsx("ol",{className:re.timeline,children:cn.map((Z,pe)=>f.jsxs("li",{className:re.entry,children:[f.jsxs("span",{className:re.entryMeta,children:[Z.timestamp??"—",Z.member&&f.jsxs("span",{className:re.entryMember,children:[" [",J(Z.member),"]"]})]}),f.jsx("span",{className:re.entryMessage,children:ye(Z.message,ee)})]},pe))}),ke&&f.jsx("p",{className:re.error,children:ke}),f.jsxs("div",{className:re.commentInput,children:[f.jsx("select",{value:ee,onChange:Z=>O(Z.target.value),"aria-label":u("comment.member"),children:r.map(Z=>f.jsx("option",{value:Z.id,children:Z.label??Z.id},Z.id))}),f.jsx("input",{className:re.commentField,value:Y,onChange:Z=>ie(Z.target.value.replace(/[\r\n]/g,"")),placeholder:u("comment.placeholder"),"aria-label":u("comment.placeholder"),onKeyDown:Z=>{Z.key==="Enter"&&(Z.preventDefault(),on())}}),f.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>void on(),disabled:Y.trim().length===0,children:u("comment.send")})]})]}),p==="meta"&&f.jsxs(f.Fragment,{children:[mt&&f.jsx("p",{className:re.error,role:"alert",children:mt}),_e&&f.jsx("p",{className:re.docsHint,children:u("meta.dirtyHint")}),f.jsxs("div",{className:re.metaSection,children:[f.jsx("p",{className:re.metaLabel,children:u("meta.priority")}),f.jsx("select",{value:K,onChange:Z=>{const pe=Z.target.value;bl.includes(pe)&&an(pe)},disabled:_e||Kt,"aria-label":u("meta.priority"),children:bl.map(Z=>f.jsx("option",{value:Z,children:Z},Z))})]}),f.jsxs("div",{className:re.metaSection,children:[f.jsx("p",{className:re.metaLabel,children:u("meta.dependsOn")}),ve.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("meta.dependsOn.empty")}):f.jsx("ul",{className:re.docsList,children:ve.map(Z=>f.jsxs("li",{className:re.docRow,children:[f.jsx("span",{className:re.depId,children:Z}),f.jsx("button",{type:"button",className:re.docRemove,onClick:()=>Jt(ve.filter(pe=>pe!==Z)),disabled:_e||Kt,"aria-label":u("meta.dependsOn.remove",{id:Z}),children:"×"})]},Z))}),f.jsx("div",{className:re.docsActions,children:f.jsx("button",{type:"button",className:re.btn,onClick:()=>jt(Z=>!Z),disabled:_e||Kt,"aria-expanded":ln,children:u("meta.dependsOn.add")})}),ln&&f.jsx("div",{className:re.docsPicker,children:(()=>{const Z=e.frontmatter.id,pe=s.filter(Ke=>Ke.frontmatter.id!==Z&&!ve.includes(Ke.frontmatter.id));return pe.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("meta.dependsOn.pickerEmpty")}):f.jsx("ul",{className:re.docsList,"aria-label":u("meta.dependsOn.pickerTitle"),children:pe.map(Ke=>f.jsx("li",{className:re.docRow,children:f.jsxs("button",{type:"button",className:re.docLink,onClick:()=>{jt(!1),Jt([...ve,Ke.frontmatter.id])},disabled:_e||Kt,children:[Ke.frontmatter.id,": ",Ke.frontmatter.title]})},Ke.frontmatter.id))})})()})]})]}),p==="docs"&&f.jsxs(f.Fragment,{children:[U&&f.jsx("p",{className:re.error,role:"alert",children:U}),_e&&f.jsx("p",{className:re.docsHint,children:u("docs.dirtyHint")}),q.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("docs.empty")}):f.jsx("ul",{className:re.docsList,children:q.map(Z=>{const pe=G!==null?od(G):null,Ke=pe!==null&&!pe.includes(Z);return f.jsxs("li",{className:re.docRow,children:[f.jsx("button",{type:"button",className:`${re.docLink} ${xe===Z?re.docLinkActive:""}`,onClick:()=>void On(Z),children:Z}),Ke&&f.jsx("span",{className:re.docBroken,children:u("docs.broken")}),f.jsx("button",{type:"button",className:re.docRemove,onClick:()=>void ir(q.filter(xt=>xt!==Z)),disabled:_e||ut,"aria-label":`${u("docs.remove")}: ${Z}`,children:"×"})]},Z)})}),f.jsx("div",{className:re.docsActions,children:f.jsx("button",{type:"button",className:re.btn,onClick:()=>N(Z=>!Z),disabled:_e||ut,"aria-expanded":H,children:u("docs.add")})}),H&&f.jsx("div",{className:re.docsPicker,children:C?f.jsx("p",{className:re.error,role:"alert",children:u("docs.treeError")}):G===null?f.jsx("p",{className:re.emptyTimeline,children:u("board.loading")}):(()=>{const Z=od(G).filter(pe=>!q.includes(pe));return Z.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("docs.pickerEmpty")}):f.jsx("ul",{className:re.docsList,"aria-label":u("docs.pickerTitle"),children:Z.map(pe=>f.jsx("li",{className:re.docRow,children:f.jsx("button",{type:"button",className:re.docLink,onClick:()=>{N(!1),ir([...q,pe])},disabled:_e||ut,children:pe})},pe))})})()}),xe!==null&&f.jsxs("div",{className:re.docsPreview,children:[f.jsx("p",{className:re.docsPreviewPath,children:xe}),we===null?f.jsx("p",{className:re.emptyTimeline,children:u("board.loading")}):we==="broken"?f.jsx("p",{className:re.docBroken,children:u("docs.broken")}):f.jsx("div",{className:re.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:we.content})})]})]}),p==="commits"&&f.jsx(f.Fragment,{children:Vt?f.jsx("p",{className:re.error,role:"alert",children:u("commits.error")}):Et===null?f.jsx("p",{className:re.emptyTimeline,children:u("board.loading")}):Et.length===0?f.jsx("p",{className:re.emptyTimeline,children:u("commits.empty")}):f.jsx("ol",{className:re.timeline,children:Et.map(Z=>f.jsxs("li",{className:re.entry,children:[f.jsxs("span",{className:re.entryMeta,children:[f.jsx("button",{type:"button",className:re.docLink,onClick:()=>void mi(Z.hash),title:u("commits.copyHash"),children:be===Z.hash?u("commits.copied"):Z.hash.slice(0,7)})," · ",Z.authorDate.slice(0,10)]}),f.jsx("span",{className:re.entryMessage,children:Z.subject})]},Z.hash))})}),p==="timeline"&&f.jsxs(f.Fragment,{children:[Vt&&f.jsx("p",{className:re.error,role:"alert",children:u("commits.error")}),Kn.length===0?f.jsx("p",{className:re.emptyTimeline,children:u(Et===null&&!Vt?"board.loading":"timeline.empty")}):f.jsx("ol",{className:re.timeline,children:Kn.map((Z,pe)=>f.jsxs("li",{className:re.entry,children:[f.jsxs("span",{className:re.entryMeta,children:[f.jsx("span",{className:re.timelineKind,"data-kind":Z.kind,children:u(dO[Z.kind])})," ",Z.timestamp??"—",Z.member&&f.jsxs("span",{className:re.entryMember,children:[" [",J(Z.member),"]"]}),Z.hash&&f.jsxs("span",{className:re.entryMember,children:[" ",Z.hash]})]}),f.jsx("span",{className:re.entryMessage,children:ye(Z.text)})]},pe))})]})]}),p==="edit"&&f.jsxs("footer",{className:re.footer,children:[R?f.jsx("span",{className:re.error,children:R}):_e?f.jsx("span",{className:re.dirty,children:u("detail.dirty")}):f.jsx("span",{className:re.spacer}),f.jsx("button",{type:"button",className:re.btn,onClick:()=>{y(e.raw),S(null)},disabled:!_e||k,children:u("common.discard")}),f.jsx("button",{type:"button",className:`${re.btn} ${re.btnPrimary}`,onClick:()=>void ht(),disabled:!_e||k,children:u(k?"common.saving":"common.save")})]})]}),A&&f.jsx(vv,{serverContent:A.serverContent,localContent:g,onClose:()=>T(null),onOverwrite:()=>void ht(A.serverMtimeMs),onReload:()=>{y(A.serverContent),x(A.serverMtimeMs),T(null),S(null)}}),j&&f.jsx(fv,{taskTitle:e.frontmatter.title,onCancel:()=>V(!1),onConfirm:Z=>{V(!1),Zt(Z)}})]})}const pO="_view_ctpdr_1",mO="_list_ctpdr_8",hO="_search_ctpdr_18",gO="_searchInput_ctpdr_23",yO="_listScroll_ctpdr_39",vO="_taskList_ctpdr_45",xO="_taskBtn_ctpdr_54",_O="_taskBtnActive_ctpdr_77",kO="_taskId_ctpdr_87",wO="_taskTitle_ctpdr_93",bO="_taskTime_ctpdr_100",SO="_detail_ctpdr_107",CO="_detailHeader_ctpdr_114",NO="_detailHeadText_ctpdr_121",jO="_detailTitle_ctpdr_126",EO="_meta_ctpdr_133",TO="_metaId_ctpdr_142",IO="_restoreBtn_ctpdr_146",DO="_diffWrap_ctpdr_174",AO="_diffTitle_ctpdr_178",RO="_previewTitle_ctpdr_179",PO="_diff_ctpdr_174",LO="_line_ctpdr_200",MO="_sign_ctpdr_207",OO="_equal_ctpdr_213",zO="_add_ctpdr_217",$O="_remove_ctpdr_222",BO="_legend_ctpdr_227",FO="_markdown_ctpdr_235",VO="_muted_ctpdr_254",HO="_error_ctpdr_259",tt={view:pO,list:mO,search:hO,searchInput:gO,listScroll:yO,taskList:vO,taskBtn:xO,taskBtnActive:_O,taskId:kO,taskTitle:wO,taskTime:bO,detail:SO,detailHeader:CO,detailHeadText:NO,detailTitle:jO,meta:EO,metaId:TO,restoreBtn:IO,diffWrap:DO,diffTitle:AO,previewTitle:RO,diff:PO,line:LO,sign:MO,equal:OO,add:zO,remove:$O,legend:BO,markdown:FO,muted:VO,error:HO};function wg(e){return`${e.id}.${e.trashedAt}`}function UO({board:e,onChanged:t,onError:r}){const{t:s}=pt(),[l,a]=b.useState(null),[c,u]=b.useState(!1),[p,m]=b.useState(""),[g,y]=b.useState(null),[_,x]=b.useState(!1),k=b.useMemo(()=>e.tasks.map(j=>`${j.frontmatter.id}@${j.frontmatter.updated}`).join(`
103
- `),[e.tasks]);b.useEffect(()=>{let j=!0;const V=new AbortController;return(async()=>{try{const X=await I_(V.signal);j&&(a(X.items),u(!1))}catch{j&&(a([]),u(!0))}})(),()=>{j=!1,V.abort()}},[k]);const E=b.useMemo(()=>Dl(s,e.config.columns),[s,e.config.columns]),R=b.useMemo(()=>{const j=l??[],V=p.trim().toLowerCase();return V===""?j:j.filter(X=>[X.id,X.title??"",X.body].some(ee=>ee.toLowerCase().includes(V)))},[l,p]),S=g!==null?R.find(j=>wg(j)===g)??null:null,A=S!==null?e.tasks.find(j=>j.frontmatter.id===S.id):void 0,T=b.useMemo(()=>S===null||A===void 0?null:gv(S.body,A.body),[S,A]),M=j=>new Date(j).toLocaleString(),P=async j=>{const V=e.tasks.some(ee=>ee.frontmatter.id===j.id),X=V?"trash.view.restoreOverwriteConfirm":"trash.view.restoreConfirm";if(!(typeof window<"u"&&!window.confirm(s(X,{id:j.id})))){x(!0);try{await D_(j.id,j.trashedAt,V?!0:void 0),y(null),t()}catch(ee){const O=ee instanceof br&&ee.status===409?s("trash.view.restoreConflict",{id:j.id}):ee instanceof Error?ee.message:s("trash.view.restoreError");r(O)}finally{x(!1)}}};return f.jsxs("div",{className:tt.view,children:[f.jsxs("nav",{className:tt.list,"aria-label":s("trash.view.listTitle"),children:[f.jsx("div",{className:tt.search,children:f.jsx("input",{className:tt.searchInput,type:"search",value:p,onChange:j=>m(j.target.value),placeholder:s("trash.view.searchPlaceholder"),"aria-label":s("trash.view.searchPlaceholder")})}),f.jsx("div",{className:tt.listScroll,children:c?f.jsx("p",{className:tt.error,role:"alert",children:s("trash.view.loadError")}):l===null?f.jsx("p",{className:tt.muted,children:s("board.loading")}):R.length===0?f.jsx("p",{className:tt.muted,children:p.trim()===""?s("trash.view.empty"):s("trash.view.noMatch")}):f.jsx("ul",{className:tt.taskList,children:R.map(j=>{const V=wg(j);return f.jsx("li",{children:f.jsxs("button",{type:"button",className:`${tt.taskBtn} ${g===V?tt.taskBtnActive:""}`,onClick:()=>y(V),"aria-current":g===V?"true":void 0,children:[f.jsx("span",{className:tt.taskId,children:j.id})," ",f.jsx("span",{className:tt.taskTitle,children:j.title??j.id}),f.jsx("span",{className:tt.taskTime,children:M(j.trashedAt)})]})},V)})})})]}),f.jsx("section",{className:tt.detail,"aria-label":s("view.trash"),children:S===null?f.jsx("p",{className:tt.muted,children:s("trash.view.selectPrompt")}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:tt.detailHeader,children:[f.jsxs("div",{className:tt.detailHeadText,children:[f.jsx("h2",{className:tt.detailTitle,children:S.title??S.id}),f.jsxs("p",{className:tt.meta,children:[f.jsx("span",{className:tt.metaId,children:S.id}),S.status!==null&&f.jsx("span",{children:E(S.status)}),f.jsx("span",{children:s("trash.view.trashedAt",{time:M(S.trashedAt)})})]})]}),f.jsx("button",{type:"button",className:tt.restoreBtn,onClick:()=>void P(S),disabled:_,children:s("trash.view.restore")})]}),A===void 0?f.jsx("p",{className:tt.muted,children:s("trash.view.noCurrent")}):T!==null&&T.some(j=>j.op!=="equal")?f.jsxs("div",{className:tt.diffWrap,children:[f.jsx("h3",{className:tt.diffTitle,children:s("trash.view.diffTitle")}),f.jsx("div",{className:tt.diff,role:"region","aria-label":s("trash.view.diffTitle"),children:T.map((j,V)=>f.jsxs("div",{className:`${tt.line} ${j.op==="add"?tt.add:j.op==="remove"?tt.remove:tt.equal}`,children:[f.jsx("span",{className:tt.sign,children:j.op==="add"?"+":j.op==="remove"?"-":" "}),f.jsx("span",{children:j.text})]},V))}),f.jsxs("p",{className:tt.legend,children:[f.jsx("span",{children:s("trash.view.diff.add")}),f.jsx("span",{children:s("trash.view.diff.remove")})]})]}):f.jsx("p",{className:tt.muted,children:s("trash.view.noDiff")}),f.jsx("h3",{className:tt.previewTitle,children:s("trash.view.previewTitle")}),f.jsx("div",{className:tt.markdown,children:f.jsx(Ai,{remarkPlugins:[Ri],children:S.body})})]})})]})}const WO="_banner_1uu1k_1",qO="_summary_1uu1k_9",KO="_icon_1uu1k_22",ZO="_list_1uu1k_26",YO="_item_1uu1k_35",QO="_kind_1uu1k_39",XO="_path_1uu1k_51",GO="_renameBtn_1uu1k_57",ii={banner:WO,summary:qO,icon:KO,list:ZO,item:YO,kind:QO,path:XO,renameBtn:GO},JO={invalid_task:"warning.kind.invalid_task",duplicate_id:"warning.kind.duplicate_id",unregistered_member:"warning.kind.unregistered_member",invalid_config:"warning.kind.invalid_config",mode_violation:"warning.kind.mode_violation"};function e4({warnings:e,onRename:t}){const{t:r}=pt();return e.length===0?null:f.jsxs("details",{className:ii.banner,open:!0,children:[f.jsxs("summary",{className:ii.summary,children:[f.jsx("span",{className:ii.icon,"aria-hidden":"true",children:"⚠"}),r("warning.summary",{n:e.length})]}),f.jsx("ul",{className:ii.list,children:e.map((s,l)=>f.jsxs("li",{className:ii.item,children:[f.jsx("span",{className:ii.kind,children:r(JO[s.kind])}),s.taskId&&f.jsxs("strong",{children:[s.taskId,": "]}),s.message,s.path&&f.jsxs("span",{className:ii.path,children:[" (",s.path,")"]}),s.kind==="duplicate_id"&&s.taskId&&t&&f.jsx("button",{type:"button",className:ii.renameBtn,onClick:()=>t(s.taskId),children:r("rename.action")})]},l))})]})}const t4="_app_1d9ko_1",n4="_main_1d9ko_8",r4="_header_1d9ko_15",i4="_brand_1d9ko_26",s4="_tabs_1d9ko_32",l4="_tab_1d9ko_32",a4="_tabActive_1d9ko_64",o4="_project_1d9ko_69",c4="_spacer_1d9ko_74",u4="_status_1d9ko_78",d4="_dot_1d9ko_86",f4="_dotOn_1d9ko_92",p4="_dotOff_1d9ko_97",m4="_markAllReadBtn_1d9ko_113",h4="_langSelect_1d9ko_132",g4="_settingsBtn_1d9ko_141",y4="_addBtn_1d9ko_156",v4="_banner_1d9ko_176",x4="_bannerClose_1d9ko_186",_4="_center_1d9ko_195",zt={app:t4,main:n4,header:r4,brand:i4,tabs:s4,tab:l4,tabActive:a4,project:o4,spacer:c4,status:u4,dot:d4,dotOn:f4,dotOff:p4,markAllReadBtn:m4,langSelect:h4,settingsBtn:g4,addBtn:y4,banner:v4,bannerClose:x4,center:_4};function k4(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function w4(){var Le;const{t:e,lang:t,setLang:r,applyLang:s,hasUserChoice:l}=pt(),{board:a,loading:c,error:u,connected:p,refresh:m}=Z_(),{unreadIds:g,markRead:y,markAllRead:_}=J_((a==null?void 0:a.tasks)??null,a==null?void 0:a.config.projectName),[x,k]=b.useState("home"),[E,R]=b.useState(!1),[S,A]=b.useState([]),[T,M]=b.useState(!1),[P,j]=b.useState(!1),[V,X]=b.useState(!1),[ee,O]=b.useState(null),[Y,ie]=b.useState(null),[ke,se]=b.useState(null),J=b.useMemo(()=>{const U=hv(ho,(a==null?void 0:a.config.views)??[]),ut=(U.length>0?U:ho).filter(Bt=>Bt!=="docs"||((a==null?void 0:a.config.docsDirs.length)??0)>0);return ut.length>0?ut:["board"]},[a==null?void 0:a.config.views,a==null?void 0:a.config.docsDirs]),te=U=>{O(U),y(U)},ye=U=>{A([U]),R(!0)},G=U=>{k("board"),se({...U})},me=b.useMemo(()=>{var U;return UE({projectName:a==null?void 0:a.config.projectName,aiMemberId:(U=a==null?void 0:a.config.members.find(ce=>ce.type==="ai"))==null?void 0:U.id,aiTaskCreation:a==null?void 0:a.config.aiTaskCreation})},[a==null?void 0:a.config.projectName,a==null?void 0:a.config.members,a==null?void 0:a.config.aiTaskCreation]),C=ee!==null?(a==null?void 0:a.tasks.find(U=>U.frontmatter.id===ee))??null:null,I=E||T||ee!==null||V,H=b.useRef(I);H.current=I;const N=b.useRef(!1);N.current=I||P;const we=b.useRef(!1);we.current=V,b.useEffect(()=>{const U=ce=>{if((ce.metaKey||ce.ctrlKey)&&(ce.key==="k"||ce.key==="K")&&!ce.isComposing){ce.preventDefault(),j(ut=>ut?!1:!H.current);return}ce.key==="?"&&!ce.isComposing&&!k4(ce.target)&&(we.current?(ce.preventDefault(),X(!1)):N.current||(ce.preventDefault(),X(!0)))};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[]),b.useEffect(()=>{a&&!J.includes(x)&&k(J[0]??"board")},[a,J,x]),b.useEffect(()=>{const U=a==null?void 0:a.config.language;U!==void 0&&U!==t&&!l()&&s(U)},[a,t,s,l]);const Pe=U=>{r(U),z_(U)},xe=async U=>{await A_(U),R(!1),A([]),m()},Fe=async U=>{try{await M_(U),m()}catch(ce){ie(ce instanceof Error?ce.message:e("rename.error"))}};return f.jsxs("div",{className:zt.app,children:[f.jsxs("header",{className:zt.header,children:[f.jsx("span",{className:zt.brand,children:"AIzuchi"}),a&&f.jsx("span",{className:zt.project,children:a.config.projectName}),f.jsx("span",{className:zt.spacer}),f.jsxs("span",{className:zt.status,title:e(p?"header.live.title":"header.reconnecting.title"),children:[f.jsx("span",{className:`${zt.dot} ${p?zt.dotOn:zt.dotOff}`,"aria-hidden":"true"}),e(p?"header.live":"header.reconnecting")]}),a&&f.jsx(Z2,{board:a,onOpenTask:U=>te(U)}),g.size>0&&f.jsx("button",{type:"button",className:zt.markAllReadBtn,onClick:()=>_(),title:e("newActivity.markAllRead.title"),children:e("newActivity.markAllRead",{n:g.size})}),f.jsx("select",{className:zt.langSelect,value:t,onChange:U=>Pe(U.target.value),"aria-label":e("settings.language"),children:hd.map(U=>f.jsx("option",{value:U,children:e(U==="en"?"settings.language.en":"settings.language.ja")},U))}),f.jsx("button",{type:"button",className:zt.settingsBtn,onClick:()=>X(!0),title:e("header.help"),"aria-label":e("header.help"),children:"?"}),f.jsx("button",{type:"button",className:zt.settingsBtn,onClick:()=>M(!0),disabled:!a,children:e("header.settings")}),f.jsx("button",{type:"button",className:zt.addBtn,onClick:()=>R(!0),disabled:!a,children:e("header.addTask")})]}),(u||Y)&&f.jsxs("div",{className:zt.banner,role:"alert",children:[u??Y,!u&&Y&&f.jsx("button",{type:"button",className:zt.bannerClose,onClick:()=>ie(null),children:e("banner.close")})]}),a&&f.jsx("nav",{className:zt.tabs,"aria-label":"views",children:J.map(U=>f.jsx("button",{type:"button",className:`${zt.tab} ${x===U?zt.tabActive:""}`,onClick:()=>k(U),children:e(Yd(U)??"view.board")},U))}),a&&f.jsx(e4,{warnings:a.warnings,onRename:U=>void Fe(U)}),f.jsx("main",{className:zt.main,children:c&&!a?f.jsx("div",{className:zt.center,children:e("board.loading")}):a?f.jsx(tR,{title:e("error.view.title"),detail:e("error.view.detail"),retryLabel:e("error.view.retry"),children:x==="home"?f.jsx(EP,{board:a,unreadIds:g,onOpen:U=>te(U.frontmatter.id)}):x==="board"?f.jsx(qI,{board:a,onOpen:U=>te(U.frontmatter.id),onChanged:()=>void m(),onError:ie,unreadIds:g,applyView:ke,onViewApplied:()=>se(null),onAddTask:()=>R(!0)}):x==="critical"?f.jsx(D2,{board:a,onOpen:U=>te(U.frontmatter.id)}):x==="digest"?f.jsx(vD,{board:a}):x==="docs"?f.jsx(QA,{board:a,onOpen:U=>te(U.frontmatter.id),docsWriteEnabled:(((Le=a.config.docsWriteDirs)==null?void 0:Le.length)??0)>0,onCreateTaskFromDoc:ye}):x==="archive"?f.jsx(ij,{board:a,onChanged:()=>void m(),onError:ie}):x==="trash"?f.jsx(UO,{board:a,onChanged:()=>void m(),onError:ie}):x==="stats"?f.jsx(uM,{board:a}):x==="files"?f.jsx(JR,{board:a}):f.jsx(sL,{board:a,onOpen:U=>te(U.frontmatter.id)})},x):f.jsx("div",{className:zt.center,children:e("board.unavailable")})}),E&&a&&f.jsx(uw,{members:a.config.members,templates:a.config.taskTemplates,initialRelatedDocs:S,onCancel:()=>{R(!1),A([])},onSubmit:xe}),T&&f.jsx(TL,{tasks:(a==null?void 0:a.tasks)??[],onClose:()=>M(!1),onSaved:()=>void m()}),V&&f.jsx($L,{onClose:()=>X(!1),instructionText:me}),P&&a&&f.jsx(n2,{board:a,onClose:()=>j(!1),onSelectView:U=>k(U),onOpenAdd:()=>R(!0),onOpenSettings:()=>M(!0),onOpenTask:U=>te(U),onApplySavedView:G}),C&&a&&f.jsx(fO,{task:C,instructionTemplate:a.config.instructionTemplate,members:a.config.members,allTasks:a.tasks,docsEnabled:a.config.docsDirs.length>0,onClose:()=>O(null),onSaved:()=>void m()},C.frontmatter.id)]})}const b4="_app_156sn_1",S4="_header_156sn_7",C4="_brand_156sn_16",N4="_mode_156sn_22",j4="_spacer_156sn_27",E4="_status_156sn_31",T4="_dot_156sn_39",I4="_dotOn_156sn_45",D4="_dotOff_156sn_49",A4="_langSelect_156sn_53",R4="_banner_156sn_69",P4="_center_156sn_77",L4="_main_156sn_85",M4="_sectionTitle_156sn_95",O4="_cards_156sn_102",z4="_card_156sn_102",$4="_cardName_156sn_121",B4="_cardDir_156sn_127",F4="_counts_156sn_134",V4="_count_156sn_134",H4="_badges_156sn_159",U4="_badgeWip_156sn_166",W4="_badgeWarn_156sn_174",q4="_tableWrap_156sn_183",K4="_table_156sn_183",Z4="_taskId_156sn_211",Y4="_empty_156sn_217",vt={app:b4,header:S4,brand:C4,mode:N4,spacer:j4,status:E4,dot:T4,dotOn:I4,dotOff:D4,langSelect:A4,banner:R4,center:P4,main:L4,sectionTitle:M4,cards:O4,card:z4,cardName:$4,cardDir:B4,counts:F4,count:V4,badges:H4,badgeWip:U4,badgeWarn:W4,tableWrap:q4,table:K4,taskId:Z4,empty:Y4},Q4={decision:"blocked.decision",external:"blocked.external",dependency:"blocked.dependency"};function X4(){const[e,t]=b.useState(null),[r,s]=b.useState(!0),[l,a]=b.useState(null),[c,u]=b.useState(!1),p=b.useRef(0),m=b.useCallback(async()=>{const g=++p.current;try{const y=await E_();g===p.current&&(t(y),a(null))}catch(y){g===p.current&&a(y instanceof Error?y.message:"failed")}finally{g===p.current&&s(!1)}},[]);return b.useEffect(()=>{m();const g=new EventSource("/api/events");return g.onopen=()=>{u(!0),m()},g.onmessage=y=>{try{const _=JSON.parse(y.data);_.type==="change"?m():_.type==="connected"&&u(!0)}catch{}},g.onerror=()=>u(!1),()=>{g.close()}},[m]),{overview:e,loading:r,error:l,connected:c}}function G4(){const{t:e,lang:t,setLang:r}=pt(),{overview:s,loading:l,error:a,connected:c}=X4(),u=p=>{if(p.status!=="pending"||p.blocked_type===null)return"—";const m=e(Q4[p.blocked_type]);return p.blocked_reason!==null?`${m}: ${p.blocked_reason}`:m};return f.jsxs("div",{className:vt.app,children:[f.jsxs("header",{className:vt.header,children:[f.jsx("span",{className:vt.brand,children:"AIzuchi"}),f.jsx("span",{className:vt.mode,children:e("overview.title")}),f.jsx("span",{className:vt.spacer}),f.jsxs("span",{className:vt.status,title:e(c?"header.live.title":"header.reconnecting.title"),children:[f.jsx("span",{className:`${vt.dot} ${c?vt.dotOn:vt.dotOff}`,"aria-hidden":"true"}),e(c?"header.live":"header.reconnecting")]}),f.jsx("select",{className:vt.langSelect,value:t,onChange:p=>r(p.target.value),"aria-label":e("settings.language"),children:hd.map(p=>f.jsx("option",{value:p,children:e(p==="en"?"settings.language.en":"settings.language.ja")},p))})]}),a!==null&&s!==null&&f.jsx("div",{className:vt.banner,role:"alert",children:e("overview.loadError")}),l&&!s?f.jsx("div",{className:vt.center,children:e("board.loading")}):s?f.jsxs("main",{className:vt.main,children:[f.jsxs("section",{"aria-labelledby":"ov-projects",children:[f.jsx("h2",{id:"ov-projects",className:vt.sectionTitle,children:e("overview.projects")}),f.jsx("div",{className:vt.cards,children:s.projects.map(p=>f.jsxs("article",{className:vt.card,title:p.root,children:[f.jsx("h3",{className:vt.cardName,children:p.name}),p.name!==p.dir&&f.jsx("p",{className:vt.cardDir,children:p.dir}),f.jsx("dl",{className:vt.counts,children:_s.map(m=>f.jsxs("div",{className:vt.count,children:[f.jsx("dt",{children:e(co[m])}),f.jsx("dd",{children:p.statusCounts[m]})]},m))}),f.jsxs("div",{className:vt.badges,children:[p.wipExceeded&&f.jsx("span",{className:vt.badgeWip,children:e("overview.wipExceeded")}),p.warningCount>0&&f.jsx("span",{className:vt.badgeWarn,children:e("overview.warnings",{n:p.warningCount})})]})]},p.dir))})]}),f.jsxs("section",{"aria-labelledby":"ov-attention",children:[f.jsx("h2",{id:"ov-attention",className:vt.sectionTitle,children:e("overview.attention.title")}),s.attention.length===0?f.jsx("p",{className:vt.empty,children:e("overview.attention.empty")}):f.jsx("div",{className:vt.tableWrap,children:f.jsxs("table",{className:vt.table,children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{scope:"col",children:e("overview.col.project")}),f.jsx("th",{scope:"col",children:e("overview.col.task")}),f.jsx("th",{scope:"col",children:e("overview.col.status")}),f.jsx("th",{scope:"col",children:e("overview.col.assignee")}),f.jsx("th",{scope:"col",children:e("overview.col.blocked")})]})}),f.jsx("tbody",{children:s.attention.map(p=>f.jsxs("tr",{children:[f.jsx("td",{children:p.project}),f.jsxs("td",{children:[f.jsx("span",{className:vt.taskId,children:p.id})," ",p.title]}),f.jsx("td",{children:e(co[p.status])}),f.jsx("td",{children:p.assignee??e("card.unassigned")}),f.jsx("td",{children:u(p)})]},`${p.project}:${p.id}`))})]})})]})]}):f.jsx("div",{className:vt.center,children:e("overview.loadError")})]})}const bg=3,J4=700;function e3(){const{t:e}=pt(),[t,r]=b.useState(null);return b.useEffect(()=>{let s=!0;return(async()=>{for(let l=1;l<=bg;l++)try{const a=await j_();s&&r(a.mode==="overview"?"overview":"board");return}catch(a){if(a instanceof br&&a.status>=400&&a.status<500){s&&r("board");return}if(l===bg){s&&r("error");return}if(await new Promise(c=>setTimeout(c,J4)),!s)return}})(),()=>{s=!1}},[]),t===null?f.jsx(f.Fragment,{}):t==="error"?f.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:12,padding:48},role:"alert",children:[f.jsx("p",{children:e("mode.connectError")}),f.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:e("settings.reload")})]}):t==="overview"?f.jsx(G4,{}):f.jsx(w4,{})}const bv=document.getElementById("root");if(!bv)throw new Error("#root not found");C_.createRoot(bv).render(f.jsx(b.StrictMode,{children:f.jsx(Wk,{children:f.jsx(e3,{})})}));