squad-kit 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,551 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function Ph(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xu={exports:{}},ta={},Ju={exports:{}},Ie={};/**
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 w0;function lv(){if(w0)return Ie;w0=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.iterator;function x($){return $===null||typeof $!="object"?null:($=f&&$[f]||$["@@iterator"],typeof $=="function"?$:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function j($,Y,I){this.props=$,this.context=Y,this.refs=w,this.updater=I||y}j.prototype.isReactComponent={},j.prototype.setState=function($,Y){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,Y,"setState")},j.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function N(){}N.prototype=j.prototype;function S($,Y,I){this.props=$,this.context=Y,this.refs=w,this.updater=I||y}var T=S.prototype=new N;T.constructor=S,k(T,j.prototype),T.isPureReactComponent=!0;var A=Array.isArray,q=Object.prototype.hasOwnProperty,R={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function L($,Y,I){var pe,me={},xe=null,Pe=null;if(Y!=null)for(pe in Y.ref!==void 0&&(Pe=Y.ref),Y.key!==void 0&&(xe=""+Y.key),Y)q.call(Y,pe)&&!M.hasOwnProperty(pe)&&(me[pe]=Y[pe]);var Ee=arguments.length-2;if(Ee===1)me.children=I;else if(1<Ee){for(var Ne=Array(Ee),Me=0;Me<Ee;Me++)Ne[Me]=arguments[Me+2];me.children=Ne}if($&&$.defaultProps)for(pe in Ee=$.defaultProps,Ee)me[pe]===void 0&&(me[pe]=Ee[pe]);return{$$typeof:e,type:$,key:xe,ref:Pe,props:me,_owner:R.current}}function B($,Y){return{$$typeof:e,type:$.type,key:Y,ref:$.ref,props:$.props,_owner:$._owner}}function z($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function O($){var Y={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(I){return Y[I]})}var U=/\/+/g;function ne($,Y){return typeof $=="object"&&$!==null&&$.key!=null?O(""+$.key):Y.toString(36)}function Z($,Y,I,pe,me){var xe=typeof $;(xe==="undefined"||xe==="boolean")&&($=null);var Pe=!1;if($===null)Pe=!0;else switch(xe){case"string":case"number":Pe=!0;break;case"object":switch($.$$typeof){case e:case t:Pe=!0}}if(Pe)return Pe=$,me=me(Pe),$=pe===""?"."+ne(Pe,0):pe,A(me)?(I="",$!=null&&(I=$.replace(U,"$&/")+"/"),Z(me,Y,I,"",function(Me){return Me})):me!=null&&(z(me)&&(me=B(me,I+(!me.key||Pe&&Pe.key===me.key?"":(""+me.key).replace(U,"$&/")+"/")+$)),Y.push(me)),1;if(Pe=0,pe=pe===""?".":pe+":",A($))for(var Ee=0;Ee<$.length;Ee++){xe=$[Ee];var Ne=pe+ne(xe,Ee);Pe+=Z(xe,Y,I,Ne,me)}else if(Ne=x($),typeof Ne=="function")for($=Ne.call($),Ee=0;!(xe=$.next()).done;)xe=xe.value,Ne=pe+ne(xe,Ee++),Pe+=Z(xe,Y,I,Ne,me);else if(xe==="object")throw Y=String($),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Pe}function X($,Y,I){if($==null)return $;var pe=[],me=0;return Z($,pe,"","",function(xe){return Y.call(I,xe,me++)}),pe}function he($){if($._status===-1){var Y=$._result;Y=Y(),Y.then(function(I){($._status===0||$._status===-1)&&($._status=1,$._result=I)},function(I){($._status===0||$._status===-1)&&($._status=2,$._result=I)}),$._status===-1&&($._status=0,$._result=Y)}if($._status===1)return $._result.default;throw $._result}var ce={current:null},Q={transition:null},se={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:Q,ReactCurrentOwner:R};function P(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:X,forEach:function($,Y,I){X($,function(){Y.apply(this,arguments)},I)},count:function($){var Y=0;return X($,function(){Y++}),Y},toArray:function($){return X($,function(Y){return Y})||[]},only:function($){if(!z($))throw Error("React.Children.only expected to receive a single React element child.");return $}},Ie.Component=j,Ie.Fragment=s,Ie.Profiler=o,Ie.PureComponent=S,Ie.StrictMode=i,Ie.Suspense=h,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Ie.act=P,Ie.cloneElement=function($,Y,I){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var pe=k({},$.props),me=$.key,xe=$.ref,Pe=$._owner;if(Y!=null){if(Y.ref!==void 0&&(xe=Y.ref,Pe=R.current),Y.key!==void 0&&(me=""+Y.key),$.type&&$.type.defaultProps)var Ee=$.type.defaultProps;for(Ne in Y)q.call(Y,Ne)&&!M.hasOwnProperty(Ne)&&(pe[Ne]=Y[Ne]===void 0&&Ee!==void 0?Ee[Ne]:Y[Ne])}var Ne=arguments.length-2;if(Ne===1)pe.children=I;else if(1<Ne){Ee=Array(Ne);for(var Me=0;Me<Ne;Me++)Ee[Me]=arguments[Me+2];pe.children=Ee}return{$$typeof:e,type:$.type,key:me,ref:xe,props:pe,_owner:Pe}},Ie.createContext=function($){return $={$$typeof:c,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:l,_context:$},$.Consumer=$},Ie.createElement=L,Ie.createFactory=function($){var Y=L.bind(null,$);return Y.type=$,Y},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function($){return{$$typeof:u,render:$}},Ie.isValidElement=z,Ie.lazy=function($){return{$$typeof:m,_payload:{_status:-1,_result:$},_init:he}},Ie.memo=function($,Y){return{$$typeof:p,type:$,compare:Y===void 0?null:Y}},Ie.startTransition=function($){var Y=Q.transition;Q.transition={};try{$()}finally{Q.transition=Y}},Ie.unstable_act=P,Ie.useCallback=function($,Y){return ce.current.useCallback($,Y)},Ie.useContext=function($){return ce.current.useContext($)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function($){return ce.current.useDeferredValue($)},Ie.useEffect=function($,Y){return ce.current.useEffect($,Y)},Ie.useId=function(){return ce.current.useId()},Ie.useImperativeHandle=function($,Y,I){return ce.current.useImperativeHandle($,Y,I)},Ie.useInsertionEffect=function($,Y){return ce.current.useInsertionEffect($,Y)},Ie.useLayoutEffect=function($,Y){return ce.current.useLayoutEffect($,Y)},Ie.useMemo=function($,Y){return ce.current.useMemo($,Y)},Ie.useReducer=function($,Y,I){return ce.current.useReducer($,Y,I)},Ie.useRef=function($){return ce.current.useRef($)},Ie.useState=function($){return ce.current.useState($)},Ie.useSyncExternalStore=function($,Y,I){return ce.current.useSyncExternalStore($,Y,I)},Ie.useTransition=function(){return ce.current.useTransition()},Ie.version="18.3.1",Ie}var b0;function Aa(){return b0||(b0=1,Ju.exports=lv()),Ju.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 j0;function cv(){if(j0)return ta;j0=1;var e=Aa(),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,h,p){var m,f={},x=null,y=null;p!==void 0&&(x=""+p),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(y=h.ref);for(m in h)i.call(h,m)&&!l.hasOwnProperty(m)&&(f[m]=h[m]);if(u&&u.defaultProps)for(m in h=u.defaultProps,h)f[m]===void 0&&(f[m]=h[m]);return{$$typeof:t,type:u,key:x,ref:y,props:f,_owner:o.current}}return ta.Fragment=s,ta.jsx=c,ta.jsxs=c,ta}var N0;function uv(){return N0||(N0=1,Xu.exports=cv()),Xu.exports}var n=uv(),E=Aa();const xa=Ph(E);var Xo={},ed={exports:{}},Dt={},td={exports:{}},nd={};/**
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 S0;function dv(){return S0||(S0=1,(function(e){function t(Q,se){var P=Q.length;Q.push(se);e:for(;0<P;){var $=P-1>>>1,Y=Q[$];if(0<o(Y,se))Q[$]=se,Q[P]=Y,P=$;else break e}}function s(Q){return Q.length===0?null:Q[0]}function i(Q){if(Q.length===0)return null;var se=Q[0],P=Q.pop();if(P!==se){Q[0]=P;e:for(var $=0,Y=Q.length,I=Y>>>1;$<I;){var pe=2*($+1)-1,me=Q[pe],xe=pe+1,Pe=Q[xe];if(0>o(me,P))xe<Y&&0>o(Pe,me)?(Q[$]=Pe,Q[xe]=P,$=xe):(Q[$]=me,Q[pe]=P,$=pe);else if(xe<Y&&0>o(Pe,P))Q[$]=Pe,Q[xe]=P,$=xe;else break e}}return se}function o(Q,se){var P=Q.sortIndex-se.sortIndex;return P!==0?P:Q.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var h=[],p=[],m=1,f=null,x=3,y=!1,k=!1,w=!1,j=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,S=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(Q){for(var se=s(p);se!==null;){if(se.callback===null)i(p);else if(se.startTime<=Q)i(p),se.sortIndex=se.expirationTime,t(h,se);else break;se=s(p)}}function A(Q){if(w=!1,T(Q),!k)if(s(h)!==null)k=!0,he(q);else{var se=s(p);se!==null&&ce(A,se.startTime-Q)}}function q(Q,se){k=!1,w&&(w=!1,N(L),L=-1),y=!0;var P=x;try{for(T(se),f=s(h);f!==null&&(!(f.expirationTime>se)||Q&&!O());){var $=f.callback;if(typeof $=="function"){f.callback=null,x=f.priorityLevel;var Y=$(f.expirationTime<=se);se=e.unstable_now(),typeof Y=="function"?f.callback=Y:f===s(h)&&i(h),T(se)}else i(h);f=s(h)}if(f!==null)var I=!0;else{var pe=s(p);pe!==null&&ce(A,pe.startTime-se),I=!1}return I}finally{f=null,x=P,y=!1}}var R=!1,M=null,L=-1,B=5,z=-1;function O(){return!(e.unstable_now()-z<B)}function U(){if(M!==null){var Q=e.unstable_now();z=Q;var se=!0;try{se=M(!0,Q)}finally{se?ne():(R=!1,M=null)}}else R=!1}var ne;if(typeof S=="function")ne=function(){S(U)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,X=Z.port2;Z.port1.onmessage=U,ne=function(){X.postMessage(null)}}else ne=function(){j(U,0)};function he(Q){M=Q,R||(R=!0,ne())}function ce(Q,se){L=j(function(){Q(e.unstable_now())},se)}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(Q){Q.callback=null},e.unstable_continueExecution=function(){k||y||(k=!0,he(q))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(h)},e.unstable_next=function(Q){switch(x){case 1:case 2:case 3:var se=3;break;default:se=x}var P=x;x=se;try{return Q()}finally{x=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,se){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var P=x;x=Q;try{return se()}finally{x=P}},e.unstable_scheduleCallback=function(Q,se,P){var $=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?$+P:$):P=$,Q){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=P+Y,Q={id:m++,callback:se,priorityLevel:Q,startTime:P,expirationTime:Y,sortIndex:-1},P>$?(Q.sortIndex=P,t(p,Q),s(h)===null&&Q===s(p)&&(w?(N(L),L=-1):w=!0,ce(A,P-$))):(Q.sortIndex=Y,t(h,Q),k||y||(k=!0,he(q))),Q},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(Q){var se=x;return function(){var P=x;x=se;try{return Q.apply(this,arguments)}finally{x=P}}}})(nd)),nd}var C0;function hv(){return C0||(C0=1,td.exports=dv()),td.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 E0;function pv(){if(E0)return Dt;E0=1;var e=Aa(),t=hv();function s(r){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+r,d=1;d<arguments.length;d++)a+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,a){c(r,a),c(r+"Capture",a)}function c(r,a){for(o[r]=a,r=0;r<a.length;r++)i.add(a[r])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,p=/^[: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]*$/,m={},f={};function x(r){return h.call(f,r)?!0:h.call(m,r)?!1:p.test(r)?f[r]=!0:(m[r]=!0,!1)}function y(r,a,d,g){if(d!==null&&d.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return g?!1:d!==null?!d.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,a,d,g){if(a===null||typeof a>"u"||y(r,a,d,g))return!0;if(g)return!1;if(d!==null)switch(d.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function w(r,a,d,g,v,b,C){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=g,this.attributeNamespace=v,this.mustUseProperty=d,this.propertyName=r,this.type=a,this.sanitizeURL=b,this.removeEmptyString=C}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){j[r]=new w(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var a=r[0];j[a]=new w(a,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){j[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){j[r]=new w(r,2,!1,r,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(r){j[r]=new w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){j[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){j[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){j[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){j[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function S(r){return r[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(r){var a=r.replace(N,S);j[a]=new w(a,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var a=r.replace(N,S);j[a]=new w(a,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var a=r.replace(N,S);j[a]=new w(a,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){j[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),j.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){j[r]=new w(r,1,!1,r.toLowerCase(),null,!0,!0)});function T(r,a,d,g){var v=j.hasOwnProperty(a)?j[a]:null;(v!==null?v.type!==0:g||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(k(a,d,v,g)&&(d=null),g||v===null?x(a)&&(d===null?r.removeAttribute(a):r.setAttribute(a,""+d)):v.mustUseProperty?r[v.propertyName]=d===null?v.type===3?!1:"":d:(a=v.attributeName,g=v.attributeNamespace,d===null?r.removeAttribute(a):(v=v.type,d=v===3||v===4&&d===!0?"":""+d,g?r.setAttributeNS(g,a,d):r.setAttribute(a,d))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),R=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),O=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),ce=Symbol.for("react.offscreen"),Q=Symbol.iterator;function se(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,$;function Y(r){if($===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);$=a&&a[1]||""}return`
34
- `+$+r}var I=!1;function pe(r,a){if(!r||I)return"";I=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(K){var g=K}Reflect.construct(r,[],a)}else{try{a.call()}catch(K){g=K}r.call(a.prototype)}else{try{throw Error()}catch(K){g=K}r()}}catch(K){if(K&&g&&typeof K.stack=="string"){for(var v=K.stack.split(`
35
- `),b=g.stack.split(`
36
- `),C=v.length-1,_=b.length-1;1<=C&&0<=_&&v[C]!==b[_];)_--;for(;1<=C&&0<=_;C--,_--)if(v[C]!==b[_]){if(C!==1||_!==1)do if(C--,_--,0>_||v[C]!==b[_]){var F=`
37
- `+v[C].replace(" at new "," at ");return r.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",r.displayName)),F}while(1<=C&&0<=_);break}}}finally{I=!1,Error.prepareStackTrace=d}return(r=r?r.displayName||r.name:"")?Y(r):""}function me(r){switch(r.tag){case 5:return Y(r.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function xe(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case M:return"Fragment";case R:return"Portal";case B:return"Profiler";case L:return"StrictMode";case ne:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case O:return(r.displayName||"Context")+".Consumer";case z:return(r._context.displayName||"Context")+".Provider";case U:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case X:return a=r.displayName||null,a!==null?a:xe(r.type)||"Memo";case he:a=r._payload,r=r._init;try{return xe(r(a))}catch{}}return null}function Pe(r){var a=r.type;switch(r.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=a.render,r=r.displayName||r.name||"",a.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(a);case 8:return a===L?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Ee(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Ne(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Me(r){var a=Ne(r)?"checked":"value",d=Object.getOwnPropertyDescriptor(r.constructor.prototype,a),g=""+r[a];if(!r.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var v=d.get,b=d.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return v.call(this)},set:function(C){g=""+C,b.call(this,C)}}),Object.defineProperty(r,a,{enumerable:d.enumerable}),{getValue:function(){return g},setValue:function(C){g=""+C},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function st(r){r._valueTracker||(r._valueTracker=Me(r))}function It(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var d=a.getValue(),g="";return r&&(g=Ne(r)?r.checked?"true":"false":r.value),r=g,r!==d?(a.setValue(r),!0):!1}function Ht(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ln(r,a){var d=a.checked;return P({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??r._wrapperState.initialChecked})}function Lt(r,a){var d=a.defaultValue==null?"":a.defaultValue,g=a.checked!=null?a.checked:a.defaultChecked;d=Ee(a.value!=null?a.value:d),r._wrapperState={initialChecked:g,initialValue:d,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function kn(r,a){a=a.checked,a!=null&&T(r,"checked",a,!1)}function ln(r,a){kn(r,a);var d=Ee(a.value),g=a.type;if(d!=null)g==="number"?(d===0&&r.value===""||r.value!=d)&&(r.value=""+d):r.value!==""+d&&(r.value=""+d);else if(g==="submit"||g==="reset"){r.removeAttribute("value");return}a.hasOwnProperty("value")?_t(r,a.type,d):a.hasOwnProperty("defaultValue")&&_t(r,a.type,Ee(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(r.defaultChecked=!!a.defaultChecked)}function Vt(r,a,d){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var g=a.type;if(!(g!=="submit"&&g!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+r._wrapperState.initialValue,d||a===r.value||(r.value=a),r.defaultValue=a}d=r.name,d!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,d!==""&&(r.name=d)}function _t(r,a,d){(a!=="number"||Ht(r.ownerDocument)!==r)&&(d==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+d&&(r.defaultValue=""+d))}var ht=Array.isArray;function cn(r,a,d,g){if(r=r.options,a){a={};for(var v=0;v<d.length;v++)a["$"+d[v]]=!0;for(d=0;d<r.length;d++)v=a.hasOwnProperty("$"+r[d].value),r[d].selected!==v&&(r[d].selected=v),v&&g&&(r[d].defaultSelected=!0)}else{for(d=""+Ee(d),a=null,v=0;v<r.length;v++){if(r[v].value===d){r[v].selected=!0,g&&(r[v].defaultSelected=!0);return}a!==null||r[v].disabled||(a=r[v])}a!==null&&(a.selected=!0)}}function wn(r,a){if(a.dangerouslySetInnerHTML!=null)throw Error(s(91));return P({},a,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ls(r,a){var d=a.value;if(d==null){if(d=a.children,a=a.defaultValue,d!=null){if(a!=null)throw Error(s(92));if(ht(d)){if(1<d.length)throw Error(s(93));d=d[0]}a=d}a==null&&(a=""),d=a}r._wrapperState={initialValue:Ee(d)}}function Hn(r,a){var d=Ee(a.value),g=Ee(a.defaultValue);d!=null&&(d=""+d,d!==r.value&&(r.value=d),a.defaultValue==null&&r.defaultValue!==d&&(r.defaultValue=d)),g!=null&&(r.defaultValue=""+g)}function De(r){var a=r.textContent;a===r._wrapperState.initialValue&&a!==""&&a!==null&&(r.value=a)}function G(r){switch(r){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 ie(r,a){return r==null||r==="http://www.w3.org/1999/xhtml"?G(a):r==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var V,ve=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,d,g,v){MSApp.execUnsafeLocalFunction(function(){return r(a,d,g,v)})}:r})(function(r,a){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=a;else{for(V=V||document.createElement("div"),V.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=V.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;a.firstChild;)r.appendChild(a.firstChild)}});function Re(r,a){if(a){var d=r.firstChild;if(d&&d===r.lastChild&&d.nodeType===3){d.nodeValue=a;return}}r.textContent=a}var Ue={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},lt=["Webkit","ms","Moz","O"];Object.keys(Ue).forEach(function(r){lt.forEach(function(a){a=a+r.charAt(0).toUpperCase()+r.substring(1),Ue[a]=Ue[r]})});function un(r,a,d){return a==null||typeof a=="boolean"||a===""?"":d||typeof a!="number"||a===0||Ue.hasOwnProperty(r)&&Ue[r]?(""+a).trim():a+"px"}function cs(r,a){r=r.style;for(var d in a)if(a.hasOwnProperty(d)){var g=d.indexOf("--")===0,v=un(d,a[d],g);d==="float"&&(d="cssFloat"),g?r.setProperty(d,v):r[d]=v}}var Qs=P({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 gt(r,a){if(a){if(Qs[r]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(s(137,r));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(s(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(s(61))}if(a.style!=null&&typeof a.style!="object")throw Error(s(62))}}function _n(r,a){if(r.indexOf("-")===-1)return typeof a.is=="string";switch(r){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 Kt=null;function pc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var fc=null,Tr=null,Pr=null;function Fp(r){if(r=Di(r)){if(typeof fc!="function")throw Error(s(280));var a=r.stateNode;a&&(a=po(a),fc(r.stateNode,r.type,a))}}function $p(r){Tr?Pr?Pr.push(r):Pr=[r]:Tr=r}function Op(){if(Tr){var r=Tr,a=Pr;if(Pr=Tr=null,Fp(r),a)for(r=0;r<a.length;r++)Fp(a[r])}}function Dp(r,a){return r(a)}function Bp(){}var mc=!1;function qp(r,a,d){if(mc)return r(a,d);mc=!0;try{return Dp(r,a,d)}finally{mc=!1,(Tr!==null||Pr!==null)&&(Bp(),Op())}}function vi(r,a){var d=r.stateNode;if(d===null)return null;var g=po(d);if(g===null)return null;d=g[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(r=r.type,g=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!g;break e;default:r=!1}if(r)return null;if(d&&typeof d!="function")throw Error(s(231,a,typeof d));return d}var gc=!1;if(u)try{var ki={};Object.defineProperty(ki,"passive",{get:function(){gc=!0}}),window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch{gc=!1}function f3(r,a,d,g,v,b,C,_,F){var K=Array.prototype.slice.call(arguments,3);try{a.apply(d,K)}catch(te){this.onError(te)}}var wi=!1,Wa=null,Ha=!1,yc=null,m3={onError:function(r){wi=!0,Wa=r}};function g3(r,a,d,g,v,b,C,_,F){wi=!1,Wa=null,f3.apply(m3,arguments)}function y3(r,a,d,g,v,b,C,_,F){if(g3.apply(this,arguments),wi){if(wi){var K=Wa;wi=!1,Wa=null}else throw Error(s(198));Ha||(Ha=!0,yc=K)}}function Gs(r){var a=r,d=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(d=a.return),r=a.return;while(r)}return a.tag===3?d:null}function Up(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function Wp(r){if(Gs(r)!==r)throw Error(s(188))}function x3(r){var a=r.alternate;if(!a){if(a=Gs(r),a===null)throw Error(s(188));return a!==r?null:r}for(var d=r,g=a;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(g=v.return,g!==null){d=g;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return Wp(v),r;if(b===g)return Wp(v),a;b=b.sibling}throw Error(s(188))}if(d.return!==g.return)d=v,g=b;else{for(var C=!1,_=v.child;_;){if(_===d){C=!0,d=v,g=b;break}if(_===g){C=!0,g=v,d=b;break}_=_.sibling}if(!C){for(_=b.child;_;){if(_===d){C=!0,d=b,g=v;break}if(_===g){C=!0,g=b,d=v;break}_=_.sibling}if(!C)throw Error(s(189))}}if(d.alternate!==g)throw Error(s(190))}if(d.tag!==3)throw Error(s(188));return d.stateNode.current===d?r:a}function Hp(r){return r=x3(r),r!==null?Vp(r):null}function Vp(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var a=Vp(r);if(a!==null)return a;r=r.sibling}return null}var Kp=t.unstable_scheduleCallback,Qp=t.unstable_cancelCallback,v3=t.unstable_shouldYield,k3=t.unstable_requestPaint,tt=t.unstable_now,w3=t.unstable_getCurrentPriorityLevel,xc=t.unstable_ImmediatePriority,Gp=t.unstable_UserBlockingPriority,Va=t.unstable_NormalPriority,b3=t.unstable_LowPriority,Yp=t.unstable_IdlePriority,Ka=null,zn=null;function j3(r){if(zn&&typeof zn.onCommitFiberRoot=="function")try{zn.onCommitFiberRoot(Ka,r,void 0,(r.current.flags&128)===128)}catch{}}var bn=Math.clz32?Math.clz32:C3,N3=Math.log,S3=Math.LN2;function C3(r){return r>>>=0,r===0?32:31-(N3(r)/S3|0)|0}var Qa=64,Ga=4194304;function bi(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Ya(r,a){var d=r.pendingLanes;if(d===0)return 0;var g=0,v=r.suspendedLanes,b=r.pingedLanes,C=d&268435455;if(C!==0){var _=C&~v;_!==0?g=bi(_):(b&=C,b!==0&&(g=bi(b)))}else C=d&~v,C!==0?g=bi(C):b!==0&&(g=bi(b));if(g===0)return 0;if(a!==0&&a!==g&&(a&v)===0&&(v=g&-g,b=a&-a,v>=b||v===16&&(b&4194240)!==0))return a;if((g&4)!==0&&(g|=d&16),a=r.entangledLanes,a!==0)for(r=r.entanglements,a&=g;0<a;)d=31-bn(a),v=1<<d,g|=r[d],a&=~v;return g}function E3(r,a){switch(r){case 1:case 2:case 4:return a+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 a+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 T3(r,a){for(var d=r.suspendedLanes,g=r.pingedLanes,v=r.expirationTimes,b=r.pendingLanes;0<b;){var C=31-bn(b),_=1<<C,F=v[C];F===-1?((_&d)===0||(_&g)!==0)&&(v[C]=E3(_,a)):F<=a&&(r.expiredLanes|=_),b&=~_}}function vc(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Zp(){var r=Qa;return Qa<<=1,(Qa&4194240)===0&&(Qa=64),r}function kc(r){for(var a=[],d=0;31>d;d++)a.push(r);return a}function ji(r,a,d){r.pendingLanes|=a,a!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,a=31-bn(a),r[a]=d}function P3(r,a){var d=r.pendingLanes&~a;r.pendingLanes=a,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=a,r.mutableReadLanes&=a,r.entangledLanes&=a,a=r.entanglements;var g=r.eventTimes;for(r=r.expirationTimes;0<d;){var v=31-bn(d),b=1<<v;a[v]=0,g[v]=-1,r[v]=-1,d&=~b}}function wc(r,a){var d=r.entangledLanes|=a;for(r=r.entanglements;d;){var g=31-bn(d),v=1<<g;v&a|r[g]&a&&(r[g]|=a),d&=~v}}var Be=0;function Xp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Jp,bc,ef,tf,nf,jc=!1,Za=[],us=null,ds=null,hs=null,Ni=new Map,Si=new Map,ps=[],R3="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 sf(r,a){switch(r){case"focusin":case"focusout":us=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":Ni.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Si.delete(a.pointerId)}}function Ci(r,a,d,g,v,b){return r===null||r.nativeEvent!==b?(r={blockedOn:a,domEventName:d,eventSystemFlags:g,nativeEvent:b,targetContainers:[v]},a!==null&&(a=Di(a),a!==null&&bc(a)),r):(r.eventSystemFlags|=g,a=r.targetContainers,v!==null&&a.indexOf(v)===-1&&a.push(v),r)}function A3(r,a,d,g,v){switch(a){case"focusin":return us=Ci(us,r,a,d,g,v),!0;case"dragenter":return ds=Ci(ds,r,a,d,g,v),!0;case"mouseover":return hs=Ci(hs,r,a,d,g,v),!0;case"pointerover":var b=v.pointerId;return Ni.set(b,Ci(Ni.get(b)||null,r,a,d,g,v)),!0;case"gotpointercapture":return b=v.pointerId,Si.set(b,Ci(Si.get(b)||null,r,a,d,g,v)),!0}return!1}function rf(r){var a=Ys(r.target);if(a!==null){var d=Gs(a);if(d!==null){if(a=d.tag,a===13){if(a=Up(d),a!==null){r.blockedOn=a,nf(r.priority,function(){ef(d)});return}}else if(a===3&&d.stateNode.current.memoizedState.isDehydrated){r.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Xa(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var d=Sc(r.domEventName,r.eventSystemFlags,a[0],r.nativeEvent);if(d===null){d=r.nativeEvent;var g=new d.constructor(d.type,d);Kt=g,d.target.dispatchEvent(g),Kt=null}else return a=Di(d),a!==null&&bc(a),r.blockedOn=d,!1;a.shift()}return!0}function af(r,a,d){Xa(r)&&d.delete(a)}function I3(){jc=!1,us!==null&&Xa(us)&&(us=null),ds!==null&&Xa(ds)&&(ds=null),hs!==null&&Xa(hs)&&(hs=null),Ni.forEach(af),Si.forEach(af)}function Ei(r,a){r.blockedOn===a&&(r.blockedOn=null,jc||(jc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,I3)))}function Ti(r){function a(v){return Ei(v,r)}if(0<Za.length){Ei(Za[0],r);for(var d=1;d<Za.length;d++){var g=Za[d];g.blockedOn===r&&(g.blockedOn=null)}}for(us!==null&&Ei(us,r),ds!==null&&Ei(ds,r),hs!==null&&Ei(hs,r),Ni.forEach(a),Si.forEach(a),d=0;d<ps.length;d++)g=ps[d],g.blockedOn===r&&(g.blockedOn=null);for(;0<ps.length&&(d=ps[0],d.blockedOn===null);)rf(d),d.blockedOn===null&&ps.shift()}var Rr=A.ReactCurrentBatchConfig,Ja=!0;function L3(r,a,d,g){var v=Be,b=Rr.transition;Rr.transition=null;try{Be=1,Nc(r,a,d,g)}finally{Be=v,Rr.transition=b}}function _3(r,a,d,g){var v=Be,b=Rr.transition;Rr.transition=null;try{Be=4,Nc(r,a,d,g)}finally{Be=v,Rr.transition=b}}function Nc(r,a,d,g){if(Ja){var v=Sc(r,a,d,g);if(v===null)qc(r,a,g,eo,d),sf(r,g);else if(A3(v,r,a,d,g))g.stopPropagation();else if(sf(r,g),a&4&&-1<R3.indexOf(r)){for(;v!==null;){var b=Di(v);if(b!==null&&Jp(b),b=Sc(r,a,d,g),b===null&&qc(r,a,g,eo,d),b===v)break;v=b}v!==null&&g.stopPropagation()}else qc(r,a,g,null,d)}}var eo=null;function Sc(r,a,d,g){if(eo=null,r=pc(g),r=Ys(r),r!==null)if(a=Gs(r),a===null)r=null;else if(d=a.tag,d===13){if(r=Up(a),r!==null)return r;r=null}else if(d===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null);return eo=r,null}function of(r){switch(r){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(w3()){case xc:return 1;case Gp:return 4;case Va:case b3:return 16;case Yp:return 536870912;default:return 16}default:return 16}}var fs=null,Cc=null,to=null;function lf(){if(to)return to;var r,a=Cc,d=a.length,g,v="value"in fs?fs.value:fs.textContent,b=v.length;for(r=0;r<d&&a[r]===v[r];r++);var C=d-r;for(g=1;g<=C&&a[d-g]===v[b-g];g++);return to=v.slice(r,1<g?1-g:void 0)}function no(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function so(){return!0}function cf(){return!1}function Qt(r){function a(d,g,v,b,C){this._reactName=d,this._targetInst=v,this.type=g,this.nativeEvent=b,this.target=C,this.currentTarget=null;for(var _ in r)r.hasOwnProperty(_)&&(d=r[_],this[_]=d?d(b):b[_]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?so:cf,this.isPropagationStopped=cf,this}return P(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=so)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),a}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ec=Qt(Ar),Pi=P({},Ar,{view:0,detail:0}),z3=Qt(Pi),Tc,Pc,Ri,ro=P({},Pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ac,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Ri&&(Ri&&r.type==="mousemove"?(Tc=r.screenX-Ri.screenX,Pc=r.screenY-Ri.screenY):Pc=Tc=0,Ri=r),Tc)},movementY:function(r){return"movementY"in r?r.movementY:Pc}}),uf=Qt(ro),M3=P({},ro,{dataTransfer:0}),F3=Qt(M3),$3=P({},Pi,{relatedTarget:0}),Rc=Qt($3),O3=P({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),D3=Qt(O3),B3=P({},Ar,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),q3=Qt(B3),U3=P({},Ar,{data:0}),df=Qt(U3),W3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H3={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"},V3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function K3(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=V3[r])?!!a[r]:!1}function Ac(){return K3}var Q3=P({},Pi,{key:function(r){if(r.key){var a=W3[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=no(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?H3[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ac,charCode:function(r){return r.type==="keypress"?no(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?no(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),G3=Qt(Q3),Y3=P({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hf=Qt(Y3),Z3=P({},Pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ac}),X3=Qt(Z3),J3=P({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),e4=Qt(J3),t4=P({},ro,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),n4=Qt(t4),s4=[9,13,27,32],Ic=u&&"CompositionEvent"in window,Ai=null;u&&"documentMode"in document&&(Ai=document.documentMode);var r4=u&&"TextEvent"in window&&!Ai,pf=u&&(!Ic||Ai&&8<Ai&&11>=Ai),ff=" ",mf=!1;function gf(r,a){switch(r){case"keyup":return s4.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ir=!1;function i4(r,a){switch(r){case"compositionend":return yf(a);case"keypress":return a.which!==32?null:(mf=!0,ff);case"textInput":return r=a.data,r===ff&&mf?null:r;default:return null}}function a4(r,a){if(Ir)return r==="compositionend"||!Ic&&gf(r,a)?(r=lf(),to=Cc=fs=null,Ir=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return pf&&a.locale!=="ko"?null:a.data;default:return null}}var o4={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 xf(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!o4[r.type]:a==="textarea"}function vf(r,a,d,g){$p(g),a=co(a,"onChange"),0<a.length&&(d=new Ec("onChange","change",null,d,g),r.push({event:d,listeners:a}))}var Ii=null,Li=null;function l4(r){Ff(r,0)}function io(r){var a=Fr(r);if(It(a))return r}function c4(r,a){if(r==="change")return a}var kf=!1;if(u){var Lc;if(u){var _c="oninput"in document;if(!_c){var wf=document.createElement("div");wf.setAttribute("oninput","return;"),_c=typeof wf.oninput=="function"}Lc=_c}else Lc=!1;kf=Lc&&(!document.documentMode||9<document.documentMode)}function bf(){Ii&&(Ii.detachEvent("onpropertychange",jf),Li=Ii=null)}function jf(r){if(r.propertyName==="value"&&io(Li)){var a=[];vf(a,Li,r,pc(r)),qp(l4,a)}}function u4(r,a,d){r==="focusin"?(bf(),Ii=a,Li=d,Ii.attachEvent("onpropertychange",jf)):r==="focusout"&&bf()}function d4(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return io(Li)}function h4(r,a){if(r==="click")return io(a)}function p4(r,a){if(r==="input"||r==="change")return io(a)}function f4(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var jn=typeof Object.is=="function"?Object.is:f4;function _i(r,a){if(jn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var d=Object.keys(r),g=Object.keys(a);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var v=d[g];if(!h.call(a,v)||!jn(r[v],a[v]))return!1}return!0}function Nf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Sf(r,a){var d=Nf(r);r=0;for(var g;d;){if(d.nodeType===3){if(g=r+d.textContent.length,r<=a&&g>=a)return{node:d,offset:a-r};r=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Nf(d)}}function Cf(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?Cf(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function Ef(){for(var r=window,a=Ht();a instanceof r.HTMLIFrameElement;){try{var d=typeof a.contentWindow.location.href=="string"}catch{d=!1}if(d)r=a.contentWindow;else break;a=Ht(r.document)}return a}function zc(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}function m4(r){var a=Ef(),d=r.focusedElem,g=r.selectionRange;if(a!==d&&d&&d.ownerDocument&&Cf(d.ownerDocument.documentElement,d)){if(g!==null&&zc(d)){if(a=g.start,r=g.end,r===void 0&&(r=a),"selectionStart"in d)d.selectionStart=a,d.selectionEnd=Math.min(r,d.value.length);else if(r=(a=d.ownerDocument||document)&&a.defaultView||window,r.getSelection){r=r.getSelection();var v=d.textContent.length,b=Math.min(g.start,v);g=g.end===void 0?b:Math.min(g.end,v),!r.extend&&b>g&&(v=g,g=b,b=v),v=Sf(d,b);var C=Sf(d,g);v&&C&&(r.rangeCount!==1||r.anchorNode!==v.node||r.anchorOffset!==v.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(a=a.createRange(),a.setStart(v.node,v.offset),r.removeAllRanges(),b>g?(r.addRange(a),r.extend(C.node,C.offset)):(a.setEnd(C.node,C.offset),r.addRange(a)))}}for(a=[],r=d;r=r.parentNode;)r.nodeType===1&&a.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<a.length;d++)r=a[d],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var g4=u&&"documentMode"in document&&11>=document.documentMode,Lr=null,Mc=null,zi=null,Fc=!1;function Tf(r,a,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Fc||Lr==null||Lr!==Ht(g)||(g=Lr,"selectionStart"in g&&zc(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),zi&&_i(zi,g)||(zi=g,g=co(Mc,"onSelect"),0<g.length&&(a=new Ec("onSelect","select",null,a,d),r.push({event:a,listeners:g}),a.target=Lr)))}function ao(r,a){var d={};return d[r.toLowerCase()]=a.toLowerCase(),d["Webkit"+r]="webkit"+a,d["Moz"+r]="moz"+a,d}var _r={animationend:ao("Animation","AnimationEnd"),animationiteration:ao("Animation","AnimationIteration"),animationstart:ao("Animation","AnimationStart"),transitionend:ao("Transition","TransitionEnd")},$c={},Pf={};u&&(Pf=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function oo(r){if($c[r])return $c[r];if(!_r[r])return r;var a=_r[r],d;for(d in a)if(a.hasOwnProperty(d)&&d in Pf)return $c[r]=a[d];return r}var Rf=oo("animationend"),Af=oo("animationiteration"),If=oo("animationstart"),Lf=oo("transitionend"),_f=new Map,zf="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 ms(r,a){_f.set(r,a),l(a,[r])}for(var Oc=0;Oc<zf.length;Oc++){var Dc=zf[Oc],y4=Dc.toLowerCase(),x4=Dc[0].toUpperCase()+Dc.slice(1);ms(y4,"on"+x4)}ms(Rf,"onAnimationEnd"),ms(Af,"onAnimationIteration"),ms(If,"onAnimationStart"),ms("dblclick","onDoubleClick"),ms("focusin","onFocus"),ms("focusout","onBlur"),ms(Lf,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mi="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(" "),v4=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mi));function Mf(r,a,d){var g=r.type||"unknown-event";r.currentTarget=d,y3(g,a,void 0,r),r.currentTarget=null}function Ff(r,a){a=(a&4)!==0;for(var d=0;d<r.length;d++){var g=r[d],v=g.event;g=g.listeners;e:{var b=void 0;if(a)for(var C=g.length-1;0<=C;C--){var _=g[C],F=_.instance,K=_.currentTarget;if(_=_.listener,F!==b&&v.isPropagationStopped())break e;Mf(v,_,K),b=F}else for(C=0;C<g.length;C++){if(_=g[C],F=_.instance,K=_.currentTarget,_=_.listener,F!==b&&v.isPropagationStopped())break e;Mf(v,_,K),b=F}}}if(Ha)throw r=yc,Ha=!1,yc=null,r}function Ke(r,a){var d=a[Qc];d===void 0&&(d=a[Qc]=new Set);var g=r+"__bubble";d.has(g)||($f(a,r,2,!1),d.add(g))}function Bc(r,a,d){var g=0;a&&(g|=4),$f(d,r,g,a)}var lo="_reactListening"+Math.random().toString(36).slice(2);function Fi(r){if(!r[lo]){r[lo]=!0,i.forEach(function(d){d!=="selectionchange"&&(v4.has(d)||Bc(d,!1,r),Bc(d,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[lo]||(a[lo]=!0,Bc("selectionchange",!1,a))}}function $f(r,a,d,g){switch(of(a)){case 1:var v=L3;break;case 4:v=_3;break;default:v=Nc}d=v.bind(null,a,d,r),v=void 0,!gc||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(v=!0),g?v!==void 0?r.addEventListener(a,d,{capture:!0,passive:v}):r.addEventListener(a,d,!0):v!==void 0?r.addEventListener(a,d,{passive:v}):r.addEventListener(a,d,!1)}function qc(r,a,d,g,v){var b=g;if((a&1)===0&&(a&2)===0&&g!==null)e:for(;;){if(g===null)return;var C=g.tag;if(C===3||C===4){var _=g.stateNode.containerInfo;if(_===v||_.nodeType===8&&_.parentNode===v)break;if(C===4)for(C=g.return;C!==null;){var F=C.tag;if((F===3||F===4)&&(F=C.stateNode.containerInfo,F===v||F.nodeType===8&&F.parentNode===v))return;C=C.return}for(;_!==null;){if(C=Ys(_),C===null)return;if(F=C.tag,F===5||F===6){g=b=C;continue e}_=_.parentNode}}g=g.return}qp(function(){var K=b,te=pc(d),re=[];e:{var ee=_f.get(r);if(ee!==void 0){var ue=Ec,fe=r;switch(r){case"keypress":if(no(d)===0)break e;case"keydown":case"keyup":ue=G3;break;case"focusin":fe="focus",ue=Rc;break;case"focusout":fe="blur",ue=Rc;break;case"beforeblur":case"afterblur":ue=Rc;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=F3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=X3;break;case Rf:case Af:case If:ue=D3;break;case Lf:ue=e4;break;case"scroll":ue=z3;break;case"wheel":ue=n4;break;case"copy":case"cut":case"paste":ue=q3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=hf}var ge=(a&4)!==0,nt=!ge&&r==="scroll",W=ge?ee!==null?ee+"Capture":null:ee;ge=[];for(var D=K,H;D!==null;){H=D;var oe=H.stateNode;if(H.tag===5&&oe!==null&&(H=oe,W!==null&&(oe=vi(D,W),oe!=null&&ge.push($i(D,oe,H)))),nt)break;D=D.return}0<ge.length&&(ee=new ue(ee,fe,null,d,te),re.push({event:ee,listeners:ge}))}}if((a&7)===0){e:{if(ee=r==="mouseover"||r==="pointerover",ue=r==="mouseout"||r==="pointerout",ee&&d!==Kt&&(fe=d.relatedTarget||d.fromElement)&&(Ys(fe)||fe[Vn]))break e;if((ue||ee)&&(ee=te.window===te?te:(ee=te.ownerDocument)?ee.defaultView||ee.parentWindow:window,ue?(fe=d.relatedTarget||d.toElement,ue=K,fe=fe?Ys(fe):null,fe!==null&&(nt=Gs(fe),fe!==nt||fe.tag!==5&&fe.tag!==6)&&(fe=null)):(ue=null,fe=K),ue!==fe)){if(ge=uf,oe="onMouseLeave",W="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(ge=hf,oe="onPointerLeave",W="onPointerEnter",D="pointer"),nt=ue==null?ee:Fr(ue),H=fe==null?ee:Fr(fe),ee=new ge(oe,D+"leave",ue,d,te),ee.target=nt,ee.relatedTarget=H,oe=null,Ys(te)===K&&(ge=new ge(W,D+"enter",fe,d,te),ge.target=H,ge.relatedTarget=nt,oe=ge),nt=oe,ue&&fe)t:{for(ge=ue,W=fe,D=0,H=ge;H;H=zr(H))D++;for(H=0,oe=W;oe;oe=zr(oe))H++;for(;0<D-H;)ge=zr(ge),D--;for(;0<H-D;)W=zr(W),H--;for(;D--;){if(ge===W||W!==null&&ge===W.alternate)break t;ge=zr(ge),W=zr(W)}ge=null}else ge=null;ue!==null&&Of(re,ee,ue,ge,!1),fe!==null&&nt!==null&&Of(re,nt,fe,ge,!0)}}e:{if(ee=K?Fr(K):window,ue=ee.nodeName&&ee.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ee.type==="file")var ke=c4;else if(xf(ee))if(kf)ke=p4;else{ke=d4;var we=u4}else(ue=ee.nodeName)&&ue.toLowerCase()==="input"&&(ee.type==="checkbox"||ee.type==="radio")&&(ke=h4);if(ke&&(ke=ke(r,K))){vf(re,ke,d,te);break e}we&&we(r,ee,K),r==="focusout"&&(we=ee._wrapperState)&&we.controlled&&ee.type==="number"&&_t(ee,"number",ee.value)}switch(we=K?Fr(K):window,r){case"focusin":(xf(we)||we.contentEditable==="true")&&(Lr=we,Mc=K,zi=null);break;case"focusout":zi=Mc=Lr=null;break;case"mousedown":Fc=!0;break;case"contextmenu":case"mouseup":case"dragend":Fc=!1,Tf(re,d,te);break;case"selectionchange":if(g4)break;case"keydown":case"keyup":Tf(re,d,te)}var be;if(Ic)e:{switch(r){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else Ir?gf(r,d)&&(Te="onCompositionEnd"):r==="keydown"&&d.keyCode===229&&(Te="onCompositionStart");Te&&(pf&&d.locale!=="ko"&&(Ir||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Ir&&(be=lf()):(fs=te,Cc="value"in fs?fs.value:fs.textContent,Ir=!0)),we=co(K,Te),0<we.length&&(Te=new df(Te,r,null,d,te),re.push({event:Te,listeners:we}),be?Te.data=be:(be=yf(d),be!==null&&(Te.data=be)))),(be=r4?i4(r,d):a4(r,d))&&(K=co(K,"onBeforeInput"),0<K.length&&(te=new df("onBeforeInput","beforeinput",null,d,te),re.push({event:te,listeners:K}),te.data=be))}Ff(re,a)})}function $i(r,a,d){return{instance:r,listener:a,currentTarget:d}}function co(r,a){for(var d=a+"Capture",g=[];r!==null;){var v=r,b=v.stateNode;v.tag===5&&b!==null&&(v=b,b=vi(r,d),b!=null&&g.unshift($i(r,b,v)),b=vi(r,a),b!=null&&g.push($i(r,b,v))),r=r.return}return g}function zr(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Of(r,a,d,g,v){for(var b=a._reactName,C=[];d!==null&&d!==g;){var _=d,F=_.alternate,K=_.stateNode;if(F!==null&&F===g)break;_.tag===5&&K!==null&&(_=K,v?(F=vi(d,b),F!=null&&C.unshift($i(d,F,_))):v||(F=vi(d,b),F!=null&&C.push($i(d,F,_)))),d=d.return}C.length!==0&&r.push({event:a,listeners:C})}var k4=/\r\n?/g,w4=/\u0000|\uFFFD/g;function Df(r){return(typeof r=="string"?r:""+r).replace(k4,`
38
- `).replace(w4,"")}function uo(r,a,d){if(a=Df(a),Df(r)!==a&&d)throw Error(s(425))}function ho(){}var Uc=null,Wc=null;function Hc(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Vc=typeof setTimeout=="function"?setTimeout:void 0,b4=typeof clearTimeout=="function"?clearTimeout:void 0,Bf=typeof Promise=="function"?Promise:void 0,j4=typeof queueMicrotask=="function"?queueMicrotask:typeof Bf<"u"?function(r){return Bf.resolve(null).then(r).catch(N4)}:Vc;function N4(r){setTimeout(function(){throw r})}function Kc(r,a){var d=a,g=0;do{var v=d.nextSibling;if(r.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"){if(g===0){r.removeChild(v),Ti(a);return}g--}else d!=="$"&&d!=="$?"&&d!=="$!"||g++;d=v}while(d);Ti(a)}function gs(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return r}function qf(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var d=r.data;if(d==="$"||d==="$!"||d==="$?"){if(a===0)return r;a--}else d==="/$"&&a++}r=r.previousSibling}return null}var Mr=Math.random().toString(36).slice(2),Mn="__reactFiber$"+Mr,Oi="__reactProps$"+Mr,Vn="__reactContainer$"+Mr,Qc="__reactEvents$"+Mr,S4="__reactListeners$"+Mr,C4="__reactHandles$"+Mr;function Ys(r){var a=r[Mn];if(a)return a;for(var d=r.parentNode;d;){if(a=d[Vn]||d[Mn]){if(d=a.alternate,a.child!==null||d!==null&&d.child!==null)for(r=qf(r);r!==null;){if(d=r[Mn])return d;r=qf(r)}return a}r=d,d=r.parentNode}return null}function Di(r){return r=r[Mn]||r[Vn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Fr(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(s(33))}function po(r){return r[Oi]||null}var Gc=[],$r=-1;function ys(r){return{current:r}}function Qe(r){0>$r||(r.current=Gc[$r],Gc[$r]=null,$r--)}function He(r,a){$r++,Gc[$r]=r.current,r.current=a}var xs={},vt=ys(xs),zt=ys(!1),Zs=xs;function Or(r,a){var d=r.type.contextTypes;if(!d)return xs;var g=r.stateNode;if(g&&g.__reactInternalMemoizedUnmaskedChildContext===a)return g.__reactInternalMemoizedMaskedChildContext;var v={},b;for(b in d)v[b]=a[b];return g&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=a,r.__reactInternalMemoizedMaskedChildContext=v),v}function Mt(r){return r=r.childContextTypes,r!=null}function fo(){Qe(zt),Qe(vt)}function Uf(r,a,d){if(vt.current!==xs)throw Error(s(168));He(vt,a),He(zt,d)}function Wf(r,a,d){var g=r.stateNode;if(a=a.childContextTypes,typeof g.getChildContext!="function")return d;g=g.getChildContext();for(var v in g)if(!(v in a))throw Error(s(108,Pe(r)||"Unknown",v));return P({},d,g)}function mo(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||xs,Zs=vt.current,He(vt,r),He(zt,zt.current),!0}function Hf(r,a,d){var g=r.stateNode;if(!g)throw Error(s(169));d?(r=Wf(r,a,Zs),g.__reactInternalMemoizedMergedChildContext=r,Qe(zt),Qe(vt),He(vt,r)):Qe(zt),He(zt,d)}var Kn=null,go=!1,Yc=!1;function Vf(r){Kn===null?Kn=[r]:Kn.push(r)}function E4(r){go=!0,Vf(r)}function vs(){if(!Yc&&Kn!==null){Yc=!0;var r=0,a=Be;try{var d=Kn;for(Be=1;r<d.length;r++){var g=d[r];do g=g(!0);while(g!==null)}Kn=null,go=!1}catch(v){throw Kn!==null&&(Kn=Kn.slice(r+1)),Kp(xc,vs),v}finally{Be=a,Yc=!1}}return null}var Dr=[],Br=0,yo=null,xo=0,dn=[],hn=0,Xs=null,Qn=1,Gn="";function Js(r,a){Dr[Br++]=xo,Dr[Br++]=yo,yo=r,xo=a}function Kf(r,a,d){dn[hn++]=Qn,dn[hn++]=Gn,dn[hn++]=Xs,Xs=r;var g=Qn;r=Gn;var v=32-bn(g)-1;g&=~(1<<v),d+=1;var b=32-bn(a)+v;if(30<b){var C=v-v%5;b=(g&(1<<C)-1).toString(32),g>>=C,v-=C,Qn=1<<32-bn(a)+v|d<<v|g,Gn=b+r}else Qn=1<<b|d<<v|g,Gn=r}function Zc(r){r.return!==null&&(Js(r,1),Kf(r,1,0))}function Xc(r){for(;r===yo;)yo=Dr[--Br],Dr[Br]=null,xo=Dr[--Br],Dr[Br]=null;for(;r===Xs;)Xs=dn[--hn],dn[hn]=null,Gn=dn[--hn],dn[hn]=null,Qn=dn[--hn],dn[hn]=null}var Gt=null,Yt=null,Ye=!1,Nn=null;function Qf(r,a){var d=gn(5,null,null,0);d.elementType="DELETED",d.stateNode=a,d.return=r,a=r.deletions,a===null?(r.deletions=[d],r.flags|=16):a.push(d)}function Gf(r,a){switch(r.tag){case 5:var d=r.type;return a=a.nodeType!==1||d.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(r.stateNode=a,Gt=r,Yt=gs(a.firstChild),!0):!1;case 6:return a=r.pendingProps===""||a.nodeType!==3?null:a,a!==null?(r.stateNode=a,Gt=r,Yt=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(d=Xs!==null?{id:Qn,overflow:Gn}:null,r.memoizedState={dehydrated:a,treeContext:d,retryLane:1073741824},d=gn(18,null,null,0),d.stateNode=a,d.return=r,r.child=d,Gt=r,Yt=null,!0):!1;default:return!1}}function Jc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function eu(r){if(Ye){var a=Yt;if(a){var d=a;if(!Gf(r,a)){if(Jc(r))throw Error(s(418));a=gs(d.nextSibling);var g=Gt;a&&Gf(r,a)?Qf(g,d):(r.flags=r.flags&-4097|2,Ye=!1,Gt=r)}}else{if(Jc(r))throw Error(s(418));r.flags=r.flags&-4097|2,Ye=!1,Gt=r}}}function Yf(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Gt=r}function vo(r){if(r!==Gt)return!1;if(!Ye)return Yf(r),Ye=!0,!1;var a;if((a=r.tag!==3)&&!(a=r.tag!==5)&&(a=r.type,a=a!=="head"&&a!=="body"&&!Hc(r.type,r.memoizedProps)),a&&(a=Yt)){if(Jc(r))throw Zf(),Error(s(418));for(;a;)Qf(r,a),a=gs(a.nextSibling)}if(Yf(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));e:{for(r=r.nextSibling,a=0;r;){if(r.nodeType===8){var d=r.data;if(d==="/$"){if(a===0){Yt=gs(r.nextSibling);break e}a--}else d!=="$"&&d!=="$!"&&d!=="$?"||a++}r=r.nextSibling}Yt=null}}else Yt=Gt?gs(r.stateNode.nextSibling):null;return!0}function Zf(){for(var r=Yt;r;)r=gs(r.nextSibling)}function qr(){Yt=Gt=null,Ye=!1}function tu(r){Nn===null?Nn=[r]:Nn.push(r)}var T4=A.ReactCurrentBatchConfig;function Bi(r,a,d){if(r=d.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(s(309));var g=d.stateNode}if(!g)throw Error(s(147,r));var v=g,b=""+r;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===b?a.ref:(a=function(C){var _=v.refs;C===null?delete _[b]:_[b]=C},a._stringRef=b,a)}if(typeof r!="string")throw Error(s(284));if(!d._owner)throw Error(s(290,r))}return r}function ko(r,a){throw r=Object.prototype.toString.call(a),Error(s(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r))}function Xf(r){var a=r._init;return a(r._payload)}function Jf(r){function a(W,D){if(r){var H=W.deletions;H===null?(W.deletions=[D],W.flags|=16):H.push(D)}}function d(W,D){if(!r)return null;for(;D!==null;)a(W,D),D=D.sibling;return null}function g(W,D){for(W=new Map;D!==null;)D.key!==null?W.set(D.key,D):W.set(D.index,D),D=D.sibling;return W}function v(W,D){return W=Es(W,D),W.index=0,W.sibling=null,W}function b(W,D,H){return W.index=H,r?(H=W.alternate,H!==null?(H=H.index,H<D?(W.flags|=2,D):H):(W.flags|=2,D)):(W.flags|=1048576,D)}function C(W){return r&&W.alternate===null&&(W.flags|=2),W}function _(W,D,H,oe){return D===null||D.tag!==6?(D=Vu(H,W.mode,oe),D.return=W,D):(D=v(D,H),D.return=W,D)}function F(W,D,H,oe){var ke=H.type;return ke===M?te(W,D,H.props.children,oe,H.key):D!==null&&(D.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===he&&Xf(ke)===D.type)?(oe=v(D,H.props),oe.ref=Bi(W,D,H),oe.return=W,oe):(oe=Wo(H.type,H.key,H.props,null,W.mode,oe),oe.ref=Bi(W,D,H),oe.return=W,oe)}function K(W,D,H,oe){return D===null||D.tag!==4||D.stateNode.containerInfo!==H.containerInfo||D.stateNode.implementation!==H.implementation?(D=Ku(H,W.mode,oe),D.return=W,D):(D=v(D,H.children||[]),D.return=W,D)}function te(W,D,H,oe,ke){return D===null||D.tag!==7?(D=or(H,W.mode,oe,ke),D.return=W,D):(D=v(D,H),D.return=W,D)}function re(W,D,H){if(typeof D=="string"&&D!==""||typeof D=="number")return D=Vu(""+D,W.mode,H),D.return=W,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case q:return H=Wo(D.type,D.key,D.props,null,W.mode,H),H.ref=Bi(W,null,D),H.return=W,H;case R:return D=Ku(D,W.mode,H),D.return=W,D;case he:var oe=D._init;return re(W,oe(D._payload),H)}if(ht(D)||se(D))return D=or(D,W.mode,H,null),D.return=W,D;ko(W,D)}return null}function ee(W,D,H,oe){var ke=D!==null?D.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return ke!==null?null:_(W,D,""+H,oe);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case q:return H.key===ke?F(W,D,H,oe):null;case R:return H.key===ke?K(W,D,H,oe):null;case he:return ke=H._init,ee(W,D,ke(H._payload),oe)}if(ht(H)||se(H))return ke!==null?null:te(W,D,H,oe,null);ko(W,H)}return null}function ue(W,D,H,oe,ke){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return W=W.get(H)||null,_(D,W,""+oe,ke);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case q:return W=W.get(oe.key===null?H:oe.key)||null,F(D,W,oe,ke);case R:return W=W.get(oe.key===null?H:oe.key)||null,K(D,W,oe,ke);case he:var we=oe._init;return ue(W,D,H,we(oe._payload),ke)}if(ht(oe)||se(oe))return W=W.get(H)||null,te(D,W,oe,ke,null);ko(D,oe)}return null}function fe(W,D,H,oe){for(var ke=null,we=null,be=D,Te=D=0,mt=null;be!==null&&Te<H.length;Te++){be.index>Te?(mt=be,be=null):mt=be.sibling;var Oe=ee(W,be,H[Te],oe);if(Oe===null){be===null&&(be=mt);break}r&&be&&Oe.alternate===null&&a(W,be),D=b(Oe,D,Te),we===null?ke=Oe:we.sibling=Oe,we=Oe,be=mt}if(Te===H.length)return d(W,be),Ye&&Js(W,Te),ke;if(be===null){for(;Te<H.length;Te++)be=re(W,H[Te],oe),be!==null&&(D=b(be,D,Te),we===null?ke=be:we.sibling=be,we=be);return Ye&&Js(W,Te),ke}for(be=g(W,be);Te<H.length;Te++)mt=ue(be,W,Te,H[Te],oe),mt!==null&&(r&&mt.alternate!==null&&be.delete(mt.key===null?Te:mt.key),D=b(mt,D,Te),we===null?ke=mt:we.sibling=mt,we=mt);return r&&be.forEach(function(Ts){return a(W,Ts)}),Ye&&Js(W,Te),ke}function ge(W,D,H,oe){var ke=se(H);if(typeof ke!="function")throw Error(s(150));if(H=ke.call(H),H==null)throw Error(s(151));for(var we=ke=null,be=D,Te=D=0,mt=null,Oe=H.next();be!==null&&!Oe.done;Te++,Oe=H.next()){be.index>Te?(mt=be,be=null):mt=be.sibling;var Ts=ee(W,be,Oe.value,oe);if(Ts===null){be===null&&(be=mt);break}r&&be&&Ts.alternate===null&&a(W,be),D=b(Ts,D,Te),we===null?ke=Ts:we.sibling=Ts,we=Ts,be=mt}if(Oe.done)return d(W,be),Ye&&Js(W,Te),ke;if(be===null){for(;!Oe.done;Te++,Oe=H.next())Oe=re(W,Oe.value,oe),Oe!==null&&(D=b(Oe,D,Te),we===null?ke=Oe:we.sibling=Oe,we=Oe);return Ye&&Js(W,Te),ke}for(be=g(W,be);!Oe.done;Te++,Oe=H.next())Oe=ue(be,W,Te,Oe.value,oe),Oe!==null&&(r&&Oe.alternate!==null&&be.delete(Oe.key===null?Te:Oe.key),D=b(Oe,D,Te),we===null?ke=Oe:we.sibling=Oe,we=Oe);return r&&be.forEach(function(ov){return a(W,ov)}),Ye&&Js(W,Te),ke}function nt(W,D,H,oe){if(typeof H=="object"&&H!==null&&H.type===M&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case q:e:{for(var ke=H.key,we=D;we!==null;){if(we.key===ke){if(ke=H.type,ke===M){if(we.tag===7){d(W,we.sibling),D=v(we,H.props.children),D.return=W,W=D;break e}}else if(we.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===he&&Xf(ke)===we.type){d(W,we.sibling),D=v(we,H.props),D.ref=Bi(W,we,H),D.return=W,W=D;break e}d(W,we);break}else a(W,we);we=we.sibling}H.type===M?(D=or(H.props.children,W.mode,oe,H.key),D.return=W,W=D):(oe=Wo(H.type,H.key,H.props,null,W.mode,oe),oe.ref=Bi(W,D,H),oe.return=W,W=oe)}return C(W);case R:e:{for(we=H.key;D!==null;){if(D.key===we)if(D.tag===4&&D.stateNode.containerInfo===H.containerInfo&&D.stateNode.implementation===H.implementation){d(W,D.sibling),D=v(D,H.children||[]),D.return=W,W=D;break e}else{d(W,D);break}else a(W,D);D=D.sibling}D=Ku(H,W.mode,oe),D.return=W,W=D}return C(W);case he:return we=H._init,nt(W,D,we(H._payload),oe)}if(ht(H))return fe(W,D,H,oe);if(se(H))return ge(W,D,H,oe);ko(W,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,D!==null&&D.tag===6?(d(W,D.sibling),D=v(D,H),D.return=W,W=D):(d(W,D),D=Vu(H,W.mode,oe),D.return=W,W=D),C(W)):d(W,D)}return nt}var Ur=Jf(!0),e1=Jf(!1),wo=ys(null),bo=null,Wr=null,nu=null;function su(){nu=Wr=bo=null}function ru(r){var a=wo.current;Qe(wo),r._currentValue=a}function iu(r,a,d){for(;r!==null;){var g=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,g!==null&&(g.childLanes|=a)):g!==null&&(g.childLanes&a)!==a&&(g.childLanes|=a),r===d)break;r=r.return}}function Hr(r,a){bo=r,nu=Wr=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&a)!==0&&(Ft=!0),r.firstContext=null)}function pn(r){var a=r._currentValue;if(nu!==r)if(r={context:r,memoizedValue:a,next:null},Wr===null){if(bo===null)throw Error(s(308));Wr=r,bo.dependencies={lanes:0,firstContext:r}}else Wr=Wr.next=r;return a}var er=null;function au(r){er===null?er=[r]:er.push(r)}function t1(r,a,d,g){var v=a.interleaved;return v===null?(d.next=d,au(a)):(d.next=v.next,v.next=d),a.interleaved=d,Yn(r,g)}function Yn(r,a){r.lanes|=a;var d=r.alternate;for(d!==null&&(d.lanes|=a),d=r,r=r.return;r!==null;)r.childLanes|=a,d=r.alternate,d!==null&&(d.childLanes|=a),d=r,r=r.return;return d.tag===3?d.stateNode:null}var ks=!1;function ou(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function n1(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Zn(r,a){return{eventTime:r,lane:a,tag:0,payload:null,callback:null,next:null}}function ws(r,a,d){var g=r.updateQueue;if(g===null)return null;if(g=g.shared,(Fe&2)!==0){var v=g.pending;return v===null?a.next=a:(a.next=v.next,v.next=a),g.pending=a,Yn(r,d)}return v=g.interleaved,v===null?(a.next=a,au(g)):(a.next=v.next,v.next=a),g.interleaved=a,Yn(r,d)}function jo(r,a,d){if(a=a.updateQueue,a!==null&&(a=a.shared,(d&4194240)!==0)){var g=a.lanes;g&=r.pendingLanes,d|=g,a.lanes=d,wc(r,d)}}function s1(r,a){var d=r.updateQueue,g=r.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var C={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};b===null?v=b=C:b=b.next=C,d=d.next}while(d!==null);b===null?v=b=a:b=b.next=a}else v=b=a;d={baseState:g.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:g.shared,effects:g.effects},r.updateQueue=d;return}r=d.lastBaseUpdate,r===null?d.firstBaseUpdate=a:r.next=a,d.lastBaseUpdate=a}function No(r,a,d,g){var v=r.updateQueue;ks=!1;var b=v.firstBaseUpdate,C=v.lastBaseUpdate,_=v.shared.pending;if(_!==null){v.shared.pending=null;var F=_,K=F.next;F.next=null,C===null?b=K:C.next=K,C=F;var te=r.alternate;te!==null&&(te=te.updateQueue,_=te.lastBaseUpdate,_!==C&&(_===null?te.firstBaseUpdate=K:_.next=K,te.lastBaseUpdate=F))}if(b!==null){var re=v.baseState;C=0,te=K=F=null,_=b;do{var ee=_.lane,ue=_.eventTime;if((g&ee)===ee){te!==null&&(te=te.next={eventTime:ue,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var fe=r,ge=_;switch(ee=a,ue=d,ge.tag){case 1:if(fe=ge.payload,typeof fe=="function"){re=fe.call(ue,re,ee);break e}re=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ge.payload,ee=typeof fe=="function"?fe.call(ue,re,ee):fe,ee==null)break e;re=P({},re,ee);break e;case 2:ks=!0}}_.callback!==null&&_.lane!==0&&(r.flags|=64,ee=v.effects,ee===null?v.effects=[_]:ee.push(_))}else ue={eventTime:ue,lane:ee,tag:_.tag,payload:_.payload,callback:_.callback,next:null},te===null?(K=te=ue,F=re):te=te.next=ue,C|=ee;if(_=_.next,_===null){if(_=v.shared.pending,_===null)break;ee=_,_=ee.next,ee.next=null,v.lastBaseUpdate=ee,v.shared.pending=null}}while(!0);if(te===null&&(F=re),v.baseState=F,v.firstBaseUpdate=K,v.lastBaseUpdate=te,a=v.shared.interleaved,a!==null){v=a;do C|=v.lane,v=v.next;while(v!==a)}else b===null&&(v.shared.lanes=0);sr|=C,r.lanes=C,r.memoizedState=re}}function r1(r,a,d){if(r=a.effects,a.effects=null,r!==null)for(a=0;a<r.length;a++){var g=r[a],v=g.callback;if(v!==null){if(g.callback=null,g=d,typeof v!="function")throw Error(s(191,v));v.call(g)}}}var qi={},Fn=ys(qi),Ui=ys(qi),Wi=ys(qi);function tr(r){if(r===qi)throw Error(s(174));return r}function lu(r,a){switch(He(Wi,a),He(Ui,r),He(Fn,qi),r=a.nodeType,r){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:ie(null,"");break;default:r=r===8?a.parentNode:a,a=r.namespaceURI||null,r=r.tagName,a=ie(a,r)}Qe(Fn),He(Fn,a)}function Vr(){Qe(Fn),Qe(Ui),Qe(Wi)}function i1(r){tr(Wi.current);var a=tr(Fn.current),d=ie(a,r.type);a!==d&&(He(Ui,r),He(Fn,d))}function cu(r){Ui.current===r&&(Qe(Fn),Qe(Ui))}var Xe=ys(0);function So(r){for(var a=r;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var uu=[];function du(){for(var r=0;r<uu.length;r++)uu[r]._workInProgressVersionPrimary=null;uu.length=0}var Co=A.ReactCurrentDispatcher,hu=A.ReactCurrentBatchConfig,nr=0,Je=null,ct=null,pt=null,Eo=!1,Hi=!1,Vi=0,P4=0;function kt(){throw Error(s(321))}function pu(r,a){if(a===null)return!1;for(var d=0;d<a.length&&d<r.length;d++)if(!jn(r[d],a[d]))return!1;return!0}function fu(r,a,d,g,v,b){if(nr=b,Je=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Co.current=r===null||r.memoizedState===null?L4:_4,r=d(g,v),Hi){b=0;do{if(Hi=!1,Vi=0,25<=b)throw Error(s(301));b+=1,pt=ct=null,a.updateQueue=null,Co.current=z4,r=d(g,v)}while(Hi)}if(Co.current=Ro,a=ct!==null&&ct.next!==null,nr=0,pt=ct=Je=null,Eo=!1,a)throw Error(s(300));return r}function mu(){var r=Vi!==0;return Vi=0,r}function $n(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Je.memoizedState=pt=r:pt=pt.next=r,pt}function fn(){if(ct===null){var r=Je.alternate;r=r!==null?r.memoizedState:null}else r=ct.next;var a=pt===null?Je.memoizedState:pt.next;if(a!==null)pt=a,ct=r;else{if(r===null)throw Error(s(310));ct=r,r={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},pt===null?Je.memoizedState=pt=r:pt=pt.next=r}return pt}function Ki(r,a){return typeof a=="function"?a(r):a}function gu(r){var a=fn(),d=a.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=r;var g=ct,v=g.baseQueue,b=d.pending;if(b!==null){if(v!==null){var C=v.next;v.next=b.next,b.next=C}g.baseQueue=v=b,d.pending=null}if(v!==null){b=v.next,g=g.baseState;var _=C=null,F=null,K=b;do{var te=K.lane;if((nr&te)===te)F!==null&&(F=F.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),g=K.hasEagerState?K.eagerState:r(g,K.action);else{var re={lane:te,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};F===null?(_=F=re,C=g):F=F.next=re,Je.lanes|=te,sr|=te}K=K.next}while(K!==null&&K!==b);F===null?C=g:F.next=_,jn(g,a.memoizedState)||(Ft=!0),a.memoizedState=g,a.baseState=C,a.baseQueue=F,d.lastRenderedState=g}if(r=d.interleaved,r!==null){v=r;do b=v.lane,Je.lanes|=b,sr|=b,v=v.next;while(v!==r)}else v===null&&(d.lanes=0);return[a.memoizedState,d.dispatch]}function yu(r){var a=fn(),d=a.queue;if(d===null)throw Error(s(311));d.lastRenderedReducer=r;var g=d.dispatch,v=d.pending,b=a.memoizedState;if(v!==null){d.pending=null;var C=v=v.next;do b=r(b,C.action),C=C.next;while(C!==v);jn(b,a.memoizedState)||(Ft=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),d.lastRenderedState=b}return[b,g]}function a1(){}function o1(r,a){var d=Je,g=fn(),v=a(),b=!jn(g.memoizedState,v);if(b&&(g.memoizedState=v,Ft=!0),g=g.queue,xu(u1.bind(null,d,g,r),[r]),g.getSnapshot!==a||b||pt!==null&&pt.memoizedState.tag&1){if(d.flags|=2048,Qi(9,c1.bind(null,d,g,v,a),void 0,null),ft===null)throw Error(s(349));(nr&30)!==0||l1(d,a,v)}return v}function l1(r,a,d){r.flags|=16384,r={getSnapshot:a,value:d},a=Je.updateQueue,a===null?(a={lastEffect:null,stores:null},Je.updateQueue=a,a.stores=[r]):(d=a.stores,d===null?a.stores=[r]:d.push(r))}function c1(r,a,d,g){a.value=d,a.getSnapshot=g,d1(a)&&h1(r)}function u1(r,a,d){return d(function(){d1(a)&&h1(r)})}function d1(r){var a=r.getSnapshot;r=r.value;try{var d=a();return!jn(r,d)}catch{return!0}}function h1(r){var a=Yn(r,1);a!==null&&Tn(a,r,1,-1)}function p1(r){var a=$n();return typeof r=="function"&&(r=r()),a.memoizedState=a.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ki,lastRenderedState:r},a.queue=r,r=r.dispatch=I4.bind(null,Je,r),[a.memoizedState,r]}function Qi(r,a,d,g){return r={tag:r,create:a,destroy:d,deps:g,next:null},a=Je.updateQueue,a===null?(a={lastEffect:null,stores:null},Je.updateQueue=a,a.lastEffect=r.next=r):(d=a.lastEffect,d===null?a.lastEffect=r.next=r:(g=d.next,d.next=r,r.next=g,a.lastEffect=r)),r}function f1(){return fn().memoizedState}function To(r,a,d,g){var v=$n();Je.flags|=r,v.memoizedState=Qi(1|a,d,void 0,g===void 0?null:g)}function Po(r,a,d,g){var v=fn();g=g===void 0?null:g;var b=void 0;if(ct!==null){var C=ct.memoizedState;if(b=C.destroy,g!==null&&pu(g,C.deps)){v.memoizedState=Qi(a,d,b,g);return}}Je.flags|=r,v.memoizedState=Qi(1|a,d,b,g)}function m1(r,a){return To(8390656,8,r,a)}function xu(r,a){return Po(2048,8,r,a)}function g1(r,a){return Po(4,2,r,a)}function y1(r,a){return Po(4,4,r,a)}function x1(r,a){if(typeof a=="function")return r=r(),a(r),function(){a(null)};if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function v1(r,a,d){return d=d!=null?d.concat([r]):null,Po(4,4,x1.bind(null,a,r),d)}function vu(){}function k1(r,a){var d=fn();a=a===void 0?null:a;var g=d.memoizedState;return g!==null&&a!==null&&pu(a,g[1])?g[0]:(d.memoizedState=[r,a],r)}function w1(r,a){var d=fn();a=a===void 0?null:a;var g=d.memoizedState;return g!==null&&a!==null&&pu(a,g[1])?g[0]:(r=r(),d.memoizedState=[r,a],r)}function b1(r,a,d){return(nr&21)===0?(r.baseState&&(r.baseState=!1,Ft=!0),r.memoizedState=d):(jn(d,a)||(d=Zp(),Je.lanes|=d,sr|=d,r.baseState=!0),a)}function R4(r,a){var d=Be;Be=d!==0&&4>d?d:4,r(!0);var g=hu.transition;hu.transition={};try{r(!1),a()}finally{Be=d,hu.transition=g}}function j1(){return fn().memoizedState}function A4(r,a,d){var g=Ss(r);if(d={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null},N1(r))S1(a,d);else if(d=t1(r,a,d,g),d!==null){var v=Pt();Tn(d,r,g,v),C1(d,a,g)}}function I4(r,a,d){var g=Ss(r),v={lane:g,action:d,hasEagerState:!1,eagerState:null,next:null};if(N1(r))S1(a,v);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var C=a.lastRenderedState,_=b(C,d);if(v.hasEagerState=!0,v.eagerState=_,jn(_,C)){var F=a.interleaved;F===null?(v.next=v,au(a)):(v.next=F.next,F.next=v),a.interleaved=v;return}}catch{}finally{}d=t1(r,a,v,g),d!==null&&(v=Pt(),Tn(d,r,g,v),C1(d,a,g))}}function N1(r){var a=r.alternate;return r===Je||a!==null&&a===Je}function S1(r,a){Hi=Eo=!0;var d=r.pending;d===null?a.next=a:(a.next=d.next,d.next=a),r.pending=a}function C1(r,a,d){if((d&4194240)!==0){var g=a.lanes;g&=r.pendingLanes,d|=g,a.lanes=d,wc(r,d)}}var Ro={readContext:pn,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useInsertionEffect:kt,useLayoutEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useMutableSource:kt,useSyncExternalStore:kt,useId:kt,unstable_isNewReconciler:!1},L4={readContext:pn,useCallback:function(r,a){return $n().memoizedState=[r,a===void 0?null:a],r},useContext:pn,useEffect:m1,useImperativeHandle:function(r,a,d){return d=d!=null?d.concat([r]):null,To(4194308,4,x1.bind(null,a,r),d)},useLayoutEffect:function(r,a){return To(4194308,4,r,a)},useInsertionEffect:function(r,a){return To(4,2,r,a)},useMemo:function(r,a){var d=$n();return a=a===void 0?null:a,r=r(),d.memoizedState=[r,a],r},useReducer:function(r,a,d){var g=$n();return a=d!==void 0?d(a):a,g.memoizedState=g.baseState=a,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:a},g.queue=r,r=r.dispatch=A4.bind(null,Je,r),[g.memoizedState,r]},useRef:function(r){var a=$n();return r={current:r},a.memoizedState=r},useState:p1,useDebugValue:vu,useDeferredValue:function(r){return $n().memoizedState=r},useTransition:function(){var r=p1(!1),a=r[0];return r=R4.bind(null,r[1]),$n().memoizedState=r,[a,r]},useMutableSource:function(){},useSyncExternalStore:function(r,a,d){var g=Je,v=$n();if(Ye){if(d===void 0)throw Error(s(407));d=d()}else{if(d=a(),ft===null)throw Error(s(349));(nr&30)!==0||l1(g,a,d)}v.memoizedState=d;var b={value:d,getSnapshot:a};return v.queue=b,m1(u1.bind(null,g,b,r),[r]),g.flags|=2048,Qi(9,c1.bind(null,g,b,d,a),void 0,null),d},useId:function(){var r=$n(),a=ft.identifierPrefix;if(Ye){var d=Gn,g=Qn;d=(g&~(1<<32-bn(g)-1)).toString(32)+d,a=":"+a+"R"+d,d=Vi++,0<d&&(a+="H"+d.toString(32)),a+=":"}else d=P4++,a=":"+a+"r"+d.toString(32)+":";return r.memoizedState=a},unstable_isNewReconciler:!1},_4={readContext:pn,useCallback:k1,useContext:pn,useEffect:xu,useImperativeHandle:v1,useInsertionEffect:g1,useLayoutEffect:y1,useMemo:w1,useReducer:gu,useRef:f1,useState:function(){return gu(Ki)},useDebugValue:vu,useDeferredValue:function(r){var a=fn();return b1(a,ct.memoizedState,r)},useTransition:function(){var r=gu(Ki)[0],a=fn().memoizedState;return[r,a]},useMutableSource:a1,useSyncExternalStore:o1,useId:j1,unstable_isNewReconciler:!1},z4={readContext:pn,useCallback:k1,useContext:pn,useEffect:xu,useImperativeHandle:v1,useInsertionEffect:g1,useLayoutEffect:y1,useMemo:w1,useReducer:yu,useRef:f1,useState:function(){return yu(Ki)},useDebugValue:vu,useDeferredValue:function(r){var a=fn();return ct===null?a.memoizedState=r:b1(a,ct.memoizedState,r)},useTransition:function(){var r=yu(Ki)[0],a=fn().memoizedState;return[r,a]},useMutableSource:a1,useSyncExternalStore:o1,useId:j1,unstable_isNewReconciler:!1};function Sn(r,a){if(r&&r.defaultProps){a=P({},a),r=r.defaultProps;for(var d in r)a[d]===void 0&&(a[d]=r[d]);return a}return a}function ku(r,a,d,g){a=r.memoizedState,d=d(g,a),d=d==null?a:P({},a,d),r.memoizedState=d,r.lanes===0&&(r.updateQueue.baseState=d)}var Ao={isMounted:function(r){return(r=r._reactInternals)?Gs(r)===r:!1},enqueueSetState:function(r,a,d){r=r._reactInternals;var g=Pt(),v=Ss(r),b=Zn(g,v);b.payload=a,d!=null&&(b.callback=d),a=ws(r,b,v),a!==null&&(Tn(a,r,v,g),jo(a,r,v))},enqueueReplaceState:function(r,a,d){r=r._reactInternals;var g=Pt(),v=Ss(r),b=Zn(g,v);b.tag=1,b.payload=a,d!=null&&(b.callback=d),a=ws(r,b,v),a!==null&&(Tn(a,r,v,g),jo(a,r,v))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var d=Pt(),g=Ss(r),v=Zn(d,g);v.tag=2,a!=null&&(v.callback=a),a=ws(r,v,g),a!==null&&(Tn(a,r,g,d),jo(a,r,g))}};function E1(r,a,d,g,v,b,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(g,b,C):a.prototype&&a.prototype.isPureReactComponent?!_i(d,g)||!_i(v,b):!0}function T1(r,a,d){var g=!1,v=xs,b=a.contextType;return typeof b=="object"&&b!==null?b=pn(b):(v=Mt(a)?Zs:vt.current,g=a.contextTypes,b=(g=g!=null)?Or(r,v):xs),a=new a(d,b),r.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ao,r.stateNode=a,a._reactInternals=r,g&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=v,r.__reactInternalMemoizedMaskedChildContext=b),a}function P1(r,a,d,g){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(d,g),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(d,g),a.state!==r&&Ao.enqueueReplaceState(a,a.state,null)}function wu(r,a,d,g){var v=r.stateNode;v.props=d,v.state=r.memoizedState,v.refs={},ou(r);var b=a.contextType;typeof b=="object"&&b!==null?v.context=pn(b):(b=Mt(a)?Zs:vt.current,v.context=Or(r,b)),v.state=r.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(ku(r,a,b,d),v.state=r.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(a=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),a!==v.state&&Ao.enqueueReplaceState(v,v.state,null),No(r,d,v,g),v.state=r.memoizedState),typeof v.componentDidMount=="function"&&(r.flags|=4194308)}function Kr(r,a){try{var d="",g=a;do d+=me(g),g=g.return;while(g);var v=d}catch(b){v=`
39
- Error generating stack: `+b.message+`
40
- `+b.stack}return{value:r,source:a,stack:v,digest:null}}function bu(r,a,d){return{value:r,source:null,stack:d??null,digest:a??null}}function ju(r,a){try{console.error(a.value)}catch(d){setTimeout(function(){throw d})}}var M4=typeof WeakMap=="function"?WeakMap:Map;function R1(r,a,d){d=Zn(-1,d),d.tag=3,d.payload={element:null};var g=a.value;return d.callback=function(){$o||($o=!0,$u=g),ju(r,a)},d}function A1(r,a,d){d=Zn(-1,d),d.tag=3;var g=r.type.getDerivedStateFromError;if(typeof g=="function"){var v=a.value;d.payload=function(){return g(v)},d.callback=function(){ju(r,a)}}var b=r.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(d.callback=function(){ju(r,a),typeof g!="function"&&(js===null?js=new Set([this]):js.add(this));var C=a.stack;this.componentDidCatch(a.value,{componentStack:C!==null?C:""})}),d}function I1(r,a,d){var g=r.pingCache;if(g===null){g=r.pingCache=new M4;var v=new Set;g.set(a,v)}else v=g.get(a),v===void 0&&(v=new Set,g.set(a,v));v.has(d)||(v.add(d),r=Y4.bind(null,r,a,d),a.then(r,r))}function L1(r){do{var a;if((a=r.tag===13)&&(a=r.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return r;r=r.return}while(r!==null);return null}function _1(r,a,d,g,v){return(r.mode&1)===0?(r===a?r.flags|=65536:(r.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(a=Zn(-1,1),a.tag=2,ws(d,a,1))),d.lanes|=1),r):(r.flags|=65536,r.lanes=v,r)}var F4=A.ReactCurrentOwner,Ft=!1;function Tt(r,a,d,g){a.child=r===null?e1(a,null,d,g):Ur(a,r.child,d,g)}function z1(r,a,d,g,v){d=d.render;var b=a.ref;return Hr(a,v),g=fu(r,a,d,g,b,v),d=mu(),r!==null&&!Ft?(a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~v,Xn(r,a,v)):(Ye&&d&&Zc(a),a.flags|=1,Tt(r,a,g,v),a.child)}function M1(r,a,d,g,v){if(r===null){var b=d.type;return typeof b=="function"&&!Hu(b)&&b.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(a.tag=15,a.type=b,F1(r,a,b,g,v)):(r=Wo(d.type,null,g,a,a.mode,v),r.ref=a.ref,r.return=a,a.child=r)}if(b=r.child,(r.lanes&v)===0){var C=b.memoizedProps;if(d=d.compare,d=d!==null?d:_i,d(C,g)&&r.ref===a.ref)return Xn(r,a,v)}return a.flags|=1,r=Es(b,g),r.ref=a.ref,r.return=a,a.child=r}function F1(r,a,d,g,v){if(r!==null){var b=r.memoizedProps;if(_i(b,g)&&r.ref===a.ref)if(Ft=!1,a.pendingProps=g=b,(r.lanes&v)!==0)(r.flags&131072)!==0&&(Ft=!0);else return a.lanes=r.lanes,Xn(r,a,v)}return Nu(r,a,d,g,v)}function $1(r,a,d){var g=a.pendingProps,v=g.children,b=r!==null?r.memoizedState:null;if(g.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},He(Gr,Zt),Zt|=d;else{if((d&1073741824)===0)return r=b!==null?b.baseLanes|d:d,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:r,cachePool:null,transitions:null},a.updateQueue=null,He(Gr,Zt),Zt|=r,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},g=b!==null?b.baseLanes:d,He(Gr,Zt),Zt|=g}else b!==null?(g=b.baseLanes|d,a.memoizedState=null):g=d,He(Gr,Zt),Zt|=g;return Tt(r,a,v,d),a.child}function O1(r,a){var d=a.ref;(r===null&&d!==null||r!==null&&r.ref!==d)&&(a.flags|=512,a.flags|=2097152)}function Nu(r,a,d,g,v){var b=Mt(d)?Zs:vt.current;return b=Or(a,b),Hr(a,v),d=fu(r,a,d,g,b,v),g=mu(),r!==null&&!Ft?(a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~v,Xn(r,a,v)):(Ye&&g&&Zc(a),a.flags|=1,Tt(r,a,d,v),a.child)}function D1(r,a,d,g,v){if(Mt(d)){var b=!0;mo(a)}else b=!1;if(Hr(a,v),a.stateNode===null)Lo(r,a),T1(a,d,g),wu(a,d,g,v),g=!0;else if(r===null){var C=a.stateNode,_=a.memoizedProps;C.props=_;var F=C.context,K=d.contextType;typeof K=="object"&&K!==null?K=pn(K):(K=Mt(d)?Zs:vt.current,K=Or(a,K));var te=d.getDerivedStateFromProps,re=typeof te=="function"||typeof C.getSnapshotBeforeUpdate=="function";re||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(_!==g||F!==K)&&P1(a,C,g,K),ks=!1;var ee=a.memoizedState;C.state=ee,No(a,g,C,v),F=a.memoizedState,_!==g||ee!==F||zt.current||ks?(typeof te=="function"&&(ku(a,d,te,g),F=a.memoizedState),(_=ks||E1(a,d,_,g,ee,F,K))?(re||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(a.flags|=4194308)):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=g,a.memoizedState=F),C.props=g,C.state=F,C.context=K,g=_):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),g=!1)}else{C=a.stateNode,n1(r,a),_=a.memoizedProps,K=a.type===a.elementType?_:Sn(a.type,_),C.props=K,re=a.pendingProps,ee=C.context,F=d.contextType,typeof F=="object"&&F!==null?F=pn(F):(F=Mt(d)?Zs:vt.current,F=Or(a,F));var ue=d.getDerivedStateFromProps;(te=typeof ue=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(_!==re||ee!==F)&&P1(a,C,g,F),ks=!1,ee=a.memoizedState,C.state=ee,No(a,g,C,v);var fe=a.memoizedState;_!==re||ee!==fe||zt.current||ks?(typeof ue=="function"&&(ku(a,d,ue,g),fe=a.memoizedState),(K=ks||E1(a,d,K,g,ee,fe,F)||!1)?(te||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,fe,F),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,fe,F)),typeof C.componentDidUpdate=="function"&&(a.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof C.componentDidUpdate!="function"||_===r.memoizedProps&&ee===r.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&ee===r.memoizedState||(a.flags|=1024),a.memoizedProps=g,a.memoizedState=fe),C.props=g,C.state=fe,C.context=F,g=K):(typeof C.componentDidUpdate!="function"||_===r.memoizedProps&&ee===r.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&ee===r.memoizedState||(a.flags|=1024),g=!1)}return Su(r,a,d,g,b,v)}function Su(r,a,d,g,v,b){O1(r,a);var C=(a.flags&128)!==0;if(!g&&!C)return v&&Hf(a,d,!1),Xn(r,a,b);g=a.stateNode,F4.current=a;var _=C&&typeof d.getDerivedStateFromError!="function"?null:g.render();return a.flags|=1,r!==null&&C?(a.child=Ur(a,r.child,null,b),a.child=Ur(a,null,_,b)):Tt(r,a,_,b),a.memoizedState=g.state,v&&Hf(a,d,!0),a.child}function B1(r){var a=r.stateNode;a.pendingContext?Uf(r,a.pendingContext,a.pendingContext!==a.context):a.context&&Uf(r,a.context,!1),lu(r,a.containerInfo)}function q1(r,a,d,g,v){return qr(),tu(v),a.flags|=256,Tt(r,a,d,g),a.child}var Cu={dehydrated:null,treeContext:null,retryLane:0};function Eu(r){return{baseLanes:r,cachePool:null,transitions:null}}function U1(r,a,d){var g=a.pendingProps,v=Xe.current,b=!1,C=(a.flags&128)!==0,_;if((_=C)||(_=r!==null&&r.memoizedState===null?!1:(v&2)!==0),_?(b=!0,a.flags&=-129):(r===null||r.memoizedState!==null)&&(v|=1),He(Xe,v&1),r===null)return eu(a),r=a.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((a.mode&1)===0?a.lanes=1:r.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(C=g.children,r=g.fallback,b?(g=a.mode,b=a.child,C={mode:"hidden",children:C},(g&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=C):b=Ho(C,g,0,null),r=or(r,g,d,null),b.return=a,r.return=a,b.sibling=r,a.child=b,a.child.memoizedState=Eu(d),a.memoizedState=Cu,r):Tu(a,C));if(v=r.memoizedState,v!==null&&(_=v.dehydrated,_!==null))return $4(r,a,C,g,_,v,d);if(b){b=g.fallback,C=a.mode,v=r.child,_=v.sibling;var F={mode:"hidden",children:g.children};return(C&1)===0&&a.child!==v?(g=a.child,g.childLanes=0,g.pendingProps=F,a.deletions=null):(g=Es(v,F),g.subtreeFlags=v.subtreeFlags&14680064),_!==null?b=Es(_,b):(b=or(b,C,d,null),b.flags|=2),b.return=a,g.return=a,g.sibling=b,a.child=g,g=b,b=a.child,C=r.child.memoizedState,C=C===null?Eu(d):{baseLanes:C.baseLanes|d,cachePool:null,transitions:C.transitions},b.memoizedState=C,b.childLanes=r.childLanes&~d,a.memoizedState=Cu,g}return b=r.child,r=b.sibling,g=Es(b,{mode:"visible",children:g.children}),(a.mode&1)===0&&(g.lanes=d),g.return=a,g.sibling=null,r!==null&&(d=a.deletions,d===null?(a.deletions=[r],a.flags|=16):d.push(r)),a.child=g,a.memoizedState=null,g}function Tu(r,a){return a=Ho({mode:"visible",children:a},r.mode,0,null),a.return=r,r.child=a}function Io(r,a,d,g){return g!==null&&tu(g),Ur(a,r.child,null,d),r=Tu(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function $4(r,a,d,g,v,b,C){if(d)return a.flags&256?(a.flags&=-257,g=bu(Error(s(422))),Io(r,a,C,g)):a.memoizedState!==null?(a.child=r.child,a.flags|=128,null):(b=g.fallback,v=a.mode,g=Ho({mode:"visible",children:g.children},v,0,null),b=or(b,v,C,null),b.flags|=2,g.return=a,b.return=a,g.sibling=b,a.child=g,(a.mode&1)!==0&&Ur(a,r.child,null,C),a.child.memoizedState=Eu(C),a.memoizedState=Cu,b);if((a.mode&1)===0)return Io(r,a,C,null);if(v.data==="$!"){if(g=v.nextSibling&&v.nextSibling.dataset,g)var _=g.dgst;return g=_,b=Error(s(419)),g=bu(b,g,void 0),Io(r,a,C,g)}if(_=(C&r.childLanes)!==0,Ft||_){if(g=ft,g!==null){switch(C&-C){case 4:v=2;break;case 16:v=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:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(g.suspendedLanes|C))!==0?0:v,v!==0&&v!==b.retryLane&&(b.retryLane=v,Yn(r,v),Tn(g,r,v,-1))}return Wu(),g=bu(Error(s(421))),Io(r,a,C,g)}return v.data==="$?"?(a.flags|=128,a.child=r.child,a=Z4.bind(null,r),v._reactRetry=a,null):(r=b.treeContext,Yt=gs(v.nextSibling),Gt=a,Ye=!0,Nn=null,r!==null&&(dn[hn++]=Qn,dn[hn++]=Gn,dn[hn++]=Xs,Qn=r.id,Gn=r.overflow,Xs=a),a=Tu(a,g.children),a.flags|=4096,a)}function W1(r,a,d){r.lanes|=a;var g=r.alternate;g!==null&&(g.lanes|=a),iu(r.return,a,d)}function Pu(r,a,d,g,v){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:v}:(b.isBackwards=a,b.rendering=null,b.renderingStartTime=0,b.last=g,b.tail=d,b.tailMode=v)}function H1(r,a,d){var g=a.pendingProps,v=g.revealOrder,b=g.tail;if(Tt(r,a,g.children,d),g=Xe.current,(g&2)!==0)g=g&1|2,a.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&W1(r,d,a);else if(r.tag===19)W1(r,d,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}g&=1}if(He(Xe,g),(a.mode&1)===0)a.memoizedState=null;else switch(v){case"forwards":for(d=a.child,v=null;d!==null;)r=d.alternate,r!==null&&So(r)===null&&(v=d),d=d.sibling;d=v,d===null?(v=a.child,a.child=null):(v=d.sibling,d.sibling=null),Pu(a,!1,v,d,b);break;case"backwards":for(d=null,v=a.child,a.child=null;v!==null;){if(r=v.alternate,r!==null&&So(r)===null){a.child=v;break}r=v.sibling,v.sibling=d,d=v,v=r}Pu(a,!0,d,null,b);break;case"together":Pu(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Lo(r,a){(a.mode&1)===0&&r!==null&&(r.alternate=null,a.alternate=null,a.flags|=2)}function Xn(r,a,d){if(r!==null&&(a.dependencies=r.dependencies),sr|=a.lanes,(d&a.childLanes)===0)return null;if(r!==null&&a.child!==r.child)throw Error(s(153));if(a.child!==null){for(r=a.child,d=Es(r,r.pendingProps),a.child=d,d.return=a;r.sibling!==null;)r=r.sibling,d=d.sibling=Es(r,r.pendingProps),d.return=a;d.sibling=null}return a.child}function O4(r,a,d){switch(a.tag){case 3:B1(a),qr();break;case 5:i1(a);break;case 1:Mt(a.type)&&mo(a);break;case 4:lu(a,a.stateNode.containerInfo);break;case 10:var g=a.type._context,v=a.memoizedProps.value;He(wo,g._currentValue),g._currentValue=v;break;case 13:if(g=a.memoizedState,g!==null)return g.dehydrated!==null?(He(Xe,Xe.current&1),a.flags|=128,null):(d&a.child.childLanes)!==0?U1(r,a,d):(He(Xe,Xe.current&1),r=Xn(r,a,d),r!==null?r.sibling:null);He(Xe,Xe.current&1);break;case 19:if(g=(d&a.childLanes)!==0,(r.flags&128)!==0){if(g)return H1(r,a,d);a.flags|=128}if(v=a.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),He(Xe,Xe.current),g)break;return null;case 22:case 23:return a.lanes=0,$1(r,a,d)}return Xn(r,a,d)}var V1,Ru,K1,Q1;V1=function(r,a){for(var d=a.child;d!==null;){if(d.tag===5||d.tag===6)r.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break;for(;d.sibling===null;){if(d.return===null||d.return===a)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Ru=function(){},K1=function(r,a,d,g){var v=r.memoizedProps;if(v!==g){r=a.stateNode,tr(Fn.current);var b=null;switch(d){case"input":v=Ln(r,v),g=Ln(r,g),b=[];break;case"select":v=P({},v,{value:void 0}),g=P({},g,{value:void 0}),b=[];break;case"textarea":v=wn(r,v),g=wn(r,g),b=[];break;default:typeof v.onClick!="function"&&typeof g.onClick=="function"&&(r.onclick=ho)}gt(d,g);var C;d=null;for(K in v)if(!g.hasOwnProperty(K)&&v.hasOwnProperty(K)&&v[K]!=null)if(K==="style"){var _=v[K];for(C in _)_.hasOwnProperty(C)&&(d||(d={}),d[C]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(o.hasOwnProperty(K)?b||(b=[]):(b=b||[]).push(K,null));for(K in g){var F=g[K];if(_=v?.[K],g.hasOwnProperty(K)&&F!==_&&(F!=null||_!=null))if(K==="style")if(_){for(C in _)!_.hasOwnProperty(C)||F&&F.hasOwnProperty(C)||(d||(d={}),d[C]="");for(C in F)F.hasOwnProperty(C)&&_[C]!==F[C]&&(d||(d={}),d[C]=F[C])}else d||(b||(b=[]),b.push(K,d)),d=F;else K==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,_=_?_.__html:void 0,F!=null&&_!==F&&(b=b||[]).push(K,F)):K==="children"?typeof F!="string"&&typeof F!="number"||(b=b||[]).push(K,""+F):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(o.hasOwnProperty(K)?(F!=null&&K==="onScroll"&&Ke("scroll",r),b||_===F||(b=[])):(b=b||[]).push(K,F))}d&&(b=b||[]).push("style",d);var K=b;(a.updateQueue=K)&&(a.flags|=4)}},Q1=function(r,a,d,g){d!==g&&(a.flags|=4)};function Gi(r,a){if(!Ye)switch(r.tailMode){case"hidden":a=r.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.sibling;d===null?r.tail=null:d.sibling=null;break;case"collapsed":d=r.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:g.sibling=null}}function wt(r){var a=r.alternate!==null&&r.alternate.child===r.child,d=0,g=0;if(a)for(var v=r.child;v!==null;)d|=v.lanes|v.childLanes,g|=v.subtreeFlags&14680064,g|=v.flags&14680064,v.return=r,v=v.sibling;else for(v=r.child;v!==null;)d|=v.lanes|v.childLanes,g|=v.subtreeFlags,g|=v.flags,v.return=r,v=v.sibling;return r.subtreeFlags|=g,r.childLanes=d,a}function D4(r,a,d){var g=a.pendingProps;switch(Xc(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(a),null;case 1:return Mt(a.type)&&fo(),wt(a),null;case 3:return g=a.stateNode,Vr(),Qe(zt),Qe(vt),du(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(r===null||r.child===null)&&(vo(a)?a.flags|=4:r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Nn!==null&&(Bu(Nn),Nn=null))),Ru(r,a),wt(a),null;case 5:cu(a);var v=tr(Wi.current);if(d=a.type,r!==null&&a.stateNode!=null)K1(r,a,d,g,v),r.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!g){if(a.stateNode===null)throw Error(s(166));return wt(a),null}if(r=tr(Fn.current),vo(a)){g=a.stateNode,d=a.type;var b=a.memoizedProps;switch(g[Mn]=a,g[Oi]=b,r=(a.mode&1)!==0,d){case"dialog":Ke("cancel",g),Ke("close",g);break;case"iframe":case"object":case"embed":Ke("load",g);break;case"video":case"audio":for(v=0;v<Mi.length;v++)Ke(Mi[v],g);break;case"source":Ke("error",g);break;case"img":case"image":case"link":Ke("error",g),Ke("load",g);break;case"details":Ke("toggle",g);break;case"input":Lt(g,b),Ke("invalid",g);break;case"select":g._wrapperState={wasMultiple:!!b.multiple},Ke("invalid",g);break;case"textarea":ls(g,b),Ke("invalid",g)}gt(d,b),v=null;for(var C in b)if(b.hasOwnProperty(C)){var _=b[C];C==="children"?typeof _=="string"?g.textContent!==_&&(b.suppressHydrationWarning!==!0&&uo(g.textContent,_,r),v=["children",_]):typeof _=="number"&&g.textContent!==""+_&&(b.suppressHydrationWarning!==!0&&uo(g.textContent,_,r),v=["children",""+_]):o.hasOwnProperty(C)&&_!=null&&C==="onScroll"&&Ke("scroll",g)}switch(d){case"input":st(g),Vt(g,b,!0);break;case"textarea":st(g),De(g);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(g.onclick=ho)}g=v,a.updateQueue=g,g!==null&&(a.flags|=4)}else{C=v.nodeType===9?v:v.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=G(d)),r==="http://www.w3.org/1999/xhtml"?d==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof g.is=="string"?r=C.createElement(d,{is:g.is}):(r=C.createElement(d),d==="select"&&(C=r,g.multiple?C.multiple=!0:g.size&&(C.size=g.size))):r=C.createElementNS(r,d),r[Mn]=a,r[Oi]=g,V1(r,a,!1,!1),a.stateNode=r;e:{switch(C=_n(d,g),d){case"dialog":Ke("cancel",r),Ke("close",r),v=g;break;case"iframe":case"object":case"embed":Ke("load",r),v=g;break;case"video":case"audio":for(v=0;v<Mi.length;v++)Ke(Mi[v],r);v=g;break;case"source":Ke("error",r),v=g;break;case"img":case"image":case"link":Ke("error",r),Ke("load",r),v=g;break;case"details":Ke("toggle",r),v=g;break;case"input":Lt(r,g),v=Ln(r,g),Ke("invalid",r);break;case"option":v=g;break;case"select":r._wrapperState={wasMultiple:!!g.multiple},v=P({},g,{value:void 0}),Ke("invalid",r);break;case"textarea":ls(r,g),v=wn(r,g),Ke("invalid",r);break;default:v=g}gt(d,v),_=v;for(b in _)if(_.hasOwnProperty(b)){var F=_[b];b==="style"?cs(r,F):b==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&ve(r,F)):b==="children"?typeof F=="string"?(d!=="textarea"||F!=="")&&Re(r,F):typeof F=="number"&&Re(r,""+F):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?F!=null&&b==="onScroll"&&Ke("scroll",r):F!=null&&T(r,b,F,C))}switch(d){case"input":st(r),Vt(r,g,!1);break;case"textarea":st(r),De(r);break;case"option":g.value!=null&&r.setAttribute("value",""+Ee(g.value));break;case"select":r.multiple=!!g.multiple,b=g.value,b!=null?cn(r,!!g.multiple,b,!1):g.defaultValue!=null&&cn(r,!!g.multiple,g.defaultValue,!0);break;default:typeof v.onClick=="function"&&(r.onclick=ho)}switch(d){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}}g&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return wt(a),null;case 6:if(r&&a.stateNode!=null)Q1(r,a,r.memoizedProps,g);else{if(typeof g!="string"&&a.stateNode===null)throw Error(s(166));if(d=tr(Wi.current),tr(Fn.current),vo(a)){if(g=a.stateNode,d=a.memoizedProps,g[Mn]=a,(b=g.nodeValue!==d)&&(r=Gt,r!==null))switch(r.tag){case 3:uo(g.nodeValue,d,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&uo(g.nodeValue,d,(r.mode&1)!==0)}b&&(a.flags|=4)}else g=(d.nodeType===9?d:d.ownerDocument).createTextNode(g),g[Mn]=a,a.stateNode=g}return wt(a),null;case 13:if(Qe(Xe),g=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Ye&&Yt!==null&&(a.mode&1)!==0&&(a.flags&128)===0)Zf(),qr(),a.flags|=98560,b=!1;else if(b=vo(a),g!==null&&g.dehydrated!==null){if(r===null){if(!b)throw Error(s(318));if(b=a.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(s(317));b[Mn]=a}else qr(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;wt(a),b=!1}else Nn!==null&&(Bu(Nn),Nn=null),b=!0;if(!b)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=d,a):(g=g!==null,g!==(r!==null&&r.memoizedState!==null)&&g&&(a.child.flags|=8192,(a.mode&1)!==0&&(r===null||(Xe.current&1)!==0?ut===0&&(ut=3):Wu())),a.updateQueue!==null&&(a.flags|=4),wt(a),null);case 4:return Vr(),Ru(r,a),r===null&&Fi(a.stateNode.containerInfo),wt(a),null;case 10:return ru(a.type._context),wt(a),null;case 17:return Mt(a.type)&&fo(),wt(a),null;case 19:if(Qe(Xe),b=a.memoizedState,b===null)return wt(a),null;if(g=(a.flags&128)!==0,C=b.rendering,C===null)if(g)Gi(b,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(C=So(r),C!==null){for(a.flags|=128,Gi(b,!1),g=C.updateQueue,g!==null&&(a.updateQueue=g,a.flags|=4),a.subtreeFlags=0,g=d,d=a.child;d!==null;)b=d,r=g,b.flags&=14680066,C=b.alternate,C===null?(b.childLanes=0,b.lanes=r,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=C.childLanes,b.lanes=C.lanes,b.child=C.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=C.memoizedProps,b.memoizedState=C.memoizedState,b.updateQueue=C.updateQueue,b.type=C.type,r=C.dependencies,b.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),d=d.sibling;return He(Xe,Xe.current&1|2),a.child}r=r.sibling}b.tail!==null&&tt()>Yr&&(a.flags|=128,g=!0,Gi(b,!1),a.lanes=4194304)}else{if(!g)if(r=So(C),r!==null){if(a.flags|=128,g=!0,d=r.updateQueue,d!==null&&(a.updateQueue=d,a.flags|=4),Gi(b,!0),b.tail===null&&b.tailMode==="hidden"&&!C.alternate&&!Ye)return wt(a),null}else 2*tt()-b.renderingStartTime>Yr&&d!==1073741824&&(a.flags|=128,g=!0,Gi(b,!1),a.lanes=4194304);b.isBackwards?(C.sibling=a.child,a.child=C):(d=b.last,d!==null?d.sibling=C:a.child=C,b.last=C)}return b.tail!==null?(a=b.tail,b.rendering=a,b.tail=a.sibling,b.renderingStartTime=tt(),a.sibling=null,d=Xe.current,He(Xe,g?d&1|2:d&1),a):(wt(a),null);case 22:case 23:return Uu(),g=a.memoizedState!==null,r!==null&&r.memoizedState!==null!==g&&(a.flags|=8192),g&&(a.mode&1)!==0?(Zt&1073741824)!==0&&(wt(a),a.subtreeFlags&6&&(a.flags|=8192)):wt(a),null;case 24:return null;case 25:return null}throw Error(s(156,a.tag))}function B4(r,a){switch(Xc(a),a.tag){case 1:return Mt(a.type)&&fo(),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Vr(),Qe(zt),Qe(vt),du(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 5:return cu(a),null;case 13:if(Qe(Xe),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(s(340));qr()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return Qe(Xe),null;case 4:return Vr(),null;case 10:return ru(a.type._context),null;case 22:case 23:return Uu(),null;case 24:return null;default:return null}}var _o=!1,bt=!1,q4=typeof WeakSet=="function"?WeakSet:Set,de=null;function Qr(r,a){var d=r.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(g){et(r,a,g)}else d.current=null}function Au(r,a,d){try{d()}catch(g){et(r,a,g)}}var G1=!1;function U4(r,a){if(Uc=Ja,r=Ef(),zc(r)){if("selectionStart"in r)var d={start:r.selectionStart,end:r.selectionEnd};else e:{d=(d=r.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var v=g.anchorOffset,b=g.focusNode;g=g.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var C=0,_=-1,F=-1,K=0,te=0,re=r,ee=null;t:for(;;){for(var ue;re!==d||v!==0&&re.nodeType!==3||(_=C+v),re!==b||g!==0&&re.nodeType!==3||(F=C+g),re.nodeType===3&&(C+=re.nodeValue.length),(ue=re.firstChild)!==null;)ee=re,re=ue;for(;;){if(re===r)break t;if(ee===d&&++K===v&&(_=C),ee===b&&++te===g&&(F=C),(ue=re.nextSibling)!==null)break;re=ee,ee=re.parentNode}re=ue}d=_===-1||F===-1?null:{start:_,end:F}}else d=null}d=d||{start:0,end:0}}else d=null;for(Wc={focusedElem:r,selectionRange:d},Ja=!1,de=a;de!==null;)if(a=de,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,de=r;else for(;de!==null;){a=de;try{var fe=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(fe!==null){var ge=fe.memoizedProps,nt=fe.memoizedState,W=a.stateNode,D=W.getSnapshotBeforeUpdate(a.elementType===a.type?ge:Sn(a.type,ge),nt);W.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var H=a.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(oe){et(a,a.return,oe)}if(r=a.sibling,r!==null){r.return=a.return,de=r;break}de=a.return}return fe=G1,G1=!1,fe}function Yi(r,a,d){var g=a.updateQueue;if(g=g!==null?g.lastEffect:null,g!==null){var v=g=g.next;do{if((v.tag&r)===r){var b=v.destroy;v.destroy=void 0,b!==void 0&&Au(a,d,b)}v=v.next}while(v!==g)}}function zo(r,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&r)===r){var g=d.create;d.destroy=g()}d=d.next}while(d!==a)}}function Iu(r){var a=r.ref;if(a!==null){var d=r.stateNode;switch(r.tag){case 5:r=d;break;default:r=d}typeof a=="function"?a(r):a.current=r}}function Y1(r){var a=r.alternate;a!==null&&(r.alternate=null,Y1(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&(delete a[Mn],delete a[Oi],delete a[Qc],delete a[S4],delete a[C4])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Z1(r){return r.tag===5||r.tag===3||r.tag===4}function X1(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Z1(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Lu(r,a,d){var g=r.tag;if(g===5||g===6)r=r.stateNode,a?d.nodeType===8?d.parentNode.insertBefore(r,a):d.insertBefore(r,a):(d.nodeType===8?(a=d.parentNode,a.insertBefore(r,d)):(a=d,a.appendChild(r)),d=d._reactRootContainer,d!=null||a.onclick!==null||(a.onclick=ho));else if(g!==4&&(r=r.child,r!==null))for(Lu(r,a,d),r=r.sibling;r!==null;)Lu(r,a,d),r=r.sibling}function _u(r,a,d){var g=r.tag;if(g===5||g===6)r=r.stateNode,a?d.insertBefore(r,a):d.appendChild(r);else if(g!==4&&(r=r.child,r!==null))for(_u(r,a,d),r=r.sibling;r!==null;)_u(r,a,d),r=r.sibling}var yt=null,Cn=!1;function bs(r,a,d){for(d=d.child;d!==null;)J1(r,a,d),d=d.sibling}function J1(r,a,d){if(zn&&typeof zn.onCommitFiberUnmount=="function")try{zn.onCommitFiberUnmount(Ka,d)}catch{}switch(d.tag){case 5:bt||Qr(d,a);case 6:var g=yt,v=Cn;yt=null,bs(r,a,d),yt=g,Cn=v,yt!==null&&(Cn?(r=yt,d=d.stateNode,r.nodeType===8?r.parentNode.removeChild(d):r.removeChild(d)):yt.removeChild(d.stateNode));break;case 18:yt!==null&&(Cn?(r=yt,d=d.stateNode,r.nodeType===8?Kc(r.parentNode,d):r.nodeType===1&&Kc(r,d),Ti(r)):Kc(yt,d.stateNode));break;case 4:g=yt,v=Cn,yt=d.stateNode.containerInfo,Cn=!0,bs(r,a,d),yt=g,Cn=v;break;case 0:case 11:case 14:case 15:if(!bt&&(g=d.updateQueue,g!==null&&(g=g.lastEffect,g!==null))){v=g=g.next;do{var b=v,C=b.destroy;b=b.tag,C!==void 0&&((b&2)!==0||(b&4)!==0)&&Au(d,a,C),v=v.next}while(v!==g)}bs(r,a,d);break;case 1:if(!bt&&(Qr(d,a),g=d.stateNode,typeof g.componentWillUnmount=="function"))try{g.props=d.memoizedProps,g.state=d.memoizedState,g.componentWillUnmount()}catch(_){et(d,a,_)}bs(r,a,d);break;case 21:bs(r,a,d);break;case 22:d.mode&1?(bt=(g=bt)||d.memoizedState!==null,bs(r,a,d),bt=g):bs(r,a,d);break;default:bs(r,a,d)}}function e0(r){var a=r.updateQueue;if(a!==null){r.updateQueue=null;var d=r.stateNode;d===null&&(d=r.stateNode=new q4),a.forEach(function(g){var v=X4.bind(null,r,g);d.has(g)||(d.add(g),g.then(v,v))})}}function En(r,a){var d=a.deletions;if(d!==null)for(var g=0;g<d.length;g++){var v=d[g];try{var b=r,C=a,_=C;e:for(;_!==null;){switch(_.tag){case 5:yt=_.stateNode,Cn=!1;break e;case 3:yt=_.stateNode.containerInfo,Cn=!0;break e;case 4:yt=_.stateNode.containerInfo,Cn=!0;break e}_=_.return}if(yt===null)throw Error(s(160));J1(b,C,v),yt=null,Cn=!1;var F=v.alternate;F!==null&&(F.return=null),v.return=null}catch(K){et(v,a,K)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)t0(a,r),a=a.sibling}function t0(r,a){var d=r.alternate,g=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(En(a,r),On(r),g&4){try{Yi(3,r,r.return),zo(3,r)}catch(ge){et(r,r.return,ge)}try{Yi(5,r,r.return)}catch(ge){et(r,r.return,ge)}}break;case 1:En(a,r),On(r),g&512&&d!==null&&Qr(d,d.return);break;case 5:if(En(a,r),On(r),g&512&&d!==null&&Qr(d,d.return),r.flags&32){var v=r.stateNode;try{Re(v,"")}catch(ge){et(r,r.return,ge)}}if(g&4&&(v=r.stateNode,v!=null)){var b=r.memoizedProps,C=d!==null?d.memoizedProps:b,_=r.type,F=r.updateQueue;if(r.updateQueue=null,F!==null)try{_==="input"&&b.type==="radio"&&b.name!=null&&kn(v,b),_n(_,C);var K=_n(_,b);for(C=0;C<F.length;C+=2){var te=F[C],re=F[C+1];te==="style"?cs(v,re):te==="dangerouslySetInnerHTML"?ve(v,re):te==="children"?Re(v,re):T(v,te,re,K)}switch(_){case"input":ln(v,b);break;case"textarea":Hn(v,b);break;case"select":var ee=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!b.multiple;var ue=b.value;ue!=null?cn(v,!!b.multiple,ue,!1):ee!==!!b.multiple&&(b.defaultValue!=null?cn(v,!!b.multiple,b.defaultValue,!0):cn(v,!!b.multiple,b.multiple?[]:"",!1))}v[Oi]=b}catch(ge){et(r,r.return,ge)}}break;case 6:if(En(a,r),On(r),g&4){if(r.stateNode===null)throw Error(s(162));v=r.stateNode,b=r.memoizedProps;try{v.nodeValue=b}catch(ge){et(r,r.return,ge)}}break;case 3:if(En(a,r),On(r),g&4&&d!==null&&d.memoizedState.isDehydrated)try{Ti(a.containerInfo)}catch(ge){et(r,r.return,ge)}break;case 4:En(a,r),On(r);break;case 13:En(a,r),On(r),v=r.child,v.flags&8192&&(b=v.memoizedState!==null,v.stateNode.isHidden=b,!b||v.alternate!==null&&v.alternate.memoizedState!==null||(Fu=tt())),g&4&&e0(r);break;case 22:if(te=d!==null&&d.memoizedState!==null,r.mode&1?(bt=(K=bt)||te,En(a,r),bt=K):En(a,r),On(r),g&8192){if(K=r.memoizedState!==null,(r.stateNode.isHidden=K)&&!te&&(r.mode&1)!==0)for(de=r,te=r.child;te!==null;){for(re=de=te;de!==null;){switch(ee=de,ue=ee.child,ee.tag){case 0:case 11:case 14:case 15:Yi(4,ee,ee.return);break;case 1:Qr(ee,ee.return);var fe=ee.stateNode;if(typeof fe.componentWillUnmount=="function"){g=ee,d=ee.return;try{a=g,fe.props=a.memoizedProps,fe.state=a.memoizedState,fe.componentWillUnmount()}catch(ge){et(g,d,ge)}}break;case 5:Qr(ee,ee.return);break;case 22:if(ee.memoizedState!==null){r0(re);continue}}ue!==null?(ue.return=ee,de=ue):r0(re)}te=te.sibling}e:for(te=null,re=r;;){if(re.tag===5){if(te===null){te=re;try{v=re.stateNode,K?(b=v.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(_=re.stateNode,F=re.memoizedProps.style,C=F!=null&&F.hasOwnProperty("display")?F.display:null,_.style.display=un("display",C))}catch(ge){et(r,r.return,ge)}}}else if(re.tag===6){if(te===null)try{re.stateNode.nodeValue=K?"":re.memoizedProps}catch(ge){et(r,r.return,ge)}}else if((re.tag!==22&&re.tag!==23||re.memoizedState===null||re===r)&&re.child!==null){re.child.return=re,re=re.child;continue}if(re===r)break e;for(;re.sibling===null;){if(re.return===null||re.return===r)break e;te===re&&(te=null),re=re.return}te===re&&(te=null),re.sibling.return=re.return,re=re.sibling}}break;case 19:En(a,r),On(r),g&4&&e0(r);break;case 21:break;default:En(a,r),On(r)}}function On(r){var a=r.flags;if(a&2){try{e:{for(var d=r.return;d!==null;){if(Z1(d)){var g=d;break e}d=d.return}throw Error(s(160))}switch(g.tag){case 5:var v=g.stateNode;g.flags&32&&(Re(v,""),g.flags&=-33);var b=X1(r);_u(r,b,v);break;case 3:case 4:var C=g.stateNode.containerInfo,_=X1(r);Lu(r,_,C);break;default:throw Error(s(161))}}catch(F){et(r,r.return,F)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function W4(r,a,d){de=r,n0(r)}function n0(r,a,d){for(var g=(r.mode&1)!==0;de!==null;){var v=de,b=v.child;if(v.tag===22&&g){var C=v.memoizedState!==null||_o;if(!C){var _=v.alternate,F=_!==null&&_.memoizedState!==null||bt;_=_o;var K=bt;if(_o=C,(bt=F)&&!K)for(de=v;de!==null;)C=de,F=C.child,C.tag===22&&C.memoizedState!==null?i0(v):F!==null?(F.return=C,de=F):i0(v);for(;b!==null;)de=b,n0(b),b=b.sibling;de=v,_o=_,bt=K}s0(r)}else(v.subtreeFlags&8772)!==0&&b!==null?(b.return=v,de=b):s0(r)}}function s0(r){for(;de!==null;){var a=de;if((a.flags&8772)!==0){var d=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:bt||zo(5,a);break;case 1:var g=a.stateNode;if(a.flags&4&&!bt)if(d===null)g.componentDidMount();else{var v=a.elementType===a.type?d.memoizedProps:Sn(a.type,d.memoizedProps);g.componentDidUpdate(v,d.memoizedState,g.__reactInternalSnapshotBeforeUpdate)}var b=a.updateQueue;b!==null&&r1(a,b,g);break;case 3:var C=a.updateQueue;if(C!==null){if(d=null,a.child!==null)switch(a.child.tag){case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}r1(a,C,d)}break;case 5:var _=a.stateNode;if(d===null&&a.flags&4){d=_;var F=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&d.focus();break;case"img":F.src&&(d.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var K=a.alternate;if(K!==null){var te=K.memoizedState;if(te!==null){var re=te.dehydrated;re!==null&&Ti(re)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}bt||a.flags&512&&Iu(a)}catch(ee){et(a,a.return,ee)}}if(a===r){de=null;break}if(d=a.sibling,d!==null){d.return=a.return,de=d;break}de=a.return}}function r0(r){for(;de!==null;){var a=de;if(a===r){de=null;break}var d=a.sibling;if(d!==null){d.return=a.return,de=d;break}de=a.return}}function i0(r){for(;de!==null;){var a=de;try{switch(a.tag){case 0:case 11:case 15:var d=a.return;try{zo(4,a)}catch(F){et(a,d,F)}break;case 1:var g=a.stateNode;if(typeof g.componentDidMount=="function"){var v=a.return;try{g.componentDidMount()}catch(F){et(a,v,F)}}var b=a.return;try{Iu(a)}catch(F){et(a,b,F)}break;case 5:var C=a.return;try{Iu(a)}catch(F){et(a,C,F)}}}catch(F){et(a,a.return,F)}if(a===r){de=null;break}var _=a.sibling;if(_!==null){_.return=a.return,de=_;break}de=a.return}}var H4=Math.ceil,Mo=A.ReactCurrentDispatcher,zu=A.ReactCurrentOwner,mn=A.ReactCurrentBatchConfig,Fe=0,ft=null,rt=null,xt=0,Zt=0,Gr=ys(0),ut=0,Zi=null,sr=0,Fo=0,Mu=0,Xi=null,$t=null,Fu=0,Yr=1/0,Jn=null,$o=!1,$u=null,js=null,Oo=!1,Ns=null,Do=0,Ji=0,Ou=null,Bo=-1,qo=0;function Pt(){return(Fe&6)!==0?tt():Bo!==-1?Bo:Bo=tt()}function Ss(r){return(r.mode&1)===0?1:(Fe&2)!==0&&xt!==0?xt&-xt:T4.transition!==null?(qo===0&&(qo=Zp()),qo):(r=Be,r!==0||(r=window.event,r=r===void 0?16:of(r.type)),r)}function Tn(r,a,d,g){if(50<Ji)throw Ji=0,Ou=null,Error(s(185));ji(r,d,g),((Fe&2)===0||r!==ft)&&(r===ft&&((Fe&2)===0&&(Fo|=d),ut===4&&Cs(r,xt)),Ot(r,g),d===1&&Fe===0&&(a.mode&1)===0&&(Yr=tt()+500,go&&vs()))}function Ot(r,a){var d=r.callbackNode;T3(r,a);var g=Ya(r,r===ft?xt:0);if(g===0)d!==null&&Qp(d),r.callbackNode=null,r.callbackPriority=0;else if(a=g&-g,r.callbackPriority!==a){if(d!=null&&Qp(d),a===1)r.tag===0?E4(o0.bind(null,r)):Vf(o0.bind(null,r)),j4(function(){(Fe&6)===0&&vs()}),d=null;else{switch(Xp(g)){case 1:d=xc;break;case 4:d=Gp;break;case 16:d=Va;break;case 536870912:d=Yp;break;default:d=Va}d=m0(d,a0.bind(null,r))}r.callbackPriority=a,r.callbackNode=d}}function a0(r,a){if(Bo=-1,qo=0,(Fe&6)!==0)throw Error(s(327));var d=r.callbackNode;if(Zr()&&r.callbackNode!==d)return null;var g=Ya(r,r===ft?xt:0);if(g===0)return null;if((g&30)!==0||(g&r.expiredLanes)!==0||a)a=Uo(r,g);else{a=g;var v=Fe;Fe|=2;var b=c0();(ft!==r||xt!==a)&&(Jn=null,Yr=tt()+500,ir(r,a));do try{Q4();break}catch(_){l0(r,_)}while(!0);su(),Mo.current=b,Fe=v,rt!==null?a=0:(ft=null,xt=0,a=ut)}if(a!==0){if(a===2&&(v=vc(r),v!==0&&(g=v,a=Du(r,v))),a===1)throw d=Zi,ir(r,0),Cs(r,g),Ot(r,tt()),d;if(a===6)Cs(r,g);else{if(v=r.current.alternate,(g&30)===0&&!V4(v)&&(a=Uo(r,g),a===2&&(b=vc(r),b!==0&&(g=b,a=Du(r,b))),a===1))throw d=Zi,ir(r,0),Cs(r,g),Ot(r,tt()),d;switch(r.finishedWork=v,r.finishedLanes=g,a){case 0:case 1:throw Error(s(345));case 2:ar(r,$t,Jn);break;case 3:if(Cs(r,g),(g&130023424)===g&&(a=Fu+500-tt(),10<a)){if(Ya(r,0)!==0)break;if(v=r.suspendedLanes,(v&g)!==g){Pt(),r.pingedLanes|=r.suspendedLanes&v;break}r.timeoutHandle=Vc(ar.bind(null,r,$t,Jn),a);break}ar(r,$t,Jn);break;case 4:if(Cs(r,g),(g&4194240)===g)break;for(a=r.eventTimes,v=-1;0<g;){var C=31-bn(g);b=1<<C,C=a[C],C>v&&(v=C),g&=~b}if(g=v,g=tt()-g,g=(120>g?120:480>g?480:1080>g?1080:1920>g?1920:3e3>g?3e3:4320>g?4320:1960*H4(g/1960))-g,10<g){r.timeoutHandle=Vc(ar.bind(null,r,$t,Jn),g);break}ar(r,$t,Jn);break;case 5:ar(r,$t,Jn);break;default:throw Error(s(329))}}}return Ot(r,tt()),r.callbackNode===d?a0.bind(null,r):null}function Du(r,a){var d=Xi;return r.current.memoizedState.isDehydrated&&(ir(r,a).flags|=256),r=Uo(r,a),r!==2&&(a=$t,$t=d,a!==null&&Bu(a)),r}function Bu(r){$t===null?$t=r:$t.push.apply($t,r)}function V4(r){for(var a=r;;){if(a.flags&16384){var d=a.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var g=0;g<d.length;g++){var v=d[g],b=v.getSnapshot;v=v.value;try{if(!jn(b(),v))return!1}catch{return!1}}}if(d=a.child,a.subtreeFlags&16384&&d!==null)d.return=a,a=d;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Cs(r,a){for(a&=~Mu,a&=~Fo,r.suspendedLanes|=a,r.pingedLanes&=~a,r=r.expirationTimes;0<a;){var d=31-bn(a),g=1<<d;r[d]=-1,a&=~g}}function o0(r){if((Fe&6)!==0)throw Error(s(327));Zr();var a=Ya(r,0);if((a&1)===0)return Ot(r,tt()),null;var d=Uo(r,a);if(r.tag!==0&&d===2){var g=vc(r);g!==0&&(a=g,d=Du(r,g))}if(d===1)throw d=Zi,ir(r,0),Cs(r,a),Ot(r,tt()),d;if(d===6)throw Error(s(345));return r.finishedWork=r.current.alternate,r.finishedLanes=a,ar(r,$t,Jn),Ot(r,tt()),null}function qu(r,a){var d=Fe;Fe|=1;try{return r(a)}finally{Fe=d,Fe===0&&(Yr=tt()+500,go&&vs())}}function rr(r){Ns!==null&&Ns.tag===0&&(Fe&6)===0&&Zr();var a=Fe;Fe|=1;var d=mn.transition,g=Be;try{if(mn.transition=null,Be=1,r)return r()}finally{Be=g,mn.transition=d,Fe=a,(Fe&6)===0&&vs()}}function Uu(){Zt=Gr.current,Qe(Gr)}function ir(r,a){r.finishedWork=null,r.finishedLanes=0;var d=r.timeoutHandle;if(d!==-1&&(r.timeoutHandle=-1,b4(d)),rt!==null)for(d=rt.return;d!==null;){var g=d;switch(Xc(g),g.tag){case 1:g=g.type.childContextTypes,g!=null&&fo();break;case 3:Vr(),Qe(zt),Qe(vt),du();break;case 5:cu(g);break;case 4:Vr();break;case 13:Qe(Xe);break;case 19:Qe(Xe);break;case 10:ru(g.type._context);break;case 22:case 23:Uu()}d=d.return}if(ft=r,rt=r=Es(r.current,null),xt=Zt=a,ut=0,Zi=null,Mu=Fo=sr=0,$t=Xi=null,er!==null){for(a=0;a<er.length;a++)if(d=er[a],g=d.interleaved,g!==null){d.interleaved=null;var v=g.next,b=d.pending;if(b!==null){var C=b.next;b.next=v,g.next=C}d.pending=g}er=null}return r}function l0(r,a){do{var d=rt;try{if(su(),Co.current=Ro,Eo){for(var g=Je.memoizedState;g!==null;){var v=g.queue;v!==null&&(v.pending=null),g=g.next}Eo=!1}if(nr=0,pt=ct=Je=null,Hi=!1,Vi=0,zu.current=null,d===null||d.return===null){ut=1,Zi=a,rt=null;break}e:{var b=r,C=d.return,_=d,F=a;if(a=xt,_.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var K=F,te=_,re=te.tag;if((te.mode&1)===0&&(re===0||re===11||re===15)){var ee=te.alternate;ee?(te.updateQueue=ee.updateQueue,te.memoizedState=ee.memoizedState,te.lanes=ee.lanes):(te.updateQueue=null,te.memoizedState=null)}var ue=L1(C);if(ue!==null){ue.flags&=-257,_1(ue,C,_,b,a),ue.mode&1&&I1(b,K,a),a=ue,F=K;var fe=a.updateQueue;if(fe===null){var ge=new Set;ge.add(F),a.updateQueue=ge}else fe.add(F);break e}else{if((a&1)===0){I1(b,K,a),Wu();break e}F=Error(s(426))}}else if(Ye&&_.mode&1){var nt=L1(C);if(nt!==null){(nt.flags&65536)===0&&(nt.flags|=256),_1(nt,C,_,b,a),tu(Kr(F,_));break e}}b=F=Kr(F,_),ut!==4&&(ut=2),Xi===null?Xi=[b]:Xi.push(b),b=C;do{switch(b.tag){case 3:b.flags|=65536,a&=-a,b.lanes|=a;var W=R1(b,F,a);s1(b,W);break e;case 1:_=F;var D=b.type,H=b.stateNode;if((b.flags&128)===0&&(typeof D.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(js===null||!js.has(H)))){b.flags|=65536,a&=-a,b.lanes|=a;var oe=A1(b,_,a);s1(b,oe);break e}}b=b.return}while(b!==null)}d0(d)}catch(ke){a=ke,rt===d&&d!==null&&(rt=d=d.return);continue}break}while(!0)}function c0(){var r=Mo.current;return Mo.current=Ro,r===null?Ro:r}function Wu(){(ut===0||ut===3||ut===2)&&(ut=4),ft===null||(sr&268435455)===0&&(Fo&268435455)===0||Cs(ft,xt)}function Uo(r,a){var d=Fe;Fe|=2;var g=c0();(ft!==r||xt!==a)&&(Jn=null,ir(r,a));do try{K4();break}catch(v){l0(r,v)}while(!0);if(su(),Fe=d,Mo.current=g,rt!==null)throw Error(s(261));return ft=null,xt=0,ut}function K4(){for(;rt!==null;)u0(rt)}function Q4(){for(;rt!==null&&!v3();)u0(rt)}function u0(r){var a=f0(r.alternate,r,Zt);r.memoizedProps=r.pendingProps,a===null?d0(r):rt=a,zu.current=null}function d0(r){var a=r;do{var d=a.alternate;if(r=a.return,(a.flags&32768)===0){if(d=D4(d,a,Zt),d!==null){rt=d;return}}else{if(d=B4(d,a),d!==null){d.flags&=32767,rt=d;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ut=6,rt=null;return}}if(a=a.sibling,a!==null){rt=a;return}rt=a=r}while(a!==null);ut===0&&(ut=5)}function ar(r,a,d){var g=Be,v=mn.transition;try{mn.transition=null,Be=1,G4(r,a,d,g)}finally{mn.transition=v,Be=g}return null}function G4(r,a,d,g){do Zr();while(Ns!==null);if((Fe&6)!==0)throw Error(s(327));d=r.finishedWork;var v=r.finishedLanes;if(d===null)return null;if(r.finishedWork=null,r.finishedLanes=0,d===r.current)throw Error(s(177));r.callbackNode=null,r.callbackPriority=0;var b=d.lanes|d.childLanes;if(P3(r,b),r===ft&&(rt=ft=null,xt=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Oo||(Oo=!0,m0(Va,function(){return Zr(),null})),b=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||b){b=mn.transition,mn.transition=null;var C=Be;Be=1;var _=Fe;Fe|=4,zu.current=null,U4(r,d),t0(d,r),m4(Wc),Ja=!!Uc,Wc=Uc=null,r.current=d,W4(d),k3(),Fe=_,Be=C,mn.transition=b}else r.current=d;if(Oo&&(Oo=!1,Ns=r,Do=v),b=r.pendingLanes,b===0&&(js=null),j3(d.stateNode),Ot(r,tt()),a!==null)for(g=r.onRecoverableError,d=0;d<a.length;d++)v=a[d],g(v.value,{componentStack:v.stack,digest:v.digest});if($o)throw $o=!1,r=$u,$u=null,r;return(Do&1)!==0&&r.tag!==0&&Zr(),b=r.pendingLanes,(b&1)!==0?r===Ou?Ji++:(Ji=0,Ou=r):Ji=0,vs(),null}function Zr(){if(Ns!==null){var r=Xp(Do),a=mn.transition,d=Be;try{if(mn.transition=null,Be=16>r?16:r,Ns===null)var g=!1;else{if(r=Ns,Ns=null,Do=0,(Fe&6)!==0)throw Error(s(331));var v=Fe;for(Fe|=4,de=r.current;de!==null;){var b=de,C=b.child;if((de.flags&16)!==0){var _=b.deletions;if(_!==null){for(var F=0;F<_.length;F++){var K=_[F];for(de=K;de!==null;){var te=de;switch(te.tag){case 0:case 11:case 15:Yi(8,te,b)}var re=te.child;if(re!==null)re.return=te,de=re;else for(;de!==null;){te=de;var ee=te.sibling,ue=te.return;if(Y1(te),te===K){de=null;break}if(ee!==null){ee.return=ue,de=ee;break}de=ue}}}var fe=b.alternate;if(fe!==null){var ge=fe.child;if(ge!==null){fe.child=null;do{var nt=ge.sibling;ge.sibling=null,ge=nt}while(ge!==null)}}de=b}}if((b.subtreeFlags&2064)!==0&&C!==null)C.return=b,de=C;else e:for(;de!==null;){if(b=de,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Yi(9,b,b.return)}var W=b.sibling;if(W!==null){W.return=b.return,de=W;break e}de=b.return}}var D=r.current;for(de=D;de!==null;){C=de;var H=C.child;if((C.subtreeFlags&2064)!==0&&H!==null)H.return=C,de=H;else e:for(C=D;de!==null;){if(_=de,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:zo(9,_)}}catch(ke){et(_,_.return,ke)}if(_===C){de=null;break e}var oe=_.sibling;if(oe!==null){oe.return=_.return,de=oe;break e}de=_.return}}if(Fe=v,vs(),zn&&typeof zn.onPostCommitFiberRoot=="function")try{zn.onPostCommitFiberRoot(Ka,r)}catch{}g=!0}return g}finally{Be=d,mn.transition=a}}return!1}function h0(r,a,d){a=Kr(d,a),a=R1(r,a,1),r=ws(r,a,1),a=Pt(),r!==null&&(ji(r,1,a),Ot(r,a))}function et(r,a,d){if(r.tag===3)h0(r,r,d);else for(;a!==null;){if(a.tag===3){h0(a,r,d);break}else if(a.tag===1){var g=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(js===null||!js.has(g))){r=Kr(d,r),r=A1(a,r,1),a=ws(a,r,1),r=Pt(),a!==null&&(ji(a,1,r),Ot(a,r));break}}a=a.return}}function Y4(r,a,d){var g=r.pingCache;g!==null&&g.delete(a),a=Pt(),r.pingedLanes|=r.suspendedLanes&d,ft===r&&(xt&d)===d&&(ut===4||ut===3&&(xt&130023424)===xt&&500>tt()-Fu?ir(r,0):Mu|=d),Ot(r,a)}function p0(r,a){a===0&&((r.mode&1)===0?a=1:(a=Ga,Ga<<=1,(Ga&130023424)===0&&(Ga=4194304)));var d=Pt();r=Yn(r,a),r!==null&&(ji(r,a,d),Ot(r,d))}function Z4(r){var a=r.memoizedState,d=0;a!==null&&(d=a.retryLane),p0(r,d)}function X4(r,a){var d=0;switch(r.tag){case 13:var g=r.stateNode,v=r.memoizedState;v!==null&&(d=v.retryLane);break;case 19:g=r.stateNode;break;default:throw Error(s(314))}g!==null&&g.delete(a),p0(r,d)}var f0;f0=function(r,a,d){if(r!==null)if(r.memoizedProps!==a.pendingProps||zt.current)Ft=!0;else{if((r.lanes&d)===0&&(a.flags&128)===0)return Ft=!1,O4(r,a,d);Ft=(r.flags&131072)!==0}else Ft=!1,Ye&&(a.flags&1048576)!==0&&Kf(a,xo,a.index);switch(a.lanes=0,a.tag){case 2:var g=a.type;Lo(r,a),r=a.pendingProps;var v=Or(a,vt.current);Hr(a,d),v=fu(null,a,g,r,v,d);var b=mu();return a.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Mt(g)?(b=!0,mo(a)):b=!1,a.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,ou(a),v.updater=Ao,a.stateNode=v,v._reactInternals=a,wu(a,g,r,d),a=Su(null,a,g,!0,b,d)):(a.tag=0,Ye&&b&&Zc(a),Tt(null,a,v,d),a=a.child),a;case 16:g=a.elementType;e:{switch(Lo(r,a),r=a.pendingProps,v=g._init,g=v(g._payload),a.type=g,v=a.tag=ev(g),r=Sn(g,r),v){case 0:a=Nu(null,a,g,r,d);break e;case 1:a=D1(null,a,g,r,d);break e;case 11:a=z1(null,a,g,r,d);break e;case 14:a=M1(null,a,g,Sn(g.type,r),d);break e}throw Error(s(306,g,""))}return a;case 0:return g=a.type,v=a.pendingProps,v=a.elementType===g?v:Sn(g,v),Nu(r,a,g,v,d);case 1:return g=a.type,v=a.pendingProps,v=a.elementType===g?v:Sn(g,v),D1(r,a,g,v,d);case 3:e:{if(B1(a),r===null)throw Error(s(387));g=a.pendingProps,b=a.memoizedState,v=b.element,n1(r,a),No(a,g,null,d);var C=a.memoizedState;if(g=C.element,b.isDehydrated)if(b={element:g,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){v=Kr(Error(s(423)),a),a=q1(r,a,g,d,v);break e}else if(g!==v){v=Kr(Error(s(424)),a),a=q1(r,a,g,d,v);break e}else for(Yt=gs(a.stateNode.containerInfo.firstChild),Gt=a,Ye=!0,Nn=null,d=e1(a,null,g,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(qr(),g===v){a=Xn(r,a,d);break e}Tt(r,a,g,d)}a=a.child}return a;case 5:return i1(a),r===null&&eu(a),g=a.type,v=a.pendingProps,b=r!==null?r.memoizedProps:null,C=v.children,Hc(g,v)?C=null:b!==null&&Hc(g,b)&&(a.flags|=32),O1(r,a),Tt(r,a,C,d),a.child;case 6:return r===null&&eu(a),null;case 13:return U1(r,a,d);case 4:return lu(a,a.stateNode.containerInfo),g=a.pendingProps,r===null?a.child=Ur(a,null,g,d):Tt(r,a,g,d),a.child;case 11:return g=a.type,v=a.pendingProps,v=a.elementType===g?v:Sn(g,v),z1(r,a,g,v,d);case 7:return Tt(r,a,a.pendingProps,d),a.child;case 8:return Tt(r,a,a.pendingProps.children,d),a.child;case 12:return Tt(r,a,a.pendingProps.children,d),a.child;case 10:e:{if(g=a.type._context,v=a.pendingProps,b=a.memoizedProps,C=v.value,He(wo,g._currentValue),g._currentValue=C,b!==null)if(jn(b.value,C)){if(b.children===v.children&&!zt.current){a=Xn(r,a,d);break e}}else for(b=a.child,b!==null&&(b.return=a);b!==null;){var _=b.dependencies;if(_!==null){C=b.child;for(var F=_.firstContext;F!==null;){if(F.context===g){if(b.tag===1){F=Zn(-1,d&-d),F.tag=2;var K=b.updateQueue;if(K!==null){K=K.shared;var te=K.pending;te===null?F.next=F:(F.next=te.next,te.next=F),K.pending=F}}b.lanes|=d,F=b.alternate,F!==null&&(F.lanes|=d),iu(b.return,d,a),_.lanes|=d;break}F=F.next}}else if(b.tag===10)C=b.type===a.type?null:b.child;else if(b.tag===18){if(C=b.return,C===null)throw Error(s(341));C.lanes|=d,_=C.alternate,_!==null&&(_.lanes|=d),iu(C,d,a),C=b.sibling}else C=b.child;if(C!==null)C.return=b;else for(C=b;C!==null;){if(C===a){C=null;break}if(b=C.sibling,b!==null){b.return=C.return,C=b;break}C=C.return}b=C}Tt(r,a,v.children,d),a=a.child}return a;case 9:return v=a.type,g=a.pendingProps.children,Hr(a,d),v=pn(v),g=g(v),a.flags|=1,Tt(r,a,g,d),a.child;case 14:return g=a.type,v=Sn(g,a.pendingProps),v=Sn(g.type,v),M1(r,a,g,v,d);case 15:return F1(r,a,a.type,a.pendingProps,d);case 17:return g=a.type,v=a.pendingProps,v=a.elementType===g?v:Sn(g,v),Lo(r,a),a.tag=1,Mt(g)?(r=!0,mo(a)):r=!1,Hr(a,d),T1(a,g,v),wu(a,g,v,d),Su(null,a,g,!0,r,d);case 19:return H1(r,a,d);case 22:return $1(r,a,d)}throw Error(s(156,a.tag))};function m0(r,a){return Kp(r,a)}function J4(r,a,d,g){this.tag=r,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(r,a,d,g){return new J4(r,a,d,g)}function Hu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ev(r){if(typeof r=="function")return Hu(r)?1:0;if(r!=null){if(r=r.$$typeof,r===U)return 11;if(r===X)return 14}return 2}function Es(r,a){var d=r.alternate;return d===null?(d=gn(r.tag,a,r.key,r.mode),d.elementType=r.elementType,d.type=r.type,d.stateNode=r.stateNode,d.alternate=r,r.alternate=d):(d.pendingProps=a,d.type=r.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=r.flags&14680064,d.childLanes=r.childLanes,d.lanes=r.lanes,d.child=r.child,d.memoizedProps=r.memoizedProps,d.memoizedState=r.memoizedState,d.updateQueue=r.updateQueue,a=r.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=r.sibling,d.index=r.index,d.ref=r.ref,d}function Wo(r,a,d,g,v,b){var C=2;if(g=r,typeof r=="function")Hu(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case M:return or(d.children,v,b,a);case L:C=8,v|=8;break;case B:return r=gn(12,d,a,v|2),r.elementType=B,r.lanes=b,r;case ne:return r=gn(13,d,a,v),r.elementType=ne,r.lanes=b,r;case Z:return r=gn(19,d,a,v),r.elementType=Z,r.lanes=b,r;case ce:return Ho(d,v,b,a);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case z:C=10;break e;case O:C=9;break e;case U:C=11;break e;case X:C=14;break e;case he:C=16,g=null;break e}throw Error(s(130,r==null?r:typeof r,""))}return a=gn(C,d,a,v),a.elementType=r,a.type=g,a.lanes=b,a}function or(r,a,d,g){return r=gn(7,r,g,a),r.lanes=d,r}function Ho(r,a,d,g){return r=gn(22,r,g,a),r.elementType=ce,r.lanes=d,r.stateNode={isHidden:!1},r}function Vu(r,a,d){return r=gn(6,r,null,a),r.lanes=d,r}function Ku(r,a,d){return a=gn(4,r.children!==null?r.children:[],r.key,a),a.lanes=d,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}function tv(r,a,d,g,v){this.tag=a,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=kc(0),this.expirationTimes=kc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kc(0),this.identifierPrefix=g,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Qu(r,a,d,g,v,b,C,_,F){return r=new tv(r,a,d,_,F),a===1?(a=1,b===!0&&(a|=8)):a=0,b=gn(3,null,null,a),r.current=b,b.stateNode=r,b.memoizedState={element:g,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},ou(b),r}function nv(r,a,d){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:g==null?null:""+g,children:r,containerInfo:a,implementation:d}}function g0(r){if(!r)return xs;r=r._reactInternals;e:{if(Gs(r)!==r||r.tag!==1)throw Error(s(170));var a=r;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(Mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(s(171))}if(r.tag===1){var d=r.type;if(Mt(d))return Wf(r,d,a)}return a}function y0(r,a,d,g,v,b,C,_,F){return r=Qu(d,g,!0,r,v,b,C,_,F),r.context=g0(null),d=r.current,g=Pt(),v=Ss(d),b=Zn(g,v),b.callback=a??null,ws(d,b,v),r.current.lanes=v,ji(r,v,g),Ot(r,g),r}function Vo(r,a,d,g){var v=a.current,b=Pt(),C=Ss(v);return d=g0(d),a.context===null?a.context=d:a.pendingContext=d,a=Zn(b,C),a.payload={element:r},g=g===void 0?null:g,g!==null&&(a.callback=g),r=ws(v,a,C),r!==null&&(Tn(r,v,C,b),jo(r,v,C)),C}function Ko(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function x0(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var d=r.retryLane;r.retryLane=d!==0&&d<a?d:a}}function Gu(r,a){x0(r,a),(r=r.alternate)&&x0(r,a)}function sv(){return null}var v0=typeof reportError=="function"?reportError:function(r){console.error(r)};function Yu(r){this._internalRoot=r}Qo.prototype.render=Yu.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(s(409));Vo(r,a,null,null)},Qo.prototype.unmount=Yu.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;rr(function(){Vo(null,r,null,null)}),a[Vn]=null}};function Qo(r){this._internalRoot=r}Qo.prototype.unstable_scheduleHydration=function(r){if(r){var a=tf();r={blockedOn:null,target:r,priority:a};for(var d=0;d<ps.length&&a!==0&&a<ps[d].priority;d++);ps.splice(d,0,r),d===0&&rf(r)}};function Zu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Go(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function k0(){}function rv(r,a,d,g,v){if(v){if(typeof g=="function"){var b=g;g=function(){var K=Ko(C);b.call(K)}}var C=y0(a,g,r,0,null,!1,!1,"",k0);return r._reactRootContainer=C,r[Vn]=C.current,Fi(r.nodeType===8?r.parentNode:r),rr(),C}for(;v=r.lastChild;)r.removeChild(v);if(typeof g=="function"){var _=g;g=function(){var K=Ko(F);_.call(K)}}var F=Qu(r,0,!1,null,null,!1,!1,"",k0);return r._reactRootContainer=F,r[Vn]=F.current,Fi(r.nodeType===8?r.parentNode:r),rr(function(){Vo(a,F,d,g)}),F}function Yo(r,a,d,g,v){var b=d._reactRootContainer;if(b){var C=b;if(typeof v=="function"){var _=v;v=function(){var F=Ko(C);_.call(F)}}Vo(a,C,r,v)}else C=rv(d,a,r,v,g);return Ko(C)}Jp=function(r){switch(r.tag){case 3:var a=r.stateNode;if(a.current.memoizedState.isDehydrated){var d=bi(a.pendingLanes);d!==0&&(wc(a,d|1),Ot(a,tt()),(Fe&6)===0&&(Yr=tt()+500,vs()))}break;case 13:rr(function(){var g=Yn(r,1);if(g!==null){var v=Pt();Tn(g,r,1,v)}}),Gu(r,1)}},bc=function(r){if(r.tag===13){var a=Yn(r,134217728);if(a!==null){var d=Pt();Tn(a,r,134217728,d)}Gu(r,134217728)}},ef=function(r){if(r.tag===13){var a=Ss(r),d=Yn(r,a);if(d!==null){var g=Pt();Tn(d,r,a,g)}Gu(r,a)}},tf=function(){return Be},nf=function(r,a){var d=Be;try{return Be=r,a()}finally{Be=d}},fc=function(r,a,d){switch(a){case"input":if(ln(r,d),a=d.name,d.type==="radio"&&a!=null){for(d=r;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<d.length;a++){var g=d[a];if(g!==r&&g.form===r.form){var v=po(g);if(!v)throw Error(s(90));It(g),ln(g,v)}}}break;case"textarea":Hn(r,d);break;case"select":a=d.value,a!=null&&cn(r,!!d.multiple,a,!1)}},Dp=qu,Bp=rr;var iv={usingClientEntryPoint:!1,Events:[Di,Fr,po,$p,Op,qu]},ea={findFiberByHostInstance:Ys,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},av={bundleType:ea.bundleType,version:ea.version,rendererPackageName:ea.rendererPackageName,rendererConfig:ea.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Hp(r),r===null?null:r.stateNode},findFiberByHostInstance:ea.findFiberByHostInstance||sv,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 Zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zo.isDisabled&&Zo.supportsFiber)try{Ka=Zo.inject(av),zn=Zo}catch{}}return Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iv,Dt.createPortal=function(r,a){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zu(a))throw Error(s(200));return nv(r,a,null,d)},Dt.createRoot=function(r,a){if(!Zu(r))throw Error(s(299));var d=!1,g="",v=v0;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(v=a.onRecoverableError)),a=Qu(r,1,!1,null,null,d,!1,g,v),r[Vn]=a.current,Fi(r.nodeType===8?r.parentNode:r),new Yu(a)},Dt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(s(188)):(r=Object.keys(r).join(","),Error(s(268,r)));return r=Hp(a),r=r===null?null:r.stateNode,r},Dt.flushSync=function(r){return rr(r)},Dt.hydrate=function(r,a,d){if(!Go(a))throw Error(s(200));return Yo(null,r,a,!0,d)},Dt.hydrateRoot=function(r,a,d){if(!Zu(r))throw Error(s(405));var g=d!=null&&d.hydratedSources||null,v=!1,b="",C=v0;if(d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onRecoverableError!==void 0&&(C=d.onRecoverableError)),a=y0(a,null,r,1,d??null,v,!1,b,C),r[Vn]=a.current,Fi(r),g)for(r=0;r<g.length;r++)d=g[r],v=d._getVersion,v=v(d._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[d,v]:a.mutableSourceEagerHydrationData.push(d,v);return new Qo(a)},Dt.render=function(r,a,d){if(!Go(a))throw Error(s(200));return Yo(null,r,a,!1,d)},Dt.unmountComponentAtNode=function(r){if(!Go(r))throw Error(s(40));return r._reactRootContainer?(rr(function(){Yo(null,null,r,!1,function(){r._reactRootContainer=null,r[Vn]=null})}),!0):!1},Dt.unstable_batchedUpdates=qu,Dt.unstable_renderSubtreeIntoContainer=function(r,a,d,g){if(!Go(d))throw Error(s(200));if(r==null||r._reactInternals===void 0)throw Error(s(38));return Yo(r,a,d,!1,g)},Dt.version="18.3.1-next-f1338f8080-20240426",Dt}var T0;function Ug(){if(T0)return ed.exports;T0=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(),ed.exports=pv(),ed.exports}var P0;function fv(){if(P0)return Xo;P0=1;var e=Ug();return Xo.createRoot=e.createRoot,Xo.hydrateRoot=e.hydrateRoot,Xo}var mv=fv(),pi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},gv=class extends pi{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Rh=new gv,yv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xv=class{#e=yv;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ur=new xv;function vv(e){setTimeout(e,0)}var kv=typeof window>"u"||"Deno"in globalThis;function Rt(){}function wv(e,t){return typeof e=="function"?e(t):e}function Wd(e){return typeof e=="number"&&e>=0&&e!==1/0}function Wg(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fs(e,t){return typeof e=="function"?e(t):e}function en(e,t){return typeof e=="function"?e(t):e}function R0(e,t){const{type:s="all",exact:i,fetchStatus:o,predicate:l,queryKey:c,stale:u}=e;if(c){if(i){if(t.queryHash!==Ah(c,t.options))return!1}else if(!va(t.queryKey,c))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||o&&o!==t.state.fetchStatus||l&&!l(t))}function A0(e,t){const{exact:s,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(s){if(yr(t.options.mutationKey)!==yr(l))return!1}else if(!va(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function Ah(e,t){return(t?.queryKeyHashFn||yr)(e)}function yr(e){return JSON.stringify(e,(t,s)=>Hd(s)?Object.keys(s).sort().reduce((i,o)=>(i[o]=s[o],i),{}):s)}function va(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>va(e[s],t[s])):!1}var bv=Object.prototype.hasOwnProperty;function Hg(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=I0(e)&&I0(t);if(!i&&!(Hd(e)&&Hd(t)))return t;const l=(i?e:Object.keys(e)).length,c=i?t:Object.keys(t),u=c.length,h=i?new Array(u):{};let p=0;for(let m=0;m<u;m++){const f=i?m:c[m],x=e[f],y=t[f];if(x===y){h[f]=x,(i?m<l:bv.call(e,f))&&p++;continue}if(x===null||y===null||typeof x!="object"||typeof y!="object"){h[f]=y;continue}const k=Hg(x,y,s+1);h[f]=k,k===x&&p++}return l===u&&p===l?e:h}function wl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function I0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Hd(e){if(!L0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!L0(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function L0(e){return Object.prototype.toString.call(e)==="[object Object]"}function jv(e){return new Promise(t=>{ur.setTimeout(t,e)})}function Vd(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Hg(e,t):t}function Nv(e){return e}function Sv(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function Cv(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}var Ih=Symbol();function Vg(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ih?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Lh(e,t){return typeof e=="function"?e(...t):!!e}function Ev(e,t,s){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),i||(i=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}var ka=(()=>{let e=()=>kv;return{isServer(){return e()},setIsServer(t){e=t}}})();function Kd(){let e,t;const s=new Promise((o,l)=>{e=o,t=l});s.status="pending",s.catch(()=>{});function i(o){Object.assign(s,o),delete s.resolve,delete s.reject}return s.resolve=o=>{i({status:"fulfilled",value:o}),e(o)},s.reject=o=>{i({status:"rejected",reason:o}),t(o)},s}var Tv=vv;function Pv(){let e=[],t=0,s=u=>{u()},i=u=>{u()},o=Tv;const l=u=>{t?e.push(u):o(()=>{s(u)})},c=()=>{const u=e;e=[],u.length&&o(()=>{i(()=>{u.forEach(h=>{s(h)})})})};return{batch:u=>{let h;t++;try{h=u()}finally{t--,t||c()}return h},batchCalls:u=>(...h)=>{l(()=>{u(...h)})},schedule:l,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{o=u}}}var dt=Pv(),Rv=class extends pi{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},bl=new Rv;function Av(e){return Math.min(1e3*2**e,3e4)}function Kg(e){return(e??"online")==="online"?bl.isOnline():!0}var Qd=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Qg(e){let t=!1,s=0,i;const o=Kd(),l=()=>o.status!=="pending",c=w=>{if(!l()){const j=new Qd(w);x(j),e.onCancel?.(j)}},u=()=>{t=!0},h=()=>{t=!1},p=()=>Rh.isFocused()&&(e.networkMode==="always"||bl.isOnline())&&e.canRun(),m=()=>Kg(e.networkMode)&&e.canRun(),f=w=>{l()||(i?.(),o.resolve(w))},x=w=>{l()||(i?.(),o.reject(w))},y=()=>new Promise(w=>{i=j=>{(l()||p())&&w(j)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),k=()=>{if(l())return;let w;const j=s===0?e.initialPromise:void 0;try{w=j??e.fn()}catch(N){w=Promise.reject(N)}Promise.resolve(w).then(f).catch(N=>{if(l())return;const S=e.retry??(ka.isServer()?0:3),T=e.retryDelay??Av,A=typeof T=="function"?T(s,N):T,q=S===!0||typeof S=="number"&&s<S||typeof S=="function"&&S(s,N);if(t||!q){x(N);return}s++,e.onFail?.(s,N),jv(A).then(()=>p()?void 0:y()).then(()=>{t?x(N):k()})})};return{promise:o,status:()=>o.status,cancel:c,continue:()=>(i?.(),o),cancelRetry:u,continueRetry:h,canStart:m,start:()=>(m()?k():y().then(k),o)}}var Gg=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wd(this.gcTime)&&(this.#e=ur.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ka.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ur.clearTimeout(this.#e),this.#e=void 0)}};function Iv(e){return{onFetch:(t,s)=>{const i=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const p=async()=>{let m=!1;const f=k=>{Ev(k,()=>t.signal,()=>m=!0)},x=Vg(t.options,t.fetchOptions),y=async(k,w,j)=>{if(m)return Promise.reject(t.signal.reason);if(w==null&&k.pages.length)return Promise.resolve(k);const S=(()=>{const R={client:t.client,queryKey:t.queryKey,pageParam:w,direction:j?"backward":"forward",meta:t.options.meta};return f(R),R})(),T=await x(S),{maxPages:A}=t.options,q=j?Cv:Sv;return{pages:q(k.pages,T,A),pageParams:q(k.pageParams,w,A)}};if(o&&l.length){const k=o==="backward",w=k?Lv:_0,j={pages:l,pageParams:c},N=w(i,j);u=await y(j,N,k)}else{const k=e??l.length;do{const w=h===0?c[0]??i.initialPageParam:_0(i,u);if(h>0&&w==null)break;u=await y(u,w),h++}while(h<k)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=p}}}function _0(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function Lv(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var _v=class extends Gg{#e;#t;#n;#s;#i;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#s=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=M0(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=M0(this.options);t.data!==void 0&&(this.setState(z0(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const s=Vd(this.state.data,e,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>en(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ih||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Fs(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Wg(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a||this.#u()?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},o=()=>{const h=Vg(this.options,t),m=(()=>{const f={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(f),f})();return this.#a=!1,this.options.persister?this.options.persister(h,m,this):h(m)},c=(()=>{const h={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return i(h),h})();(this.#e==="infinite"?Iv(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=Qg({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:h=>{h instanceof Qd&&h.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(h,p)=>{this.#l({type:"failed",failureCount:h,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const h=await this.#r.start();if(h===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(h),this.#s.config.onSuccess?.(h,this),this.#s.config.onSettled?.(h,this.state.error,this),h}catch(h){if(h instanceof Qd){if(h.silent)return this.#r.promise;if(h.revert){if(this.state.data===void 0)throw h;return this.state.data}}throw this.#l({type:"error",error:h}),this.#s.config.onError?.(h,this),this.#s.config.onSettled?.(this.state.data,h,this),h}finally{this.scheduleGc()}}#l(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Yg(s.data,this.options),fetchMeta:e.meta??null};case"success":const i={...s,...z0(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?i:void 0,i;case"error":const o=e.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),dt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function Yg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kg(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function z0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function M0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var zv=class extends pi{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=Kd(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#s=void 0;#i;#r;#o;#a;#u;#l;#f;#d;#h;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),F0(this.#t,this.options)?this.#p():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gd(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#k(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof en(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#t.setOptions(this.options),t._defaulted&&!wl(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&$0(this.#t,s,this.options,t)&&this.#p(),this.updateResult(),i&&(this.#t!==s||en(this.options.enabled,this.#t)!==en(t.enabled,this.#t)||Fs(this.options.staleTime,this.#t)!==Fs(t.staleTime,this.#t))&&this.#g();const o=this.#y();i&&(this.#t!==s||en(this.options.enabled,this.#t)!==en(t.enabled,this.#t)||o!==this.#c)&&this.#x(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(t,e);return Fv(this,s)&&(this.#s=s,this.#r=this.options,this.#i=this.#t.state),s}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(s,i)=>(this.trackProp(i),t?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#p(e){this.#b();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Rt)),t}#g(){this.#k();const e=Fs(this.options.staleTime,this.#t);if(ka.isServer()||this.#s.isStale||!Wd(e))return;const s=Wg(this.#s.dataUpdatedAt,e)+1;this.#d=ur.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#w(),this.#c=e,!(ka.isServer()||en(this.options.enabled,this.#t)===!1||!Wd(this.#c)||this.#c===0)&&(this.#h=ur.setInterval(()=>{(this.options.refetchIntervalInBackground||Rh.isFocused())&&this.#p()},this.#c))}#v(){this.#g(),this.#x(this.#y())}#k(){this.#d!==void 0&&(ur.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#h!==void 0&&(ur.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const s=this.#t,i=this.options,o=this.#s,l=this.#i,c=this.#r,h=e!==s?e.state:this.#n,{state:p}=e;let m={...p},f=!1,x;if(t._optimisticResults){const L=this.hasListeners(),B=!L&&F0(e,t),z=L&&$0(e,s,t,i);(B||z)&&(m={...m,...Yg(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:k,status:w}=m;x=m.data;let j=!1;if(t.placeholderData!==void 0&&x===void 0&&w==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(L=o.data,j=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,L!==void 0&&(w="success",x=Vd(o?.data,L,t),f=!0)}if(t.select&&x!==void 0&&!j)if(o&&x===l?.data&&t.select===this.#u)x=this.#l;else try{this.#u=t.select,x=t.select(x),x=Vd(o?.data,x,t),this.#l=x,this.#a=null}catch(L){this.#a=L}this.#a&&(y=this.#a,x=this.#l,k=Date.now(),w="error");const N=m.fetchStatus==="fetching",S=w==="pending",T=w==="error",A=S&&N,q=x!==void 0,M={status:w,fetchStatus:m.fetchStatus,isPending:S,isSuccess:w==="success",isError:T,isInitialLoading:A,isLoading:A,data:x,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:k,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:N,isRefetching:N&&!S,isLoadingError:T&&!q,isPaused:m.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:T&&q,isStale:_h(e,t),refetch:this.refetch,promise:this.#o,isEnabled:en(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=M.data!==void 0,B=M.status==="error"&&!L,z=ne=>{B?ne.reject(M.error):L&&ne.resolve(M.data)},O=()=>{const ne=this.#o=M.promise=Kd();z(ne)},U=this.#o;switch(U.status){case"pending":e.queryHash===s.queryHash&&z(U);break;case"fulfilled":(B||M.data!==U.value)&&O();break;case"rejected":(!B||M.error!==U.reason)&&O();break}}return M}updateResult(){const e=this.#s,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#r=this.options,this.#i.data!==void 0&&(this.#f=this.#t),wl(t,e))return;this.#s=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!this.#m.size)return!0;const l=new Set(o??this.#m);return this.options.throwOnError&&l.add("error"),Object.keys(this.#s).some(c=>{const u=c;return this.#s[u]!==e[u]&&l.has(u)})};this.#j({listeners:s()})}#b(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#j(e){dt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Mv(e,t){return en(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&en(t.retryOnMount,e)===!1)}function F0(e,t){return Mv(e,t)||e.state.data!==void 0&&Gd(e,t,t.refetchOnMount)}function Gd(e,t,s){if(en(t.enabled,e)!==!1&&Fs(t.staleTime,e)!=="static"){const i=typeof s=="function"?s(e):s;return i==="always"||i!==!1&&_h(e,t)}return!1}function $0(e,t,s,i){return(e!==t||en(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&_h(e,s)}function _h(e,t){return en(t.enabled,e)!==!1&&e.isStaleByTime(Fs(t.staleTime,e))}function Fv(e,t){return!wl(e.getCurrentResult(),t)}var $v=class extends Gg{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Zg(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Qg({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#i({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const i=this.state.status==="pending",o=!this.#s.canStart();try{if(i)t();else{this.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,s);const c=await this.options.onMutate?.(e,s);c!==this.state.context&&this.#i({type:"pending",context:c,variables:e,isPaused:o})}const l=await this.#s.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,s),await this.options.onSuccess?.(l,e,this.state.context,s),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(l,null,e,this.state.context,s),this.#i({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,s)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,s)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,s)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#i(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),dt.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Zg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ov=class extends pi{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,s){const i=new $v({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#e.add(e);const t=Jo(e);if(typeof t=="string"){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Jo(e);if(typeof t=="string"){const s=this.#t.get(t);if(s)if(s.length>1){const i=s.indexOf(e);i!==-1&&s.splice(i,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Jo(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Jo(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){dt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>A0(t,s))}findAll(e={}){return this.getAll().filter(t=>A0(e,t))}notify(e){dt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return dt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Rt))))}};function Jo(e){return e.options.scope?.id}var Dv=class extends pi{#e;#t=void 0;#n;#s;constructor(t,s){super(),this.#e=t,this.setOptions(s),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#e.defaultMutationOptions(t),wl(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&yr(s.mutationKey)!==yr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#r(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#r()}mutate(t,s){return this.#s=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??Zg();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){dt.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#t.variables,i=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#s.onSuccess?.(t.data,s,i,o)}catch(l){Promise.reject(l)}try{this.#s.onSettled?.(t.data,null,s,i,o)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#s.onError?.(t.error,s,i,o)}catch(l){Promise.reject(l)}try{this.#s.onSettled?.(void 0,t.error,s,i,o)}catch(l){Promise.reject(l)}}}this.listeners.forEach(s=>{s(this.#t)})})}},Bv=class extends pi{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,s){const i=t.queryKey,o=t.queryHash??Ah(i,t);let l=this.get(o);return l||(l=new _v({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){dt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>R0(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>R0(e,s)):t}notify(e){dt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qv=class{#e;#t;#n;#s;#i;#r;#o;#a;constructor(e={}){this.#e=e.queryCache||new Bv,this.#t=e.mutationCache||new Ov,this.#n=e.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=Rh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=bl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#e.build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Fs(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:s})=>{const i=s.data;return[t,i]})}setQueryData(e,t,s){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,c=wv(t,l);if(c!==void 0)return this.#e.build(this,i).setData(c,{...s,manual:!0})}setQueriesData(e,t,s){return dt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;dt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#e;return dt.batch(()=>(s.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},i=dt.batch(()=>this.#e.findAll(e).map(o=>o.cancel(s)));return Promise.all(i).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return dt.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=dt.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,s);return s.throwOnError||(l=l.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#e.build(this,t);return s.isStaleByTime(Fs(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return bl.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(yr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],s={};return t.forEach(i=>{va(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){this.#i.set(yr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],s={};return t.forEach(i=>{va(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ah(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ih&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Xg=E.createContext(void 0),Ws=e=>{const t=E.useContext(Xg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Uv=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(Xg.Provider,{value:e,children:t})),Jg=E.createContext(!1),Wv=()=>E.useContext(Jg);Jg.Provider;function Hv(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Vv=E.createContext(Hv()),Kv=()=>E.useContext(Vv),Qv=(e,t,s)=>{const i=s?.state.error&&typeof e.throwOnError=="function"?Lh(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},Gv=e=>{E.useEffect(()=>{e.clearReset()},[e])},Yv=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||Lh(s,[e.error,i])),Zv=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>s(i(...o)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Xv=(e,t)=>e.isLoading&&e.isFetching&&!t,Jv=(e,t)=>e?.suspense&&t.isPending,O0=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function e5(e,t,s){const i=Wv(),o=Kv(),l=Ws(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const u=l.getQueryCache().get(c.queryHash);c._optimisticResults=i?"isRestoring":"optimistic",Zv(c),Qv(c,o,u),Gv(o);const h=!l.getQueryCache().get(c.queryHash),[p]=E.useState(()=>new t(l,c)),m=p.getOptimisticResult(c),f=!i&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(x=>{const y=f?p.subscribe(dt.batchCalls(x)):Rt;return p.updateResult(),y},[p,f]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),E.useEffect(()=>{p.setOptions(c)},[c,p]),Jv(c,m))throw O0(c,p,o);if(Yv({result:m,errorResetBoundary:o,throwOnError:c.throwOnError,query:u,suspense:c.suspense}))throw m.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!ka.isServer()&&Xv(m,i)&&(h?O0(c,p,o):u?.promise)?.catch(Rt).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?m:p.trackResult(m)}function $e(e,t){return e5(e,zv)}function t5(e,t){const s=Ws(),[i]=E.useState(()=>new Dv(s,e));E.useEffect(()=>{i.setOptions(e)},[i,e]);const o=E.useSyncExternalStore(E.useCallback(c=>i.subscribe(dt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=E.useCallback((c,u)=>{i.mutate(c,u).catch(Rt)},[i]);if(o.error&&Lh(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}var ha=typeof window<"u"?E.useLayoutEffect:E.useEffect;function sd(e){const t=E.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function n5(e,t,s={},i={}){E.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([l])=>{t(l)},s);return o.observe(e.current),()=>{o.disconnect()}},[t,s,i.disabled,e])}function s5(e){const t=E.useRef(null);return E.useImperativeHandle(e,()=>t.current,[]),t}const e2=!1;function wa(e){return e[e.length-1]}function r5(e){return typeof e=="function"}function As(e,t){return r5(e)?e(t):e}const t2=Object.prototype.hasOwnProperty,D0=Object.prototype.propertyIsEnumerable;function n2(e){for(const t in e)if(t2.call(e,t))return!0;return!1}const i5=()=>Object.create(null),lr=(e,t)=>Is(e,t,i5);function Is(e,t,s=()=>({}),i=0){if(e===t)return e;if(i>500)return t;const o=t,l=U0(e)&&U0(o);if(!l&&!(oi(e)&&oi(o)))return o;const c=l?e:B0(e);if(!c)return o;const u=l?o:B0(o);if(!u)return o;const h=c.length,p=u.length,m=l?new Array(p):s();let f=0;for(let x=0;x<p;x++){const y=l?x:u[x],k=e[y],w=o[y];if(k===w){m[y]=k,(l?x<h:t2.call(e,y))&&f++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){m[y]=w;continue}const j=Is(k,w,s,i+1);m[y]=j,j===k&&f++}return h===p&&f===h?e:m}function B0(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!D0.call(e,o))return!1;const s=Object.getOwnPropertySymbols(e);if(s.length===0)return t;const i=t;for(const o of s){if(!D0.call(e,o))return!1;i.push(o)}return i}function oi(e){if(!q0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!q0(s)||!s.hasOwnProperty("isPrototypeOf"))}function q0(e){return Object.prototype.toString.call(e)==="[object Object]"}function U0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hr(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,o=e.length;i<o;i++)if(!hr(e[i],t[i],s))return!1;return!0}if(oi(e)&&oi(t)){const i=s?.ignoreUndefined??!0;if(s?.partial){for(const c in t)if((!i||t[c]!==void 0)&&!hr(e[c],t[c],s))return!1;return!0}let o=0;if(!i)o=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&o++;let l=0;for(const c in t)if((!i||t[c]!==void 0)&&(l++,l>o||!hr(e[c],t[c],s)))return!1;return o===l}return!1}function li(e){let t,s;const i=new Promise((o,l)=>{t=o,s=l});return i.status="pending",i.resolve=o=>{i.status="resolved",i.value=o,t(o),e?.(o)},i.reject=o=>{i.status="rejected",s(o)},i}function ba(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function a5(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function W0(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return a5(t)}const o5=["http:","https:","mailto:","tel:"];function jl(e,t){if(!e)return!1;try{const s=new URL(e);return!t.has(s.protocol)}catch{return!1}}function na(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let s=0,i="",o;for(;(o=t.exec(e))!==null;)i+=W0(e.slice(s,o.index))+o[0],s=t.lastIndex;i=i+W0(s?e.slice(s):e);let l=!1;return i.startsWith("//")&&(l=!0,i="/"+i.replace(/^\/+/,"")),{path:i,handledProtocolRelativeURL:l}}function l5(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function c5(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}function ns(){throw new Error("Invariant failed")}function ja(e){const t=new Map;let s,i;const o=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,s=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const c=t.get(l);if(c)return o(c),c.value},set(l,c){if(t.size>=e&&s){const h=s;t.delete(h.key),h.next&&(s=h.next,h.next.prev=void 0),h===i&&(i=void 0)}const u=t.get(l);if(u)u.value=c,o(u);else{const h={key:l,value:c,prev:i};i&&(i.next=h),i=h,s||(s=h),t.set(l,h)}},clear(){t.clear(),s=void 0,i=void 0}}}const Ls=4,s2=5;function u5(e){const t=e.indexOf("{");if(t===-1)return null;const s=e.indexOf("}",t);return s===-1||t+1>=e.length?null:[t,s]}function r2(e,t,s=new Uint16Array(6)){const i=e.indexOf("/",t),o=i===-1?e.length:i,l=e.substring(t,o);if(!l||!l.includes("$"))return s[0]=0,s[1]=t,s[2]=t,s[3]=o,s[4]=o,s[5]=o,s;if(l==="$"){const u=e.length;return s[0]=2,s[1]=t,s[2]=t,s[3]=u,s[4]=u,s[5]=u,s}if(l.charCodeAt(0)===36)return s[0]=1,s[1]=t,s[2]=t+1,s[3]=o,s[4]=o,s[5]=o,s;const c=u5(l);if(c){const[u,h]=c,p=l.charCodeAt(u+1);if(p===45){if(u+2<l.length&&l.charCodeAt(u+2)===36){const m=u+3,f=h;if(m<f)return s[0]=3,s[1]=t+u,s[2]=t+m,s[3]=t+f,s[4]=t+h+1,s[5]=o,s}}else if(p===36){const m=u+1,f=u+2;return f===h?(s[0]=2,s[1]=t+u,s[2]=t+m,s[3]=t+f,s[4]=t+h+1,s[5]=e.length,s):(s[0]=1,s[1]=t+u,s[2]=t+f,s[3]=t+h,s[4]=t+h+1,s[5]=o,s)}}return s[0]=0,s[1]=t,s[2]=t,s[3]=o,s[4]=o,s[5]=o,s}function Hl(e,t,s,i,o,l,c){c?.(s);let u=i;{const h=s.fullPath??s.from,p=h.length,m=s.options?.caseSensitive??e,f=s.options?.params?.parse??s.options?.parseParams;for(;u<p;){const y=r2(h,u,t);let k;const w=u,j=y[5];switch(u=j+1,l++,y[0]){case 0:{const N=h.substring(y[2],y[3]);if(m){const S=o.static?.get(N);if(S)k=S;else{o.static??=new Map;const T=dr(s.fullPath??s.from);T.parent=o,T.depth=l,k=T,o.static.set(N,T)}}else{const S=N.toLowerCase(),T=o.staticInsensitive?.get(S);if(T)k=T;else{o.staticInsensitive??=new Map;const A=dr(s.fullPath??s.from);A.parent=o,A.depth=l,k=A,o.staticInsensitive.set(S,A)}}break}case 1:{const N=h.substring(w,y[1]),S=h.substring(y[4],j),T=m&&!!(N||S),A=N?T?N:N.toLowerCase():void 0,q=S?T?S:S.toLowerCase():void 0,R=!f&&o.dynamic?.find(M=>!M.parse&&M.caseSensitive===T&&M.prefix===A&&M.suffix===q);if(R)k=R;else{const M=id(1,s.fullPath??s.from,T,A,q);k=M,M.depth=l,M.parent=o,o.dynamic??=[],o.dynamic.push(M)}break}case 3:{const N=h.substring(w,y[1]),S=h.substring(y[4],j),T=m&&!!(N||S),A=N?T?N:N.toLowerCase():void 0,q=S?T?S:S.toLowerCase():void 0,R=!f&&o.optional?.find(M=>!M.parse&&M.caseSensitive===T&&M.prefix===A&&M.suffix===q);if(R)k=R;else{const M=id(3,s.fullPath??s.from,T,A,q);k=M,M.parent=o,M.depth=l,o.optional??=[],o.optional.push(M)}break}case 2:{const N=h.substring(w,y[1]),S=h.substring(y[4],j),T=m&&!!(N||S),A=N?T?N:N.toLowerCase():void 0,q=S?T?S:S.toLowerCase():void 0,R=id(2,s.fullPath??s.from,T,A,q);k=R,R.parent=o,R.depth=l,o.wildcard??=[],o.wildcard.push(R)}}o=k}if(f&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const y=dr(s.fullPath??s.from);y.kind=s2,y.parent=o,l++,y.depth=l,o.pathless??=[],o.pathless.push(y),o=y}const x=(s.path||!s.children)&&!s.isRoot;if(x&&h.endsWith("/")){const y=dr(s.fullPath??s.from);y.kind=Ls,y.parent=o,l++,y.depth=l,o.index=y,o=y}o.parse=f??null,x&&!o.route&&(o.route=s,o.fullPath=s.fullPath??s.from)}if(s.children)for(const h of s.children)Hl(e,t,h,u,o,l,c)}function rd(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Rs(e){if(e.pathless)for(const t of e.pathless)Rs(t);if(e.static)for(const t of e.static.values())Rs(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Rs(t);if(e.dynamic?.length){e.dynamic.sort(rd);for(const t of e.dynamic)Rs(t)}if(e.optional?.length){e.optional.sort(rd);for(const t of e.optional)Rs(t)}if(e.wildcard?.length){e.wildcard.sort(rd);for(const t of e.wildcard)Rs(t)}}function dr(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function id(e,t,s,i,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:s,prefix:i,suffix:o}}function d5(e,t){const s=dr("/"),i=new Uint16Array(6);for(const o of e)Hl(!1,i,o,1,s,0);Rs(s),t.masksTree=s,t.flatCache=ja(1e3)}function h5(e,t){e||="/";const s=t.flatCache.get(e);if(s)return s;const i=zh(e,t.masksTree);return t.flatCache.set(e,i),i}function p5(e,t,s,i,o){e||="/",i||="/";const l=t?`case\0${e}`:e;let c=o.singleCache.get(l);return c||(c=dr("/"),Hl(t,new Uint16Array(6),{from:e},1,c,0),o.singleCache.set(l,c)),zh(i,c,s)}function f5(e,t,s=!1){const i=s?e:`nofuzz\0${e}`,o=t.matchCache.get(i);if(o!==void 0)return o;e||="/";let l;try{l=zh(e,t.segmentTree,s)}catch(c){if(c instanceof URIError)l=null;else throw c}return l&&(l.branch=a2(l.route)),t.matchCache.set(i,l),l}function m5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function g5(e,t=!1,s){const i=dr(e.fullPath),o=new Uint16Array(6),l={},c={};let u=0;return Hl(t,o,e,1,i,0,h=>{if(s?.(h,u),h.id in l&&ns(),l[h.id]=h,u!==0&&h.path){const p=m5(h.fullPath);(!c[p]||h.fullPath.endsWith("/"))&&(c[p]=h)}u++}),Rs(i),{processedTree:{segmentTree:i,singleCache:ja(1e3),matchCache:ja(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:c}}function zh(e,t,s=!1){const i=e.split("/"),o=x5(e,i,t,s);if(!o)return null;const[l]=i2(e,i,o);return{route:o.node.route,rawParams:l}}function i2(e,t,s){const i=y5(s.node);let o=null;const l=Object.create(null);let c=s.extract?.part??0,u=s.extract?.node??0,h=s.extract?.path??0,p=s.extract?.segment??0;for(;u<i.length;c++,u++,h++,p++){const m=i[u];if(m.kind===Ls)break;if(m.kind===s2){p--,c--,h--;continue}const f=t[c],x=h;if(f&&(h+=f.length),m.kind===1){o??=s.node.fullPath.split("/");const y=o[p],k=m.prefix?.length??0;if(y.charCodeAt(k)===123){const w=m.suffix?.length??0,j=y.substring(k+2,y.length-w-1),N=f.substring(k,f.length-w);l[j]=decodeURIComponent(N)}else{const w=y.substring(1);l[w]=decodeURIComponent(f)}}else if(m.kind===3){if(s.skipped&1<<u){c--,h=x-1;continue}o??=s.node.fullPath.split("/");const y=o[p],k=m.prefix?.length??0,w=m.suffix?.length??0,j=y.substring(k+3,y.length-w-1),N=m.suffix||m.prefix?f.substring(k,f.length-w):f;N&&(l[j]=decodeURIComponent(N))}else if(m.kind===2){const y=m,k=e.substring(x+(y.prefix?.length??0),e.length-(y.suffix?.length??0)),w=decodeURIComponent(k);l["*"]=w,l._splat=w;break}}return s.rawParams&&Object.assign(l,s.rawParams),[l,{part:c,node:u,path:h,segment:p}]}function a2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function y5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function x5(e,t,s,i){if(e==="/"&&s.index)return{node:s.index,skipped:0};const o=!wa(t),l=o&&e!=="/",c=t.length-(o?1:0),u=[{node:s,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let h=null,p=null;for(;u.length;){const m=u.pop(),{node:f,index:x,skipped:y,depth:k,statics:w,dynamics:j,optionals:N}=m;let{extract:S,rawParams:T}=m;if(f.kind===2&&f.route&&!tl(p,m))continue;if(f.parse){if(!H0(e,t,m))continue;T=m.rawParams,S=m.extract}i&&f.route&&f.kind!==Ls&&tl(h,m)&&(h=m);const A=x===c;if(A&&(f.route&&(!l||f.kind===Ls||f.kind===2)&&tl(p,m)&&(p=m),!f.optional&&!f.wildcard&&!f.index&&!f.pathless))continue;const q=A?void 0:t[x];let R;if(A&&f.index){const M={node:f.index,index:x,skipped:y,depth:k+1,statics:w,dynamics:j,optionals:N,extract:S,rawParams:T};let L=!0;if(f.index.parse&&(H0(e,t,M)||(L=!1)),L){if(!j&&!N&&!y&&v5(w,c))return M;tl(p,M)&&(p=M)}}if(f.wildcard)for(let M=f.wildcard.length-1;M>=0;M--){const L=f.wildcard[M],{prefix:B,suffix:z}=L;if(!(B&&(A||!(L.caseSensitive?q:R??=q.toLowerCase()).startsWith(B)))){if(z){if(A)continue;const O=t.slice(x).join("/").slice(-z.length);if((L.caseSensitive?O:O.toLowerCase())!==z)continue}u.push({node:L,index:c,skipped:y,depth:k+1,statics:w,dynamics:j,optionals:N,extract:S,rawParams:T})}}if(f.optional){const M=y|1<<k,L=k+1;for(let B=f.optional.length-1;B>=0;B--){const z=f.optional[B];u.push({node:z,index:x,skipped:M,depth:L,statics:w,dynamics:j,optionals:N,extract:S,rawParams:T})}if(!A)for(let B=f.optional.length-1;B>=0;B--){const z=f.optional[B],{prefix:O,suffix:U}=z;if(O||U){const ne=z.caseSensitive?q:R??=q.toLowerCase();if(O&&!ne.startsWith(O)||U&&!ne.endsWith(U))continue}u.push({node:z,index:x+1,skipped:y,depth:L,statics:w,dynamics:j,optionals:N+el(c,x),extract:S,rawParams:T})}}if(!A&&f.dynamic&&q)for(let M=f.dynamic.length-1;M>=0;M--){const L=f.dynamic[M],{prefix:B,suffix:z}=L;if(B||z){const O=L.caseSensitive?q:R??=q.toLowerCase();if(B&&!O.startsWith(B)||z&&!O.endsWith(z))continue}u.push({node:L,index:x+1,skipped:y,depth:k+1,statics:w,dynamics:j+el(c,x),optionals:N,extract:S,rawParams:T})}if(!A&&f.staticInsensitive){const M=f.staticInsensitive.get(R??=q.toLowerCase());M&&u.push({node:M,index:x+1,skipped:y,depth:k+1,statics:w+el(c,x),dynamics:j,optionals:N,extract:S,rawParams:T})}if(!A&&f.static){const M=f.static.get(q);M&&u.push({node:M,index:x+1,skipped:y,depth:k+1,statics:w+el(c,x),dynamics:j,optionals:N,extract:S,rawParams:T})}if(f.pathless){const M=k+1;for(let L=f.pathless.length-1;L>=0;L--){const B=f.pathless[L];u.push({node:B,index:x,skipped:y,depth:M,statics:w,dynamics:j,optionals:N,extract:S,rawParams:T})}}}if(p)return p;if(i&&h){let m=h.index;for(let x=0;x<h.index;x++)m+=t[x].length;const f=m===e.length?"/":e.slice(m);return h.rawParams??=Object.create(null),h.rawParams["**"]=decodeURIComponent(f),h}return null}function el(e,t){return 2**(e-t-1)}function v5(e,t){return e===2**(t-1)-1}function H0(e,t,s){let i,o;try{[i,o]=i2(e,t,s)}catch{return null}if(s.rawParams=i,s.extract=o,!s.node.parse)return!0;try{if(s.node.parse(i)===!1)return null}catch{}return!0}function tl(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ls)>(e.node.kind===Ls)||t.node.kind===Ls==(e.node.kind===Ls)&&t.depth>e.depth))):!0}function ml(e){return Mh(e.filter(t=>t!==void 0).join("/"))}function Mh(e){return e.replace(/\/{2,}/g,"/")}function o2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ts(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function l2(e){return ts(o2(e))}function Nl(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function k5(e,t,s){return Nl(e,s)===Nl(t,s)}function w5({base:e,to:t,trailingSlash:s="never",cache:i}){const o=t.startsWith("/"),l=!o&&t===".";let c;if(i){c=o?t:l?e:e+"\0"+t;const p=i.get(c);if(p)return p}let u;if(l)u=e.split("/");else if(o)u=t.split("/");else{for(u=e.split("/");u.length>1&&wa(u)==="";)u.pop();const p=t.split("/");for(let m=0,f=p.length;m<f;m++){const x=p[m];x===""?m?m===f-1&&u.push(x):u=[x]:x===".."?u.pop():x==="."||u.push(x)}}u.length>1&&(wa(u)===""?s==="never"&&u.pop():s==="always"&&u.push(""));const h=Mh(u.join("/"))||"/";return c&&i&&i.set(c,h),h}function b5(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),s=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=new RegExp(s,"g");return o=>o.replace(i,l=>t.get(l)??l)}function ad(e,t,s){const i=t[e];return typeof i!="string"?i:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(i)?i:i.split("/").map(o=>K0(o,s)).join("/"):K0(i,s)}function V0({path:e,params:t,decoder:s,...i}){let o=!1;const l=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:o};const c=e.length;let u=0,h,p="";for(;u<c;){const m=u;h=r2(e,m,h);const f=h[5];if(u=f+1,m===f)continue;const x=h[0];if(x===0){p+="/"+e.substring(m,f);continue}if(x===2){const y=t._splat;l._splat=y,l["*"]=y;const k=e.substring(m,h[1]),w=e.substring(h[4],f);if(!y){o=!0,(k||w)&&(p+="/"+k+w);continue}const j=ad("_splat",t,s);p+="/"+k+j+w;continue}if(x===1){const y=e.substring(h[2],h[3]);!o&&!(y in t)&&(o=!0),l[y]=t[y];const k=e.substring(m,h[1]),w=e.substring(h[4],f),j=ad(y,t,s)??"undefined";p+="/"+k+j+w;continue}if(x===3){const y=e.substring(h[2],h[3]),k=t[y];if(k==null)continue;l[y]=k;const w=e.substring(m,h[1]),j=e.substring(h[4],f),N=ad(y,t,s)??"";p+="/"+w+N+j;continue}}return e.endsWith("/")&&(p+="/"),{usedParams:l,interpolatedPath:p||"/",isMissingParams:o}}function K0(e,t){const s=encodeURIComponent(e);return t?.(s)??s}function Nt(e){return e?.isNotFound===!0}function j5(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const N5="tsr-scroll-restoration-v1_3";function S5(){const e=j5();if(!e)return null;let t={};try{const i=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");oi(i)&&(t=i)}catch{}return{get state(){return t},set:i=>{t=As(i,t)||t},persist:()=>{try{e.setItem(N5,JSON.stringify(t))}catch{}}}}const Q0=S5(),C5=e=>e.state.__TSR_key||e.href;function E5(e){const t=[];let s;for(;s=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,e)+1})`),e=s;return`${t.reverse().join(" > ")}`.toLowerCase()}let nl=!1;const sa="window",G0="data-scroll-restoration-id";function T5(e,t){if(!Q0)return;const s=Q0;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!s)return;e.isScrollRestorationSetup=!0,nl=!1;const i=e.options.getScrollRestorationKey||C5,o=new Map;window.history.scrollRestoration="manual";const l=u=>{if(!(nl||!e.isScrollRestoring))if(u.target===document||u.target===window)o.set(sa,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=u.target;o.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},c=u=>{if(!e.isScrollRestoring||!u||o.size===0||!s)return;const h=s.state[u]||={};for(const[p,m]of o){let f;if(p===sa)f=sa;else if(p.isConnected){const x=p.getAttribute(G0);f=x?`[${G0}="${x}"]`:E5(p)}f&&(h[f]=m)}};document.addEventListener("scroll",l,!0),e.subscribe("onBeforeLoad",u=>{c(u.fromLocation?i(u.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),s.persist()}),e.subscribe("onRendered",u=>{const h=i(u.toLocation),p=e.options.scrollRestorationBehavior,m=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){nl=!0;try{const f=e.isScrollRestoring?s.state[h]:void 0;let x=!1;if(f)for(const y in f){const k=f[y];if(!oi(k))continue;const{scrollX:w,scrollY:j}=k;if(!(!Number.isFinite(w)||!Number.isFinite(j))){if(y===sa)window.scrollTo({top:j,left:w,behavior:p}),x=!0;else if(y){let N;try{N=document.querySelector(y)}catch{continue}N&&(N.scrollLeft=w,N.scrollTop=j,x=!0)}}}if(!x){const y=e.history.location.hash.slice(1);if(y){const k=window.history.state?.__hashScrollIntoViewOptions??!0;if(k){const w=document.getElementById(y);w&&w.scrollIntoView(k)}}else{const k={top:0,left:0,behavior:p};if(window.scrollTo(k),m)for(const w of m){if(w===sa)continue;const j=typeof w=="function"?w():document.querySelector(w);j&&j.scrollTo(k)}}}}finally{nl=!1}e.isScrollRestoring&&s.set(f=>(f[h]||={},f))}})}function P5(e,t=String){const s=new URLSearchParams;for(const i in e){const o=e[i];o!==void 0&&s.set(i,t(o))}return s.toString()}function od(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function R5(e){const t=new URLSearchParams(e),s=Object.create(null);for(const[i,o]of t.entries()){const l=s[i];l==null?s[i]=od(o):Array.isArray(l)?l.push(od(o)):s[i]=[l,od(o)]}return s}const A5=L5(JSON.parse),I5=_5(JSON.stringify,JSON.parse);function L5(e){return t=>{t[0]==="?"&&(t=t.substring(1));const s=R5(t);for(const i in s){const o=s[i];if(typeof o=="string")try{s[i]=e(o)}catch{}}return s}}function _5(e,t){const s=typeof t=="function";function i(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(s&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const l=P5(o,i);return l?`?${l}`:""}}const pr="__root__";function Vl(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const s=new Response(null,{status:e.statusCode,headers:t});if(s.options=e,e.throw)throw s;return s}function qt(e){return e instanceof Response&&!!e.options}function z5(e){return{input:({url:t})=>{for(const s of e)t=Yd(s,t);return t},output:({url:t})=>{for(let s=e.length-1;s>=0;s--)t=c2(e[s],t);return t}}}function M5(e){const t=l2(e.basepath),s=`/${t}`,i=`${s}/`,o=e.caseSensitive?s:s.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===o?c.pathname="/":u.startsWith(l)&&(c.pathname=c.pathname.slice(s.length)),c},output:({url:c})=>(c.pathname=ml(["/",t,c.pathname]),c)}}function Yd(e,t){const s=e?.input?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function c2(e,t){const s=e?.output?.({url:t});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return t}function F5(e,t){const{createMutableStore:s,createReadonlyStore:i,batch:o,init:l}=t,c=new Map,u=new Map,h=new Map,p=s(e.status),m=s(e.loadedAt),f=s(e.isLoading),x=s(e.isTransitioning),y=s(e.location),k=s(e.resolvedLocation),w=s(e.statusCode),j=s(e.redirect),N=s([]),S=s([]),T=s([]),A=i(()=>ld(c,N.get())),q=i(()=>ld(u,S.get())),R=i(()=>ld(h,T.get())),M=i(()=>N.get()[0]),L=i(()=>N.get().some(ce=>c.get(ce)?.get().status==="pending")),B=i(()=>({locationHref:y.get().href,resolvedLocationHref:k.get()?.href,status:p.get()})),z=i(()=>({status:p.get(),loadedAt:m.get(),isLoading:f.get(),isTransitioning:x.get(),matches:A.get(),location:y.get(),resolvedLocation:k.get(),statusCode:w.get(),redirect:j.get()})),O=ja(64);function U(ce){let Q=O.get(ce);return Q||(Q=i(()=>{const se=N.get();for(const P of se){const $=c.get(P);if($&&$.routeId===ce)return $.get()}}),O.set(ce,Q)),Q}const ne={status:p,loadedAt:m,isLoading:f,isTransitioning:x,location:y,resolvedLocation:k,statusCode:w,redirect:j,matchesId:N,pendingIds:S,cachedIds:T,matches:A,pendingMatches:q,cachedMatches:R,firstId:M,hasPending:L,matchRouteDeps:B,matchStores:c,pendingMatchStores:u,cachedMatchStores:h,__store:z,getRouteMatchStore:U,setMatches:Z,setPending:X,setCached:he};Z(e.matches),l?.(ne);function Z(ce){cd(ce,c,N,s,o)}function X(ce){cd(ce,u,S,s,o)}function he(ce){cd(ce,h,T,s,o)}return ne}function ld(e,t){const s=[];for(const i of t){const o=e.get(i);o&&s.push(o.get())}return s}function cd(e,t,s,i,o){const l=e.map(u=>u.id),c=new Set(l);o(()=>{for(const u of t.keys())c.has(u)||t.delete(u);for(const u of e){const h=t.get(u.id);if(!h){const p=i(u);p.routeId=u.routeId,t.set(u.id,p);continue}h.routeId=u.routeId,h.get()!==u&&h.set(u)}c5(s.get(),l)||s.set(l)})}const Zd=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},$5=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Kl=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),fr=(e,t,s=!0)=>{const i={...e.router.options.context??{}},o=s?t:t-1;for(let l=0;l<=o;l++){const c=e.matches[l];if(!c)continue;const u=e.router.getMatch(c.id);u&&Object.assign(i,u.__routeContext,u.__beforeLoadContext)}return i},Y0=(e,t)=>{if(!e.matches.length)return;const s=t.routeId,i=e.matches.findIndex(c=>c.routeId===e.router.routeTree.id),o=i>=0?i:0;let l=s?e.matches.findIndex(c=>c.routeId===s):e.firstBadMatchIndex??e.matches.length-1;l<0&&(l=o);for(let c=l;c>=0;c--){const u=e.matches[c];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return c}return s?l:o},_s=(e,t,s)=>{if(!(!qt(s)&&!Nt(s)))throw qt(s)&&s.redirectHandled&&!s.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=s,e.updateMatch(t.id,i=>({...i,status:qt(s)?"redirected":Nt(s)?"notFound":i.status==="pending"?"success":i.status,context:fr(e,t.index),isFetching:!1,error:s})),Nt(s)&&!s.routeId&&(s.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),qt(s)&&(e.rendered=!0,s.options._fromLocation=e.location,s.redirectHandled=!0,s=e.router.resolveRedirect(s))),s},u2=(e,t)=>{const s=e.router.getMatch(t);return!!(!s||s._nonReactive.dehydrated)},Z0=(e,t,s)=>{const i=fr(e,s);e.updateMatch(t,o=>({...o,context:i}))},ra=(e,t,s,i)=>{const{id:o,routeId:l}=e.matches[t],c=e.router.looseRoutesById[l];if(s instanceof Promise)throw s;s.routerCode=i,e.firstBadMatchIndex??=t,_s(e,e.router.getMatch(o),s);try{c.options.onError?.(s)}catch(u){s=u,_s(e,e.router.getMatch(o),s)}e.updateMatch(o,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!qt(s)&&!Nt(s)&&(e.serialError??=s)},d2=(e,t,s,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const o=s.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Kl(e,t)&&(s.options.loader||s.options.beforeLoad||p2(s))&&typeof o=="number"&&o!==1/0&&(s.options.pendingComponent??e.router.options?.defaultPendingComponent)){const l=setTimeout(()=>{Zd(e)},o);i._nonReactive.pendingTimeout=l}},O5=(e,t,s)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;d2(e,t,s,i);const o=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&_s(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(o):o()},D5=(e,t,s,i)=>{const o=e.router.getMatch(t);let l=o._nonReactive.loadPromise;o._nonReactive.loadPromise=li(()=>{l?.resolve(),l=void 0});const{paramsError:c,searchError:u}=o;c&&ra(e,s,c,"PARSE_PARAMS"),u&&ra(e,s,u,"VALIDATE_SEARCH"),d2(e,t,i,o);const h=new AbortController;let p=!1;const m=()=>{p||(p=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:h})))},f=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,A=>({...A,isFetching:!1}))};if(!i.options.beforeLoad){e.router.batch(()=>{m(),f()});return}o._nonReactive.beforeLoadPromise=li();const x={...fr(e,s,!1),...o.__routeContext},{search:y,params:k,cause:w}=o,j=Kl(e,t),N={search:y,abortController:h,params:k,preload:j,context:x,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:j?"preload":w,matches:e.matches,routeId:i.id,...e.router.options.additionalContext},S=A=>{if(A===void 0){e.router.batch(()=>{m(),f()});return}(qt(A)||Nt(A))&&(m(),ra(e,s,A,"BEFORE_LOAD")),e.router.batch(()=>{m(),e.updateMatch(t,q=>({...q,__beforeLoadContext:A})),f()})};let T;try{if(T=i.options.beforeLoad(N),ba(T))return m(),T.catch(A=>{ra(e,s,A,"BEFORE_LOAD")}).then(S)}catch(A){m(),ra(e,s,A,"BEFORE_LOAD")}S(T)},B5=(e,t)=>{const{id:s,routeId:i}=e.matches[t],o=e.router.looseRoutesById[i],l=()=>u(),c=()=>D5(e,s,t,o),u=()=>{if(u2(e,s))return;const h=O5(e,s,o);return ba(h)?h.then(c):c()};return l()},q5=(e,t,s)=>{const i=e.router.getMatch(t);if(!i||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([s.options.head?.(o),s.options.scripts?.(o),s.options.headers?.(o)]).then(([l,c,u])=>({meta:l?.meta,links:l?.links,headScripts:l?.scripts,headers:u,scripts:c,styles:l?.styles}))},h2=(e,t,s,i,o)=>{const l=t[i-1],{params:c,loaderDeps:u,abortController:h,cause:p}=e.router.getMatch(s),m=fr(e,i),f=Kl(e,s);return{params:c,deps:u,preload:!!f,parentMatchPromise:l,abortController:h,context:m,location:e.location,navigate:x=>e.router.navigate({...x,_fromLocation:e.location}),cause:f?"preload":p,route:o,...e.router.options.additionalContext}},X0=async(e,t,s,i,o)=>{try{const l=e.router.getMatch(s);try{(!(e2??e.router.isServer)||l.ssr===!0)&&Na(o);const c=o.options.loader,u=typeof c=="function"?c:c?.handler,h=u?.(h2(e,t,s,i,o)),p=!!u&&ba(h);if((p||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||l._nonReactive.minPendingPromise)&&e.updateMatch(s,f=>({...f,isFetching:"loader"})),u){const f=p?await h:h;_s(e,e.router.getMatch(s),f),f!==void 0&&e.updateMatch(s,x=>({...x,loaderData:f}))}o._lazyPromise&&await o._lazyPromise;const m=l._nonReactive.minPendingPromise;m&&await m,o._componentsPromise&&await o._componentsPromise,e.updateMatch(s,f=>({...f,error:void 0,context:fr(e,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let u=c;if(u?.name==="AbortError"){if(l.abortController.signal.aborted){l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loaderPromise=void 0;return}e.updateMatch(s,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:fr(e,i)}));return}const h=l._nonReactive.minPendingPromise;h&&await h,Nt(c)&&await o.options.notFoundComponent?.preload?.(),_s(e,e.router.getMatch(s),c);try{o.options.onError?.(c)}catch(p){u=p,_s(e,e.router.getMatch(s),p)}!qt(u)&&!Nt(u)&&await Na(o,["errorComponent"]),e.updateMatch(s,p=>({...p,error:u,context:fr(e,i),status:"error",isFetching:!1}))}}catch(l){const c=e.router.getMatch(s);c&&(c._nonReactive.loaderPromise=void 0),_s(e,c,l)}},U5=async(e,t,s)=>{async function i(y,k,w,j,N){const S=Date.now()-k.updatedAt,T=y?N.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:N.options.staleTime??e.router.options.defaultStaleTime??0,A=N.options.shouldReload,q=typeof A=="function"?A(h2(e,t,o,s,N)):A,{status:R,invalid:M}=j,L=S>=T&&(!!e.forceStaleReload||j.cause==="enter"||w!==void 0&&w!==j.id);c=R==="success"&&(M||(q??L)),y&&N.options.preload===!1||(c&&!e.sync&&m?(u=!0,(async()=>{try{await X0(e,t,o,s,N);const B=e.router.getMatch(o);B._nonReactive.loaderPromise?.resolve(),B._nonReactive.loadPromise?.resolve(),B._nonReactive.loaderPromise=void 0,B._nonReactive.loadPromise=void 0}catch(B){qt(B)&&await e.router.navigate(B.options)}})()):R!=="success"||c?await X0(e,t,o,s,N):Z0(e,o,s))}const{id:o,routeId:l}=e.matches[s];let c=!1,u=!1;const h=e.router.looseRoutesById[l],p=h.options.loader,m=((typeof p=="function"?void 0:p?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(u2(e,o)){if(!e.router.getMatch(o))return e.matches[s];Z0(e,o,s)}else{const y=e.router.getMatch(o),k=e.router.stores.matchesId.get()[s],w=(k&&e.router.stores.matchStores.get(k)||null)?.routeId===l?k:e.router.stores.matches.get().find(N=>N.routeId===l)?.id,j=Kl(e,o);if(y._nonReactive.loaderPromise){if(y.status==="success"&&!e.sync&&!y.preload&&m)return y;await y._nonReactive.loaderPromise;const N=e.router.getMatch(o),S=N._nonReactive.error||N.error;S&&_s(e,N,S),N.status==="pending"&&await i(j,y,w,N,h)}else{const N=j&&!e.router.stores.matchStores.has(o),S=e.router.getMatch(o);S._nonReactive.loaderPromise=li(),N!==S.preload&&e.updateMatch(o,T=>({...T,preload:N})),await i(j,y,w,S,h)}}const f=e.router.getMatch(o);u||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve(),f._nonReactive.loadPromise=void 0),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,u||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const x=u?f.isFetching:!1;return x!==f.isFetching||f.invalid!==!1?(e.updateMatch(o,y=>({...y,isFetching:x,invalid:!1})),e.router.getMatch(o)):f};async function J0(e){const t=e,s=[];$5(t.router)&&Zd(t);let i;for(let x=0;x<t.matches.length;x++){try{const y=B5(t,x);ba(y)&&await y}catch(y){if(qt(y))throw y;if(Nt(y))i=y;else if(!t.preload)throw y;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,l=i&&!t.preload?Y0(t,i):void 0,c=i&&t.preload?0:l!==void 0?Math.min(l+1,o):o;let u,h;for(let x=0;x<c;x++)s.push(U5(t,s,x));try{await Promise.all(s)}catch{const x=await Promise.allSettled(s);for(const y of x){if(y.status!=="rejected")continue;const k=y.reason;if(qt(k))throw k;Nt(k)?u??=k:h??=k}if(h!==void 0)throw h}const p=u??(i&&!t.preload?i:void 0);let m=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!p&&i&&t.preload)return t.matches;if(p){const x=Y0(t,p);x===void 0&&ns();const y=t.matches[x],k=t.router.looseRoutesById[y.routeId],w=t.router.options?.defaultNotFoundComponent;!k.options.notFoundComponent&&w&&(k.options.notFoundComponent=w),p.routeId=y.routeId;const j=y.routeId===t.router.routeTree.id;t.updateMatch(y.id,N=>({...N,...j?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:p},isFetching:!1})),m=x,await Na(k,["notFoundComponent"])}else if(!t.preload){const x=t.matches[0];x.globalNotFound||t.router.getMatch(x.id)?.globalNotFound&&t.updateMatch(x.id,y=>({...y,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const x=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Na(x,["errorComponent"])}for(let x=0;x<=m;x++){const{id:y,routeId:k}=t.matches[x],w=t.router.looseRoutesById[k];try{const j=q5(t,y,w);if(j){const N=await j;t.updateMatch(y,S=>({...S,...N}))}}catch(j){console.error(`Error executing head for route ${k}:`,j)}}const f=Zd(t);if(ba(f)&&await f,p)throw p;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function em(e,t){const s=t.map(i=>e.options[i]?.preload?.()).filter(Boolean);if(s.length!==0)return Promise.all(s)}function Na(e,t=gl){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(i=>{const{id:o,...l}=i.options;Object.assign(e.options,l),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const s=()=>e._componentsLoaded?void 0:t===gl?(()=>{if(e._componentsPromise===void 0){const i=em(e,gl);i?e._componentsPromise=i.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():em(e,t);return e._lazyPromise?e._lazyPromise.then(s):s()}function p2(e){for(const t of gl)if(e.options[t]?.preload)return!0;return!1}const gl=["component","errorComponent","pendingComponent","notFoundComponent"];var $s="__TSR_index",tm="popstate",nm="beforeunload";function W5(e){let t=e.getLocation();const s=new Set,i=c=>{t=e.getLocation(),s.forEach(u=>u({location:t,action:c}))},o=c=>{e.notifyOnIndexChange??!0?i(c):t=e.getLocation()},l=async({task:c,navigateOpts:u,...h})=>{if(u?.ignoreBlocker??!1){c();return}const p=e.getBlockers?.()??[],m=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&p.length&&m)for(const f of p){const x=Sl(h.path,h.state);if(await f.blockerFn({currentLocation:t,nextLocation:x,action:h.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:c=>(s.add(c),()=>{s.delete(c)}),push:(c,u,h)=>{const p=t.state[$s];u=sm(p+1,u),l({task:()=>{e.pushState(c,u),i({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:c,state:u})},replace:(c,u,h)=>{const p=t.state[$s];u=sm(p,u),l({task:()=>{e.replaceState(c,u),i({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:c,state:u})},go:(c,u)=>{l({task:()=>{e.go(c),o({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{l({task:()=>{e.back(c?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{l({task:()=>{e.forward(c?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[$s]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const h=e.getBlockers?.()??[];e.setBlockers?.(h.filter(p=>p!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function sm(e,t){t||(t={});const s=Fh();return{...t,key:s,__TSR_key:s,[$s]:e}}function H5(e){const t=typeof document<"u"?window:void 0,s=t.history.pushState,i=t.history.replaceState;let o=[];const l=()=>o,c=L=>o=L,u=(L=>L),h=(()=>Sl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const L=Fh();t.history.replaceState({[$s]:0,key:L,__TSR_key:L},"")}let p=h(),m,f=!1,x=!1,y=!1,k=!1;const w=()=>p;let j,N;const S=()=>{j&&(M._ignoreSubscribers=!0,(j.isPush?t.history.pushState:t.history.replaceState)(j.state,"",j.href),M._ignoreSubscribers=!1,j=void 0,N=void 0,m=void 0)},T=(L,B,z)=>{const O=u(B);N||(m=p),p=Sl(B,z),j={href:O,state:z,isPush:j?.isPush||L==="push"},N||(N=Promise.resolve().then(()=>S()))},A=L=>{p=h(),M.notify({type:L})},q=async()=>{if(x){x=!1;return}const L=h(),B=L.state[$s]-p.state[$s],z=B===1,O=B===-1,U=!z&&!O||f;f=!1;const ne=U?"GO":O?"BACK":"FORWARD",Z=U?{type:"GO",index:B}:{type:O?"BACK":"FORWARD"};if(y)y=!1;else{const X=l();if(typeof document<"u"&&X.length){for(const he of X)if(await he.blockerFn({currentLocation:p,nextLocation:L,action:ne})){x=!0,t.history.go(1),M.notify(Z);return}}}p=h(),M.notify(Z)},R=L=>{if(k){k=!1;return}let B=!1;const z=l();if(typeof document<"u"&&z.length)for(const O of z){const U=O.enableBeforeUnload??!0;if(U===!0){B=!0;break}if(typeof U=="function"&&U()===!0){B=!0;break}}if(B)return L.preventDefault(),L.returnValue=""},M=W5({getLocation:w,getLength:()=>t.history.length,pushState:(L,B)=>T("push",L,B),replaceState:(L,B)=>T("replace",L,B),back:L=>(L&&(y=!0),k=!0,t.history.back()),forward:L=>{L&&(y=!0),k=!0,t.history.forward()},go:L=>{f=!0,t.history.go(L)},createHref:L=>u(L),flush:S,destroy:()=>{t.history.pushState=s,t.history.replaceState=i,t.removeEventListener(nm,R,{capture:!0}),t.removeEventListener(tm,q)},onBlocked:()=>{m&&p!==m&&(p=m)},getBlockers:l,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(nm,R,{capture:!0}),t.addEventListener(tm,q),t.history.pushState=function(...L){const B=s.apply(t.history,L);return M._ignoreSubscribers||A("PUSH"),B},t.history.replaceState=function(...L){const B=i.apply(t.history,L);return M._ignoreSubscribers||A("REPLACE"),B},M}function V5(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Sl(e,t){const s=V5(e),i=s.indexOf("#"),o=s.indexOf("?"),l=Fh();return{href:s,pathname:s.substring(0,i>0?o>0?Math.min(i,o):i:o>0?o:s.length),hash:i>-1?s.substring(i):"",search:o>-1?s.slice(o,i===-1?void 0:i):"",state:t||{[$s]:0,key:l,__TSR_key:l}}}function Fh(){return(Math.random()+1).toString(36).substring(7)}function ii(e,t){const s=t,i=e;return{fromLocation:s,toLocation:i,pathChanged:s?.pathname!==i.pathname,hrefChanged:s?.href!==i.href,hashChanged:s?.hash!==i.hash}}var K5=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=s=>s(),this.update=s=>{const i=this.options,o=this.basepath??i?.basepath??"/",l=this.basepath===void 0,c=i?.rewrite;if(this.options={...i,...s},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=b5(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=H5()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let m;this.resolvePathCache=ja(1e3),m=this.buildRouteTree(),this.setRoutes(m)}if(!this.stores&&this.latestLocation){const m=this.getStoreConfig(this);this.batch=m.batch,this.stores=F5(G5(this.latestLocation),m),T5(this)}let u=!1;const h=this.options.basepath??"/",p=this.options.rewrite;if(l||o!==h||c!==p){this.basepath=h;const m=[],f=l2(h);f&&f!=="/"&&m.push(M5({basepath:h})),p&&m.push(p),this.rewrite=m.length===0?void 0:m.length===1?m[0]:z5(m),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=g5(this.routeTree,this.options.caseSensitive,(i,o)=>{i.init({originalIndex:o})});return this.options.routeMasks&&d5(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,i)=>{const o={eventType:s,fn:i};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{this.subscribers.forEach(i=>{i.eventType===s.type&&i.fn(s)})},this.parseLocation=(s,i)=>{const o=({pathname:h,search:p,hash:m,href:f,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const N=this.options.parseSearch(p),S=this.options.stringifySearch(N);return{href:h+S+m,publicHref:h+S+m,pathname:na(h).path,external:!1,searchStr:S,search:lr(i?.search,N),hash:na(m.slice(1)).path,state:Is(i?.state,x)}}const y=new URL(f,this.origin),k=Yd(this.rewrite,y),w=this.options.parseSearch(k.search),j=this.options.stringifySearch(w);return k.search=j,{href:k.href.replace(k.origin,""),publicHref:f,pathname:na(k.pathname).path,external:!!this.rewrite&&k.origin!==this.origin,searchStr:j,search:lr(i?.search,w),hash:na(k.hash.slice(1)).path,state:Is(i?.state,x)}},l=o(s),{__tempLocation:c,__tempKey:u}=l.state;if(c&&(!u||u===this.tempLocationKey)){const h=o(c);return h.state.key=l.state.key,h.state.__TSR_key=l.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:l}}return l},this.resolvePathWithBase=(s,i)=>w5({base:s,to:i.includes("//")?Mh(i):i,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,i,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:i},o):this.matchRoutesInternal(s,i),this.getMatchedRoutes=s=>Y5({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const i=this.getMatch(s);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(s=>{this.cancelMatch(s)}),this.stores.matchesId.get().forEach(s=>{if(this.stores.pendingMatchStores.has(s))return;const i=this.stores.matchStores.get(s)?.get();i&&(i.status==="pending"||i.isFetching==="loader")&&this.cancelMatch(s)})},this.buildLocation=s=>{const i=(l={})=>{const c=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(c);l.from;const h=l.unsafeRelative==="path"?c.pathname:l.from??u.fullPath,p=l.to?`${l.to}`:void 0,m=u.search,f=Object.assign(Object.create(null),u.params),x=p?.charCodeAt(0)===47?"/":this.resolvePathWithBase(h,"."),y=p?this.resolvePathWithBase(x,p):x,k=l.params===!1||l.params===null?Object.create(null):(l.params??!0)===!0?f:Object.assign(f,As(l.params,f)),w=this.routesByPath[ts(y)];let j;if(w)j=this.getRouteBranch(w);else if(y.includes("$"))j=[];else{const O=this.getMatchedRoutes(y);j=O.matchedRoutes,this.options.notFoundRoute&&(!O.foundRoute||O.foundRoute.path!=="/"&&O.routeParams["**"])&&(j=[...j,this.options.notFoundRoute])}if(j.length&&n2(k))for(const O of j){const U=O.options.params?.stringify??O.options.stringifyParams;if(U)try{Object.assign(k,U(k))}catch{}}const N=s.leaveParams?y:na(V0({path:y,params:k,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=m;if(s._includeValidateSearch&&this.options.search?.strict){const O={};j.forEach(U=>{if(U.options.validateSearch)try{Object.assign(O,yl(U.options.validateSearch,{...O,...S}))}catch{}}),S=O}S=Z5({search:S,dest:l,destRoutes:j,_includeValidateSearch:s._includeValidateSearch}),S=lr(m,S);const T=this.options.stringifySearch(S),A=l.hash===!0?c.hash:l.hash?As(l.hash,c.hash):void 0,q=A?`#${A}`:"";let R=l.state===!0?c.state:l.state?As(l.state,c.state):{};R=Is(c.state,R);const M=`${N}${T}${q}`;let L,B,z=!1;if(this.rewrite){const O=new URL(M,this.origin),U=c2(this.rewrite,O);L=O.href.replace(O.origin,""),U.origin!==this.origin?(B=U.href,z=!0):B=U.pathname+U.search+U.hash}else L=l5(M),B=L;return{publicHref:B,href:L,pathname:N,search:S,searchStr:T,state:R,hash:A??"",external:z,unmaskOnReload:l.unmaskOnReload}},o=(l={},c)=>{const u=i(l);let h=c?i(c):void 0;if(!h){const p=Object.create(null);if(this.options.routeMasks){const m=h5(u.pathname,this.processedTree);if(m){Object.assign(p,m.rawParams);const{from:f,params:x,...y}=m.route,k=x===!1||x===null?Object.create(null):(x??!0)===!0?p:Object.assign(p,As(x,p));c={from:s.from,...y,params:k},h=i(c)}}}return h&&(u.maskedLocation=h),u};return s.mask?o(s,{from:s.from,...s.mask}):o(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:i,...o})=>{const l=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(m=>{o.state[m]=this.latestLocation.state[m]});const p=hr(o.state,this.latestLocation.state);return h.forEach(m=>{delete o.state[m]}),p},c=ts(this.latestLocation.href)===ts(o.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=li(()=>{u?.resolve(),u=void 0}),c&&l())this.load();else{let{maskedLocation:h,hashScrollIntoView:p,...m}=o;h&&(m={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[o.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:i})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:i,hashScrollIntoView:o,viewTransition:l,ignoreBlocker:c,href:u,...h}={})=>{if(u){const f=this.history.location.state.__TSR_index,x=Sl(u,{__TSR_index:s?f:f+1}),y=new URL(x.pathname,this.origin);h.to=Yd(this.rewrite,y).pathname,h.search=this.options.parseSearch(x.search),h.hash=x.hash.slice(1)}const p=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const m=this.commitLocation({...p,viewTransition:l,replace:s,resetScroll:i,hashScrollIntoView:o,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:s,reloadDocument:i,href:o,publicHref:l,...c})=>{let u=!1;if(o)try{new URL(`${o}`),u=!0}catch{}if(u&&!i&&(i=!0),i){if(s!==void 0||!o){const p=this.buildLocation({to:s,...c});o=o??p.publicHref,l=l??p.publicHref}const h=!u&&l?l:o;if(jl(h,this.protocolAllowlist))return Promise.resolve();if(!c.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const m of p)if(m?.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return c.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...c,href:o,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation),i=this.stores.cachedMatches.get().filter(o=>!s.some(l=>l.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(s),this.stores.setCached(i)})},this.load=async s=>{let i,o,l;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(l=new Promise(h=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,m=ii(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await J0({router:this,sync:s?.sync,forceStaleReload:c.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=null,x=null,y=null,k=null;this.batch(()=>{const w=this.stores.pendingMatches.get(),j=w.length,N=this.stores.matches.get();f=j?N.filter(A=>!this.stores.pendingMatchStores.has(A.id)):null;const S=new Set;for(const A of this.stores.pendingMatchStores.values())A.routeId&&S.add(A.routeId);const T=new Set;for(const A of this.stores.matchStores.values())A.routeId&&T.add(A.routeId);x=j?N.filter(A=>!S.has(A.routeId)):null,y=j?w.filter(A=>!T.has(A.routeId)):null,k=j?w.filter(A=>T.has(A.routeId)):N,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),j&&(this.stores.setMatches(w),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...f.filter(A=>A.status!=="error"&&A.status!=="notFound"&&A.status!=="redirected")]),this.clearExpiredCache())});for(const[w,j]of[[x,"onLeave"],[y,"onEnter"],[k,"onStay"]])if(w)for(const N of w)this.looseRoutesById[N.routeId].options[j]?.(N)})})}})}catch(p){qt(p)?(i=p,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Nt(p)&&(o=p);const m=i?i.status:o?404:this.stores.matches.get().some(f=>f.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(i)})}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(h=>h.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=s=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,c=this.stores.resolvedLocation.get(),u=typeof i.types=="function"?i.types(ii(l,c)):i.types;if(u===!1){s();return}o={update:s,types:u}}else o=s;document.startViewTransition(o)}else s()},this.updateMatch=(s,i)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(s);if(o){o.set(i);return}const l=this.stores.matchStores.get(s);if(l){l.set(i);return}const c=this.stores.cachedMatchStores.get(s);if(c){const u=i(c.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(s)&&this.stores.cachedIds.set(h=>h.filter(p=>p!==s)):c.set(u)}})},this.getMatch=s=>this.stores.cachedMatchStores.get(s)?.get()??this.stores.pendingMatchStores.get(s)?.get()??this.stores.matchStores.get(s)?.get(),this.invalidate=s=>{const i=o=>s?.filter?.(o)??!0?{...o,invalid:!0,...s?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(i)),this.stores.setCached(this.stores.cachedMatches.get().map(i)),this.stores.setPending(this.stores.pendingMatches.get().map(i))}),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const i=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const o=s.options._builtLocation??this.buildLocation(s.options),l=this.getParsedLocationHref(o);s.options.href=l,s.headers.set("Location",l)}else if(i)try{const o=new URL(i);if(this.origin&&o.origin===this.origin){const l=o.pathname+o.search+o.hash;s.options.href=l,s.headers.set("Location",l)}}catch{}if(s.options.href&&!s.options._builtLocation&&jl(s.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const i=s?.filter;i!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!i(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const s=Date.now(),i=o=>{const l=this.looseRoutesById[o.routeId];if(!l.options.loader)return!0;const c=(o.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:s-o.updatedAt>=c};this.clearCache({filter:i})},this.loadRouteChunk=Na,this.preloadRoute=async s=>{const i=s._builtLocation??this.buildLocation(s);let o=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:s});const l=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),c=new Set([...l,...this.stores.cachedIds.get()]),u=o.filter(h=>!c.has(h.id));if(u.length){const h=this.stores.cachedMatches.get();this.stores.setCached([...h,...u])}try{return o=await J0({router:this,matches:o,location:i,preload:!0,updateMatch:(h,p)=>{l.has(h)?o=o.map(m=>m.id===h?p(m):m):this.updateMatch(h,p)}}),o}catch(h){if(qt(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:i});Nt(h)||console.error(h);return}},this.matchRoute=(s,i)=>{const o={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},l=this.buildLocation(o);if(i?.pending&&this.stores.status.get()!=="pending")return!1;const c=(i?.pending===void 0?!this.stores.isLoading.get():i.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=p5(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,c.pathname,this.processedTree);return!u||s.params&&!hr(u.rawParams,s.params,{partial:!0})?!1:i?.includeSearch??!0?hr(c.search,l.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(s=>s.status==="notFound"||s.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??I5,parseSearch:e.parseSearch??A5,protocolAllowlist:e.protocolAllowlist??o5}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:s}){this.routesById=e,this.routesByPath=t,this.processedTree=s;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=a2(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const s=this.getMatchedRoutes(e.pathname),{foundRoute:i,routeParams:o}=s;let{matchedRoutes:l}=s,c=!1;(i?i.path!=="/"&&o["**"]:ts(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const u=c?J5(this.options.notFoundMode,l):void 0,h=new Array(l.length),p=new Map;for(const m of this.stores.matchStores.values())m.routeId&&p.set(m.routeId,m.get());for(let m=0;m<l.length;m++){const f=l[m],x=h[m-1];let y,k,w;{const U=x?.search??e.search,ne=x?._strictSearch??void 0;try{const Z=yl(f.options.validateSearch,{...U})??void 0;y={...U,...Z},k={...ne,...Z},w=void 0}catch(Z){let X=Z;if(Z instanceof Cl||(X=new Cl(Z.message,{cause:Z})),t?.throwOnError)throw X;y=U,k={},w=X}}const j=f.options.loaderDeps?.({search:y})??"",N=j?JSON.stringify(j):"",{interpolatedPath:S,usedParams:T}=V0({path:f.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),A=f.id+S+N,q=this.getMatch(A),R=p.get(f.id),M=q?._strictParams??T;let L;if(!q)try{rm(f,M)}catch(U){if(Nt(U)||qt(U)?L=U:L=new Q5(U.message,{cause:U}),t?.throwOnError)throw L}Object.assign(o,M);const B=R?"stay":"enter";let z;if(q)z={...q,cause:B,params:R?.params??o,_strictParams:M,search:lr(R?R.search:q.search,y),_strictSearch:k};else{const U=f.options.loader||f.options.beforeLoad||f.lazyFn||p2(f)?"pending":"success";z={id:A,ssr:f.options.ssr,index:m,routeId:f.id,params:R?.params??o,_strictParams:M,pathname:S,updatedAt:Date.now(),search:R?lr(R.search,y):y,_strictSearch:k,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:li()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:B,loaderDeps:R?Is(R.loaderDeps,j):j,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:f.options.staticData||{},fullPath:f.fullPath}}t?.preload||(z.globalNotFound=u===f.id),z.searchError=w;const O=this.getParentContext(x);z.context={...O,...z.__routeContext,...z.__beforeLoadContext},h[m]=z}for(let m=0;m<h.length;m++){const f=h[m],x=this.looseRoutesById[f.routeId],y=this.getMatch(f.id),k=p.get(f.routeId);if(f.params=k?lr(k.params,o):o,!y){const w=h[m-1],j=this.getParentContext(w);if(x.options.context){const N={deps:f.loaderDeps,params:f.params,context:j??{},location:e,navigate:S=>this.navigate({...S,_fromLocation:e}),buildLocation:this.buildLocation,cause:f.cause,abortController:f.abortController,preload:!!f.preload,matches:h,routeId:x.id};f.__routeContext=x.options.context(N)??void 0}f.context={...j,...f.__routeContext,...f.__beforeLoadContext}}}return h}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:s}=this.getMatchedRoutes(e.pathname),i=wa(t),o={...e.search};for(const p of t)try{Object.assign(o,yl(p.options.validateSearch,o))}catch{}const l=wa(this.stores.matchesId.get()),c=l&&this.stores.matchStores.get(l)?.get(),u=c&&c.routeId===i.id&&c.pathname===e.pathname;let h;if(u)h=c.params;else{const p=Object.assign(Object.create(null),s);for(const m of t)try{rm(m,p)}catch{}h=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:h}}},Cl=class extends Error{},Q5=class extends Error{};function G5(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function yl(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new Cl("Async validation not supported");if(s.issues)throw new Cl(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Y5({pathname:e,routesById:t,processedTree:s}){const i=Object.create(null),o=ts(e);let l;const c=f5(o,s,!0);return c&&(l=c.route,Object.assign(i,c.rawParams)),{matchedRoutes:c?.branch||[t.__root__],routeParams:i,foundRoute:l}}function Z5({search:e,dest:t,destRoutes:s,_includeValidateSearch:i}){return X5(s)(e,t,i??!1)}function X5(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:c,next:u})=>{let h=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(h=o.options.preSearchFilters.reduce((m,f)=>f(m),c));const p=u(h);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((m,f)=>f(m),p):p};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:u})=>{const h=u(c);if(!t._includeValidateSearch)return h;try{return{...h,...yl(o.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(l)}}const s=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:As(l.search,o):{}};t.middlewares.push(s);const i=(o,l,c)=>{if(o>=c.length)return l;const u=c[o];return u({search:l,next:p=>i(o+1,p,c)})};return function(l,c,u){return t.dest=c,t._includeValidateSearch=u,i(0,l,t.middlewares)}}function J5(e,t){if(e!=="root")for(let s=t.length-1;s>=0;s--){const i=t[s];if(i.children)return i.id}return pr}function rm(e,t){const s=e.options.params?.parse??e.options.parseParams;if(s){const i=s(t);if(i===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,i)}}const e6="Error preloading route! ☝️";var f2=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const s=this.options,i=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=pr:this.parentRoute||ns();let o=i?pr:s?.path;o&&o!=="/"&&(o=o2(o));const l=s?.id||o;let c=i?pr:ml([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);o==="__root__"&&(o="/"),c!=="__root__"&&(c=ml(["/",c]));const u=c==="__root__"?"/":ml([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=u,this._to=ts(u)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Vl({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},t6=class extends f2{constructor(e){super(e)}};function n6(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),s=t.state.__hashScrollIntoViewOptions??!0;if(s&&t.hash!==""){const i=document.getElementById(t.hash);i&&i.scrollIntoView(s)}}}function $h(e){const t=e.errorComponent??Oh;return n.jsx(s6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:i})=>s?E.createElement(t,{error:s,reset:i}):e.children})}var s6=class extends E.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const s=e.getResetKey();return t.error&&t.resetKey!==s?{resetKey:s,error:null}:{resetKey:s}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Oh({error:e}){const[t,s]=E.useState(!1);return n.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[n.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),n.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(i=>!i),children:t?"Hide Error":"Show Error"})]}),n.jsx("div",{style:{height:".25rem"}}),t?n.jsx("div",{children:n.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?n.jsx("code",{children:e.message}):null})}):null]})}function r6({children:e,fallback:t=null}){return m2()?n.jsx(xa.Fragment,{children:e}):n.jsx(xa.Fragment,{children:t})}function m2(){return xa.useSyncExternalStore(i6,()=>!0,()=>!1)}function i6(){return()=>{}}var g2=E.createContext(null);function rn(e){return E.useContext(g2)}var Ql=E.createContext(void 0),a6=E.createContext(void 0),Ze=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Ze||{});function o6({update:e,notify:t,unwatched:s}){return{link:i,unlink:o,propagate:l,checkDirty:c,shallowPropagate:u};function i(p,m,f){const x=m.depsTail;if(x!==void 0&&x.dep===p)return;const y=x!==void 0?x.nextDep:m.deps;if(y!==void 0&&y.dep===p){y.version=f,m.depsTail=y;return}const k=p.subsTail;if(k!==void 0&&k.version===f&&k.sub===m)return;const w=m.depsTail=p.subsTail={version:f,dep:p,sub:m,prevDep:x,nextDep:y,prevSub:k,nextSub:void 0};y!==void 0&&(y.prevDep=w),x!==void 0?x.nextDep=w:m.deps=w,k!==void 0?k.nextSub=w:p.subs=w}function o(p,m=p.sub){const f=p.dep,x=p.prevDep,y=p.nextDep,k=p.nextSub,w=p.prevSub;return y!==void 0?y.prevDep=x:m.depsTail=x,x!==void 0?x.nextDep=y:m.deps=y,k!==void 0?k.prevSub=w:f.subsTail=w,w!==void 0?w.nextSub=k:(f.subs=k)===void 0&&s(f),y}function l(p){let m=p.nextSub,f;e:do{const x=p.sub;let y=x.flags;if(y&60?y&12?y&4?!(y&48)&&h(p,x)?(x.flags=y|40,y&=1):y=0:x.flags=y&-9|32:y=0:x.flags=y|32,y&2&&t(x),y&1){const k=x.subs;if(k!==void 0){const w=(p=k).nextSub;w!==void 0&&(f={value:m,prev:f},m=w);continue}}if((p=m)!==void 0){m=p.nextSub;continue}for(;f!==void 0;)if(p=f.value,f=f.prev,p!==void 0){m=p.nextSub;continue e}break}while(!0)}function c(p,m){let f,x=0,y=!1;e:do{const k=p.dep,w=k.flags;if(m.flags&16)y=!0;else if((w&17)===17){if(e(k)){const j=k.subs;j.nextSub!==void 0&&u(j),y=!0}}else if((w&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(f={value:p,prev:f}),p=k.deps,m=k,++x;continue}if(!y){const j=p.nextDep;if(j!==void 0){p=j;continue}}for(;x--;){const j=m.subs,N=j.nextSub!==void 0;if(N?(p=f.value,f=f.prev):p=j,y){if(e(m)){N&&u(j),m=p.sub;continue}y=!1}else m.flags&=-33;m=p.sub;const S=p.nextDep;if(S!==void 0){p=S;continue e}}return y}while(!0)}function u(p){do{const m=p.sub,f=m.flags;(f&48)===32&&(m.flags=f|16,(f&6)===2&&t(m))}while((p=p.nextSub)!==void 0)}function h(p,m){let f=m.depsTail;for(;f!==void 0;){if(f===p)return!0;f=f.prevDep}return!1}}function l6(e,t,s){const i=typeof e=="object",o=i?e:void 0;return{next:(i?e.next:e)?.bind(o),error:(i?e.error:t)?.bind(o),complete:(i?e.complete:s)?.bind(o)}}const Xd=[];let xl=0;const{link:im,unlink:c6,propagate:u6,checkDirty:y2,shallowPropagate:am}=o6({update(e){return e._update()},notify(e){Xd[Jd++]=e,e.flags&=~Ze.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ze.Mutable|Ze.Dirty,El(e))}});let sl=0,Jd=0,Bn,eh=0;function x2(e){try{++eh,e()}finally{--eh||v2()}}function El(e){const t=e.depsTail;let s=t!==void 0?t.nextDep:e.deps;for(;s!==void 0;)s=c6(s,e)}function v2(){if(!(eh>0)){for(;sl<Jd;){const e=Xd[sl];Xd[sl++]=void 0,e.notify()}sl=0,Jd=0}}function om(e,t){const s=typeof e=="function",i=e,o={_snapshot:s?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?Ze.None:Ze.Mutable,get(){return Bn!==void 0&&im(o,Bn,xl),o._snapshot},subscribe(l){const c=l6(l),u={current:!1},h=d6(()=>{o.get(),u.current?c.next?.(o._snapshot):u.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(l){const c=Bn,u=t?.compare??Object.is;if(s)Bn=o,++xl,o.depsTail=void 0;else if(l===void 0)return!1;s&&(o.flags=Ze.Mutable|Ze.RecursedCheck);try{const h=o._snapshot,p=typeof l=="function"?l(h):l===void 0&&s?i(h):l;return h===void 0||!u(h,p)?(o._snapshot=p,!0):!1}finally{Bn=c,s&&(o.flags&=~Ze.RecursedCheck),El(o)}}};return s?(o.flags=Ze.Mutable|Ze.Dirty,o.get=function(){const l=o.flags;if(l&Ze.Dirty||l&Ze.Pending&&y2(o.deps,o)){if(o._update()){const c=o.subs;c!==void 0&&am(c)}}else l&Ze.Pending&&(o.flags=l&~Ze.Pending);return Bn!==void 0&&im(o,Bn,xl),o._snapshot}):o.set=function(l){if(o._update(l)){const c=o.subs;c!==void 0&&(u6(c),am(c),v2())}},o}function d6(e){const t=()=>{const i=Bn;Bn=s,++xl,s.depsTail=void 0,s.flags=Ze.Watching|Ze.RecursedCheck;try{return e()}finally{Bn=i,s.flags&=~Ze.RecursedCheck,El(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ze.Watching|Ze.RecursedCheck,notify(){const i=this.flags;i&Ze.Dirty||i&Ze.Pending&&y2(this.deps,this)?t():this.flags=Ze.Watching},stop(){this.flags=Ze.None,this.depsTail=void 0,El(this)}};return t(),s}var ud={exports:{}},dd={},hd={exports:{}},pd={};/**
41
- * @license React
42
- * use-sync-external-store-shim.production.js
43
- *
44
- * Copyright (c) Meta Platforms, Inc. and affiliates.
45
- *
46
- * This source code is licensed under the MIT license found in the
47
- * LICENSE file in the root directory of this source tree.
48
- */var lm;function h6(){if(lm)return pd;lm=1;var e=Aa();function t(f,x){return f===x&&(f!==0||1/f===1/x)||f!==f&&x!==x}var s=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue;function u(f,x){var y=x(),k=i({inst:{value:y,getSnapshot:x}}),w=k[0].inst,j=k[1];return l(function(){w.value=y,w.getSnapshot=x,h(w)&&j({inst:w})},[f,y,x]),o(function(){return h(w)&&j({inst:w}),f(function(){h(w)&&j({inst:w})})},[f]),c(y),y}function h(f){var x=f.getSnapshot;f=f.value;try{var y=x();return!s(f,y)}catch{return!0}}function p(f,x){return x()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:u;return pd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,pd}var cm;function p6(){return cm||(cm=1,hd.exports=h6()),hd.exports}/**
49
- * @license React
50
- * use-sync-external-store-shim/with-selector.production.js
51
- *
52
- * Copyright (c) Meta Platforms, Inc. and affiliates.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */var um;function f6(){if(um)return dd;um=1;var e=Aa(),t=p6();function s(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var i=typeof Object.is=="function"?Object.is:s,o=t.useSyncExternalStore,l=e.useRef,c=e.useEffect,u=e.useMemo,h=e.useDebugValue;return dd.useSyncExternalStoreWithSelector=function(p,m,f,x,y){var k=l(null);if(k.current===null){var w={hasValue:!1,value:null};k.current=w}else w=k.current;k=u(function(){function N(R){if(!S){if(S=!0,T=R,R=x(R),y!==void 0&&w.hasValue){var M=w.value;if(y(M,R))return A=M}return A=R}if(M=A,i(T,R))return M;var L=x(R);return y!==void 0&&y(M,L)?(T=R,M):(T=R,A=L)}var S=!1,T,A,q=f===void 0?null:f;return[function(){return N(m())},q===null?void 0:function(){return N(q())}]},[m,f,x,y]);var j=o(p,k[0],k[1]);return c(function(){w.hasValue=!0,w.value=j},[j]),h(j),j},dd}var dm;function m6(){return dm||(dm=1,ud.exports=f6()),ud.exports}var g6=m6();function y6(e,t){return e===t}function Ut(e,t,s=y6){const i=E.useCallback(c=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(c);return u},[e]),o=E.useCallback(()=>e?.get(),[e]);return g6.useSyncExternalStoreWithSelector(i,o,o,t,s)}var x6={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function br(e){const t=rn(),s=E.useContext(e.from?a6:Ql),i=e.from??s,o=i?e.from?t.stores.getRouteMatchStore(i):t.stores.matchStores.get(i):void 0,l=E.useRef(void 0);return Ut(o??x6,c=>{if((e.shouldThrow??!0)&&!c&&ns(),c===void 0)return;const u=e.select?e.select(c):c;if(e.structuralSharing??t.options.defaultStructuralSharing){const h=Is(l.current,u);return l.current=h,h}return u})}function k2(e){return br({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function w2(e){const{select:t,...s}=e;return br({...s,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function Dh(e){return br({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const s=e.strict===!1?t.params:t._strictParams;return e.select?e.select(s):s}})}function Ia(e){return br({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Hs(e){const t=rn();return E.useCallback(s=>t.navigate({...s,from:s.from??e?.from}),[e?.from,t])}function b2(e){return br({...e,select:t=>e.select?e.select(t.context):t.context})}var j2=Ug();function v6(e,t){const s=rn(),i=s5(t),{activeProps:o,inactiveProps:l,activeOptions:c,to:u,preload:h,preloadDelay:p,preloadIntentProximity:m,hashScrollIntoView:f,replace:x,startTransition:y,resetScroll:k,viewTransition:w,children:j,target:N,disabled:S,style:T,className:A,onClick:q,onBlur:R,onFocus:M,onMouseEnter:L,onMouseLeave:B,onTouchStart:z,ignoreBlocker:O,params:U,search:ne,hash:Z,state:X,mask:he,reloadDocument:ce,unsafeRelative:Q,from:se,_fromLocation:P,...$}=e,Y=m2(),I=E.useMemo(()=>e,[s,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),pe=Ut(s.stores.location,De=>De,(De,G)=>De.href===G.href),me=E.useMemo(()=>{const De={_fromLocation:pe,...I};return s.buildLocation(De)},[s,pe,I]),xe=me.maskedLocation?me.maskedLocation.publicHref:me.publicHref,Pe=me.maskedLocation?me.maskedLocation.external:me.external,Ee=E.useMemo(()=>S6(xe,Pe,s.history,S),[S,Pe,xe,s.history]),Ne=E.useMemo(()=>{if(Ee?.external)return jl(Ee.href,s.protocolAllowlist)?void 0:Ee.href;if(!C6(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),jl(u,s.protocolAllowlist)?void 0:u}catch{}},[u,Ee,s.protocolAllowlist]),Me=E.useMemo(()=>{if(Ne)return!1;if(c?.exact){if(!k5(pe.pathname,me.pathname,s.basepath))return!1}else{const De=Nl(pe.pathname,s.basepath),G=Nl(me.pathname,s.basepath);if(!(De.startsWith(G)&&(De.length===G.length||De[G.length]==="/")))return!1}return(c?.includeSearch??!0)&&!hr(pe.search,me.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?Y&&pe.hash===me.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,pe,Ne,Y,me.hash,me.pathname,me.search,s.basepath]),st=Me?As(o,{})??k6:fd,It=Me?fd:As(l,{})??fd,Ht=[A,st.className,It.className].filter(Boolean).join(" "),Ln=(T||st.style||It.style)&&{...T,...st.style,...It.style},[Lt,kn]=E.useState(!1),ln=E.useRef(!1),Vt=e.reloadDocument||Ne?!1:h??s.options.defaultPreload,_t=p??s.options.defaultPreloadDelay??0,ht=E.useCallback(()=>{s.preloadRoute({...I,_builtLocation:me}).catch(De=>{console.warn(De),console.warn(e6)})},[s,I,me]);n5(i,E.useCallback(De=>{De?.isIntersecting&&ht()},[ht]),N6,{disabled:!!S||Vt!=="viewport"}),E.useEffect(()=>{ln.current||!S&&Vt==="render"&&(ht(),ln.current=!0)},[S,ht,Vt]);const cn=De=>{const G=De.currentTarget.getAttribute("target"),ie=N!==void 0?N:G;if(!S&&!E6(De)&&!De.defaultPrevented&&(!ie||ie==="_self")&&De.button===0){De.preventDefault(),j2.flushSync(()=>{kn(!0)});const V=s.subscribe("onResolved",()=>{V(),kn(!1)});s.navigate({...I,replace:x,resetScroll:k,hashScrollIntoView:f,startTransition:y,viewTransition:w,ignoreBlocker:O})}};if(Ne)return{...$,ref:i,href:Ne,...j&&{children:j},...N&&{target:N},...S&&{disabled:S},...T&&{style:T},...A&&{className:A},...q&&{onClick:q},...R&&{onBlur:R},...M&&{onFocus:M},...L&&{onMouseEnter:L},...B&&{onMouseLeave:B},...z&&{onTouchStart:z}};const wn=De=>{if(S||Vt!=="intent")return;if(!_t){ht();return}const G=De.currentTarget;if(ia.has(G))return;const ie=setTimeout(()=>{ia.delete(G),ht()},_t);ia.set(G,ie)},ls=De=>{S||Vt!=="intent"||ht()},Hn=De=>{if(S||!Vt||!_t)return;const G=De.currentTarget,ie=ia.get(G);ie&&(clearTimeout(ie),ia.delete(G))};return{...$,...st,...It,href:Ee?.href,ref:i,onClick:Xr([q,cn]),onBlur:Xr([R,Hn]),onFocus:Xr([M,wn]),onMouseEnter:Xr([L,wn]),onMouseLeave:Xr([B,Hn]),onTouchStart:Xr([z,ls]),disabled:!!S,target:N,...Ln&&{style:Ln},...Ht&&{className:Ht},...S&&w6,...Me&&b6,...Y&&Lt&&j6}}var fd={},k6={className:"active"},w6={role:"link","aria-disabled":!0},b6={"data-status":"active","aria-current":"page"},j6={"data-transitioning":"transitioning"},ia=new WeakMap,N6={rootMargin:"100px"},Xr=e=>t=>{for(const s of e)if(s){if(t.defaultPrevented)return;s(t)}};function S6(e,t,s,i){if(!i)return t?{href:e,external:!0}:{href:s.createHref(e)||"/",external:!1}}function C6(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ge=E.forwardRef((e,t)=>{const{_asChild:s,...i}=e,{type:o,...l}=v6(i,t),c=typeof i.children=="function"?i.children({isActive:l["data-status"]==="active"}):i.children;if(!s){const{disabled:u,...h}=l;return E.createElement("a",h,c)}return E.createElement(s,l,c)});function E6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var T6=class extends f2{constructor(e){super(e),this.useMatch=t=>br({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>b2({...t,from:this.id}),this.useSearch=t=>Ia({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dh({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>w2({...t,from:this.id}),this.useLoaderData=t=>k2({...t,from:this.id}),this.useNavigate=()=>Hs({from:this.fullPath}),this.Link=xa.forwardRef((t,s)=>n.jsx(Ge,{ref:s,from:this.fullPath,...t}))}};function vn(e){return new T6(e)}var P6=class extends t6{constructor(e){super(e),this.useMatch=t=>br({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>b2({...t,from:this.id}),this.useSearch=t=>Ia({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Dh({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>w2({...t,from:this.id}),this.useLoaderData=t=>k2({...t,from:this.id}),this.useNavigate=()=>Hs({from:this.fullPath}),this.Link=xa.forwardRef((t,s)=>n.jsx(Ge,{ref:s,from:this.fullPath,...t}))}};function R6(e){return new P6(e)}function A6(e){const t=rn(),s=`not-found-${Ut(t.stores.location,i=>i.pathname)}-${Ut(t.stores.status,i=>i)}`;return n.jsx($h,{getResetKey:()=>s,onCatch:(i,o)=>{if(Nt(i))e.onCatch?.(i,o);else throw i},errorComponent:({error:i})=>{if(Nt(i))return e.fallback?.(i);throw i},children:e.children})}function I6(){return n.jsx("p",{children:"Not Found"})}function si(e){return n.jsx(n.Fragment,{children:e.children})}function N2(e,t,s){return t.options.notFoundComponent?n.jsx(t.options.notFoundComponent,{...s}):e.options.defaultNotFoundComponent?n.jsx(e.options.defaultNotFoundComponent,{...s}):n.jsx(I6,{})}function L6(e){return null}function _6(){return L6(rn()),null}var S2=E.memo(function({matchId:t}){const s=rn(),i=s.stores.matchStores.get(t);i||ns();const o=Ut(s.stores.loadedAt,c=>c),l=Ut(i,c=>c);return n.jsx(z6,{router:s,matchId:t,resetKey:o,matchState:E.useMemo(()=>{const c=l.routeId,u=s.routesById[c].parentRoute?.id;return{routeId:c,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:u}},[l._displayPending,l.routeId,l.ssr,s.routesById])})});function z6({router:e,matchId:t,resetKey:s,matchState:i}){const o=e.routesById[i.routeId],l=o.options.pendingComponent??e.options.defaultPendingComponent,c=l?n.jsx(l,{}):null,u=o.options.errorComponent??e.options.defaultErrorComponent,h=o.options.onCatch??e.options.defaultOnCatch,p=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,m=i.ssr===!1||i.ssr==="data-only",f=(!o.isRoot||o.options.wrapInSuspense||m)&&(o.options.wrapInSuspense??l??(o.options.errorComponent?.preload||m))?E.Suspense:si,x=u?$h:si,y=p?A6:si;return n.jsxs(o.isRoot?o.options.shellComponent??si:si,{children:[n.jsx(Ql.Provider,{value:t,children:n.jsx(f,{fallback:c,children:n.jsx(x,{getResetKey:()=>s,errorComponent:u||Oh,onCatch:(k,w)=>{if(Nt(k))throw k.routeId??=i.routeId,k;h?.(k,w)},children:n.jsx(y,{fallback:k=>{if(k.routeId??=i.routeId,!p||k.routeId&&k.routeId!==i.routeId||!k.routeId&&!o.isRoot)throw k;return E.createElement(p,k)},children:m||i._displayPending?n.jsx(r6,{fallback:c,children:n.jsx(hm,{matchId:t})}):n.jsx(hm,{matchId:t})})})})}),i.parentRouteId===pr?n.jsxs(n.Fragment,{children:[n.jsx(M6,{resetKey:s}),e.options.scrollRestoration&&e2?n.jsx(_6,{}):null]}):null]})}function M6({resetKey:e}){const t=rn(),s=E.useRef(void 0);return ha(()=>{const i=t.latestLocation.href;(s.current===void 0||s.current!==i)&&(t.emit({type:"onRendered",...ii(t.stores.location.get(),t.stores.resolvedLocation.get())}),s.current=i)},[t.latestLocation.state.__TSR_key,e,t]),null}var hm=E.memo(function({matchId:t}){const s=rn(),i=(m,f)=>s.getMatch(m.id)?._nonReactive[f]??m._nonReactive[f],o=s.stores.matchStores.get(t);o||ns();const l=Ut(o,m=>m),c=l.routeId,u=s.routesById[c],h=E.useMemo(()=>{const m=(s.routesById[c].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:c,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch});return m?JSON.stringify(m):void 0},[c,l.loaderDeps,l._strictParams,l._strictSearch,s.options.defaultRemountDeps,s.routesById]),p=E.useMemo(()=>{const m=u.options.component??s.options.defaultComponent;return m?n.jsx(m,{},h):n.jsx(th,{})},[h,u.options.component,s.options.defaultComponent]);if(l._displayPending)throw i(l,"displayPendingPromise");if(l._forcePending)throw i(l,"minPendingPromise");if(l.status==="pending"){const m=u.options.pendingMinMs??s.options.defaultPendingMinMs;if(m){const f=s.getMatch(l.id);if(f&&!f._nonReactive.minPendingPromise){const x=li();f._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),f._nonReactive.minPendingPromise=void 0},m)}}throw i(l,"loadPromise")}if(l.status==="notFound")return Nt(l.error)||ns(),N2(s,u,l.error);if(l.status==="redirected")throw qt(l.error)||ns(),i(l,"loadPromise");if(l.status==="error")throw l.error;return p}),th=E.memo(function(){const t=rn(),s=E.useContext(Ql);let i,o=!1,l;{const p=s?t.stores.matchStores.get(s):void 0;[i,o]=Ut(p,m=>[m?.routeId,m?.globalNotFound??!1]),l=Ut(t.stores.matchesId,m=>m[m.findIndex(f=>f===s)+1])}const c=i?t.routesById[i]:void 0,u=t.options.defaultPendingComponent?n.jsx(t.options.defaultPendingComponent,{}):null;if(o)return c||ns(),N2(t,c,void 0);if(!l)return null;const h=n.jsx(S2,{matchId:l});return i===pr?n.jsx(E.Suspense,{fallback:u,children:h}):h});function F6(){const e=rn(),t=E.useRef({router:e,mounted:!1}),[s,i]=E.useState(!1),o=Ut(e.stores.isLoading,f=>f),l=Ut(e.stores.hasPending,f=>f),c=sd(o),u=o||s||l,h=sd(u),p=o||l,m=sd(p);return e.startTransition=f=>{i(!0),E.startTransition(()=>{f(),i(!1)})},E.useEffect(()=>{const f=e.history.subscribe(e.load),x=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ts(e.latestLocation.publicHref)!==ts(x.publicHref)&&e.commitLocation({...x,replace:!0}),()=>{f()}},[e,e.history]),ha(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(x){console.error(x)}})()},[e]),ha(()=>{c&&!o&&e.emit({type:"onLoad",...ii(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,o]),ha(()=>{m&&!p&&e.emit({type:"onBeforeRouteMount",...ii(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,m,e]),ha(()=>{if(h&&!u){const f=ii(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...f}),x2(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),f.hrefChanged&&n6(e)}},[u,h,e]),null}function $6(){const e=rn(),t=e.routesById[pr].options.pendingComponent??e.options.defaultPendingComponent,s=t?n.jsx(t,{}):null,i=n.jsxs(typeof document<"u"&&e.ssr?si:E.Suspense,{fallback:s,children:[n.jsx(F6,{}),n.jsx(O6,{})]});return e.options.InnerWrap?n.jsx(e.options.InnerWrap,{children:i}):i}function O6(){const e=rn(),t=Ut(e.stores.firstId,o=>o),s=Ut(e.stores.loadedAt,o=>o),i=t?n.jsx(S2,{matchId:t}):null;return n.jsx(Ql.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:n.jsx($h,{getResetKey:()=>s,errorComponent:Oh,onCatch:void 0,children:i})})}var D6=e=>({createMutableStore:om,createReadonlyStore:om,batch:x2}),B6=e=>new q6(e),q6=class extends K5{constructor(e){super(e,D6)}};function U6({router:e,children:t,...s}){n2(s)&&e.update({...e.options,...s,context:{...e.options.context,...s.context}});const i=n.jsx(g2.Provider,{value:e,children:t});return e.options.Wrap?n.jsx(e.options.Wrap,{children:i}):i}function W6({router:e,...t}){return n.jsx(U6,{router:e,...t,children:n.jsx($6,{})})}function C2(e){const t=rn({warn:e?.router===void 0}),s=e?.router||t,i=E.useRef(void 0);return Ut(s.stores.__store,o=>{if(e?.select){if(e.structuralSharing??s.options.defaultStructuralSharing){const l=Is(i.current,e.select(o));return i.current=l,l}return e.select(o)}return o})}const ci="squad.console.token",xr=(()=>{const e=/^\/p\/([^/]+)/.exec(window.location.pathname);return e?decodeURIComponent(e[1]):null})(),nh=xr?`/p/${encodeURIComponent(xr)}`:"";function Gl(e){return!nh||!e.startsWith("/api/")||e.startsWith("/api/v1/app/")?e:nh+e}function H6(){const e=new URL(window.location.href),t=e.searchParams.get("t");return t?(sessionStorage.setItem(ci,t),e.searchParams.delete("t"),window.history.replaceState({},"",e.toString()),t):sessionStorage.getItem(ci)}class Tl extends Error{constructor(){super("Session token missing or invalid. Reopen squad console."),this.name="UnauthorizedError"}}class E2 extends Error{constructor(t,s){super(t),this.status=s,this.name="ApiError"}}function V6(e){return e instanceof Error&&(e.message===T2||e instanceof E2&&e.status>=500)}const T2="squad-kit did not answer, so nothing changed. Check that it still runs in its terminal, then try again.";async function P2(e,t){try{return await fetch(e,t)}catch{throw new Error(T2)}}async function ze(e,t){const s=sessionStorage.getItem(ci);if(!s)throw new Tl;const i=await P2(Gl(e),{...t,headers:{"content-type":"application/json",authorization:`Bearer ${s}`}});if(i.status===401)throw new Tl;if(!i.ok){const o=await K6(i);throw new Error(`${i.status} ${i.statusText}: ${o}`)}return await i.json()}async function K6(e){try{return(await e.text()).slice(0,400)}catch{return""}}async function St(e,t,s={}){const i=sessionStorage.getItem(ci);if(!i)throw new Tl;const o=await P2(Gl(e),{method:t,headers:{"content-type":"application/json",authorization:`Bearer ${i}`},body:JSON.stringify(s)});if(o.status===401)throw new Tl;const l=await o.json().catch(()=>({}));if(!o.ok)throw new E2(l.error??`${o.status} ${o.statusText}`,o.status);return l}function nn(e,t){const s=sessionStorage.getItem(ci)??"";return`${Gl(`/api/v1/tickets/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(t.replace(/^file:\/\//,""))}&t=${encodeURIComponent(s)}`}function zs(e){const t=sessionStorage.getItem(ci)??"";return`${Gl(e)}?t=${encodeURIComponent(t)}`}/**
57
- * @license lucide-react v0.460.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const Q6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),R2=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/**
62
- * @license lucide-react v0.460.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */var G6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
67
- * @license lucide-react v0.460.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const Y6=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:c,...u},h)=>E.createElement("svg",{ref:h,...G6,width:t,height:t,stroke:e,strokeWidth:i?Number(s)*24/Number(t):s,className:R2("lucide",o),...u},[...c.map(([p,m])=>E.createElement(p,m)),...Array.isArray(l)?l:[l]]));/**
72
- * @license lucide-react v0.460.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const le=(e,t)=>{const s=E.forwardRef(({className:i,...o},l)=>E.createElement(Y6,{ref:l,iconNode:t,className:R2(`lucide-${Q6(e)}`,i),...o}));return s.displayName=`${e}`,s};/**
77
- * @license lucide-react v0.460.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const A2=le("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
82
- * @license lucide-react v0.460.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const Pl=le("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
87
- * @license lucide-react v0.460.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const Z6=le("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
92
- * @license lucide-react v0.460.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const Rl=le("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/**
97
- * @license lucide-react v0.460.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const X6=le("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
102
- * @license lucide-react v0.460.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const Ds=le("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
107
- * @license lucide-react v0.460.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const J6=le("BellRing",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]]);/**
112
- * @license lucide-react v0.460.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const I2=le("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
117
- * @license lucide-react v0.460.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const rs=le("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
122
- * @license lucide-react v0.460.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const Ce=le("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
127
- * @license lucide-react v0.460.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const L2=le("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
132
- * @license lucide-react v0.460.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const Bh=le("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
137
- * @license lucide-react v0.460.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const ek=le("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
142
- * @license lucide-react v0.460.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const _2=le("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
147
- * @license lucide-react v0.460.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const z2=le("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
152
- * @license lucide-react v0.460.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const La=le("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
157
- * @license lucide-react v0.460.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const tk=le("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
162
- * @license lucide-react v0.460.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const Vs=le("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
167
- * @license lucide-react v0.460.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */const nk=le("CornerLeftUp",[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
172
- * @license lucide-react v0.460.0 - ISC
173
- *
174
- * This source code is licensed under the ISC license.
175
- * See the LICENSE file in the root directory of this source tree.
176
- */const is=le("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
177
- * @license lucide-react v0.460.0 - ISC
178
- *
179
- * This source code is licensed under the ISC license.
180
- * See the LICENSE file in the root directory of this source tree.
181
- */const sk=le("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
182
- * @license lucide-react v0.460.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */const mr=le("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
187
- * @license lucide-react v0.460.0 - ISC
188
- *
189
- * This source code is licensed under the ISC license.
190
- * See the LICENSE file in the root directory of this source tree.
191
- */const rk=le("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
192
- * @license lucide-react v0.460.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */const M2=le("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
197
- * @license lucide-react v0.460.0 - ISC
198
- *
199
- * This source code is licensed under the ISC license.
200
- * See the LICENSE file in the root directory of this source tree.
201
- */const ik=le("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
202
- * @license lucide-react v0.460.0 - ISC
203
- *
204
- * This source code is licensed under the ISC license.
205
- * See the LICENSE file in the root directory of this source tree.
206
- */const ak=le("FolderCheck",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);/**
207
- * @license lucide-react v0.460.0 - ISC
208
- *
209
- * This source code is licensed under the ISC license.
210
- * See the LICENSE file in the root directory of this source tree.
211
- */const ok=le("FolderGit2",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);/**
212
- * @license lucide-react v0.460.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */const F2=le("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
217
- * @license lucide-react v0.460.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- */const lk=le("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
222
- * @license lucide-react v0.460.0 - ISC
223
- *
224
- * This source code is licensed under the ISC license.
225
- * See the LICENSE file in the root directory of this source tree.
226
- */const ck=le("GitPullRequest",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]);/**
227
- * @license lucide-react v0.460.0 - ISC
228
- *
229
- * This source code is licensed under the ISC license.
230
- * See the LICENSE file in the root directory of this source tree.
231
- */const uk=le("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
232
- * @license lucide-react v0.460.0 - ISC
233
- *
234
- * This source code is licensed under the ISC license.
235
- * See the LICENSE file in the root directory of this source tree.
236
- */const dk=le("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
237
- * @license lucide-react v0.460.0 - ISC
238
- *
239
- * This source code is licensed under the ISC license.
240
- * See the LICENSE file in the root directory of this source tree.
241
- */const hk=le("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
242
- * @license lucide-react v0.460.0 - ISC
243
- *
244
- * This source code is licensed under the ISC license.
245
- * See the LICENSE file in the root directory of this source tree.
246
- */const pk=le("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
247
- * @license lucide-react v0.460.0 - ISC
248
- *
249
- * This source code is licensed under the ISC license.
250
- * See the LICENSE file in the root directory of this source tree.
251
- */const fk=le("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
252
- * @license lucide-react v0.460.0 - ISC
253
- *
254
- * This source code is licensed under the ISC license.
255
- * See the LICENSE file in the root directory of this source tree.
256
- */const qh=le("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
257
- * @license lucide-react v0.460.0 - ISC
258
- *
259
- * This source code is licensed under the ISC license.
260
- * See the LICENSE file in the root directory of this source tree.
261
- */const mk=le("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
262
- * @license lucide-react v0.460.0 - ISC
263
- *
264
- * This source code is licensed under the ISC license.
265
- * See the LICENSE file in the root directory of this source tree.
266
- */const gk=le("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
267
- * @license lucide-react v0.460.0 - ISC
268
- *
269
- * This source code is licensed under the ISC license.
270
- * See the LICENSE file in the root directory of this source tree.
271
- */const yk=le("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
272
- * @license lucide-react v0.460.0 - ISC
273
- *
274
- * This source code is licensed under the ISC license.
275
- * See the LICENSE file in the root directory of this source tree.
276
- */const In=le("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
277
- * @license lucide-react v0.460.0 - ISC
278
- *
279
- * This source code is licensed under the ISC license.
280
- * See the LICENSE file in the root directory of this source tree.
281
- */const xk=le("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
282
- * @license lucide-react v0.460.0 - ISC
283
- *
284
- * This source code is licensed under the ISC license.
285
- * See the LICENSE file in the root directory of this source tree.
286
- */const Uh=le("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
287
- * @license lucide-react v0.460.0 - ISC
288
- *
289
- * This source code is licensed under the ISC license.
290
- * See the LICENSE file in the root directory of this source tree.
291
- */const vk=le("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
292
- * @license lucide-react v0.460.0 - ISC
293
- *
294
- * This source code is licensed under the ISC license.
295
- * See the LICENSE file in the root directory of this source tree.
296
- */const _a=le("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
297
- * @license lucide-react v0.460.0 - ISC
298
- *
299
- * This source code is licensed under the ISC license.
300
- * See the LICENSE file in the root directory of this source tree.
301
- */const pm=le("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
302
- * @license lucide-react v0.460.0 - ISC
303
- *
304
- * This source code is licensed under the ISC license.
305
- * See the LICENSE file in the root directory of this source tree.
306
- */const kk=le("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
307
- * @license lucide-react v0.460.0 - ISC
308
- *
309
- * This source code is licensed under the ISC license.
310
- * See the LICENSE file in the root directory of this source tree.
311
- */const fm=le("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
312
- * @license lucide-react v0.460.0 - ISC
313
- *
314
- * This source code is licensed under the ISC license.
315
- * See the LICENSE file in the root directory of this source tree.
316
- */const wk=le("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
317
- * @license lucide-react v0.460.0 - ISC
318
- *
319
- * This source code is licensed under the ISC license.
320
- * See the LICENSE file in the root directory of this source tree.
321
- */const Yl=le("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
322
- * @license lucide-react v0.460.0 - ISC
323
- *
324
- * This source code is licensed under the ISC license.
325
- * See the LICENSE file in the root directory of this source tree.
326
- */const Zl=le("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
327
- * @license lucide-react v0.460.0 - ISC
328
- *
329
- * This source code is licensed under the ISC license.
330
- * See the LICENSE file in the root directory of this source tree.
331
- */const bk=le("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
332
- * @license lucide-react v0.460.0 - ISC
333
- *
334
- * This source code is licensed under the ISC license.
335
- * See the LICENSE file in the root directory of this source tree.
336
- */const Al=le("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
337
- * @license lucide-react v0.460.0 - ISC
338
- *
339
- * This source code is licensed under the ISC license.
340
- * See the LICENSE file in the root directory of this source tree.
341
- */const $2=le("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
342
- * @license lucide-react v0.460.0 - ISC
343
- *
344
- * This source code is licensed under the ISC license.
345
- * See the LICENSE file in the root directory of this source tree.
346
- */const Sa=le("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
347
- * @license lucide-react v0.460.0 - ISC
348
- *
349
- * This source code is licensed under the ISC license.
350
- * See the LICENSE file in the root directory of this source tree.
351
- */const vr=le("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]]);/**
352
- * @license lucide-react v0.460.0 - ISC
353
- *
354
- * This source code is licensed under the ISC license.
355
- * See the LICENSE file in the root directory of this source tree.
356
- */const sh=le("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
357
- * @license lucide-react v0.460.0 - ISC
358
- *
359
- * This source code is licensed under the ISC license.
360
- * See the LICENSE file in the root directory of this source tree.
361
- */const Wh=le("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
362
- * @license lucide-react v0.460.0 - ISC
363
- *
364
- * This source code is licensed under the ISC license.
365
- * See the LICENSE file in the root directory of this source tree.
366
- */const jk=le("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
367
- * @license lucide-react v0.460.0 - ISC
368
- *
369
- * This source code is licensed under the ISC license.
370
- * See the LICENSE file in the root directory of this source tree.
371
- */const Rn=le("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
372
- * @license lucide-react v0.460.0 - ISC
373
- *
374
- * This source code is licensed under the ISC license.
375
- * See the LICENSE file in the root directory of this source tree.
376
- */const Il=le("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
377
- * @license lucide-react v0.460.0 - ISC
378
- *
379
- * This source code is licensed under the ISC license.
380
- * See the LICENSE file in the root directory of this source tree.
381
- */const Nk=le("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
382
- * @license lucide-react v0.460.0 - ISC
383
- *
384
- * This source code is licensed under the ISC license.
385
- * See the LICENSE file in the root directory of this source tree.
386
- */const pa=le("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
387
- * @license lucide-react v0.460.0 - ISC
388
- *
389
- * This source code is licensed under the ISC license.
390
- * See the LICENSE file in the root directory of this source tree.
391
- */const Ca=le("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
392
- * @license lucide-react v0.460.0 - ISC
393
- *
394
- * This source code is licensed under the ISC license.
395
- * See the LICENSE file in the root directory of this source tree.
396
- */const fi=le("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
397
- * @license lucide-react v0.460.0 - ISC
398
- *
399
- * This source code is licensed under the ISC license.
400
- * See the LICENSE file in the root directory of this source tree.
401
- */const jr=le("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
402
- * @license lucide-react v0.460.0 - ISC
403
- *
404
- * This source code is licensed under the ISC license.
405
- * See the LICENSE file in the root directory of this source tree.
406
- */const Sk=le("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
407
- * @license lucide-react v0.460.0 - ISC
408
- *
409
- * This source code is licensed under the ISC license.
410
- * See the LICENSE file in the root directory of this source tree.
411
- */const Ck=le("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/**
412
- * @license lucide-react v0.460.0 - ISC
413
- *
414
- * This source code is licensed under the ISC license.
415
- * See the LICENSE file in the root directory of this source tree.
416
- */const md=le("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
417
- * @license lucide-react v0.460.0 - ISC
418
- *
419
- * This source code is licensed under the ISC license.
420
- * See the LICENSE file in the root directory of this source tree.
421
- */const O2=le("SquareCheck",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
422
- * @license lucide-react v0.460.0 - ISC
423
- *
424
- * This source code is licensed under the ISC license.
425
- * See the LICENSE file in the root directory of this source tree.
426
- */const mm=le("SquarePlus",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
427
- * @license lucide-react v0.460.0 - ISC
428
- *
429
- * This source code is licensed under the ISC license.
430
- * See the LICENSE file in the root directory of this source tree.
431
- */const ui=le("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
432
- * @license lucide-react v0.460.0 - ISC
433
- *
434
- * This source code is licensed under the ISC license.
435
- * See the LICENSE file in the root directory of this source tree.
436
- */const Xl=le("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
437
- * @license lucide-react v0.460.0 - ISC
438
- *
439
- * This source code is licensed under the ISC license.
440
- * See the LICENSE file in the root directory of this source tree.
441
- */const Ll=le("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
442
- * @license lucide-react v0.460.0 - ISC
443
- *
444
- * This source code is licensed under the ISC license.
445
- * See the LICENSE file in the root directory of this source tree.
446
- */const _l=le("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
447
- * @license lucide-react v0.460.0 - ISC
448
- *
449
- * This source code is licensed under the ISC license.
450
- * See the LICENSE file in the root directory of this source tree.
451
- */const za=le("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
452
- * @license lucide-react v0.460.0 - ISC
453
- *
454
- * This source code is licensed under the ISC license.
455
- * See the LICENSE file in the root directory of this source tree.
456
- */const Ek=le("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]);/**
457
- * @license lucide-react v0.460.0 - ISC
458
- *
459
- * This source code is licensed under the ISC license.
460
- * See the LICENSE file in the root directory of this source tree.
461
- */const D2=le("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
462
- * @license lucide-react v0.460.0 - ISC
463
- *
464
- * This source code is licensed under the ISC license.
465
- * See the LICENSE file in the root directory of this source tree.
466
- */const Tk=le("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
467
- * @license lucide-react v0.460.0 - ISC
468
- *
469
- * This source code is licensed under the ISC license.
470
- * See the LICENSE file in the root directory of this source tree.
471
- */const B2=le("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
472
- * @license lucide-react v0.460.0 - ISC
473
- *
474
- * This source code is licensed under the ISC license.
475
- * See the LICENSE file in the root directory of this source tree.
476
- */const rh=le("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
477
- * @license lucide-react v0.460.0 - ISC
478
- *
479
- * This source code is licensed under the ISC license.
480
- * See the LICENSE file in the root directory of this source tree.
481
- */const an=le("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Pk(e){return e==="err"?null:3200}function Rk(e,t){return t.kind==="err"&&e.some(s=>s.kind==="err"&&s.text===t.text)?e:[...e,t]}let q2=null;const ih=new Set;function gm(e){q2=e;for(const t of ih)t()}const Jl={open:(e={})=>gm(e),close:()=>gm(null)};function Ak(){return E.useSyncExternalStore(e=>(ih.add(e),()=>ih.delete(e)),()=>q2)}const U2=E.createContext(null);function W2(e){try{return localStorage.getItem(e)}catch{return null}}function ym(e,t){try{localStorage.setItem(e,t)}catch{}}function H2(){const e=W2("sk.theme");return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Ik({children:e}){const[t,s]=E.useState(H2),[i,o]=E.useState(W2("sk.commands")!=="off"),[l,c]=E.useState([]);E.useEffect(()=>{document.documentElement.dataset.theme=t,ym("sk.theme",t)},[t]);const u=E.useCallback(m=>c(f=>f.filter(x=>x.id!==m)),[]),h=E.useCallback((m,f="ok",x)=>{const y=Date.now()+Math.random();c(w=>Rk(w,{id:y,text:m,kind:f,...x?{retry:x}:{}}));const k=Pk(f);k!==null&&setTimeout(()=>u(y),k)},[u]),p=E.useMemo(()=>({theme:t,toggleTheme:()=>s(m=>m==="light"?"dark":"light"),showCommands:i,toggleCommands:()=>o(m=>(ym("sk.commands",m?"off":"on"),!m)),toast:h}),[t,i,h]);return n.jsxs(U2.Provider,{value:p,children:[e,n.jsx("div",{className:"toasts",role:"status","aria-live":"polite",children:l.map(m=>m.kind==="err"?n.jsxs("div",{className:"toast err",role:"alert",children:[n.jsx(_2,{size:16}),n.jsx("span",{className:"grow",children:m.text}),m.retry&&n.jsx("button",{className:"toast-act",onClick:()=>{u(m.id),m.retry()},children:"Try again"}),n.jsx("button",{className:"toast-act",onClick:()=>{u(m.id),Jl.open()},children:"Report a problem"}),n.jsx("button",{className:"toast-x",onClick:()=>u(m.id),"aria-label":"Close this message",children:n.jsx(an,{size:15})})]},m.id):n.jsxs("div",{className:"toast",children:[n.jsx(Ce,{size:16}),m.text]},m.id))})]})}function qe(){const e=E.useContext(U2);if(!e)throw new Error("usePrefs outside PrefsProvider");return e}const V2=900;function Ct(){return $e({queryKey:["board"],queryFn:()=>ze("/api/v1/board"),refetchInterval:V2})}function Ma(e){return $e({queryKey:["ticket",e],queryFn:()=>ze(`/api/v1/tickets/${e}`),enabled:!!e,refetchInterval:V2})}function Lk(){return $e({queryKey:["releases"],queryFn:()=>ze("/api/v1/releases"),refetchInterval:2e3})}function _k(){return $e({queryKey:["apps"],queryFn:()=>ze("/api/v1/apps"),refetchInterval:e=>e.state.data?.apps.some(t=>t.state==="starting")||e.state.data?.reading?1e3:5e3})}function K2(){return $e({queryKey:["app","settings"],queryFn:()=>ze("/api/v1/app/settings"),refetchInterval:5e3})}function zk(){return $e({queryKey:["architecture"],queryFn:()=>ze("/api/v1/architecture"),refetchInterval:2e3})}function Se(){const e=Ws(),{toast:t}=qe(),s=t5({mutationFn:({path:i,body:o,method:l="POST"})=>St(i,l,o),onSuccess:(i,o)=>{e.invalidateQueries(),o.done&&t(o.done)},onError:(i,o)=>t(i instanceof Error?i.message:String(i),"err",V6(i)?()=>s.mutate(o):void 0)});return s}function Q2(){const{toast:e}=qe(),[t,s]=E.useState(!1);return{restarting:t,restart:async()=>{s(!0);const o=await fetch("/healthz").then(c=>c.json()).catch(()=>({startedAt:void 0}));try{await St("/api/v1/restart","POST")}catch(c){s(!1),e(c instanceof Error?c.message:String(c),"err");return}const l=Date.now()+9e4;for(;Date.now()<l;){await new Promise(u=>setTimeout(u,1e3));const c=await fetch("/healthz").then(u=>u.json()).catch(()=>null);if(c?.startedAt&&c.startedAt!==o.startedAt){window.location.reload();return}}s(!1),e("The board did not come back. Run squad console in your terminal.","err")}}}function Mk(){const{restarting:e,restart:t}=Q2();return n.jsxs("div",{className:"updatebar",role:"status",children:[n.jsx(Il,{size:15}),n.jsxs("span",{children:[n.jsx("b",{children:"squad-kit was updated."})," Restart the board to use the new version. Running work picks up where it stopped."]}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"btn sm pri",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart now"})]})}const Os={analyst:"Analyst",architect:"Architect",spec:"Spec writer",builder:"Builder",tester:"Tester",reviewer:"Reviewer",release:"Release",triage:"Triage",you:"You",squad:"Squad"},Fk={analyst:fi,architect:Ek,spec:Sa,builder:La,tester:O2,reviewer:M2,release:Ds,triage:rs,you:Tk,squad:B2};function Nr({role:e,small:t,size:s}){const i=Fk[e];return n.jsx("span",{className:`glyph ${t?"sm":""} ${e==="you"?"you":""}`,title:Os[e],children:n.jsx(i,{size:s??(t?12:14),strokeWidth:2})})}function ye({text:e}){const{showCommands:t,toast:s}=qe();if(!t)return null;const i=()=>{navigator.clipboard?.writeText(e).then(()=>s("Command copied"),()=>s("Could not copy. Select the text instead.","err"))};return n.jsxs("span",{className:"term",title:"The same action in the terminal",children:[n.jsx("b",{children:">_"}),n.jsx("span",{children:e}),n.jsx("button",{onClick:i,"aria-label":`Copy ${e}`,children:n.jsx(Vs,{size:13})})]})}const gd=[{stage:"tickets",name:"Tickets"},{stage:"specs",name:"Specs"},{stage:"implement",name:"Implement"},{stage:"test",name:"Test"},{stage:"review",name:"Review"},{stage:"release",name:"Release"}];function $k({ticket:e}){const t=e.stage==="bugs"?"tickets":e.stage,s=t==="done"?gd.length:gd.findIndex(l=>l.stage===t),i=e.waiting?"you":"work",o=new Map((e.now?.stages??[]).map(l=>[l.stage,l.note]));return n.jsx("div",{className:"track","aria-label":"Where this ticket is",children:gd.map((l,c)=>{const u=c<s?"done":c===s?`cur ${i}`:"",h=o.get(l.stage);return n.jsxs("div",{className:`ts ${u}`,children:[n.jsx("span",{className:"nd",children:c<s?n.jsx(Ce,{size:12,strokeWidth:3}):null}),l.name,c===s&&n.jsx("span",{className:"tag",children:i==="you"?"Your turn":e.stage==="release"?"Ready":"Working"}),o.size>0&&n.jsx("span",{className:"tnote",children:c===s&&h==="your turn"?"":h??""})]},l.stage)})})}function at({title:e,onClose:t,children:s,footer:i,icon:o,wide:l}){return E.useEffect(()=>{const c=u=>u.key==="Escape"&&t();return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[t]),n.jsx("div",{className:"modal-veil",onMouseDown:c=>c.target===c.currentTarget&&t(),children:n.jsxs("div",{className:`modal ${l?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":e,children:[n.jsxs("header",{children:[o,n.jsx("h3",{children:e}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:n.jsx(an,{size:16})})]}),n.jsx("div",{className:"mb",children:s}),i&&n.jsx("footer",{children:i})]})})}function Bs(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function Sr(e){return e?new Date(e).toLocaleDateString([],{day:"numeric",month:"short"}):""}function Un(e){const t=Math.max(0,(Date.now()-Date.parse(e))/1e3);return t<60?"just now":t<3600?`${Math.round(t/60)} min ago`:t<86400?`${Math.round(t/3600)} h ago`:Sr(e)}function xm({text:e}){const t=e.split(/(\*\*[^*]+\*\*)/g);return n.jsx(n.Fragment,{children:t.map((s,i)=>s.startsWith("**")?n.jsx("strong",{children:s.slice(2,-2)},i):n.jsx("span",{children:s},i))})}function Ok({notes:e}){return n.jsx("div",{className:"notes",children:e.split(`
482
- `).map((t,s)=>t.startsWith("### ")?n.jsx("h4",{children:t.slice(4)},s):t.startsWith("- ")?n.jsxs("p",{children:["• ",n.jsx(xm,{text:t.slice(2)})]},s):t.trim()?n.jsx("p",{children:n.jsx(xm,{text:t})},s):null)})}function Hh(e){switch(e.waiting?.kind){case"questions":return`squad answer ${e.id}`;case"stuck":return`squad decide ${e.id}`;case"ask":return`squad reply ${e.id}`;case"yours":return`squad give-back ${e.id}`;case"chat":return`squad chat ${e.id}`;case"change":case"spec":case"plan":case"proof":return`squad approve ${e.id}`;default:return`squad watch ${e.id}`}}function Vh(e){const t=e.outdated??[];return t.length===1?`${t[0].adr} came after this plan and changes it`:`${t.map(s=>s.adr).join(" and ")} came after this plan and change it`}function zl(e){switch(e.waiting?.kind){case"questions":return"Answer";case"spec":return"Review spec";case"plan":return e.specApproved?"Review design":"Review plan";case"proof":return"Check proof";case"stuck":return"Decide";case"ask":return"Answer";case"yours":return"Give back";case"chat":return"Open chat";case"change":return"Review design update";default:return"Open"}}const qs={tickets:"Tickets",specs:"Specs",implement:"Implement",test:"Test",review:"Review",release:"Release",bugs:"Bugs",done:"Released"},G2=["app","update"],Kh=["waiting","installing","restarting"];function Qh(){const e=$e({queryKey:G2,queryFn:()=>ze("/api/v1/app/update"),refetchInterval:i=>Kh.includes(i.state.data?.progress.state??"idle")?1e3:6e4}),t=E.useRef(null),s=e.data?.startedAt;return E.useEffect(()=>{s&&(t.current&&t.current!==s&&window.location.reload(),t.current??=s)},[s]),e}function Fa(){const e=Ws(),{toast:t}=qe(),[s,i]=E.useState(!1);return{pending:s,call:async(l,c,u={})=>{i(!0);try{const h=await St(l,c,u);return e.setQueryData(G2,h),h}catch(h){return t(h instanceof Error?h.message:String(h),"err"),null}finally{i(!1)}}}}function ah(e=[]){const t=[...new Set(e.map(s=>s.ticket??`the Architect in ${s.project}`))];return t.length<=1?t[0]??"":t.length<=3?`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`:`${t.slice(0,2).join(", ")} and ${t.length-2} more`}function Dk(e){const t=new Date(e),s=l=>l.toDateString(),i=new Date(Date.now()-864e5);return`${s(t)===s(new Date)?"Today":s(t)===s(i)?"Yesterday":t.toLocaleDateString([],{day:"numeric",month:"short"})} at ${Bs(e)}`}function Gh({text:e}){const{toast:t}=qe(),s=()=>{const i=navigator.clipboard?.writeText(e);if(!i)return t("Could not copy. Select the text instead.","err");i.then(()=>t("Command copied"),()=>t("Could not copy. Select the text instead.","err"))};return n.jsxs("div",{className:"upd-cmd",children:[n.jsxs("span",{className:"term",children:[n.jsx("b",{children:">_"}),n.jsx("span",{children:e})]}),n.jsxs("button",{className:"btn sm",onClick:s,children:[n.jsx(Vs,{size:13})," Copy"]})]})}function Y2({lines:e}){return e?.length?n.jsx("ul",{className:"upd-notes","aria-label":"What is new",children:e.slice(0,3).map(t=>n.jsx("li",{children:t},t))}):null}function Z2(){const{data:e}=Qh();if(!e)return null;const t=e.progress.state;return Kh.includes(t)?n.jsx(qk,{s:e}):t==="done"?n.jsx(Uk,{s:e}):t==="failed"?n.jsx(Wk,{s:e}):!e.newer||!e.latest||e.later===e.latest?null:n.jsx(Bk,{s:e})}function Bk({s:e}){const{pending:t,call:s}=Fa(),i=e.devInstall||e.major;return n.jsxs("section",{className:"upd","aria-label":"A new squad-kit",children:[n.jsx("span",{className:"upd-ic",children:n.jsx(Ds,{size:16})}),n.jsxs("div",{className:"upd-main",children:[n.jsxs("b",{className:"upd-title",children:["squad-kit ",e.latest," is ready"]}),n.jsx(Y2,{lines:e.notes}),n.jsx("span",{className:"upd-sub",children:e.devInstall?"This squad-kit runs from its source folder, so it does not update itself. To use the new version, run:":e.major?`A big change from ${e.current}. Read what is new first, then run this in a terminal:`:`You have ${e.current}. Takes about a minute. Your tickets and work are kept.`}),i&&n.jsx(Gh,{text:e.command})]}),n.jsxs("div",{className:"upd-acts",children:[!i&&n.jsxs("button",{className:"btn sm pri",disabled:t,onClick:()=>void s("/api/v1/app/update","POST"),children:[n.jsx(Ds,{size:14})," Update now"]}),(!e.notes?.length||i)&&n.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"What is new"}),n.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void s("/api/v1/app/update","PUT",{later:e.latest}),children:"Later"}),!i&&n.jsx(ye,{text:"squad upgrade"})]})]})}function qk({s:e}){const t=e.progress,{pending:s,call:i}=Fa(),o=Kh.indexOf(t.state),l=p=>p<o?"done":p===o?"now":"todo",c=t.now?"Stopped the running steps":t.waitedFor?.length?`Waited for ${ah(t.waitedFor)} to finish ${t.waitedFor.length===1?"its step":"their steps"}`:"No work was in the middle of a step",u=t.busy?.length?`${ah(t.busy)} ${t.busy.length===1?"is":"are"} in the middle of a step`:"Almost there",h=[{label:o>0?c:"Waiting for running work to reach a safe point",note:o===0?u:t.now?"They pick up again after the restart":"Nothing was cut off"},{label:o>1?`Installed squad-kit ${t.to}`:`Installing squad-kit ${t.to}`,note:o===1?"Takes about a minute":o>1?"Done":"Next"},{label:"Restarting the app",note:o===2?"This page reloads on its own":"Same link, same tickets"},{label:"Picking up where each ticket was",note:"Nothing is lost"}];return n.jsxs("section",{className:"upd steps","aria-label":`Updating to squad-kit ${t.to}`,"aria-live":"polite",children:[n.jsxs("div",{className:"upd-head",children:[n.jsxs("b",{className:"upd-title",children:["Updating to squad-kit ",t.to]}),n.jsx("span",{className:"upd-sub",children:t.state==="waiting"?"squad-kit waits until no agent is in the middle of a step, so no work is cut off.":"Takes about a minute. Your tickets and work are kept."}),t.state==="waiting"&&n.jsxs("span",{className:"upd-acts",children:[n.jsx("button",{className:"btn sm pri",disabled:s,onClick:()=>void i("/api/v1/app/update","POST",{now:!0}),title:"Running steps stop now and pick up again after the restart",children:"Update now anyway"}),n.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void i("/api/v1/app/update","DELETE"),children:"Not now"})]})]}),n.jsx("ol",{className:"setup-steps",children:h.map((p,m)=>n.jsxs("li",{className:l(m),children:[n.jsx("span",{className:"mark",children:l(m)==="done"?n.jsx(Ce,{size:12,strokeWidth:3}):l(m)==="now"?n.jsx("span",{className:"live"}):null}),n.jsxs("span",{className:"txt",children:[n.jsx("b",{children:p.label}),n.jsx("small",{title:p.note,children:p.note})]})]},p.label))}),n.jsx("div",{className:"setup-bar","aria-hidden":!0,children:n.jsx("i",{})})]})}function Uk({s:e}){const{pending:t,call:s}=Fa(),i=e.progress.carried??[];return n.jsxs("section",{className:"upd","aria-label":`You are on squad-kit ${e.current}`,children:[n.jsx("span",{className:"upd-ic ok",children:n.jsx(Ce,{size:16,strokeWidth:2.6})}),n.jsxs("div",{className:"upd-main",children:[n.jsxs("b",{className:"upd-title",children:["You are on squad-kit ",e.current]}),n.jsx("span",{className:"upd-sub",children:i.length?`${ah(i)} carried on where ${i.length===1?"it was":"they were"}. Nothing was lost.`:"Your tickets and work are kept."}),n.jsx(Y2,{lines:e.notes})]}),n.jsxs("div",{className:"upd-acts",children:[n.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Read what is new"}),n.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void s("/api/v1/app/update","DELETE"),children:"Close"})]})]})}function Wk({s:e}){const t=e.progress,{pending:s,call:i}=Fa();return n.jsxs("section",{className:"upd failed",role:"alert","aria-label":"squad-kit could not update by itself",children:[n.jsx("span",{className:"upd-ic",children:n.jsx(pk,{size:16})}),n.jsxs("div",{className:"upd-main",children:[n.jsx("b",{className:"upd-title",children:"Could not update by itself"}),n.jsxs("span",{className:"upd-sub",children:[t.reason," ",t.permission?"Run this once in a terminal, then press Restart:":"Try again, or run this in a terminal, then press Restart:"]}),n.jsx(Gh,{text:e.command}),t.output&&n.jsxs("details",{className:"upd-out",children:[n.jsx("summary",{children:"What the installer said"}),n.jsx("pre",{children:t.output})]})]}),n.jsxs("div",{className:"upd-acts",children:[n.jsxs("button",{className:"btn sm pri",disabled:s,onClick:()=>void i("/api/v1/app/update/restart","POST"),children:[n.jsx(Il,{size:14})," Restart"]}),!t.permission&&n.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void i("/api/v1/app/update","POST"),children:"Try again"}),n.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void i("/api/v1/app/update","DELETE"),children:"Not now"})]})]})}function X2(){const{data:e}=Qh(),{pending:t,call:s}=Fa(),{toast:i}=qe();if(!e)return null;const o=async()=>{const c=await s("/api/v1/app/update/check","POST");c&&(c.checkError?i(c.checkError,"err"):i(c.newer?`squad-kit ${c.latest} is ready`:`You are on the latest version (${c.current})`))},l=e.newer&&!e.devInstall&&!e.major&&e.progress.state==="idle";return n.jsxs("div",{className:"about",children:[n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Version"}),n.jsxs("span",{className:"about-row",children:[n.jsx("b",{children:e.current}),e.newer?n.jsxs("span",{className:"pill you",children:[e.latest," is ready"]}):e.checkedAt&&!e.checkError?n.jsx("span",{className:"pill ok",children:"Up to date"}):null,e.devInstall&&n.jsx("span",{className:"pill",children:"Source folder"})]})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Last checked"}),n.jsxs("span",{className:"about-row",children:[e.checkedAt?Dk(e.checkedAt):"Not yet",e.checkError&&n.jsx("span",{className:"note bad",children:e.checkError})]})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Updates"}),n.jsxs("span",{className:"about-row",children:[n.jsxs("label",{className:"about-daily",children:[n.jsx("input",{type:"checkbox",checked:e.daily,disabled:t,onChange:c=>void s("/api/v1/app/update","PUT",{daily:c.target.checked})}),"Check for updates every day"]}),n.jsx("span",{className:"note",children:"Turn it off on a network without internet."})]})]}),n.jsxs("div",{className:"about-acts",children:[n.jsx("button",{className:"btn sm",disabled:t,onClick:()=>void o(),children:t?"Checking…":"Check for updates"}),n.jsx("a",{className:"btn sm",href:e.notesUrl,target:"_blank",rel:"noreferrer",children:"Release notes"}),l&&n.jsxs("button",{className:"btn sm pri",disabled:t,onClick:()=>void s("/api/v1/app/update","POST"),children:[n.jsx(Ds,{size:14})," Update to ",e.latest]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad upgrade"})]}),e.newer&&(e.devInstall||e.major)&&n.jsx(Gh,{text:e.command})]})}function Hk(){const{data:e}=Qh(),[t,s]=E.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:"Version and updates",children:[e?`squad-kit ${e.current}`:"About",e?.newer&&n.jsx("span",{className:"about-dot","aria-label":`${e.latest} is ready`})]}),t&&n.jsx(at,{title:"About squad-kit",onClose:()=>s(!1),children:n.jsx(X2,{})})]})}function Cr(e){const t=e.changes?.at(-1);return t&&t.status!=="done"&&t.status!=="declined"?t:void 0}function ss(e){const t=Cr(e)?.status;return t==="proposed"||t==="failed"||t==="design-ready"}function ec(e){return!!(e.waiting||e.quiet?.kind==="stuck"||e.outdated?.length||ss(e))}function Vk(e,t){return t>0?`(${t}) ${e}`:e}function Kk(e,t){const s=Math.max(0,(t-Date.parse(e))/1e3);if(!Number.isFinite(s)||s<60)return"just now";if(s<3600)return`waiting ${Math.round(s/60)} min`;if(s<86400)return`waiting ${Math.round(s/3600)} h`;const i=Math.round(s/86400);return`waiting ${i} ${i===1?"day":"days"}`}function J2(e){return!e.waiting&&e.quiet?.kind==="stuck"?e.quiet.since:e.activity[0]?.at??e.createdAt}class Qk{rank=new Map;next=0;sort(t){const s=t.filter(o=>!this.rank.has(o.key)).sort((o,l)=>o.since.localeCompare(l.since)||o.key.localeCompare(l.key));for(const o of s)this.rank.set(o.key,this.next++);const i=new Set(t.map(o=>o.key));for(const o of this.rank.keys())i.has(o)||this.rank.delete(o);return[...t].sort((o,l)=>this.rank.get(o.key)-this.rank.get(l.key))}}function Gk(e){const t=new Set;return e.waiting&&t.add(e.waiting.kind),ss(e)&&t.add("change"),e.quiet?.kind==="stuck"&&t.add("quiet"),e.outdated?.length&&t.add("outdated"),[...t]}const Yk=["yours","chat","release"];function Zk(e){return!Yk.includes(e)}function Xk(e,t,s){const i=Cr(t),o=s==="ask"?t.agentQuestion?.at:s==="change"&&i?`${i.id}-${i.status==="design-ready"?"design":"spec"}`:s==="quiet"?t.quiet?.since:s==="outdated"?t.outdated?.map(l=>l.adr).join("+"):void 0;return`${e}/${t.id}/${s}${o?`/${o}`:""}`}function Jk(e){return e.flatMap(({project:t,ticket:s})=>Gk(s).filter(Zk).map(i=>({key:Xk(t.id,s,i),project:t,ticket:s,reason:i})))}const Ml=2*6e4;class ew{known=null;gone=new Map;next(t,s){const i=new Set(t.map(c=>c.key));if(!this.known)return this.known=i,[];const o=this.known,l=t.filter(c=>!o.has(c.key)&&!(s-(this.gone.get(c.key)??-1/0)<Ml));for(const c of o)i.has(c)||this.gone.set(c,s);for(const[c,u]of this.gone)(i.has(c)||s-u>=Ml)&&this.gone.delete(c);return this.known=i,l}}const vm="sk.notices.shown";function tw(e,t,s){if(!s)return!0;let i={};try{i=JSON.parse(s.getItem(vm)??"{}")}catch{i={}}if(t-(i[e]??-1/0)<Ml)return!1;const o=Object.fromEntries(Object.entries(i).filter(([,l])=>t-l<Ml));o[e]=t;try{s.setItem(vm,JSON.stringify(o))}catch{}return!0}const nw={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function sw(e){const t=e.ticket,s={questions:"the squad has questions for you",ask:`the ${nw[t.agentQuestion?.from??""]??"squad"} has a question`,spec:"the spec is ready for you",plan:t.specApproved?"the design is ready for you":"the plan is ready for you",change:"a change waits for you",proof:"the proof is ready to check",stuck:"the squad stopped and needs you",quiet:"a step looks stuck",outdated:"a newer decision changes the plan",yours:"you took it over",chat:"your talk with the squad",release:"ready to release"};return{title:`${t.id}: ${s[e.reason]}`,body:`${t.title} · ${e.project.name}`}}function ey(e,t){const s=`/p/${encodeURIComponent(e)}`;return t.waiting?.kind==="proof"?`${s}/tickets/${encodeURIComponent(t.id)}/proof`:`${s}/board?ticket=${encodeURIComponent(t.id)}`}function ty(){return $e({queryKey:["app","waiting"],queryFn:()=>ze("/api/v1/app/waiting"),refetchInterval:2e3})}function km(){const e=Ct(),t=C2({select:o=>o.location.pathname}),s=e.data?.ready?e.data:null,i=E.useMemo(()=>(s?.tickets??[]).filter(ec).map(o=>({key:o.id,since:J2(o),ticket:o})),[s]);return ny(s?.meta.project,i.length),oy(),t.startsWith("/inbox")?null:n.jsx(sy,{items:i})}function rw(){const e=ty(),t=E.useMemo(()=>(e.data?.items??[]).map(({project:s,ticket:i})=>({key:`${s.id}/${i.id}`,since:J2(i),ticket:i,project:s})),[e.data]);return ny("squad-kit",t.length),oy(),n.jsx(sy,{items:t,home:!0})}function ny(e,t){E.useEffect(()=>{e&&(document.title=Vk(e,t))},[e,t])}function iw(e){const[t,s]=E.useState(Date.now);return E.useEffect(()=>{const i=setInterval(()=>s(Date.now()),e);return()=>clearInterval(i)},[e]),t}function sy({items:e,home:t}){const[s]=E.useState(()=>new Qk),i=iw(3e4),o=E.useMemo(()=>s.sort(e),[s,e]);if(!o.length)return null;const l=o.slice(0,2),c=o.length-l.length,u=o.length===1?"1 thing needs you":`${o.length} things need you`,h=p=>c>0&&(t?n.jsxs("button",{className:`ymore ${p}`,onClick:()=>document.getElementById("waiting")?.scrollIntoView({behavior:"smooth",block:"start"}),children:["and ",c," more"]}):n.jsxs(Ge,{to:"/inbox",className:`ymore ${p}`,children:["and ",c," more"]}));return n.jsxs("section",{className:"ybar","aria-label":"Waiting for you",children:[n.jsxs("div",{className:"ybar-h",children:[n.jsx("span",{className:"ybar-n","aria-hidden":!0,children:o.length}),n.jsx("b",{className:"ybar-t","aria-live":"polite",children:u}),n.jsx("span",{className:"sub",children:t?"The squads keep working on everything else meanwhile.":"The squad keeps working on everything else meanwhile."}),n.jsx("span",{className:"grow"}),h("ymore-up"),n.jsx(ye,{text:"squad inbox"})]}),n.jsxs("div",{className:`ybar-items ${l.length>1?"n2":""} ${c?"more":""}`,children:[l.map(p=>n.jsx(aw,{it:p,now:i},p.key)),h("ymore-row")]}),n.jsx(hw,{})]})}function aw({it:e,now:t}){const s=e.ticket,i=ss(s)?Cr(s):void 0,o=s.waiting?.summary??(i?`Change ${i.id} to the spec waits for you`:s.outdated?.length?Vh(s):`Looks stuck: ${s.quiet?.detail??"no progress"}`),l=s.waiting?zl(s):i?"Check the change":"Check it",c=s.waiting?.kind==="ask"&&s.agentQuestion?`“${s.agentQuestion.text}”`:s.title,u=[e.project?.name,s.id,qs[s.stage],Kk(e.since,t)].filter(Boolean).join(" · ");return n.jsxs("div",{className:"yitem",children:[n.jsxs("div",{className:"grow",children:[n.jsx("div",{className:"meta",children:u}),n.jsx("h3",{title:o,children:o}),n.jsx("p",{title:c,children:c})]}),e.project?n.jsx("a",{className:"btn sm you",href:ey(e.project.id,s),children:l}):s.waiting?.kind==="proof"?n.jsx(Ge,{to:"/tickets/$id/proof",params:{id:s.id},className:"btn sm you",children:l}):n.jsx(Ge,{to:"/board",search:{ticket:s.id},className:"btn sm you",children:l})]})}const ry="sk.notices";function Yh(){try{return window.localStorage}catch{return null}}function iy(){const e=Yh()?.getItem(ry);return e==="on"||e==="off"?e:null}function Zh(){return typeof Notification>"u"?"none":Notification.permission}const oh=new Set,ow=()=>oh.forEach(e=>e());function lw(e){return oh.add(e),window.addEventListener("storage",e),window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{oh.delete(e),window.removeEventListener("storage",e),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}}const cw=()=>`${iy()??""}|${Zh()}`;function aa(e){try{Yh()?.setItem(ry,e)}catch{}ow()}function uw(){return new Promise(e=>{try{const t=Notification.requestPermission(e);t&&t.then(e,()=>e(Notification.permission))}catch{e(Notification.permission)}})}const dw="Your browser blocks notices from this page. To allow them, click the icon left of the address, allow notifications, then reload the page.";function ay(){const{toast:e}=qe(),[t,s]=E.useSyncExternalStore(lw,cw).split("|"),i=t||null;return{choice:i,permission:s,on:i==="on"&&s==="granted",canAsk:i===null&&(s==="default"||s==="granted"),turnOn:async()=>{if(Zh()==="none")return e("This browser can't show desktop notices.","err");const l=Notification.permission==="default"?await uw():Notification.permission;l==="granted"?(aa("on"),e("Desktop notices are on. One for each new thing that needs you.")):l==="denied"?(aa("on"),e(dw,"err")):(aa("off"),e("No desktop notices for now. Turn them on in Settings any time."))},turnOff:()=>{aa("off"),e("Desktop notices are off")},notNow:()=>{aa("off"),e("No desktop notices. Turn them on in Settings any time.")}}}function hw(){const e=ay();return e.canAsk?n.jsxs("div",{className:"ybar-ask",children:[n.jsx(J6,{size:15}),n.jsx("span",{children:"Get a desktop notice when the squad needs you?"}),n.jsx("button",{className:"btn sm",onClick:()=>void e.turnOn(),children:"Turn on"}),n.jsx("button",{className:"btn sm quiet",onClick:e.notNow,children:"Not now"})]}):null}function pw(){const e=ay();return n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Desktop notices"}),n.jsx("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:e.permission==="none"?n.jsx("span",{className:"note",children:"This browser can't show desktop notices. The banner and the tab title still show what needs you."}):e.permission==="denied"?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pill you",children:"Blocked by your browser"}),n.jsx("span",{className:"note",children:"To allow them, click the icon left of the address, allow notifications, then reload this page."})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"btn sm",onClick:()=>e.on?e.turnOff():void e.turnOn(),children:e.on?"On: turn them off":"Off: turn them on"}),n.jsx("span",{className:"note",children:"A notice for each new question, approval, proof and failure, in this browser. No sounds."})]})})]})}const fw=new ew;function oy(){const e=ty(),t=Hs(),s=e.data;E.useEffect(()=>{if(!s)return;const i=fw.next(Jk(s.items),Date.now());if(!i.length||iy()!=="on"||Zh()!=="granted")return;const o=l=>{if(l.project.id!==xr)return window.location.assign(ey(l.project.id,l.ticket));if(l.ticket.waiting?.kind==="proof")return void t({to:"/tickets/$id/proof",params:{id:l.ticket.id}});t({to:"/board",search:{ticket:l.ticket.id}})};for(const l of i)tw(l.key,Date.now(),Yh())&&mw(l,o)},[s,t])}function mw(e,t){const{title:s,body:i}=sw(e);try{const o=new Notification(s,{body:i,tag:e.key,silent:!0});o.onclick=()=>{window.focus(),o.close(),t(e)}}catch{}}const ly="sk.chatdock",lh=new Set;function gw(){try{const e=JSON.parse(localStorage.getItem(ly)??"{}");return{tab:e.tab??null,min:!!e.min,width:cy(e.width??600),seen:e.seen??{}}}catch{return{tab:null,min:!1,width:600,seen:{}}}}let gr=typeof window>"u"?{tab:null,min:!1,width:600,seen:{}}:gw();function cy(e){return Math.max(440,Math.min(900,Math.round(e)))}function Jr(e){gr={...gr,...e};try{localStorage.setItem(ly,JSON.stringify(gr))}catch{}for(const t of lh)t()}const Pn={get:()=>gr,show:e=>Jr({tab:e,min:!1}),pick:e=>Jr({tab:e}),minimize:()=>Jr({min:!0}),restore:()=>Jr({min:!1}),resize:e=>Jr({width:cy(e)}),seen:(e,t)=>{gr.seen[e]!==t&&Jr({seen:{...gr.seen,[e]:t}})}};function Xh(e){return E.useSyncExternalStore(t=>{const s=window.matchMedia?.(e);return s?.addEventListener("change",t),()=>s?.removeEventListener("change",t)},()=>!!window.matchMedia?.(e).matches)}const Jh="(max-width: 760px)";function tc(){return E.useSyncExternalStore(e=>(lh.add(e),()=>lh.delete(e)),()=>gr)}const ch="؀-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-\uFEFF",yw=new RegExp(`[${ch}]`,"g"),xw=/[A-Za-z]/g;function xn(e){const t=String(e??"").replace(/```[\s\S]*?(```|$)/g," ").replace(/`[^`]*`/g," ").replace(/(https?:\/\/|file:\/\/)\S+/g," "),s=t.match(yw)?.length??0,i=t.match(xw)?.length??0,o=s+i;if(!o)return{lang:"none",dir:"ltr",share:0};const l=s/o;return{lang:l>=.85?"ar":l<=.15?"en":"mixed",dir:l>=.5?"rtl":"ltr",share:l}}function as(e){return e.dir==="rtl"?"t-ar":e.lang==="mixed"?"t-mx":"t-en"}function vw(e){const t=e.dir==="rtl"?"right to left":"left to right";return e.lang==="ar"?`Arabic · ${t}`:e.lang==="en"?`English · ${t}`:e.lang==="mixed"?`Mixed · ${t}`:""}const uy="[0-9\\u0660-\\u0669][0-9\\u0660-\\u0669.,:%/+\\-]*",kw=`(?:${uy}[  ]+)*[A-Za-z][A-Za-z0-9._\\-/+#@:]*(?:[  ]+[A-Za-z0-9][A-Za-z0-9._\\-/+#@:]*)*`,ww=`[${ch}]+(?:[  ]+(?:${uy}[  ]+)*[${ch}]+)*`,bw=new RegExp(`(${kw})|(${ww})`,"g");function jw(e,t){const s=[];let i=0;const o=(l,c)=>{if(!l)return;const u=s.at(-1);u&&!u.dir&&!c?u.text+=l:s.push(c?{text:l,dir:c}:{text:l})};for(const l of e.matchAll(bw)){const c=l.index??0;o(e.slice(i,c));const u=!!l[1];o(l[0],u&&t==="rtl"?"ltr":!u&&t==="ltr"?"rtl":void 0),i=c+l[0].length}return o(e.slice(i)),s}function Nw(e){const t=e.filter(s=>s==="rtl").length;return e.length&&t*2>=e.length?"rtl":"ltr"}function Sw(e,t){if(t<=0)return"";let s=0;for(const i of e.matchAll(/\S+/g))if(s+=1,s===t)return e.slice(0,(i.index??0)+i[0].length);return e}function Cw(e){return e.match(/\S+/g)?.length??0}const dy=new Set(["p","li","h1","h2","h3","h4","h5","h6","td","th","dt","dd","figcaption"]),ep=new Set(["code","pre","svg","math"]);function hy(e,t=!1){return e.type==="text"?e.value??"":e.tagName&&ep.has(e.tagName)||t&&e.tagName&&(e.tagName==="ul"||e.tagName==="ol")?" ":(e.children??[]).map(s=>hy(s,!0)).join("")}function Ew(e,t){const s=e.properties??={},i=Array.isArray(s.className)?s.className:typeof s.className=="string"?[s.className]:[];s.className=[...i,t]}function tp(e,t,s){return{type:"element",tagName:e,properties:t,children:s}}function py(e,t,s){if(!e.children||e.tagName&&ep.has(e.tagName))return;const i=[];for(const o of e.children){if(o.type!=="text"){o.type==="element"&&!(o.tagName&&dy.has(o.tagName))&&py(o,t,s),i.push(o);continue}for(const l of jw(o.value??"",t)){const c=s?Tw(l.text):[{type:"text",value:l.text}];l.dir?i.push(tp("bdi",{dir:l.dir},c)):i.push(...c)}}e.children=i}function Tw(e){return e.split(/(\s+)/).filter(Boolean).map(t=>/^\s+$/.test(t)?{type:"text",value:t}:tp("span",{className:["fx"]},[{type:"text",value:t}]))}function Pw(e,t={}){let s=null;const i=o=>{if(o.type==="element"&&o.tagName&&ep.has(o.tagName)){o.tagName==="code"&&((o.properties??={}).dir="ltr"),o.tagName==="pre"&&(s=o);return}if(o.type==="element"&&o.tagName&&dy.has(o.tagName)){const l=xn(hy(o));if(l.lang!=="none"){const c=o.properties??={};c.dir=l.dir,c.lang=l.dir==="rtl"?"ar":"en",Ew(o,as(l))}py(o,l.dir,!!t.stream),s=o}for(const l of o.children??[])i(l);if(o.type==="element"&&(o.tagName==="ul"||o.tagName==="ol"||o.tagName==="table")){const l=[],c=u=>{for(const h of u.children??[]){if(h.type!=="element")continue;const p=h.tagName==="li"||h.tagName==="td"||h.tagName==="th";p&&h.properties?.dir&&l.push(h.properties.dir),(!p||o.tagName==="table")&&c(h)}};c(o),l.length&&((o.properties??={}).dir=Nw(l))}};return i(e),t.caret&&s&&s.tagName!=="pre"&&(s.children??=[]).push(tp("span",{className:["caret"],ariaHidden:"true"},[])),e}function Rw(e={}){return t=>{Pw(t,e)}}function Aw(e,t){const s={};return(e[e.length-1]===""?[...e,""]:e).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const Iw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w={};function wm(e,t){return(_w.jsx?Lw:Iw).test(e)}const zw=/[ \t\n\f\r]/g;function Mw(e){return typeof e=="object"?e.type==="text"?bm(e.value):!1:bm(e)}function bm(e){return e.replace(zw,"")===""}class $a{constructor(t,s,i){this.normal=s,this.property=t,i&&(this.space=i)}}$a.prototype.normal={};$a.prototype.property={};$a.prototype.space=void 0;function fy(e,t){const s={},i={};for(const o of e)Object.assign(s,o.property),Object.assign(i,o.normal);return new $a(s,i,t)}function uh(e){return e.toLowerCase()}class Wt{constructor(t,s){this.attribute=s,this.property=t}}Wt.prototype.attribute="";Wt.prototype.booleanish=!1;Wt.prototype.boolean=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.defined=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.number=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.property="";Wt.prototype.spaceSeparated=!1;Wt.prototype.space=void 0;let Fw=0;const Ae=Er(),it=Er(),dh=Er(),ae=Er(),Ve=Er(),ai=Er(),Jt=Er();function Er(){return 2**++Fw}const hh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:it,commaOrSpaceSeparated:Jt,commaSeparated:ai,number:ae,overloadedBoolean:dh,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),yd=Object.keys(hh);class np extends Wt{constructor(t,s,i,o){let l=-1;if(super(t,s),jm(this,"space",o),typeof i=="number")for(;++l<yd.length;){const c=yd[l];jm(this,yd[l],(i&hh[c])===hh[c])}}}np.prototype.defined=!0;function jm(e,t,s){s&&(e[t]=s)}function mi(e){const t={},s={};for(const[i,o]of Object.entries(e.properties)){const l=new np(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,s[uh(i)]=i,s[uh(l.attribute)]=i}return new $a(t,s,e.space)}const my=mi({properties:{ariaActiveDescendant:null,ariaAtomic:it,ariaAutoComplete:null,ariaBusy:it,ariaChecked:it,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:it,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:it,ariaFlowTo:Ve,ariaGrabbed:it,ariaHasPopup:null,ariaHidden:it,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:ae,ariaLive:null,ariaModal:it,ariaMultiLine:it,ariaMultiSelectable:it,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:it,ariaReadOnly:it,ariaRelevant:null,ariaRequired:it,ariaRoleDescription:Ve,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:it,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function gy(e,t){return t in e?e[t]:t}function yy(e,t){return gy(e,t.toLowerCase())}const $w=mi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ai,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:Ve,autoFocus:Ae,autoPlay:Ae,blocking:Ve,capture:null,charSet:null,checked:Ae,cite:null,className:Ve,cols:ae,colSpan:null,content:null,contentEditable:it,controls:Ae,controlsList:Ve,coords:ae|ai,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:dh,draggable:it,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:Ve,height:ae,hidden:dh,high:ae,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:Ae,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:ae,pattern:null,ping:Ve,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:Ve,required:Ae,reversed:Ae,rows:ae,rowSpan:ae,sandbox:Ve,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:it,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:it,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:it,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:yy}),Ow=mi({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",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:Jt,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:Ve,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:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,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:ai,g2:ai,glyphName:ai,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:Jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,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:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jt,rev:Jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jt,requiredFeatures:Jt,requiredFonts:Jt,requiredFormats:Jt,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:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:Jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jt,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gy}),xy=mi({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()}}),vy=mi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yy}),ky=mi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Dw={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"},Bw=/[A-Z]/g,Nm=/-[a-z]/g,qw=/^data[-\w.:]+$/i;function Uw(e,t){const s=uh(t);let i=t,o=Wt;if(s in e.normal)return e.property[e.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&qw.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Nm,Hw);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Nm.test(l)){let c=l.replace(Bw,Ww);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}o=np}return new o(i,t)}function Ww(e){return"-"+e.toLowerCase()}function Hw(e){return e.charAt(1).toUpperCase()}const Vw=fy([my,$w,xy,vy,ky],"html"),sp=fy([my,Ow,xy,vy,ky],"svg");function Kw(e){return e.join(" ").trim()}var ei={},xd,Sm;function Qw(){if(Sm)return xd;Sm=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,s=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g,h=`
483
- `,p="/",m="*",f="",x="comment",y="declaration";function k(j,N){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];N=N||{};var S=1,T=1;function A(Z){var X=Z.match(t);X&&(S+=X.length);var he=Z.lastIndexOf(h);T=~he?Z.length-he:T+Z.length}function q(){var Z={line:S,column:T};return function(X){return X.position=new R(Z),B(),X}}function R(Z){this.start=Z,this.end={line:S,column:T},this.source=N.source}R.prototype.content=j;function M(Z){var X=new Error(N.source+":"+S+":"+T+": "+Z);if(X.reason=Z,X.filename=N.source,X.line=S,X.column=T,X.source=j,!N.silent)throw X}function L(Z){var X=Z.exec(j);if(X){var he=X[0];return A(he),j=j.slice(he.length),X}}function B(){L(s)}function z(Z){var X;for(Z=Z||[];X=O();)X!==!1&&Z.push(X);return Z}function O(){var Z=q();if(!(p!=j.charAt(0)||m!=j.charAt(1))){for(var X=2;f!=j.charAt(X)&&(m!=j.charAt(X)||p!=j.charAt(X+1));)++X;if(X+=2,f===j.charAt(X-1))return M("End of comment missing");var he=j.slice(2,X-2);return T+=2,A(he),j=j.slice(X),T+=2,Z({type:x,comment:he})}}function U(){var Z=q(),X=L(i);if(X){if(O(),!L(o))return M("property missing ':'");var he=L(l),ce=Z({type:y,property:w(X[0].replace(e,f)),value:he?w(he[0].replace(e,f)):f});return L(c),ce}}function ne(){var Z=[];z(Z);for(var X;X=U();)X!==!1&&(Z.push(X),z(Z));return Z}return B(),ne()}function w(j){return j?j.replace(u,f):f}return xd=k,xd}var Cm;function Gw(){if(Cm)return ei;Cm=1;var e=ei&&ei.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ei,"__esModule",{value:!0}),ei.default=s;const t=e(Qw());function s(i,o){let l=null;if(!i||typeof i!="string")return l;const c=(0,t.default)(i),u=typeof o=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:m}=h;u?o(p,m,h):m&&(l=l||{},l[p]=m)}),l}return ei}var oa={},Em;function Yw(){if(Em)return oa;Em=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,s=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(p){return!p||s.test(p)||e.test(p)},c=function(p,m){return m.toUpperCase()},u=function(p,m){return"".concat(m,"-")},h=function(p,m){return m===void 0&&(m={}),l(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(o,u):p=p.replace(i,u),p.replace(t,c))};return oa.camelCase=h,oa}var la,Tm;function Zw(){if(Tm)return la;Tm=1;var e=la&&la.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(Gw()),s=Yw();function i(o,l){var c={};return!o||typeof o!="string"||(0,t.default)(o,function(u,h){u&&h&&(c[(0,s.camelCase)(u,l)]=h)}),c}return i.default=i,la=i,la}var Xw=Zw();const Jw=Ph(Xw),wy=by("end"),rp=by("start");function by(e){return t;function t(s){const i=s&&s.position&&s.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function e8(e){const t=rp(e),s=wy(e);if(t&&s)return{start:t,end:s}}function fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Pm(e.position):"start"in e||"end"in e?Pm(e):"line"in e||"column"in e?ph(e):""}function ph(e){return Rm(e&&e.line)+":"+Rm(e&&e.column)}function Pm(e){return ph(e&&e.start)+"-"+ph(e&&e.end)}function Rm(e){return e&&typeof e=="number"?e:1}class Et extends Error{constructor(t,s,i){super(),typeof s=="string"&&(i=s,s=void 0);let o="",l={},c=!1;if(s&&("line"in s&&"column"in s?l={place:s}:"start"in s&&"end"in s?l={place:s}:"type"in s?l={ancestors:[s],place:s.position}:l={...s}),typeof t=="string"?o=t:!l.cause&&t&&(c=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?l.ruleId=i:(l.source=i.slice(0,h),l.ruleId=i.slice(h+1))}if(!l.place&&l.ancestors&&l.ancestors){const h=l.ancestors[l.ancestors.length-1];h&&(l.place=h.position)}const u=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=u?u.line:void 0,this.name=fa(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Et.prototype.file="";Et.prototype.name="";Et.prototype.reason="";Et.prototype.message="";Et.prototype.stack="";Et.prototype.column=void 0;Et.prototype.line=void 0;Et.prototype.ancestors=void 0;Et.prototype.cause=void 0;Et.prototype.fatal=void 0;Et.prototype.place=void 0;Et.prototype.ruleId=void 0;Et.prototype.source=void 0;const ip={}.hasOwnProperty,t8=new Map,n8=/[A-Z]/g,s8=new Set(["table","tbody","thead","tfoot","tr"]),r8=new Set(["td","th"]),jy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function i8(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=p8(s,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");i=h8(s,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sp:Vw,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ny(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function Ny(e,t,s){if(t.type==="element")return a8(e,t,s);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return o8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return c8(e,t,s);if(t.type==="mdxjsEsm")return l8(e,t);if(t.type==="root")return u8(e,t,s);if(t.type==="text")return d8(e,t)}function a8(e,t,s){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=sp,e.schema=o),e.ancestors.push(t);const l=Cy(e,t.tagName,!1),c=f8(e,t);let u=op(e,t);return s8.has(t.tagName)&&(u=u.filter(function(h){return typeof h=="string"?!Mw(h):!0})),Sy(e,c,l,t),ap(c,u),e.ancestors.pop(),e.schema=i,e.create(t,l,c,s)}function o8(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ea(e,t.position)}function l8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ea(e,t.position)}function c8(e,t,s){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=sp,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:Cy(e,t.name,!0),c=m8(e,t),u=op(e,t);return Sy(e,c,l,t),ap(c,u),e.ancestors.pop(),e.schema=i,e.create(t,l,c,s)}function u8(e,t,s){const i={};return ap(i,op(e,t)),e.create(t,e.Fragment,i,s)}function d8(e,t){return t.value}function Sy(e,t,s,i){typeof s!="string"&&s!==e.Fragment&&e.passNode&&(t.node=i)}function ap(e,t){if(t.length>0){const s=t.length>1?t:t[0];s&&(e.children=s)}}function h8(e,t,s){return i;function i(o,l,c,u){const p=Array.isArray(c.children)?s:t;return u?p(l,c,u):p(l,c)}}function p8(e,t){return s;function s(i,o,l,c){const u=Array.isArray(l.children),h=rp(i);return t(o,l,c,u,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function f8(e,t){const s={};let i,o;for(o in t.properties)if(o!=="children"&&ip.call(t.properties,o)){const l=g8(e,o,t.properties[o]);if(l){const[c,u]=l;e.tableCellAlignToStyle&&c==="align"&&typeof u=="string"&&r8.has(t.tagName)?i=u:s[c]=u}}if(i){const l=s.style||(s.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return s}function m8(e,t){const s={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const c=l.expression;c.type;const u=c.properties[0];u.type,Object.assign(s,e.evaluater.evaluateExpression(u.argument))}else Ea(e,t.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const u=i.value.data.estree.body[0];u.type,l=e.evaluater.evaluateExpression(u.expression)}else Ea(e,t.position);else l=i.value===null?!0:i.value;s[o]=l}return s}function op(e,t){const s=[];let i=-1;const o=e.passKeys?new Map:t8;for(;++i<t.children.length;){const l=t.children[i];let c;if(e.passKeys){const h=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(h){const p=o.get(h)||0;c=h+"-"+p,o.set(h,p+1)}}const u=Ny(e,l,c);u!==void 0&&s.push(u)}return s}function g8(e,t,s){const i=Uw(e.schema,t);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=i.commaSeparated?Aw(s):Kw(s)),i.property==="style"){let o=typeof s=="object"?s:y8(e,String(s));return e.stylePropertyNameCase==="css"&&(o=x8(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?Dw[i.property]||i.property:i.attribute,s]}}function y8(e,t){try{return Jw(t,{reactCompat:!0})}catch(s){if(e.ignoreInvalidStyle)return{};const i=s,o=new Et("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=jy+"#cannot-parse-style-attribute",o}}function Cy(e,t,s){let i;if(!s)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,c;for(;++l<o.length;){const u=wm(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};c=c?{type:"MemberExpression",object:c,property:u,computed:!!(l&&u.type==="Literal"),optional:!1}:u}i=c}else i=wm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return ip.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ea(e)}function Ea(e,t){const s=new Et("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=jy+"#cannot-handle-mdx-estrees-without-createevaluater",s}function x8(e){const t={};let s;for(s in e)ip.call(e,s)&&(t[v8(s)]=e[s]);return t}function v8(e){let t=e.replace(n8,k8);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function k8(e){return"-"+e.toLowerCase()}const vd={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"]},w8={};function lp(e,t){const s=w8,i=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,o=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Ey(e,i,o)}function Ey(e,t,s){if(b8(e)){if("value"in e)return e.type==="html"&&!s?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Am(e.children,t,s)}return Array.isArray(e)?Am(e,t,s):""}function Am(e,t,s){const i=[];let o=-1;for(;++o<e.length;)i[o]=Ey(e[o],t,s);return i.join("")}function b8(e){return!!(e&&typeof e=="object")}const Im=document.createElement("i");function cp(e){const t="&"+e+";";Im.innerHTML=t;const s=Im.textContent;return s.charCodeAt(s.length-1)===59&&e!=="semi"||s===t?!1:s}function sn(e,t,s,i){const o=e.length;let l=0,c;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,s=s>0?s:0,i.length<1e4)c=Array.from(i),c.unshift(t,s),e.splice(...c);else for(s&&e.splice(t,s);l<i.length;)c=i.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function yn(e,t){return e.length>0?(sn(e,e.length,0,t),e):t}const Lm={}.hasOwnProperty;function Ty(e){const t={};let s=-1;for(;++s<e.length;)j8(t,e[s]);return t}function j8(e,t){let s;for(s in t){const o=(Lm.call(e,s)?e[s]:void 0)||(e[s]={}),l=t[s];let c;if(l)for(c in l){Lm.call(o,c)||(o[c]=[]);const u=l[c];N8(o[c],Array.isArray(u)?u:u?[u]:[])}}}function N8(e,t){let s=-1;const i=[];for(;++s<t.length;)(t[s].add==="after"?e:i).push(t[s]);sn(e,0,0,i)}function Py(e,t){const s=Number.parseInt(e,t);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function An(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const At=Ks(/[A-Za-z]/),jt=Ks(/[\dA-Za-z]/),S8=Ks(/[#-'*+\--9=?A-Z^-~]/);function Fl(e){return e!==null&&(e<32||e===127)}const fh=Ks(/\d/),C8=Ks(/[\dA-Fa-f]/),E8=Ks(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function We(e){return e!==null&&(e<0||e===32)}function Le(e){return e===-2||e===-1||e===32}const nc=Ks(/\p{P}|\p{S}/u),kr=Ks(/\s/);function Ks(e){return t;function t(s){return s!==null&&s>-1&&e.test(String.fromCharCode(s))}}function gi(e){const t=[];let s=-1,i=0,o=0;for(;++s<e.length;){const l=e.charCodeAt(s);let c="";if(l===37&&jt(e.charCodeAt(s+1))&&jt(e.charCodeAt(s+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(s+1);l<56320&&u>56319&&u<57344?(c=String.fromCharCode(l,u),o=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(i,s),encodeURIComponent(c)),i=s+o+1,c=""),o&&(s+=o,o=0)}return t.join("")+e.slice(i)}function _e(e,t,s,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(h){return Le(h)?(e.enter(s),u(h)):t(h)}function u(h){return Le(h)&&l++<o?(e.consume(h),u):(e.exit(s),t(h))}}const T8={tokenize:P8};function P8(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let s;return t;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),_e(e,t,"linePrefix")}function o(u){return e.enter("paragraph"),l(u)}function l(u){const h=e.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=h),s=h,c(u)}function c(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return je(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),c)}}const R8={tokenize:A8},_m={tokenize:I8};function A8(e){const t=this,s=[];let i=0,o,l,c;return u;function u(T){if(i<s.length){const A=s[i];return t.containerState=A[1],e.attempt(A[0].continuation,h,p)(T)}return p(T)}function h(T){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&S();const A=t.events.length;let q=A,R;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){R=t.events[q][1].end;break}N(i);let M=A;for(;M<t.events.length;)t.events[M][1].end={...R},M++;return sn(t.events,q+1,0,t.events.slice(A)),t.events.length=M,p(T)}return u(T)}function p(T){if(i===s.length){if(!o)return x(T);if(o.currentConstruct&&o.currentConstruct.concrete)return k(T);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_m,m,f)(T)}function m(T){return o&&S(),N(i),x(T)}function f(T){return t.parser.lazy[t.now().line]=i!==s.length,c=t.now().offset,k(T)}function x(T){return t.containerState={},e.attempt(_m,y,k)(T)}function y(T){return i++,s.push([t.currentConstruct,t.containerState]),x(T)}function k(T){if(T===null){o&&S(),N(0),e.consume(T);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),w(T)}function w(T){if(T===null){j(e.exit("chunkFlow"),!0),N(0),e.consume(T);return}return je(T)?(e.consume(T),j(e.exit("chunkFlow")),i=0,t.interrupt=void 0,u):(e.consume(T),w)}function j(T,A){const q=t.sliceStream(T);if(A&&q.push(null),T.previous=l,l&&(l.next=T),l=T,o.defineSkip(T.start),o.write(q),t.parser.lazy[T.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<c&&(!o.events[R][1].end||o.events[R][1].end.offset>c))return;const M=t.events.length;let L=M,B,z;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(B){z=t.events[L][1].end;break}B=!0}for(N(i),R=M;R<t.events.length;)t.events[R][1].end={...z},R++;sn(t.events,L+1,0,t.events.slice(M)),t.events.length=R}}function N(T){let A=s.length;for(;A-- >T;){const q=s[A];t.containerState=q[1],q[0].exit.call(t,e)}s.length=T}function S(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function I8(e,t,s){return _e(e,e.attempt(this.parser.constructs.document,t,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function di(e){if(e===null||We(e)||kr(e))return 1;if(nc(e))return 2}function sc(e,t,s){const i=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!i.includes(l)&&(t=l(t,s),i.push(l))}return t}const mh={name:"attention",resolveAll:L8,tokenize:_8};function L8(e,t){let s=-1,i,o,l,c,u,h,p,m;for(;++s<e.length;)if(e[s][0]==="enter"&&e[s][1].type==="attentionSequence"&&e[s][1]._close){for(i=s;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[s][1]).charCodeAt(0)){if((e[i][1]._close||e[s][1]._open)&&(e[s][1].end.offset-e[s][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[s][1].end.offset-e[s][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[s][1].end.offset-e[s][1].start.offset>1?2:1;const f={...e[i][1].end},x={...e[s][1].start};zm(f,-h),zm(x,h),c={type:h>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},u={type:h>1?"strongSequence":"emphasisSequence",start:{...e[s][1].start},end:x},l={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[s][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...u.end}},e[i][1].end={...c.start},e[s][1].start={...u.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=yn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=yn(p,[["enter",o,t],["enter",c,t],["exit",c,t],["enter",l,t]]),p=yn(p,sc(t.parser.constructs.insideSpan.null,e.slice(i+1,s),t)),p=yn(p,[["exit",l,t],["enter",u,t],["exit",u,t],["exit",o,t]]),e[s][1].end.offset-e[s][1].start.offset?(m=2,p=yn(p,[["enter",e[s][1],t],["exit",e[s][1],t]])):m=0,sn(e,i-1,s-i+3,p),s=i+p.length-m-2;break}}for(s=-1;++s<e.length;)e[s][1].type==="attentionSequence"&&(e[s][1].type="data");return e}function _8(e,t){const s=this.parser.constructs.attentionMarkers.null,i=this.previous,o=di(i);let l;return c;function c(h){return l=h,e.enter("attentionSequence"),u(h)}function u(h){if(h===l)return e.consume(h),u;const p=e.exit("attentionSequence"),m=di(h),f=!m||m===2&&o||s.includes(h),x=!o||o===2&&m||s.includes(i);return p._open=!!(l===42?f:f&&(o||!x)),p._close=!!(l===42?x:x&&(m||!f)),t(h)}}function zm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const z8={name:"autolink",tokenize:M8};function M8(e,t,s){let i=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(y){return At(y)?(e.consume(y),c):y===64?s(y):p(y)}function c(y){return y===43||y===45||y===46||jt(y)?(i=1,u(y)):p(y)}function u(y){return y===58?(e.consume(y),i=0,h):(y===43||y===45||y===46||jt(y))&&i++<32?(e.consume(y),u):(i=0,p(y))}function h(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Fl(y)?s(y):(e.consume(y),h)}function p(y){return y===64?(e.consume(y),m):S8(y)?(e.consume(y),p):s(y)}function m(y){return jt(y)?f(y):s(y)}function f(y){return y===46?(e.consume(y),i=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):x(y)}function x(y){if((y===45||jt(y))&&i++<63){const k=y===45?x:f;return e.consume(y),k}return s(y)}}const Oa={partial:!0,tokenize:F8};function F8(e,t,s){return i;function i(l){return Le(l)?_e(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||je(l)?t(l):s(l)}}const Ry={continuation:{tokenize:O8},exit:D8,name:"blockQuote",tokenize:$8};function $8(e,t,s){const i=this;return o;function o(c){if(c===62){const u=i.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return s(c)}function l(c){return Le(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function O8(e,t,s){const i=this;return o;function o(c){return Le(c)?_e(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(Ry,t,s)(c)}}function D8(e){e.exit("blockQuote")}const Ay={name:"characterEscape",tokenize:B8};function B8(e,t,s){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return E8(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):s(l)}}const Iy={name:"characterReference",tokenize:q8};function q8(e,t,s){const i=this;let o=0,l,c;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),h}function h(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),l=31,c=jt,m(f))}function p(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=C8,m):(e.enter("characterReferenceValue"),l=7,c=fh,m(f))}function m(f){if(f===59&&o){const x=e.exit("characterReferenceValue");return c===jt&&!cp(i.sliceSerialize(x))?s(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(f)&&o++<l?(e.consume(f),m):s(f)}}const Mm={partial:!0,tokenize:W8},Fm={concrete:!0,name:"codeFenced",tokenize:U8};function U8(e,t,s){const i=this,o={partial:!0,tokenize:q};let l=0,c=0,u;return h;function h(R){return p(R)}function p(R){const M=i.events[i.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,u=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(R)}function m(R){return R===u?(c++,e.consume(R),m):c<3?s(R):(e.exit("codeFencedFenceSequence"),Le(R)?_e(e,f,"whitespace")(R):f(R))}function f(R){return R===null||je(R)?(e.exit("codeFencedFence"),i.interrupt?t(R):e.check(Mm,w,A)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(R)):Le(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,y,"whitespace")(R)):R===96&&R===u?s(R):(e.consume(R),x)}function y(R){return R===null||je(R)?f(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(R))}function k(R){return R===null||je(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(R)):R===96&&R===u?s(R):(e.consume(R),k)}function w(R){return e.attempt(o,A,j)(R)}function j(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),N}function N(R){return l>0&&Le(R)?_e(e,S,"linePrefix",l+1)(R):S(R)}function S(R){return R===null||je(R)?e.check(Mm,w,A)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||je(R)?(e.exit("codeFlowValue"),S(R)):(e.consume(R),T)}function A(R){return e.exit("codeFenced"),t(R)}function q(R,M,L){let B=0;return z;function z(X){return R.enter("lineEnding"),R.consume(X),R.exit("lineEnding"),O}function O(X){return R.enter("codeFencedFence"),Le(X)?_e(R,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):U(X)}function U(X){return X===u?(R.enter("codeFencedFenceSequence"),ne(X)):L(X)}function ne(X){return X===u?(B++,R.consume(X),ne):B>=c?(R.exit("codeFencedFenceSequence"),Le(X)?_e(R,Z,"whitespace")(X):Z(X)):L(X)}function Z(X){return X===null||je(X)?(R.exit("codeFencedFence"),M(X)):L(X)}}}function W8(e,t,s){const i=this;return o;function o(c){return c===null?s(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return i.parser.lazy[i.now().line]?s(c):t(c)}}const kd={name:"codeIndented",tokenize:V8},H8={partial:!0,tokenize:K8};function V8(e,t,s){const i=this;return o;function o(p){return e.enter("codeIndented"),_e(e,l,"linePrefix",5)(p)}function l(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(p):s(p)}function c(p){return p===null?h(p):je(p)?e.attempt(H8,c,h)(p):(e.enter("codeFlowValue"),u(p))}function u(p){return p===null||je(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),u)}function h(p){return e.exit("codeIndented"),t(p)}}function K8(e,t,s){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?s(c):je(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):_e(e,l,"linePrefix",5)(c)}function l(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):je(c)?o(c):s(c)}}const Q8={name:"codeText",previous:Y8,resolve:G8,tokenize:Z8};function G8(e){let t=e.length-4,s=3,i,o;if((e[s][1].type==="lineEnding"||e[s][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=s;++i<t;)if(e[i][1].type==="codeTextData"){e[s][1].type="codeTextPadding",e[t][1].type="codeTextPadding",s+=2,t-=2;break}}for(i=s-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function Y8(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Z8(e,t,s){let i=0,o,l;return c;function c(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),i++,u):(e.exit("codeTextSequence"),h(f))}function h(f){return f===null?s(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),h):f===96?(l=e.enter("codeTextSequence"),o=0,m(f)):je(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(f))}function p(f){return f===null||f===32||f===96||je(f)?(e.exit("codeTextData"),h(f)):(e.consume(f),p)}function m(f){return f===96?(e.consume(f),o++,m):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(l.type="codeTextData",p(f))}}class X8{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,s){const i=s??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,s,i){const o=s||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&ca(this.left,i),l.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),ca(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ca(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 s=this.left.splice(t,Number.POSITIVE_INFINITY);ca(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ca(this.left,s.reverse())}}}function ca(e,t){let s=0;if(t.length<1e4)e.push(...t);else for(;s<t.length;)e.push(...t.slice(s,s+1e4)),s+=1e4}function Ly(e){const t={};let s=-1,i,o,l,c,u,h,p;const m=new X8(e);for(;++s<m.length;){for(;s in t;)s=t[s];if(i=m.get(s),s&&i[1].type==="chunkFlow"&&m.get(s-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,l=0,l<h.length&&h[l][1].type==="lineEndingBlank"&&(l+=2),l<h.length&&h[l][1].type==="content"))for(;++l<h.length&&h[l][1].type!=="content";)h[l][1].type==="chunkText"&&(h[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,J8(m,s)),s=t[s],p=!0);else if(i[1]._container){for(l=s,o=void 0;l--;)if(c=m.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...m.get(o)[1].start},u=m.slice(o,s),u.unshift(i),m.splice(o,s-o+1,u))}}return sn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function J8(e,t){const s=e.get(t)[1],i=e.get(t)[2];let o=t-1;const l=[];let c=s._tokenizer;c||(c=i.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const u=c.events,h=[],p={};let m,f,x=-1,y=s,k=0,w=0;const j=[w];for(;y;){for(;e.get(++o)[1]!==y;);l.push(o),y._tokenizer||(m=i.sliceStream(y),y.next||m.push(null),f&&c.defineSkip(y.start),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),y._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),f=y,y=y.next}for(y=s;++x<u.length;)u[x][0]==="exit"&&u[x-1][0]==="enter"&&u[x][1].type===u[x-1][1].type&&u[x][1].start.line!==u[x][1].end.line&&(w=x+1,j.push(w),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(c.events=[],y?(y._tokenizer=void 0,y.previous=void 0):j.pop(),x=j.length;x--;){const N=u.slice(j[x],j[x+1]),S=l.pop();h.push([S,S+N.length-1]),e.splice(S,2,N)}for(h.reverse(),x=-1;++x<h.length;)p[k+h[x][0]]=k+h[x][1],k+=h[x][1]-h[x][0]-1;return p}const eb={resolve:nb,tokenize:sb},tb={partial:!0,tokenize:rb};function nb(e){return Ly(e),e}function sb(e,t){let s;return i;function i(u){return e.enter("content"),s=e.enter("chunkContent",{contentType:"content"}),o(u)}function o(u){return u===null?l(u):je(u)?e.check(tb,c,l)(u):(e.consume(u),o)}function l(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function c(u){return e.consume(u),e.exit("chunkContent"),s.next=e.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,o}}function rb(e,t,s){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),_e(e,l,"linePrefix")}function l(c){if(c===null||je(c))return s(c);const u=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(c):e.interrupt(i.parser.constructs.flow,s,t)(c)}}function _y(e,t,s,i,o,l,c,u,h){const p=h||Number.POSITIVE_INFINITY;let m=0;return f;function f(N){return N===60?(e.enter(i),e.enter(o),e.enter(l),e.consume(N),e.exit(l),x):N===null||N===32||N===41||Fl(N)?s(N):(e.enter(i),e.enter(c),e.enter(u),e.enter("chunkString",{contentType:"string"}),w(N))}function x(N){return N===62?(e.enter(l),e.consume(N),e.exit(l),e.exit(o),e.exit(i),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(N))}function y(N){return N===62?(e.exit("chunkString"),e.exit(u),x(N)):N===null||N===60||je(N)?s(N):(e.consume(N),N===92?k:y)}function k(N){return N===60||N===62||N===92?(e.consume(N),y):y(N)}function w(N){return!m&&(N===null||N===41||We(N))?(e.exit("chunkString"),e.exit(u),e.exit(c),e.exit(i),t(N)):m<p&&N===40?(e.consume(N),m++,w):N===41?(e.consume(N),m--,w):N===null||N===32||N===40||Fl(N)?s(N):(e.consume(N),N===92?j:w)}function j(N){return N===40||N===41||N===92?(e.consume(N),w):w(N)}}function zy(e,t,s,i,o,l){const c=this;let u=0,h;return p;function p(y){return e.enter(i),e.enter(o),e.consume(y),e.exit(o),e.enter(l),m}function m(y){return u>999||y===null||y===91||y===93&&!h||y===94&&!u&&"_hiddenFootnoteSupport"in c.parser.constructs?s(y):y===93?(e.exit(l),e.enter(o),e.consume(y),e.exit(o),e.exit(i),t):je(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===null||y===91||y===93||je(y)||u++>999?(e.exit("chunkString"),m(y)):(e.consume(y),h||(h=!Le(y)),y===92?x:f)}function x(y){return y===91||y===92||y===93?(e.consume(y),u++,f):f(y)}}function My(e,t,s,i,o,l){let c;return u;function u(x){return x===34||x===39||x===40?(e.enter(i),e.enter(o),e.consume(x),e.exit(o),c=x===40?41:x,h):s(x)}function h(x){return x===c?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),t):(e.enter(l),p(x))}function p(x){return x===c?(e.exit(l),h(c)):x===null?s(x):je(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),_e(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===c||x===null||je(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?f:m)}function f(x){return x===c||x===92?(e.consume(x),m):m(x)}}function ma(e,t){let s;return i;function i(o){return je(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s=!0,i):Le(o)?_e(e,i,s?"linePrefix":"lineSuffix")(o):t(o)}}const ib={name:"definition",tokenize:ob},ab={partial:!0,tokenize:lb};function ob(e,t,s){const i=this;let o;return l;function l(y){return e.enter("definition"),c(y)}function c(y){return zy.call(i,e,u,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return o=An(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),h):s(y)}function h(y){return We(y)?ma(e,p)(y):p(y)}function p(y){return _y(e,m,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(ab,f,f)(y)}function f(y){return Le(y)?_e(e,x,"whitespace")(y):x(y)}function x(y){return y===null||je(y)?(e.exit("definition"),i.parser.defined.push(o),t(y)):s(y)}}function lb(e,t,s){return i;function i(u){return We(u)?ma(e,o)(u):s(u)}function o(u){return My(e,l,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return Le(u)?_e(e,c,"whitespace")(u):c(u)}function c(u){return u===null||je(u)?t(u):s(u)}}const cb={name:"hardBreakEscape",tokenize:ub};function ub(e,t,s){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return je(l)?(e.exit("hardBreakEscape"),t(l)):s(l)}}const db={name:"headingAtx",resolve:hb,tokenize:pb};function hb(e,t){let s=e.length-2,i=3,o,l;return e[i][1].type==="whitespace"&&(i+=2),s-2>i&&e[s][1].type==="whitespace"&&(s-=2),e[s][1].type==="atxHeadingSequence"&&(i===s-1||s-4>i&&e[s-2][1].type==="whitespace")&&(s-=i+1===s?2:4),s>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[s][1].end},l={type:"chunkText",start:e[i][1].start,end:e[s][1].end,contentType:"text"},sn(e,i,s-i+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function pb(e,t,s){let i=0;return o;function o(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||We(m)?(e.exit("atxHeadingSequence"),u(m)):s(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||je(m)?(e.exit("atxHeading"),t(m)):Le(m)?_e(e,u,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),u(m))}function p(m){return m===null||m===35||We(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),p)}}const fb=["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"],$m=["pre","script","style","textarea"],mb={concrete:!0,name:"htmlFlow",resolveTo:xb,tokenize:vb},gb={partial:!0,tokenize:wb},yb={partial:!0,tokenize:kb};function xb(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 vb(e,t,s){const i=this;let o,l,c,u,h;return p;function p(I){return m(I)}function m(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),f}function f(I){return I===33?(e.consume(I),x):I===47?(e.consume(I),l=!0,w):I===63?(e.consume(I),o=3,i.interrupt?t:P):At(I)?(e.consume(I),c=String.fromCharCode(I),j):s(I)}function x(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,u=0,k):At(I)?(e.consume(I),o=4,i.interrupt?t:P):s(I)}function y(I){return I===45?(e.consume(I),i.interrupt?t:P):s(I)}function k(I){const pe="CDATA[";return I===pe.charCodeAt(u++)?(e.consume(I),u===pe.length?i.interrupt?t:U:k):s(I)}function w(I){return At(I)?(e.consume(I),c=String.fromCharCode(I),j):s(I)}function j(I){if(I===null||I===47||I===62||We(I)){const pe=I===47,me=c.toLowerCase();return!pe&&!l&&$m.includes(me)?(o=1,i.interrupt?t(I):U(I)):fb.includes(c.toLowerCase())?(o=6,pe?(e.consume(I),N):i.interrupt?t(I):U(I)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?s(I):l?S(I):T(I))}return I===45||jt(I)?(e.consume(I),c+=String.fromCharCode(I),j):s(I)}function N(I){return I===62?(e.consume(I),i.interrupt?t:U):s(I)}function S(I){return Le(I)?(e.consume(I),S):z(I)}function T(I){return I===47?(e.consume(I),z):I===58||I===95||At(I)?(e.consume(I),A):Le(I)?(e.consume(I),T):z(I)}function A(I){return I===45||I===46||I===58||I===95||jt(I)?(e.consume(I),A):q(I)}function q(I){return I===61?(e.consume(I),R):Le(I)?(e.consume(I),q):T(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?s(I):I===34||I===39?(e.consume(I),h=I,M):Le(I)?(e.consume(I),R):L(I)}function M(I){return I===h?(e.consume(I),h=null,B):I===null||je(I)?s(I):(e.consume(I),M)}function L(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||We(I)?q(I):(e.consume(I),L)}function B(I){return I===47||I===62||Le(I)?T(I):s(I)}function z(I){return I===62?(e.consume(I),O):s(I)}function O(I){return I===null||je(I)?U(I):Le(I)?(e.consume(I),O):s(I)}function U(I){return I===45&&o===2?(e.consume(I),he):I===60&&o===1?(e.consume(I),ce):I===62&&o===4?(e.consume(I),$):I===63&&o===3?(e.consume(I),P):I===93&&o===5?(e.consume(I),se):je(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(gb,Y,ne)(I)):I===null||je(I)?(e.exit("htmlFlowData"),ne(I)):(e.consume(I),U)}function ne(I){return e.check(yb,Z,Y)(I)}function Z(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),X}function X(I){return I===null||je(I)?ne(I):(e.enter("htmlFlowData"),U(I))}function he(I){return I===45?(e.consume(I),P):U(I)}function ce(I){return I===47?(e.consume(I),c="",Q):U(I)}function Q(I){if(I===62){const pe=c.toLowerCase();return $m.includes(pe)?(e.consume(I),$):U(I)}return At(I)&&c.length<8?(e.consume(I),c+=String.fromCharCode(I),Q):U(I)}function se(I){return I===93?(e.consume(I),P):U(I)}function P(I){return I===62?(e.consume(I),$):I===45&&o===2?(e.consume(I),P):U(I)}function $(I){return I===null||je(I)?(e.exit("htmlFlowData"),Y(I)):(e.consume(I),$)}function Y(I){return e.exit("htmlFlow"),t(I)}}function kb(e,t,s){const i=this;return o;function o(c){return je(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):s(c)}function l(c){return i.parser.lazy[i.now().line]?s(c):t(c)}}function wb(e,t,s){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Oa,t,s)}}const bb={name:"htmlText",tokenize:jb};function jb(e,t,s){const i=this;let o,l,c;return u;function u(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),h}function h(P){return P===33?(e.consume(P),p):P===47?(e.consume(P),q):P===63?(e.consume(P),T):At(P)?(e.consume(P),L):s(P)}function p(P){return P===45?(e.consume(P),m):P===91?(e.consume(P),l=0,k):At(P)?(e.consume(P),S):s(P)}function m(P){return P===45?(e.consume(P),y):s(P)}function f(P){return P===null?s(P):P===45?(e.consume(P),x):je(P)?(c=f,ce(P)):(e.consume(P),f)}function x(P){return P===45?(e.consume(P),y):f(P)}function y(P){return P===62?he(P):P===45?x(P):f(P)}function k(P){const $="CDATA[";return P===$.charCodeAt(l++)?(e.consume(P),l===$.length?w:k):s(P)}function w(P){return P===null?s(P):P===93?(e.consume(P),j):je(P)?(c=w,ce(P)):(e.consume(P),w)}function j(P){return P===93?(e.consume(P),N):w(P)}function N(P){return P===62?he(P):P===93?(e.consume(P),N):w(P)}function S(P){return P===null||P===62?he(P):je(P)?(c=S,ce(P)):(e.consume(P),S)}function T(P){return P===null?s(P):P===63?(e.consume(P),A):je(P)?(c=T,ce(P)):(e.consume(P),T)}function A(P){return P===62?he(P):T(P)}function q(P){return At(P)?(e.consume(P),R):s(P)}function R(P){return P===45||jt(P)?(e.consume(P),R):M(P)}function M(P){return je(P)?(c=M,ce(P)):Le(P)?(e.consume(P),M):he(P)}function L(P){return P===45||jt(P)?(e.consume(P),L):P===47||P===62||We(P)?B(P):s(P)}function B(P){return P===47?(e.consume(P),he):P===58||P===95||At(P)?(e.consume(P),z):je(P)?(c=B,ce(P)):Le(P)?(e.consume(P),B):he(P)}function z(P){return P===45||P===46||P===58||P===95||jt(P)?(e.consume(P),z):O(P)}function O(P){return P===61?(e.consume(P),U):je(P)?(c=O,ce(P)):Le(P)?(e.consume(P),O):B(P)}function U(P){return P===null||P===60||P===61||P===62||P===96?s(P):P===34||P===39?(e.consume(P),o=P,ne):je(P)?(c=U,ce(P)):Le(P)?(e.consume(P),U):(e.consume(P),Z)}function ne(P){return P===o?(e.consume(P),o=void 0,X):P===null?s(P):je(P)?(c=ne,ce(P)):(e.consume(P),ne)}function Z(P){return P===null||P===34||P===39||P===60||P===61||P===96?s(P):P===47||P===62||We(P)?B(P):(e.consume(P),Z)}function X(P){return P===47||P===62||We(P)?B(P):s(P)}function he(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):s(P)}function ce(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),Q}function Q(P){return Le(P)?_e(e,se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):se(P)}function se(P){return e.enter("htmlTextData"),c(P)}}const up={name:"labelEnd",resolveAll:Eb,resolveTo:Tb,tokenize:Pb},Nb={tokenize:Rb},Sb={tokenize:Ab},Cb={tokenize:Ib};function Eb(e){let t=-1;const s=[];for(;++t<e.length;){const i=e[t][1];if(s.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==s.length&&sn(e,0,e.length,s),e}function Tb(e,t){let s=e.length,i=0,o,l,c,u;for(;s--;)if(o=e[s][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[s][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[s][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=s,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=s);const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[c-2][1].start}};return u=[["enter",h,t],["enter",p,t]],u=yn(u,e.slice(l+1,l+i+3)),u=yn(u,[["enter",m,t]]),u=yn(u,sc(t.parser.constructs.insideSpan.null,e.slice(l+i+4,c-3),t)),u=yn(u,[["exit",m,t],e[c-2],e[c-1],["exit",p,t]]),u=yn(u,e.slice(c+1)),u=yn(u,[["exit",h,t]]),sn(e,l,e.length,u),e}function Pb(e,t,s){const i=this;let o=i.events.length,l,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return u;function u(x){return l?l._inactive?f(x):(c=i.parser.defined.includes(An(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),h):s(x)}function h(x){return x===40?e.attempt(Nb,m,c?m:f)(x):x===91?e.attempt(Sb,m,c?p:f)(x):c?m(x):f(x)}function p(x){return e.attempt(Cb,m,f)(x)}function m(x){return t(x)}function f(x){return l._balanced=!0,s(x)}}function Rb(e,t,s){return i;function i(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return We(f)?ma(e,l)(f):l(f)}function l(f){return f===41?m(f):_y(e,c,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function c(f){return We(f)?ma(e,h)(f):m(f)}function u(f){return s(f)}function h(f){return f===34||f===39||f===40?My(e,p,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):m(f)}function p(f){return We(f)?ma(e,m)(f):m(f)}function m(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):s(f)}}function Ab(e,t,s){const i=this;return o;function o(u){return zy.call(i,e,l,c,"reference","referenceMarker","referenceString")(u)}function l(u){return i.parser.defined.includes(An(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(u):s(u)}function c(u){return s(u)}}function Ib(e,t,s){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):s(l)}}const Lb={name:"labelStartImage",resolveAll:up.resolveAll,tokenize:_b};function _b(e,t,s){const i=this;return o;function o(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),c):s(u)}function c(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?s(u):t(u)}}const zb={name:"labelStartLink",resolveAll:up.resolveAll,tokenize:Mb};function Mb(e,t,s){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?s(c):t(c)}}const wd={name:"lineEnding",tokenize:Fb};function Fb(e,t){return s;function s(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const vl={name:"thematicBreak",tokenize:$b};function $b(e,t,s){let i=0,o;return l;function l(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,u(p)}function u(p){return p===o?(e.enter("thematicBreakSequence"),h(p)):i>=3&&(p===null||je(p))?(e.exit("thematicBreak"),t(p)):s(p)}function h(p){return p===o?(e.consume(p),i++,h):(e.exit("thematicBreakSequence"),Le(p)?_e(e,u,"whitespace")(p):u(p))}}const Bt={continuation:{tokenize:qb},exit:Wb,name:"list",tokenize:Bb},Ob={partial:!0,tokenize:Hb},Db={partial:!0,tokenize:Ub};function Bb(e,t,s){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return u;function u(y){const k=i.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||y===i.containerState.marker:fh(y)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(vl,s,p)(y):p(y);if(!i.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(y)}return s(y)}function h(y){return fh(y)&&++c<10?(e.consume(y),h):(!i.interrupt||c<2)&&(i.containerState.marker?y===i.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),p(y)):s(y)}function p(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||y,e.check(Oa,i.interrupt?s:m,e.attempt(Ob,x,f))}function m(y){return i.containerState.initialBlankLine=!0,l++,x(y)}function f(y){return Le(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),x):s(y)}function x(y){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function qb(e,t,s){const i=this;return i.containerState._closeFlow=void 0,e.check(Oa,o,l);function o(u){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,_e(e,t,"listItemIndent",i.containerState.size+1)(u)}function l(u){return i.containerState.furtherBlankLines||!Le(u)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(u)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Db,t,c)(u))}function c(u){return i.containerState._closeFlow=!0,i.interrupt=void 0,_e(e,e.attempt(Bt,t,s),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Ub(e,t,s){const i=this;return _e(e,o,"listItemIndent",i.containerState.size+1);function o(l){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?t(l):s(l)}}function Wb(e){e.exit(this.containerState.type)}function Hb(e,t,s){const i=this;return _e(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const c=i.events[i.events.length-1];return!Le(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):s(l)}}const Om={name:"setextUnderline",resolveTo:Vb,tokenize:Kb};function Vb(e,t){let s=e.length,i,o,l;for(;s--;)if(e[s][0]==="enter"){if(e[s][1].type==="content"){i=s;break}e[s][1].type==="paragraph"&&(o=s)}else e[s][1].type==="content"&&e.splice(s,1),!l&&e[s][1].type==="definition"&&(l=s);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",c,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=c,e.push(["exit",c,t]),e}function Kb(e,t,s){const i=this;let o;return l;function l(p){let m=i.events.length,f;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){f=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),o=p,c(p)):s(p)}function c(p){return e.enter("setextHeadingLineSequence"),u(p)}function u(p){return p===o?(e.consume(p),u):(e.exit("setextHeadingLineSequence"),Le(p)?_e(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||je(p)?(e.exit("setextHeadingLine"),t(p)):s(p)}}const Qb={tokenize:Gb};function Gb(e){const t=this,s=e.attempt(Oa,i,e.attempt(this.parser.constructs.flowInitial,o,_e(e,e.attempt(this.parser.constructs.flow,o,e.attempt(eb,o)),"linePrefix")));return s;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,s}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,s}}const Yb={resolveAll:$y()},Zb=Fy("string"),Xb=Fy("text");function Fy(e){return{resolveAll:$y(e==="text"?Jb:void 0),tokenize:t};function t(s){const i=this,o=this.parser.constructs[e],l=s.attempt(o,c,u);return c;function c(m){return p(m)?l(m):u(m)}function u(m){if(m===null){s.consume(m);return}return s.enter("data"),s.consume(m),h}function h(m){return p(m)?(s.exit("data"),l(m)):(s.consume(m),h)}function p(m){if(m===null)return!0;const f=o[m];let x=-1;if(f)for(;++x<f.length;){const y=f[x];if(!y.previous||y.previous.call(i,i.previous))return!0}return!1}}}function $y(e){return t;function t(s,i){let o=-1,l;for(;++o<=s.length;)l===void 0?s[o]&&s[o][1].type==="data"&&(l=o,o++):(!s[o]||s[o][1].type!=="data")&&(o!==l+2&&(s[l][1].end=s[o-1][1].end,s.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(s,i):s}}function Jb(e,t){let s=0;for(;++s<=e.length;)if((s===e.length||e[s][1].type==="lineEnding")&&e[s-1][1].type==="data"){const i=e[s-1][1],o=t.sliceStream(i);let l=o.length,c=-1,u=0,h;for(;l--;){const p=o[l];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)u++,c--;if(c)break;c=-1}else if(p===-2)h=!0,u++;else if(p!==-1){l++;break}}if(t._contentTypeTextTrailing&&s===e.length&&(u=0),u){const p={type:s===e.length||h||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:i.start._bufferIndex+c,_index:i.start._index+l,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(s,0,["enter",p,t],["exit",p,t]),s+=2)}s++}return e}const ej={42:Bt,43:Bt,45:Bt,48:Bt,49:Bt,50:Bt,51:Bt,52:Bt,53:Bt,54:Bt,55:Bt,56:Bt,57:Bt,62:Ry},tj={91:ib},nj={[-2]:kd,[-1]:kd,32:kd},sj={35:db,42:vl,45:[Om,vl],60:mb,61:Om,95:vl,96:Fm,126:Fm},rj={38:Iy,92:Ay},ij={[-5]:wd,[-4]:wd,[-3]:wd,33:Lb,38:Iy,42:mh,60:[z8,bb],91:zb,92:[cb,Ay],93:up,95:mh,96:Q8},aj={null:[mh,Yb]},oj={null:[42,95]},lj={null:[]},cj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oj,contentInitial:tj,disable:lj,document:ej,flow:sj,flowInitial:nj,insideSpan:aj,string:rj,text:ij},Symbol.toStringTag,{value:"Module"}));function uj(e,t,s){let i={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const o={},l=[];let c=[],u=[];const h={attempt:M(q),check:M(R),consume:S,enter:T,exit:A,interrupt:M(R,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:f};let m=t.tokenize.call(p,h);return t.resolveAll&&l.push(t),p;function f(O){return c=yn(c,O),j(),c[c.length-1]!==null?[]:(L(t,0),p.events=sc(l,p.events,p),p.events)}function x(O,U){return hj(y(O),U)}function y(O){return dj(c,O)}function k(){const{_bufferIndex:O,_index:U,line:ne,column:Z,offset:X}=i;return{_bufferIndex:O,_index:U,line:ne,column:Z,offset:X}}function w(O){o[O.line]=O.column,z()}function j(){let O;for(;i._index<c.length;){const U=c[i._index];if(typeof U=="string")for(O=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===O&&i._bufferIndex<U.length;)N(U.charCodeAt(i._bufferIndex));else N(U)}}function N(O){m=m(O)}function S(O){je(O)?(i.line++,i.column=1,i.offset+=O===-3?2:1,z()):O!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=O}function T(O,U){const ne=U||{};return ne.type=O,ne.start=k(),p.events.push(["enter",ne,p]),u.push(ne),ne}function A(O){const U=u.pop();return U.end=k(),p.events.push(["exit",U,p]),U}function q(O,U){L(O,U.from)}function R(O,U){U.restore()}function M(O,U){return ne;function ne(Z,X,he){let ce,Q,se,P;return Array.isArray(Z)?Y(Z):"tokenize"in Z?Y([Z]):$(Z);function $(xe){return Pe;function Pe(Ee){const Ne=Ee!==null&&xe[Ee],Me=Ee!==null&&xe.null,st=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return Y(st)(Ee)}}function Y(xe){return ce=xe,Q=0,xe.length===0?he:I(xe[Q])}function I(xe){return Pe;function Pe(Ee){return P=B(),se=xe,xe.partial||(p.currentConstruct=xe),xe.name&&p.parser.constructs.disable.null.includes(xe.name)?me():xe.tokenize.call(U?Object.assign(Object.create(p),U):p,h,pe,me)(Ee)}}function pe(xe){return O(se,P),X}function me(xe){return P.restore(),++Q<ce.length?I(ce[Q]):he}}}function L(O,U){O.resolveAll&&!l.includes(O)&&l.push(O),O.resolve&&sn(p.events,U,p.events.length-U,O.resolve(p.events.slice(U),p)),O.resolveTo&&(p.events=O.resolveTo(p.events,p))}function B(){const O=k(),U=p.previous,ne=p.currentConstruct,Z=p.events.length,X=Array.from(u);return{from:Z,restore:he};function he(){i=O,p.previous=U,p.currentConstruct=ne,p.events.length=Z,u=X,z()}}function z(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function dj(e,t){const s=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let c;if(s===o)c=[e[s].slice(i,l)];else{if(c=e.slice(s,o),i>-1){const u=c[0];typeof u=="string"?c[0]=u.slice(i):c.shift()}l>0&&c.push(e[o].slice(0,l))}return c}function hj(e,t){let s=-1;const i=[];let o;for(;++s<e.length;){const l=e[s];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
484
- `;break}case-3:{c=`\r
485
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&o)continue;c=" ";break}default:c=String.fromCharCode(l)}o=l===-2,i.push(c)}return i.join("")}function pj(e){const i={constructs:Ty([cj,...(e||{}).extensions||[]]),content:o(T8),defined:[],document:o(R8),flow:o(Qb),lazy:{},string:o(Zb),text:o(Xb)};return i;function o(l){return c;function c(u){return uj(i,l,u)}}}function fj(e){for(;!Ly(e););return e}const Dm=/[\0\t\n\r]/g;function mj(){let e=1,t="",s=!0,i;return o;function o(l,c,u){const h=[];let p,m,f,x,y;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),f=0,t="",s&&(l.charCodeAt(0)===65279&&f++,s=void 0);f<l.length;){if(Dm.lastIndex=f,p=Dm.exec(l),x=p&&p.index!==void 0?p.index:l.length,y=l.charCodeAt(x),!p){t=l.slice(f);break}if(y===10&&f===x&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),f<x&&(h.push(l.slice(f,x)),e+=x-f),y){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}f=x+1}return u&&(i&&h.push(-5),t&&h.push(t),h.push(null)),h}}const gj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yj(e){return e.replace(gj,xj)}function xj(e,t,s){if(t)return t;if(s.charCodeAt(0)===35){const o=s.charCodeAt(1),l=o===120||o===88;return Py(s.slice(l?2:1),l?16:10)}return cp(s)||e}const Oy={}.hasOwnProperty;function vj(e,t,s){return t&&typeof t=="object"&&(s=t,t=void 0),kj(s)(fj(pj(s).document().write(mj()(e,t,!0))))}function kj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(_t),autolinkProtocol:B,autolinkEmail:B,atxHeading:l(Lt),blockQuote:l(Me),characterEscape:B,characterReference:B,codeFenced:l(st),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(st,c),codeText:l(It,c),codeTextData:B,data:B,codeFlowValue:B,definition:l(Ht),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(Ln),hardBreakEscape:l(kn),hardBreakTrailing:l(kn),htmlFlow:l(ln,c),htmlFlowData:B,htmlText:l(ln,c),htmlTextData:B,image:l(Vt),label:c,link:l(_t),listItem:l(cn),listItemValue:x,listOrdered:l(ht,f),listUnordered:l(ht),paragraph:l(wn),reference:I,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(Lt),strong:l(ls),thematicBreak:l(De)},exit:{atxHeading:h(),atxHeadingSequence:q,autolink:h(),autolinkEmail:Ne,autolinkProtocol:Ee,blockQuote:h(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:xe,characterReference:Pe,codeFenced:h(j),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:z,codeIndented:h(N),codeText:h(X),codeTextData:z,data:z,definition:h(),definitionDestinationString:A,definitionLabelString:S,definitionTitleString:T,emphasis:h(),hardBreakEscape:h(U),hardBreakTrailing:h(U),htmlFlow:h(ne),htmlFlowData:z,htmlText:h(Z),htmlTextData:z,image:h(ce),label:se,labelText:Q,lineEnding:O,link:h(he),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:pe,resourceDestinationString:P,resourceTitleString:$,resource:Y,setextHeading:h(L),setextHeadingLineSequence:M,setextHeadingText:R,strong:h(),thematicBreak:h()}};Dy(t,(e||{}).mdastExtensions||[]);const s={};return i;function i(G){let ie={type:"root",children:[]};const V={stack:[ie],tokenStack:[],config:t,enter:u,exit:p,buffer:c,resume:m,data:s},ve=[];let Re=-1;for(;++Re<G.length;)if(G[Re][1].type==="listOrdered"||G[Re][1].type==="listUnordered")if(G[Re][0]==="enter")ve.push(Re);else{const Ue=ve.pop();Re=o(G,Ue,Re)}for(Re=-1;++Re<G.length;){const Ue=t[G[Re][0]];Oy.call(Ue,G[Re][1].type)&&Ue[G[Re][1].type].call(Object.assign({sliceSerialize:G[Re][2].sliceSerialize},V),G[Re][1])}if(V.tokenStack.length>0){const Ue=V.tokenStack[V.tokenStack.length-1];(Ue[1]||Bm).call(V,void 0,Ue[0])}for(ie.position={start:Ps(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Ps(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)ie=t.transforms[Re](ie)||ie;return ie}function o(G,ie,V){let ve=ie-1,Re=-1,Ue=!1,lt,un,cs,Qs;for(;++ve<=V;){const gt=G[ve];switch(gt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{gt[0]==="enter"?Re++:Re--,Qs=void 0;break}case"lineEndingBlank":{gt[0]==="enter"&&(lt&&!Qs&&!Re&&!cs&&(cs=ve),Qs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qs=void 0}if(!Re&&gt[0]==="enter"&&gt[1].type==="listItemPrefix"||Re===-1&&gt[0]==="exit"&&(gt[1].type==="listUnordered"||gt[1].type==="listOrdered")){if(lt){let _n=ve;for(un=void 0;_n--;){const Kt=G[_n];if(Kt[1].type==="lineEnding"||Kt[1].type==="lineEndingBlank"){if(Kt[0]==="exit")continue;un&&(G[un][1].type="lineEndingBlank",Ue=!0),Kt[1].type="lineEnding",un=_n}else if(!(Kt[1].type==="linePrefix"||Kt[1].type==="blockQuotePrefix"||Kt[1].type==="blockQuotePrefixWhitespace"||Kt[1].type==="blockQuoteMarker"||Kt[1].type==="listItemIndent"))break}cs&&(!un||cs<un)&&(lt._spread=!0),lt.end=Object.assign({},un?G[un][1].start:gt[1].end),G.splice(un||ve,0,["exit",lt,gt[2]]),ve++,V++}if(gt[1].type==="listItemPrefix"){const _n={type:"listItem",_spread:!1,start:Object.assign({},gt[1].start),end:void 0};lt=_n,G.splice(ve,0,["enter",_n,gt[2]]),ve++,V++,cs=void 0,Qs=!0}}}return G[ie][1]._spread=Ue,V}function l(G,ie){return V;function V(ve){u.call(this,G(ve),ve),ie&&ie.call(this,ve)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(G,ie,V){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ie,V||void 0]),G.position={start:Ps(ie.start),end:void 0}}function h(G){return ie;function ie(V){G&&G.call(this,V),p.call(this,V)}}function p(G,ie){const V=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==G.type&&(ie?ie.call(this,G,ve[0]):(ve[1]||Bm).call(this,G,ve[0]));else throw new Error("Cannot close `"+G.type+"` ("+fa({start:G.start,end:G.end})+"): it’s not open");V.position.end=Ps(G.end)}function m(){return lp(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function x(G){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function y(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=G}function k(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=G}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/(\r?\n|\r)$/g,"")}function S(G){const ie=this.resume(),V=this.stack[this.stack.length-1];V.label=ie,V.identifier=An(this.sliceSerialize(G)).toLowerCase()}function T(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function A(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function q(G){const ie=this.stack[this.stack.length-1];if(!ie.depth){const V=this.sliceSerialize(G).length;ie.depth=V}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function M(G){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function B(G){const V=this.stack[this.stack.length-1].children;let ve=V[V.length-1];(!ve||ve.type!=="text")&&(ve=Hn(),ve.position={start:Ps(G.start),end:void 0},V.push(ve)),this.stack.push(ve)}function z(G){const ie=this.stack.pop();ie.value+=this.sliceSerialize(G),ie.position.end=Ps(G.end)}function O(G){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const V=ie.children[ie.children.length-1];V.position.end=Ps(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(B.call(this,G),z.call(this,G))}function U(){this.data.atHardBreak=!0}function ne(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function Z(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function X(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function he(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ce(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Q(G){const ie=this.sliceSerialize(G),V=this.stack[this.stack.length-2];V.label=yj(ie),V.identifier=An(ie).toLowerCase()}function se(){const G=this.stack[this.stack.length-1],ie=this.resume(),V=this.stack[this.stack.length-1];if(this.data.inReference=!0,V.type==="link"){const ve=G.children;V.children=ve}else V.alt=ie}function P(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function $(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function Y(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function pe(G){const ie=this.resume(),V=this.stack[this.stack.length-1];V.label=ie,V.identifier=An(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function me(G){this.data.characterReferenceType=G.type}function xe(G){const ie=this.sliceSerialize(G),V=this.data.characterReferenceType;let ve;V?(ve=Py(ie,V==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=cp(ie);const Re=this.stack[this.stack.length-1];Re.value+=ve}function Pe(G){const ie=this.stack.pop();ie.position.end=Ps(G.end)}function Ee(G){z.call(this,G);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(G)}function Ne(G){z.call(this,G);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(G)}function Me(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function It(){return{type:"inlineCode",value:""}}function Ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ln(){return{type:"emphasis",children:[]}}function Lt(){return{type:"heading",depth:0,children:[]}}function kn(){return{type:"break"}}function ln(){return{type:"html",value:""}}function Vt(){return{type:"image",title:null,url:"",alt:null}}function _t(){return{type:"link",title:null,url:"",children:[]}}function ht(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function cn(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function wn(){return{type:"paragraph",children:[]}}function ls(){return{type:"strong",children:[]}}function Hn(){return{type:"text",value:""}}function De(){return{type:"thematicBreak"}}}function Ps(e){return{line:e.line,column:e.column,offset:e.offset}}function Dy(e,t){let s=-1;for(;++s<t.length;){const i=t[s];Array.isArray(i)?Dy(e,i):wj(e,i)}}function wj(e,t){let s;for(s in t)if(Oy.call(t,s))switch(s){case"canContainEols":{const i=t[s];i&&e[s].push(...i);break}case"transforms":{const i=t[s];i&&e[s].push(...i);break}case"enter":case"exit":{const i=t[s];i&&Object.assign(e[s],i);break}}}function Bm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+fa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+fa({start:t.start,end:t.end})+") is still open")}function bj(e){const t=this;t.parser=s;function s(i){return vj(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jj(e,t){const s={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,s),e.applyData(t,s)}function Nj(e,t){const s={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,s),[e.applyData(t,s),{type:"text",value:`
486
- `}]}function Sj(e,t){const s=t.value?t.value+`
487
- `:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:s}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Cj(e,t){const s={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Ej(e,t){const s={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Tj(e,t){const s=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=gi(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let c,u=e.footnoteCounts.get(i);u===void 0?(u=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=l+1,u+=1,e.footnoteCounts.set(i,u);const h={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+o,id:s+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,p),e.applyData(t,p)}function Pj(e,t){const s={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Rj(e,t){if(e.options.allowDangerousHtml){const s={type:"raw",value:t.value};return e.patch(t,s),e.applyData(t,s)}}function By(e,t){const s=t.referenceType;let i="]";if(s==="collapsed"?i+="[]":s==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=i:o.push({type:"text",value:i}),o}function Aj(e,t){const s=String(t.identifier).toUpperCase(),i=e.definitionById.get(s);if(!i)return By(e,t);const o={src:gi(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function Ij(e,t){const s={src:gi(t.url)};t.alt!==null&&t.alt!==void 0&&(s.alt=t.alt),t.title!==null&&t.title!==void 0&&(s.title=t.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function Lj(e,t){const s={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,s);const i={type:"element",tagName:"code",properties:{},children:[s]};return e.patch(t,i),e.applyData(t,i)}function _j(e,t){const s=String(t.identifier).toUpperCase(),i=e.definitionById.get(s);if(!i)return By(e,t);const o={href:gi(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function zj(e,t){const s={href:gi(t.url)};t.title!==null&&t.title!==void 0&&(s.title=t.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Mj(e,t,s){const i=e.all(t),o=s?Fj(s):qy(t),l={},c=[];if(typeof t.checked=="boolean"){const m=i[0];let f;m&&m.type==="element"&&m.tagName==="p"?f=m:(f={type:"element",tagName:"p",properties:{},children:[]},i.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<i.length;){const m=i[u];(o||u!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
488
- `}),m.type==="element"&&m.tagName==="p"&&!o?c.push(...m.children):c.push(m)}const h=i[i.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
489
- `});const p={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,p),e.applyData(t,p)}function Fj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const s=e.children;let i=-1;for(;!t&&++i<s.length;)t=qy(s[i])}return t}function qy(e){const t=e.spread;return t??e.children.length>1}function $j(e,t){const s={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(s.start=t.start);++o<i.length;){const c=i[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:s,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Oj(e,t){const s={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Dj(e,t){const s={type:"root",children:e.wrap(e.all(t))};return e.patch(t,s),e.applyData(t,s)}function Bj(e,t){const s={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function qj(e,t){const s=e.all(t),i=s.shift(),o=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],c),o.push(c)}if(s.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(s,!0)},u=rp(t.children[1]),h=wy(t.children[t.children.length-1]);u&&h&&(c.position={start:u,end:h}),o.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function Uj(e,t,s){const i=s?s.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",c=s&&s.type==="table"?s.align:void 0,u=c?c.length:t.children.length;let h=-1;const p=[];for(;++h<u;){const f=t.children[h],x={},y=c?c[h]:void 0;y&&(x.align=y);let k={type:"element",tagName:l,properties:x,children:[]};f&&(k.children=e.all(f),e.patch(f,k),k=e.applyData(f,k)),p.push(k)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,m),e.applyData(t,m)}function Wj(e,t){const s={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}const qm=9,Um=32;function Hj(e){const t=String(e),s=/\r?\n|\r/g;let i=s.exec(t),o=0;const l=[];for(;i;)l.push(Wm(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=s.exec(t);return l.push(Wm(t.slice(o),o>0,!1)),l.join("")}function Wm(e,t,s){let i=0,o=e.length;if(t){let l=e.codePointAt(i);for(;l===qm||l===Um;)i++,l=e.codePointAt(i)}if(s){let l=e.codePointAt(o-1);for(;l===qm||l===Um;)o--,l=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function Vj(e,t){const s={type:"text",value:Hj(String(t.value))};return e.patch(t,s),e.applyData(t,s)}function Kj(e,t){const s={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,s),e.applyData(t,s)}const Qj={blockquote:jj,break:Nj,code:Sj,delete:Cj,emphasis:Ej,footnoteReference:Tj,heading:Pj,html:Rj,imageReference:Aj,image:Ij,inlineCode:Lj,linkReference:_j,link:zj,listItem:Mj,list:$j,paragraph:Oj,root:Dj,strong:Bj,table:qj,tableCell:Wj,tableRow:Uj,text:Vj,thematicBreak:Kj,toml:rl,yaml:rl,definition:rl,footnoteDefinition:rl};function rl(){}const Uy=-1,rc=0,ga=1,$l=2,dp=3,hp=4,pp=5,fp=6,Wy=7,Hy=8,Hm=typeof self=="object"?self:globalThis,Gj=(e,t)=>{const s=(o,l)=>(e.set(l,o),o),i=o=>{if(e.has(o))return e.get(o);const[l,c]=t[o];switch(l){case rc:case Uy:return s(c,o);case ga:{const u=s([],o);for(const h of c)u.push(i(h));return u}case $l:{const u=s({},o);for(const[h,p]of c)u[i(h)]=i(p);return u}case dp:return s(new Date(c),o);case hp:{const{source:u,flags:h}=c;return s(new RegExp(u,h),o)}case pp:{const u=s(new Map,o);for(const[h,p]of c)u.set(i(h),i(p));return u}case fp:{const u=s(new Set,o);for(const h of c)u.add(i(h));return u}case Wy:{const{name:u,message:h}=c;return s(new Hm[u](h),o)}case Hy:return s(BigInt(c),o);case"BigInt":return s(Object(BigInt(c)),o);case"ArrayBuffer":return s(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:u}=new Uint8Array(c);return s(new DataView(u),c)}}return s(new Hm[l](c),o)};return i},Vm=e=>Gj(new Map,e)(0),ti="",{toString:Yj}={},{keys:Zj}=Object,ua=e=>{const t=typeof e;if(t!=="object"||!e)return[rc,t];const s=Yj.call(e).slice(8,-1);switch(s){case"Array":return[ga,ti];case"Object":return[$l,ti];case"Date":return[dp,ti];case"RegExp":return[hp,ti];case"Map":return[pp,ti];case"Set":return[fp,ti];case"DataView":return[ga,s]}return s.includes("Array")?[ga,s]:s.includes("Error")?[Wy,s]:[$l,s]},il=([e,t])=>e===rc&&(t==="function"||t==="symbol"),Xj=(e,t,s,i)=>{const o=(c,u)=>{const h=i.push(c)-1;return s.set(u,h),h},l=c=>{if(s.has(c))return s.get(c);let[u,h]=ua(c);switch(u){case rc:{let m=c;switch(h){case"bigint":u=Hy,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return o([Uy],c)}return o([u,m],c)}case ga:{if(h){let x=c;return h==="DataView"?x=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(c)),o([h,[...x]],c)}const m=[],f=o([u,m],c);for(const x of c)m.push(l(x));return f}case $l:{if(h)switch(h){case"BigInt":return o([h,c.toString()],c);case"Boolean":case"Number":case"String":return o([h,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const m=[],f=o([u,m],c);for(const x of Zj(c))(e||!il(ua(c[x])))&&m.push([l(x),l(c[x])]);return f}case dp:return o([u,c.toISOString()],c);case hp:{const{source:m,flags:f}=c;return o([u,{source:m,flags:f}],c)}case pp:{const m=[],f=o([u,m],c);for(const[x,y]of c)(e||!(il(ua(x))||il(ua(y))))&&m.push([l(x),l(y)]);return f}case fp:{const m=[],f=o([u,m],c);for(const x of c)(e||!il(ua(x)))&&m.push(l(x));return f}}const{message:p}=c;return o([u,{name:h,message:p}],c)};return l},Km=(e,{json:t,lossy:s}={})=>{const i=[];return Xj(!(t||s),!!t,new Map,i)(e),i},Ol=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Vm(Km(e,t)):structuredClone(e):(e,t)=>Vm(Km(e,t));function Jj(e,t){const s=[{type:"text",value:"↩"}];return t>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),s}function e7(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function t7(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=e.options.footnoteBackContent||Jj,i=e.options.footnoteBackLabel||e7,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const m=e.all(p),f=String(p.identifier).toUpperCase(),x=gi(f.toLowerCase());let y=0;const k=[],w=e.footnoteCounts.get(f);for(;w!==void 0&&++y<=w;){k.length>0&&k.push({type:"text",value:" "});let S=typeof s=="string"?s:s(h,y);typeof S=="string"&&(S={type:"text",value:S}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,y),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const j=m[m.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const S=j.children[j.children.length-1];S&&S.type==="text"?S.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...k)}else m.push(...k);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(m,!0)};e.patch(p,N),u.push(N)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Ol(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
490
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
491
- `}]}}const Da=(function(e){if(e==null)return i7;if(typeof e=="function")return ic(e);if(typeof e=="object")return Array.isArray(e)?n7(e):s7(e);if(typeof e=="string")return r7(e);throw new Error("Expected function, string, or object as test")});function n7(e){const t=[];let s=-1;for(;++s<e.length;)t[s]=Da(e[s]);return ic(i);function i(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function s7(e){const t=e;return ic(s);function s(i){const o=i;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function r7(e){return ic(t);function t(s){return s&&s.type===e}}function ic(e){return t;function t(s,i,o){return!!(a7(s)&&e.call(this,s,typeof i=="number"?i:void 0,o||void 0))}}function i7(){return!0}function a7(e){return e!==null&&typeof e=="object"&&"type"in e}const Vy=[],o7=!0,gh=!1,l7="skip";function c7(e,t,s,i){let o;typeof t=="function"&&typeof s!="function"?(i=s,s=t):o=t;const l=Da(o),c=i?-1:1;u(e,void 0,[])();function u(h,p,m){const f=h&&typeof h=="object"?h:{};if(typeof f.type=="string"){const y=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(h.type+(y?"<"+y+">":""))+")"})}return x;function x(){let y=Vy,k,w,j;if((!t||l(h,p,m[m.length-1]||void 0))&&(y=u7(s(h,m)),y[0]===gh))return y;if("children"in h&&h.children){const N=h;if(N.children&&y[0]!==l7)for(w=(i?N.children.length:-1)+c,j=m.concat(N);w>-1&&w<N.children.length;){const S=N.children[w];if(k=u(S,w,j)(),k[0]===gh)return k;w=typeof k[1]=="number"?k[1]:w+c}}return y}}}function u7(e){return Array.isArray(e)?e:typeof e=="number"?[o7,e]:e==null?Vy:[e]}function mp(e,t,s,i){let o,l,c;typeof t=="function"&&typeof s!="function"?(l=void 0,c=t,o=s):(l=t,c=s,o=i),c7(e,l,u,o);function u(h,p){const m=p[p.length-1],f=m?m.children.indexOf(h):void 0;return c(h,f,m)}}const yh={}.hasOwnProperty,d7={};function h7(e,t){const s=t||d7,i=new Map,o=new Map,l=new Map,c={...Qj,...s.handlers},u={all:p,applyData:f7,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:c,one:h,options:s,patch:p7,wrap:g7};return mp(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const f=m.type==="definition"?i:o,x=String(m.identifier).toUpperCase();f.has(x)||f.set(x,m)}}),u;function h(m,f){const x=m.type,y=u.handlers[x];if(yh.call(u.handlers,x)&&y)return y(u,m,f);if(u.options.passThrough&&u.options.passThrough.includes(x)){if("children"in m){const{children:w,...j}=m,N=Ol(j);return N.children=u.all(m),N}return Ol(m)}return(u.options.unknownHandler||m7)(u,m,f)}function p(m){const f=[];if("children"in m){const x=m.children;let y=-1;for(;++y<x.length;){const k=u.one(x[y],m);if(k){if(y&&x[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Qm(k.value)),!Array.isArray(k)&&k.type==="element")){const w=k.children[0];w&&w.type==="text"&&(w.value=Qm(w.value))}Array.isArray(k)?f.push(...k):f.push(k)}}}return f}}function p7(e,t){e.position&&(t.position=e8(e))}function f7(e,t){let s=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(s.type==="element")s.tagName=i;else{const c="children"in s?s.children:[s];s={type:"element",tagName:i,properties:{},children:c}}s.type==="element"&&l&&Object.assign(s.properties,Ol(l)),"children"in s&&s.children&&o!==null&&o!==void 0&&(s.children=o)}return s}function m7(e,t){const s=t.data||{},i="value"in t&&!(yh.call(s,"hProperties")||yh.call(s,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function g7(e,t){const s=[];let i=-1;for(t&&s.push({type:"text",value:`
492
- `});++i<e.length;)i&&s.push({type:"text",value:`
493
- `}),s.push(e[i]);return t&&e.length>0&&s.push({type:"text",value:`
494
- `}),s}function Qm(e){let t=0,s=e.charCodeAt(t);for(;s===9||s===32;)t++,s=e.charCodeAt(t);return e.slice(t)}function Gm(e,t){const s=h7(e,t),i=s.one(e,void 0),o=t7(s),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
495
- `},o),l}function y7(e,t){return e&&"run"in e?async function(s,i){const o=Gm(s,{file:i,...t});await e.run(o,i)}:function(s,i){return Gm(s,{file:i,...e||t})}}function Ym(e){if(e)throw e}var bd,Zm;function x7(){if(Zm)return bd;Zm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,s=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},l=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),f=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!f)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},c=function(p,m){s&&m.name==="__proto__"?s(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},u=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return bd=function h(){var p,m,f,x,y,k,w=arguments[0],j=1,N=arguments.length,S=!1;for(typeof w=="boolean"&&(S=w,w=arguments[1]||{},j=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});j<N;++j)if(p=arguments[j],p!=null)for(m in p)f=u(w,m),x=u(p,m),w!==x&&(S&&x&&(l(x)||(y=o(x)))?(y?(y=!1,k=f&&o(f)?f:[]):k=f&&l(f)?f:{},c(w,{name:m,newValue:h(S,k,x)})):typeof x<"u"&&c(w,{name:m,newValue:x}));return w},bd}var v7=x7();const jd=Ph(v7);function xh(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 k7(){const e=[],t={run:s,use:i};return t;function s(...o){let l=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);u(null,...o);function u(h,...p){const m=e[++l];let f=-1;if(h){c(h);return}for(;++f<o.length;)(p[f]===null||p[f]===void 0)&&(p[f]=o[f]);o=p,m?w7(m,u)(...p):c(null,...p)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function w7(e,t){let s;return i;function i(...c){const u=e.length>c.length;let h;u&&c.push(o);try{h=e.apply(this,c)}catch(p){const m=p;if(u&&s)throw m;return o(m)}u||(h&&h.then&&typeof h.then=="function"?h.then(l,o):h instanceof Error?o(h):l(h))}function o(c,...u){s||(s=!0,t(c,...u))}function l(c){o(null,c)}}const Dn={basename:b7,dirname:j7,extname:N7,join:S7,sep:"/"};function b7(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ba(e);let s=0,i=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){s=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":e.slice(s,i)}if(t===e)return"";let c=-1,u=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){s=o+1;break}}else c<0&&(l=!0,c=o+1),u>-1&&(e.codePointAt(o)===t.codePointAt(u--)?u<0&&(i=o):(u=-1,i=c));return s===i?i=c:i<0&&(i=e.length),e.slice(s,i)}function j7(e){if(Ba(e),e.length===0)return".";let t=-1,s=e.length,i;for(;--s;)if(e.codePointAt(s)===47){if(i){t=s;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function N7(e){Ba(e);let t=e.length,s=-1,i=0,o=-1,l=0,c;for(;t--;){const u=e.codePointAt(t);if(u===47){if(c){i=t+1;break}continue}s<0&&(c=!0,s=t+1),u===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||s<0||l===0||l===1&&o===s-1&&o===i+1?"":e.slice(o,s)}function S7(...e){let t=-1,s;for(;++t<e.length;)Ba(e[t]),e[t]&&(s=s===void 0?e[t]:s+"/"+e[t]);return s===void 0?".":C7(s)}function C7(e){Ba(e);const t=e.codePointAt(0)===47;let s=E7(e,!t);return s.length===0&&!t&&(s="."),s.length>0&&e.codePointAt(e.length-1)===47&&(s+="/"),t?"/"+s:s}function E7(e,t){let s="",i=0,o=-1,l=0,c=-1,u,h;for(;++c<=e.length;){if(c<e.length)u=e.codePointAt(c);else{if(u===47)break;u=47}if(u===47){if(!(o===c-1||l===1))if(o!==c-1&&l===2){if(s.length<2||i!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(h=s.lastIndexOf("/"),h!==s.length-1){h<0?(s="",i=0):(s=s.slice(0,h),i=s.length-1-s.lastIndexOf("/")),o=c,l=0;continue}}else if(s.length>0){s="",i=0,o=c,l=0;continue}}t&&(s=s.length>0?s+"/..":"..",i=2)}else s.length>0?s+="/"+e.slice(o+1,c):s=e.slice(o+1,c),i=c-o-1;o=c,l=0}else u===46&&l>-1?l++:l=-1}return s}function Ba(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const T7={cwd:P7};function P7(){return"/"}function vh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function R7(e){if(typeof e=="string")e=new URL(e);else if(!vh(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 A7(e)}function A7(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let s=-1;for(;++s<t.length;)if(t.codePointAt(s)===37&&t.codePointAt(s+1)===50){const i=t.codePointAt(s+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Nd=["history","path","basename","stem","extname","dirname"];class Ky{constructor(t){let s;t?vh(t)?s={path:t}:typeof t=="string"||I7(t)?s={value:t}:s=t:s={},this.cwd="cwd"in s?"":T7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Nd.length;){const l=Nd[i];l in s&&s[l]!==void 0&&s[l]!==null&&(this[l]=l==="history"?[...s[l]]:s[l])}let o;for(o in s)Nd.includes(o)||(this[o]=s[o])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(t){Cd(t,"basename"),Sd(t,"basename"),this.path=Dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(t){Xm(this.basename,"dirname"),this.path=Dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(t){if(Sd(t,"extname"),Xm(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=Dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vh(t)&&(t=R7(t)),Cd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(t){Cd(t,"stem"),Sd(t,"stem"),this.path=Dn.join(this.dirname||"",t+(this.extname||""))}fail(t,s,i){const o=this.message(t,s,i);throw o.fatal=!0,o}info(t,s,i){const o=this.message(t,s,i);return o.fatal=void 0,o}message(t,s,i){const o=new Et(t,s,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sd(e,t){if(e&&e.includes(Dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dn.sep+"`")}function Cd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function I7(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L7=(function(e){const i=this.constructor.prototype,o=i[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),_7={}.hasOwnProperty;class gp extends L7{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=k7()}copy(){const t=new gp;let s=-1;for(;++s<this.attachers.length;){const i=this.attachers[s];t.use(...i)}return t.data(jd(!0,{},this.namespace)),t}data(t,s){return typeof t=="string"?arguments.length===2?(Pd("data",this.frozen),this.namespace[t]=s,this):_7.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Pd("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[s,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=s.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const s=al(t),i=this.parser||this.Parser;return Ed("parse",i),i(String(s),s)}process(t,s){const i=this;return this.freeze(),Ed("process",this.parser||this.Parser),Td("process",this.compiler||this.Compiler),s?o(void 0,s):new Promise(o);function o(l,c){const u=al(t),h=i.parse(u);i.run(h,u,function(m,f,x){if(m||!f||!x)return p(m);const y=f,k=i.stringify(y,x);F7(k)?x.value=k:x.result=k,p(m,x)});function p(m,f){m||!f?c(m):l?l(f):s(void 0,f)}}}processSync(t){let s=!1,i;return this.freeze(),Ed("processSync",this.parser||this.Parser),Td("processSync",this.compiler||this.Compiler),this.process(t,o),eg("processSync","process",s),i;function o(l,c){s=!0,Ym(l),i=c}}run(t,s,i){Jm(t),this.freeze();const o=this.transformers;return!i&&typeof s=="function"&&(i=s,s=void 0),i?l(void 0,i):new Promise(l);function l(c,u){const h=al(s);o.run(t,h,p);function p(m,f,x){const y=f||t;m?u(m):c?c(y):i(void 0,y,x)}}}runSync(t,s){let i=!1,o;return this.run(t,s,l),eg("runSync","run",i),o;function l(c,u){Ym(c),o=u,i=!0}}stringify(t,s){this.freeze();const i=al(s),o=this.compiler||this.Compiler;return Td("stringify",o),Jm(t),o(t,i)}use(t,...s){const i=this.attachers,o=this.namespace;if(Pd("use",this.frozen),t!=null)if(typeof t=="function")h(t,s);else if(typeof t=="object")Array.isArray(t)?u(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...f]=p;h(m,f)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(o.settings=jd(!0,o.settings,p.settings))}function u(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const f=p[m];l(f)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,m){let f=-1,x=-1;for(;++f<i.length;)if(i[f][0]===p){x=f;break}if(x===-1)i.push([p,...m]);else if(m.length>0){let[y,...k]=m;const w=i[x][1];xh(w)&&xh(y)&&(y=jd(!0,w,y)),i[x]=[p,y,...k]}}}}const z7=new gp().freeze();function Ed(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Td(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Pd(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 Jm(e){if(!xh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eg(e,t,s){if(!s)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function al(e){return M7(e)?e:new Ky(e)}function M7(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function F7(e){return typeof e=="string"||$7(e)}function $7(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const O7="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tg=[],ng={allowDangerousHtml:!0},D7=/^(https?|ircs?|mailto|xmpp)$/i,B7=[{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 Qy(e){const t=q7(e),s=U7(e);return W7(t.runSync(t.parse(s),s),e)}function q7(e){const t=e.rehypePlugins||tg,s=e.remarkPlugins||tg,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ng}:ng;return z7().use(bj).use(s).use(y7,i).use(t)}function U7(e){const t=e.children||"",s=new Ky;return typeof t=="string"&&(s.value=t),s}function W7(e,t){const s=t.allowedElements,i=t.allowElement,o=t.components,l=t.disallowedElements,c=t.skipHtml,u=t.unwrapDisallowed,h=t.urlTransform||H7;for(const m of B7)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+O7+m.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),mp(e,p),i8(e,{Fragment:n.Fragment,components:o,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function p(m,f,x){if(m.type==="raw"&&x&&typeof f=="number")return c?x.children.splice(f,1):x.children[f]={type:"text",value:m.value},f;if(m.type==="element"){let y;for(y in vd)if(Object.hasOwn(vd,y)&&Object.hasOwn(m.properties,y)){const k=m.properties[y],w=vd[y];(w===null||w.includes(m.tagName))&&(m.properties[y]=h(String(k||""),y,m))}}if(m.type==="element"){let y=s?!s.includes(m.tagName):l?l.includes(m.tagName):!1;if(!y&&i&&typeof f=="number"&&(y=!i(m,f,x)),y&&x&&typeof f=="number")return u&&m.children?x.children.splice(f,1,...m.children):x.children.splice(f,1),f}}}function H7(e){const t=e.indexOf(":"),s=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||s!==-1&&t>s||i!==-1&&t>i||D7.test(e.slice(0,t))?e:""}function sg(e,t){const s=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=s.indexOf(t);for(;o!==-1;)i++,o=s.indexOf(t,o+t.length);return i}function V7(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Gy=[],K7=!0,Rd=!1,kh="skip";function Q7(e,t,s,i){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let o,l,c,u;if(l=t,typeof l=="function")c=l;else if(l&&typeof l=="object"){if(!(l.enter===null||l.enter===void 0))if(typeof l.enter=="function")c=l.enter;else throw new Error("Unexpected value `"+l.enter+"` for `visitors.enter`, expected optional visitor");if(typeof l.exit=="function")u=l.exit;else throw new Error("Unexpected value `"+l.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+l+"` for `enter` or `visitors`, expected visitor or object with visitors");Da(o);const h=1;p(e,void 0,[])();function p(m,f,x){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const w=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(m.type+(w?"<"+w+">":""))+")"})}return k;function k(){const w=!o;let j=Gy;if(c&&w&&(j=rg(c(m,x,f)),j[0]===Rd))return j;if("children"in m&&m.children){const N=m;if(N.children&&j[0]!==kh){let S=-1+h;const T=[...x,N];for(;S>-1&&S<N.children.length;){const A=N.children[S],q=p(A,S,T)();if(q[0]===Rd)return q;S=typeof q[1]=="number"?q[1]:S+h}}}if(u&&w){const N=rg(u(m,x,f));if(N[0]===kh)throw new Error("Unexpected value `"+N[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(N[0]===Rd||typeof N[1]=="number")return N}return j}}}function rg(e){return Array.isArray(e)?e:typeof e=="number"?[K7,e]:e==null?Gy:[e]}function G7(e,t,s){const o=Da((s||{}).ignore||[]),l=Y7(t);let c=-1;for(;++c<l.length;)Q7(e,u);function u(p,m,f){if(p.type==="text"&&typeof f=="number")return h(p,m,f);if(o(p,f,m[m.length-1]))return kh}function h(p,m,f){const x=m[m.length-1],y=l[c][0],k=l[c][1];let w=0,j=!1,N=[];y.lastIndex=0;let S=y.exec(p.value);for(;S;){const A=S.index,q={index:S.index,input:S.input,stack:[...m,p]};let R=k(...S,q);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1)y.lastIndex=A+1;else{if(w!==A&&T({type:"text",value:p.value.slice(w,A)}),Array.isArray(R))for(const M of R)T(M);else R&&T(R);w=A+S[0].length,j=!0}if(!y.global)break;S=y.exec(p.value)}return j?(w<p.value.length&&T({type:"text",value:p.value.slice(w)}),x.children.splice(f,1,...N)):N=[p],f+N.length;function T(A){const q=N[N.length-1];q&&q.type==="text"&&A.type==="text"?q.value+=A.value:N.push(A)}}}function Y7(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],s=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<s.length;){const o=s[i];t.push([Z7(o[0]),X7(o[1])])}return t}function Z7(e){return typeof e=="string"?new RegExp(V7(e),"g"):e}function X7(e){return typeof e=="function"?e:function(){return e}}const Ad="phrasing",Id=["autolink","link","image","label"];function J7(){return{transforms:[a9],enter:{literalAutolink:t9,literalAutolinkEmail:Ld,literalAutolinkHttp:Ld,literalAutolinkWww:Ld},exit:{literalAutolink:i9,literalAutolinkEmail:r9,literalAutolinkHttp:n9,literalAutolinkWww:s9}}}function e9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ad,notInConstruct:Id},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ad,notInConstruct:Id},{character:":",before:"[ps]",after:"\\/",inConstruct:Ad,notInConstruct:Id}]}}function t9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ld(e){this.config.enter.autolinkProtocol.call(this,e)}function n9(e){this.config.exit.autolinkProtocol.call(this,e)}function s9(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 r9(e){this.config.exit.autolinkEmail.call(this,e)}function i9(e){this.exit(e)}function a9(e){G7(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o9],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,l9]],{ignore:["link","linkReference"]})}function o9(e,t,s,i,o){let l="";if(!Yy(o)||(/^w/i.test(t)&&(s=t+s,t="",l="http://"),!c9(s)))return!1;const c=u9(s+i);if(!c[0])return!1;const u={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[u,{type:"text",value:c[1]}]:u}function l9(e,t,s,i){return!Yy(i,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+s,children:[{type:"text",value:t+"@"+s}]}}function c9(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 u9(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let s=t[0],i=s.indexOf(")");const o=sg(e,"(");let l=sg(e,")");for(;i!==-1&&o>l;)e+=s.slice(0,i+1),s=s.slice(i+1),i=s.indexOf(")"),l++;return[e,s]}function Yy(e,t){const s=e.input.charCodeAt(e.index-1);return(e.index===0||kr(s)||nc(s))&&(!t||s!==47)}Zy.peek=v9;function d9(){this.buffer()}function h9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function p9(){this.buffer()}function f9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function m9(e){const t=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(e)).toLowerCase(),s.label=t}function g9(e){this.exit(e)}function y9(e){const t=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=An(this.sliceSerialize(e)).toLowerCase(),s.label=t}function x9(e){this.exit(e)}function v9(){return"["}function Zy(e,t,s,i){const o=s.createTracker(i);let l=o.move("[^");const c=s.enter("footnoteReference"),u=s.enter("reference");return l+=o.move(s.safe(s.associationId(e),{after:"]",before:l})),u(),c(),l+=o.move("]"),l}function k9(){return{enter:{gfmFootnoteCallString:d9,gfmFootnoteCall:h9,gfmFootnoteDefinitionLabelString:p9,gfmFootnoteDefinition:f9},exit:{gfmFootnoteCallString:m9,gfmFootnoteCall:g9,gfmFootnoteDefinitionLabelString:y9,gfmFootnoteDefinition:x9}}}function w9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:s,footnoteReference:Zy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(i,o,l,c){const u=l.createTracker(c);let h=u.move("[^");const p=l.enter("footnoteDefinition"),m=l.enter("label");return h+=u.move(l.safe(l.associationId(i),{before:h,after:"]"})),m(),h+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),h+=u.move((t?`
496
- `:" ")+l.indentLines(l.containerFlow(i,u.current()),t?Xy:b9))),p(),h}}function b9(e,t,s){return t===0?e:Xy(e,t,s)}function Xy(e,t,s){return(s?"":" ")+e}const j9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yp.attention=T9;yp.peek=P9;function N9(){return{canContainEols:["delete"],enter:{strikethrough:C9},exit:{strikethrough:E9}}}function S9(){return{handlers:{delete:yp},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:j9}]}}function C9(e){this.enter({type:"delete",children:[],position:void 0},e)}function E9(e){this.exit(e)}function yp(e,t,s,i){const o=s.createTracker(i),l=s.stack.includes("strikethrough")?"~":"~~",c=s.enter("strikethrough");let u=o.move(l);return u+=s.containerPhrasing(e,{...o.current(),before:u,after:"~"}),u+=o.move(l),c(),u}function T9(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function P9(){return"~"}function R9(e){return e.length}function A9(e,t){const s=t||{},i=(s.align||[]).concat(),o=s.stringLength||R9,l=[],c=[],u=[],h=[];let p=0,m=-1;for(;++m<e.length;){const w=[],j=[];let N=-1;for(e[m].length>p&&(p=e[m].length);++N<e[m].length;){const S=I9(e[m][N]);if(s.alignDelimiters!==!1){const T=o(S);j[N]=T,(h[N]===void 0||T>h[N])&&(h[N]=T)}w.push(S)}c[m]=w,u[m]=j}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<p;)l[f]=ig(i[f]);else{const w=ig(i);for(;++f<p;)l[f]=w}f=-1;const x=[],y=[];for(;++f<p;){const w=l[f];let j="",N="";w===99?(j=":",N=":"):w===108?j=":":w===114&&(N=":");let S=s.alignDelimiters===!1?1:Math.max(1,h[f]-j.length-N.length);const T=j+"-".repeat(S)+N;s.alignDelimiters!==!1&&(S=j.length+S+N.length,S>h[f]&&(h[f]=S),y[f]=S),x[f]=T}c.splice(1,0,x),u.splice(1,0,y),m=-1;const k=[];for(;++m<c.length;){const w=c[m],j=u[m];f=-1;const N=[];for(;++f<p;){const S=w[f]||"";let T="",A="";if(s.alignDelimiters!==!1){const q=h[f]-(j[f]||0),R=l[f];R===114?T=" ".repeat(q):R===99?q%2?(T=" ".repeat(q/2+.5),A=" ".repeat(q/2-.5)):(T=" ".repeat(q/2),A=T):A=" ".repeat(q)}s.delimiterStart!==!1&&!f&&N.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&S==="")&&(s.delimiterStart!==!1||f)&&N.push(" "),s.alignDelimiters!==!1&&N.push(T),N.push(S),s.alignDelimiters!==!1&&N.push(A),s.padding!==!1&&N.push(" "),(s.delimiterEnd!==!1||f!==p-1)&&N.push("|")}k.push(s.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return k.join(`
497
- `)}function I9(e){return e==null?"":String(e)}function ig(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 L9(e,t,s,i){const o=s.enter("blockquote"),l=s.createTracker(i);l.move("> "),l.shift(2);const c=s.indentLines(s.containerFlow(e,l.current()),_9);return o(),c}function _9(e,t,s){return">"+(s?"":" ")+e}function z9(e,t){return ag(e,t.inConstruct,!0)&&!ag(e,t.notInConstruct,!1)}function ag(e,t,s){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return s;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function og(e,t,s,i){let o=-1;for(;++o<s.unsafe.length;)if(s.unsafe[o].character===`
498
- `&&z9(s.stack,s.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
499
- `}function M9(e,t){const s=String(e);let i=s.indexOf(t),o=i,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>c&&(c=l):l=1,o=i+t.length,i=s.indexOf(t,o);return c}function F9(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 $9(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 O9(e,t,s,i){const o=$9(s),l=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(F9(e,s)){const f=s.enter("codeIndented"),x=s.indentLines(l,D9);return f(),x}const u=s.createTracker(i),h=o.repeat(Math.max(M9(l,o)+1,3)),p=s.enter("codeFenced");let m=u.move(h);if(e.lang){const f=s.enter(`codeFencedLang${c}`);m+=u.move(s.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=s.enter(`codeFencedMeta${c}`);m+=u.move(" "),m+=u.move(s.safe(e.meta,{before:m,after:`
500
- `,encode:["`"],...u.current()})),f()}return m+=u.move(`
501
- `),l&&(m+=u.move(l+`
502
- `)),m+=u.move(h),p(),m}function D9(e,t,s){return(s?"":" ")+e}function xp(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 B9(e,t,s,i){const o=xp(s),l=o==='"'?"Quote":"Apostrophe",c=s.enter("definition");let u=s.enter("label");const h=s.createTracker(i);let p=h.move("[");return p+=h.move(s.safe(s.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=s.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(s.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(u=s.enter("destinationRaw"),p+=h.move(s.safe(e.url,{before:p,after:e.title?" ":`
503
- `,...h.current()}))),u(),e.title&&(u=s.enter(`title${l}`),p+=h.move(" "+o),p+=h.move(s.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),u()),c(),p}function q9(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 Ta(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Dl(e,t,s){const i=di(e),o=di(t);return i===void 0?o===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Jy.peek=U9;function Jy(e,t,s,i){const o=q9(s),l=s.enter("emphasis"),c=s.createTracker(i),u=c.move(o);let h=c.move(s.containerPhrasing(e,{after:o,before:u,...c.current()}));const p=h.charCodeAt(0),m=Dl(i.before.charCodeAt(i.before.length-1),p,o);m.inside&&(h=Ta(p)+h.slice(1));const f=h.charCodeAt(h.length-1),x=Dl(i.after.charCodeAt(0),f,o);x.inside&&(h=h.slice(0,-1)+Ta(f));const y=c.move(o);return l(),s.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},u+h+y}function U9(e,t,s){return s.options.emphasis||"*"}function W9(e,t){let s=!1;return mp(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return s=!0,gh}),!!((!e.depth||e.depth<3)&&lp(e)&&(t.options.setext||s))}function H9(e,t,s,i){const o=Math.max(Math.min(6,e.depth||1),1),l=s.createTracker(i);if(W9(e,s)){const m=s.enter("headingSetext"),f=s.enter("phrasing"),x=s.containerPhrasing(e,{...l.current(),before:`
504
- `,after:`
505
- `});return f(),m(),x+`
506
- `+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
507
- `))+1))}const c="#".repeat(o),u=s.enter("headingAtx"),h=s.enter("phrasing");l.move(c+" ");let p=s.containerPhrasing(e,{before:"# ",after:`
508
- `,...l.current()});return/^[\t ]/.test(p)&&(p=Ta(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,s.options.closeAtx&&(p+=" "+c),h(),u(),p}ex.peek=V9;function ex(e){return e.value||""}function V9(){return"<"}tx.peek=K9;function tx(e,t,s,i){const o=xp(s),l=o==='"'?"Quote":"Apostrophe",c=s.enter("image");let u=s.enter("label");const h=s.createTracker(i);let p=h.move("![");return p+=h.move(s.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=s.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(s.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(u=s.enter("destinationRaw"),p+=h.move(s.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),u(),e.title&&(u=s.enter(`title${l}`),p+=h.move(" "+o),p+=h.move(s.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),u()),p+=h.move(")"),c(),p}function K9(){return"!"}nx.peek=Q9;function nx(e,t,s,i){const o=e.referenceType,l=s.enter("imageReference");let c=s.enter("label");const u=s.createTracker(i);let h=u.move("![");const p=s.safe(e.alt,{before:h,after:"]",...u.current()});h+=u.move(p+"]["),c();const m=s.stack;s.stack=[],c=s.enter("reference");const f=s.safe(s.associationId(e),{before:h,after:"]",...u.current()});return c(),s.stack=m,l(),o==="full"||!p||p!==f?h+=u.move(f+"]"):o==="shortcut"?h=h.slice(0,-1):h+=u.move("]"),h}function Q9(){return"!"}sx.peek=G9;function sx(e,t,s){let i=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<s.unsafe.length;){const c=s.unsafe[l],u=s.compilePattern(c);let h;if(c.atBreak)for(;h=u.exec(i);){let p=h.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(h.index+1)}}return o+i+o}function G9(){return"`"}function rx(e,t){const s=lp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(s===e.url||"mailto:"+s===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ix.peek=Y9;function ix(e,t,s,i){const o=xp(s),l=o==='"'?"Quote":"Apostrophe",c=s.createTracker(i);let u,h;if(rx(e,s)){const m=s.stack;s.stack=[],u=s.enter("autolink");let f=c.move("<");return f+=c.move(s.containerPhrasing(e,{before:f,after:">",...c.current()})),f+=c.move(">"),u(),s.stack=m,f}u=s.enter("link"),h=s.enter("label");let p=c.move("[");return p+=c.move(s.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=s.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(s.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=s.enter("destinationRaw"),p+=c.move(s.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=s.enter(`title${l}`),p+=c.move(" "+o),p+=c.move(s.safe(e.title,{before:p,after:o,...c.current()})),p+=c.move(o),h()),p+=c.move(")"),u(),p}function Y9(e,t,s){return rx(e,s)?"<":"["}ax.peek=Z9;function ax(e,t,s,i){const o=e.referenceType,l=s.enter("linkReference");let c=s.enter("label");const u=s.createTracker(i);let h=u.move("[");const p=s.containerPhrasing(e,{before:h,after:"]",...u.current()});h+=u.move(p+"]["),c();const m=s.stack;s.stack=[],c=s.enter("reference");const f=s.safe(s.associationId(e),{before:h,after:"]",...u.current()});return c(),s.stack=m,l(),o==="full"||!p||p!==f?h+=u.move(f+"]"):o==="shortcut"?h=h.slice(0,-1):h+=u.move("]"),h}function Z9(){return"["}function vp(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 X9(e){const t=vp(e),s=e.options.bulletOther;if(!s)return t==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+s+"`) to be different");return s}function J9(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 ox(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 eN(e,t,s,i){const o=s.enter("list"),l=s.bulletCurrent;let c=e.ordered?J9(s):vp(s);const u=e.ordered?c==="."?")":".":X9(s);let h=t&&s.bulletLastUsed?c===s.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(h=!0),ox(s)===c&&m){let f=-1;for(;++f<e.children.length;){const x=e.children[f];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=u),s.bulletCurrent=c;const p=s.containerFlow(e,i);return s.bulletLastUsed=c,s.bulletCurrent=l,o(),p}function tN(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 nN(e,t,s,i){const o=tN(s);let l=s.bulletCurrent||vp(s);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(s.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const u=s.createTracker(i);u.move(l+" ".repeat(c-l.length)),u.shift(c);const h=s.enter("listItem"),p=s.indentLines(s.containerFlow(e,u.current()),m);return h(),p;function m(f,x,y){return x?(y?"":" ".repeat(c))+f:(y?l:l+" ".repeat(c-l.length))+f}}function sN(e,t,s,i){const o=s.enter("paragraph"),l=s.enter("phrasing"),c=s.containerPhrasing(e,i);return l(),o(),c}const rN=Da(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iN(e,t,s,i){return(e.children.some(function(c){return rN(c)})?s.containerPhrasing:s.containerFlow).call(s,e,i)}function aN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}lx.peek=oN;function lx(e,t,s,i){const o=aN(s),l=s.enter("strong"),c=s.createTracker(i),u=c.move(o+o);let h=c.move(s.containerPhrasing(e,{after:o,before:u,...c.current()}));const p=h.charCodeAt(0),m=Dl(i.before.charCodeAt(i.before.length-1),p,o);m.inside&&(h=Ta(p)+h.slice(1));const f=h.charCodeAt(h.length-1),x=Dl(i.after.charCodeAt(0),f,o);x.inside&&(h=h.slice(0,-1)+Ta(f));const y=c.move(o+o);return l(),s.attentionEncodeSurroundingInfo={after:x.outside,before:m.outside},u+h+y}function oN(e,t,s){return s.options.strong||"*"}function lN(e,t,s,i){return s.safe(e.value,i)}function cN(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 uN(e,t,s){const i=(ox(s)+(s.options.ruleSpaces?" ":"")).repeat(cN(s));return s.options.ruleSpaces?i.slice(0,-1):i}const cx={blockquote:L9,break:og,code:O9,definition:B9,emphasis:Jy,hardBreak:og,heading:H9,html:ex,image:tx,imageReference:nx,inlineCode:sx,link:ix,linkReference:ax,list:eN,listItem:nN,paragraph:sN,root:iN,strong:lx,text:lN,thematicBreak:uN};function dN(){return{enter:{table:hN,tableData:lg,tableHeader:lg,tableRow:fN},exit:{codeText:mN,table:pN,tableData:_d,tableHeader:_d,tableRow:_d}}}function hN(e){const t=e._align;this.enter({type:"table",align:t.map(function(s){return s==="none"?null:s}),children:[]},e),this.data.inTable=!0}function pN(e){this.exit(e),this.data.inTable=void 0}function fN(e){this.enter({type:"tableRow",children:[]},e)}function _d(e){this.exit(e)}function lg(e){this.enter({type:"tableCell",children:[]},e)}function mN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gN));const s=this.stack[this.stack.length-1];s.type,s.value=t,this.exit(e)}function gN(e,t){return t==="|"?t:e}function yN(e){const t=e||{},s=t.tableCellPadding,i=t.tablePipeAlign,o=t.stringLength,l=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
509
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:h,tableRow:u}};function c(y,k,w,j){return p(m(y,w,j),y.align)}function u(y,k,w,j){const N=f(y,w,j),S=p([N]);return S.slice(0,S.indexOf(`
510
- `))}function h(y,k,w,j){const N=w.enter("tableCell"),S=w.enter("phrasing"),T=w.containerPhrasing(y,{...j,before:l,after:l});return S(),N(),T}function p(y,k){return A9(y,{align:k,alignDelimiters:i,padding:s,stringLength:o})}function m(y,k,w){const j=y.children;let N=-1;const S=[],T=k.enter("table");for(;++N<j.length;)S[N]=f(j[N],k,w);return T(),S}function f(y,k,w){const j=y.children;let N=-1;const S=[],T=k.enter("tableRow");for(;++N<j.length;)S[N]=h(j[N],y,k,w);return T(),S}function x(y,k,w){let j=cx.inlineCode(y,k,w);return w.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function xN(){return{exit:{taskListCheckValueChecked:cg,taskListCheckValueUnchecked:cg,paragraph:kN}}}function vN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:wN}}}function cg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function kN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const i=s.children[0];if(i&&i.type==="text"){const o=t.children;let l=-1,c;for(;++l<o.length;){const u=o[l];if(u.type==="paragraph"){c=u;break}}c===s&&(i.value=i.value.slice(1),i.value.length===0?s.children.shift():s.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,s.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function wN(e,t,s,i){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",u=s.createTracker(i);l&&u.move(c);let h=cx.listItem(e,t,s,{...i,...u.current()});return l&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(m){return m+c}}function bN(){return[J7(),k9(),N9(),dN(),xN()]}function jN(e){return{extensions:[e9(),w9(e),S9(),yN(e),vN()]}}const NN={tokenize:RN,partial:!0},ux={tokenize:AN,partial:!0},dx={tokenize:IN,partial:!0},hx={tokenize:LN,partial:!0},SN={tokenize:_N,partial:!0},px={name:"wwwAutolink",tokenize:TN,previous:mx},fx={name:"protocolAutolink",tokenize:PN,previous:gx},os={name:"emailAutolink",tokenize:EN,previous:yx},Wn={};function CN(){return{text:Wn}}let cr=48;for(;cr<123;)Wn[cr]=os,cr++,cr===58?cr=65:cr===91&&(cr=97);Wn[43]=os;Wn[45]=os;Wn[46]=os;Wn[95]=os;Wn[72]=[os,fx];Wn[104]=[os,fx];Wn[87]=[os,px];Wn[119]=[os,px];function EN(e,t,s){const i=this;let o,l;return c;function c(f){return!wh(f)||!yx.call(i,i.previous)||kp(i.events)?s(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return wh(f)?(e.consume(f),u):f===64?(e.consume(f),h):s(f)}function h(f){return f===46?e.check(SN,m,p)(f):f===45||f===95||jt(f)?(l=!0,e.consume(f),h):m(f)}function p(f){return e.consume(f),o=!0,h}function m(f){return l&&o&&At(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):s(f)}}function TN(e,t,s){const i=this;return o;function o(c){return c!==87&&c!==119||!mx.call(i,i.previous)||kp(i.events)?s(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(NN,e.attempt(ux,e.attempt(dx,l),s),s)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function PN(e,t,s){const i=this;let o="",l=!1;return c;function c(f){return(f===72||f===104)&&gx.call(i,i.previous)&&!kp(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),u):s(f)}function u(f){if(At(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(f),h}return s(f)}function h(f){return f===47?(e.consume(f),l?p:(l=!0,h)):s(f)}function p(f){return f===null||Fl(f)||We(f)||kr(f)||nc(f)?s(f):e.attempt(ux,e.attempt(dx,m),s)(f)}function m(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function RN(e,t,s){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),l):s(c)}function l(c){return c===null?s(c):t(c)}}function AN(e,t,s){let i,o,l;return c;function c(p){return p===46||p===95?e.check(hx,h,u)(p):p===null||We(p)||kr(p)||p!==45&&nc(p)?h(p):(l=!0,e.consume(p),c)}function u(p){return p===95?i=!0:(o=i,i=void 0),e.consume(p),c}function h(p){return o||i||!l?s(p):t(p)}}function IN(e,t){let s=0,i=0;return o;function o(c){return c===40?(s++,e.consume(c),o):c===41&&i<s?l(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(hx,t,l)(c):c===null||We(c)||kr(c)?t(c):(e.consume(c),o)}function l(c){return c===41&&i++,e.consume(c),o}}function LN(e,t,s){return i;function i(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),i):u===38?(e.consume(u),l):u===93?(e.consume(u),o):u===60||u===null||We(u)||kr(u)?t(u):s(u)}function o(u){return u===null||u===40||u===91||We(u)||kr(u)?t(u):i(u)}function l(u){return At(u)?c(u):s(u)}function c(u){return u===59?(e.consume(u),i):At(u)?(e.consume(u),c):s(u)}}function _N(e,t,s){return i;function i(l){return e.consume(l),o}function o(l){return jt(l)?s(l):t(l)}}function mx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||We(e)}function gx(e){return!At(e)}function yx(e){return!(e===47||wh(e))}function wh(e){return e===43||e===45||e===46||e===95||jt(e)}function kp(e){let t=e.length,s=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){s=!0;break}if(i._gfmAutolinkLiteralWalkedInto){s=!1;break}}return e.length>0&&!s&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const zN={tokenize:UN,partial:!0};function MN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:DN,continuation:{tokenize:BN},exit:qN}},text:{91:{name:"gfmFootnoteCall",tokenize:ON},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FN,resolveTo:$N}}}}function FN(e,t,s){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const h=i.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return u;function u(h){if(!c||!c._balanced)return s(h);const p=An(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!l.includes(p.slice(1))?s(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function $N(e,t){let s=e.length;for(;s--;)if(e[s][1].type==="labelImage"&&e[s][0]==="enter"){e[s][1];break}e[s+1][1].type="data",e[s+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[s+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[s+3][1].end),end:Object.assign({},e[s+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},u=[e[s+1],e[s+2],["enter",i,t],e[s+3],e[s+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(s,e.length-s+1,...u),e}function ON(e,t,s){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,c;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),h}function h(f){return f!==94?s(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(f){if(l>999||f===93&&!c||f===null||f===91||We(f))return s(f);if(f===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(An(i.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):s(f)}return We(f)||(c=!0),l++,e.consume(f),f===92?m:p}function m(f){return f===91||f===92||f===93?(e.consume(f),l++,p):p(f)}}function DN(e,t,s){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,c=0,u;return h;function h(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):s(k)}function m(k){if(c>999||k===93&&!u||k===null||k===91||We(k))return s(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return l=An(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return We(k)||(u=!0),c++,e.consume(k),k===92?f:m}function f(k){return k===91||k===92||k===93?(e.consume(k),c++,m):m(k)}function x(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(l)||o.push(l),_e(e,y,"gfmFootnoteDefinitionWhitespace")):s(k)}function y(k){return t(k)}}function BN(e,t,s){return e.check(Oa,t,e.attempt(zN,t,s))}function qN(e){e.exit("gfmFootnoteDefinition")}function UN(e,t,s){const i=this;return _e(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):s(l)}}function WN(e){let s=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return s==null&&(s=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,u){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},f={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},x=[["enter",m,u],["enter",c[p][1],u],["exit",c[p][1],u],["enter",f,u]],y=u.parser.constructs.insideSpan.null;y&&sn(x,x.length,0,sc(y,c.slice(p+1,h),u)),sn(x,x.length,0,[["exit",f,u],["enter",c[h][1],u],["exit",c[h][1],u],["exit",m,u]]),sn(c,p-1,h-p+3,x),h=p+x.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function l(c,u,h){const p=this.previous,m=this.events;let f=0;return x;function x(k){return p===126&&m[m.length-1][1].type!=="characterEscape"?h(k):(c.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const w=di(p);if(k===126)return f>1?h(k):(c.consume(k),f++,y);if(f<2&&!s)return h(k);const j=c.exit("strikethroughSequenceTemporary"),N=di(k);return j._open=!N||N===2&&!!w,j._close=!w||w===2&&!!N,u(k)}}}class HN{constructor(){this.map=[],this.index=new Map}add(t,s,i){VN(this,t,s,i)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let s=this.map.length;const i=[];for(;s>0;)s-=1,i.push(t.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),t.length=this.map[s][0];i.push(t.slice()),t.length=0;let o=i.pop();for(;o;){for(const l of o)t.push(l);o=i.pop()}this.map.length=0,this.index.clear()}}function VN(e,t,s,i){if(s===0&&i.length===0)return;const o=e.index.get(t);if(o){o[1]+=s,o[2].push(...i);return}const l=[t,s,i];e.map.push(l),e.index.set(t,l)}function KN(e,t){let s=!1;const i=[];for(;t<e.length;){const o=e[t];if(s){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(s=!0);t+=1}return i}function QN(){return{flow:{null:{name:"table",tokenize:GN,resolveAll:YN}}}}function GN(e,t,s){const i=this;let o=0,l=0,c;return u;function u(z){let O=i.events.length-1;for(;O>-1;){const{type:Z}=i.events[O][1];if(Z==="lineEnding"||Z==="linePrefix")O--;else break}const U=O>-1?i.events[O][1].type:null,ne=U==="tableHead"||U==="tableRow"?R:h;return ne===R&&i.parser.lazy[i.now().line]?s(z):ne(z)}function h(z){return e.enter("tableHead"),e.enter("tableRow"),p(z)}function p(z){return z===124||(c=!0,l+=1),m(z)}function m(z){return z===null?s(z):je(z)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),y):s(z):Le(z)?_e(e,m,"whitespace")(z):(l+=1,c&&(c=!1,o+=1),z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),f(z)))}function f(z){return z===null||z===124||We(z)?(e.exit("data"),m(z)):(e.consume(z),z===92?x:f)}function x(z){return z===92||z===124?(e.consume(z),f):f(z)}function y(z){return i.interrupt=!1,i.parser.lazy[i.now().line]?s(z):(e.enter("tableDelimiterRow"),c=!1,Le(z)?_e(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):k(z))}function k(z){return z===45||z===58?j(z):z===124?(c=!0,e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),w):q(z)}function w(z){return Le(z)?_e(e,j,"whitespace")(z):j(z)}function j(z){return z===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),N):z===45?(l+=1,N(z)):z===null||je(z)?A(z):q(z)}function N(z){return z===45?(e.enter("tableDelimiterFiller"),S(z)):q(z)}function S(z){return z===45?(e.consume(z),S):z===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(z),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(z))}function T(z){return Le(z)?_e(e,A,"whitespace")(z):A(z)}function A(z){return z===124?k(z):z===null||je(z)?!c||o!==l?q(z):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(z)):q(z)}function q(z){return s(z)}function R(z){return e.enter("tableRow"),M(z)}function M(z){return z===124?(e.enter("tableCellDivider"),e.consume(z),e.exit("tableCellDivider"),M):z===null||je(z)?(e.exit("tableRow"),t(z)):Le(z)?_e(e,M,"whitespace")(z):(e.enter("data"),L(z))}function L(z){return z===null||z===124||We(z)?(e.exit("data"),M(z)):(e.consume(z),z===92?B:L)}function B(z){return z===92||z===124?(e.consume(z),L):L(z)}}function YN(e,t){let s=-1,i=!0,o=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,h=0,p,m,f;const x=new HN;for(;++s<e.length;){const y=e[s],k=y[1];y[0]==="enter"?k.type==="tableHead"?(u=!1,h!==0&&(ug(x,t,h,p,m),m=void 0,h=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(s,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,f=void 0,l=[0,0,0,0],c=[0,s+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(s,0,[["enter",m,t]])),o=k.type==="tableDelimiterRow"?2:m?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],f=ol(x,t,l,o,void 0,f),l=[0,0,0,0]),c[2]=s)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(c[0]=c[1],f=ol(x,t,l,o,void 0,f)),l=c,c=[l[1],s,0,0])):k.type==="tableHead"?(u=!0,h=s):k.type==="tableRow"||k.type==="tableDelimiterRow"?(h=s,l[1]!==0?(c[0]=c[1],f=ol(x,t,l,o,s,f)):c[1]!==0&&(f=ol(x,t,c,o,s,f)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=s)}for(h!==0&&ug(x,t,h,p,m),x.consume(t.events),s=-1;++s<t.events.length;){const y=t.events[s];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=KN(t.events,s))}return e}function ol(e,t,s,i,o,l){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",u="tableContent";s[0]!==0&&(l.end=Object.assign({},ri(t.events,s[0])),e.add(s[0],0,[["exit",l,t]]));const h=ri(t.events,s[1]);if(l={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(s[1],0,[["enter",l,t]]),s[2]!==0){const p=ri(t.events,s[2]),m=ri(t.events,s[3]),f={type:u,start:Object.assign({},p),end:Object.assign({},m)};if(e.add(s[2],0,[["enter",f,t]]),i!==2){const x=t.events[s[2]],y=t.events[s[3]];if(x[1].end=Object.assign({},y[1].end),x[1].type="chunkText",x[1].contentType="text",s[3]>s[2]+1){const k=s[2]+1,w=s[3]-s[2]-1;e.add(k,w,[])}}e.add(s[3]+1,0,[["exit",f,t]])}return o!==void 0&&(l.end=Object.assign({},ri(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function ug(e,t,s,i,o){const l=[],c=ri(t.events,s);o&&(o.end=Object.assign({},c),l.push(["exit",o,t])),i.end=Object.assign({},c),l.push(["exit",i,t]),e.add(s+1,0,l)}function ri(e,t){const s=e[t],i=s[0]==="enter"?"start":"end";return s[1][i]}const ZN={name:"tasklistCheck",tokenize:JN};function XN(){return{text:{91:ZN}}}function JN(e,t,s){const i=this;return o;function o(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?s(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),l)}function l(h){return We(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):s(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):s(h)}function u(h){return je(h)?t(h):Le(h)?e.check({tokenize:eS},t,s)(h):s(h)}}function eS(e,t,s){return _e(e,i,"whitespace");function i(o){return o===null?s(o):t(o)}}function tS(e){return Ty([CN(),MN(),WN(e),QN(),XN()])}const nS={};function xx(e){const t=this,s=e||nS,i=t.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(tS(s)),l.push(bN()),c.push(jN(s))}function vx(e){var t,s,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=vx(e[t]))&&(i&&(i+=" "),i+=s)}else for(s in e)e[s]&&(i&&(i+=" "),i+=s);return i}function kx(){for(var e,t,s=0,i="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=vx(e))&&(i&&(i+=" "),i+=t);return i}var sS=Object.create,ac=Object.defineProperty,rS=Object.defineProperties,iS=Object.getOwnPropertyDescriptor,aS=Object.getOwnPropertyDescriptors,wx=Object.getOwnPropertyNames,Bl=Object.getOwnPropertySymbols,oS=Object.getPrototypeOf,wp=Object.prototype.hasOwnProperty,bx=Object.prototype.propertyIsEnumerable,dg=(e,t,s)=>t in e?ac(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,qn=(e,t)=>{for(var s in t||(t={}))wp.call(t,s)&&dg(e,s,t[s]);if(Bl)for(var s of Bl(t))bx.call(t,s)&&dg(e,s,t[s]);return e},oc=(e,t)=>rS(e,aS(t)),jx=(e,t)=>{var s={};for(var i in e)wp.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(e!=null&&Bl)for(var i of Bl(e))t.indexOf(i)<0&&bx.call(e,i)&&(s[i]=e[i]);return s},lS=(e,t)=>function(){return t||(0,e[wx(e)[0]])((t={exports:{}}).exports,t),t.exports},cS=(e,t)=>{for(var s in t)ac(e,s,{get:t[s],enumerable:!0})},uS=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wx(t))!wp.call(e,o)&&o!==s&&ac(e,o,{get:()=>t[o],enumerable:!(i=iS(t,o))||i.enumerable});return e},dS=(e,t,s)=>(s=e!=null?sS(oS(e)):{},uS(!e||!e.__esModule?ac(s,"default",{value:e,enumerable:!0}):s,e)),hS=lS({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var s=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},c={util:{encode:function k(w){return w instanceof u?new u(w.type,k(w.content),w.alias):Array.isArray(w)?w.map(k):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(k){return Object.prototype.toString.call(k).slice(8,-1)},objId:function(k){return k.__id||Object.defineProperty(k,"__id",{value:++o}),k.__id},clone:function k(w,j){j=j||{};var N,S;switch(c.util.type(w)){case"Object":if(S=c.util.objId(w),j[S])return j[S];N={},j[S]=N;for(var T in w)w.hasOwnProperty(T)&&(N[T]=k(w[T],j));return N;case"Array":return S=c.util.objId(w),j[S]?j[S]:(N=[],j[S]=N,w.forEach(function(A,q){N[q]=k(A,j)}),N);default:return w}},getLanguage:function(k){for(;k;){var w=i.exec(k.className);if(w)return w[1].toLowerCase();k=k.parentElement}return"none"},setLanguage:function(k,w){k.className=k.className.replace(RegExp(i,"gi"),""),k.classList.add("language-"+w)},isActive:function(k,w,j){for(var N="no-"+w;k;){var S=k.classList;if(S.contains(w))return!0;if(S.contains(N))return!1;k=k.parentElement}return!!j}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(k,w){var j=c.util.clone(c.languages[k]);for(var N in w)j[N]=w[N];return j},insertBefore:function(k,w,j,N){N=N||c.languages;var S=N[k],T={};for(var A in S)if(S.hasOwnProperty(A)){if(A==w)for(var q in j)j.hasOwnProperty(q)&&(T[q]=j[q]);j.hasOwnProperty(A)||(T[A]=S[A])}var R=N[k];return N[k]=T,c.languages.DFS(c.languages,function(M,L){L===R&&M!=k&&(this[M]=T)}),T},DFS:function k(w,j,N,S){S=S||{};var T=c.util.objId;for(var A in w)if(w.hasOwnProperty(A)){j.call(w,A,w[A],N||A);var q=w[A],R=c.util.type(q);R==="Object"&&!S[T(q)]?(S[T(q)]=!0,k(q,j,null,S)):R==="Array"&&!S[T(q)]&&(S[T(q)]=!0,k(q,j,A,S))}}},plugins:{},highlight:function(k,w,j){var N={code:k,grammar:w,language:j};if(c.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=c.tokenize(N.code,N.grammar),c.hooks.run("after-tokenize",N),u.stringify(c.util.encode(N.tokens),N.language)},tokenize:function(k,w){var j=w.rest;if(j){for(var N in j)w[N]=j[N];delete w.rest}var S=new m;return f(S,S.head,k),p(k,S,w,S.head,0),y(S)},hooks:{all:{},add:function(k,w){var j=c.hooks.all;j[k]=j[k]||[],j[k].push(w)},run:function(k,w){var j=c.hooks.all[k];if(!(!j||!j.length))for(var N=0,S;S=j[N++];)S(w)}},Token:u};function u(k,w,j,N){this.type=k,this.content=w,this.alias=j,this.length=(N||"").length|0}u.stringify=function k(w,j){if(typeof w=="string")return w;if(Array.isArray(w)){var N="";return w.forEach(function(R){N+=k(R,j)}),N}var S={type:w.type,content:k(w.content,j),tag:"span",classes:["token",w.type],attributes:{},language:j},T=w.alias;T&&(Array.isArray(T)?Array.prototype.push.apply(S.classes,T):S.classes.push(T)),c.hooks.run("wrap",S);var A="";for(var q in S.attributes)A+=" "+q+'="'+(S.attributes[q]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+A+">"+S.content+"</"+S.tag+">"};function h(k,w,j,N){k.lastIndex=w;var S=k.exec(j);if(S&&N&&S[1]){var T=S[1].length;S.index+=T,S[0]=S[0].slice(T)}return S}function p(k,w,j,N,S,T){for(var A in j)if(!(!j.hasOwnProperty(A)||!j[A])){var q=j[A];q=Array.isArray(q)?q:[q];for(var R=0;R<q.length;++R){if(T&&T.cause==A+","+R)return;var M=q[R],L=M.inside,B=!!M.lookbehind,z=!!M.greedy,O=M.alias;if(z&&!M.pattern.global){var U=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,U+"g")}for(var ne=M.pattern||M,Z=N.next,X=S;Z!==w.tail&&!(T&&X>=T.reach);X+=Z.value.length,Z=Z.next){var he=Z.value;if(w.length>k.length)return;if(!(he instanceof u)){var ce=1,Q;if(z){if(Q=h(ne,X,k,B),!Q||Q.index>=k.length)break;var Y=Q.index,se=Q.index+Q[0].length,P=X;for(P+=Z.value.length;Y>=P;)Z=Z.next,P+=Z.value.length;if(P-=Z.value.length,X=P,Z.value instanceof u)continue;for(var $=Z;$!==w.tail&&(P<se||typeof $.value=="string");$=$.next)ce++,P+=$.value.length;ce--,he=k.slice(X,P),Q.index-=X}else if(Q=h(ne,0,he,B),!Q)continue;var Y=Q.index,I=Q[0],pe=he.slice(0,Y),me=he.slice(Y+I.length),xe=X+he.length;T&&xe>T.reach&&(T.reach=xe);var Pe=Z.prev;pe&&(Pe=f(w,Pe,pe),X+=pe.length),x(w,Pe,ce);var Ee=new u(A,L?c.tokenize(I,L):I,O,I);if(Z=f(w,Pe,Ee),me&&f(w,Z,me),ce>1){var Ne={cause:A+","+R,reach:xe};p(k,w,j,Z.prev,X,Ne),T&&Ne.reach>T.reach&&(T.reach=Ne.reach)}}}}}}function m(){var k={value:null,prev:null,next:null},w={value:null,prev:k,next:null};k.next=w,this.head=k,this.tail=w,this.length=0}function f(k,w,j){var N=w.next,S={value:j,prev:w,next:N};return w.next=S,N.prev=S,k.length++,S}function x(k,w,j){for(var N=w.next,S=0;S<j&&N!==k.tail;S++)N=N.next;w.next=N,N.prev=w,k.length-=S}function y(k){for(var w=[],j=k.head.next;j!==k.tail;)w.push(j.value),j=j.next;return w}return c})();t.exports=s,s.default=s}}),J=dS(hS());J.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},J.languages.markup.tag.inside["attr-value"].inside.entity=J.languages.markup.entity,J.languages.markup.doctype.inside["internal-subset"].inside=J.languages.markup,J.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(J.languages.markup.tag,"addInlined",{value:function(e,i){var s={},s=(s["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:J.languages[i]},s.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}}),i=(s["language-"+i]={pattern:/[\s\S]+/,inside:J.languages[i]},{});i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:s},J.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(J.languages.markup.tag,"addAttribute",{value:function(e,t){J.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:J.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),J.languages.html=J.languages.markup,J.languages.mathml=J.languages.markup,J.languages.svg=J.languages.markup,J.languages.xml=J.languages.extend("markup",{}),J.languages.ssml=J.languages.xml,J.languages.atom=J.languages.xml,J.languages.rss=J.languages.xml,(function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+s.source+")",i=RegExp(i+"-"+i),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:s,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:s}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(J),J.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},J.languages.javascript=J.languages.extend("clike",{"class-name":[J.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),J.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,J.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:J.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:J.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:J.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:J.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:J.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),J.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:J.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),J.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),J.languages.markup&&(J.languages.markup.tag.addInlined("script","javascript"),J.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),J.languages.js=J.languages.javascript,J.languages.actionscript=J.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),J.languages.actionscript["class-name"].alias="function",delete J.languages.actionscript.parameter,delete J.languages.actionscript["literal-property"],J.languages.markup&&J.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:J.languages.markup}}),(function(e){var t=/#(?!\{).+/,s={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:s}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:s}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:s}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(J),(function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(s,i){(s=typeof s=="string"?[s]:s).forEach(function(o){var l=function(f){f.inside||(f.inside={}),f.inside.rest=i},c="doc-comment";if(u=e.languages[o]){var u,h=u[c];if((h=h||(u=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(h=u[c]={pattern:h}),Array.isArray(h))for(var p=0,m=h.length;p<m;p++)h[p]instanceof RegExp&&(h[p]={pattern:h[p]}),l(h[p]);else l(h)}})}}),t.addSupport(["java","javascript","php"],t)})(J),(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))})(J),(function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),s={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:s,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:s})})(J),(function(e){var t=/[*&][^\s[\]{},]+/,s=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+s.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+s.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(u,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return u});return RegExp(p,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(l),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:s,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(J),(function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function s(p){return p=p.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+l+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+l+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:s(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:s(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:s(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:s(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(m){p!==m&&(e.languages.markdown[p].inside.content.inside[m]=e.languages.markdown[m])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function m(f){if(f&&typeof f!="string")for(var x=0,y=f.length;x<y;x++){var k,w=f[x];w.type!=="code"?m(w.content):(k=w.content[1],w=w.content[3],k&&w&&k.type==="code-language"&&w.type==="code-block"&&typeof k.content=="string"&&(k=k.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),k="language-"+(k=(/[a-z][\w-]*/i.exec(k)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,k]:w.alias.push(k):w.alias=[k]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var m="",f=0,x=p.classes.length;f<x;f++){var y=p.classes[f],y=/language-(.+)/.exec(y);if(y){m=y[1];break}}var k,w=e.languages[m];w?p.content=e.highlight((function(j){return j=j.replace(c,""),j=j.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(N,S){var T;return(S=S.toLowerCase())[0]==="#"?(T=S[1]==="x"?parseInt(S.slice(2),16):Number(S.slice(1)),h(T)):u[S]||N})})(p.content),w,m):m&&m!=="none"&&e.plugins.autoloader&&(k="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=k,e.plugins.autoloader.loadLanguages(m,function(){var j=document.getElementById(k);j&&(j.innerHTML=e.highlight(j.textContent,e.languages[m],m))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),u={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(J),J.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:J.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},J.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(k){return typeof k!="string"&&k.type!=="comment"&&k.type!=="scalar"}),s=0;s<t.length;){var i=t[s++];if(i.type==="keyword"&&i.content==="mutation"){var o=[];if(f(["definition-mutation","punctuation"])&&m(1).content==="("){s+=2;var l=x(/^\($/,/^\)$/);if(l===-1)continue;for(;s<l;s++){var c=m(0);c.type==="variable"&&(y(c,"variable-input"),o.push(c.content))}s=l+1}if(f(["punctuation","property-query"])&&m(0).content==="{"&&(s++,y(m(0),"property-mutation"),0<o.length)){var u=x(/^\{$/,/^\}$/);if(u!==-1)for(var h=s;h<u;h++){var p=t[h];p.type==="variable"&&0<=o.indexOf(p.content)&&y(p,"variable-input")}}}}function m(k){return t[s+k]}function f(k,w){w=w||0;for(var j=0;j<k.length;j++){var N=m(j+w);if(!N||N.type!==k[j])return}return 1}function x(k,w){for(var j=1,N=s;N<t.length;N++){var S=t[N],T=S.content;if(S.type==="punctuation"&&typeof T=="string"){if(k.test(T))j++;else if(w.test(T)&&--j===0)return N}}return-1}function y(k,w){var j=k.alias;j?Array.isArray(j)||(k.alias=j=[j]):k.alias=j=[],j.push(w)}}),J.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var t=e.languages.javascript["template-string"],s=t.pattern.source,i=t.inside.interpolation,o=i.inside["interpolation-punctuation"],l=i.pattern.source;function c(f,x){if(e.languages[f])return{pattern:RegExp("((?:"+x+")\\s*)"+s),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:f}}}}function u(f,x,y){return f={code:f,grammar:x,language:y},e.hooks.run("before-tokenize",f),f.tokens=e.tokenize(f.code,f.grammar),e.hooks.run("after-tokenize",f),f.tokens}function h(f,x,y){var j=e.tokenize(f,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),k=0,w={},j=u(j.map(function(S){if(typeof S=="string")return S;for(var T,A,S=S.content;f.indexOf((A=k++,T="___"+y.toUpperCase()+"_"+A+"___"))!==-1;);return w[T]=S,T}).join(""),x,y),N=Object.keys(w);return k=0,(function S(T){for(var A=0;A<T.length;A++){if(k>=N.length)return;var q,R,M,L,B,z,O,U=T[A];typeof U=="string"||typeof U.content=="string"?(q=N[k],(O=(z=typeof U=="string"?U:U.content).indexOf(q))!==-1&&(++k,R=z.substring(0,O),B=w[q],M=void 0,(L={})["interpolation-punctuation"]=o,(L=e.tokenize(B,L)).length===3&&((M=[1,1]).push.apply(M,u(L[1],e.languages.javascript,"javascript")),L.splice.apply(L,M)),M=new e.Token("interpolation",L,i.alias,B),L=z.substring(O+q.length),B=[],R&&B.push(R),B.push(M),L&&(S(z=[L]),B.push.apply(B,z)),typeof U=="string"?(T.splice.apply(T,[A,1].concat(B)),A+=B.length-1):U.content=B)):(O=U.content,Array.isArray(O)?S(O):S([O]))}})(j),new e.Token(y,j,"language-"+y,f)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),t].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(f){return typeof f=="string"?f:Array.isArray(f)?f.map(m).join(""):m(f.content)}e.hooks.add("after-tokenize",function(f){f.language in p&&(function x(y){for(var k=0,w=y.length;k<w;k++){var j,N,S,T=y[k];typeof T!="string"&&(j=T.content,Array.isArray(j)?T.type==="template-string"?(T=j[1],j.length===3&&typeof T!="string"&&T.type==="embedded-code"&&(N=m(T),T=T.alias,T=Array.isArray(T)?T[0]:T,S=e.languages[T])&&(j[1]=h(N,S,T))):x(j):typeof j!="string"&&x([j]))}})(f.tokens)})})(J),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript})(J),(function(e){var t=e.languages.javascript,s=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+s+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return s})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+s),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(J),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(J),J.languages.n4js=J.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),J.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),J.languages.n4jsd=J.languages.n4js,(function(e){function t(c,u){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),u)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var s=["function","function-variable","method","method-variable","property-access"],i=0;i<s.length;i++){var l=s[i],o=e.languages.javascript[l],l=(o=e.util.type(o)==="RegExp"?e.languages.javascript[l]={pattern:o}:o).inside||{};(o.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(J),(function(e){var t=e.util.clone(e.languages.javascript),s=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(h,p){return h=h.replace(/<S>/g,function(){return s}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,p)}o=l(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(h){for(var p=[],m=0;m<h.length;m++){var f=h[m],x=!1;typeof f!="string"&&(f.type==="tag"&&f.content[0]&&f.content[0].type==="tag"?f.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===u(f.content[0].content[1])&&p.pop():f.content[f.content.length-1].content!=="/>"&&p.push({tagName:u(f.content[0].content[1]),openedBraces:0}):0<p.length&&f.type==="punctuation"&&f.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&f.type==="punctuation"&&f.content==="}"?p[p.length-1].openedBraces--:x=!0),(x||typeof f=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(x=u(f),m<h.length-1&&(typeof h[m+1]=="string"||h[m+1].type==="plain-text")&&(x+=u(h[m+1]),h.splice(m+1,1)),0<m&&(typeof h[m-1]=="string"||h[m-1].type==="plain-text")&&(x=u(h[m-1])+x,h.splice(m-1,1),m--),h[m]=new e.Token("plain-text",x,null,x)),f.content&&typeof f.content!="string"&&c(f.content)}}var u=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(u).join(""):""};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||c(h.tokens)})})(J),(function(e){var t=e.util.clone(e.languages.typescript),t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);t.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0})(J),J.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},J.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=J.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(J),J.languages.c=J.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),J.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),J.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},J.languages.c.string],char:J.languages.c.char,comment:J.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:J.languages.c}}}}),J.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete J.languages.c.boolean,J.languages.objectivec=J.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete J.languages.objectivec["class-name"],J.languages.objc=J.languages.objectivec,J.languages.reason=J.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),J.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete J.languages.reason.function,(function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,s=0;s<2;s++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(J),J.languages.go=J.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),J.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete J.languages.go["class-name"],(function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,s=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return s})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(J),J.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},J.languages.python["string-interpolation"].inside.interpolation.inside.rest=J.languages.python,J.languages.py=J.languages.python,J.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},J.languages.webmanifest=J.languages.json;var Pa={};cS(Pa,{dracula:()=>fS,duotoneDark:()=>gS,duotoneLight:()=>xS,github:()=>kS,gruvboxMaterialDark:()=>GS,gruvboxMaterialLight:()=>ZS,jettwaveDark:()=>BS,jettwaveLight:()=>US,nightOwl:()=>bS,nightOwlLight:()=>NS,oceanicNext:()=>CS,okaidia:()=>TS,oneDark:()=>HS,oneLight:()=>KS,palenight:()=>RS,shadesOfPurple:()=>IS,synthwave84:()=>_S,ultramin:()=>MS,vsDark:()=>Nx,vsLight:()=>OS});var pS={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},fS=pS,mS={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},gS=mS,yS={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},xS=yS,vS={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},kS=vS,wS={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},bS=wS,jS={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},NS=jS,Xt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},SS={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:Xt.keyword}},{types:["attr-value"],style:{color:Xt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:Xt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:Xt.primitive}},{types:["boolean"],style:{color:Xt.boolean}},{types:["tag"],style:{color:Xt.tag}},{types:["string"],style:{color:Xt.string}},{types:["punctuation"],style:{color:Xt.string}},{types:["selector","char","builtin","inserted"],style:{color:Xt.char}},{types:["function"],style:{color:Xt.function}},{types:["operator","entity","url","variable"],style:{color:Xt.variable}},{types:["keyword"],style:{color:Xt.keyword}},{types:["atrule","class-name"],style:{color:Xt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},CS=SS,ES={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},TS=ES,PS={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},RS=PS,AS={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},IS=AS,LS={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},_S=LS,zS={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},MS=zS,FS={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},Nx=FS,$S={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},OS=$S,DS={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},BS=DS,qS={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},US=qS,WS={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},HS=WS,VS={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},KS=VS,QS={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},GS=QS,YS={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},ZS=YS,XS=e=>E.useCallback(t=>{var s=t,{className:i,style:o,line:l}=s,c=jx(s,["className","style","line"]);const u=oc(qn({},c),{className:kx("token-line",i)});return typeof e=="object"&&"plain"in e&&(u.style=e.plain),typeof o=="object"&&(u.style=qn(qn({},u.style||{}),o)),u},[e]),JS=e=>{const t=E.useCallback(({types:s,empty:i})=>{if(e!=null){{if(s.length===1&&s[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(s.length===1&&i!=null)return e[s[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...s.map(o=>e[o]))}},[e]);return E.useCallback(s=>{var i=s,{token:o,className:l,style:c}=i,u=jx(i,["token","className","style"]);const h=oc(qn({},u),{className:kx("token",...o.types,l),children:o.content,style:t(o)});return c!=null&&(h.style=qn(qn({},h.style||{}),c)),h},[t])},eC=/\r\n|\r|\n/,hg=e=>{e.length===0?e.push({types:["plain"],content:`
511
- `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
512
- `,e[0].empty=!0)},pg=(e,t)=>{const s=e.length;return s>0&&e[s-1]===t?e:e.concat(t)},tC=e=>{const t=[[]],s=[e],i=[0],o=[e.length];let l=0,c=0,u=[];const h=[u];for(;c>-1;){for(;(l=i[c]++)<o[c];){let p,m=t[c];const x=s[c][l];if(typeof x=="string"?(m=c>0?m:["plain"],p=x):(m=pg(m,x.type),x.alias&&(m=pg(m,x.alias)),p=x.content),typeof p!="string"){c++,t.push(m),s.push(p),i.push(0),o.push(p.length);continue}const y=p.split(eC),k=y.length;u.push({types:m,content:y[0]});for(let w=1;w<k;w++)hg(u),h.push(u=[]),u.push({types:m,content:y[w]})}c--,t.pop(),s.pop(),i.pop(),o.pop()}return hg(u),h},fg=tC,nC=({prism:e,code:t,grammar:s,language:i})=>E.useMemo(()=>{if(s==null)return fg([t]);const o={code:t,grammar:s,language:i,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(t,s),e.hooks.run("after-tokenize",o),fg(o.tokens)},[t,s,i,e]),sC=(e,t)=>{const{plain:s}=e,i=e.styles.reduce((o,l)=>{const{languages:c,style:u}=l;return c&&!c.includes(t)||l.types.forEach(h=>{const p=qn(qn({},o[h]),u);o[h]=p}),o},{});return i.root=s,i.plain=oc(qn({},s),{backgroundColor:void 0}),i},rC=sC,iC=({children:e,language:t,code:s,theme:i,prism:o})=>{const l=t.toLowerCase(),c=rC(i,l),u=XS(c),h=JS(c),p=o.languages[l],m=nC({prism:o,language:l,code:s,grammar:p});return e({tokens:m,className:`prism-code language-${l}`,style:c!=null?c.root:{},getLineProps:u,getTokenProps:h})},Sx=e=>E.createElement(iC,oc(qn({},e),{prism:e.prism||J,theme:e.theme||Nx,code:e.code,language:e.language}));/*! Bundled license information:
513
-
514
- prismjs/prism.js:
515
- (**
516
- * Prism: Lightweight, robust, elegant syntax highlighting
517
- *
518
- * @license MIT <https://opensource.org/licenses/MIT>
519
- * @author Lea Verou <https://lea.verou.me>
520
- * @namespace
521
- * @public
522
- *)
523
- */const aC=/^\s*(?:flowchart|graph)\s*(LR|RL|TD|TB|BT)?\s*;?\s*$/i,oC=/^([A-Za-z0-9_؀-ۿ-]+)\s*(\[\[(.+?)\]\]|\(\[(.+?)\]\)|\(\((.+?)\)\)|\[(.+?)\]|\((.+?)\)|\{(.+?)\}|>(.+?)\])?/,lC=/^\s*(-->|---|-\.->|-\.-|==>|===|--\s*(.+?)\s*-->|-\.\s*(.+?)\s*\.->|==\s*(.+?)\s*==>)\s*(?:\|(.+?)\|)?\s*/;function mg(e){return e.replace(/^["']|["']$/g,"").replace(/<br\s*\/?>/gi," ").trim()}function cC(e){const t=e.split(`
524
- `).map(x=>x.replace(/%%.*$/,"").trim()).filter(Boolean),s=t.shift()?.match(aC);if(!s)return null;const i=(s[1]??"TD").toUpperCase(),o=new Map,l=[],c=x=>{const y=x.match(oC);if(!y)return null;const k=y[1],w=y[3]??y[4]??y[5]??y[6]??y[7]??y[8]??y[9],j=y[8]?"decision":y[6]||y[3]?"box":w?"round":"box",N=o.get(k);return(!N||w)&&o.set(k,{id:k,text:mg(w??N?.text??k),shape:w?j:N?.shape??j}),{id:k,rest:x.slice(y[0].length)}};for(const x of t)if(!/^(classDef|class|style|linkStyle|click|subgraph|end|direction)\b/.test(x))for(const y of x.split(";").map(k=>k.trim()).filter(Boolean)){let k=c(y);if(!k)continue;let w=k.rest;for(;;){const j=w.match(lC);if(!j)break;const N=c(w.slice(j[0].length));if(!N)break;const S=mg(j[5]??j[2]??j[3]??j[4]??"");l.push({from:k.id,to:N.id,...S?{label:S}:{},...j[1].includes(".")?{dashed:!0}:{}}),k=N,w=N.rest}}if(!o.size)return null;const u=new Map([...o.keys()].map(x=>[x,0]));for(let x=0;x<o.size;x+=1){let y=!1;for(const k of l){if(k.from===k.to)continue;const w=(u.get(k.from)??0)+1;w>(u.get(k.to)??0)&&w<o.size&&(u.set(k.to,w),y=!0)}if(!y)break}const h=new Map,p=[...o.values()].map(x=>{const y=u.get(x.id)??0,k=h.get(y)??0;return h.set(y,k+1),{...x,rank:y,slot:k}}),m=i==="RL"||i==="BT",f=Math.max(...p.map(x=>x.rank));return{across:i==="LR"||i==="RL",nodes:m?p.map(x=>({...x,rank:f-x.rank})):p,edges:l}}function yi({pictures:e,start:t,onClose:s}){const[i,o]=E.useState(t),l=e.length,c=E.useCallback(h=>o(p=>(p+h+l)%l),[l]);E.useEffect(()=>{const h=p=>{p.key==="Escape"?s():p.key==="ArrowRight"?c(1):p.key==="ArrowLeft"&&c(-1)};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[s,c]);const u=e[i];return u?n.jsxs("div",{className:"lightbox",role:"dialog","aria-modal":"true","aria-label":u.caption,onMouseDown:h=>h.target===h.currentTarget&&s(),children:[n.jsxs("div",{className:"lb-top",children:[n.jsx("span",{className:"lb-cap",children:u.caption}),l>1&&n.jsxs("span",{className:"lb-count",children:[i+1," of ",l]}),n.jsx("span",{className:"grow"}),n.jsx("a",{className:"iconbtn",href:u.src,target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",title:"Open in a new tab",children:n.jsx(mr,{size:15})}),n.jsx("button",{className:"iconbtn",onClick:s,"aria-label":"Close",children:n.jsx(an,{size:16})})]}),n.jsx("img",{className:"lb-img",src:u.src,alt:u.caption,onMouseDown:h=>h.stopPropagation()}),l>1&&n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"lb-nav prev",onClick:()=>c(-1),"aria-label":"Previous picture",children:n.jsx(L2,{size:22})}),n.jsx("button",{className:"lb-nav next",onClick:()=>c(1),"aria-label":"Next picture",children:n.jsx(Bh,{size:22})})]})]}):null}function bp({src:e,alt:t,className:s}){const[i,o]=E.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"zoom",onClick:()=>o(!0),"aria-label":`Open ${t} full size`,children:n.jsx("img",{className:s,src:e,alt:t,loading:"lazy"})}),i&&n.jsx(yi,{pictures:[{src:e,caption:t}],start:0,onClose:()=>o(!1)})]})}function jp({text:e,ticket:t,stream:s,caret:i}){const[o,l]=E.useState(null),c=E.useMemo(()=>[[Rw,{stream:s,caret:i}]],[s,i]);return n.jsxs("div",{className:"cmd",children:[n.jsx(Qy,{remarkPlugins:[xx],rehypePlugins:c,components:{a:({href:u,children:h})=>n.jsx("a",{href:u,target:"_blank",rel:"noreferrer",children:h}),img:({src:u,alt:h})=>{const p=u?/^(https?:|data:)/.test(u)?u:nn(t,u):"";return n.jsx("button",{className:"cimg",onClick:()=>l(p),"aria-label":`Open ${h||"the picture"} big`,children:n.jsx("img",{src:p,alt:h??"",loading:"lazy"})})},table:({node:u,children:h})=>n.jsx("div",{className:"ctable",children:n.jsx("table",{dir:u?.properties?.dir??void 0,children:h})}),pre:({node:u})=>n.jsx(uC,{node:u})},children:e}),o&&n.jsx(yi,{pictures:[{src:o,caption:"Picture"}],start:0,onClose:()=>l(null)})]})}function Cx(e){return e.type==="text"?e.value??"":(e.children??[]).map(Cx).join("")}function uC({node:e}){const t=e.children?.find(l=>l.tagName==="code"),i=(t?.properties?.className??[]).find(l=>l.startsWith("language-"))?.slice(9)??"",o=Cx(t??e).replace(/\n$/,"");if(i==="mermaid"){const l=cC(o);if(l)return n.jsx(hC,{chart:l})}return n.jsx(dC,{lang:i==="mermaid"?"Diagram (Mermaid)":i,code:o})}function dC({lang:e,code:t}){const{theme:s,toast:i}=qe(),o=()=>void navigator.clipboard?.writeText(t).then(()=>i("Code copied"),()=>i("Could not copy. Select the text instead.","err"));return n.jsxs("div",{className:"ccode",dir:"ltr",children:[n.jsxs("div",{className:"ccode-h",children:[n.jsx("span",{children:e||"text"}),n.jsxs("button",{className:"cact",onClick:o,"aria-label":"Copy the code",children:[n.jsx(Vs,{size:13})," Copy"]})]}),n.jsx(Sx,{code:t,language:e||"text",theme:s==="dark"?Pa.vsDark:Pa.github,children:({tokens:l,getLineProps:c,getTokenProps:u})=>n.jsx("pre",{children:l.map((h,p)=>n.jsx("div",{...c({line:h}),children:h.map((m,f)=>n.jsx("span",{...u({token:m})},f))},p))})})]})}function hC({chart:e}){const t=E.useRef(null),[s,i]=E.useState([]),o=E.useMemo(()=>{const c=[];for(const u of e.nodes)(c[u.rank]??=[]).push(u);return c.map(u=>(u??[]).sort((h,p)=>h.slot-p.slot))},[e]),l=E.useMemo(()=>new Set(e.nodes.filter(c=>!e.edges.some(u=>u.from===c.id)).map(c=>c.id)),[e]);return E.useLayoutEffect(()=>{const c=t.current;if(!c)return;const u=()=>{const p=c.getBoundingClientRect(),m=f=>c.querySelector(`[data-node="${CSS.escape(f)}"]`)?.getBoundingClientRect();i(e.edges.flatMap(f=>{const x=m(f.from),y=m(f.to);if(!x||!y)return[];const k=e.across?y.left>=x.right-1:y.top>=x.bottom-1;let w,j,N,S,T;if(e.across){w=(k?x.right:x.left)-p.left,j=x.top+x.height/2-p.top,N=(k?y.left:y.right)-p.left,S=y.top+y.height/2-p.top;const A=Math.max(24,Math.abs(N-w)/2)*(k?1:-1);T=`M${w},${j} C${w+A},${j} ${N-A},${S} ${N},${S}`}else{w=x.left+x.width/2-p.left,j=(k?x.bottom:x.top)-p.top,N=y.left+y.width/2-p.left,S=(k?y.top:y.bottom)-p.top;const A=Math.max(18,Math.abs(S-j)/2)*(k?1:-1);T=`M${w},${j} C${w},${j+A} ${N},${S-A} ${N},${S}`}return[{d:T,x:(w+N)/2,y:(j+S)/2,...f.label?{label:f.label}:{},...f.dashed?{dashed:!0}:{}}]}))};u();const h=new ResizeObserver(u);return h.observe(c),()=>h.disconnect()},[e]),n.jsx("div",{className:"cdiagram",dir:"ltr",children:n.jsxs("div",{ref:t,className:`cflow ${e.across?"across":"down"}`,children:[n.jsxs("svg",{className:"cflow-lines","aria-hidden":"true",children:[n.jsx("defs",{children:n.jsx("marker",{id:"cflow-arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:n.jsx("path",{d:"M0,0 L10,5 L0,10 z"})})}),s.map((c,u)=>n.jsx("path",{d:c.d,className:c.dashed?"dash":"",markerEnd:"url(#cflow-arrow)"},u))]}),o.map((c,u)=>n.jsx("div",{className:"cflow-rank",children:c.map(h=>n.jsx("span",{"data-node":h.id,className:`cnode ${h.shape} ${l.has(h.id)&&h.shape!=="decision"?"end":""}`,children:n.jsx("bdi",{children:h.text})},h.id))},u)),s.map((c,u)=>c.label?n.jsx("span",{className:"cflow-label",style:{left:c.x,top:c.y},children:c.label},u):null)]})})}function pC({lines:e,children:t}){const[s,i]=E.useState(!1);return e<=26?n.jsx(n.Fragment,{children:t}):n.jsxs("div",{className:`cfold ${s?"open":""}`,children:[n.jsx("div",{className:"cfold-body",children:t}),n.jsx("button",{className:"btn sm",onClick:()=>i(!s),children:s?"Show less":`Show all · ${e} lines`})]})}function fC(e){return e.split(`
525
- `).reduce((t,s)=>t+(s.trim()?Math.ceil(s.length/80):0),0)}const gg=/\.(png|jpe?g|gif|webp)$/i,yg=/\.html?$/i;function mC({ticket:e,files:t}){const s=t.filter(l=>gg.test(l)),i=t.filter(l=>yg.test(l)),o=t.filter(l=>!gg.test(l)&&!yg.test(l));return n.jsxs("div",{className:"attached",children:[i.map(l=>n.jsx(Np,{ticket:e,file:l},l)),s.length>0&&n.jsx("div",{className:"attpics",children:s.map(l=>n.jsx(bp,{src:nn(e,l),alt:xg(l)},l))}),o.map(l=>n.jsxs("a",{className:"btn sm",href:nn(e,l),download:!0,children:[n.jsx(is,{size:13})," ",xg(l)]},l))]})}function Np({ticket:e,file:t,title:s="Mockup"}){const[i,o]=E.useState(!1),l=$e({queryKey:["mockup-link",e,t],queryFn:()=>ze(`/api/v1/tickets/${encodeURIComponent(e)}/mockup-link?path=${encodeURIComponent(t)}`),staleTime:1/0});if(l.isError)return n.jsx("p",{className:"note",children:"The mockup could not be read."});const c=u=>n.jsx("iframe",{className:u,title:s,sandbox:"allow-scripts",src:l.data?.url??"about:blank"});return n.jsxs("div",{className:"mockup",children:[n.jsxs("div",{className:"mockbar",children:[n.jsxs("span",{children:[s," · click around, it is only a picture of the idea"]}),n.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[n.jsx(Uh,{size:12})," Full size"]})]}),c("mockframe"),i&&n.jsx(at,{title:s,wide:!0,onClose:()=>o(!1),children:c("mockframe big")})]})}function xg(e){return e.split(/[\\/]/).pop()??e}const bh=/\.(png|jpe?g|gif|webp|bmp)$/i,vg=/\.(mp4|webm|mov|m4v)$/i,jh=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba)$/i,Ex=/\.(md|markdown)$/i,Tx=/\.pdf$/i,Px=/\.html?$/i;function es(e){return e.split(/[\\/]/).pop()??e}function Rx(e){return Ex.test(e)?{cls:"md",label:"MD"}:Tx.test(e)?{cls:"pdf",label:"PDF"}:Px.test(e)?{cls:"html",label:"HTML"}:bh.test(e)?{cls:"img",label:(e.split(".").pop()??"IMG").toUpperCase().slice(0,4)}:{cls:"file",label:(e.split(".").pop()??"FILE").toUpperCase().slice(0,4)}}function Sp({ticket:e,files:t,from:s,onOpen:i,sent:o}){const[l,c]=E.useState(null),[u,h]=E.useState(null),p=t.filter(y=>bh.test(y)),m=t.filter(y=>vg.test(y)),f=t.filter(y=>jh.test(y)),x=t.filter(y=>!bh.test(y)&&!vg.test(y)&&!jh.test(y)&&!/\.transcript\.txt$/.test(y));return n.jsxs("div",{className:"cfiles",children:[p.length>0&&n.jsx("div",{className:"cshots",children:p.map((y,k)=>n.jsxs("button",{className:"cshot",onClick:()=>c(k),"aria-label":`Open ${es(y)} big`,children:[n.jsx("img",{src:nn(e,y),alt:es(y),loading:"lazy"}),o&&n.jsx("span",{className:"cshot-ok",title:"Sent",children:n.jsx(Ce,{size:11,strokeWidth:3})})]},y))}),m.map(y=>n.jsxs("div",{className:"cvideo",children:[n.jsx("video",{src:nn(e,y),controls:!0,preload:"metadata"}),n.jsx(Ax,{ticket:e,file:y})]},y)),f.map(y=>n.jsx(yC,{ticket:e,file:y},y)),x.map(y=>{const k=Rx(y),w=Ex.test(y),j=Tx.test(y),N=Px.test(y),S=w?"Markdown · opens beside the chat":j?"PDF · opens beside the chat":N?"Mockup · runs here, sealed off":"File · downloads",T=n.jsxs(n.Fragment,{children:[n.jsx("span",{className:`cfic ${k.cls}`,children:k.label}),n.jsxs("span",{className:"cfile-t",children:[n.jsx("span",{className:"cfname",children:es(y)}),n.jsx("span",{className:"cfmeta",children:S})]}),n.jsx("span",{className:"cfopen",children:w||j||N?"Open":n.jsx(is,{size:14})})]});return w||j?n.jsx("button",{className:"cfile",onClick:()=>i?.({ticket:e,file:y,kind:w?"md":"pdf",...s?{from:s}:{}}),children:T},y):N?n.jsx("button",{className:"cfile",onClick:()=>h(y),children:T},y):n.jsx("a",{className:"cfile",href:nn(e,y),download:!0,children:T},y)}),l!==null&&n.jsx(yi,{pictures:p.map(y=>({src:nn(e,y),caption:es(y)})),start:l,onClose:()=>c(null)}),u&&n.jsx(at,{title:es(u),wide:!0,onClose:()=>h(null),children:n.jsx(Np,{ticket:e,file:u,title:es(u)})})]})}function gC(e,t){return $e({queryKey:["transcript",e,t],queryFn:async()=>{const s=await fetch(nn(e,`${t}.transcript.txt`));return s.ok&&(await s.text()).replace(/^Transcript of [^\n]*\n+/,"").trim()||null},staleTime:3e4,refetchInterval:s=>s.state.data?!1:1e4})}function Ax({ticket:e,file:t,open:s=!0}){const i=gC(e,t).data,[o,l]=E.useState(s);return i?n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"ctlink",onClick:()=>l(!o),children:o?"Hide the written text":"Show the written text"}),o&&n.jsx("div",{className:"ctrans",children:i.split(/\n+/).map((c,u)=>{const h=xn(c);return n.jsx("p",{dir:h.dir,lang:h.dir==="rtl"?"ar":"en",className:as(h),children:c},u)})})]}):null}function yC({ticket:e,file:t}){const s=E.useRef(null),[i,o]=E.useState(!1),[l,c]=E.useState({at:0,length:0}),u=E.useMemo(()=>{let f=7;for(const x of t)f=(f*31+x.charCodeAt(0))%9973;return Array.from({length:34},(x,y)=>6+f*(y+3)*7%19)},[t]);E.useEffect(()=>{const f=s.current;if(!f)return;const x=()=>c({at:f.currentTime,length:Number.isFinite(f.duration)?f.duration:0}),y=()=>o(!1);return f.addEventListener("timeupdate",x),f.addEventListener("loadedmetadata",x),f.addEventListener("ended",y),()=>{f.removeEventListener("timeupdate",x),f.removeEventListener("loadedmetadata",x),f.removeEventListener("ended",y)}},[]);const h=()=>{const f=s.current;f&&(i?f.pause():f.play().catch(()=>o(!1)),o(!i))},p=i||l.at>0?l.at:l.length,m=l.length?Math.min(1,l.at/l.length):0;return n.jsxs("div",{className:"cvoice-w",children:[n.jsxs("div",{className:"cvoice",children:[n.jsx("button",{className:"cplay",onClick:h,"aria-label":i?"Pause the voice note":"Play the voice note",children:i?n.jsx($2,{size:15,fill:"currentColor"}):n.jsx(Wh,{size:15,fill:"currentColor"})}),n.jsx("div",{className:"cwave","aria-hidden":"true",children:u.map((f,x)=>n.jsx("i",{style:{height:f},className:x/u.length<m?"on":""},x))}),n.jsx("span",{className:"cvt",children:xC(p)}),n.jsx("audio",{ref:s,src:nn(e,t),preload:"metadata"})]}),n.jsx(Ax,{ticket:e,file:t})]})}function xC(e){const t=Math.max(0,Math.round(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Cp({doc:e,onClose:t}){const{toast:s}=qe(),i=nn(e.ticket,e.file),o=$e({queryKey:["doc",e.ticket,e.file],queryFn:async()=>{const u=await fetch(i);if(!u.ok)throw new Error("The file could not be read.");return u.text()},enabled:e.kind==="md"}),l=Rx(e.file),c=()=>void navigator.clipboard?.writeText(o.data??"").then(()=>s("Document copied"));return n.jsxs("section",{className:"cdoc","aria-label":es(e.file),children:[n.jsxs("div",{className:"cdoc-h",children:[n.jsx("span",{className:`cfic sm ${l.cls}`,children:l.label}),n.jsxs("div",{className:"grow",children:[n.jsx("div",{className:"cfname",children:es(e.file)}),n.jsx("div",{className:"cfmeta",children:e.from??(e.kind==="md"?"Markdown":"PDF")})]}),e.kind==="md"&&n.jsx("button",{className:"btn sm",onClick:c,disabled:!o.data,children:"Copy"}),e.kind==="pdf"&&n.jsx("a",{className:"btn sm",href:i,target:"_blank",rel:"noreferrer",children:"Open in a tab"}),n.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close the document",children:n.jsx(an,{size:16})})]}),e.kind==="md"?n.jsx("div",{className:"cdoc-b",children:o.isError?n.jsx("p",{className:"note",children:"The file could not be read."}):o.data?n.jsx(jp,{text:o.data,ticket:e.ticket}):n.jsx("p",{className:"note",children:"Loading…"})}):n.jsx("iframe",{className:"cdoc-pdf",src:i,title:es(e.file)})]})}function Ix(e){const t=[],s=new Map;for(const{at:i,update:o}of e)switch(o.sessionUpdate){case"user_message_chunk":{const l=o.content.type==="text"&&o.content._meta?.squadKit?.from==="claude-code"?"claude-code":"squad-kit";t.push({kind:"message",from:l,content:o.content,at:i});break}case"agent_message_chunk":t.push({kind:"message",from:"agent",content:o.content,at:i});break;case"agent_thought_chunk":t.push({kind:"message",from:"thought",content:o.content,at:i});break;case"plan":t.push({kind:"plan",entries:o.entries,at:i});break;case"tool_call":{const l={kind:"tool",id:o.toolCallId,title:o.title,toolKind:o.kind??"other",status:o.status??"in_progress",content:[...o.content??[]],command:o.rawInput?.command,at:i};s.set(o.toolCallId,l),t.push(l);break}case"tool_call_update":{const l=s.get(o.toolCallId);if(!l)break;o.status&&(l.status=o.status),o.title&&(l.title=o.title),o.kind&&(l.toolKind=o.kind),o.rawInput?.command&&(l.command=o.rawInput.command),o.content&&(l.content=[...o.content]);break}}for(const i of s.values())bC(i);return t}const vC=/^(StructuredOutput|Gave squad-kit its answer|Handed in its answer)$/,kC=/^structured output provided successfully\.?$/i,kg=/User refused permission to run tool|^Permission denied: |haven't granted it yet/i;function zd(e){return e.type==="content"&&e.content.type==="text"?e.content.text.trim():""}function wC(e){return e==="execute"?"Skipped a command this step may not run":e==="edit"||e==="delete"||e==="move"?"Skipped a change this step may not make":"Skipped something this step may not do"}function bC(e){if(vC.test(e.title)){e.answer=!0,e.title="Handed in its answer",e.content=e.content.filter(t=>!kC.test(zd(t)));return}e.status==="failed"&&e.content.some(t=>kg.test(zd(t)))&&(e.skipped=!0,e.detail=e.title,e.title=wC(e.toolKind),e.content=e.content.filter(t=>!kg.test(zd(t))))}function tn(e){return/["$`\\!]/.test(e)?`'${e.replace(/'/g,"'\\''")}'`:`"${e}"`}function Lx(e){let t;do t=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==t);return e}function jC(e){return(e?.options??[]).map((t,s)=>{const i=t.do??(s===0?"retry":void 0);return{index:s,label:t.name,note:t.note,way:i,needs:i==="continue"?"reason":i==="yourself"?"fix":null,primary:s===0}})}function NC(e){return e?.title??"The squad stopped and needs you"}const wg={cursor:"Cursor",code:"VS Code"};function lc({t:e}){const t=Se(),i=$e({queryKey:["editors"],queryFn:()=>ze("/api/v1/editors"),staleTime:3e5}).data?.editors[0];return n.jsxs("button",{className:"btn sm",disabled:t.isPending||!e.baseCommit,title:e.baseCommit?void 0:"Nothing built yet",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/open-editor`,body:i?{editor:i}:{},done:`Opened in ${i?wg[i]:"your editor"}`}),children:[n.jsx(mr,{size:13})," Open in ",i?wg[i]:"editor"]})}function SC({t:e}){const t=$e({queryKey:["changes",e.id,e.activity.length],queryFn:()=>ze(`/api/v1/tickets/${e.id}/changes`),refetchInterval:e.live?1e4:!1}),s=t.data,i=s?.files.reduce((l,c)=>l+c.added,0)??0,o=s?.files.reduce((l,c)=>l+c.removed,0)??0;return n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"changes-head",children:[n.jsxs("div",{children:[s&&s.files.length>0?n.jsxs(n.Fragment,{children:[n.jsxs("b",{children:[s.files.length," ",s.files.length===1?"file":"files"," changed"]})," ",n.jsxs("span",{className:"add",children:["+",i]})," ",n.jsxs("span",{className:"del",children:["−",o]})]}):n.jsx("b",{children:"Changes"}),n.jsx("p",{className:"note",children:s?.from==="branch"?`Read from branch ${s.branch}. The copy was removed after the release.`:"The squad builds in its own copy of the code, so your folder stays yours. These changes reach your folder after Looks right."})]}),n.jsx("span",{className:"grow"}),n.jsx(lc,{t:e})]}),t.isLoading&&n.jsx("p",{className:"note",children:"Reading the changes…"}),t.error&&n.jsx("p",{className:"note",children:t.error.message}),s&&!s.files.length&&n.jsx("p",{className:"note",children:s.from==="none"?"Nothing built yet.":"No changes against main yet."}),s?.cut&&n.jsx("p",{className:"note",children:"This change is very large, so some files show only their name. Open it in your editor to see all of it."}),s?.files.map(l=>n.jsx(CC,{f:l},l.path)),n.jsxs("div",{className:"pills",style:{marginTop:12},children:[n.jsx(ye,{text:`squad changes ${e.id} --full`}),n.jsx(ye,{text:`squad open ${e.id}`})]})]})}function CC({f:e}){const t=e.patch?e.patch.split(`
526
- `):[],[s,i]=E.useState(t.length<=300);return n.jsxs("div",{className:"conv-diff",children:[n.jsxs("button",{className:"conv-diff-head mono changes-file",onClick:()=>i(!s),children:[n.jsx("span",{className:`fstat ${e.status}`,children:e.status==="added"?"new":e.status==="deleted"?"deleted":e.status==="renamed"?"moved":"changed"}),n.jsx("span",{style:{overflowWrap:"anywhere",textAlign:"left"},children:e.path}),n.jsx("span",{className:"grow"}),e.binary?n.jsx("span",{children:"binary"}):n.jsxs("span",{children:[n.jsxs("span",{className:"add",children:["+",e.added]})," ",n.jsxs("span",{className:"del",children:["−",e.removed]})]})]}),s&&t.length>0&&n.jsx("pre",{children:t.map((o,l)=>o.startsWith("@@")?n.jsx("div",{className:"gap",children:o.replace(/^(@@[^@]*@@).*/,"$1")},l):n.jsxs("div",{className:o.startsWith("+")?"add":o.startsWith("-")?"del":"same",children:[n.jsx("span",{className:"sign",children:o.startsWith("+")?"+":o.startsWith("-")?"−":" "}),o.slice(1)||" "]},l))})]})}function cc({ticket:e,app:t,small:s,label:i="Report a problem"}){return n.jsxs("button",{className:`btn ${s?"sm":""}`,onClick:()=>Jl.open({...e?{ticket:e}:{},...t?{app:t}:{}}),children:[n.jsx(qh,{size:s?13:14})," ",i]})}function EC(){const e=Ak();return e?n.jsx(PC,{ask:e,onClose:Jl.close},`${e.ticket??""}${e.app?"app":""}`):null}function TC(e){return/[\\/]Downloads$/.test(e)?" in your Downloads folder":""}function PC({ask:e,onClose:t}){const{toast:s}=qe(),[i,o]=E.useState(null),[l,c]=E.useState(null),[u,h]=E.useState(""),[p,m]=E.useState(!1),[f,x]=E.useState(null),y=e.app?null:xr,k=new URLSearchParams({...y?{project:y}:{},...y&&e.ticket?{ticket:e.ticket}:{}}).toString();E.useEffect(()=>{let N=!0;return ze(`/api/v1/app/report${k?`?${k}`:""}`).then(S=>N&&o(S)).catch(S=>N&&c(S.message)),()=>{N=!1}},[k]);const w=async()=>{m(!0),c(null);try{x(await St("/api/v1/app/report","POST",{...y?{project:y}:{},...y&&e.ticket?{ticket:e.ticket}:{},...u.trim()?{note:u}:{}}))}catch(N){c(N instanceof Error?N.message:String(N))}finally{m(!1)}},j=N=>{const S=navigator.clipboard?.writeText(N);if(!S)return s("Could not copy. Select the text instead.","err");S.then(()=>s("Copied where the file is"),()=>s("Could not copy. Select the text instead.","err"))};return f?.file?n.jsxs(at,{title:"Report saved",onClose:t,footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",onClick:t,children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," Done"]}),n.jsxs("button",{className:"btn",onClick:()=>j(f.file),children:[n.jsx(Vs,{size:14})," Copy where it is"]})]}),children:[n.jsxs("div",{className:"report-saved",role:"status",children:[n.jsx("span",{className:"report-ok",children:n.jsx(Ce,{size:16,strokeWidth:2.6})}),n.jsxs("div",{children:[n.jsxs("b",{children:["Saved ",f.name,TC(f.folder)]}),n.jsx("span",{className:"mono",children:f.file})]})]}),n.jsx("p",{className:"report-send",children:"Send this file to whoever helps you with squad-kit."}),n.jsx("p",{className:"note",children:"It holds no tokens or passwords. You can open it first to see what is inside: README.txt lists every file."})]}):n.jsxs(at,{title:"Report a problem",onClose:t,footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:!i||p,onClick:()=>void w(),children:[p?n.jsx(In,{size:15,className:"spin"}):n.jsx(qh,{size:15})," ",i?`Save ${i.name}`:"Save the report"]}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),i&&n.jsx(ye,{text:i.command})]}),children:[n.jsx("p",{children:"squad-kit saves one file you can send to your engineer or to squad-kit support."}),i?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"The file holds"}),n.jsx("ul",{className:"safe-list",children:i.holds.map(N=>n.jsxs("li",{children:[n.jsx(Ce,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),N]},N))}),n.jsxs("div",{className:"report-never",children:[n.jsx("b",{children:"Never included:"})," ",i.never.replace(/^Never included:\s*/,"")]})]}):!l&&n.jsx("p",{className:"note",children:"Looking at what the file will hold…"}),n.jsxs("div",{className:"field",style:{marginTop:14},children:[n.jsx("label",{htmlFor:"report-what",children:"What happened? (optional)"}),n.jsx("textarea",{id:"report-what",className:"waynote",rows:3,value:u,onChange:N=>h(N.target.value),placeholder:"For example: it stopped after I approved the design"})]}),l&&n.jsx("p",{className:"report-err",role:"alert",children:l})]})}function RC(){return n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Something wrong?"}),n.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[n.jsx(cc,{app:!0,small:!0}),n.jsx("span",{className:"note",children:"One file to send: squad-kit's log for the last 24 hours and the versions. Never your tokens or passwords."}),n.jsx(ye,{text:"squad report"}),n.jsx(ye,{text:"squad logs"})]})]})}function _x({title:e,what:t,safe:s=[],ways:i,report:o,hint:l,children:c}){return n.jsxs("div",{className:"drafterr errcard",role:"alert",children:[n.jsx("b",{className:"errcard-title",children:e}),n.jsx("div",{className:"errcard-what",children:t}),s.length>0&&n.jsx("ul",{className:"safe-list",children:s.map(u=>n.jsxs("li",{children:[n.jsx(Ce,{size:15,strokeWidth:2.6,"aria-hidden":"true"}),u]},u))}),n.jsx("div",{className:"errcard-lbl",children:"What you can do"}),n.jsxs("div",{className:"drafterr-ways",children:[i.map(u=>n.jsxs("button",{className:`btn ${u.primary?"pri":""}`,disabled:u.disabled,title:u.title,onClick:u.onClick,children:[u.icon,u.label]},u.label)),o!==!1&&n.jsx(cc,{...o??{}})]}),l&&n.jsx("div",{className:"errcard-hint",children:l}),c]})}function AC({t:e,extra:t}){const s=Se(),[i,o]=E.useState(null),[l,c]=E.useState(""),u=jC(e.stuck),h=(k,w,j)=>s.mutate({path:`/api/v1/tickets/${e.id}/decide`,body:{choice:k,...w},done:j}),p=u.find(k=>k.way==="retry"),m=i==="reason"||i==="fix"?u.find(k=>k.needs===i):void 0,f=i==="note"&&l.trim()?l.trim():"",x=u.map(k=>({label:k.label,title:k.note,primary:k.primary,disabled:s.isPending,icon:k.way==="retry"?n.jsx(Ca,{size:14}):k.way==="yourself"?n.jsx(Sa,{size:14}):void 0,onClick:()=>{if(k.needs){o(i===k.needs?null:k.needs),c("");return}h(k.index,k.way==="retry"&&f?{note:f}:{},k.way==="retry"?"Trying again. The squad carries on.":"Decided. The squad carries on.")}})),y=m?`squad decide ${e.id} ${m.index+1}${m.needs==="reason"?` --reason "${l.trim()||"…"}"`:""}`:`squad decide ${e.id}${p&&f?` ${p.index+1} --note "${f}"`:""}`;return n.jsxs("div",{className:"db",children:[n.jsx(_x,{title:NC(e.stuck),what:e.stuck?.question??"",safe:e.stuck?.safe??["Nothing was lost: the work so far is kept."],ways:x,report:{ticket:e.id},hint:n.jsxs(n.Fragment,{children:[p&&i!=="note"&&n.jsx("button",{className:"linkbtn",onClick:()=>o("note"),children:"Add a note for the squad first"}),e.stuck?.detail?" Engineers: the exact error is in the Developer tab.":""]})}),i==="note"&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"A note for the squad (optional)"}),n.jsx("textarea",{className:"waynote",rows:2,value:l,onChange:k=>c(k.target.value),placeholder:"For example: the test server needs the VPN, it is on now"}),n.jsxs("p",{className:"note",style:{fontSize:12.5},children:["The squad reads it first when you press ",p?.label??"Try again","."]})]}),i==="reason"&&m&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Why continue anyway?"}),n.jsx("textarea",{className:"waynote",rows:2,value:l,onChange:k=>c(k.target.value),placeholder:"For example: the failing test is broken on main too, fixed in SK-160"}),n.jsx("p",{className:"note",style:{fontSize:12.5},children:"Only you can do this. Your reason shows on the ticket, the pull request and the release notes."}),n.jsx("div",{className:"errcard-confirm",children:n.jsxs("button",{className:"btn pri",disabled:!l.trim()||s.isPending,onClick:()=>h(m.index,{reason:l},"Decided. The squad carries on."),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," ",m.label]})})]}),i==="fix"&&m&&n.jsxs("div",{className:"stuckbox",style:{marginTop:12},children:[n.jsxs("p",{style:{margin:"0 0 8px"},children:["Open the ticket's copy, fix it, and save. Then press ",n.jsx("b",{children:"I fixed it"}),": the checks, review and proof run again."]}),n.jsxs("div",{className:"errcard-confirm",children:[n.jsx(lc,{t:e}),n.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>h(m.index,{},"OK. The checks run again on your fix."),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," I fixed it, check again"]})]})]}),n.jsx("div",{className:"errcard-cmd",children:n.jsx(ye,{text:y})}),t]})}function IC({t:e}){const{toast:t}=qe();if(!e.stuck||e.waiting?.kind!=="stuck")return null;const s=e.stuck.detail??e.stuck.question,i=()=>{const o=navigator.clipboard?.writeText(s);if(!o)return t("Could not copy. Select the text instead.","err");o.then(()=>t("Copied the exact error"),()=>t("Could not copy. Select the text instead.","err"))};return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"The exact error"}),n.jsx("pre",{className:"exact-err",children:s}),n.jsxs("div",{className:"pills",style:{marginTop:8},children:[n.jsxs("button",{className:"btn sm",onClick:i,children:[n.jsx(Vs,{size:13})," Copy"]}),n.jsx(cc,{ticket:e.id,small:!0}),n.jsx(ye,{text:"squad logs --tail"})]})]})}const bg=10*1024*1024;function Ep(e){return new Promise((t,s)=>{const i=new FileReader;i.onload=()=>{const o=String(i.result);t({name:e.name,size:e.size,data:o.slice(o.indexOf(",")+1),...e.type.startsWith("image/")?{preview:o}:{}})},i.onerror=()=>s(new Error(`Could not read ${e.name}`)),i.readAsDataURL(e)})}function LC(e){const t=/\.(png|jpe?g|gif|webp)$/i.exec(e.name)?.[1]?.toLowerCase();return t?{preview:`data:image/${t==="jpg"?"jpeg":t};base64,${e.data}`}:{}}function _C({onClose:e,onCreated:t}){const s=Se(),{toast:i}=qe(),[o,l]=E.useState("write"),[c,u]=E.useState(""),[h,p]=E.useState(null),[m,f]=E.useState(null),x=h?.status==="working",[y,k]=E.useState(null),[w,j]=E.useState(""),[N,S]=E.useState(""),[T,A]=E.useState("feature"),[q,R]=E.useState("normal"),[M,L]=E.useState("full"),[B,z]=E.useState(!1),[O,U]=E.useState(null),[ne,Z]=E.useState([]),[X,he]=E.useState([]),[ce,Q]=E.useState([]),[se,P]=E.useState(""),[$,Y]=E.useState([]),[I,pe]=E.useState(""),[me,xe]=E.useState(""),[Pe,Ee]=E.useState("annoying"),Ne=T==="bug",[Me,st]=E.useState([]),It=async V=>{const ve=[...V],Re=ve.find(lt=>lt.size>bg);Re&&i(`${Re.name} is larger than 10 MB.`,"err");const Ue=await Promise.all(ve.filter(lt=>lt.size<=bg).map(Ep)).catch(lt=>(i(lt.message,"err"),[]));st(lt=>[...lt,...Ue].slice(0,10))},Ht=Me.map(({name:V,data:ve})=>({name:V,data:ve})),Ln=V=>{j(V.title),S(V.ask),V.kind==="bug"&&P(V.ask),A(V.kind),R(V.priority),V.track&&(L(V.track),U(V.track)),Z(V.criteria),he(V.rules),Q(V.edgeCases),k(V.gaps),l("write")};E.useEffect(()=>{let V=!0;return ze("/api/v1/tickets/draft/current").then(async({draft:ve})=>{if(!(!V||!ve)&&(u(ve.text),l("paste"),p(ve),ve.files.length)){const Re=await ze(`/api/v1/tickets/draft/${ve.id}/files`).catch(()=>({files:[]}));V&&st(Re.files.map((Ue,lt)=>({...Ue,size:ve.files[lt]?.size??0,...LC(Ue)})))}}).catch(()=>{}),()=>{V=!1}},[]);const Lt=$e({queryKey:["ticket-draft",h?.id],queryFn:()=>ze(`/api/v1/tickets/draft/${h.id}`),enabled:x,refetchInterval:1e3,retry:!1});E.useEffect(()=>{Lt.data&&h?.status==="working"&&Lt.data.id===h.id&&p(Lt.data)},[Lt.data]),E.useEffect(()=>{Lt.isError&&x&&p(V=>V&&{...V,status:"failed",error:"squad-kit lost this draft, maybe because it restarted."})},[Lt.isError]);const kn=E.useRef(null);E.useEffect(()=>{h?.status==="done"&&h.draft&&kn.current!==h.id&&(kn.current=h.id,Ln(h.draft))},[h]);const ln=async()=>{f(null);try{p(await St("/api/v1/tickets/draft","POST",{text:c,files:Ht}))}catch(V){f(V instanceof Error?V.message:String(V))}},Vt=async()=>{if(h)try{p(await St(`/api/v1/tickets/draft/${h.id}/cancel`,"POST"))}catch{p({...h,status:"cancelled"})}},_t=()=>{h&&St(`/api/v1/tickets/draft/${h.id}/dismiss`,"POST").catch(()=>{}),p(null)},ht=()=>{_t(),f(null),N.trim()||S(c.trim()),se.trim()||P(c.trim()),l("write")},cn=()=>{_t(),k(null),U(null);for(const V of[j,S,P,pe,xe])V("");for(const V of[Z,he,Q,Y])V([]);l("paste")},wn=$.filter(V=>V.trim()),ls=[se.trim()&&`What happens:
527
- ${se.trim()}`,wn.length&&`Steps to see it:
528
- ${wn.map((V,ve)=>`${ve+1}. ${V.trim()}`).join(`
529
- `)}`,I.trim()&&`What should happen:
530
- ${I.trim()}`,me.trim()&&`Where: ${me.trim()}`].filter(Boolean).join(`
531
-
532
- `),Hn=Ne?{title:w,ask:ls,kind:T,severity:Pe,priority:Pe==="stops-work"?"high":Pe==="small"?"low":"normal",track:M,files:Ht,talkFirst:B&&M==="full"}:{title:w,ask:N,kind:T,track:M,priority:q,criteria:ne,rules:X,edgeCases:ce,files:Ht,talkFirst:B&&M==="full"},De=()=>s.mutate({path:"/api/v1/tickets",body:Hn},{onSuccess:V=>{_t(),t(V),e()}}),G=!!m||h?.status==="failed"||h?.status==="cancelled",ie=o==="paste"?`squad new --from ${tn(c.trim().split(`
533
- `)[0]?.slice(0,40)||"your message")}`:[`squad new ${tn(w.trim()||"Your title")}`,Ne?`--bug --severity ${Pe}`:"",Ne&&se.trim()?`--ask ${tn(se.trim())}`:"",M==="express"?"--express":"",B&&M==="full"?"--talk":"",...Ne?[]:ne.filter(V=>V.trim()).map(V=>`--criteria ${tn(V)}`),...Ne?[]:X.filter(V=>V.trim()).map(V=>`--rule ${tn(V)}`),...Ne?[]:ce.filter(V=>V.trim()).map(V=>`--edge ${tn(V)}`),...Me.map(V=>`--attach ${tn(V.name)}`)].filter(Boolean).join(" ");return n.jsxs(at,{title:"New ticket",wide:!0,onClose:e,icon:n.jsx("span",{className:"glyph",children:n.jsx(Rn,{size:15})}),footer:n.jsxs(n.Fragment,{children:[o==="paste"?G?null:n.jsxs("button",{className:"btn pri",disabled:!c.trim()&&!Me.length||x,onClick:()=>void ln(),children:[x?n.jsx(In,{size:15,className:"spin"}):n.jsx(md,{size:15})," ",x?"Filling in…":"Fill in the ticket"]}):n.jsxs("button",{className:"btn pri",disabled:!w.trim()||s.isPending,onClick:De,children:[n.jsx(Rn,{size:15})," Create ticket"]}),n.jsx("button",{className:"btn",onClick:x?()=>void Vt():e,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:ie})]}),children:[n.jsxs("div",{className:"seg",style:{marginBottom:14,width:"fit-content"},children:[n.jsx("button",{className:o==="write"?"on":"",disabled:x,title:x?"Press Cancel first to write it yourself":void 0,onClick:()=>l("write"),children:"Write it"}),n.jsxs("button",{className:o==="paste"?"on":"",onClick:()=>l("paste"),children:[n.jsx(md,{size:13,style:{verticalAlign:"-2px",marginRight:5}}),"From an idea or message"]})]}),o==="paste"?n.jsxs(n.Fragment,{children:[!x&&n.jsx("p",{children:"Paste an idea, a WhatsApp message or one line of business. Add screenshots if you have them. The Analyst fills in the ticket, and you check every field before it is created."}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-paste",children:"The idea or message"}),n.jsx("textarea",{id:"nt-paste",className:"textarea",style:{minHeight:x?70:150},autoFocus:!0,readOnly:x,value:c,onChange:V=>u(V.target.value),onPaste:V=>{V.clipboardData.files.length&&(V.preventDefault(),It(V.clipboardData.files))},placeholder:"For example: the manager says clerks should not book more than 3 appointments a day for the same person"})]}),x&&h?n.jsxs(n.Fragment,{children:[Me.length>0&&n.jsxs("p",{className:"note",style:{margin:"-6px 0 12px"},children:["With ",Me.map(V=>V.name).join(", ")]}),n.jsx(FC,{job:h})]}):n.jsx(Fd,{files:Me,onAdd:It,onRemove:V=>st(ve=>ve.filter((Re,Ue)=>Ue!==V))}),G&&n.jsx($C,{error:m??(h?.status==="failed"?h.error??"Something went wrong.":null),onRetry:()=>void ln(),onWrite:ht})]}):n.jsxs(n.Fragment,{children:[y?n.jsxs("div",{className:"drafted",children:[n.jsxs("b",{children:[n.jsx(md,{size:13})," The Analyst filled this in from your message."]})," Check it and change anything."," ",n.jsx("button",{className:"linkbtn",onClick:cn,children:"Discard this draft"}),y.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{marginTop:6},children:"Still unclear, so the Analyst will ask you after you create it:"}),n.jsx("ul",{children:y.map((V,ve)=>n.jsx("li",{children:V},ve))})]})]}):n.jsx("p",{children:Ne?"Say what goes wrong and how to see it. The squad finds the cause and fixes it.":"Write it in plain words. Add what you already know; the Analyst asks you about the rest."}),n.jsxs("div",{className:"field",children:[n.jsx("label",{children:"Kind"}),n.jsx("div",{className:"sevs",children:["feature","bug"].map(V=>n.jsxs("button",{className:`choice ${T===V?"on":""}`,onClick:()=>A(V),children:[n.jsx("span",{className:"rd"}),V==="feature"?"New feature":"Bug"]},V))})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-title",children:"Title"}),n.jsx("input",{id:"nt-title",className:"input",autoFocus:!0,value:w,onChange:V=>j(V.target.value),placeholder:Ne?"For example: A price written as 1,500 is refused":"For example: Show hearing time in local time"})]}),Ne?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-what",children:"What happens"}),n.jsx("textarea",{id:"nt-what",className:"textarea",value:se,onChange:V=>P(V.target.value),placeholder:"For example: the form says the price is not valid."})]}),n.jsx(ll,{label:"Steps to see it",hint:"One step per line, for example: Open Services and add a service.",items:$,onChange:Y,add:"Add a step"}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-expected",children:"What should happen"}),n.jsx("textarea",{id:"nt-expected",className:"textarea",value:I,onChange:V=>pe(V.target.value),placeholder:"For example: the price is saved as 1,500 SAR."})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-where",children:"Where"}),n.jsx("input",{id:"nt-where",className:"input",value:me,onChange:V=>xe(V.target.value),placeholder:"The page or link, for example: Setup, Services"})]}),n.jsx(Fd,{files:Me,onAdd:It,onRemove:V=>st(ve=>ve.filter((Re,Ue)=>Ue!==V))}),n.jsxs("div",{className:"field",children:[n.jsx("label",{children:"How bad is it?"}),n.jsx("div",{className:"sevs",children:zx.map(V=>n.jsxs("button",{className:`choice ${Pe===V.value?"on":""}`,onClick:()=>Ee(V.value),children:[n.jsx("span",{className:"rd"}),V.label]},V.value))})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"nt-ask",children:"What do you want?"}),n.jsx("textarea",{id:"nt-ask",className:"textarea",value:N,onChange:V=>S(V.target.value),placeholder:"Who needs it, and why. One or two sentences is enough."})]}),n.jsx(ll,{label:"Acceptance criteria",hint:"Each one is something you can check, for example: The clerk sees the time in their own city.",items:ne,onChange:Z,add:"Add a criterion"}),n.jsx(ll,{label:"Business rules",hint:"Limits and who may do what, for example: Only a team lead can reassign a case.",items:X,onChange:he,add:"Add a rule"}),n.jsx(ll,{label:"Edge cases",hint:"Unusual cases to handle, for example: The person has no cases yet.",items:ce,onChange:Q,add:"Add an edge case"}),n.jsx(Fd,{files:Me,onAdd:It,onRemove:V=>st(ve=>ve.filter((Re,Ue)=>Ue!==V))}),n.jsxs("div",{className:"field",children:[n.jsx("label",{children:"Priority"}),n.jsx("div",{className:"sevs",children:["high","normal","low"].map(V=>n.jsxs("button",{className:`choice ${q===V?"on":""}`,onClick:()=>R(V),children:[n.jsx("span",{className:"rd"}),V==="high"?"High":V==="normal"?"Normal":"Low"]},V))})]})]}),n.jsxs("div",{className:"field",children:[n.jsxs("label",{children:["Track",O&&n.jsxs("span",{className:"note",style:{marginLeft:8,fontWeight:400},children:["The Analyst suggests ",O==="express"?"Express":"Full"]})]}),n.jsx("div",{className:"tracks",children:OC.map(V=>n.jsxs("button",{className:`opt2 ${M===V.id?"pick":""}`,onClick:()=>L(V.id),children:[n.jsxs("b",{children:[V.name,M===V.id&&n.jsxs("span",{children:[n.jsx(Ce,{size:13,strokeWidth:2.5})," Chosen"]})]}),V.note]},V.id))})]}),M==="full"&&n.jsxs("label",{className:"talkfirst",children:[n.jsx("input",{type:"checkbox",checked:B,onChange:V=>z(V.target.checked)}),n.jsxs("span",{children:[n.jsx("b",{children:"Talk it through first."})," The Analyst opens a chat instead of sending questions. The spec is written from your talk when you say so."]})]})]})]})}const zC=60;function MC(e){const[t,s]=E.useState(Date.now());return E.useEffect(()=>{const i=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(i)},[e]),t}function FC({job:e}){const t=MC(!0),s=Math.max(0,Math.floor((t-Date.parse(e.startedAt))/1e3)),o=["read","look","write"].indexOf(e.step),l=h=>h<o?"done":h===o?"now":"todo",c=e.looked.slice(-3),u=e.looked.length-c.length;return n.jsxs("div",{className:"drafting",role:"status","aria-live":"polite",children:[n.jsxs("div",{className:"drafting-head",children:[n.jsx("b",{children:"The Analyst is filling in your ticket"}),n.jsx("span",{className:"grow"}),n.jsxs("span",{className:"mono drafting-clock","aria-label":`${s} seconds so far`,children:[Math.floor(s/60),":",String(s%60).padStart(2,"0")]})]}),n.jsx(Md,{state:l(0),children:"Read your message"}),n.jsxs(Md,{state:l(1),children:["Looking at the project",c.length>0&&n.jsxs("span",{className:"note",children:[": ",c.join(", "),u>0?` and ${u} more`:""]})]}),n.jsx(Md,{state:l(2),children:"Writing the ticket for you to check"}),n.jsxs("p",{className:"note",children:[s>2*zC?"This one is taking longer than usual. You can wait, or press Cancel.":"Usually under a minute."," You can close this window: the draft waits for you under New ticket."]})]})}function Md({state:e,children:t}){return n.jsxs("div",{className:`dstep ${e}`,children:[n.jsx("span",{className:"dot","aria-hidden":"true",children:e==="done"?n.jsx(Ce,{size:12,strokeWidth:3}):e==="now"?n.jsx(In,{size:12,className:"spin"}):null}),n.jsxs("span",{children:[t,n.jsx("span",{className:"sr-only",children:e==="done"?" (done)":e==="now"?" (now)":""})]})]})}function $C({error:e,onRetry:t,onWrite:s}){return e?n.jsx(_x,{title:"The Analyst could not finish",what:e,safe:["Your text and files are kept.","No ticket was made yet."],ways:[{label:"Try again",primary:!0,icon:n.jsx(Ca,{size:14}),onClick:t},{label:"Write it myself with what I typed",icon:n.jsx(Sa,{size:14}),onClick:s}]}):n.jsxs("div",{className:"drafterr calm",role:"status",children:[n.jsx("b",{children:"You stopped the Analyst"}),n.jsx("div",{children:"Nothing was saved. Your text is kept."}),n.jsxs("div",{className:"drafterr-ways",children:[n.jsxs("button",{className:"btn pri",onClick:t,children:[n.jsx(Ca,{size:14})," Try again"]}),n.jsxs("button",{className:"btn",onClick:s,children:[n.jsx(Sa,{size:14})," Write it myself with what I typed"]})]})]})}const OC=[{id:"full",name:"Full",note:"Every step. The Analyst asks questions and you approve the plan."},{id:"express",name:"Express",note:"For a typo or a small urgent fix. No questions, the plan is approved on its own. Build, checks, review and your Looks right still run."}];function ll({label:e,hint:t,items:s,onChange:i,add:o}){const l=(c,u)=>i(s.map((h,p)=>p===c?u:h));return n.jsxs("div",{className:"field",children:[n.jsx("label",{children:e}),s.length===0&&n.jsx("p",{className:"note",style:{margin:"0 0 6px"},children:t}),s.map((c,u)=>n.jsxs("div",{className:"listrow",children:[n.jsx("span",{className:"mono note",children:u+1}),n.jsx("input",{className:"input",value:c,autoFocus:c===""&&u===s.length-1,onChange:h=>l(u,h.target.value),onKeyDown:h=>{h.key==="Enter"&&u===s.length-1&&c.trim()&&i([...s,""])},"aria-label":`${e} ${u+1}`}),n.jsx("button",{className:"iconbtn",onClick:()=>i(s.filter((h,p)=>p!==u)),"aria-label":`Remove ${e.toLowerCase()} ${u+1}`,children:n.jsx(an,{size:14})})]},u)),n.jsxs("button",{className:"btn sm",onClick:()=>i([...s,""]),children:[n.jsx(Rn,{size:13})," ",o]})]})}const DC=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba|mp4|mov|m4v|webm)$/i;function Fd({files:e,onAdd:t,onRemove:s}){const[i,o]=E.useState(!1),l=e.some(u=>DC.test(u.name)),c=$e({queryKey:["speech"],queryFn:()=>ze("/api/v1/speech"),enabled:l});return n.jsxs("div",{className:"field",children:[n.jsx("label",{children:"Files"}),n.jsxs("label",{className:`dropzone ${i?"over":""}`,onDragOver:u=>{u.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:u=>{u.preventDefault(),o(!1),u.dataTransfer.files.length&&t(u.dataTransfer.files)},onPaste:u=>u.clipboardData.files.length&&t(u.clipboardData.files),children:[n.jsx(Al,{size:15})," Drop screenshots, documents, voice or video notes here, or click to pick",n.jsx("input",{type:"file",multiple:!0,hidden:!0,onChange:u=>{u.target.files?.length&&t(u.target.files),u.target.value=""}})]}),e.length>0&&n.jsx("div",{className:"picked",children:e.map((u,h)=>n.jsxs("span",{className:"pickedfile",children:[u.preview?n.jsx("img",{src:u.preview,alt:""}):n.jsx(Al,{size:13}),n.jsx("span",{className:"mono",children:u.name}),n.jsx("span",{className:"note",children:u.size<1024*1024?`${Math.max(1,Math.round(u.size/1024))} KB`:`${(u.size/1024/1024).toFixed(1)} MB`}),n.jsx("button",{className:"iconbtn",onClick:()=>s(h),"aria-label":`Remove ${u.name}`,children:n.jsx(an,{size:13})})]},`${u.name}-${h}`))}),l&&c.data&&n.jsx("p",{className:"note",style:{marginTop:6},children:c.data.hasKey?"squad-kit writes out voice and video notes with Munsit, and takes pictures of the screen in videos, so every agent knows what was said.":"Add a Munsit key in Settings so the squad can listen to voice and video notes. Without it they stay attached, unheard."})]})}function BC({onClose:e,onCreated:t}){const s=Se(),[i,o]=E.useState("AB#"),l=()=>s.mutate({path:"/api/v1/pull",body:{ref:i}},{onSuccess:c=>{t(c),e()}});return n.jsxs(at,{title:"Pull from Azure DevOps",onClose:e,icon:n.jsx("span",{className:"glyph",children:n.jsx(is,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:i.replace(/\D/g,"").length===0||s.isPending,onClick:l,children:[n.jsx(is,{size:15})," Pull ticket"]}),n.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad pull ${i.trim()||"AB#4133"}`})]}),children:[n.jsx("p",{children:"Bring a work item in as a ticket, with its description and attachments."}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"pull-ref",children:"Work item"}),n.jsx("input",{id:"pull-ref",className:"input mono",autoFocus:!0,value:i,onChange:c=>o(c.target.value),onKeyDown:c=>c.key==="Enter"&&l()})]})]})}const zx=[{value:"stops-work",label:"Stops work"},{value:"annoying",label:"Annoying"},{value:"small",label:"Small"}];function Tp({onClose:e,foundIn:t}){const s=Se(),[i,o]=E.useState(""),[l,c]=E.useState(""),[u,h]=E.useState(""),[p,m]=E.useState("annoying"),f=()=>s.mutate({path:"/api/v1/bugs",body:{what:i,how:l,expected:u,severity:p,foundIn:t},done:"Bug reported. Triage is sorting it."},{onSuccess:e});return n.jsxs(at,{title:"Report a bug",onClose:e,icon:n.jsx("span",{className:"glyph",style:{background:"var(--bug-soft)",color:"var(--bug)"},children:n.jsx(rs,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:!i.trim()||s.isPending,onClick:f,children:[n.jsx(rs,{size:15})," Report bug"]}),n.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad bug ${tn(i.trim()||"What happened")}${t?` --in ${t}`:""}`})]}),children:[n.jsxs("p",{children:["It becomes a ticket linked to ",t??"the latest release",", and goes around the same loop. The Tester adds a check so it can't come back."]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"bug-what",children:"What happened?"}),n.jsx("input",{id:"bug-what",className:"input",autoFocus:!0,value:i,onChange:x=>o(x.target.value),placeholder:"For example: Table text is hard to read in dark mode"})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"bug-how",children:"How can we see it?"}),n.jsx("input",{id:"bug-how",className:"input",value:l,onChange:x=>c(x.target.value),placeholder:"The steps, in a line"})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"bug-exp",children:"What did you expect?"}),n.jsx("input",{id:"bug-exp",className:"input",value:u,onChange:x=>h(x.target.value)})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{children:"How bad is it?"}),n.jsx("div",{className:"sevs",children:zx.map(x=>n.jsxs("button",{className:`choice ${p===x.value?"on":""}`,onClick:()=>m(x.value),children:[n.jsx("span",{className:"rd"}),x.label]},x.value))})]})]})}function qC({release:e,demo:t,onClose:s}){const{toast:i}=qe(),o=()=>void navigator.clipboard?.writeText(e.whatsappDraft??"").then(()=>i("Message copied. Send it from WhatsApp.")),l=[e.addons.changelog&&"Changelog updated",e.addons.tag&&`Tagged ${e.version} in git`,e.addons.pipeline&&"Azure pipeline started"].filter(Boolean);return n.jsxs(at,{title:e.unpushed?.length?`${e.version} is made, but not pushed yet`:`${e.version} is released`,onClose:s,icon:n.jsx("span",{className:"glyph",children:n.jsx(pa,{size:15})}),footer:n.jsxs(n.Fragment,{children:[e.addons.whatsapp&&n.jsxs("button",{className:"btn pri",onClick:o,children:[n.jsx(Vs,{size:15})," Copy message"]}),n.jsx("button",{className:"btn",onClick:s,children:"Done"})]}),children:[n.jsxs("div",{className:"donelist",children:[e.unpushed?.length?n.jsxs("div",{style:{color:"var(--you-ink)"},children:[n.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," The push failed, so its tickets stay open. Press Push again on the release once the remote is reachable."]}):n.jsxs("div",{children:[n.jsx(Ce,{size:16})," ",e.tickets.length," tickets released"]}),e.log?e.log.map(c=>n.jsxs("div",{style:c.ok?void 0:{color:"var(--you-ink)"},children:[c.ok?n.jsx(Ce,{size:16}):n.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," ",c.text]},c.text)):l.map(c=>n.jsxs("div",{children:[n.jsx(Ce,{size:16})," ",c]},c))]}),t&&!e.log&&n.jsx("p",{className:"note",style:{marginBottom:12},children:"Demo board: these release steps are shown, not run."}),e.addons.whatsapp&&e.whatsappDraft&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",style:{marginTop:4},children:"A WhatsApp note for your manager. Copy it and send it yourself."}),n.jsx("div",{className:"wa",children:e.whatsappDraft})]})]})}function wr(e){return e.stage==="release"||e.stage==="done"}function Pp(e){return wr(e)||!!e.specApproved||["implement","test","review"].includes(e.stage)}function UC(e){return e.part==="story"?"The story":e.index===void 0?"New done when":`Done when ${e.index+1}`}function Nh(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`:String(e[0]??"")}function jg({parts:e}){return n.jsx("div",{className:"changeparts",children:e.map((t,s)=>n.jsxs("div",{className:"chrow",children:[n.jsx("div",{className:"chlabel",children:UC(t)}),n.jsx("div",{className:t.before?"chold":"chold empty",children:t.before||n.jsx("i",{children:"new"})}),n.jsx("div",{className:"chnew",children:t.after||n.jsx("i",{children:"removed"})})]},s))})}const Ng={same:"Stays",changed:"Redone",new:"New"};function WC({c:e}){const t=e.design,s=t.before.filter(o=>!t.steps.some(l=>l.title===o)),i=t.steps.flatMap((o,l)=>o.change==="same"?[l+1]:[]);return n.jsxs("div",{className:"changeparts",children:[i.length>0&&n.jsxs("div",{className:"chrow",children:[n.jsxs("div",{className:"chlabel",children:[i.length===1?"Step":"Steps"," ",Nh(i)]}),n.jsx("div",{children:n.jsx("span",{className:"pill wait",children:Ng.same})}),n.jsx("div",{className:"chnew note",children:"Built already, as they are."})]}),t.steps.map((o,l)=>o.change==="same"?null:n.jsxs("div",{className:"chrow",children:[n.jsxs("div",{className:"chlabel",children:["Step ",l+1]}),n.jsx("div",{children:n.jsx("span",{className:"pill you",children:Ng[o.change]})}),n.jsx("div",{className:"chnew",children:o.title})]},l)),s.map(o=>n.jsxs("div",{className:"chrow",children:[n.jsx("div",{className:"chlabel",children:"Dropped"}),n.jsx("div",{}),n.jsx("div",{className:"chold",children:o})]},o))]})}function HC(e,t){const s=!!e.sessions?.build;return t.size==="big"?s?"Approve, and the Builder pauses after its current step. The Architect updates the design and you approve that too. Then the Builder redoes only the steps the change touches.":e.steps?"Approve, and the spec says it now. The Architect updates the design, and you approve it as usual.":"Approve, and the spec says it now. The Architect designs from the new spec.":s?"Approve, and the spec says it now. The Builder gets it at the end of its current step; the work does not stop.":"Approve, and the spec says it now. The Builder builds from the new spec."}function VC({t:e}){const t=Se(),[s,i]=E.useState(!1),[o,l]=E.useState(!1),[c,u]=E.useState(""),h=Cr(e);if(!h)return null;const p=h.status==="approved"||h.status==="designing",m=h.status==="writing"||h.status==="designing"||h.status==="building",f=(e.steps??[]).flatMap((k,w)=>k.status==="done"?[]:[w+1]),x={writing:`Change ${h.id}: the Analyst is writing it into the spec`,failed:`Change ${h.id}: the Analyst could not write it`,proposed:`Change ${h.id} to the spec`,approved:`Change ${h.id} is approved`,designing:`Change ${h.id}: the Architect is updating the design`,"design-ready":`The design update for change ${h.id}`,building:h.size==="big"?`Change ${h.id}: the Builder is redoing ${f.length===1?"step":"steps"} ${Nh(f)}`:`Change ${h.id}: the Builder is making it`,done:"",declined:""}[h.status],y=(k,w,j)=>t.mutate({path:`/api/v1/tickets/${e.id}/spec-change/${k}`,body:j,done:w},{onSuccess:()=>{i(!1),l(!1)}});return n.jsx("div",{className:"outdated","aria-label":"Change to the spec",children:n.jsxs("div",{className:"outdated-item changecard",children:[n.jsxs("div",{className:"outdated-head",children:[n.jsx("span",{className:"ic",children:m?n.jsx(In,{size:15,className:"spin"}):h.status==="failed"?n.jsx(za,{size:15}):n.jsx(vr,{size:15})}),n.jsx("b",{children:x}),h.size&&n.jsx("span",{className:`pill ${h.size==="big"?"you":"wait"}`,children:h.size==="big"?"Big change":"Small change"})]}),n.jsxs("div",{className:"changebody",children:[h.summary?n.jsx("p",{children:h.summary}):n.jsxs("p",{children:["“",h.ask,"”"]}),h.status==="writing"&&n.jsx("p",{className:"note",children:"The work goes on meanwhile. Nothing changes until you approve it."}),h.status==="failed"&&n.jsx("p",{className:"note",children:h.error}),h.why&&(h.status==="proposed"||h.status==="approved")&&n.jsx("p",{className:"note",children:h.why}),h.status==="proposed"&&h.parts&&n.jsx(jg,{parts:h.parts}),h.status==="proposed"&&n.jsx("p",{className:"note",children:HC(e,h)}),h.status==="approved"&&n.jsx("p",{className:"note",children:h.size==="big"?"The Builder finishes its current step, then pauses while the Architect updates the design.":"It reaches the Builder at the end of its current step. The work goes on."}),h.status==="designing"&&n.jsx("p",{className:"note",children:"The Builder paused after its step. The design update comes to you next."}),h.status==="design-ready"&&h.design&&n.jsxs(n.Fragment,{children:[h.design.summary&&n.jsx("p",{children:h.design.summary}),n.jsx(WC,{c:h}),h.parts&&n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"note",children:"And the spec, as you approved it:"}),n.jsx(jg,{parts:h.parts})]}),n.jsxs("p",{className:"note",children:["Approve, and the Builder redoes only ",(()=>{const k=h.design.steps.flatMap((w,j)=>w.change==="same"?[]:[j+1]);return k.length?`${k.length===1?"step":"steps"} ${Nh(k)}`:"what changed"})(),". Decline, and the spec stays as it was; the Builder carries on."]})]})]}),o?n.jsxs("div",{className:"row",children:[n.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:k=>u(k.target.value),placeholder:"Why take it back? (optional, it stays in the spec's record)"}),n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>y("withdraw","Withdrawn. The spec is back to how it was.",{reason:c}),children:"Withdraw"}),n.jsx("button",{className:"btn sm quiet",onClick:()=>l(!1),children:"Cancel"})]}):p?n.jsxs("div",{className:"row",children:[n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>l(!0),children:"Withdraw change"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad propose ${e.id} --withdraw`})]}):s?n.jsxs("div",{className:"row",children:[n.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:k=>u(k.target.value),placeholder:"Why not? (optional, it stays in the spec's record)"}),n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>y("decline","Declined. Nothing changes.",{reason:c}),children:"Decline"}),n.jsx("button",{className:"btn sm quiet",onClick:()=>i(!1),children:"Cancel"})]}):h.status==="proposed"||h.status==="design-ready"?n.jsxs("div",{className:"row",children:[n.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>y("approve",h.status==="design-ready"?"Approved. The Builder redoes what changed.":h.size==="big"?"Approved. The Architect updates the design next.":"Approved. The spec says it now."),children:[n.jsx(Ce,{size:14,strokeWidth:2.5})," ",h.status==="design-ready"?"Approve the new design":"Approve"]}),n.jsx("button",{className:"btn sm",onClick:()=>i(!0),children:h.status==="design-ready"?"Decline the change":"Decline"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:h.status==="design-ready"?`squad approve ${e.id}`:`squad propose ${e.id} --approve`})]}):h.status==="failed"?n.jsxs("div",{className:"row",children:[n.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>y("retry","The Analyst writes it again."),children:"Try again"}),n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>y("decline","Dropped the change."),children:"Drop it"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad propose ${e.id} --retry`})]}):null]})})}function uc({t:e,initial:t="",from:s,onClose:i}){const o=Se(),[l,c]=E.useState(t),u=wr(e),h=Cr(e),p=!!l.trim()&&!o.isPending,m=tn(l.trim()||"…"),f=x=>o.mutate({path:`/api/v1/tickets/${e.id}/spec-change/new-ticket`,body:{text:l,as:x},done:x==="bug"?`Reported a bug, linked to ${e.id}.`:`Made a new ticket, linked to ${e.id}.`},{onSuccess:i});return n.jsxs(at,{title:u?"Ask for a change":"Propose a change",icon:n.jsx(vr,{size:16}),onClose:i,footer:n.jsxs(n.Fragment,{children:[u?n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:!p,onClick:()=>f("ticket"),children:[n.jsx(Rn,{size:15})," Make a new linked ticket"]}),n.jsxs("button",{className:"btn",disabled:!p,onClick:()=>f("bug"),children:[n.jsx(rs,{size:15})," Report a bug"]})]}):n.jsxs("button",{className:"btn pri",disabled:!p||!!h,onClick:()=>o.mutate({path:`/api/v1/tickets/${e.id}/spec-change`,body:{text:l,...s?{from:s}:{}},done:"Proposed. The Analyst writes it into the spec; the work goes on."},{onSuccess:i}),children:[n.jsx(vr,{size:15})," Propose"]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:u?`squad propose ${e.id} --as ticket ${m}`:`squad propose ${e.id} ${m}`})]}),children:[n.jsx("p",{className:"note",style:{marginBottom:10},children:u?`${e.id} is ${e.stage==="done"?"released":"accepted"}${e.release?` (${e.release})`:""}, so it only answers questions. Your change becomes a new ticket linked to it, or a bug report.`:h?`Change ${h.id} is still open. One change at a time: approve or decline it first.`:"Say what should change. The Analyst writes it into the spec, old and new, and says if it is small or big. Nothing changes until you approve it, and the work goes on meanwhile."}),n.jsx("textarea",{className:"input",rows:4,style:{width:"100%"},autoFocus:!0,value:l,onChange:x=>c(x.target.value),placeholder:"For example: allow 5 bookings a day, not 3"})]})}function KC({t:e}){const[t,s]=E.useState(!1);return Pp(e)?n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:wr(e)?"Becomes a new linked ticket or a bug report":"The Analyst writes it into the spec; you approve it",children:[n.jsx(vr,{size:13})," ",wr(e)?"Ask for a change":"Propose a change"]}),t&&n.jsx(uc,{t:e,onClose:()=>s(!1)})]}):null}const QC={writing:"Being written",proposed:"Waits for you",approved:"Approved",designing:"Design update","design-ready":"Waits for you",building:"Being built",done:"In the spec",declined:"Declined",failed:"Not written"};function GC({t:e}){const t=[...e.changes??[]].reverse();return t.length?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["Changes to the spec · ",t.length]}),n.jsx("ul",{className:"ticketnotes",children:t.map(s=>n.jsxs("li",{children:[n.jsx("span",{className:`pill ${s.status==="done"?"ok":s.status==="declined"?"wait":"you"}`,children:s.decided?.withdrawn?"Withdrawn":QC[s.status]}),n.jsxs("span",{className:"grow",children:[s.id,": ",s.summary??s.ask,s.size?` (${s.size})`:"",s.decided?.reason?`. Why not: ${s.decided.reason}`:""]}),n.jsx("span",{className:"note",children:s.by})]},s.id))})]}):null}function Rp(e){return!e.takenOver&&["implement","test","review"].includes(e.stage)}function Ap({t:e}){const t=Se();return n.jsxs("button",{className:"btn sm",disabled:t.isPending,title:"The squad stops. You work in the Builder's Claude Code session, then give it back.",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/take-over`,done:"It is yours. The squad waits until you give it back."}),children:[n.jsx(La,{size:12})," Take over"]})}const ot={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},Sg={analyst:"intake",architect:"intake",builder:"build",reviewer:"review",tester:"tester"},YC={analyst:fi,architect:tk,builder:La,reviewer:M2,tester:O2},ZC={"analyst-read":"analyst",triage:"analyst","spec-rewrite":"analyst","chat-spec":"analyst","plan-write":"architect","plan-rewrite":"architect","answered-architect":"architect","chat-design":"architect",build:"builder",unstick:"builder",fix:"builder",test:"builder","review-fix":"builder","update-base":"builder","answered-builder":"builder","chat-carry-builder":"builder",review:"reviewer","answered-reviewer":"reviewer","chat-carry-reviewer":"reviewer",proof:"tester","chat-carry-tester":"tester"};function Us({role:e,small:t,live:s}){const i=YC[e]??fi;return n.jsx("span",{className:`cav av-${e} ${t?"sm":""} ${s?"live":""}`,"aria-hidden":"true",children:n.jsx(i,{size:t?13:16,strokeWidth:2})})}function xi({t:e,agent:t,label:s,primary:i}){const o=Se();return n.jsxs("button",{className:`btn ${i?"pri":""}`,disabled:o.isPending,onClick:()=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:t}},{onSuccess:()=>Pn.show(e.id)}),children:[n.jsx(_a,{size:14})," ",s??`Talk to the ${ot[t]}`]})}function Mx(e){return e.live&&e.squad?.phase?ZC[e.squad.phase]??null:null}function Fx(e){if(e.stage==="done")return{text:`Released${e.release?` · ${e.release}`:""}`,tone:"done"};if(e.stage==="release")return{text:`Accepted${e.release?` · ready for ${e.release}`:""}`,tone:"done"};const t=qs[e.stage];return e.chat?.open&&!e.chat.beside?{text:`${t} · ${e.chat.thinking?"talking":"your turn"}`,tone:"you"}:e.waiting?{text:`${t} · your turn`,tone:"you"}:{text:`${t}${e.live?" · working":""}`,tone:e.live?"work":"you"}}function $x(e){const t=e.chat,s=ot[t.with];return t.beside&&wr(e)?{kind:"released",note:"Questions only"}:t.beside?{kind:"working",note:"Asking never stops the work"}:{kind:"talk",note:`The ${s} waits while you talk`}}function Ox(e){const t=e.chat,s=ot[t.with];return t.beside?null:t.with==="analyst"?{label:`${e.story?"Update":"Write"} the spec`,path:"write",done:`The Analyst is ${e.story?"updating":"writing"} the spec from your talk.`}:t.with==="architect"&&e.specApproved?{label:`${e.steps?"Update":"Write"} the design`,path:"write",done:`The Architect is ${e.steps?"updating":"writing"} the design from your talk.`}:t.with==="architect"?null:{label:"Back to work",path:"done",done:`The ${s} carries on as you agreed.`}}function XC({t:e,size:t,onFull:s,onPanel:i}){const o=Se(),[l,c]=E.useState(!1),u=e.chat,h=ot[u.with],p=$x(e),m=Fx(e),f=u.open?Ox(e):null,x=o.isPending||!!u.thinking,y=u.with==="builder"||u.with==="reviewer"||u.with==="tester",k=Mx(e),w=(T,A)=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/${T}`,done:A}),j=n.jsxs(n.Fragment,{children:[u.open&&f&&n.jsxs("button",{className:"btn pri",disabled:x,onClick:()=>w(f.path,f.done),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," ",f.label]}),u.open&&p.kind==="talk"&&!y&&n.jsx("button",{className:"btn",disabled:x,onClick:()=>w("done","Done talking."),children:f?"Done, no changes":"Done"}),u.open&&p.kind==="talk"&&y&&Rp(e)&&n.jsx(Ap,{t:e}),u.open&&p.kind==="released"&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[n.jsx(mm,{size:14})," New linked ticket"]}),n.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[n.jsx(rs,{size:14})," Report a bug"]})]}),u.open&&p.kind==="working"&&Pp(e)&&n.jsxs("button",{className:"btn",onClick:()=>c(!0),children:[n.jsx(vr,{size:14})," Propose a change"]}),u.open&&p.kind!=="talk"&&n.jsx("button",{className:"btn",disabled:o.isPending,onClick:()=>w("done",`Done asking the ${h}.`),children:"Done"}),!u.open&&!e.takenOver&&n.jsxs("button",{className:"btn",disabled:o.isPending,onClick:()=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:u.with}},{onSuccess:()=>Pn.show(e.id)}),children:[n.jsx(_a,{size:14})," Talk to the ",h," again"]})]}),N=u.open&&p.kind==="working"?n.jsxs("div",{className:"cbanner work",children:[n.jsx("span",{className:"livedot","aria-hidden":"true"}),n.jsxs("span",{children:[n.jsx("b",{children:k?`The ${ot[k]} keeps working`:e.live||e.squad?"The squad keeps working":"Nothing waits for this talk"}),e.status?n.jsxs(n.Fragment,{children:[" · ",e.status]}):null,". Your questions change nothing on ",e.id,"; a change goes through the spec."]})]}):u.open&&p.kind==="released"?n.jsx("div",{className:"cbanner done",children:n.jsxs("span",{children:[n.jsxs("b",{children:[e.id," is ",e.stage==="done"?`released${e.release?` in ${e.release}`:""}`:`accepted${e.release?` for ${e.release}`:""}`,"."]})," Ask anything about it. A change becomes a new linked ticket or a bug report."]})}):null,S=l?n.jsx(uc,{t:e,from:u.with,onClose:()=>c(!1)}):null;return t==="phone"?n.jsxs("div",{className:"chead-m",children:[n.jsxs("div",{className:"chead-m-row",children:[n.jsx("span",{className:"ctitle",children:e.title}),u.open&&f&&n.jsx("button",{className:"btn pri sm",disabled:x,onClick:()=>w(f.path,f.done),children:f.label}),u.open&&!f&&n.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:()=>w("done","Done talking."),children:"Done"})]}),N,u.open&&p.kind==="released"&&n.jsxs("div",{className:"chead-m-row",children:[n.jsxs("button",{className:"btn sm",onClick:()=>c(!0),children:[n.jsx(mm,{size:13})," New linked ticket"]}),n.jsxs("button",{className:"btn sm",onClick:()=>c(!0),children:[n.jsx(rs,{size:13})," Report a bug"]})]}),S]}):t==="full"?n.jsxs("div",{className:"chead-f",children:[n.jsxs("div",{className:"chead-f-row",children:[n.jsx(Us,{role:u.with,live:u.thinking}),n.jsxs("div",{className:"chead-f-t",children:[n.jsxs("div",{className:"chead-line",children:[n.jsx("span",{className:"cid",children:e.id}),n.jsx("span",{className:`cstage ${m.tone}`,children:m.text}),u.open&&n.jsx("span",{className:"cnote",children:p.note})]}),n.jsx("div",{className:"ctitle",children:e.title})]}),n.jsx("span",{className:"grow"}),n.jsx("div",{className:"cbtns",children:j}),i&&n.jsx("button",{className:"iconbtn",onClick:i,"aria-label":"Back to the side panel",title:"Back to the side panel",children:n.jsx(wk,{size:16})})]}),N,S]}):n.jsxs("div",{className:"chead-p",children:[n.jsxs("div",{className:"chead-line",children:[n.jsx("span",{className:"cid",children:e.id}),n.jsx("span",{className:`cstage ${m.tone}`,children:m.text}),n.jsx("span",{className:"grow"}),u.open&&n.jsx("span",{className:"cnote",children:p.note}),s&&n.jsx("button",{className:"iconbtn sm",onClick:s,"aria-label":"Open full screen",title:"Full screen",children:n.jsx(Uh,{size:14})})]}),n.jsx("div",{className:"ctitle",children:e.title}),N,n.jsx("div",{className:"cbtns",children:j}),S]})}const cl=e=>`${e.at}|${e.who}`,Cg=e=>e.who!=="you"&&e.who!=="squad";function Ip({id:e,size:t,onOpenDoc:s,onFull:i,onPanel:o}){const l=Ma(e),c=l.data,u=c?.chat,h=E.useRef(null),[p,m]=E.useState(""),f=E.useRef(null),x=E.useRef(null),[y,k]=E.useState(null),w=c?.chat?.messages.length??0;E.useEffect(()=>{y&&w>y.count&&k(null)},[w,y]);const j=u?u.beside?"chat":Sg[u.with]:"",N=$e({queryKey:["conversation",e,j],queryFn:()=>ze(`/api/v1/tickets/${e}/conversations/${j}`),enabled:!!(u&&(u.beside?u.side:c?.sessions?.[Sg[u.with]])),refetchInterval:u?.thinking?1500:8e3,retry:!1}),S=E.useMemo(()=>Ix(N.data?.updates??[]).filter(Q=>Q.kind==="tool"),[N.data]),T=(Q,se)=>S.filter(P=>(!Q||(P.at??"")>=Q)&&(!se||(P.at??"")<=se)),A=E.useRef(null),[q,R]=E.useState(null),M=E.useMemo(()=>u?.messages??[],[u?.messages]);E.useEffect(()=>{if(!u)return;const Q=M.map(cl);if(!A.current){A.current=new Set(Q);return}const se=M.filter($=>!A.current.has(cl($)));for(const $ of Q)A.current.add($);const P=se.filter(Cg).at(-1);P&&R({key:cl(P),shown:0,total:Cw(P.text)})},[u,M]),E.useEffect(()=>{if(!q)return;if(q.shown>=q.total){R(null);return}const Q=Math.max(1,Math.ceil(q.total/120)),se=setTimeout(()=>R(P=>P&&{...P,shown:P.shown+Q}),55);return()=>clearTimeout(se)},[q]);const L=E.useRef(!0),B=E.useRef(null);if(E.useLayoutEffect(()=>{const Q=h.current;Q&&L.current&&(Q.scrollTop=Q.scrollHeight)}),E.useEffect(()=>{const Q=h.current,se=B.current;if(!Q||!se)return;const P=new ResizeObserver(()=>{L.current&&(Q.scrollTop=Q.scrollHeight)});return P.observe(se),()=>P.disconnect()},[c?.id,!!u]),E.useEffect(()=>{u&&Pn.seen(e,M.length)},[u,e,M.length]),!c)return n.jsx("div",{className:"cempty",children:l.isError?`No ticket ${e}.`:"Loading…"});if(!u)return n.jsxs("div",{className:"cempty",children:[n.jsxs("p",{children:["No talk on ",c.id," yet."]}),n.jsx(xi,{t:c,agent:"analyst",primary:!0})]});const z=ot[u.with],O=$x(c),U=[...M].reverse().find(Q=>Q.who==="you"),ne=Ox(c),Z=Mx(c),X=O.kind==="working"?`You are asking the ${z}. ${Z?`The ${ot[Z]}`:"The squad"} keeps working on ${c.id}, and this talk changes nothing.`:O.kind==="released"?`${c.id} is ${c.stage==="done"?"released":"accepted"}. Ask the ${z} anything about it.`:`You started talking with the ${z}. Its work on ${c.id} waits until you press ${ne?ne.label:"Done"}${ne&&ne.label!=="Back to work"?" or Done":""}.`,he=[...M].reverse().find(Cg),ce=Q=>{Q!==void 0&&m(Q),setTimeout(()=>f.current?.focus(),0)};return n.jsxs("div",{className:`chat-v csize-${t}`,children:[n.jsx(XC,{t:c,size:t,onFull:i,onPanel:o}),n.jsx("div",{className:"cthread",ref:h,"aria-live":"polite",onScroll:Q=>{const se=Q.currentTarget;L.current=se.scrollHeight-se.scrollTop-se.clientHeight<80},children:n.jsxs("div",{className:"ccol",ref:B,children:[u.open&&n.jsx("div",{className:"cnote-pill",children:X}),M.map((Q,se)=>{if(Q.who==="squad")return n.jsx(oE,{t:c,m:Q,last:se===M.length-1,onAsk:()=>ce()},se);if(Q.who==="you")return n.jsx(tE,{t:c,m:Q,onOpenDoc:s,onReply:I=>ce(I)},se);const P=M[se-1],$=q?.key===cl(Q),Y=M[se+1];return n.jsx(nE,{t:c,m:Q,size:t,used:T(P?.at,Q.at),writing:$?q.shown:null,answer:Y?.who==="you"?Y.text:void 0,canChoose:u.open&&!u.thinking&&Q===he&&se===M.length-1,newest:Q===he,onChoose:I=>x.current?.(I),onOther:()=>ce(),onOpenDoc:s,onReply:I=>ce(I)},se)}),y&&n.jsx(JC,{p:y}),u.thinking&&n.jsx(aE,{role:u.with,steps:T(U?.at??M.at(-1)?.at),hasMessage:!!U})]})}),u.open?n.jsx(lE,{t:c,size:t,text:p,setText:m,input:f,onSent:()=>L.current=!0,sendRef:x,setPending:k}):n.jsx("div",{className:"cclosed",children:"This talk is over. It stays here to read."})]})}function JC({p:e}){const t=xn(e.text);return n.jsxs("div",{className:"cyou cmsg",children:[n.jsxs("div",{className:"cybub",children:[e.files.length>0&&n.jsx("div",{className:"cup",children:e.files.map((s,i)=>n.jsxs("div",{className:"cup-row",children:[s.preview?n.jsx("img",{className:"cup-img",src:s.preview,alt:""}):n.jsx("span",{className:"cfic sm file",children:(s.name.split(".").pop()??"").toUpperCase().slice(0,4)}),n.jsx("span",{className:"cfname",children:s.name}),n.jsx("span",{className:"cbar",children:n.jsx("i",{})})]},i))}),e.text.trim()&&n.jsx("p",{className:as(t),dir:t.dir,lang:t.dir==="rtl"?"ar":"en",children:e.text})]}),n.jsx("span",{className:"cmeta",children:"You · now · sending"})]})}function Dx({t:e,m:t,holder:s,onReply:i}){const o=Se(),{toast:l}=qe(),[c,u]=E.useState(!1),[h,p]=E.useState(!1),m=()=>{const k=window.getSelection();return((k&&!k.isCollapsed&&s.current?.contains(k.anchorNode)?k.toString().trim():"")||t.text).trim().slice(0,2e3)},f=(k,w)=>{u(!1),o.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:m(),kind:k},done:`Added to the spec as ${w}.`})},x=()=>void navigator.clipboard?.writeText(t.text).then(()=>l("Copied"),()=>l("Could not copy. Select the text instead.","err")),y=()=>i(`> ${t.text.replace(/\s+/g," ").slice(0,160)}${t.text.length>160?"…":""}
534
-
535
- `);return n.jsxs("div",{className:"cacts",children:[n.jsxs("button",{className:"cact",onClick:x,children:[n.jsx(Vs,{size:13})," Copy"]}),t.who==="you"&&t.text.trim()&&Pp(e)&&n.jsxs("button",{className:"cact",onClick:()=>p(!0),children:[n.jsx(vr,{size:13})," Propose as a change"]}),!wr(e)&&t.text.trim()&&n.jsxs("span",{className:"cmenu-w",children:[n.jsxs("button",{className:"cact",onClick:()=>u(!c),"aria-haspopup":"menu","aria-expanded":c,onMouseDown:k=>k.preventDefault(),children:[n.jsx(Rn,{size:13})," Add to spec"]}),c&&n.jsxs("div",{className:"cmenu",role:"menu",onMouseLeave:()=>u(!1),children:[n.jsxs("button",{role:"menuitem",onClick:()=>f("rule","a business rule"),onMouseDown:k=>k.preventDefault(),children:[n.jsx("b",{children:"A business rule"}),n.jsx("small",{children:"Every agent must follow it"})]}),n.jsxs("button",{role:"menuitem",onClick:()=>f("criterion",'a "done when" item'),onMouseDown:k=>k.preventDefault(),children:[n.jsx("b",{children:'A "done when" item'}),n.jsx("small",{children:"The Tester proves it with a screenshot"})]}),n.jsxs("button",{role:"menuitem",onClick:()=>f("note","a note"),onMouseDown:k=>k.preventDefault(),children:[n.jsx("b",{children:"A note"}),n.jsx("small",{children:"Context for the next steps"})]})]})]}),e.chat?.open&&n.jsxs("button",{className:"cact",onClick:y,children:[n.jsx(Nk,{size:13})," Reply"]}),h&&n.jsx(uc,{t:e,initial:t.text,from:e.chat?.with,onClose:()=>p(!1)})]})}function eE(e){let t=!1;return e.split(`
536
- `).map((s,i,o)=>{/^\s*```/.test(s)&&(t=!t);const l=o[i+1]??"";return!t&&s.trim()&&l.trim()&&!/^\s*([-*+]|\d+\.|>|```)\s/.test(l)?`${s}
537
- `:s}).join(`
538
- `)}function tE({t:e,m:t,onOpenDoc:s,onReply:i}){const o=E.useRef(null),[l,c]=E.useState(!1),u=!t.text.trim()&&(t.files??[]).some(h=>jh.test(h));return n.jsxs("div",{className:`cyou cmsg ${l?"picked":""}`,children:[n.jsxs("div",{className:"cybub",ref:o,onClick:()=>c(!l),children:[t.text.trim()&&n.jsx(jp,{text:eE(t.text),ticket:e.id}),t.files&&t.files.length>0&&n.jsx(Sp,{ticket:e.id,files:t.files,onOpen:s,sent:!0,from:"From you"})]}),n.jsxs("span",{className:"cmeta",children:["You · ",kl(t.at),u?" · written out from your voice":""]}),n.jsx(Dx,{t:e,m:t,holder:o,onReply:i})]})}function kl(e){return new Date(e).toDateString()===new Date().toDateString()?Bs(e):`${Sr(e)} ${Bs(e)}`}function nE({t:e,m:t,size:s,used:i,writing:o,answer:l,canChoose:c,newest:u,onChoose:h,onOther:p,onOpenDoc:m,onReply:f}){const x=E.useRef(null),[y,k]=E.useState(!1),w=t.who,j=ot[w]??"Agent",N=o!==null,S=N?Sw(t.text,o):t.text,T=n.jsx(jp,{text:S,ticket:e.id,stream:N,caret:N});return n.jsxs("div",{className:`cag cmsg ag-${w} ${y?"picked":""}`,children:[n.jsx(Us,{role:w,live:N}),n.jsxs("div",{className:"cwho",children:[n.jsx("b",{children:j}),N?n.jsx("span",{className:"shim",children:"Writing"}):n.jsx("span",{className:"ctime",children:kl(t.at)})]}),n.jsxs("div",{className:"cagb",ref:x,onClick:A=>s==="phone"&&!A.target.closest("button, a")&&k(!y),children:[i.length>0&&n.jsx(iE,{steps:i}),N||u?T:n.jsx(pC,{lines:fC(t.text),children:T}),!N&&t.files&&t.files.length>0&&n.jsx(Sp,{ticket:e.id,files:t.files,onOpen:m,from:`From the ${j} · ${kl(t.at)}`}),!N&&t.options&&t.options.length>0&&n.jsx(sE,{options:t.options,answer:l,can:c,onChoose:h,onOther:p})]}),!N&&s==="phone"&&n.jsxs("span",{className:"cmeta",children:[j," · ",kl(t.at)]}),!N&&n.jsx(Dx,{t:e,m:t,holder:x,onReply:f})]})}function sE({options:e,answer:t,can:s,onChoose:i,onOther:o}){const l=xn(e.join(" ")),c=t?.trim();return n.jsxs("div",{className:"cchoices",dir:l.dir,children:[e.map(u=>{const h=xn(u),p=c?c===u.trim()?"on":"off":s?"":"off";return n.jsx("button",{className:`cch ${p} ${as(h)}`,lang:h.dir==="rtl"?"ar":"en",dir:h.dir,disabled:!s,onClick:()=>i(u),children:u},u)}),s&&n.jsx("button",{className:"cch other",onClick:o,dir:l.dir,children:l.dir==="rtl"?"إجابة أخرى…":"Something else…"})]})}function rE(e){let t=0,s=0;for(const i of e.content){if(i.type!=="diff")continue;const o=(i.oldText??"").split(`
539
- `).filter(Boolean).length,l=i.newText.split(`
540
- `).filter(Boolean).length;t+=Math.max(0,l-(i.oldText==null?0:Math.min(o,l))),s+=i.oldText==null?0:Math.max(0,o-l)}return{title:e.title,...t||s?{plus:t,minus:s}:{}}}function Bx({s:e}){const t=rE(e);return n.jsxs("div",{className:`cstep ${e.skipped?"skipped":e.status}`,children:[e.skipped?n.jsx(Yl,{size:13}):e.status==="completed"?n.jsx(Ce,{size:13,strokeWidth:2.5}):e.status==="failed"?n.jsx(an,{size:13}):n.jsx(In,{size:13,className:"spin"}),n.jsx("span",{className:"cstep-t",children:t.title}),t.plus!==void 0&&n.jsxs("span",{className:"cstep-n",children:[n.jsxs("span",{className:"add",children:["+",t.plus]})," ",n.jsxs("span",{className:"del",children:["−",t.minus]})]})]})}function iE({steps:e}){const[t,s]=E.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"cactv",onClick:()=>s(!t),"aria-expanded":t,children:[n.jsx(Bh,{size:13,style:{transform:t?"rotate(90deg)":void 0}})," Looked at ",e.length," ",e.length===1?"thing":"things"]}),t&&n.jsx("div",{className:"cactlist",children:e.map(i=>n.jsx(Bx,{s:i},i.id))})]})}function aE({role:e,steps:t,hasMessage:s}){const i=t.filter(c=>c.status==="in_progress").at(-1)??t.at(-1),o=i?i.title:s?"Reading your message":"Reading the ticket",l=t.slice(-6);return n.jsxs("div",{className:`cag cmsg ag-${e} thinking`,children:[n.jsx(Us,{role:e,live:!0}),n.jsxs("div",{className:"cwho",children:[n.jsx("b",{children:ot[e]}),n.jsx("span",{className:"shim",children:o})]}),n.jsxs("div",{className:"cagb",children:[n.jsxs("span",{className:"cdots","aria-label":`The ${ot[e]} is answering`,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}),l.length>0&&n.jsxs("div",{className:"csteps",children:[t.length>l.length&&n.jsxs("div",{className:"cstep more",children:["and ",t.length-l.length," earlier steps"]}),l.map(c=>n.jsx(Bx,{s:c},c.id))]})]})]})}function oE({t:e,m:t,last:s,onAsk:i}){const o=Se(),l=t.note==="failed"||!t.note&&t.text.startsWith("Could not answer"),c=e.chat?ot[e.chat.with]:"agent",u=s&&e.chat?.open&&!e.chat.thinking&&(l||t.note==="stopped"),h=()=>o.mutate({path:`/api/v1/tickets/${e.id}/chat/retry`});return l?n.jsxs("div",{className:"cfail cmsg",children:[n.jsxs("div",{className:"cfail-t",children:[n.jsx(_2,{size:15})," The ",c," could not answer. Nothing was lost.",n.jsx("span",{className:"cfail-why",children:t.text.replace(/^Could not answer:\s*/,"")})]}),u&&n.jsxs("div",{className:"cbtns",children:[n.jsx("button",{className:"btn pri sm",disabled:o.isPending,onClick:h,children:"Try again"}),n.jsx("button",{className:"btn sm",onClick:i,children:"Ask something else"})]})]}):n.jsxs("div",{className:"cnote-w cmsg",children:[n.jsx("div",{className:"cnote-pill",children:t.text}),u&&n.jsx("div",{className:"cbtns",children:n.jsx("button",{className:"btn sm",disabled:o.isPending,onClick:h,children:"Ask again"})})]})}const Eg=10*1024*1024;function lE({t:e,size:t,text:s,setText:i,input:o,onSent:l,sendRef:c,setPending:u}){const h=Se(),{toast:p}=qe(),m=e.chat,f=ot[m.with],[x,y]=E.useState([]),[k,w]=E.useState(!1),j=E.useRef(null),N=xn(s),S=vw(N),T=Math.min(6,Math.max(1,s.split(`
541
- `).length)),A=async L=>{const B=[...L],z=B.find(U=>U.size>Eg);z&&p(`${z.name} is larger than 10 MB.`,"err");const O=await Promise.all(B.filter(U=>U.size<=Eg).slice(0,10).map(Ep)).catch(U=>(p(U.message,"err"),[]));y(U=>[...U,...O].slice(0,10))},q=(L=s,B=[])=>{const z=[...x,...B];if(!L.trim()&&!z.length||m.thinking||h.isPending)return;u({text:L,files:z,count:m.messages.length});const O=s;i(""),y([]),l(),h.mutate({path:`/api/v1/tickets/${e.id}/chat/send`,body:{text:L,files:z.map(({name:U,data:ne})=>({name:U,data:ne}))}},{onError:()=>{u(null),i(O),y(z.filter(U=>!B.includes(U)))}})};c.current=L=>q(L);const R=()=>h.mutate({path:`/api/v1/tickets/${e.id}/chat/stop`}),M=t==="phone"?`Message the ${f}`:`Message the ${f} in Arabic or English`;return n.jsxs("div",{className:"ccomp",onDragOver:L=>(L.preventDefault(),w(!0)),onDragLeave:()=>w(!1),onDrop:L=>(L.preventDefault(),w(!1),void A(L.dataTransfer.files)),children:[k&&n.jsx("div",{className:"cdrop",children:"Drop files to add them to your message"}),n.jsx(cE,{who:f,size:t,onDone:L=>q(s,[L]),render:L=>L.on?L.box:n.jsxs("div",{className:`cbox ${t==="phone"?"m":""}`,children:[x.length>0&&n.jsx("div",{className:"cpicked",children:x.map((B,z)=>n.jsxs("span",{className:"chip",children:[B.preview?n.jsx("img",{src:B.preview,alt:""}):n.jsx(Al,{size:12})," ",B.name,n.jsx("button",{className:"iconbtn","aria-label":`Remove ${B.name}`,onClick:()=>y(x.filter((O,U)=>U!==z)),children:n.jsx(an,{size:11})})]},z))}),t==="phone"&&n.jsx("button",{className:"ib","aria-label":"Add screenshots or files",onClick:()=>j.current?.click(),children:n.jsx(Rn,{size:20})}),n.jsx("textarea",{ref:o,className:`cta ${s?as(N):"t-en"}`,dir:s?N.dir:"auto",lang:N.dir==="rtl"?"ar":"en",rows:T,value:s,placeholder:M,"aria-label":"Your message",onChange:B=>i(B.target.value),onPaste:B=>{const z=[...B.clipboardData.files];z.length&&A(z)},onKeyDown:B=>{B.key==="Enter"&&!B.shiftKey&&!B.nativeEvent.isComposing&&(B.preventDefault(),q())}}),t==="phone"?m.thinking?n.jsx("button",{className:"csend m stop",onClick:R,"aria-label":"Stop the answer",children:n.jsx(ui,{size:14,fill:"currentColor"})}):s.trim()||x.length?n.jsx("button",{className:"csend m",onClick:()=>q(),"aria-label":"Send",disabled:h.isPending,children:n.jsx(Ds,{size:18})}):n.jsx("button",{className:"csend m mic",onClick:L.start,"aria-label":"Record a voice note",children:n.jsx(fm,{size:18})}):n.jsxs("div",{className:"crow",children:[n.jsx("button",{className:"ib","aria-label":"Add screenshots or files",title:"Add screenshots or files",onClick:()=>j.current?.click(),children:n.jsx(Al,{size:16})}),n.jsx("button",{className:"ib","aria-label":"Record a voice note",title:"Record a voice note",onClick:L.start,children:n.jsx(fm,{size:16})}),S&&n.jsx("span",{className:"clchip",children:S}),n.jsx("span",{className:"grow"}),m.thinking?n.jsxs("button",{className:"cstop",onClick:R,disabled:m.stopping||h.isPending,children:[n.jsx(ui,{size:11,fill:"currentColor"})," ",m.stopping?"Stopping…":"Stop"]}):n.jsx("button",{className:"csend",onClick:()=>q(),disabled:h.isPending||!s.trim()&&!x.length,"aria-label":"Send",children:n.jsx(Ds,{size:17})})]}),n.jsx("input",{ref:j,type:"file",multiple:!0,hidden:!0,onChange:B=>B.target.files&&void A(B.target.files)})]})}),t!=="phone"&&n.jsx("div",{className:"chint",children:"Enter sends · Shift+Enter for a new line · It answers in the language you write"})]})}function cE({who:e,size:t,onDone:s,render:i}){const{toast:o}=qe(),[l,c]=E.useState(!1),[u,h]=E.useState(0),p=E.useRef(null),m=E.useRef(!1);E.useEffect(()=>{if(!l)return;const k=setInterval(()=>h(w=>w+1),1e3);return()=>clearInterval(k)},[l]),E.useEffect(()=>()=>p.current?.stream.getTracks().forEach(k=>k.stop()),[]);const f=async()=>{try{const k=await navigator.mediaDevices.getUserMedia({audio:!0}),w=["audio/webm","audio/ogg","audio/mp4"].find(S=>MediaRecorder.isTypeSupported?.(S))??"",j=new MediaRecorder(k,w?{mimeType:w}:void 0),N=[];j.ondataavailable=S=>S.data.size&&N.push(S.data),j.onstop=()=>{if(k.getTracks().forEach(R=>R.stop()),!m.current||!N.length)return;const S=j.mimeType||w||"audio/webm",T=S.includes("ogg")?"ogg":S.includes("mp4")?"m4a":"weba",A=new Date().toTimeString().slice(0,8).replace(/:/g,""),q=new File(N,`voice-note-${A}.${T}`,{type:S});Ep(q).then(s)},p.current=j,m.current=!1,h(0),j.start(),c(!0)}catch{o("The microphone is not available. Allow it for this page, or attach a voice note file.","err")}},x=k=>{m.current=k,p.current?.stop(),c(!1)},y=n.jsxs("div",{className:`crec ${t==="phone"?"m":""}`,role:"group","aria-label":"Recording a voice note",children:[n.jsx("span",{className:"crdot"}),n.jsxs("span",{className:"crt",children:["0:",String(u).padStart(2,"0")," · Recording for the ",e]}),n.jsx("span",{className:"clw","aria-hidden":"true",children:Array.from({length:22},(k,w)=>n.jsx("i",{style:{animationDelay:`${w%7*.11}s`}},w))}),n.jsx("button",{className:"btn sm",onClick:()=>x(!1),children:"Cancel"}),n.jsx("button",{className:"btn sm pri",onClick:()=>x(!0),children:"Send"})]});return n.jsx(n.Fragment,{children:i({on:l,start:()=>void f(),box:y})})}function Ra(e=""){return $e({queryKey:["conversations",e],queryFn:()=>ze(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`),refetchInterval:1500})}function Lp(e,t){if(!e.open)return 0;const s=t[e.id];return s===void 0?e.fresh:Math.min(e.fresh,Math.max(0,e.count-s))}function uE(){const e=tc(),t=Xh(Jh),s=Ra();return!t&&!e.min&&(s.data??[]).some(i=>i.open)}function dE(e){const t=ot[e.with];return e.thinking?`The ${t} is typing on ${e.id}`:e.yourTurn?`The ${t} answered on ${e.id}`:`${t} on ${e.id}`}function hE(){const e=tc(),t=Xh(Jh),s=Hs(),i=Ra(),[o,l]=E.useState(null),c=E.useRef(null),u=(i.data??[]).filter(f=>f.open),h=u.find(f=>f.id===e.tab)??u[0];if(E.useEffect(()=>{c.current?.querySelector(".ctab.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[h?.id,e.min]),!h)return null;const p=f=>void s({to:"/conversations",search:{ticket:f}});if(e.min||t){const f=u.find(x=>x.thinking)??u.find(x=>x.yourTurn)??h;return n.jsxs("div",{className:"cmini",role:"status",children:[n.jsx(Us,{role:f.with,small:!0,live:f.thinking}),n.jsxs("div",{children:[n.jsxs("b",{children:[u.length," ",u.length===1?"conversation":"conversations"]}),n.jsx("small",{children:dE(f)})]}),n.jsx("button",{className:"btn pri sm",onClick:()=>t?p(f.id):Pn.restore(),children:"Open"})]})}const m=f=>{f.preventDefault();const x=f.clientX,y=e.width,k=j=>Pn.resize(y+(x-j.clientX)),w=()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",w),document.body.classList.remove("cresizing")};document.body.classList.add("cresizing"),window.addEventListener("mousemove",k),window.addEventListener("mouseup",w)};return n.jsxs(n.Fragment,{children:[o&&n.jsx(Cp,{doc:o,onClose:()=>l(null)}),n.jsxs("section",{className:"cdock",style:{width:e.width},"aria-label":"Conversations",children:[n.jsx("span",{className:"cgrip",onMouseDown:m,"aria-hidden":"true"}),n.jsxs("div",{className:"ctabs",children:[n.jsx("div",{className:"ctabscroll",role:"tablist","aria-label":"Open conversations",ref:c,children:u.map(f=>{const x=f.id===h.id,y=Lp(f,e.seen);return n.jsxs("button",{className:`ctab ${x?"on":""}`,role:"tab","aria-selected":x,onClick:()=>Pn.pick(f.id),title:`${f.id} · ${f.title}`,children:[n.jsx(Us,{role:f.with,small:!0}),n.jsx("span",{className:"tid",children:f.id}),n.jsx("span",{className:"tn",children:ot[f.with]}),f.thinking&&!x&&n.jsxs("span",{className:`cdots sm c-${f.with}`,"aria-label":"Typing",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}),y>0&&!x&&n.jsx("span",{className:"cbadge","aria-label":`${y} unread`,children:y})]},f.id)})}),n.jsx(qx,{}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"iconbtn",onClick:()=>p(h.id),"aria-label":"Open full screen",title:"Full screen",children:n.jsx(Uh,{size:15})}),n.jsx("button",{className:"iconbtn",onClick:Pn.minimize,"aria-label":"Minimize",title:"Minimize",children:n.jsx(Yl,{size:16})})]}),n.jsx(Ip,{id:h.id,size:"panel",onOpenDoc:l},h.id)]})]})}function qx(){const e=Ct(),t=Se(),[s,i]=E.useState(!1),[o,l]=E.useState(""),[c,u]=E.useState("analyst"),h=(e.data?.ready?e.data.tickets:[]).filter(m=>!m.chat?.open&&!m.takenOver),p=()=>t.mutate({path:`/api/v1/tickets/${o}/chat/start`,body:{with:c}},{onSuccess:()=>{i(!1),Pn.show(o)}});return n.jsxs("span",{className:"cmenu-w",children:[n.jsx("button",{className:"iconbtn",onClick:()=>i(!s),"aria-label":"Start a new conversation",title:"Start a new conversation","aria-expanded":s,children:n.jsx(Rn,{size:16})}),s&&n.jsxs("div",{className:"cmenu cnew",role:"dialog","aria-label":"Start a new conversation",children:[n.jsxs("label",{children:[n.jsx("span",{children:"Ticket"}),n.jsxs("select",{className:"input",value:o,onChange:m=>l(m.target.value),children:[n.jsx("option",{value:"",children:"Pick a ticket"}),h.map(m=>n.jsxs("option",{value:m.id,children:[m.id," · ",m.title]},m.id))]})]}),n.jsxs("label",{children:[n.jsx("span",{children:"Talk to"}),n.jsx("select",{className:"input",value:c,onChange:m=>u(m.target.value),children:Object.keys(ot).map(m=>n.jsxs("option",{value:m,children:["The ",ot[m]]},m))})]}),n.jsxs("div",{className:"cbtns",children:[n.jsx("button",{className:"btn pri sm",disabled:!o||t.isPending,onClick:p,children:"Start talking"}),n.jsx("button",{className:"btn sm",onClick:()=>i(!1),children:"Cancel"})]})]})]})}const Ux=["app","usage-limit"];function pE(){return $e({queryKey:Ux,queryFn:()=>ze("/api/v1/app/usage-limit"),refetchInterval:5e3})}function Wx(){const{data:e}=pE(),t=Ws(),{toast:s}=qe();if(!e?.pause||!e.text)return null;const i=async()=>{try{t.setQueryData(Ux,await St("/api/v1/app/usage-limit/try-now","POST")),t.invalidateQueries(),s("The squad carries on now. If the limit is still there, it waits again by itself.")}catch(o){s(o instanceof Error?o.message:String(o),"err")}};return n.jsxs("section",{className:"upd failed",role:"status","aria-label":"The usage limit is reached",children:[n.jsx("span",{className:"upd-ic",children:n.jsx(dk,{size:16})}),n.jsxs("div",{className:"upd-main",children:[n.jsx("b",{className:"upd-title",children:e.text}),n.jsxs("span",{className:"upd-sub",children:["Every project waits, because they share one ",e.pause.name," account. Nothing is lost, and the wait does not count as a failed try.",e.pause.resetsAt?"":" squad-kit looks again every 10 minutes."]})]}),n.jsxs("div",{className:"upd-acts",children:[n.jsx("button",{className:"btn sm",onClick:()=>void i(),children:"Try now"}),n.jsx(ye,{text:"squad try-now"})]})]})}function fE(){const e=_k(),t=e.data?.apps??[];if(!t.length)return null;const s=t.some(i=>i.start&&(i.state==="not-running"||i.state==="stopped")&&!i.up&&!i.fresh);return n.jsxs("div",{className:"apps",children:[n.jsx("div",{className:"apps-h",children:"Your apps"}),t.map(i=>n.jsx(xE,{a:i,named:t.length>1,live:e.data?.live??!1,reading:e.data?.reading??!1,readError:e.data?.readError},i.repo)),s&&n.jsx("p",{className:"apps-note",children:"Starts the latest main, with every ticket you approved. No terminal needed."})]})}const Tg=e=>(e??"").replace(/^https?:\/\//,"");function mE(e){const t=e.map(s=>`${s.id} ${s.title}`);return t.length>1?`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`:t[0]??""}function Pg(e){switch(e.state){case"running":return yE(e.since);case"starting":return"Starting…";case"stopped":return"Stopped";case"failed":return"Failed";default:return"Not running"}}function gE(e){return e.step==="setup"?`Setting it up first: ${e.setup}`:e.step==="start"?`Starting: ${e.start}`:`Getting the newest ${e.base}`}function yE(e){const t=e?Math.round((Date.now()-Date.parse(e))/6e4):0;return t<1?"Running":`Running for ${t} min`}function xE({a:e,named:t,live:s,reading:i,readError:o}){const l=Se(),[c,u]=E.useState(!1),[h,p]=E.useState(!1),m=t?` ${/\s/.test(e.name)?`"${e.name}"`:e.name}`:"",f=(k,w,j)=>l.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/${k}`,body:j,done:w}),x=k=>f("start",`Starting ${e.name}`,k),y=e.state==="failed"?e.busy:void 0;return n.jsxs("div",{className:`app-item ${e.state}`,children:[e.fresh&&e.start&&n.jsxs("div",{className:"app-new",role:"status",children:[n.jsxs("div",{className:"hd",children:[n.jsx("span",{className:"ok",children:n.jsx(Ce,{size:13,strokeWidth:3})}),n.jsxs("b",{title:e.fresh.title,children:[e.fresh.id," is in ",e.fresh.base]})]}),n.jsx("p",{children:"Try the new version yourself."}),n.jsxs("div",{className:"app-acts",children:[n.jsx("button",{className:"btn sm go",disabled:l.isPending,onClick:()=>f("restart",`Starting the new version of ${e.name}`),children:"Run the new version"}),n.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>f("not-now","Fine. It stays as it is.",{ticket:e.fresh.id}),children:"Not now"})]}),e.fresh.release&&n.jsxs("small",{children:["It also goes out in release ",e.fresh.release,"."]}),n.jsx(ye,{text:`squad app restart${m}`})]}),n.jsxs("div",{className:"app-row",children:[n.jsx("i",{"aria-hidden":"true"}),n.jsxs("span",{className:"nm",children:[n.jsx("b",{children:e.name}),n.jsx("small",{title:e.state==="running"?`Running at ${e.address}`:Pg(e),children:Pg(e)})]}),e.state==="running"?n.jsx("a",{className:"btn sm pri",href:e.address,target:"_blank",rel:"noreferrer",title:`Open ${e.address}`,children:"Open"}):e.state==="starting"?n.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>f("stop",`Stopped ${e.name}`),children:"Stop"}):e.start?n.jsx("button",{className:"btn sm go",disabled:l.isPending,onClick:()=>x(),children:e.state==="failed"?"Try again":"Start"}):null]}),e.state==="starting"&&n.jsx("p",{className:"app-more",children:gE(e)}),e.state==="running"&&n.jsxs("div",{className:"app-more",children:[n.jsx("span",{className:"addr",children:Tg(e.address)}),e.includes.length>0&&n.jsxs("span",{children:["Includes ",mE(e.includes)]}),e.elsewhere&&n.jsx("span",{children:"Started outside the board, from a terminal or an earlier squad-kit."}),n.jsxs("div",{className:"app-acts",children:[n.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>f("restart",`Restarting ${e.name}`),children:"Restart"}),n.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>f("stop",`Stopped ${e.name}`),children:"Stop"})]}),n.jsx(ye,{text:`squad app stop${m}`})]}),e.state==="failed"&&!y&&n.jsx("p",{className:"app-more why",children:e.error}),e.state!=="running"&&e.state!=="starting"&&e.start&&!y&&n.jsx(ye,{text:`squad app start${m}`}),e.state!=="running"&&e.state!=="starting"&&e.start&&e.up&&!y&&n.jsxs("p",{className:"app-more",children:["Something else answers at ",Tg(e.url),"."," ",n.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",children:"Open it"})]}),y&&n.jsxs("div",{className:"app-warn",children:[n.jsx("b",{children:e.error}),n.jsxs("span",{children:[y.program?`It is ${y.program} (process ${y.pid}). `:"squad-kit cannot tell which program it is. ",y.ours?"squad-kit started it, so it can stop it for you.":y.nextPort?`${e.name} can run on port ${y.nextPort} instead.`:"Close that program, then press Try again. Or give the app another address."]}),n.jsxs("div",{className:"app-acts",children:[y.ours&&n.jsx("button",{className:"btn sm",disabled:l.isPending,onClick:()=>x({stopOther:!0}),children:"Stop it and start"}),y.nextPort&&n.jsxs("button",{className:"btn sm",disabled:l.isPending,onClick:()=>x({nextPort:!0}),children:["Use port ",y.nextPort]}),!y.ours&&n.jsx("button",{className:"btn sm",onClick:()=>u(!0),children:"Change the address"})]}),n.jsx(ye,{text:y.ours?`squad app start${m} --stop-other`:y.nextPort?`squad app start${m} --next-port`:`squad app set${m} --url http://localhost:${y.port+1}`})]}),!e.start&&!c&&n.jsxs("div",{className:"app-warn",children:[n.jsx("b",{children:"Start command unknown"}),n.jsx("span",{children:"squad-kit could not tell how to start this app yet."}),o&&!i&&n.jsxs("span",{className:"bad",children:["The Architect could not read the project: ",o]}),n.jsxs("div",{className:"app-acts",children:[s&&n.jsx("button",{className:"btn sm",disabled:i||l.isPending,onClick:()=>l.mutate({path:"/api/v1/scan",done:"The Architect is reading the project to find how to start it"}),children:i?"The Architect is looking…":"Ask the Architect to find it"}),n.jsx("button",{className:"btn sm",onClick:()=>u(!0),children:"Type it"})]}),!s&&n.jsx("span",{children:"You can also set it in Settings, under How the squad checks and runs this project."}),n.jsx(ye,{text:s?"squad app find":`squad app set${m} --start "npm run dev"`})]}),c&&n.jsx(vE,{a:e,cmdRef:m,onDone:()=>u(!1)}),e.start&&n.jsx("button",{className:"app-link",onClick:()=>p(!0),children:"Show output"}),h&&n.jsx(kE,{a:e,cmdRef:m,onClose:()=>p(!1),onChange:()=>{p(!1),u(!0)}})]})}function vE({a:e,cmdRef:t,onDone:s}){const i=Se(),[o,l]=E.useState(e.start??""),[c,u]=E.useState(e.url??""),h=()=>i.mutate({path:`/api/v1/apps/${encodeURIComponent(e.name)}/commands`,method:"PUT",body:{start:o,url:c},done:`Saved how ${e.name} starts`},{onSuccess:s});return n.jsxs("form",{className:"app-type",onSubmit:p=>{p.preventDefault(),h()},children:[n.jsxs("label",{children:["Start command",n.jsx("input",{className:"input",value:o,onChange:p=>l(p.target.value),placeholder:"npm run dev",autoFocus:!0,spellCheck:!1})]}),n.jsxs("label",{children:["Address",n.jsx("input",{className:"input",value:c,onChange:p=>u(p.target.value),placeholder:"http://localhost:3000",spellCheck:!1})]}),n.jsxs("div",{className:"app-acts",children:[n.jsx("button",{className:"btn sm pri",type:"submit",disabled:!o.trim()||i.isPending,children:"Save"}),n.jsx("button",{className:"btn sm",type:"button",onClick:s,children:"Cancel"})]}),n.jsx(ye,{text:`squad app set${t} --start ${tn(o.trim()||"npm run dev")}${c.trim()?` --url ${c.trim()}`:""}`})]})}function kE({a:e,cmdRef:t,onClose:s,onChange:i}){const l=($e({queryKey:["apps",e.name,"output"],queryFn:()=>ze(`/api/v1/apps/${encodeURIComponent(e.name)}/output`),refetchInterval:2e3}).data?.lines??[]).join(`
542
- `).trim();return n.jsxs(at,{title:`${e.name}: how it starts`,wide:!0,onClose:s,footer:n.jsxs(n.Fragment,{children:[n.jsx(ye,{text:`squad app start${t}`}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"btn sm",onClick:i,children:"Change"}),n.jsx("button",{className:"btn sm pri",onClick:s,children:"Done"})]}),children:[n.jsxs("div",{className:"app-how",children:[n.jsxs("div",{children:[n.jsx("span",{children:"Start command"}),n.jsx("code",{children:e.start})]}),n.jsxs("div",{children:[n.jsx("span",{children:"Address"}),n.jsx("code",{children:e.address??e.url??"The one it prints when it starts"})]}),e.setup&&n.jsxs("div",{children:[n.jsx("span",{children:"Setup, in a new copy and when its packages change"}),n.jsx("code",{children:e.setup})]}),n.jsxs("div",{children:[n.jsxs("span",{children:["squad-kit's copy of ",e.base]}),n.jsxs("code",{children:[e.dir,e.commit?` at ${e.commit.slice(0,8)}`:""]})]})]}),n.jsx("pre",{className:"app-out",children:l||"Nothing yet. Press Start, and what the app prints shows here."})]})}const wE=[{to:"/board",label:"Board",icon:fk},{to:"/backlog",label:"Backlog",icon:yk},{to:"/inbox",label:"Waiting for you",icon:hk,badge:"you"},{to:"/conversations",label:"Conversations",icon:kk,badge:"chats"},{to:"/releases",label:"Releases",icon:Ds},{to:"/architecture",label:"Architecture",icon:bk},{to:"/bugs",label:"Bugs",icon:rs,badge:"bugs"},{to:"/squad",label:"Squad and AI",icon:B2},{to:"/settings",label:"Settings",icon:Sk}];function bE(){const e=Ct(),{theme:t,toggleTheme:s,showCommands:i,toggleCommands:o}=qe(),l=C2({select:w=>w.location.pathname}),c=e.data?.ready?e.data.meta:void 0,u=e.data?.ready?e.data.tickets:[],h=u.filter(ec).length,p=u.filter(w=>w.kind==="bug").length,m=(c?.user.name??"You").slice(0,2).toUpperCase(),f=Ra().data?.filter(w=>w.open).length??0,x=uE(),[y,k]=E.useState(!1);return E.useEffect(()=>k(!1),[l]),l.startsWith("/conversations")?n.jsxs("div",{className:"fullpage",children:[n.jsx(km,{}),n.jsx("div",{className:"canvas-b",children:n.jsx(th,{})})]}):n.jsxs("div",{className:`app ${x?"docked":""}`,children:[n.jsxs("header",{className:"mtop",children:[n.jsx("button",{className:"iconbtn",onClick:()=>k(!0),"aria-label":"Open the menu","aria-expanded":y,children:n.jsx(vk,{size:17})}),n.jsx("b",{children:c?.project??"Your project"}),h>0&&n.jsx(Ge,{to:"/inbox",className:"badge you","aria-label":`${h} waiting for you`,children:h})]}),y&&n.jsx("div",{className:"side-veil",onClick:()=>k(!1)}),n.jsxs("aside",{className:`side ${y?"open":""}`,children:[n.jsxs("a",{className:"brand",href:"/",title:"All your projects",children:[n.jsx("img",{src:"/logo.svg",alt:""}),n.jsx("b",{children:"squad-kit"}),c?.engine==="demo"&&n.jsx("small",{title:"The squad plays back a recorded run",children:"Demo"})]}),n.jsxs("a",{className:"proj",href:"/",title:"All your projects",children:[n.jsx("span",{className:"pm",children:(c?.project??"P").charAt(0)}),n.jsxs("div",{children:[n.jsx("b",{children:c?.project??"Your project"}),n.jsxs("span",{children:[u.length," open tickets"]})]}),n.jsx(ek,{size:14,className:"sw"})]}),wE.map(w=>{const j=w.badge==="you"?h:w.badge==="bugs"?p:w.badge==="chats"?f:0,N=l.startsWith(w.to)||w.to==="/inbox"&&l.endsWith("/proof");return n.jsxs(Ge,{to:w.to,className:`nav ${N?"on":""}`,onClick:()=>k(!1),children:[n.jsx(w.icon,{size:16}),w.label,j>0&&n.jsx("span",{className:`badge ${w.badge==="you"?"you":w.badge==="chats"?"talk":""}`,children:j})]},w.to)}),n.jsx("div",{className:"grow"}),n.jsx(fE,{}),n.jsx("div",{className:"engines",children:(c?.tools??[]).map(w=>n.jsxs("div",{className:"row",children:[n.jsx("span",{children:w.name}),n.jsx("span",{className:`dot ${w.ready?"":"off"}`,children:w.ready?"Ready":"Not installed"})]},w.name))}),n.jsxs("button",{className:"switch",onClick:o,"aria-pressed":i,children:[n.jsxs("span",{children:[n.jsx(Ll,{size:15}),"Show commands"]}),n.jsx("span",{className:`tog ${i?"on":""}`})]}),n.jsxs("div",{className:"me",children:[n.jsx("span",{className:"av",children:m}),n.jsxs("div",{children:[c?.user.name??"You",n.jsx("small",{children:c?.user.role??""})]}),n.jsx("button",{className:"theme",onClick:s,"aria-label":t==="light"?"Switch to dark":"Switch to light",children:t==="light"?n.jsx(Zl,{size:15}):n.jsx(Xl,{size:15})})]})]}),n.jsxs("main",{className:"canvas",children:[n.jsx(Z2,{}),n.jsx(Wx,{}),e.data?.ready&&e.data.console?.outdated&&n.jsx(Mk,{}),n.jsx(km,{}),n.jsx("div",{className:"canvas-b",children:n.jsx(th,{})})]}),n.jsx(hE,{})]})}function jE(e,t,s=3){const i=e?e.split(`
543
- `):[],o=t.split(`
544
- `);if(i.length*o.length>25e4)return[...i.map(y=>({kind:"del",text:y})),...o.map(y=>({kind:"add",text:y}))];const l=i.length,c=o.length,u=Array.from({length:l+1},()=>new Array(c+1).fill(0));for(let y=l-1;y>=0;y--)for(let k=c-1;k>=0;k--)u[y][k]=i[y]===o[k]?u[y+1][k+1]+1:Math.max(u[y+1][k],u[y][k+1]);const h=[];let p=0,m=0;for(;p<l&&m<c;)i[p]===o[m]?(h.push({kind:"same",text:i[p]}),p++,m++):u[p+1][m]>=u[p][m+1]?h.push({kind:"del",text:i[p++]}):h.push({kind:"add",text:o[m++]});for(;p<l;)h.push({kind:"del",text:i[p++]});for(;m<c;)h.push({kind:"add",text:o[m++]});const f=h.map((y,k)=>y.kind!=="same"||h.slice(Math.max(0,k-s),k+s+1).some(w=>w.kind!=="same")),x=[];return h.forEach((y,k)=>{f[k]?x.push(y):x.at(-1)?.kind!=="gap"&&x.push({kind:"gap",text:""})}),x}function NE({t:e}){const s=$e({queryKey:["conversations",e.id],queryFn:()=>ze(`/api/v1/tickets/${e.id}/conversations`),refetchInterval:3e3}).data??[],[i,o]=E.useState(null),l=i??s.filter(f=>f.started).at(-1)?.key??null,c=$e({queryKey:["conversation",e.id,l],queryFn:()=>ze(`/api/v1/tickets/${e.id}/conversations/${l}`),enabled:!!l,refetchInterval:e.live?2e3:1e4}),u=E.useMemo(()=>Ix(c.data?.updates??[]),[c.data]),[h,p]=E.useState(!0),m=E.useRef(null);return E.useEffect(()=>{h&&m.current?.scrollIntoView({block:"end"})},[u.length,h,l]),s.length?n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"pills",style:{marginBottom:6},children:[s.map(f=>n.jsx("button",{className:`btn sm ${f.key===l?"pri":""}`,disabled:!f.started,onClick:()=>o(f.key),children:f.label},f.key)),n.jsx("span",{className:"grow"}),n.jsxs("label",{className:"note",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12.5},children:[n.jsx("input",{type:"checkbox",checked:h,onChange:f=>p(f.target.checked)})," Follow live"]})]}),n.jsxs("p",{className:"note",style:{fontSize:12.5,margin:"0 0 14px"},children:["Everything the ",s.find(f=>f.key===l)?.label??"agent"," did, step by step. Read only."," ",c.data&&c.data.total>(c.data.updates.length??0)?`Showing the latest ${c.data.updates.length} of ${c.data.total} entries.`:""]}),n.jsxs("div",{className:"conv",children:[u.map((f,x)=>n.jsx(CE,{it:f,ticket:e.id,cwd:c.data?.cwd},f.kind==="tool"?f.id:x)),n.jsx("div",{ref:m})]}),l&&n.jsxs("div",{className:"convactions",children:[n.jsx(SE,{t:e,to:Rg[l]??"builder"}),!e.chat?.open&&!e.takenOver&&n.jsx(xi,{t:e,agent:Rg[l]??"builder"})]}),c.data?.command&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Open it in Claude Code"}),n.jsx(ye,{text:c.data.command}),n.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:l==="build"&&Rp(e)?n.jsxs(n.Fragment,{children:["To work in it yourself, press ",n.jsx("b",{children:"Take over"})," first, so you and the squad never edit at the same time."," ",n.jsx(Ap,{t:e})]}):e.takenOver?"The ticket is yours: type into it freely, then press Give back on the Now tab.":"Read it any time. To work in it, take the ticket over while it is being built."})]})]}):n.jsx("div",{className:"db",children:n.jsx("p",{className:"note",children:"No conversation yet. It starts when the Analyst reads the ticket."})})}const Rg={intake:"analyst",build:"builder",review:"reviewer",tester:"tester"},Ag={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function SE({t:e,to:t}){const s=Se(),[i,o]=E.useState("");if(e.stage==="done")return null;const l=()=>s.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:i,to:t},done:`Sent. ${e.now?.noteWhen??`The ${Ag[t]} reads it at its next step.`}`},{onSuccess:()=>o("")});return n.jsxs("div",{className:"msgagent",children:[n.jsx("input",{className:"input",value:i,onChange:c=>o(c.target.value),placeholder:`Message the ${Ag[t]}…`,onKeyDown:c=>c.key==="Enter"&&i.trim()&&l()}),n.jsxs("button",{className:"btn sm pri",disabled:!i.trim()||s.isPending,onClick:l,children:[n.jsx(jr,{size:13})," Send"]})]})}function CE({it:e,ticket:t,cwd:s}){if(e.kind==="plan")return n.jsx(LE,{entries:e.entries});if(e.kind==="tool")return n.jsx(PE,{it:e,ticket:t,cwd:s});const{from:i,content:o}=e;return i==="agent"?n.jsx("div",{className:"conv-text",children:n.jsx(_p,{content:o,ticket:t})}):n.jsx(EE,{from:i,content:o,ticket:t})}function EE({from:e,content:t,ticket:s}){const i=t.type==="text"?t.text:"",o=i.length>420||i.split(`
545
- `).length>8,[l,c]=E.useState(!o&&e!=="thought"),u=e==="squad-kit"?"squad-kit asked":e==="claude-code"?"Note from Claude Code":"Thinking";return n.jsxs("div",{className:e==="thought"?"conv-thought":"conv-prompt",children:[n.jsxs("button",{className:"conv-who linkish",onClick:()=>c(!l),children:[e==="thought"&&n.jsx(I2,{size:12})," ",u," ",!l&&n.jsx("span",{className:"note",children:"· show"})]}),l&&(e==="thought"?n.jsx("div",{style:{whiteSpace:"pre-wrap"},children:i}):n.jsx(_p,{content:t,ticket:s}))]})}const TE={read:ik,edit:sh,delete:an,move:sh,search:fi,execute:Ll,think:I2,fetch:uk,switch_mode:rh,other:rh};function PE({it:e,ticket:t,cwd:s}){const i=e.content.some(m=>m.type==="content"&&(m.content.type==="image"||m.content.type==="resource_link")),o=e.content.some(m=>m.type==="diff"),l=e.status==="failed"&&!e.skipped,[c,u]=E.useState(!e.skipped&&(o||i||l));E.useEffect(()=>{(l||i)&&u(!0)},[l,i]);const h=e.answer?jr:e.skipped?Yl:TE[e.toolKind]??rh,p=e.content.length>0||e.command||e.skipped;return n.jsxs("div",{className:`conv-tool ${e.skipped?"skipped":e.status}`,children:[n.jsxs("button",{className:"conv-tool-head",onClick:()=>p&&u(!c),"aria-expanded":c,children:[n.jsx(h,{size:14}),n.jsx("span",{className:"mono conv-tool-title",children:e.title}),n.jsx("span",{className:"conv-at",children:e.at?Bs(e.at):""}),n.jsx(RE,{status:e.status,skipped:e.skipped})]}),c&&p&&n.jsxs("div",{className:"conv-tool-body",children:[e.skipped&&n.jsx("p",{className:"note",children:"By design, nothing went wrong: squad-kit lets each step do only what it needs, and this was not part of it."}),e.command&&e.toolKind==="execute"?n.jsxs("pre",{className:"conv-cmd",children:["$ ",e.command]}):e.skipped&&e.detail&&n.jsx("pre",{className:"conv-cmd",children:e.detail}),e.content.map((m,f)=>n.jsx(AE,{c:m,ticket:t,cwd:s},f))]})]})}function RE({status:e,skipped:t}){return t?n.jsxs("span",{className:"conv-status skip",children:[n.jsx(Yl,{size:12})," Skipped"]}):e==="completed"?n.jsxs("span",{className:"conv-status ok",children:[n.jsx(Ce,{size:12})," Done"]}):e==="failed"?n.jsxs("span",{className:"conv-status bad",children:[n.jsx(an,{size:12})," Failed"]}):n.jsxs("span",{className:"conv-status run",children:[n.jsx(In,{size:12,className:"spin"})," Running"]})}function AE({c:e,ticket:t,cwd:s}){if(e.type==="diff"){const i=s&&e.path.startsWith(`${s}/`)?e.path.slice(s.length+1):e.path;return n.jsx(IE,{path:i,oldText:e.oldText??"",newText:e.newText,isNew:e.oldText==null})}return e.type==="terminal"?n.jsxs("p",{className:"note",children:["Terminal ",e.terminalId]}):e.content.type==="text"?e.content.text.trimStart().startsWith("```")?n.jsx(Vx,{text:e.content.text}):n.jsx(Hx,{text:e.content.text}):n.jsx(_p,{content:e.content,ticket:t})}function Hx({text:e}){const t=e.length>600||e.split(`
546
- `).length>12,[s,i]=E.useState(!t);return n.jsxs("div",{className:"conv-out",children:[n.jsx("pre",{children:s?e:`${e.split(`
547
- `).slice(0,10).join(`
548
- `).slice(0,600)}…`}),t&&n.jsx("button",{className:"linkbtn",onClick:()=>i(!s),children:s?"Show less":"Show all output"})]})}function IE({path:e,oldText:t,newText:s,isNew:i}){const o=E.useMemo(()=>jE(t,s),[t,s]),l=o.filter(m=>m.kind==="add").length,c=o.filter(m=>m.kind==="del").length,[u,h]=E.useState(o.length<=40),p=u?o:o.slice(0,40);return n.jsxs("div",{className:"conv-diff",children:[n.jsxs("div",{className:"conv-diff-head mono",children:[n.jsx("span",{style:{overflowWrap:"anywhere"},children:e}),n.jsx("span",{className:"grow"}),i?n.jsxs("span",{className:"add",children:["new file · ",l," lines"]}):n.jsxs("span",{children:[n.jsxs("span",{className:"add",children:["+",l]})," ",n.jsxs("span",{className:"del",children:["−",c]})]})]}),n.jsx("pre",{children:p.map((m,f)=>m.kind==="gap"?n.jsx("div",{className:"gap",children:"⋯"},f):n.jsxs("div",{className:m.kind,children:[n.jsx("span",{className:"sign",children:m.kind==="add"?"+":m.kind==="del"?"−":" "}),m.text||" "]},f))}),o.length>40&&n.jsx("button",{className:"linkbtn",style:{margin:"0 10px 8px"},onClick:()=>h(!u),children:u?"Show less":`Show all ${o.length} lines`})]})}function LE({entries:e}){const t=e.filter(s=>s.status==="completed").length;return n.jsxs("div",{className:"conv-plan",children:[n.jsxs("div",{className:"conv-who",children:[n.jsx(gk,{size:13})," Plan · ",t," of ",e.length," done"]}),e.map((s,i)=>n.jsxs("div",{className:`conv-plan-row ${s.status}`,children:[n.jsx("span",{className:"box",children:s.status==="completed"?n.jsx(Ce,{size:11}):s.status==="in_progress"?n.jsx(In,{size:11,className:"spin"}):null}),s.content]},i))]})}function _p({content:e,ticket:t}){switch(e.type){case"text":return n.jsx(Vx,{text:e.text});case"image":return n.jsx(bp,{className:"conv-img",src:`data:${e.mimeType};base64,${e.data}`,alt:"Picture the agent looked at"});case"audio":return n.jsx("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});case"resource_link":return n.jsx(Ig,{uri:e.uri,name:e.name,mime:e.mimeType??"",size:e.size??void 0,ticket:t});case"resource":return e.resource.text?n.jsx(Hx,{text:e.resource.text}):n.jsx(Ig,{uri:e.resource.uri,name:e.resource.uri.split("/").pop()??"file",mime:e.resource.mimeType??"",ticket:t})}}function Ig({uri:e,name:t,mime:s,size:i,ticket:o}){const l=nn(o,e);return s.startsWith("image/")&&s!=="image/svg+xml"?n.jsxs("div",{className:"conv-media",children:[n.jsx(bp,{className:"conv-img",src:l,alt:t}),n.jsx("span",{className:"note mono",children:t})]}):s.startsWith("video/")?n.jsxs("div",{className:"conv-media",children:[n.jsx("video",{className:"conv-img",src:l,controls:!0,preload:"metadata"}),n.jsx("span",{className:"note mono",children:t})]}):s.startsWith("audio/")?n.jsx("audio",{controls:!0,src:l}):n.jsxs("a",{href:l,target:"_blank",rel:"noreferrer",className:"conv-file",children:[n.jsx(is,{size:15}),n.jsx("span",{className:"mono",children:t}),n.jsx("span",{className:"note",children:[s.split("/").pop(),i?`${Math.max(1,Math.round(i/1024))} KB`:""].filter(Boolean).join(" · ")})]})}function Vx({text:e}){const{theme:t}=qe();return n.jsx("div",{className:"md",children:n.jsx(Qy,{remarkPlugins:[xx],components:{a:({href:s,children:i})=>n.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:i}),code:({className:s,children:i})=>{const o=/language-(\w+)/.exec(s??"")?.[1],l=String(i).replace(/\n$/,"");return!o&&!l.includes(`
549
- `)?n.jsx("code",{className:"mono",children:i}):n.jsxs("div",{className:"md-code",children:[o&&n.jsx("span",{className:"md-lang",children:o==="mermaid"?"Diagram (Mermaid)":o}),n.jsx(Sx,{code:l,language:o??"text",theme:t==="dark"?Pa.vsDark:Pa.github,children:({tokens:c,getLineProps:u,getTokenProps:h})=>n.jsx("pre",{children:c.map((p,m)=>n.jsx("div",{...u({line:p}),children:p.map((f,x)=>n.jsx("span",{...h({token:f})},x))},m))})})]})}},children:e})})}const _E=(e,t)=>e.part===t.part&&(e.index??0)===(t.index??0);function ul({review:e,at:t,children:s}){const[i,o]=E.useState(null),[l,c]=E.useState("");if(!e)return n.jsx(n.Fragment,{children:s});const u=e.comments.map((p,m)=>({c:p,i:m})).filter(({c:p})=>_E(p,t)),h=()=>{l.trim()&&e.add({...t,text:l.trim()}),c(""),o(null)};return n.jsxs("div",{className:`part ${i?"open":""}`,children:[n.jsxs("div",{className:"partbody",children:[n.jsx("div",{className:"partmain",children:i==="edit"?n.jsx(zE,{review:e,at:t,onDone:()=>o(null)}):s}),i!=="edit"&&n.jsxs("span",{className:"parttools",children:[n.jsx("button",{className:"iconbtn",title:"Comment on this","aria-label":"Comment on this",onClick:()=>o("comment"),children:n.jsx(pm,{size:13})}),e.canEdit(t)&&n.jsx("button",{className:"iconbtn",title:"Edit it yourself","aria-label":"Edit it yourself",onClick:()=>o("edit"),children:n.jsx(sh,{size:13})})]})]}),u.map(({c:p,i:m})=>n.jsxs("div",{className:"pcomment",children:[n.jsx(pm,{size:12})," ",n.jsx("span",{children:p.text}),n.jsx("button",{className:"iconbtn","aria-label":"Remove comment",onClick:()=>e.remove(m),children:n.jsx(an,{size:12})})]},m)),i==="comment"&&n.jsxs("div",{className:"pcomment new",children:[n.jsx("input",{className:"input",autoFocus:!0,value:l,placeholder:"Your comment on this part. Enter to add",onChange:p=>c(p.target.value),onKeyDown:p=>{p.key==="Enter"&&h(),p.key==="Escape"&&o(null)}}),n.jsx("button",{className:"btn sm",onClick:h,children:"Add"})]})]})}function zE({review:e,at:t,onDone:s}){const i=Se(),o=e.t,l=t.index??0,[c,u]=E.useState(t.part==="story"?o.story??"":t.part==="step"?o.steps?.[l]?.title??"":""),[h,p]=E.useState(o.criteria?.[l]??{given:"",when:"",then:""}),m=()=>i.mutate({path:`/api/v1/tickets/${o.id}/plan/edit`,body:t.part==="criterion"?{...t,criterion:h}:{...t,text:c},done:"Edited. Your wording stays."},{onSuccess:s});return n.jsxs("div",{className:"editpart",children:[t.part==="criterion"?["given","when","then"].map(f=>n.jsxs("label",{children:[n.jsx("em",{children:f[0].toUpperCase()+f.slice(1)}),n.jsx("input",{className:"input",value:h[f],onChange:x=>p({...h,[f]:x.target.value})})]},f)):n.jsx("textarea",{className:"waynote",rows:t.part==="story"?3:2,autoFocus:!0,value:c,onChange:f=>u(f.target.value)}),n.jsxs("div",{className:"editbtns",children:[n.jsx("button",{className:"btn sm pri",disabled:i.isPending,onClick:m,children:"Save"}),n.jsx("button",{className:"btn sm",onClick:s,children:"Cancel"})]})]})}const Lg=e=>e?`Given ${e.given}, when ${e.when}, then ${e.then}.`:"";function ME({t:e}){const[t,s]=E.useState(!0),i=e.planReview?.before;if(!i)return null;const o=[],l=(h,p="",m="")=>p!==m&&o.push({label:h,old:p,now:m});l("The story",i.story,e.story);const c=Math.max(i.criteria?.length??0,e.criteria?.length??0);for(let h=0;h<c;h++)l(`Done when ${h+1}`,Lg(i.criteria?.[h]),Lg(e.criteria?.[h]));(i.decision!==void 0||e.decision)&&l("The decision",i.decision,e.decision?`${e.decision.title}: ${e.decision.options.find(h=>h.chosen)?.name??""}`:"");const u=Math.max(i.steps?.length??0,e.steps?.length??0);for(let h=0;h<u;h++)l(`Step ${h+1}`,i.steps?.[h],e.steps?.[h]?.title);return n.jsxs("div",{className:"changed",children:[n.jsxs("button",{className:"changedhead",onClick:()=>s(!t),children:[n.jsx("b",{children:"What changed"})," ",o.length?`${o.length} ${o.length===1?"part":"parts"}`:"nothing"," since the last version ",t?"▾":"▸"]}),t&&n.jsxs(n.Fragment,{children:[(e.planReview?.sent??[]).length>0&&n.jsxs("div",{className:"sentlist",children:["Your comments:"," ",e.planReview.sent.map((h,p)=>n.jsxs("span",{children:["“",h.text,"”"]},p))]}),o.map(h=>n.jsxs("div",{className:"chrow",children:[n.jsx("div",{className:"chlabel",children:h.label}),n.jsx("div",{className:h.old?"chold":"chold empty",children:h.old||n.jsx("i",{children:"new"})}),n.jsx("div",{className:"chnew",children:h.now||n.jsx("i",{children:"removed"})})]},h.label))]})]})}const FE={questions:"Questions",spec:"Spec",scan:"Reading the project",design:"Design",blueprint:"Stack and patterns",build:"Build",fix:"Fixes",review:"Review",proof:"Proof",chat:"Talking it through",draft:"Filling in a new ticket"},$E=["analyst","architect","builder","reviewer","tester"],zp="What it would cost at the AI company's API prices. Your own AI subscription pays for it; this shows where the cost goes.";function Kx(e,t){e.runs+=t.runs;for(const s of["inputTokens","cachedTokens","outputTokens","costUsd"])t[s]!==void 0&&(e[s]=(e[s]??0)+t[s]);t.tokensUnknown&&(e.tokensUnknown=(e.tokensUnknown??0)+t.tokensUnknown),t.costUnknown&&(e.costUnknown=(e.costUnknown??0)+t.costUnknown)}function Qx(e){const t={runs:0};for(const s of e)Kx(t,s);return t}function OE(e){return $E.flatMap(t=>{const s=e.filter(o=>o.role===t);if(!s.length)return[];const i=[];for(const o of s){let l=i.find(c=>c.level===o.level&&c.model===o.model);l||i.push(l={level:o.level,model:o.model,steps:[],total:{runs:0}}),l.steps.includes(o.step)||l.steps.push(o.step),Kx(l.total,o)}return[{role:t,total:Qx(s),levels:i}]})}function hi(e){return e.costUsd===void 0?null:e.costUsd<.005?"under $0.01":`$${e.costUsd.toFixed(2)}`}function dl(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}const Sh=e=>`${e} ${e===1?"run":"runs"}`;function _g({t:e}){const t=hi(e);return t?n.jsxs("span",{title:e.costUnknown?`${Sh(e.costUnknown)} did not report a cost, so the real amount is higher`:void 0,children:[t,e.costUnknown?n.jsxs("span",{className:"note",children:[" +",e.costUnknown," not reported"]}):null]}):n.jsx("span",{className:"note",children:"Not reported"})}function zg({t:e}){if(e.inputTokens===void 0&&e.outputTokens===void 0)return n.jsx("span",{className:"note",children:"Not reported"});const t=e.cachedTokens?`, ${dl(e.cachedTokens)} of it read again from earlier in the conversation, which costs less`:"";return n.jsxs("span",{title:`Tokens are the pieces of text the AI reads and writes. It read ${dl(e.inputTokens??0)}${t}.`,children:[e.inputTokens!==void 0&&n.jsxs(n.Fragment,{children:[dl(e.inputTokens)," read"]}),e.inputTokens!==void 0&&e.outputTokens!==void 0&&" · ",e.outputTokens!==void 0&&n.jsxs(n.Fragment,{children:[dl(e.outputTokens)," written"]})]})}function DE({level:e,model:t}){return t?n.jsxs(n.Fragment,{children:[t," ",n.jsx("span",{className:"note",children:e})]}):n.jsx(n.Fragment,{children:e})}function Gx({roles:e,total:t,steps:s}){return n.jsxs("table",{className:"table usage",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Role"}),n.jsx("th",{children:"Model level"}),n.jsx("th",{children:s?"What it did":"Runs"}),n.jsx("th",{children:"Tokens"}),n.jsx("th",{className:"num",children:"Cost"})]})}),n.jsx("tbody",{children:e.flatMap(i=>i.levels.map((o,l)=>n.jsxs("tr",{children:[n.jsx("td",{children:l===0&&n.jsxs("span",{className:"who",children:[n.jsx(Nr,{role:i.role,small:!0})," ",Os[i.role]]})}),n.jsx("td",{children:n.jsx(DE,{level:o.level,model:o.model})}),n.jsx("td",{children:s?n.jsxs(n.Fragment,{children:[o.steps.map(c=>FE[c]??c).join(", "),n.jsxs("span",{className:"note",children:[" · ",Sh(o.total.runs)]})]}):o.total.runs}),n.jsx("td",{children:n.jsx(zg,{t:o.total})}),n.jsx("td",{className:"num",children:n.jsx(_g,{t:o.total})})]},`${i.role}-${o.level}-${o.model}`)))}),n.jsx("tfoot",{children:n.jsxs("tr",{children:[n.jsx("td",{children:"Total"}),n.jsx("td",{}),n.jsx("td",{children:s?n.jsx("span",{className:"note",children:Sh(t.runs)}):t.runs}),n.jsx("td",{children:n.jsx(zg,{t})}),n.jsx("td",{className:"num",children:n.jsx(_g,{t})})]})})]})}function Yx({t:e}){const t=e.usage??[],s=Qx(t);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["What it used",t.length>0&&n.jsx("span",{className:"pill",children:hi(s)?`${hi(s)} at API prices`:"Cost not reported"})]}),t.length?n.jsxs(n.Fragment,{children:[n.jsx(Gx,{roles:OE(t),total:s,steps:!0}),n.jsxs("p",{className:"note",style:{marginTop:8},children:[zp," Each role's model level can be changed on the Squad page."]})]}):n.jsx("p",{className:"note",children:"Nothing yet. Each run of a role is counted here as the squad works."})]})}function Zx(){return $e({queryKey:["usage"],queryFn:()=>ze("/api/v1/usage"),refetchInterval:5e3})}function BE(){const e=Zx().data?.total;return e?.runs?n.jsxs("span",{title:zp,children:["Used ",n.jsx("b",{children:hi(e)??"an unknown amount"})," at API prices"]}):null}function qE(){const e=Zx().data;return e?.total.runs?n.jsxs(n.Fragment,{children:[n.jsx("h2",{style:{marginTop:30},children:"What the squad used"}),n.jsxs("p",{className:"note",style:{marginTop:2},children:["Every ticket on this computer (",e.tickets," so far) and the project's own work, like reading the project and filling in new tickets",e.project.runs?` (${hi(e.project)??"cost not reported"})`:"",e.deleted?.tickets?`, and ${e.deleted.tickets} deleted ${e.deleted.tickets===1?"ticket":"tickets"} (${hi(e.deleted.total)??"cost not reported"})`:"",". ",zp," Change a role's model level with its Edit button above."]}),n.jsx("div",{style:{marginTop:10},children:n.jsx(Gx,{roles:e.roles,total:e.total})})]}):null}function qa(e){return e.owner?.trim()||e.createdBy}function ql(e,t){return!!e?.trim()&&e.trim().toLowerCase()===t?.trim().toLowerCase()}function dc(){const e=Ct();return e.data?.ready?e.data.meta.user?.name:void 0}function Ms(e,t){return ql(qa(e),t)}function UE(e,t){return Ms(e,t)&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"}function WE({t:e}){const[t,s]=E.useState(!1);return n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn sm",onClick:()=>s(!0),title:"Give this ticket to a teammate. Their squad carries on from its branch.",children:[n.jsx(Rl,{size:13})," Hand over"]}),t&&n.jsx(HE,{t:e,onClose:()=>s(!1)})]})}function HE({t:e,onClose:t}){const s=Se(),i=Se(),o=Ct(),l=dc(),[c,u]=E.useState(""),[h,p]=E.useState(""),m=o.data?.ready?o.data.meta.engine==="live":!0,f=e.branch??`squad/${e.id.toLowerCase()}`,x=!!(e.live||e.squad||e.stopRequested),y=e.chat?.open?"A chat is open on this ticket. Finish the talk first.":x?"The squad is working on it right now. It hands over once the step is done, or you stop it.":null,k=E.useMemo(()=>{const N=new Map;for(const S of o.data?.ready?o.data.tickets:[])for(const T of[qa(S),S.createdBy,S.specApproved?.by,S.handedOver?.from,S.handedOver?.to,...(S.notes??[]).map(A=>A.by)])T?.trim()&&!ql(T,l)&&N.set(T.trim().toLowerCase(),T.trim());return[...N.values()].slice(0,8)},[o.data,l]),w=c.trim()||"them",j=()=>c.trim()&&s.mutate({path:`/api/v1/tickets/${e.id}/hand-over`,body:{to:c,note:h},done:`Handed ${e.id} over to ${c.trim()}. Their squad carries on from the branch.`},{onSuccess:t});return n.jsxs(at,{title:`Hand over ${e.id}`,onClose:t,icon:n.jsx("span",{className:"glyph",children:n.jsx(Rl,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:!c.trim()||!!y||s.isPending,onClick:j,children:[n.jsx(Rl,{size:15})," ",s.isPending?"Pushing…":"Hand over"]}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad hand-over ${e.id} ${c.trim()||"Name"}${h.trim()?` --note ${tn(h.trim())}`:""}`})]}),children:[n.jsx("p",{children:"Give this ticket to a teammate. Their squad carries on where it is now."}),y&&n.jsxs("div",{className:"stuckbox",style:{marginBottom:14,display:"flex",gap:10,alignItems:"center"},children:[n.jsx("span",{style:{flex:1},children:y}),x&&!e.chat?.open&&n.jsxs("button",{className:"btn sm",disabled:e.stopRequested||i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[n.jsx(ui,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]})]}),n.jsxs("div",{className:"field",children:[n.jsx("label",{htmlFor:"handover-to",children:"Hand it over to"}),n.jsx("input",{id:"handover-to",className:"input",autoFocus:!0,value:c,placeholder:"Their name, as their board shows it",onChange:N=>u(N.target.value),onKeyDown:N=>N.key==="Enter"&&!y&&j()}),k.length>0&&n.jsx("div",{className:"pills",style:{marginTop:8},children:k.map(N=>n.jsxs("button",{className:`pill click ${ql(N,c)?"on":""}`,onClick:()=>u(N),children:[n.jsx(D2,{size:12})," ",N]},N))})]}),n.jsxs("div",{className:"field",children:[n.jsxs("label",{htmlFor:"handover-note",children:["A note for ",w," (optional)"]}),n.jsx("textarea",{id:"handover-note",className:"input",rows:2,value:h,placeholder:"Where you got to, and anything to watch out for. Every agent reads it too.",onChange:N=>p(N.target.value)})]}),n.jsx("div",{className:"lbl",children:"What happens"}),n.jsxs("ul",{className:"brief",children:[m?n.jsxs(n.Fragment,{children:[n.jsxs("li",{children:["squad-kit saves the work so far and the ticket's documents on its branch, ",n.jsx("span",{className:"mono",children:f}),", and pushes it."]}),n.jsxs("li",{children:[w==="them"?"They become":`${w} becomes`," the owner. Their squad makes its copy of the code from that branch, and the Builder starts a fresh chat from the spec, the design and the code."]})]}):n.jsxs("li",{children:[w==="them"?"They become":`${w} becomes`," the owner. This is a sample board, so nothing is pushed."]}),n.jsx("li",{children:"Your squad stops working on it. You still see it on your board, with its new owner."})]}),n.jsx("div",{className:"lbl",children:"What stays on this computer"}),n.jsx("p",{className:"note",style:{fontSize:13},children:"Live progress, agent chats and screenshots. They see the documents and the code, not the chat. The Tester takes the screenshots again on their computer."})]})}function VE({t:e}){const t=dc(),s=e.handedOver;return!s||!ql(s.to,t)||!Ms(e,t)?null:n.jsxs("div",{className:"calm",style:{flex:"none",margin:"16px 28px 0"},children:[n.jsx("span",{className:"ring",children:n.jsx(Rl,{size:16})}),n.jsxs("div",{children:[n.jsxs("b",{children:[s.from," handed this ticket to you ",Un(s.at)]}),n.jsxs("span",{children:["The spec, the design, the notes and the code came with its branch. Live progress, agent chats and screenshots stayed on ",s.from,"'s computer, so the Builder starts a fresh chat from the spec, the design and the code, and the Tester takes the screenshots again."]})]})]})}function KE({t:e}){const t=qa(e),s=e.handedOver;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"calm",children:[n.jsx("span",{className:"ring",children:n.jsx(D2,{size:17})}),n.jsxs("div",{children:[n.jsxs("b",{children:[t," owns this ticket"]}),n.jsxs("span",{children:[s?`${s.from} handed it to ${s.to} ${Un(s.at)}. `:"","Their squad works on it, on their computer. You see their work here when they push it: when they hand it over, or when its pull request opens."]})]})]}),n.jsxs("p",{className:"note",style:{marginTop:12,fontSize:13},children:["Live progress and agent chats stay on ",t,"'s computer. The spec, the design and the notes here are as ",t," last pushed them."]})]}),n.jsxs("div",{className:"df",children:[n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad show ${e.id}`})]})]})}function Xx(e){return!!(e.now&&(e.now.state==="working"||e.now.state==="queued"||e.now.state==="stopping"))}function QE(e){const t=Math.max(0,Math.floor((Date.now()-Date.parse(e))/1e3));if(t<2)return"just now";if(t<60)return`${t} seconds ago`;const s=Math.floor(t/60);return`${s} minute${s===1?"":"s"} ago`}function Jx({bar:e,big:t}){return e?.length?n.jsx("div",{className:`segbar ${t?"big":""}`,"aria-hidden":!0,children:e.map((s,i)=>n.jsx("span",{className:s==="done"?"d":s==="now"?"n":""},i))}):null}function GE({t:e}){const t=e.now;if(t.state==="queued")return n.jsx("div",{className:"nl1 quiet",children:t.line});const[s,...i]=t.line.split(" · "),o=e.quiet;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"nl1",children:[n.jsx("span",{className:"live"}),n.jsxs("span",{children:[n.jsx("b",{children:s}),i.length?` · ${i.join(" · ")}`:""]})]}),o?n.jsxs("div",{className:`nl2 slow ${o.kind}`,children:[o.kind==="stuck"?n.jsx(za,{size:12}):n.jsx(z2,{size:12}),o.kind==="stuck"?"Looks stuck":"Taking longer than usual",t.seconds!==void 0&&o.kind==="long"?` · ${t.time?.split(" · ")[0]}`:""]}):t.time&&n.jsx("div",{className:"nl2",children:t.time}),n.jsx(Jx,{bar:t.bar})]})}function e3({t:e}){const t=e.now,s=t.state==="queued"?"Next in line":t.state==="stopping"?"Stopping":"Working",[i,...o]=(t.detail??"").split(" · ");return n.jsxs("section",{className:"nowcard","aria-label":"What is happening now",children:[n.jsxs("div",{className:"nowhead",children:[t.state==="working"&&n.jsx("span",{className:"live"}),n.jsxs("span",{children:[s,t.state==="working"&&t.lastAt?` · last update ${QE(t.lastAt)}`:""]})]}),n.jsx("p",{className:"nowsay",children:t.sentence}),t.detail&&n.jsxs("div",{className:"nowmeta",children:[t.part?n.jsx("b",{children:i}):i,o.length?` · ${o.join(" · ")}`:""]}),n.jsx(Jx,{bar:t.bar,big:!0}),t.next&&n.jsxs("div",{className:"nownext",children:[n.jsx("b",{children:"What comes next:"})," ",t.next]})]})}function t3({t:e}){const t=e.now?.role==="squad"?"tester":e.now?.role,s=t?e.activity.filter(l=>l.who===t):[],i=(s.length>=2?s:e.activity).slice(0,6);if(!i.length)return null;const o=s.length>=2&&t?Os[t]:"squad";return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["What the ",o," did, in plain words"]}),n.jsx("div",{className:"feed",children:i.map((l,c)=>n.jsxs("div",{className:"fe",children:[n.jsx("span",{className:"tm",children:Bs(l.at)}),n.jsx(Nr,{role:l.who,small:!0}),n.jsx("span",{children:l.text})]},l.at+c))})]})}function YE({t:e}){const t=Se(),s=e.now?.slow,i=t.isPending||e.stopRequested;if(!s)return null;const o=s.kind==="stuck",l=()=>t.mutate({path:`/api/v1/tickets/${e.id}/keep-waiting`,body:{minutes:10},done:"OK. squad-kit stays quiet about it for 10 minutes."}),c=()=>t.mutate({path:`/api/v1/tickets/${e.id}/restart`,done:"Stopping the step. It starts again at once, with the work so far."}),u=()=>t.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),h=()=>t.mutate({path:`/api/v1/tickets/${e.id}/unstick`,done:"Ended the stuck command. The squad carries on."});return n.jsxs("section",{className:`slowcard ${o?"stuck":""}`,"aria-label":s.title,children:[n.jsxs("div",{className:"slowhead",children:[o?n.jsx(za,{size:17}):n.jsx(z2,{size:17}),n.jsx("b",{children:s.title}),n.jsx("span",{className:"grow"}),n.jsx("span",{className:"where",children:s.where})]}),n.jsxs("div",{className:"slowbody",children:[n.jsx("p",{className:"slowsay",children:s.text}),n.jsx("div",{className:"facts",children:s.facts.map(p=>n.jsxs("div",{className:"fact",children:[n.jsx("span",{children:p.label}),n.jsx("span",{children:p.value})]},p.label))}),n.jsxs("div",{className:"ways",children:[o&&s.canEnd&&n.jsx("button",{className:"btn pri",disabled:i,onClick:h,children:"End the stuck command"}),!o&&n.jsx("button",{className:"btn you",disabled:i,onClick:l,children:"Give it 10 more minutes"}),n.jsx("button",{className:"btn",disabled:i,onClick:c,children:"Stop and try again"}),o&&n.jsx("button",{className:"btn",disabled:i,onClick:l,children:"Keep waiting"}),n.jsxs("button",{className:"btn",disabled:i,onClick:u,children:[n.jsx(ui,{size:12})," Stop"]})]}),o&&s.canEnd&&n.jsx("p",{className:"note slownote",children:"Ending the command gives the squad an error back, and it carries on in the same conversation."}),n.jsxs("div",{className:"slowfoot",children:[n.jsx("span",{children:s.limit??"Nothing is lost whatever you choose."}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:o&&s.canEnd?`squad unstick ${e.id}`:`squad wait ${e.id} --more 10m`})]})]})]})}function n3({t:e}){const[t,s]=E.useState(""),[i,o]=E.useState([]),[l,c]=E.useState(!1),u=async()=>{const p=t.trim();if(!(!p||l)){c(!0);try{const m=await St(`/api/v1/tickets/${e.id}/status/ask`,"POST",{text:p});o(f=>[...f,{q:p,a:m,at:new Date().toISOString()}]),s("")}catch(m){o(f=>[...f,{q:p,error:m instanceof Error?m.message:String(m),at:new Date().toISOString()}])}finally{c(!1)}}},h=xn(t).dir;return n.jsxs("section",{className:"askbox","aria-label":"Ask about this ticket",children:[n.jsx("label",{htmlFor:`ask-${e.id}`,className:"lbl",children:"Ask about this ticket"}),i.length>0&&n.jsx("div",{className:"askthread",children:i.map((p,m)=>n.jsx(ZE,{t:e,said:p},p.at+m))}),n.jsxs("div",{className:"askrow",children:[n.jsx("input",{id:`ask-${e.id}`,className:"input",dir:h,value:t,onChange:p=>s(p.target.value),onKeyDown:p=>p.key==="Enter"&&void u(),placeholder:"For example: is there a problem? when will it be ready?"}),n.jsxs("button",{className:"btn pri",disabled:!t.trim()||l,onClick:()=>void u(),children:[n.jsx(jr,{size:14})," Ask"]})]}),n.jsxs("div",{className:"askfoot",children:[n.jsx("span",{children:"Status answers come at once, in English or Arabic, with no AI cost. Questions for an agent reach it at its next safe moment."}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad status ${e.id}`})]})]})}function ZE({t:e,said:t}){const s=t.a,i=s?.lang==="ar",o=xn(t.q).dir;return n.jsxs("div",{className:"askturn",children:[n.jsx("div",{className:"askme",dir:o,children:t.q}),n.jsxs("div",{className:`askit ${i?"ar":""}`,dir:i?"rtl":"ltr",lang:i?"ar":"en",children:[n.jsxs("div",{className:"who",children:[n.jsx("b",{children:"squad-kit"}),s?.instant&&n.jsx("span",{className:"tag",children:i?"إجابة فورية":"answered at once"}),n.jsx("span",{className:"note",children:Bs(t.at)})]}),t.error?n.jsx("p",{className:"err",children:t.error}):s?.lines.map((l,c)=>n.jsx("p",{children:l},c)),s&&s.offers.length>0&&n.jsx("div",{className:"askoffers",children:s.offers.map(l=>n.jsx(XE,{t:e,o:l,question:t.q},l.do+l.label))})]})]})}function XE({t:e,o:t,question:s}){const i=Se(),{toast:o}=qe(),[l,c]=E.useState(!1),[u,h]=E.useState(!1);switch(t.do){case"propose":return n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn sm offer",onClick:()=>c(!0),children:[n.jsxs("span",{className:"ol",children:[n.jsx(vr,{size:13})," ",t.label]}),n.jsx("span",{className:"on",children:t.note})]}),l&&n.jsx(uc,{t:e,initial:s,onClose:()=>c(!1)})]});case"note":return n.jsxs("button",{className:"btn sm offer",disabled:u||i.isPending,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:s,...t.to?{to:t.to}:{}}},{onSuccess:()=>{h(!0),o(`Sent. ${t.note}`)}}),children:[n.jsxs("span",{className:"ol",children:[n.jsx(jr,{size:13})," ",u?"Sent":t.label]}),n.jsx("span",{className:"on",children:t.note})]});case"chat":return n.jsx(xi,{t:e,agent:t.to,label:t.label});case"stop":return n.jsxs("button",{className:"btn sm",disabled:i.isPending||e.stopRequested,onClick:()=>i.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[n.jsx(ui,{size:12})," ",t.label]})}}function JE(e,t){return!!e.mergedAt||e.stage==="done"||t&&e.stage==="release"}function Ch(e){return j2.createPortal(e,document.body)}function eT(){const e=Ct();return e.data?.ready?e.data.meta.engine==="demo":!1}function tT({t:e,onDeleted:t}){const[s,i]=E.useState(!1),[o,l]=E.useState(null),c=JE(e,eT()),u=s3(e),h=E.useRef(null);E.useEffect(()=>{if(!s)return;const m=x=>h.current&&!h.current.contains(x.target)&&i(!1),f=x=>x.key==="Escape"&&i(!1);return document.addEventListener("mousedown",m),document.addEventListener("keydown",f),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",f)}},[s]);const p=m=>()=>{i(!1),m()};return n.jsxs("span",{className:"more",ref:h,children:[n.jsx("button",{className:"iconbtn","aria-label":"More actions","aria-haspopup":"menu","aria-expanded":s,title:"More actions",onClick:()=>i(!s),children:n.jsx(sk,{size:16})}),s&&n.jsx("div",{className:"more-menu",role:"menu",children:e.archived?n.jsxs("button",{role:"menuitem",onClick:p(u),children:[n.jsx(A2,{size:15})," Unarchive"]}):c?n.jsxs("button",{role:"menuitem",onClick:p(()=>l("archive")),children:[n.jsx(Pl,{size:15})," Archive…"]}):n.jsxs("button",{role:"menuitem",className:"danger",onClick:p(()=>l("delete")),children:[n.jsx(_l,{size:15})," Delete ticket…"]})}),o==="delete"&&Ch(n.jsx(r3,{t:e,onClose:()=>l(null),onDeleted:t})),o==="archive"&&Ch(n.jsx(nT,{t:e,onClose:()=>l(null)}))]})}function s3(e){const t=Se();return()=>t.mutate({path:`/api/v1/tickets/${e.id}/archive`,body:{undo:!0},done:`${e.id} is back on the board.`})}function Ul({items:e,mark:t}){return n.jsx("ul",{className:"rmlist",children:e.map(s=>n.jsxs("li",{children:[t==="x"?n.jsx(an,{size:16,className:"x","aria-hidden":!0}):t==="hide"?n.jsx(rk,{size:16,className:"hide","aria-hidden":!0}):n.jsx(Ce,{size:16,className:"ok","aria-hidden":!0}),n.jsx("span",{children:s})]},s))})}function r3({t:e,onClose:t,onDeleted:s}){const i=Se(),{toast:o}=qe(),[l,c]=E.useState(!!e.deleting?.remote),u=$e({queryKey:["delete-plan",e.id,l],queryFn:()=>ze(`/api/v1/tickets/${e.id}/delete?remote=${l?1:0}`),placeholderData:Nv}),h=u.data,p=()=>i.mutate({path:`/api/v1/tickets/${e.id}/delete`,body:{remote:l},done:`Deleted ${e.id}. Its cost stays in Usage.`},{onSuccess:m=>{m.notes.length&&o(`${m.notes.join(". ")}.`),t(),s()},onError:()=>void u.refetch()});return n.jsxs(at,{title:`Delete ${e.id}?`,onClose:t,icon:n.jsx("span",{className:"glyph",children:n.jsx(_l,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn danger",disabled:!h||!!h.refused||i.isPending,onClick:p,children:[n.jsx(_l,{size:15})," ",i.isPending?"Stopping the squad and deleting…":h?.unfinished?"Delete again":`Delete ${e.id}`]}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:h?.command??`squad delete ${e.id}`})]}),children:[n.jsx("p",{children:h?.summary??e.title}),u.isError&&n.jsx("div",{className:"stuckbox",children:u.error.message}),h?.refused&&n.jsx("div",{className:"stuckbox",children:h.refused}),h&&!h.refused&&n.jsxs(n.Fragment,{children:[h.unfinished&&n.jsxs("div",{className:"stuckbox rm-gap",children:["The last delete did not finish: ",h.unfinished,". Delete again to finish it. It goes on where it stopped."]}),h.warnings.length>0&&n.jsx("div",{className:"stuckbox rm-gap",children:h.warnings.map(m=>n.jsx("div",{children:m},m))}),n.jsx("div",{className:"lbl",children:"This removes"}),n.jsx(Ul,{items:h.removes,mark:"x"}),n.jsx("div",{className:"lbl",children:"This stays"}),n.jsx(Ul,{items:h.stays,mark:"ok"}),h.pushed&&n.jsxs("label",{className:"talkfirst",children:[n.jsx("input",{type:"checkbox",checked:l,onChange:m=>c(m.target.checked)}),n.jsxs("span",{children:[n.jsxs("b",{children:["Also delete the branch ",h.pushed.branch," on ",h.pushed.remote,"."]})," ",h.pushed.why]})]}),n.jsxs("p",{className:"rm-note",children:["A ticket that is already merged cannot be deleted, because its code is in ",h.base,". Use ",n.jsx("b",{children:"Archive"})," to hide it from the board. Its history stays."]})]})]})}function nT({t:e,onClose:t}){const s=Se(),i=()=>s.mutate({path:`/api/v1/tickets/${e.id}/archive`,done:`Archived ${e.id}. Show archived, at the bottom of the board, shows it again.`},{onSuccess:t});return n.jsxs(at,{title:`Archive ${e.id}?`,onClose:t,icon:n.jsx("span",{className:"glyph",children:n.jsx(Pl,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:i,children:[n.jsx(Pl,{size:15})," Archive ",e.id]}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad archive ${e.id}`})]}),children:[n.jsxs("p",{children:[e.title," · ",e.status]}),n.jsx("div",{className:"lbl",children:"This hides"}),n.jsx(Ul,{items:["The ticket from the board. Show archived, at the bottom of the board, shows it again."],mark:"hide"}),n.jsx("div",{className:"lbl",children:"This stays"}),n.jsx(Ul,{items:["Its code, and its history in git and in .squad/",...e.release&&e.stage!=="done"?[`Its place in release ${e.release}`]:[],"The cost it used, still counted in Usage"],mark:"ok"}),n.jsx("p",{className:"rm-note",children:"Unarchive brings it back to the board, as it was."})]})}function sT({t:e,onDeleted:t}){const[s,i]=E.useState(!1),o=s3(e);if(e.deleting){const l=!!e.deleting.error||Date.now()-Date.parse(e.deleting.at)>9e4;return n.jsxs("div",{className:"stuckbox rm-banner",children:[n.jsxs("span",{className:"grow",children:[n.jsx("b",{children:e.deleting.error?"Delete did not finish.":"Deleting…"})," ",e.deleting.error?`${e.deleting.error}. Delete again to finish it; it goes on where it stopped.`:"The squad stops first, then each part of the ticket goes."]}),l&&n.jsxs("button",{className:"btn sm",onClick:()=>i(!0),children:[n.jsx(_l,{size:13})," Delete again"]}),n.jsx(ye,{text:`squad delete ${e.id}`}),s&&Ch(n.jsx(r3,{t:e,onClose:()=>i(!1),onDeleted:t}))]})}return e.archived?n.jsxs("div",{className:"calm rm-banner",children:[n.jsx("span",{className:"ring",children:n.jsx(Pl,{size:16})}),n.jsxs("div",{className:"grow",children:[n.jsxs("b",{children:["Archived ",Un(e.archived.at)," by ",e.archived.by]}),n.jsx("span",{children:"It is off the board. Its history stays in git and in .squad/."}),n.jsx("div",{className:"rm-cmd",children:n.jsx(ye,{text:`squad archive ${e.id} --undo`})})]}),n.jsxs("button",{className:"btn sm",onClick:o,children:[n.jsx(A2,{size:13})," Unarchive"]})]}):null}function rT({id:e,onClose:t}){const s=Ma(e),i=dc(),[o,l]=E.useState("now");E.useEffect(()=>l("now"),[e]),E.useEffect(()=>{const u=h=>h.key==="Escape"&&!document.querySelector(".modal")&&t();return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[t]);const c=s.data;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"veil",onClick:t}),n.jsx("aside",{className:"drawer","aria-label":c?`${c.id} ${c.title}`:"Ticket",children:c?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"dh",children:[n.jsxs("div",{className:"dtop",children:[n.jsx("span",{className:"idtag",children:c.id}),c.source.type!=="manual"&&(c.source.url?n.jsxs("a",{className:"src",href:c.source.url,target:"_blank",rel:"noreferrer",children:[n.jsx(is,{size:14})," ",c.source.itemType??"Item"," ",c.source.ref," ",n.jsx(mr,{size:12})]}):n.jsxs("span",{className:"src",children:[n.jsx(is,{size:14})," From ",c.source.ref]})),c.pr&&n.jsxs("a",{className:"src",href:c.pr.url,target:"_blank",rel:"noreferrer",children:[n.jsx(ck,{size:14})," Pull request ",c.pr.id," ",n.jsx(mr,{size:12})]}),c.kind==="bug"&&n.jsxs("span",{className:"prio",children:["Bug",c.foundIn?` found in ${c.foundIn}`:""]}),c.priority==="high"&&c.kind!=="bug"&&n.jsx("span",{className:"prio",children:"High priority"}),n.jsx("span",{className:"grow"}),UE(c,i)&&n.jsx(WE,{t:c}),(Ms(c,i)||!i)&&n.jsx(KC,{t:c}),c.waiting?.kind==="proof"&&n.jsx(Ge,{to:"/tickets/$id/proof",params:{id:c.id},className:"iconbtn","aria-label":"Open the proof page",children:n.jsx(mr,{size:15})}),n.jsx("button",{className:"iconbtn",onClick:()=>Jl.open({ticket:c.id}),"aria-label":"Report a problem",title:"Report a problem",children:n.jsx(qh,{size:15})}),n.jsx(tT,{t:c,onDeleted:t}),n.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:n.jsx(an,{size:16})})]}),n.jsx("h2",{children:c.title}),n.jsxs("div",{className:"sub",children:[n.jsxs("span",{children:["Created by ",n.jsx("b",{children:c.createdBy})," ",Un(c.createdAt)," · ",n.jsx("b",{children:c.track==="express"?"Express":"Full"})," track"]}),n.jsxs("span",{children:["Owner ",n.jsx("b",{children:qa(c)}),Ms(c,i)?" (you)":""]}),c.repo&&n.jsxs("span",{children:["Repo ",n.jsx("b",{className:"mono",style:{fontSize:12.5},children:c.repo})]}),c.builder&&n.jsxs("span",{children:["Builder ",n.jsx("b",{children:c.builder})]}),c.reviewer&&n.jsxs("span",{children:["Reviewer ",n.jsx("b",{children:c.reviewer})]})]}),n.jsx($k,{ticket:c})]}),n.jsxs("div",{className:"tabs",role:"tablist",children:[[["now","Now"],["story","Story"],["plan","Plan"],["activity","Activity"],["conversation","Conversation"],["proof","Proof"],["changes","Changes"],["cost","Cost"]].map(([u,h])=>n.jsxs("button",{className:o===u?"on":"",onClick:()=>l(u),children:[h,u==="now"&&(c.waiting||c.outdated?.length||ss(c))&&n.jsx("span",{className:"dot"})]},u)),n.jsxs("button",{className:`dev ${o==="developer"?"on":""}`,onClick:()=>l("developer"),children:[n.jsx(La,{size:15})," Developer"]})]}),o==="now"&&c.outdated?.length?n.jsx(mT,{t:c}):null,o==="now"&&n.jsx(VE,{t:c}),o==="now"&&n.jsx(sT,{t:c,onDeleted:t}),o==="now"&&(Ms(c,i)||!i)&&n.jsx(VC,{t:c}),o==="now"&&(Ms(c,i)||!i?n.jsx(iT,{t:c}):n.jsx(KE,{t:c})),o==="story"&&n.jsx(vT,{t:c}),o==="plan"&&n.jsx(bT,{t:c}),o==="activity"&&n.jsx(jT,{t:c}),o==="conversation"&&n.jsx(NE,{t:c}),o==="proof"&&n.jsx(NT,{t:c}),o==="changes"&&n.jsx(SC,{t:c}),o==="cost"&&n.jsx("div",{className:"db",children:n.jsx(Yx,{t:c})}),o==="developer"&&n.jsx(ST,{t:c})]}):n.jsx("div",{className:"center",children:s.isError?`No ticket ${e}.`:"Loading…"})})]})}function iT({t:e}){if(!e.waiting&&e.quiet)return n.jsx(fT,{t:e});switch(e.waiting?.kind){case"questions":return n.jsx(oT,{t:e});case"spec":case"plan":return n.jsx(cT,{t:e});case"proof":return n.jsx(hT,{t:e});case"stuck":return n.jsx(AC,{t:e,extra:n.jsx(Ua,{t:e})});case"ask":return n.jsx(pT,{t:e});case"yours":return n.jsx(yT,{t:e});case"chat":return e.chat?n.jsx(aT,{t:e}):n.jsx(Eh,{t:e});default:return n.jsx(Eh,{t:e})}}function aT({t:e}){const t=ot[e.chat.with];return n.jsx("div",{className:"db",children:n.jsxs("div",{className:"youbox",children:[n.jsx("span",{className:"ring",children:n.jsx(_a,{size:15})}),n.jsxs("div",{children:[n.jsxs("b",{children:["Talking it through with the ",t]}),n.jsx("span",{children:"The talk is open in the chat panel beside the board. Its work waits until you press a button there."})]}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"btn pri sm",onClick:()=>Pn.show(e.id),children:"Open the chat"}),n.jsx(Ge,{to:"/conversations",search:{ticket:e.id},className:"btn sm",children:"Full screen"})]})})}function oT({t:e}){const t=Se(),[s,i]=E.useState(()=>Object.fromEntries((e.questions??[]).filter(u=>u.answer).map(u=>[u.id,u.answer]))),o=e.questions??[],l=[{from:"analyst",label:"From the Analyst, about what to build"},{from:"architect",label:"From the Architect, about how to build it"}],c=o.every(u=>{const h=s[u.id];return h?h.choice===u.inputOption||h.choice==="Other"?!!h.value?.trim():!0:!1});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"db",children:l.map(u=>{const h=o.filter(p=>p.from===u.from);return h.length?n.jsxs("div",{className:"qblock",children:[n.jsxs("div",{className:"qgroup",children:[n.jsx(Nr,{role:u.from,small:!0}),u.label]}),h.map(p=>n.jsx(lT,{t:e,q:p,n:o.indexOf(p)+1,answer:s[p.id],onAnswer:m=>i(f=>({...f,[p.id]:m}))},p.id))]},u.from):null})}),n.jsxs("div",{className:"df",children:[n.jsxs("button",{className:"btn pri",disabled:!c||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/answers`,body:{answers:s},done:"Answers sent. The Architect is choosing the design."}),children:[n.jsx(jr,{size:15})," Send answers"]}),n.jsx("button",{className:"btn",onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/skip`,done:"The squad made its own guesses. You will see them in the plan."}),children:"Skip, let the squad guess"}),n.jsx(xi,{t:e,agent:"analyst",label:"Talk it through instead"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad answer ${e.id}`})]})]})}function lT({t:e,q:t,n:s,answer:i,onAnswer:o}){const l=Se(),[c,u]=E.useState(!1),[h,p]=E.useState(""),m=()=>{h.trim()&&(l.mutate({path:`/api/v1/tickets/${e.id}/ask`,body:{questionId:t.id,text:h}}),p(""),u(!1))},f=[...t.options,"Other"];return n.jsxs("div",{className:"q",children:[n.jsxs("h4",{children:[s,". ",t.text]}),(t.thread?.length||t.thinking)&&n.jsxs("div",{className:"thread",children:[t.thread?.map((x,y)=>n.jsxs("div",{className:`msg ${x.who==="you"?"":"squad"}`,children:[n.jsx("small",{children:x.who==="you"?"You":Os[x.who]}),x.text]},y)),t.thinking&&n.jsxs("div",{className:"msg squad",children:[n.jsx("small",{children:Os[t.from]}),n.jsxs("span",{className:"typing","aria-label":"Writing a reply",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]})]})]}),n.jsx("div",{className:"choices",children:f.map(x=>{const y=i?.choice===x,k=x===t.inputOption||x==="Other";return n.jsxs("div",{className:`choice ${y?"on":""}`,role:"radio","aria-checked":y,tabIndex:0,onClick:()=>!y&&o({choice:x}),onKeyDown:w=>w.key==="Enter"&&o({choice:x}),children:[n.jsx("span",{className:"rd"}),x==="Other"?"Other":x.replace(/:$/,""),k&&y&&n.jsx("input",{autoFocus:!0,value:i?.value??"",placeholder:x==="Other"?"Your answer":"Which one?",onChange:w=>o({choice:x,value:w.target.value}),onClick:w=>w.stopPropagation()})]},x)})}),c?n.jsxs("div",{className:"askrow",children:[n.jsx("input",{className:"input",autoFocus:!0,value:h,onChange:x=>p(x.target.value),placeholder:`Ask the ${Os[t.from]} about this question`,onKeyDown:x=>x.key==="Enter"&&m()}),n.jsx("button",{className:"btn",onClick:m,disabled:!h.trim(),children:"Ask"})]}):n.jsxs("button",{className:"asklink",onClick:()=>u(!0),disabled:t.thinking,children:[n.jsx(_a,{size:14})," Ask about this"]})]})}function Wl({t:e,review:t}){return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"The story"}),n.jsx(ul,{review:t,at:{part:"story"},children:n.jsx("p",{className:"story",children:e.story})}),e.criteria&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Done when"}),n.jsx("ol",{className:"ac",children:e.criteria.map((s,i)=>n.jsx("li",{children:n.jsx(ul,{review:t,at:{part:"criterion",index:i},children:n.jsxs("span",{children:[n.jsx("em",{children:"Given"})," ",s.given,", ",n.jsx("em",{children:"when"})," ",s.when,", ",n.jsx("em",{children:"then"})," ",s.then,"."]})})},i))})]}),e.decision&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["The Architect's decision ",e.decision.adr&&n.jsxs("span",{className:"pill ok",children:["Saved as ",e.decision.adr]})]}),n.jsx(ul,{review:t,at:{part:"decision"},children:n.jsxs("div",{className:"decision",children:[n.jsxs("h3",{children:[n.jsx(Nr,{role:"architect",small:!0}),e.decision.title]}),n.jsx("div",{className:"opts2",children:e.decision.options.map(s=>n.jsxs("div",{className:`opt2 ${s.chosen?"pick":""}`,children:[n.jsxs("b",{children:[s.name,s.chosen&&n.jsxs("span",{children:[n.jsx(Ce,{size:13,strokeWidth:2.5})," Chosen"]})]}),s.note]},s.name))}),n.jsxs("div",{className:"why",children:[n.jsxs("span",{children:[n.jsx("b",{children:"Why"})," ",e.decision.why]}),e.decision.clientCheck&&n.jsxs("span",{children:[n.jsx("b",{children:"Client's choice"})," ",e.decision.clientCheck]}),e.decision.replaces&&n.jsxs("span",{children:[n.jsx("b",{children:"Replaces"})," ",e.decision.replaces,". Once you approve, it is no longer a rule and later tickets follow this one."]})]})]})})]}),e.work&&e.follows&&e.follows.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Follows saved decisions"}),n.jsx("div",{className:"pills",children:e.follows.map(s=>n.jsx(Ge,{to:"/architecture",search:{adr:s},className:"pill",children:s},s))})]}),e.mockup&&e.work&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"How it will look"}),n.jsx(Np,{ticket:e.id,file:e.mockup,title:`${e.title}: mockup`})]}),e.work&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"The work"}),n.jsxs("div",{className:"pills",children:[n.jsxs("span",{className:"pill",children:[e.work.steps," small steps"]}),n.jsxs("span",{className:"pill",children:[e.work.tests," new tests"]}),e.work.screens>0&&n.jsxs("span",{className:"pill",children:[e.work.screens," before and after screens"]})]})]}),t&&e.work&&e.steps&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Build steps"}),n.jsx("ol",{className:"ac",children:e.steps.map((s,i)=>n.jsx("li",{children:n.jsx(ul,{review:t,at:{part:"step",index:i},children:n.jsx("span",{children:s.title})})},i))})]})]})}function cT({t:e}){const t=Se(),[s,i]=E.useState(null),[o,l]=E.useState(""),[c,u]=E.useState(!1),[h,p]=E.useState([]),m=e.waiting?.kind==="spec",f=!m&&!!e.specApproved,x=m?"the Analyst":f?"the Architect":"the Spec writer",y={t:e,comments:h,add:j=>p(N=>[...N,j]),remove:j=>p(N=>N.filter((S,T)=>T!==j)),canEdit:j=>m?j.part==="story"||j.part==="criterion":j.part==="step"||!f&&(j.part==="story"||j.part==="criterion")},k=()=>s==="over"?t.mutate({path:`/api/v1/tickets/${e.id}/plan/start-over`,body:{direction:o},done:`Starting over. ${x[0].toUpperCase()}${x.slice(1)} writes it again.`}):t.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:o},done:`Sent to ${x}.`}),w=h.length;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[(m||f)&&n.jsxs("div",{className:"twostep",children:[n.jsxs("span",{className:m?"on":"done",children:[m?"1":n.jsx(Ce,{size:12,strokeWidth:3})," The what"]}),n.jsx("span",{className:"bar"}),n.jsx("span",{className:f?"on":"",children:"2 The how"}),n.jsx("p",{children:m?'Is this what you want? Check the story and the "done when" list. The Architect designs how to build it after you approve.':`The spec was approved by ${e.specApproved.by}. Now check how the Architect will build it. A developer can approve this part for you.`})]}),n.jsx(ME,{t:e}),n.jsx("p",{className:"note reviewhint",children:"Point at any part to comment on it or edit it yourself. Send back sends every comment at once."}),m?n.jsx(Wl,{t:{...e,decision:void 0,work:void 0},review:y}):n.jsx(Wl,{t:e,review:y}),!m&&e.decision&&n.jsx("p",{className:"note",style:{marginTop:14},children:"Approved decisions are saved in Decisions. Later tickets must follow them."})]}),s?n.jsxs("div",{className:"df",children:[n.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:o,onChange:j=>l(j.target.value),placeholder:s==="over"?"What is the new direction? It is written again from zero.":"What should change? One line is enough.",onKeyDown:j=>j.key==="Enter"&&o.trim()&&k()}),n.jsx("button",{className:"btn pri",disabled:!o.trim()||t.isPending,onClick:k,children:s==="over"?"Start over":"Send"}),n.jsx("button",{className:"btn",onClick:()=>i(null),children:"Cancel"})]}):n.jsxs("div",{className:"df",children:[w>0?n.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/plan/send-back`,body:{comments:h},done:`Sent back to ${x} with ${w} ${w===1?"comment":"comments"}.`},{onSuccess:()=>p([])}),children:[n.jsx(jr,{size:15})," Send back (",w,")"]}):n.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:m?"Spec approved. The Architect is designing how to build it.":"Plan approved. The Builder started."}),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," ",m?"Approve spec":f?"Approve design":"Approve plan"]}),w===0&&n.jsx("button",{className:"btn",onClick:()=>i("change"),children:"Change something"}),(m||f)&&n.jsx(xi,{t:e,agent:m?"analyst":"architect",label:"Talk it through"}),n.jsx("button",{className:"btn quiet",onClick:()=>i("over"),children:"Start over"}),n.jsx("button",{className:"btn quiet",onClick:()=>u(!0),children:"Ask a developer"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:w>0?`squad send-back ${e.id} ${h.map(j=>tn(`${uT(j)}: ${j.text}`)).join(" ")}`:`squad approve ${e.id}`})]}),c&&n.jsx(dT,{t:e,onClose:()=>u(!1)})]})}function uT(e){return e.part==="criterion"?`done when ${(e.index??0)+1}`:e.part==="step"?`step ${(e.index??0)+1}`:e.part}function dT({t:e,onClose:t}){const{toast:s}=qe(),i=`Hi, can you check the plan for ${e.id} "${e.title}" before I approve it? It's on the board, or run: squad show ${e.id}`;return n.jsxs(at,{title:"Ask a developer",onClose:t,footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",onClick:()=>void navigator.clipboard?.writeText(i).then(()=>s("Message copied")),children:[n.jsx(Vs,{size:15})," Copy message"]}),n.jsx("button",{className:"btn",onClick:t,children:"Close"})]}),children:[n.jsx("p",{children:"Send this to a developer on your team. They can read the plan in the terminal and tell you what they think."}),n.jsx("div",{className:"wa",children:i})]})}function Mp({t:e}){const t=e.gates,s=(i,o)=>n.jsxs("span",{className:`pill ${i==="pass"?"ok":i==="skipped"?"skip":"wait"}`,children:[i==="pass"&&n.jsx(Ce,{size:13,strokeWidth:2.5}),o]});return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pills",children:[s(t?.checks,t?.checks==="skipped"?"Checks failed, you continued":t?.checksText??"All checks pass"),s(t?.review,t?.review==="pass"?`Review approved by ${t.reviewBy}`:t?.review==="skipped"?"Review notes open, you continued":"Review approved"),s(t?.proof,t?.proof==="skipped"?"No screenshots, you continued":"Proof made")]}),e.overrides?.map(i=>n.jsxs("p",{className:"note override",children:[n.jsx("b",{children:"Continued anyway"})," past the ",i.gate==="checks"?"failed checks":i.gate==="proof"?"missing screenshots":"open review",", by ",i.by,": ",i.reason]},i.at))]})}function i3({t:e}){const[t,s]=E.useState(null);if(!e.proof?.length)return n.jsx("p",{className:"note",children:e.gates?.proof==="skipped"||(e.work?.screens??0)>0?"No screenshots were taken for this ticket. See the activity for why.":"No screens change in this ticket, so the passing checks are the proof."});const i=e.proof.flatMap(o=>[{src:zs(`/api/v1/proof/${o.before}`),caption:`${o.criterion} · ${o.beforeLabel}`},{src:zs(`/api/v1/proof/${o.after}`),caption:`${o.criterion} · ${o.afterLabel}`}]);return n.jsxs(n.Fragment,{children:[t!==null&&n.jsx(yi,{pictures:i,start:t,onClose:()=>s(null)}),e.proof.map((o,l)=>n.jsxs("div",{className:"critrow",children:[n.jsxs("h5",{children:[n.jsx(Ce,{size:15,strokeWidth:2.5}),o.criterion]}),n.jsxs("div",{className:"proofmini",children:[n.jsxs("div",{children:[n.jsx("small",{children:o.beforeLabel}),n.jsx("button",{className:"zoom",onClick:()=>s(l*2),"aria-label":`Open ${o.beforeLabel} full size`,children:n.jsx("img",{src:zs(`/api/v1/proof/${o.before}`),alt:`${o.criterion}, ${o.beforeLabel}`})})]}),n.jsxs("div",{children:[n.jsx("small",{children:o.afterLabel}),n.jsx("button",{className:"zoom",onClick:()=>s(l*2+1),"aria-label":`Open ${o.afterLabel} full size`,children:n.jsx("img",{src:zs(`/api/v1/proof/${o.after}`),alt:`${o.criterion}, ${o.afterLabel}`})})]})]})]},o.criterion))]})}function a3({t:e,sticky:t}){const s=Se(),[i,o]=E.useState(!1),[l,c]=E.useState(""),u=()=>s.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:l},done:"Sent back to the Builder with your note."});return i?n.jsxs("div",{className:t?"stickybar":"df",children:[n.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:l,onChange:h=>c(h.target.value),placeholder:"What's wrong? Tell the squad in one line.",onKeyDown:h=>h.key==="Enter"&&l.trim()&&u()}),n.jsx("button",{className:"btn pri",disabled:!l.trim(),onClick:u,children:"Send back"}),n.jsx("button",{className:"btn",onClick:()=>o(!1),children:"Cancel"})]}):n.jsxs("div",{className:t?"stickybar":"df",children:[n.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:`${e.id} is ready to release.`}),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," Looks right"]}),n.jsx("button",{className:"btn",onClick:()=>o(!0),children:"Something's wrong"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad approve ${e.id}`})]})}function hT({t:e}){return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"youbox",children:[n.jsx("span",{className:"ring",children:n.jsx(Ce,{size:18,strokeWidth:2.5})}),n.jsxs("div",{children:[n.jsx("b",{children:"Check that it works the way you want"}),n.jsx("span",{children:'Every gate is green. Compare the screens before and after each "done when".'})]}),n.jsx("span",{className:"grow"}),n.jsxs(Ge,{to:"/tickets/$id/proof",params:{id:e.id},className:"btn sm",children:[n.jsx(mr,{size:14})," Full page"]})]}),n.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),n.jsx(Mp,{t:e}),n.jsx("div",{className:"lbl",children:"Before and after"}),n.jsx(i3,{t:e})]}),n.jsx(a3,{t:e})]})}const $d="Decide yourself: take the simplest choice that fits the plan, and say what you chose";function pT({t:e}){const t=Se(),s=e.agentQuestion,[i,o]=E.useState(null),[l,c]=E.useState("");if(!s)return n.jsx(Eh,{t:e});const u={architect:"Architect",builder:"Builder",reviewer:"Reviewer"}[s.from],h=i===""?l.trim():i,p=[...s.options,$d];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"youbox",children:[n.jsx("span",{className:"ring",children:"?"}),n.jsxs("div",{children:[n.jsxs("b",{children:["The ",u," has a question"]}),n.jsx("span",{children:"It stopped instead of guessing. Your answer goes back into the same conversation, and the work carries on."})]})]}),n.jsxs("div",{className:"lbl",children:[u," asks"]}),n.jsx("p",{className:"stuckq",children:s.text}),s.why&&n.jsxs("p",{className:"note",style:{marginTop:-4},children:["Why it matters: ",s.why]}),s.files&&s.files.length>0&&n.jsx(mC,{ticket:e.id,files:s.files}),n.jsxs("div",{className:"opts2",children:[p.map(m=>n.jsxs("button",{className:`opt2 ${i===m?"pick":""}`,onClick:()=>o(m),children:[n.jsxs("b",{children:[m===$d?"Let it decide":m,i===m&&n.jsxs("span",{children:[n.jsx(Ce,{size:13,strokeWidth:2.5})," Your pick"]})]}),m===$d?"It takes the simplest choice that fits the plan and tells you which.":""]},m)),n.jsx("button",{className:`opt2 ${i===""?"pick":""}`,onClick:()=>o(""),children:n.jsx("b",{children:"Write my own answer"})})]}),i===""&&n.jsx("textarea",{className:"input",rows:3,style:{width:"100%",marginTop:8},autoFocus:!0,value:l,placeholder:"Your answer",onChange:m=>c(m.target.value)}),n.jsx(Ua,{t:e})]}),n.jsxs("div",{className:"df",children:[n.jsxs("button",{className:"btn pri",disabled:!h||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:h},done:`Sent. The ${u} carries on.`}),children:[n.jsx(jr,{size:15})," Send answer"]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad reply ${e.id}${h?` "${h.length>40?`${h.slice(0,40)}…`:h}"`:""}`})]})]})}function fT({t:e}){return n.jsxs("div",{className:"db",children:[n.jsx(YE,{t:e}),e.now&&n.jsx(e3,{t:e}),n.jsx(t3,{t:e}),n.jsx(n3,{t:e})]})}function mT({t:e}){const t=Se(),[s,i]=E.useState(null),[o,l]=E.useState(""),c=!!e.mergedAt||e.stage==="done";return n.jsx("div",{className:"outdated",children:e.outdated.map(u=>n.jsxs("div",{className:"outdated-item",children:[n.jsxs("div",{className:"outdated-head",children:[n.jsx("span",{className:"ic",children:n.jsx(za,{size:15})}),n.jsxs("b",{children:[n.jsx(Ge,{to:"/architecture",search:{adr:u.adr},children:u.adr})," came after this plan and changes it"]})]}),n.jsx("p",{children:u.why}),n.jsxs("p",{children:[n.jsx("span",{className:"note",children:c?"What a follow-up would change:":"What would change:"})," ",u.change]}),s===u.adr?n.jsxs("div",{className:"row",children:[n.jsx("input",{className:"input",autoFocus:!0,value:o,onChange:h=>l(h.target.value),placeholder:"Why the plan stays as it is"}),n.jsx("button",{className:"btn sm",disabled:!o.trim()||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:u.adr,do:"keep",reason:o},done:"Kept the plan. The reason is on the ticket."},{onSuccess:()=>i(null)}),children:"Keep it"}),n.jsx("button",{className:"btn sm quiet",onClick:()=>i(null),children:"Cancel"})]}):n.jsxs("div",{className:"row",children:[n.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:u.adr,do:"update"},done:c?"Made a follow-up ticket.":"The Architect is updating the plan."}),children:c?"Make a follow-up ticket":"Update the plan"}),n.jsx("button",{className:"btn sm",onClick:()=>{i(u.adr),l("")},children:"Keep it as is"})]})]},u.adr))})}function gT({t:e}){const t=Se(),s=e.localSetup,i=s.status==="pending"||s.status==="running";return n.jsxs("div",{className:`localsetup ${s.status}`,children:[n.jsx("span",{className:"ic",children:i?n.jsx(In,{size:15,className:"spin"}):s.status==="done"?n.jsx(Ce,{size:15,strokeWidth:2.5}):n.jsx(za,{size:15})}),n.jsxs("div",{children:[n.jsx("b",{children:i?"Updating your copy of the code":s.status==="done"?"Your copy of the code is ready to run":"Your copy of the code needs a hand"}),n.jsx("span",{children:i?"The merge changed your own folder, so the squad installs new packages and runs the database changes there.":s.status==="done"?`New packages and database changes are in your own folder${s.at?`, ${Un(s.at)}`:""}${s.seconds!==void 0?` (${s.seconds} s)`:""}.`:"The setup stopped in your own folder. Run it there, or try again."}),n.jsx("code",{children:s.command}),s.status==="failed"&&s.output&&n.jsx("pre",{children:s.output})]}),s.status==="failed"&&n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/local-setup`,done:"Running the setup again"}),children:"Try again"})]})}function Eh({t:e}){const t=Se(),s=e.stage==="release"?{title:`Ready for ${e.release}`,text:"It goes out with the next release. Nothing needed from you until then."}:e.stage==="done"?{title:e.status,text:"This ticket is live. Found a problem? Report a bug and it comes back around."}:e.waiting?.kind==="change"?{title:"The Builder paused for your change",text:"The Architect updated the design. Approve it above, or decline the change and the Builder carries on."}:{title:"Nothing needed from you",text:`${xT(e)} You'll get a card when the squad needs you.`},i=Xx(e);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[i?n.jsx(e3,{t:e}):n.jsxs("div",{className:"calm",children:[n.jsx("span",{className:"ring",children:e.stage==="release"?n.jsx(Ds,{size:18}):n.jsx(Ce,{size:18,strokeWidth:2.5})}),n.jsxs("div",{children:[n.jsx("b",{children:s.title}),n.jsx("span",{children:s.text})]}),e.stage==="release"&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"grow",style:{flex:1}}),n.jsx(Ge,{to:"/releases",className:"btn sm",children:"Open release"})]})]}),e.localSetup&&n.jsx(gT,{t:e}),e.steps&&e.steps.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Steps"}),n.jsx(o3,{t:e})]}),e.gates&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),n.jsx(Mp,{t:e})]}),(e.stage==="release"||e.stage==="done")&&e.usage?.length?n.jsx(Yx,{t:e}):null,i?n.jsx(t3,{t:e}):n.jsx(Ua,{t:e}),n.jsx(n3,{t:e})]}),n.jsxs("div",{className:"df",children:[e.live&&e.stage!=="release"&&e.stage!=="done"&&n.jsxs("button",{className:"btn sm",disabled:e.stopRequested||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping the squad"}),children:[n.jsx(ui,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]}),Rp(e)&&n.jsx(Ap,{t:e}),e.chat?.open?n.jsxs("button",{className:"btn sm",onClick:()=>Pn.show(e.id),children:[n.jsx(_a,{size:13})," Open the chat"]}):!e.takenOver&&n.jsx(xi,{t:e,agent:"analyst",label:wr(e)?"Ask a question":"Ask the Analyst"}),n.jsx("span",{className:"note",children:e.live?"Updates live as the squad works.":""}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:e.live&&e.stage!=="release"?`squad stop ${e.id}`:Hh(e)})]})]})}function yT({t:e}){const t=Se(),[s,i]=E.useState(""),o=e.takenOver;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"db",children:[n.jsxs("div",{className:"youbox",children:[n.jsx("span",{className:"ring",children:n.jsx(La,{size:15})}),n.jsxs("div",{children:[n.jsx("b",{children:"You have this ticket"}),n.jsx("span",{children:"The squad stopped and waits. Nothing runs until you give it back."})]})]}),n.jsx("div",{className:"lbl",children:"1. Open the Builder's session in Claude Code"}),n.jsx(ye,{text:`cd "${o.cwd}" && claude --resume ${o.session}`}),n.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:"It is the same conversation the Builder had, in the ticket's own copy of the code. Your folder is not touched. Or just edit the files:"}),n.jsx(lc,{t:e}),n.jsx("div",{className:"lbl",children:"2. Give it back"}),n.jsx("textarea",{className:"waynote",rows:2,value:s,onChange:l=>i(l.target.value),placeholder:"What did you change? (optional, every agent reads it)"}),n.jsx("p",{className:"note",style:{fontSize:12.5},children:"Then squad-kit runs the checks, the Reviewer reads all the changes, yours too, and the Tester makes the proof again."}),n.jsx(Ua,{t:e})]}),n.jsxs("div",{className:"df",children:[n.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/give-back`,body:{note:s},done:"Given back. The checks run on your changes."}),children:[n.jsx(Ce,{size:15,strokeWidth:2.5})," Give back"]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad give-back ${e.id}${s.trim()?` "${s.trim()}"`:""}`})]})]})}function xT(e){const t=e.steps??[],s=t.findIndex(i=>i.status==="doing");return e.stage==="implement"&&s>=0?`The Builder is on step ${s+1} of ${t.length}.`:e.stage==="test"?"squad-kit is running the project checks.":e.stage==="review"?"The Reviewer is checking the work.":e.stage==="tickets"?"The Analyst is reading the ticket.":e.stage==="specs"?"The Architect is writing the plan.":`${e.status}.`}function o3({t:e}){return n.jsx("ul",{className:"steps",children:e.steps.map((t,s)=>n.jsxs("li",{className:t.status==="doing"?"now":t.status==="todo"?"todo":"",children:[n.jsx("span",{className:`sd ${t.status==="done"?"ok":t.status==="doing"?"now":""}`,children:t.status==="done"&&n.jsx(Ce,{size:11,strokeWidth:3})}),n.jsxs("span",{children:[t.status==="doing"?n.jsx("b",{style:{fontWeight:600},children:t.title}):t.title,t.live&&n.jsxs("span",{className:"livetxt",children:[n.jsx("span",{className:"live"}),t.live]})]}),n.jsx("span",{className:"time",children:t.status==="done"?`${t.minutes??1} min`:t.status==="doing"?"now":""})]},s))})}function Ua({t:e,all:t}){const s=t?e.activity:e.activity.slice(0,4);return s.length?n.jsxs(n.Fragment,{children:[!t&&n.jsx("div",{className:"lbl",children:"Latest activity"}),n.jsx("div",{className:"feed",children:s.map((i,o)=>n.jsxs("div",{className:"fe",children:[n.jsx("span",{className:"tm",children:Bs(i.at)}),n.jsx(Nr,{role:i.who,small:!0}),n.jsxs("span",{children:[n.jsx("b",{children:Os[i.who]})," ",i.text.charAt(0).toLowerCase()+i.text.slice(1)]})]},i.at+o))})]}):null}function vT({t:e}){return n.jsxs("div",{className:"db",children:[n.jsx("div",{className:"lbl",children:"What was asked"}),n.jsx("p",{className:"story",style:{whiteSpace:"pre-wrap"},children:e.ask}),n.jsx(Dd,{head:"Your acceptance criteria",items:e.brief?.criteria}),n.jsx(Dd,{head:"Business rules",items:e.brief?.rules}),n.jsx(Dd,{head:"Edge cases",items:e.brief?.edgeCases}),n.jsx(wT,{t:e}),n.jsx(kT,{t:e}),n.jsx(GC,{t:e}),e.story?n.jsx(Wl,{t:{...e,decision:void 0,work:void 0}}):n.jsx("p",{className:"note",style:{marginTop:16},children:"The Analyst writes the user story after your answers."})]})}const Od=[{kind:"note",label:"Note",head:"Note",hint:"Anything the squad should know"},{kind:"rule",label:"Business rule",head:"Rule",hint:"For example: at most 3 bookings a day per person"},{kind:"criterion",label:"Acceptance criterion",head:"Done when",hint:"The Tester must prove it, for example: the clerk sees an error on the 4th booking"}];function kT({t:e}){const t=Se(),[s,i]=E.useState("note"),[o,l]=E.useState(""),c=e.notes??[],u=e.stage!=="done",h=Od.find(m=>m.kind===s),p=()=>t.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:o,kind:s},done:e.live?"Added. The squad reads it at its next step.":"Added. Every agent on this ticket reads it."},{onSuccess:()=>l("")});return!u&&!c.length?null:n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["Notes",c.length?` · ${c.length}`:""]}),c.length>0&&n.jsx("ul",{className:"ticketnotes",children:c.map((m,f)=>n.jsxs("li",{children:[n.jsx("span",{className:`pill ${m.kind==="criterion"?"ok":m.kind==="rule"?"wait":""}`,children:Od.find(x=>x.kind===m.kind)?.head}),n.jsx("span",{className:"grow",children:m.text}),n.jsxs("span",{className:"note",children:[m.by," · ",Un(m.at)]})]},f))}),u&&n.jsxs("div",{className:"addnote",children:[n.jsx("div",{className:"seg",style:{width:"fit-content"},children:Od.map(m=>n.jsx("button",{className:s===m.kind?"on":"",onClick:()=>i(m.kind),children:m.label},m.kind))}),n.jsx("textarea",{className:"input",rows:2,value:o,placeholder:h.hint,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.metaKey||m.ctrlKey)&&o.trim()&&p()}}),n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[n.jsxs("button",{className:"btn pri sm",disabled:!o.trim()||t.isPending,onClick:p,children:["Add ",h.label.toLowerCase()]}),n.jsxs("span",{className:"note",children:["Every agent on this ticket reads it",e.live?", the one working now from its next step":"","."]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad note ${e.id}${s==="note"?"":` --${s}`} "${o.trim()||"…"}"`})]})]})]})}function Dd({head:e,items:t}){return t?.length?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:e}),n.jsx("ul",{className:"brief",children:t.map((s,i)=>n.jsx("li",{children:s},i))})]}):null}const Mg=/\.(png|jpe?g|gif|webp|bmp)$/i;function wT({t:e}){const[t,s]=E.useState(null),i=e.attachments??[];if(!i.length)return null;const o=u=>u.split(/[\\/]/).pop()??u,l=i.filter(u=>Mg.test(u)).map(u=>({src:nn(e.id,u),caption:o(u)})),c=i.filter(u=>!Mg.test(u));return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"lbl",children:["Attached · ",i.length]}),l.length>0&&n.jsx("div",{className:"thumbs",children:l.map((u,h)=>n.jsx("button",{className:"zoom thumb",onClick:()=>s(h),"aria-label":`Open ${u.caption} full size`,children:n.jsx("img",{src:u.src,alt:u.caption,loading:"lazy"})},u.src))}),c.map(u=>n.jsx("a",{className:"filechip mono",href:nn(e.id,u),target:"_blank",rel:"noreferrer",children:o(u)},u)),t!==null&&n.jsx(yi,{pictures:l,start:t,onClose:()=>s(null)})]})}function bT({t:e}){return e.story?n.jsxs("div",{className:"db",children:[n.jsx(Wl,{t:e}),e.steps&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Steps"}),n.jsx(o3,{t:e})]})]}):n.jsx("div",{className:"db",children:n.jsx("p",{className:"note",children:"The plan is written after the questions are answered."})})}function jT({t:e}){return n.jsx("div",{className:"db",children:n.jsx(Ua,{t:e,all:!0})})}function NT({t:e}){return e.gates?n.jsxs("div",{className:"db",children:[n.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),n.jsx(Mp,{t:e}),n.jsx("div",{className:"lbl",children:"Before and after"}),e.gates.proof==="pass"?n.jsx(i3,{t:e}):n.jsx("p",{className:"note",children:"The screens are recorded after all checks pass."})]}):n.jsx("div",{className:"db",children:n.jsx("p",{className:"note",children:"The Tester records the proof after the Builder finishes."})})}function ST({t:e}){const t=E.useMemo(()=>{const s=new Set,i=[...e.activity.map(o=>o.text),...(e.steps??[]).map(o=>o.live??"")];for(const o of i)for(const l of o.matchAll(/[\w./-]+\/[\w.-]+\.\w+/g))s.add(l[0]);return[...s]},[e]);return n.jsxs("div",{className:"db",children:[n.jsx(IC,{t:e}),n.jsx("div",{className:"lbl",children:"Branch"}),n.jsxs("p",{className:"mono",style:{fontSize:13},children:[e.repo?`${e.repo}: `:"",e.branch??`squad/${e.id.toLowerCase()}`]}),e.worktree&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"The ticket's copy of the code"}),n.jsx("p",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:e.worktree}),n.jsx(lc,{t:e})]}),n.jsx("div",{className:"lbl",children:"Files the squad touched"}),t.length?n.jsx("div",{className:"feed",children:t.map(s=>n.jsx("div",{className:"mono",style:{fontSize:12.5},children:s},s))}):n.jsx("p",{className:"note",children:"No files changed yet."}),n.jsx("div",{className:"lbl",children:"In the terminal"}),n.jsxs("div",{className:"pills",children:[n.jsx(ye,{text:`squad show ${e.id}`}),n.jsx(ye,{text:`squad watch ${e.id}`})]})]})}const CT=[{stage:"tickets",role:"analyst",who:"Analyst"},{stage:"specs",role:"architect",who:"Architect"},{stage:"implement",role:"builder",who:"Builder"},{stage:"test",role:"tester",who:"Tester"},{stage:"review",role:"reviewer",who:"Reviewer"},{stage:"release",role:"release",who:"Release"},{stage:"bugs",role:"triage",who:"Triage"}];function ET(){const e=Ct(),t=Ia({from:"/board"}),s=Hs({from:"/board"}),[i,o]=E.useState(null),[l,c]=E.useState(""),[u,h]=E.useState(!1),p=$e({queryKey:["ticket-draft-current"],queryFn:()=>ze("/api/v1/tickets/draft/current"),enabled:i!=="new",refetchInterval:S=>S.state.data?.draft?.status==="working"?2e3:3e4}),m={working:"drafting…",done:"draft ready",failed:"draft stopped",cancelled:""}[p.data?.draft?.status??"cancelled"],f=t.view??"all",x=S=>void s({search:T=>({...T,ticket:S})}),y=()=>void s({search:S=>({...S,ticket:void 0})}),k=e.data?.ready?e.data:null,w=E.useMemo(()=>{const S=[...k?.tickets??[],...u?k?.archived??[]:[]],T=l.trim().toLowerCase();return S.filter(A=>f==="bugs"&&A.kind!=="bug"||f==="mine"&&!Ms(A,k?.meta.user?.name)?!1:!T||A.title.toLowerCase().includes(T)||A.id.toLowerCase().includes(T))},[k,l,f,u]);if(e.isLoading)return n.jsx("div",{className:"center",children:"Loading the board…"});if(!k)return n.jsx(AT,{});const j=k.meta.engine==="live"&&!!(k.meta.scan&&k.meta.scan.status!=="done"),N=k.tickets.filter(ec);return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Board"}),n.jsx("div",{className:"seg",role:"tablist",children:["all","mine","bugs"].map(S=>n.jsx("button",{className:f===S?"on":"",onClick:()=>void s({search:T=>({...T,view:S==="all"?void 0:S})}),children:S==="all"?"All tickets":S==="mine"?"Mine":"Bugs"},S))}),n.jsx("span",{className:"grow"}),n.jsxs("label",{className:"search",children:[n.jsx(fi,{size:15}),n.jsx("input",{value:l,onChange:S=>c(S.target.value),placeholder:"Search tickets","aria-label":"Search tickets"})]}),n.jsx(PT,{onPull:()=>o("pull")}),n.jsxs("button",{className:"btn pri",onClick:()=>o("new"),children:[n.jsx(Rn,{size:15})," New ticket",m&&n.jsx("span",{className:"btn-tag",children:m})]})]}),(j||N.length===0)&&n.jsxs("section",{className:"waiting","aria-label":"Waiting for you",children:[n.jsxs("div",{className:"wh",children:[n.jsx("h2",{children:"Waiting for you"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad inbox"})]}),j?n.jsx(RT,{meta:k.meta}):k.meta.engine==="live"&&k.tickets.length===0?n.jsxs("div",{className:"calmlane",children:[n.jsx("span",{className:"glyph",children:n.jsx(Rn,{size:14,strokeWidth:2.5})}),n.jsxs("span",{children:[n.jsx("b",{children:"Start with your first ticket."})," Write what you want in plain words. The squad asks what it needs to know."]}),n.jsx("span",{className:"grow",style:{flex:1}}),n.jsxs("button",{className:"btn pri sm",onClick:()=>o("new"),children:[n.jsx(Rn,{size:14})," New ticket"]})]}):n.jsxs("div",{className:"calmlane",children:[n.jsx("span",{className:"glyph",children:n.jsx(Ce,{size:14,strokeWidth:2.5})}),n.jsxs("span",{children:[n.jsx("b",{children:"Nothing needs you right now."})," The squad is working. New questions and approvals show up at the top of every page."]})]})]}),n.jsx("div",{className:"board",children:CT.map(S=>{const T=w.filter(A=>A.stage===S.stage);return n.jsxs("section",{className:"lane","aria-label":qs[S.stage],children:[n.jsxs("div",{className:"lh",children:[n.jsx(Nr,{role:S.role}),n.jsxs("span",{className:"t",children:[n.jsx("b",{children:qs[S.stage]}),n.jsx("small",{children:S.who})]}),n.jsx("span",{className:"n",children:T.length})]}),T.map(A=>n.jsx(TT,{t:A,selected:t.ticket===A.id,onOpen:()=>x(A.id)},A.id)),T.length===0&&n.jsx("div",{className:"empty-lane",children:"Nothing here"})]},S.stage)})}),n.jsxs("div",{className:"foot",children:[n.jsxs("span",{children:["Last 30 days ",n.jsxs("b",{children:[k.stats.released30," tickets released"]})]}),n.jsxs("span",{children:[n.jsx("b",{children:k.stats.bugs30})," ",k.stats.bugs30===1?"bug":"bugs"," found after release"]}),n.jsxs("span",{children:[n.jsx("b",{children:k.stats.open})," open tickets"]}),n.jsx(BE,{}),n.jsx("span",{className:"grow"}),(k.archived?.length??0)>0&&n.jsx("button",{className:"btn sm quiet",title:"squad board --archived",onClick:()=>h(!u),children:u?"Hide archived":`Show archived (${k.archived.length})`}),n.jsx("button",{className:"btn sm quiet",onClick:()=>o("bug"),children:"Report a bug"})]}),t.ticket&&n.jsx(rT,{id:t.ticket,onClose:y}),i==="new"&&n.jsx(_C,{onClose:()=>o(null),onCreated:S=>x(S.id)}),i==="pull"&&n.jsx(BC,{onClose:()=>o(null),onCreated:S=>x(S.id)}),i==="bug"&&n.jsx(Tp,{onClose:()=>o(null)})]})}function TT({t:e,selected:t,onOpen:s}){const i=!!e.waiting||e.quiet?.kind==="stuck"||ss(e),o=dc();return n.jsxs("button",{className:`card ${i?"you":""} ${e.kind==="bug"?"bug":""} ${t?"sel":""}`,onClick:s,children:[n.jsxs("div",{className:"row1",children:[n.jsx("span",{className:"id",children:e.id}),e.track==="express"&&n.jsx("span",{className:"prio express",children:"Express"}),i?n.jsx("span",{className:"youtag",children:"You"}):e.kind==="bug"?n.jsx("span",{className:"prio",children:"Bug"}):e.priority==="high"?n.jsx("span",{className:"prio",children:"High"}):null,o&&!Ms(e,o)&&n.jsx("span",{className:"prio owner",title:"Their squad works on it",children:qa(e)}),e.archived&&n.jsx("span",{className:"prio owner",children:"Archived"})]}),n.jsx("h4",{children:e.title}),Xx(e)&&!i?n.jsx(GE,{t:e}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"st",children:[e.live&&!i?n.jsx("span",{className:"live"}):e.stage==="release"?n.jsx(Ce,{size:13,strokeWidth:2.5}):null,n.jsx("span",{children:e.quiet?e.quiet.kind==="stuck"?`Looks stuck: ${e.quiet.command??"no progress"}`:`Taking long: ${e.quiet.command??e.status}`:e.status})]}),typeof e.progress=="number"&&!i&&n.jsx("div",{className:"bar",children:n.jsx("i",{style:{width:`${e.progress}%`}})})]})]})}function PT({onPull:e}){const s=$e({queryKey:["tracker"],queryFn:()=>ze("/api/v1/tracker"),refetchInterval:6e4}).data;return s?s.type==="none"?n.jsxs(Ge,{to:"/settings",className:"btn",children:[n.jsx(is,{size:15})," Connect a tracker"]}):n.jsxs("button",{className:"btn",onClick:e,children:[n.jsx(is,{size:15})," Pull from ",s.label??"the tracker"]}):null}function RT({meta:e}){const t=Se(),s=e.scan,i=s.status==="failed",o=e.tools.find(c=>c.ready),l=[{label:"Project files and board",state:"done",note:".squad/ in this folder"},o?{label:`${o.name} is ready`,state:"done",note:"The squad works with it"}:{label:"An AI tool",state:"fail",note:"Install Claude Code and sign in once, then press Try again"},{label:"The Architect reads the project",state:i?"fail":s.status==="running"?"now":"todo",note:i?s.error:s.status==="running"?s.now??"Starting…":"Starts in a moment"},{label:"Ready for your first ticket",state:"todo",note:"Write it, or pull it from your tracker"}];return n.jsxs("div",{className:"setup",children:[n.jsxs("div",{className:"setup-head",children:[n.jsx("b",{children:i?"The Architect could not read the project.":"Setting up your project"}),n.jsx("span",{children:i?"Fix what the step below says, then try again. Nothing was lost: your project files are as they were.":"The Architect maps the project and finds how to test and run it. This takes a few minutes."}),i&&n.jsxs("span",{className:"drafterr-ways",children:[n.jsx("button",{className:"btn sm pri",onClick:()=>t.mutate({path:"/api/v1/scan",done:"Reading the project again"}),children:"Try again"}),n.jsx(cc,{small:!0})]})]}),n.jsx("ol",{className:"setup-steps",children:l.map(c=>n.jsxs("li",{className:c.state,children:[n.jsx("span",{className:"mark",children:c.state==="done"?n.jsx(Ce,{size:12,strokeWidth:3}):c.state==="fail"?"!":c.state==="now"?n.jsx("span",{className:"live"}):null}),n.jsxs("span",{className:"txt",children:[n.jsx("b",{children:c.label}),c.note&&n.jsx("small",{title:c.note,children:c.note})]})]},c.label))}),!i&&n.jsx("div",{className:"setup-bar","aria-hidden":!0,children:n.jsx("i",{})})]})}function AT(){return n.jsx("div",{className:"center",children:n.jsxs("div",{children:[n.jsx("h2",{children:"No board yet"}),n.jsx("p",{children:"Run this in the terminal to open a sample board where the squad works on its own:"}),n.jsx("p",{style:{marginTop:12},children:n.jsx(ye,{text:"squad demo"})})]})})}function IT(){const{id:e}=Dh({from:"/tickets/$id/proof"}),t=Ma(e),[s,i]=E.useState(0),[o,l]=E.useState(null),c=t.data;if(!c)return n.jsx("div",{className:"center",children:t.isError?`No ticket ${e}.`:"Loading…"});const u=c.proof??[],h=u[Math.min(s,u.length-1)],p=c.waiting?.kind==="proof",m=c.gates,f=u.flatMap(y=>[{src:zs(`/api/v1/proof/${y.before}`),caption:`${y.criterion} · ${y.beforeLabel}`},{src:zs(`/api/v1/proof/${y.after}`),caption:`${y.criterion} · ${y.afterLabel}`}]),x=Math.min(s,u.length-1)*2;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"top",children:n.jsxs("span",{className:"crumbs",children:[n.jsx(Ge,{to:"/inbox",children:"Waiting for you"})," /",n.jsxs(Ge,{to:"/board",search:{ticket:c.id},children:[c.id," ",c.title]})," ","/ ",n.jsx("b",{children:"Proof"})]})}),n.jsxs("div",{className:"gatebar",children:[n.jsx(Bd,{state:m?.checks,text:m?.checks==="skipped"?"Checks failed, you continued":m?.checksText??"All checks pass"}),n.jsx(Bd,{state:m?.review,text:m?.review==="skipped"?"Review notes open, you continued":`Review approved${m?.reviewBy?` by ${m.reviewBy}`:""}`}),n.jsx(Bd,{state:m?.proof,text:m?.proof==="skipped"?"No screenshots, you continued":"Proof made"}),n.jsx("span",{style:{marginLeft:6},children:"Nothing ships without these three."})]}),n.jsxs("div",{className:"split",children:[n.jsxs("div",{className:"critlist",children:[n.jsxs("div",{className:"lbl",style:{marginTop:0},children:["Done when · ",u.length]}),u.map((y,k)=>n.jsxs("button",{className:`crit ${k===s?"on":""}`,onClick:()=>i(k),children:[n.jsx(Ce,{size:15,strokeWidth:2.5}),n.jsx("span",{children:y.criterion})]},y.criterion)),u.length===0&&n.jsx("p",{className:"note",children:m?.proof==="skipped"||(c.work?.screens??0)>0?"No screenshots were taken for this ticket. See the activity for why.":"No screens change in this ticket, so the passing checks are the proof."})]}),n.jsx("div",{className:"stage",children:h?n.jsxs(n.Fragment,{children:[n.jsx("h3",{children:h.criterion}),n.jsxs("div",{className:"ba",children:[n.jsxs("div",{children:[n.jsx("div",{className:"cap",children:n.jsx("span",{children:h.beforeLabel})}),n.jsx("button",{className:"zoom",onClick:()=>l(x),"aria-label":`Open ${h.beforeLabel} full size`,children:n.jsx("img",{src:zs(`/api/v1/proof/${h.before}`),alt:`${h.criterion}, ${h.beforeLabel}`})})]}),n.jsxs("div",{children:[n.jsx("div",{className:"cap",children:n.jsx("span",{children:h.afterLabel})}),n.jsx("button",{className:"zoom",onClick:()=>l(x+1),"aria-label":`Open ${h.afterLabel} full size`,children:n.jsx("img",{src:zs(`/api/v1/proof/${h.after}`),alt:`${h.criterion}, ${h.afterLabel}`})})]})]}),h.note&&n.jsx("p",{className:"note",children:h.note})]}):n.jsx("p",{className:"note",children:"Nothing to compare."})})]}),o!==null&&n.jsx(yi,{pictures:f,start:o,onClose:()=>l(null)}),p?n.jsx(a3,{t:c,sticky:!0}):n.jsx("div",{className:"stickybar",children:n.jsx("span",{className:"note",children:c.status})})]})}function Bd({state:e,text:t}){return n.jsxs("span",{className:`pill ${e==="pass"?"ok":e==="skipped"?"skip":"wait"}`,children:[e==="pass"&&n.jsx(Ce,{size:13,strokeWidth:2.5}),t]})}function LT(){const e=Lk(),t=Ct(),[s,i]=E.useState(null),[o,l]=E.useState(null),c=e.data??[],u=c.find(p=>p.version===s)??c.find(p=>p.status==="draft")??c[0],h=t.data?.ready?t.data.meta.engine==="demo":!1;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Releases"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad release"})]}),n.jsxs("div",{className:"split",children:[n.jsx("div",{className:"listcol",children:c.map(p=>n.jsxs("button",{className:`litem ${u?.version===p.version?p.status==="draft"?"on":"on plain":""}`,onClick:()=>i(p.version),children:[n.jsxs("b",{children:[p.version,p.status==="draft"?n.jsx("span",{className:"youtag",children:p.items.length?"Ready":"Empty"}):p.bugs?.length?n.jsxs("span",{className:"prio",children:[p.bugs.length," ",p.bugs.length===1?"bug":"bugs"]}):null]}),p.status==="draft"?"Next release":p.unpushed?.length?"Not pushed yet":Sr(p.date)," · ",p.items.length," tickets"]},p.version))}),u?n.jsx(_T,{r:u,onReleased:l}):n.jsx("div",{className:"center",children:"No releases yet."})]}),o&&n.jsx(qC,{release:o,demo:h,onClose:()=>l(null)})]})}function _T({r:e,onReleased:t}){const s=Se(),[i,o]=E.useState(!1),[l,c]=E.useState(e.notes),[u,h]=E.useState(!1),[p,m]=E.useState(!1);E.useEffect(()=>{i||c(e.notes)},[e.notes,i]);const f=e.status==="draft",x=e.unpushed??[],y=e.version.endsWith(".0")?"New features, nothing breaks for users.":"Fixes only, nothing new to learn.";return n.jsxs("div",{className:"detail",children:[n.jsx("h2",{style:{fontSize:24,fontStretch:"88%"},children:f?`Release ${e.version}`:e.version}),n.jsx("p",{className:"note",style:{marginTop:2},children:f?"The squad prepared this release. Read it, edit the notes if you like, then release.":`Released ${Sr(e.date)}`}),x.length>0&&n.jsxs("div",{className:"box",style:{marginTop:10,color:"var(--you-ink)"},children:[n.jsx("b",{children:"Not pushed yet."})," The release is made on this computer, but it did not reach the remote, so its tickets stay open.",x.map(k=>n.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[k.repo==="."?"project":k.repo,": ",k.base," → ",k.remote,": ",k.error]},k.repo)),n.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:10},children:[n.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/releases/${e.version}/push`},{onSuccess:k=>k.unpushed?.length?void 0:t(k)}),children:[n.jsx(pa,{size:15})," Push again"]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad release ${e.version} --push-again`})]})]}),n.jsx("div",{className:"lbl",children:"What's inside"}),e.items.map(k=>n.jsxs("div",{className:"trow",children:[n.jsx("span",{className:"mono",children:k.id}),n.jsx("b",{children:k.title}),k.gates?n.jsxs("span",{className:"pill ok",children:[n.jsx(Ce,{size:13,strokeWidth:2.5})," Checks, review, proof"]}):n.jsx("span",{})]},k.id)),e.items.length===0&&n.jsx("p",{className:"note",children:"No tickets yet. Tickets join after you check their proof."}),!f&&e.bugs&&e.bugs.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Bugs found after this release"}),e.bugs.map(k=>n.jsxs("div",{className:"trow",children:[n.jsx("span",{className:"mono",children:k}),n.jsx(Ge,{to:"/board",search:{ticket:k},children:n.jsx("b",{children:"Open the bug"})}),n.jsx("span",{})]},k))]}),n.jsxs("div",{className:"grid2",children:[n.jsxs("div",{children:[n.jsx("div",{className:"lbl",children:"Version"}),n.jsxs("div",{className:"ver",children:[n.jsx("span",{className:"from",children:e.from.replace(/^v/,"")}),n.jsx(X6,{size:20}),n.jsx("span",{children:e.version.replace(/^v/,"")})]}),n.jsx("p",{className:"note",style:{marginTop:4},children:y}),n.jsx("div",{className:"lbl",children:f||!e.log?"Also":"What the release did"}),!f&&e.log?e.log.map(k=>n.jsxs("div",{className:"checkrow",style:k.ok?void 0:{color:"var(--you-ink)"},children:[n.jsx("span",{className:`cbx ${k.ok?"on":""}`,children:k.ok?n.jsx(Ce,{size:11,strokeWidth:3}):"!"}),k.text]},k.text)):[["changelog","Update the changelog"],["tag",`Tag ${e.version} in git`],["pipeline","Run the pipeline"],["whatsapp","Draft a WhatsApp note for my manager"]].map(([k,w])=>n.jsxs("div",{className:"checkrow",children:[n.jsx("span",{className:`cbx ${e.addons[k]?"on":""}`,children:e.addons[k]&&n.jsx(Ce,{size:11,strokeWidth:3})}),w]},k))]}),n.jsxs("div",{children:[n.jsxs("div",{className:"lbl",children:["Release notes",f&&", written by the squad",n.jsx("span",{className:"grow",style:{flex:1}}),f&&!i&&n.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[n.jsx(Sa,{size:13})," Edit"]})]}),i?n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"textarea mono",style:{minHeight:180,fontSize:13},value:l,onChange:k=>c(k.target.value)}),n.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[n.jsx("button",{className:"btn sm pri",onClick:()=>s.mutate({path:`/api/v1/releases/${e.version}/notes`,method:"PUT",body:{notes:l},done:"Notes saved"},{onSuccess:()=>o(!1)}),children:"Save notes"}),n.jsx("button",{className:"btn sm",onClick:()=>o(!1),children:"Cancel"})]})]}):n.jsx(Ok,{notes:e.notes})]})]}),n.jsx("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:26},children:f?n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:e.items.length===0,onClick:()=>h(!0),children:[n.jsx(pa,{size:15})," Release ",e.version]}),n.jsx("span",{className:"note",children:"You'll be asked once to confirm."})]}):n.jsxs("button",{className:"btn",onClick:()=>m(!0),children:["Report a bug in ",e.version]})}),u&&n.jsxs(at,{title:`Release ${e.version}?`,onClose:()=>h(!1),icon:n.jsx("span",{className:"glyph",children:n.jsx(pa,{size:15})}),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/releases/${e.version}/release`},{onSuccess:k=>{h(!1),t(k)}}),children:[n.jsx(pa,{size:15})," Yes, release it"]}),n.jsx("button",{className:"btn",onClick:()=>h(!1),children:"Not yet"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad release ${e.version}`})]}),children:[n.jsxs("p",{children:[e.items.length," tickets go live: ",e.items.map(k=>k.title).join(", "),"."]}),e.targets.length>0&&n.jsxs("div",{className:"box",style:{marginBottom:6},children:[n.jsx("b",{children:"This release changes these branches:"}),e.targets.map(k=>n.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[k.repo==="."?"project":k.repo,": ",k.branch," ",k.remote?`→ pushed to ${k.remote}`:"(no remote, stays on this Mac)"]},k.repo)),n.jsx("p",{className:"note",style:{marginTop:6},children:"Change the branch or remote in Settings first if this is not right."})]})]}),p&&n.jsx(Tp,{foundIn:e.version,onClose:()=>m(!1)})]})}function zT(){const[e,t]=E.useState(void 0),s=$e({queryKey:["backlog",e??""],queryFn:()=>ze(`/api/v1/backlog${e?`?sprint=${encodeURIComponent(e)}`:""}`),refetchInterval:15e3}),i=s.data,o=e??i?.sprint,l=i?.sprints.find(c=>c.path===o)?.name;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Backlog"}),i?.connected&&i.sprints.length>0&&n.jsxs("select",{className:"input",style:{width:"auto",marginLeft:12},value:o??"all",onChange:c=>t(c.target.value),"aria-label":"Sprint",children:[i.sprints.map(c=>n.jsxs("option",{value:c.path,children:[c.name,c.current?" (now)":""]},c.path)),n.jsx("option",{value:"all",children:"Everything open"})]}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:l?`squad backlog --sprint ${tn(l)}`:"squad backlog"})]}),n.jsx("div",{className:"scroll",children:n.jsx("div",{className:"page",children:s.isLoading?n.jsx("p",{className:"note",children:"Reading the backlog from Azure…"}):i?.connected?i.error?n.jsx("p",{className:"note",style:{color:"var(--bug)"},children:i.error}):i.items.length===0?n.jsxs("p",{className:"note",children:["Nothing open in ",l??"this sprint","."]}):n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"note",style:{marginBottom:12},children:[i.items.length," open ",i.items.length===1?"item":"items"," in ",l??"the backlog",", in backlog order. Start one and the squad picks it up; Azure follows along."]}),n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{style:{width:80},children:"ID"}),n.jsx("th",{children:"Title"}),n.jsx("th",{style:{width:70},children:"Points"}),n.jsx("th",{style:{width:100},children:"On Azure"}),n.jsx("th",{style:{width:260},children:"squad-kit"})]})}),n.jsx("tbody",{children:i.items.map(c=>n.jsx(MT,{w:c},c.id))})]})]}):n.jsxs("div",{className:"calm",children:[n.jsx("span",{className:"ring",children:n.jsx(jk,{size:18})}),n.jsxs("div",{children:[n.jsx("b",{children:"Connect Azure DevOps"}),n.jsxs("span",{children:[i?.error??"Add your Azure organization, project and token, and your stories and bugs show up here."," ",n.jsx(Ge,{to:"/settings",style:{fontWeight:600},children:"Open Settings"})]})]})]})})})]})}function MT({w:e}){const t=Se();return n.jsxs("tr",{children:[n.jsx("td",{className:"mono",children:n.jsxs("a",{href:e.url,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.id," ",n.jsx(mr,{size:11})]})}),n.jsx("td",{children:n.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.type==="Bug"&&n.jsxs("span",{className:"pill bug",style:{padding:"2px 8px"},children:[n.jsx(rs,{size:12})," Bug"]}),n.jsx("span",{style:{fontWeight:600},children:e.title})]})}),n.jsx("td",{children:e.points??""}),n.jsx("td",{children:e.state}),n.jsx("td",{children:e.ticket?n.jsxs(Ge,{to:"/board",search:{ticket:e.ticket.id},style:{color:"var(--muted)"},children:[n.jsx("b",{className:"mono",style:{color:"var(--text)"},children:e.ticket.id})," ",e.ticket.stage==="done"?"Released":qs[e.ticket.stage]]}):n.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/backlog/${e.id}/start`,done:`${e.ref} is on the board. The Analyst is reading it.`}),children:[n.jsx(Wh,{size:13})," Start"]})})]})}const hc=["Structure","Data","Security","Interface","Rules"],FT={nextdotjs:{hex:"000000",path:"M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z"},react:{hex:"61DAFB",path:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"},typescript:{hex:"3178C6",path:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},javascript:{hex:"F7DF1E",path:"M0 0h24v24H0V0zm22.034 18.276c-.175-1.095-.888-2.015-3.003-2.873-.736-.345-1.554-.585-1.797-1.14-.091-.33-.105-.51-.046-.705.15-.646.915-.84 1.515-.66.39.12.75.42.976.9 1.034-.676 1.034-.676 1.755-1.125-.27-.42-.404-.601-.586-.78-.63-.705-1.469-1.065-2.834-1.034l-.705.089c-.676.165-1.32.525-1.71 1.005-1.14 1.291-.811 3.541.569 4.471 1.365 1.02 3.361 1.244 3.616 2.205.24 1.17-.87 1.545-1.966 1.41-.811-.18-1.26-.586-1.755-1.336l-1.83 1.051c.21.48.45.689.81 1.109 1.74 1.756 6.09 1.666 6.871-1.004.029-.09.24-.705.074-1.65l.046.067zm-8.983-7.245h-2.248c0 1.938-.009 3.864-.009 5.805 0 1.232.063 2.363-.138 2.711-.33.689-1.18.601-1.566.48-.396-.196-.597-.466-.83-.855-.063-.105-.11-.196-.127-.196l-1.825 1.125c.305.63.75 1.172 1.324 1.517.855.51 2.004.675 3.207.405.783-.226 1.458-.691 1.811-1.411.51-.93.402-2.07.397-3.346.012-2.054 0-4.109 0-6.179l.004-.056z"},prisma:{hex:"2D3748",path:"M21.8068 18.2848L13.5528.7565c-.207-.4382-.639-.7273-1.1286-.7541-.5023-.0293-.9523.213-1.2062.6253L2.266 15.1271c-.2773.4518-.2718 1.0091.0158 1.4555l4.3759 6.7786c.2608.4046.7127.6388 1.1823.6388.1332 0 .267-.0188.3987-.0577l12.7019-3.7568c.3891-.1151.7072-.3904.8737-.7553s.1633-.7828-.0075-1.1454zm-1.8481.7519L9.1814 22.2242c-.3292.0975-.6448-.1873-.5756-.5194l3.8501-18.4386c.072-.3448.5486-.3996.699-.0803l7.1288 15.138c.1344.2856-.019.6224-.325.7128z"},sqlite:{hex:"003B57",path:"M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z"},vitest:{hex:"6E9F18",path:"M13.74024 1.05293a.49504.49504 0 0 0-.1569.02512.49338.49338 0 0 0-.25056.1876L7.59513 9.56159a.4895.4895 0 0 0-.08373.22327.48846.48846 0 0 0 .03163.23629.4893.4893 0 0 0 .13985.19319.4927.4927 0 0 0 .2149.10481l3.70685.78609-.22947 4.58007a.48834.48834 0 0 0 .08466.30017.49205.49205 0 0 0 .24931.18854c.10157.03398.21174.03444.3135.00064a.49387.49387 0 0 0 .25056-.18761l5.73735-8.29594a.4884.4884 0 0 0 .08404-.22327c.009-.08015-.0016-.16137-.03163-.23629a.48835.48835 0 0 0-.13985-.19319.49318.49318 0 0 0-.2149-.1048l-3.70686-.7861.22947-4.58008a.48802.48802 0 0 0-.08466-.30017.4913.4913 0 0 0-.24931-.18853.49439.49439 0 0 0-.1566-.02574zM1.15697 9.78795c-.30647.0012-.60009.12378-.81679.34048a1.16107 1.16107 0 0 0-.34017.81648 1.162 1.162 0 0 0 .33366.81957l10.84241 10.8421a1.15762 1.15762 0 0 0 .37677.25211 1.1583 1.1583 0 0 0 .44467.08838c.00084 0 .0016-.00031.0025-.00031.00073 0 .0014.00031.0022.00031a1.15827 1.15827 0 0 0 .44467-.08838 1.15731 1.15731 0 0 0 .37677-.2521l10.84236-10.8421a1.16272 1.16272 0 0 0 .33397-.81958c-.0013-.30647-.12376-.59976-.34048-.81648a1.1616 1.1616 0 0 0-.81679-.34048 1.16114 1.16114 0 0 0-.81926.33366l-5.4012 5.4009c-.0078.0074-.01718.01255-.02482.02015L12 20.14011l-4.59776-4.59745c-.0074-.0074-.01659-.01238-.02419-.01954l-5.4015-5.40151a1.162 1.162 0 0 0-.81958-.33366Z"},eslint:{hex:"4B32C3",path:"M7.257 9.132L11.816 6.5a.369.369 0 0 1 .368 0l4.559 2.632a.369.369 0 0 1 .184.32v5.263a.37.37 0 0 1-.184.319l-4.559 2.632a.369.369 0 0 1-.368 0l-4.559-2.632a.369.369 0 0 1-.184-.32V9.452a.37.37 0 0 1 .184-.32M23.852 11.53l-5.446-9.475c-.198-.343-.564-.596-.96-.596H6.555c-.396 0-.762.253-.96.596L.149 11.509a1.127 1.127 0 0 0 0 1.117l5.447 9.398c.197.342.563.517.959.517h10.893c.395 0 .76-.17.959-.512l5.446-9.413a1.069 1.069 0 0 0 0-1.086m-4.51 4.556a.4.4 0 0 1-.204.338L12.2 20.426a.395.395 0 0 1-.392 0l-6.943-4.002a.4.4 0 0 1-.205-.338V8.08c0-.14.083-.269.204-.338L11.8 3.74c.12-.07.272-.07.392 0l6.943 4.003a.4.4 0 0 1 .206.338z"},primereact:{hex:"03C4E8",path:"M12.01 0c-1.212 0-2.297.62-2.903 1.66l-1.52 2.608H4.303A3.287 3.287 0 0 0 1.43 5.911a3.226 3.226 0 0 0 0 3.285l1.642 2.819-1.646 2.825a3.202 3.202 0 0 0 0 3.261 3.265 3.265 0 0 0 2.851 1.631h2.925l.865.856L9.09 22.34A3.322 3.322 0 0 0 11.991 24c1.211 0 2.296-.62 2.902-1.66l.816-1.4 1.22-1.208h2.77a3.287 3.287 0 0 0 2.87-1.643c.6-1.028.6-2.256 0-3.285l-1.642-2.82 1.646-2.824a3.202 3.202 0 0 0 0-3.261 3.265 3.265 0 0 0-2.851-1.631H16.43L14.91 1.66A3.322 3.322 0 0 0 12.01 0Zm0 .719c.948 0 1.798.486 2.273 1.3l1.31 2.249H8.425l1.31-2.248A2.603 2.603 0 0 1 12.01.719Zm.33 4.265v7.74h.962l5.904-2.174.014-.057.87 1.492-1.33 2.282.171-3.173-1.51.543-1.51 1.494-1.237-.27.962 1.357v4.212l1.452-1.296-.708 1.216v.001l-.744.622v.654l-.412.708V14.49l-1.098-1.63-.687.407h-2.746l-.687-.407-1.098 1.63v6.101l-.412-.706v-.912l-1.036-.867-.729-1.25 1.765 1.574v-4.212l.961-1.358-1.236.271-1.51-1.494-1.511-.543.188 3.455-1.477-2.534.942-1.617.122-.208.088.36 5.904 2.174h.824V4.985Zm1.512 0h.412l.96 2.17 1.935-.2.237.406-2.452.192zm-3.985.001h.412L9.187 7.552l-2.556-.205.072-.124.001.001.163-.28 2.04.21Zm-5.565.001h2.867L5.831 7.282l-1.592-.127.49 2.018-1.237 2.124-1.433-2.46a2.52 2.52 0 0 1 0-2.567 2.568 2.568 0 0 1 2.243-1.284Zm12.547 0h2.873c.928 0 1.759.476 2.223 1.272a2.497 2.497 0 0 1 0 2.543l-1.437 2.466-1.042-1.789.563-2.323-1.833.143Zm3.659 7.718 1.433 2.46a2.52 2.52 0 0 1 0 2.566 2.567 2.567 0 0 1-2.243 1.283h-2.277V18zm-17.016.03 3.22 5.525v.754H4.277a2.545 2.545 0 0 1-2.223-1.27 2.497 2.497 0 0 1 0-2.544z"},tailwindcss:{hex:"06B6D4",path:"M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z"},nodedotjs:{hex:"5FA04E",path:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"},postgresql:{hex:"4169E1",path:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"},vite:{hex:"646CFF",path:"m8.286 10.578.512-8.657a.306.306 0 0 1 .247-.282L17.377.006a.306.306 0 0 1 .353.385l-1.558 5.403a.306.306 0 0 0 .352.385l2.388-.46a.306.306 0 0 1 .332.438l-6.79 13.55-.123.19a.294.294 0 0 1-.252.14c-.177 0-.35-.152-.305-.369l1.095-5.301a.306.306 0 0 0-.388-.355l-1.433.435a.306.306 0 0 1-.389-.354l.69-3.375a.306.306 0 0 0-.37-.36l-2.32.536a.306.306 0 0 1-.374-.316zm14.976-7.926L17.284 3.74l-.544 1.887 2.077-.4a.8.8 0 0 1 .84.369.8.8 0 0 1 .034.783L12.9 19.93l-.013.025-.015.023-.122.19a.801.801 0 0 1-.672.37.826.826 0 0 1-.634-.302.8.8 0 0 1-.16-.67l1.029-4.981-1.12.34a.81.81 0 0 1-.86-.262.802.802 0 0 1-.165-.67l.63-3.08-2.027.468a.808.808 0 0 1-.768-.233.81.81 0 0 1-.217-.6l.389-6.57-7.44-1.33a.612.612 0 0 0-.64.906L11.58 23.691a.612.612 0 0 0 1.066-.004l11.26-20.135a.612.612 0 0 0-.644-.9z"},angular:{hex:"0F0F11",path:"M16.712 17.711H7.288l-1.204 2.916L12 24l5.916-3.373-1.204-2.916ZM14.692 0l7.832 16.855.814-12.856L14.692 0ZM9.308 0 .662 3.999l.814 12.856L9.308 0Zm-.405 13.93h6.198L12 6.396 8.903 13.93Z"},vuedotjs:{hex:"4FC08D",path:"M24,1.61H14.06L12,5.16,9.94,1.61H0L12,22.39ZM12,14.08,5.16,2.23H9.59L12,6.41l2.41-4.18h4.43Z"},dotnet:{hex:"512BD4",path:"M24 8.77h-2.468v7.565h-1.425V8.77h-2.462V7.53H24zm-6.852 7.565h-4.821V7.53h4.63v1.24h-3.205v2.494h2.953v1.234h-2.953v2.604h3.396zm-6.708 0H8.882L4.78 9.863a2.896 2.896 0 0 1-.258-.51h-.036c.032.189.048.592.048 1.21v5.772H3.157V7.53h1.659l3.965 6.32c.167.261.275.442.323.54h.024c-.04-.233-.06-.629-.06-1.185V7.529h1.372zm-8.703-.693a.868.829 0 0 1-.869.829.868.829 0 0 1-.868-.83.868.829 0 0 1 .868-.828.868.829 0 0 1 .869.829Z"},python:{hex:"3776AB",path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},jest:{hex:"C21325",path:"M22.251 11.82a3.117 3.117 0 0 0-2.328-3.01L22.911 0H8.104L11.1 8.838a3.116 3.116 0 0 0-2.244 2.988c0 1.043.52 1.967 1.313 2.536a8.279 8.279 0 0 1-1.084 1.244 8.14 8.14 0 0 1-2.55 1.647c-.834-.563-1.195-1.556-.869-2.446a3.11 3.11 0 0 0-.91-6.08 3.117 3.117 0 0 0-3.113 3.113c0 .848.347 1.626.903 2.182-.048.097-.097.195-.146.299-.465.959-.993 2.043-1.195 3.259-.403 2.432.257 4.384 1.849 5.489A5.093 5.093 0 0 0 5.999 24c1.827 0 3.682-.917 5.475-1.807 1.279-.632 2.599-1.292 3.898-1.612.48-.118.98-.187 1.508-.264 1.07-.153 2.175-.312 3.168-.89a4.482 4.482 0 0 0 2.182-3.091c.174-.994 0-1.994-.444-2.87.298-.48.465-1.042.465-1.647zm-1.355 0c0 .965-.785 1.75-1.75 1.75a1.753 1.753 0 0 1-1.085-3.126l.007-.007c.056-.042.118-.084.18-.125 0 0 .008 0 .008-.007.028-.014.055-.035.083-.05.007 0 .014-.006.021-.006.028-.014.063-.028.097-.042.035-.014.07-.027.098-.041.007 0 .013-.007.02-.007.028-.007.056-.021.084-.028.007 0 .02-.007.028-.007.034-.007.062-.014.097-.02h.007l.104-.022c.007 0 .02 0 .028-.007.028 0 .055-.007.083-.007h.035c.035 0 .07-.007.111-.007h.09c.028 0 .05 0 .077.007h.014c.055.007.111.014.167.028a1.766 1.766 0 0 1 1.396 1.723zM10.043 1.39h10.93l-2.509 7.4c-.104.02-.208.055-.312.09l-2.64-5.385-2.648 5.35c-.104-.034-.216-.055-.327-.076l-2.494-7.38zm4.968 9.825a3.083 3.083 0 0 0-.938-1.668l1.438-2.904 1.452 2.967c-.43.43-.743.98-.868 1.605H15.01zm-3.481-1.098c.034-.007.062-.014.097-.02h.02c.029-.008.056-.008.084-.015h.028c.028 0 .049-.007.076-.007h.271c.028 0 .049.007.07.007.014 0 .02 0 .035.007.027.007.048.007.076.014.007 0 .014 0 .028.007l.097.02h.007c.028.008.056.015.083.029.007 0 .014.007.028.007.021.007.049.014.07.027.007 0 .014.007.02.007.028.014.056.021.084.035h.007a.374.374 0 0 1 .09.049h.007c.028.014.056.034.084.048.007 0 .007.007.013.007.028.014.05.035.077.049l.007.007c.083.062.16.132.236.201l.007.007a1.747 1.747 0 0 1 .48 1.209 1.752 1.752 0 0 1-3.502 0 1.742 1.742 0 0 1 1.32-1.695zm-6.838-.049c.966 0 1.751.786 1.751 1.751s-.785 1.751-1.75 1.751-1.752-.785-1.752-1.75.786-1.752 1.751-1.752zm16.163 6.025a3.07 3.07 0 0 1-1.508 2.133c-.758.438-1.689.577-2.669.716a17.29 17.29 0 0 0-1.64.291c-1.445.355-2.834 1.05-4.182 1.717-1.724.854-3.35 1.66-4.857 1.66a3.645 3.645 0 0 1-2.154-.688c-1.529-1.056-1.453-3.036-1.272-4.12.167-1.015.632-1.966 1.077-2.877.028-.055.049-.104.077-.16.152.056.312.098.479.126-.264 1.473.486 2.994 1.946 3.745l.264.139.284-.104c1.216-.431 2.342-1.133 3.336-2.071a9.334 9.334 0 0 0 1.445-1.716c.16.027.32.034.48.034a3.117 3.117 0 0 0 3.008-2.327h1.167a3.109 3.109 0 0 0 3.01 2.327c.576 0 1.11-.16 1.57-.43.18.52.236 1.063.139 1.605z"},prettier:{hex:"F7B93E",path:"M8.571 23.429A.571.571 0 0 1 8 24H2.286a.571.571 0 0 1 0-1.143H8c.316 0 .571.256.571.572zM8 20.57H6.857a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zm-5.714 1.143H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM8 18.286H2.286a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143zM16 16H5.714a.571.571 0 0 0 0 1.143H16A.571.571 0 0 0 16 16zM2.286 17.143h1.143a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm17.143-3.429H16a.571.571 0 0 0 0 1.143h3.429a.571.571 0 0 0 0-1.143zM9.143 14.857h4.571a.571.571 0 0 0 0-1.143H9.143a.571.571 0 0 0 0 1.143zm-6.857 0h4.571a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zM20.57 11.43H11.43a.571.571 0 0 0 0 1.142h9.142a.571.571 0 0 0 0-1.142zM9.714 12a.571.571 0 0 0-.571-.571H5.714a.571.571 0 0 0 0 1.142h3.429A.571.571 0 0 0 9.714 12zm-7.428.571h1.143a.571.571 0 0 0 0-1.142H2.286a.571.571 0 0 0 0 1.142zm19.428-3.428H16a.571.571 0 0 0 0 1.143h5.714a.571.571 0 0 0 0-1.143zM2.286 10.286H8a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm13.143-2.857c0 .315.255.571.571.571h5.714a.571.571 0 0 0 0-1.143H16a.571.571 0 0 0-.571.572zm-8.572-.572a.571.571 0 0 0 0 1.143H8a.571.571 0 0 0 0-1.143H6.857zM2.286 8H4.57a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm16.571-2.857c0 .315.256.571.572.571h1.142a.571.571 0 0 0 0-1.143H19.43a.571.571 0 0 0-.572.572zm-1.143 0a.571.571 0 0 0-.571-.572H12.57a.571.571 0 0 0 0 1.143h4.572a.571.571 0 0 0 .571-.571zm-15.428.571h8a.571.571 0 0 0 0-1.143h-8a.571.571 0 0 0 0 1.143zm5.143-2.857c0 .316.255.572.571.572h11.429a.571.571 0 0 0 0-1.143H8a.571.571 0 0 0-.571.571zm-5.143.572h3.428a.571.571 0 0 0 0-1.143H2.286a.571.571 0 0 0 0 1.143zm0-2.286H16A.571.571 0 0 0 16 0H2.286a.571.571 0 0 0 0 1.143z"},express:{hex:"000000",path:"M24 18.588a1.529 1.529 0 01-1.895-.72l-3.45-4.771-.5-.667-4.003 5.444a1.466 1.466 0 01-1.802.708l5.158-6.92-4.798-6.251a1.595 1.595 0 011.9.666l3.576 4.83 3.596-4.81a1.435 1.435 0 011.788-.668L21.708 7.9l-2.522 3.283a.666.666 0 000 .994l4.804 6.412zM.002 11.576l.42-2.075c1.154-4.103 5.858-5.81 9.094-3.27 1.895 1.489 2.368 3.597 2.275 5.973H1.116C.943 16.447 4.005 19.009 7.92 17.7a4.078 4.078 0 002.582-2.876c.207-.666.548-.78 1.174-.588a5.417 5.417 0 01-2.589 3.957 6.272 6.272 0 01-7.306-.933 6.575 6.575 0 01-1.64-3.858c0-.235-.08-.455-.134-.666A88.33 88.33 0 010 11.577zm1.127-.286h9.654c-.06-3.076-2.001-5.258-4.59-5.278-2.882-.04-4.944 2.094-5.071 5.264z"},mongodb:{hex:"47A248",path:"M17.193 9.555c-1.264-5.58-4.252-7.414-4.573-8.115-.28-.394-.53-.954-.735-1.44-.036.495-.055.685-.523 1.184-.723.566-4.438 3.682-4.74 10.02-.282 5.912 4.27 9.435 4.888 9.884l.07.05A73.49 73.49 0 0111.91 24h.481c.114-1.032.284-2.056.51-3.07.417-.296.604-.463.85-.693a11.342 11.342 0 003.639-8.464c.01-.814-.103-1.662-.197-2.218zm-5.336 8.195s0-8.291.275-8.29c.213 0 .49 10.695.49 10.695-.381-.045-.765-1.76-.765-2.405z"},mysql:{hex:"4479A1",path:"M16.405 5.501c-.115 0-.193.014-.274.033v.013h.014c.054.104.146.18.214.273.054.107.1.214.154.32l.014-.015c.094-.066.14-.172.14-.333-.04-.047-.046-.094-.08-.14-.04-.067-.126-.1-.18-.153zM5.77 18.695h-.927a50.854 50.854 0 00-.27-4.41h-.008l-1.41 4.41H2.45l-1.4-4.41h-.01a72.892 72.892 0 00-.195 4.41H0c.055-1.966.192-3.81.41-5.53h1.15l1.335 4.064h.008l1.347-4.064h1.095c.242 2.015.384 3.86.428 5.53zm4.017-4.08c-.378 2.045-.876 3.533-1.492 4.46-.482.716-1.01 1.073-1.583 1.073-.153 0-.34-.046-.566-.138v-.494c.11.017.24.026.386.026.268 0 .483-.075.647-.222.197-.18.295-.382.295-.605 0-.155-.077-.47-.23-.944L6.23 14.615h.91l.727 2.36c.164.536.233.91.205 1.123.4-1.064.678-2.227.835-3.483zm12.325 4.08h-2.63v-5.53h.885v4.85h1.745zm-3.32.135l-1.016-.5c.09-.076.177-.158.255-.25.433-.506.648-1.258.648-2.253 0-1.83-.718-2.746-2.155-2.746-.704 0-1.254.232-1.65.697-.43.508-.646 1.256-.646 2.245 0 .972.19 1.686.574 2.14.35.41.877.615 1.583.615.264 0 .506-.033.725-.098l1.325.772.36-.622zM15.5 17.588c-.225-.36-.337-.94-.337-1.736 0-1.393.424-2.09 1.27-2.09.443 0 .77.167.977.5.224.362.336.936.336 1.723 0 1.404-.424 2.108-1.27 2.108-.445 0-.77-.167-.978-.5zm-1.658-.425c0 .47-.172.856-.516 1.156-.344.3-.803.45-1.384.45-.543 0-1.064-.172-1.573-.515l.237-.476c.438.22.833.328 1.19.328.332 0 .593-.073.783-.22a.754.754 0 00.3-.615c0-.33-.23-.61-.648-.845-.388-.213-1.163-.657-1.163-.657-.422-.307-.632-.636-.632-1.177 0-.45.157-.81.47-1.085.315-.278.72-.415 1.22-.415.512 0 .98.136 1.4.41l-.213.476a2.726 2.726 0 00-1.064-.23c-.283 0-.502.068-.654.206a.685.685 0 00-.248.524c0 .328.234.61.666.85.393.215 1.187.67 1.187.67.433.305.648.63.648 1.168zm9.382-5.852c-.535-.014-.95.04-1.297.188-.1.04-.26.04-.274.167.055.053.063.14.11.214.08.134.218.313.346.407.14.11.28.216.427.31.26.16.555.255.81.416.145.094.293.213.44.313.073.05.12.14.214.172v-.02c-.046-.06-.06-.147-.105-.214-.067-.067-.134-.127-.2-.193a3.223 3.223 0 00-.695-.675c-.214-.146-.682-.35-.77-.595l-.013-.014c.146-.013.32-.066.46-.106.227-.06.435-.047.67-.106.106-.027.213-.06.32-.094v-.06c-.12-.12-.21-.283-.334-.395a8.867 8.867 0 00-1.104-.823c-.21-.134-.476-.22-.697-.334-.08-.04-.214-.06-.26-.127-.12-.146-.19-.34-.275-.514a17.69 17.69 0 01-.547-1.163c-.12-.262-.193-.523-.34-.763-.69-1.137-1.437-1.826-2.586-2.5-.247-.14-.543-.2-.856-.274-.167-.008-.334-.02-.5-.027-.11-.047-.216-.174-.31-.235-.38-.24-1.364-.76-1.644-.072-.18.434.267.862.422 1.082.115.153.26.328.34.5.047.116.06.235.107.356.106.294.207.622.347.897.073.14.153.287.247.413.054.073.146.107.167.227-.094.136-.1.334-.154.5-.24.757-.146 1.693.194 2.25.107.166.362.534.703.393.3-.12.234-.5.32-.835.02-.08.007-.133.048-.187v.015c.094.188.188.367.274.555.206.328.566.668.867.895.16.12.287.328.487.402v-.02h-.015c-.043-.058-.1-.086-.154-.133a3.445 3.445 0 01-.35-.4 8.76 8.76 0 01-.747-1.218c-.11-.21-.202-.436-.29-.643-.04-.08-.04-.2-.107-.24-.1.146-.247.273-.32.453-.127.288-.14.642-.188 1.01-.027.007-.014 0-.027.014-.214-.052-.287-.274-.367-.46-.2-.475-.233-1.238-.06-1.785.047-.14.247-.582.167-.716-.042-.127-.174-.2-.247-.303a2.478 2.478 0 01-.24-.427c-.16-.374-.24-.788-.414-1.162-.08-.173-.22-.354-.334-.513-.127-.18-.267-.307-.368-.52-.033-.073-.08-.194-.027-.274.014-.054.042-.075.094-.09.088-.072.335.022.422.062.247.1.455.194.662.334.094.066.195.193.315.226h.14c.214.047.455.014.655.073.355.114.675.28.962.46a5.953 5.953 0 012.085 2.286c.08.154.115.295.188.455.14.33.313.663.455.982.14.315.275.636.476.897.1.14.502.213.682.286.133.06.34.115.46.188.23.14.454.3.67.454.11.076.443.243.463.378z"},redis:{hex:"FF4438",path:"M22.71 13.145c-1.66 2.092-3.452 4.483-7.038 4.483-3.203 0-4.397-2.825-4.48-5.12.701 1.484 2.073 2.685 4.214 2.63 4.117-.133 6.94-3.852 6.94-7.239 0-4.05-3.022-6.972-8.268-6.972-3.752 0-8.4 1.428-11.455 3.685C2.59 6.937 3.885 9.958 4.35 9.626c2.648-1.904 4.748-3.13 6.784-3.744C8.12 9.244.886 17.05 0 18.425c.1 1.261 1.66 4.648 2.424 4.648.232 0 .431-.133.664-.365a100.49 100.49 0 0 0 5.54-6.765c.222 3.104 1.748 6.898 6.014 6.898 3.819 0 7.604-2.756 9.33-8.965.2-.764-.73-1.361-1.261-.73zm-4.349-5.013c0 1.959-1.926 2.922-3.685 2.922-.941 0-1.664-.247-2.235-.568 1.051-1.592 2.092-3.225 3.21-4.973 1.972.334 2.71 1.43 2.71 2.619z"},docker:{hex:"2496ED",path:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},zod:{hex:"408AFF",path:"M2.584 3.582a2.247 2.247 0 0 1 2.112-1.479h14.617c.948 0 1.794.595 2.115 1.487l2.44 6.777a2.248 2.248 0 0 1-.624 2.443l-9.61 8.52a2.247 2.247 0 0 1-2.963.018L.776 12.773a2.248 2.248 0 0 1-.64-2.467Zm12.038 4.887-9.11 5.537 5.74 5.007c.456.399 1.139.396 1.593-.006l5.643-5.001H14.4l6.239-3.957c.488-.328.69-.947.491-1.5l-1.24-3.446a1.535 1.535 0 0 0-1.456-1.015H5.545a1.535 1.535 0 0 0-1.431 1.01l-1.228 3.37z"},hono:{hex:"E36002",path:"M12.445.002a45.529 45.529 0 0 0-5.252 8.146 8.595 8.595 0 0 1-.555-.53 27.796 27.796 0 0 0-1.205-1.542 8.762 8.762 0 0 0-1.251 2.12 20.743 20.743 0 0 0-1.448 5.88 8.867 8.867 0 0 0 .338 3.468c1.312 3.48 3.794 5.593 7.445 6.337 3.055.438 5.755-.333 8.097-2.312 2.677-2.59 3.359-5.634 2.047-9.132a33.287 33.287 0 0 0-2.988-5.59A91.34 91.34 0 0 0 12.615.053a.216.216 0 0 0-.17-.051Zm-.336 3.906a50.93 50.93 0 0 1 4.794 6.552c.448.767.817 1.57 1.108 2.41.606 2.386-.044 4.354-1.951 5.904-1.845 1.298-3.87 1.683-6.072 1.156-2.376-.737-3.75-2.335-4.121-4.794a5.107 5.107 0 0 1 .242-2.266c.358-.908.79-1.774 1.3-2.601l1.446-2.121a397.33 397.33 0 0 0 3.254-4.24Z"},svelte:{hex:"FF3E00",path:"M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"},nestjs:{hex:"E0234E",path:"M14.131.047c-.173 0-.334.037-.483.087.316.21.49.49.576.806.007.043.019.074.025.117a.681.681 0 0 1 .013.112c.024.545-.143.614-.26.936-.18.415-.13.861.086 1.22a.74.74 0 0 0 .074.137c-.235-1.568 1.073-1.803 1.314-2.293.019-.428-.334-.713-.613-.911a1.37 1.37 0 0 0-.732-.21zM16.102.4c-.024.143-.006.106-.012.18-.006.05-.006.112-.012.161-.013.05-.025.1-.044.149-.012.05-.03.1-.05.149l-.067.142c-.02.025-.031.05-.05.075l-.037.055a2.152 2.152 0 0 1-.093.124c-.037.038-.068.081-.112.112v.006c-.037.031-.074.068-.118.1-.13.099-.278.173-.415.266-.043.03-.087.056-.124.093a.906.906 0 0 0-.118.099c-.043.037-.074.074-.111.118-.031.037-.068.08-.093.124a1.582 1.582 0 0 0-.087.13c-.025.05-.043.093-.068.142-.019.05-.037.093-.05.143a2.007 2.007 0 0 0-.043.155c-.006.025-.006.056-.012.08-.007.025-.007.05-.013.075 0 .05-.006.105-.006.155 0 .037 0 .074.006.111 0 .05.006.1.019.155.006.05.018.1.03.15.02.049.032.098.05.148.013.03.031.062.044.087l-1.426-.552c-.241-.068-.477-.13-.719-.186l-.39-.093c-.372-.074-.75-.13-1.128-.167-.013 0-.019-.006-.031-.006A11.082 11.082 0 0 0 8.9 2.855c-.378.025-.756.074-1.134.136a12.45 12.45 0 0 0-.837.174l-.279.074c-.092.037-.18.08-.266.118l-.205.093c-.012.006-.024.006-.03.012-.063.031-.118.056-.174.087a2.738 2.738 0 0 0-.236.118c-.043.018-.086.043-.124.062a.559.559 0 0 1-.055.03c-.056.032-.112.063-.162.094a1.56 1.56 0 0 0-.148.093c-.044.03-.087.055-.124.086-.006.007-.013.007-.019.013-.037.025-.08.056-.118.087l-.012.012-.093.074c-.012.007-.025.019-.037.025-.031.025-.062.056-.093.08-.006.013-.019.02-.025.025-.037.038-.074.069-.111.106-.007 0-.007.006-.013.012a1.742 1.742 0 0 0-.111.106c-.007.006-.007.012-.013.012a1.454 1.454 0 0 0-.093.1c-.012.012-.03.024-.043.036a1.374 1.374 0 0 1-.106.112c-.006.012-.018.019-.024.03-.05.05-.093.1-.143.15l-.018.018c-.1.106-.205.211-.317.304-.111.1-.229.192-.347.273a3.777 3.777 0 0 1-.762.421c-.13.056-.267.106-.403.149-.26.056-.527.161-.756.18-.05 0-.105.012-.155.018l-.155.037-.149.056c-.05.019-.099.044-.148.068-.044.031-.093.056-.137.087a1.011 1.011 0 0 0-.124.106c-.043.03-.087.074-.124.111-.037.043-.074.08-.105.124-.031.05-.068.093-.093.143a1.092 1.092 0 0 0-.087.142c-.025.056-.05.106-.068.161-.019.05-.037.106-.056.161-.012.05-.025.1-.03.15 0 .005-.007.012-.007.018-.012.056-.012.13-.019.167C.006 7.95 0 7.986 0 8.03a.657.657 0 0 0 .074.31v.006c.019.037.044.075.069.112.024.037.05.074.08.111.031.031.068.069.106.1a.906.906 0 0 0 .117.099c.149.13.186.173.378.272.031.019.062.031.1.05.006 0 .012.006.018.006 0 .013 0 .019.006.031a1.272 1.272 0 0 0 .08.298c.02.037.032.074.05.111.007.013.013.025.02.031.024.05.049.093.073.137l.093.13c.031.037.069.08.106.118.037.037.074.068.118.105 0 0 .006.006.012.006.037.031.074.062.112.087a.986.986 0 0 0 .136.08c.043.025.093.05.142.069a.73.73 0 0 0 .124.043c.007.006.013.006.025.012.025.007.056.013.08.019-.018.335-.024.65.026.762.055.124.328-.254.6-.688-.036.428-.061.93 0 1.079.069.155.44-.329.763-.862 4.395-1.016 8.405 2.02 8.826 6.31-.08-.67-.905-1.041-1.283-.948-.186.458-.502 1.047-1.01 1.413.043-.41.025-.83-.062-1.24a4.009 4.009 0 0 1-.769 1.562c-.588.043-1.177-.242-1.487-.67-.025-.018-.031-.055-.05-.08-.018-.043-.037-.087-.05-.13a.515.515 0 0 1-.037-.13c-.006-.044-.006-.087-.006-.137v-.093a.992.992 0 0 1 .031-.13c.013-.043.025-.086.044-.13.024-.043.043-.087.074-.13.105-.298.105-.54-.087-.682a.706.706 0 0 0-.118-.062c-.024-.006-.055-.018-.08-.025l-.05-.018a.847.847 0 0 0-.13-.031.472.472 0 0 0-.13-.019 1.01 1.01 0 0 0-.136-.012c-.031 0-.062.006-.093.006a.484.484 0 0 0-.137.019c-.043.006-.086.012-.13.024a1.068 1.068 0 0 0-.13.044c-.043.018-.08.037-.124.056-.037.018-.074.043-.118.062-1.444.942-.582 3.148.403 3.787-.372.068-.75.148-.855.229l-.013.012c.267.161.546.298.837.416.397.13.818.247 1.004.297v.006a5.996 5.996 0 0 0 1.562.112c2.746-.192 4.996-2.281 5.405-5.033l.037.161c.019.112.043.23.056.347v.006c.012.056.018.112.025.162v.024c.006.056.012.112.012.162.006.068.012.136.012.204v.1c0 .03.007.067.007.098 0 .038-.007.075-.007.112v.087c0 .043-.006.08-.006.124 0 .025 0 .05-.006.08 0 .044-.006.087-.006.137-.006.018-.006.037-.006.055l-.02.143c0 .019 0 .037-.005.056-.007.062-.019.118-.025.18v.012l-.037.174v.018l-.037.167c0 .007-.007.02-.007.025a1.663 1.663 0 0 1-.043.168v.018c-.019.062-.037.118-.05.174-.006.006-.006.012-.006.012l-.056.186c-.024.062-.043.118-.068.18-.025.062-.043.124-.068.18-.025.062-.05.117-.074.18h-.007c-.024.055-.05.117-.08.173a.302.302 0 0 1-.019.043c-.006.006-.006.013-.012.019a5.867 5.867 0 0 1-1.742 2.082c-.05.031-.099.069-.149.106-.012.012-.03.018-.043.03a2.603 2.603 0 0 1-.136.094l.018.037h.007l.26-.037h.006c.161-.025.322-.056.483-.087.044-.006.093-.019.137-.031l.087-.019c.043-.006.086-.018.13-.024.037-.013.074-.02.111-.031.62-.15 1.221-.354 1.798-.595a9.926 9.926 0 0 1-3.85 3.142c.714-.05 1.426-.167 2.114-.366a9.903 9.903 0 0 0 5.857-4.68 9.893 9.893 0 0 1-1.667 3.986 9.758 9.758 0 0 0 1.655-1.376 9.824 9.824 0 0 0 2.61-5.268c.21.98.272 1.99.18 2.987 4.474-6.241.371-12.712-1.346-14.416-.006-.013-.012-.019-.012-.031-.006.006-.006.006-.006.012 0-.006 0-.006-.007-.012 0 .074-.006.148-.012.223a8.34 8.34 0 0 1-.062.415c-.03.136-.068.273-.105.41-.044.13-.093.266-.15.396a5.322 5.322 0 0 1-.185.378 4.735 4.735 0 0 1-.477.688c-.093.111-.192.21-.292.31a3.994 3.994 0 0 1-.18.155l-.142.124a3.459 3.459 0 0 1-.347.241 4.295 4.295 0 0 1-.366.211c-.13.062-.26.118-.39.174a4.364 4.364 0 0 1-.818.223c-.143.025-.285.037-.422.05a4.914 4.914 0 0 1-.297.012 4.66 4.66 0 0 1-.422-.025 3.137 3.137 0 0 1-.421-.062 3.136 3.136 0 0 1-.415-.105h-.007c.137-.013.273-.025.41-.05a4.493 4.493 0 0 0 .818-.223c.136-.05.266-.112.39-.174.13-.062.248-.13.372-.204.118-.08.235-.161.347-.248.112-.087.217-.18.316-.279.105-.093.198-.198.291-.304.093-.111.18-.223.26-.334.013-.019.026-.044.038-.062.062-.1.124-.199.18-.298a4.272 4.272 0 0 0 .334-.775c.044-.13.075-.266.106-.403.025-.142.05-.278.062-.415.012-.142.025-.285.025-.421 0-.1-.007-.199-.013-.298a6.726 6.726 0 0 0-.05-.415 4.493 4.493 0 0 0-.092-.415c-.044-.13-.087-.267-.137-.397-.05-.13-.111-.26-.173-.384-.069-.124-.137-.248-.211-.366a6.843 6.843 0 0 0-.248-.34c-.093-.106-.186-.212-.285-.317a3.878 3.878 0 0 0-.161-.155c-.28-.217-.57-.421-.862-.607a1.154 1.154 0 0 0-.124-.062 2.415 2.415 0 0 0-.589-.26Z"},cypress:{hex:"69D3A7",path:"M11.998.0195c-.8642 0-1.6816.1101-2.1445.1934v.002C4.1731 1.2283 0 6.1368 0 12.0018c0 1.1265.1573 2.2328.4648 3.3028.0387.1453.0915.2993.1368.4473 1.607 4.865 6.2245 8.226 11.3925 8.2285.0651 0 .2518-.0003.502-.0118.8564-.0353 1.6228-.5734 1.9512-1.369l.4736-1.1544L20.4258 8.043H18.621l-2.3164 5.871-2.334-5.871h-1.9082l3.2734 8.0117c-.8115 1.9702-1.6252 3.9395-2.4355 5.9101-.0808.1945-.2655.3284-.4727.336-.144.005-.285.0098-.4316.0098-4.5848 0-8.6672-3.0695-9.9277-7.4649a10.3058 10.3058 0 0 1-.3985-2.8437c0-5.0887 3.6521-9.3404 8.6035-10.164.2214-.037.8885-.1446 1.7246-.1446 4.4166 0 8.269 2.732 9.7305 6.8476.0558.144.0977.293.1465.4395.299.9746.4531 1.9887.4531 3.0215 0 4.5696-2.9413 8.5326-7.3164 9.8613l.4863 1.5996c5.085-1.546 8.4995-6.1518 8.502-11.459 0-1.5491-.2983-2.8706-.6504-3.8926-.0432-.1212-.0873-.2422-.1309-.3633h-.002C21.4577 3.0954 17.0444.0195 11.998.0195ZM8.4336 7.8906c-1.1999 0-2.1747.3852-2.9805 1.1758-.8007.7856-1.205 1.7736-1.205 2.9356 0 1.1544.4068 2.1368 1.205 2.9199.8058.7906 1.7806 1.1738 2.9805 1.1738 1.705 0 3.1556-.955 3.7871-2.4883l.0332-.082-1.6289-.5547c-.168.4563-.7552 1.4883-2.1914 1.4883-.6745 0-1.2437-.2344-1.6934-.6992-.4572-.4699-.6875-1.0632-.6875-1.7578 0-.6998.2253-1.2809.6875-1.7735.4522-.4648 1.019-.7012 1.6934-.7012 1.438 0 2.0238 1.0815 2.1934 1.4883l1.627-.5527-.0333-.084c-.629-1.5358-2.082-2.4883-3.7871-2.4883Z"},storybook:{hex:"FF4785",path:"M16.71.243l-.12 2.71a.18.18 0 00.29.15l1.06-.8.9.7a.18.18 0 00.28-.14l-.1-2.76 1.33-.1a1.2 1.2 0 011.279 1.2v21.596a1.2 1.2 0 01-1.26 1.2l-16.096-.72a1.2 1.2 0 01-1.15-1.16l-.75-19.797a1.2 1.2 0 011.13-1.27L16.7.222zM13.64 9.3c0 .47 3.16.24 3.59-.08 0-3.2-1.72-4.89-4.859-4.89-3.15 0-4.899 1.72-4.899 4.29 0 4.45 5.999 4.53 5.999 6.959 0 .7-.32 1.1-1.05 1.1-.96 0-1.35-.49-1.3-2.16 0-.36-3.649-.48-3.769 0-.27 4.03 2.23 5.2 5.099 5.2 2.79 0 4.969-1.49 4.969-4.18 0-4.77-6.099-4.64-6.099-6.999 0-.97.72-1.1 1.13-1.1.45 0 1.25.07 1.19 1.87z"},graphql:{hex:"E10098",path:"M12.002 0a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.54 4.931a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm0 9.862a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm-8.54 4.931a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.276zm-8.542-4.93a2.138 2.138 0 1 0 0 4.276 2.138 2.138 0 1 0 0-4.277zm0-9.863a2.138 2.138 0 1 0 0 4.277 2.138 2.138 0 1 0 0-4.277zm8.542-3.378L2.953 6.777v10.448l9.049 5.224 9.047-5.224V6.777zm0 1.601 7.66 13.27H4.34zm-1.387.371L3.97 15.037V7.363zm2.774 0 6.646 3.838v7.674zM5.355 17.44h13.293l-6.646 3.836z"},trpc:{hex:"2596BE",path:"M24 12c0 6.62-5.38 12-12 12S0 18.62 0 12 5.38 0 12 0s12 5.38 12 12ZM1.21 12A10.78 10.78 0 0 0 12 22.79 10.78 10.78 0 0 0 22.79 12 10.78 10.78 0 0 0 12 1.21 10.78 10.78 0 0 0 1.21 12Zm10.915-6.086 2.162 1.248a.25.25 0 0 1 .125.217v1.103l2.473 1.428a.25.25 0 0 1 .125.217v2.355l.955.551a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-.956-.552-2.472 1.427a.25.25 0 0 1-.25 0l-2.472-1.427-.956.552a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l.955-.551v-2.355a.25.25 0 0 1 .125-.217l2.473-1.428V7.38a.25.25 0 0 1 .125-.217l2.162-1.248a.25.25 0 0 1 .25 0Zm1.268 10.049a.25.25 0 0 1-.125-.217V13.25a.25.25 0 0 1 .125-.217l2.16-1.248a.25.25 0 0 1 .25 0l.707.408v-1.922l-2.098-1.21v.814a.25.25 0 0 1-.125.217l-2.162 1.248a.25.25 0 0 1-.25 0l-2.162-1.248a.25.25 0 0 1-.125-.217V9.06L7.49 10.271v1.922l.707-.408a.25.25 0 0 1 .25 0l2.16 1.248a.25.25 0 0 1 .125.217v2.496a.25.25 0 0 1-.125.217l-.705.408L12 17.582l2.098-1.211ZM10.088 9.73l1.662.96V8.766l-1.662-.955Zm3.824 0V7.811l-1.662.955v1.924ZM12 6.418l-1.66.96 1.66.954 1.66-.954Zm-5.59 9.184 1.66.958v-1.921l-1.66-.956Zm3.822 0v-1.92l-1.662.957v1.923Zm-1.91-3.311-1.662.96 1.661.955 1.66-.956Zm5.446 3.31 1.66.96v-1.922l-1.66-.956Zm3.822 0v-1.918l-1.662.956v1.922Zm-1.912-3.31-1.66.96 1.66.955 1.66-.956Z"},redux:{hex:"764ABC",path:"M16.634 16.504c.87-.075 1.543-.84 1.5-1.754-.047-.914-.796-1.648-1.709-1.648h-.061a1.71 1.71 0 00-1.648 1.769c.03.479.226.869.494 1.153-1.048 2.038-2.621 3.536-5.005 4.795-1.603.838-3.296 1.154-4.944.93-1.378-.195-2.456-.81-3.116-1.799-.988-1.499-1.078-3.116-.255-4.734.6-1.17 1.499-2.023 2.099-2.443a9.96 9.96 0 01-.42-1.543C-.868 14.408-.416 18.752.932 20.805c1.004 1.498 3.057 2.456 5.304 2.456.6 0 1.23-.044 1.843-.194 3.897-.749 6.848-3.086 8.541-6.532zm5.348-3.746c-2.32-2.728-5.738-4.226-9.634-4.226h-.51c-.253-.554-.837-.899-1.498-.899h-.045c-.943 0-1.678.81-1.647 1.753.03.898.794 1.648 1.708 1.648h.074a1.69 1.69 0 001.499-1.049h.555c2.309 0 4.495.674 6.488 1.992 1.527 1.005 2.622 2.323 3.237 3.897.538 1.288.509 2.547-.045 3.597-.855 1.647-2.294 2.517-4.196 2.517-1.199 0-2.367-.375-2.967-.644-.36.298-.96.793-1.394 1.093 1.318.598 2.652.943 3.94.943 2.922 0 5.094-1.647 5.919-3.236.898-1.798.824-4.824-1.47-7.416zM6.49 17.042c.03.899.793 1.648 1.708 1.648h.06a1.688 1.688 0 001.648-1.768c0-.9-.779-1.647-1.693-1.647h-.06c-.06 0-.15 0-.226.029-1.243-2.098-1.768-4.347-1.572-6.772.12-1.828.72-3.417 1.797-4.735.9-1.124 2.593-1.68 3.747-1.708 3.236-.061 4.585 3.971 4.689 5.574l1.498.45C17.741 3.197 14.686.62 11.764.62 9.02.62 6.49 2.613 5.47 5.535 4.077 9.43 4.991 13.177 6.7 16.174c-.15.195-.24.539-.21.868z"},i18next:{hex:"26A69A",path:"M14.93646 2.48699v4.51684l5.0758 13.03647s1.5495 3.1839-2.8824 3.9597H7.01922s-4.13084-.4311-3.14053-3.7019L9.21276 7.00401V2.48699h5.7237Zm2.0894 13.10781c-4.4301-1.3742-8.15457-.6365-9.97498-.0788l-1.83572 4.4186c-.78296 2.499 2.27302 2.9417 2.59687 2.9813l.02755.0032h8.44448c3.5407-.5982 2.511-2.972 2.4147-3.1773l-.0068-.0142-1.6661-4.1328Zm-7.81345.7772c.78905.0004 1.42905.3862 1.42905.8646 0 .4764-.6404.864-1.42905.864-.7887 0-1.42711-.3878-1.42711-.864 0-.4784.6384-.8646 1.4271-.8646Zm5.08375 0c.7871.0004 1.4271.3862 1.4271.8646 0 .4764-.6403.864-1.4271.864-.791 0-1.429-.3878-1.429-.864 0-.4784.638-.8646 1.429-.8646Zm-4.5001-5.2131c-.55227 0-.99993.5395-.99993 1.2051 0 .6656.44766 1.2051.99993 1.2051.5522 0 .9998-.5395.9998-1.2051 0-.6656-.4476-1.2051-.9998-1.2051Zm3.6413-1.29686c-.6549 0-1.1862.63806-1.1862 1.42906 0 .7871.5313 1.4271 1.1862 1.4271.653 0 1.1862-.64 1.1862-1.4271 0-.7907-.5328-1.42906-1.1862-1.42906Zm6.0363-2.73783s-2.1219 1.54591-4.0858-.41975V4.55615s2.7243-.60065 4.0858 2.56806Zm-14.84367 0C5.9908 3.9555 8.71543 4.55615 8.71543 4.55615v2.14831c-1.96566 1.96566-4.08544.41975-4.08544.41975ZM15.04366 0c.4954 0 .8958.4387.8958.98109 0 .54203-.4006.98074-.8958.98074H8.95478c-.49315 0-.89428-.43871-.89428-.98074C8.0605.43871 8.46146 0 8.95478 0h6.08888Z"},mui:{hex:"007FFF",path:"M20.229 15.793a.666.666 0 0 0 .244-.243.666.666 0 0 0 .09-.333l.012-3.858a.666.666 0 0 1 .09-.333.666.666 0 0 1 .245-.243L23 9.58a.667.667 0 0 1 .333-.088.667.667 0 0 1 .333.09.667.667 0 0 1 .244.243.666.666 0 0 1 .089.333v7.014a.667.667 0 0 1-.335.578l-7.893 4.534a.666.666 0 0 1-.662 0l-6.194-3.542a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.335v-3.537c0-.004.004-.006.008-.004s.008 0 .008-.005v-.004c0-.003.002-.005.004-.007l5.102-2.93c.004-.003.002-.01-.003-.01a.005.005 0 0 1-.004-.002.005.005 0 0 1-.001-.004l.01-3.467a.667.667 0 0 0-.333-.58.667.667 0 0 0-.667 0L8.912 9.799a.667.667 0 0 1-.665 0l-3.804-2.19a.667.667 0 0 0-.999.577v6.267a.667.667 0 0 1-.332.577.666.666 0 0 1-.332.09.667.667 0 0 1-.333-.088L.336 13.825a.667.667 0 0 1-.246-.244.667.667 0 0 1-.09-.336L.019 2.292a.667.667 0 0 1 .998-.577l7.23 4.153a.667.667 0 0 0 .665 0l7.228-4.153a.666.666 0 0 1 .333-.088.666.666 0 0 1 .333.09.667.667 0 0 1 .244.244.667.667 0 0 1 .088.333V13.25c0 .117-.03.232-.089.334a.667.667 0 0 1-.245.244l-3.785 2.18a.667.667 0 0 0-.245.245.666.666 0 0 0-.089.334.667.667 0 0 0 .09.334.666.666 0 0 0 .247.244l2.088 1.189a.67.67 0 0 0 .33.087.667.667 0 0 0 .332-.089l4.457-2.56Zm.438-9.828a.666.666 0 0 0 .09.335.666.666 0 0 0 .248.244.667.667 0 0 0 .67-.008l2.001-1.2a.666.666 0 0 0 .237-.243.667.667 0 0 0 .087-.329V2.32a.667.667 0 0 0-.091-.335.667.667 0 0 0-.584-.33.667.667 0 0 0-.334.094l-2 1.2a.666.666 0 0 0-.238.243.668.668 0 0 0-.086.329v2.445Z"},bootstrap:{hex:"7952B3",path:"M11.77 11.24H9.956V8.202h2.152c1.17 0 1.834.522 1.834 1.466 0 1.008-.773 1.572-2.174 1.572zm.324 1.206H9.957v3.348h2.231c1.459 0 2.232-.585 2.232-1.685s-.795-1.663-2.326-1.663zM24 11.39v1.218c-1.128.108-1.817.944-2.226 2.268-.407 1.319-.463 2.937-.42 4.186.045 1.3-.968 2.5-2.337 2.5H4.985c-1.37 0-2.383-1.2-2.337-2.5.043-1.249-.013-2.867-.42-4.186-.41-1.324-1.1-2.16-2.228-2.268V11.39c1.128-.108 1.819-.944 2.227-2.268.408-1.319.464-2.937.42-4.186-.045-1.3.968-2.5 2.338-2.5h14.032c1.37 0 2.382 1.2 2.337 2.5-.043 1.249.013 2.867.42 4.186.409 1.324 1.098 2.16 2.226 2.268zm-7.927 2.817c0-1.354-.953-2.333-2.368-2.488v-.057c1.04-.169 1.856-1.135 1.856-2.213 0-1.537-1.213-2.538-3.062-2.538h-4.16v10.172h4.181c2.218 0 3.553-1.086 3.553-2.876z"},sass:{hex:"CC6699",path:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zM9.615 15.998c.175.645.156 1.248-.024 1.792l-.065.18c-.024.061-.052.12-.078.176-.14.29-.326.56-.555.81-.698.759-1.672 1.047-2.09.805-.45-.262-.226-1.335.584-2.19.871-.918 2.12-1.509 2.12-1.509v-.003l.108-.061zm9.911-10.861c-.542-2.133-4.077-2.834-7.422-1.645-1.989.707-4.144 1.818-5.693 3.267C4.568 8.48 4.275 9.98 4.396 10.607c.427 2.211 3.457 3.657 4.703 4.73v.006c-.367.18-3.056 1.529-3.686 2.925-.675 1.47.105 2.521.615 2.655 1.575.436 3.195-.36 4.065-1.649.84-1.261.766-2.881.404-3.676.496-.135 1.08-.195 1.83-.104 2.101.24 2.521 1.56 2.43 2.1-.09.539-.523.854-.674.944-.15.091-.195.12-.181.181.015.09.091.09.21.075.165-.03 1.096-.45 1.141-1.471.045-1.29-1.186-2.729-3.375-2.7-.9.016-1.471.091-1.875.256-.03-.045-.061-.075-.105-.105-1.35-1.455-3.855-2.475-3.75-4.41.03-.705.285-2.564 4.8-4.814 3.705-1.846 6.661-1.335 7.171-.21.733 1.604-1.576 4.59-5.431 5.024-1.47.165-2.235-.404-2.431-.615-.209-.225-.239-.24-.314-.194-.12.06-.045.255 0 .375.12.3.585.825 1.396 1.095.704.225 2.43.359 4.5-.45 2.324-.899 4.139-3.405 3.614-5.505l.073.067z"},drizzle:{hex:"C5F74F",path:"M5.353 11.823a1.036 1.036 0 0 0-.395-1.422 1.063 1.063 0 0 0-1.437.399L.138 16.702a1.035 1.035 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.398l3.383-5.903Zm11.216 0a1.036 1.036 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.399l-3.382 5.902a1.036 1.036 0 0 0 .394 1.422c.506.283 1.15.104 1.438-.398l3.382-5.903Zm7.293-4.525a1.036 1.036 0 0 0-.395-1.422 1.062 1.062 0 0 0-1.437.399l-3.383 5.902a1.036 1.036 0 0 0 .395 1.422 1.063 1.063 0 0 0 1.437-.399l3.383-5.902Zm-11.219 0a1.035 1.035 0 0 0-.394-1.422 1.064 1.064 0 0 0-1.438.398l-3.382 5.903a1.036 1.036 0 0 0 .394 1.422c.506.282 1.15.104 1.438-.399l3.382-5.902Z"},supabase:{hex:"3FCF8E",path:"M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"},firebase:{hex:"DD2C00",path:"M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"},bun:{hex:"000000",path:"M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z"},deno:{hex:"70FFAF",path:"M1.105 18.02A11.9 11.9 0 0 1 0 12.985q0-.698.078-1.376a12 12 0 0 1 .231-1.34A12 12 0 0 1 4.025 4.02a12 12 0 0 1 5.46-2.771 12 12 0 0 1 3.428-.23c1.452.112 2.825.477 4.077 1.05a12 12 0 0 1 2.78 1.774 12.02 12.02 0 0 1 4.053 7.078A12 12 0 0 1 24 12.985q0 .454-.036.914a12 12 0 0 1-.728 3.305 12 12 0 0 1-2.38 3.875c-1.33 1.357-3.02 1.962-4.43 1.936a4.4 4.4 0 0 1-2.724-1.024c-.99-.853-1.391-1.83-1.53-2.919a5 5 0 0 1 .128-1.518c.105-.38.37-1.116.76-1.437-.455-.197-1.04-.624-1.226-.829-.045-.05-.04-.13 0-.183a.155.155 0 0 1 .177-.053c.392.134.869.267 1.372.35.66.111 1.484.25 2.317.292 2.03.1 4.153-.813 4.812-2.627s.403-3.609-1.96-4.685-3.454-2.356-5.363-3.128c-1.247-.505-2.636-.205-4.06.582-3.838 2.121-7.277 8.822-5.69 15.032a.191.191 0 0 1-.315.19 12 12 0 0 1-1.25-1.634 12 12 0 0 1-.769-1.404M11.57 6.087c.649-.051 1.214.501 1.31 1.236.13.979-.228 1.99-1.41 2.013-1.01.02-1.315-.997-1.248-1.614.066-.616.574-1.575 1.35-1.635"},nuxt:{hex:"00DC82",path:"M13.4642 19.8295h8.9218c.2834 0 .5618-.0723.8072-.2098a1.5899 1.5899 0 0 0 .5908-.5732 1.5293 1.5293 0 0 0 .216-.783 1.529 1.529 0 0 0-.2167-.7828L17.7916 7.4142a1.5904 1.5904 0 0 0-.5907-.573 1.6524 1.6524 0 0 0-.807-.2099c-.2833 0-.5616.0724-.807.2098a1.5904 1.5904 0 0 0-.5907.5731L13.4642 9.99l-2.9954-5.0366a1.5913 1.5913 0 0 0-.591-.573 1.6533 1.6533 0 0 0-.8071-.2098c-.2834 0-.5617.0723-.8072.2097a1.5913 1.5913 0 0 0-.591.573L.2168 17.4808A1.5292 1.5292 0 0 0 0 18.2635c-.0001.2749.0744.545.216.783a1.59 1.59 0 0 0 .5908.5732c.2454.1375.5238.2098.8072.2098h5.6003c2.219 0 3.8554-.9454 4.9813-2.7899l2.7337-4.5922L16.3935 9.99l4.3944 7.382h-5.8586ZM7.123 17.3694l-3.9083-.0009 5.8586-9.8421 2.9232 4.921-1.9572 3.2892c-.7478 1.1967-1.5972 1.6328-2.9163 1.6328z"},stripe:{hex:"635BFF",path:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"},twilio:{hex:"F22F46",path:"M12 0C5.381-.008.008 5.352 0 11.971V12c0 6.64 5.359 12 12 12 6.64 0 12-5.36 12-12 0-6.641-5.36-12-12-12zm0 20.801c-4.846.015-8.786-3.904-8.801-8.75V12c-.014-4.846 3.904-8.786 8.75-8.801H12c4.847-.014 8.786 3.904 8.801 8.75V12c.015 4.847-3.904 8.786-8.75 8.801H12zm5.44-11.76c0 1.359-1.12 2.479-2.481 2.479-1.366-.007-2.472-1.113-2.479-2.479 0-1.361 1.12-2.481 2.479-2.481 1.361 0 2.481 1.12 2.481 2.481zm0 5.919c0 1.36-1.12 2.48-2.481 2.48-1.367-.008-2.473-1.114-2.479-2.48 0-1.359 1.12-2.479 2.479-2.479 1.361-.001 2.481 1.12 2.481 2.479zm-5.919 0c0 1.36-1.12 2.48-2.479 2.48-1.368-.007-2.475-1.113-2.481-2.48 0-1.359 1.12-2.479 2.481-2.479 1.358-.001 2.479 1.12 2.479 2.479zm0-5.919c0 1.359-1.12 2.479-2.479 2.479-1.367-.007-2.475-1.112-2.481-2.479 0-1.361 1.12-2.481 2.481-2.481 1.358 0 2.479 1.12 2.479 2.481z"},reactquery:{hex:"FF4154",path:"M6.9297 13.6875c.164-.0938.375-.0352.4687.1328l.0625.1055c.4805.8515.9805 1.6601 1.5 2.4258.6133.9023 1.3047 1.8164 2.0743 2.7421a.3455.3455 0 0 1-.0391.4844l-.0742.0664c-2.543 2.2227-4.1914 2.664-4.9532 1.332-.746-1.3046-.4765-3.6718.8086-7.1093a.3437.3437 0 0 1 .1524-.1797ZM17.75 16.3008c.1836-.0313.3594.086.3945.2695l.0196.1016c.6289 3.2851.1875 4.9297-1.3243 4.9297-1.4804 0-3.3593-1.4024-5.6484-4.2032a.3271.3271 0 0 1-.0742-.2226c0-.1875.1562-.3399.3437-.3399h.1211a32.9838 32.9838 0 0 0 2.8086-.0976c1.0703-.086 2.1914-.2305 3.3594-.4375zm.871-6.9766a.3528.3528 0 0 1 .4454-.211l.1016.0352c3.2617 1.1094 4.5039 2.332 3.7187 3.6641-.7656 1.3047-2.9922 2.254-6.6836 2.8477-.082.0117-.168-.004-.2383-.047-.168-.0976-.2265-.3085-.125-.4765l.0625-.1054c.504-.8438.957-1.6836 1.3672-2.5235.4766-.9883.9297-2.0508 1.3516-3.1836zM7.797 8.3398c.082-.0117.168.004.2383.047.168.0976.2265.3085.125.4765l-.0625.1054a34.0882 34.0882 0 0 0-1.3672 2.5235c-.4766.9883-.9297 2.0508-1.3516 3.1836a.3528.3528 0 0 1-.4453.211l-.1016-.0352c-3.2617-1.1094-4.5039-2.332-3.7187-3.6641.7656-1.3047 2.9922-2.254 6.6836-2.8477Zm5.2812-3.9843c2.543-2.2227 4.1914-2.664 4.9532-1.332.746 1.3046.4765 3.6718-.8086 7.1093a.3436.3436 0 0 1-.1524.1797c-.164.0938-.375.0352-.4687-.1328l-.0625-.1055c-.4805-.8515-.9805-1.6601-1.5-2.4258-.6133-.9023-1.3047-1.8164-2.0743-2.7421a.3455.3455 0 0 1 .0391-.4844Zm-5.793-2.082c1.4805 0 3.3633 1.4023 5.6485 4.203a.3488.3488 0 0 1 .0781.2188c-.0039.1914-.1562.3438-.3476.3438l-.1172-.004a34.5835 34.5835 0 0 0-2.8086.1016c-1.0742.086-2.1953.2305-3.3633.4375a.343.343 0 0 1-.3945-.2734l-.0196-.0977c-.629-3.2851-.1876-4.9297 1.3242-4.9297Zm2.8711 5.8124h3.6875a.638.638 0 0 1 .5508.3164l1.8477 3.2188a.6437.6437 0 0 1 0 .6289l-1.8477 3.2227a.638.638 0 0 1-.5507.3164h-3.6875c-.2266 0-.4375-.1211-.547-.3164L7.7579 12.25a.6437.6437 0 0 1 0-.629l1.8516-3.2187c.1093-.1953.3203-.3164.5468-.3164Zm3.2305.793a.638.638 0 0 1 .5508.3164l1.3906 2.4258a.6437.6437 0 0 1 0 .6289l-1.3906 2.4297a.638.638 0 0 1-.5508.3164h-2.7734c-.2266 0-.4375-.1211-.5469-.3164L8.672 12.25a.6437.6437 0 0 1 0-.629l1.3945-2.4257c.1094-.1953.3203-.3164.5469-.3164Zm-.4922.8672h-1.789c-.2266 0-.4336.1172-.547.3164l-.8983 1.5586a.6437.6437 0 0 0 0 .6289l.8984 1.5625a.6317.6317 0 0 0 .5469.3164h1.789a.6317.6317 0 0 0 .547-.3164l.8983-1.5625a.6437.6437 0 0 0 0-.629l-.8984-1.5585c-.1133-.1992-.3203-.3164-.5469-.3164Zm-.4765.8281c.2265 0 .4375.1211.5468.3164l.422.7305c.1132.1953.1132.4375 0 .6289l-.422.7344c-.1093.1953-.3203.3164-.5468.3164h-.836a.6317.6317 0 0 1-.5468-.3164l-.422-.7344c-.1132-.1914-.1132-.4336 0-.629l.422-.7304a.6317.6317 0 0 1 .5468-.3164zm-.418.8164a.548.548 0 0 0-.4727.2735c-.0976.168-.0976.375 0 .5468a.5444.5444 0 0 0 .4727.2696.5444.5444 0 0 0 .4727-.2696c.0976-.1718.0976-.3789 0-.5468A.548.548 0 0 0 12 11.3906Zm-4.4219.5469h.9805M18.9805 7.75c.3906-1.8945.4765-3.3438.2226-4.3984-.1484-.629-.4218-1.1368-.8398-1.5078-.4414-.3907-1-.582-1.625-.582-1.0352 0-2.1211.4726-3.2813 1.3671-.4726.3633-.9648.8047-1.4726 1.3164-.043-.0508-.086-.1015-.1367-.1445-1.4454-1.2852-2.6602-2.082-3.6993-2.3906-.6171-.1836-1.1953-.1993-1.7226-.0235-.5586.1875-1.004.5742-1.3164 1.1172-.5156.8945-.6524 2.0742-.461 3.5274.0782.5898.2149 1.2343.4024 1.9335a1.1187 1.1187 0 0 0-.2149.047C3.008 8.621 1.711 9.2694.9258 10.0155c-.4649.4414-.7695.9375-.8828 1.4805-.1133.5781 0 1.1562.3125 1.6992.5156.8945 1.4648 1.5977 2.8164 2.1563.543.2226 1.1562.4257 1.8437.6093a1.0227 1.0227 0 0 0-.0703.2266c-.3906 1.8906-.4765 3.3438-.2226 4.3945.1484.629.4257 1.1407.8398 1.5078.4414.3907 1 .582 1.625.582 1.0352 0 2.121-.4726 3.2813-1.3632.4765-.3711.9726-.8164 1.4882-1.336a1.2 1.2 0 0 0 .1953.2266c1.4454 1.2852 2.6602 2.082 3.6993 2.3906.6172.1836 1.1953.1993 1.7226.0235.5586-.1875 1.004-.5742 1.3164-1.1172.5157-.8945.6524-2.0742.461-3.5273-.082-.6133-.2227-1.2813-.4258-2.0118a1.2248 1.2248 0 0 0 .2383-.0468c1.828-.6094 3.125-1.2578 3.9101-2.004.4649-.4413.7696-.9374.8828-1.4804.1133-.5781 0-1.1563-.3125-1.6992-.5156-.8946-1.4648-1.5977-2.8164-2.1563-.5586-.2304-1.1953-.4414-1.9062-.625a.8647.8647 0 0 0 .0586-.1953z"},reacthookform:{hex:"EC5990",path:"M10.7754 17.3477H5.8065a.2815.2815 0 1 0 0 .563h4.9689a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9688a.2815.2815 0 1 0 0 .563h4.9688a.2815.2815 0 0 0 0-.563zm-7.3336-6.475H5.8065a.2815.2815 0 1 0 0 .563h4.9548a.2815.2815 0 1 0 0-.563zm7.3195 0h-4.9547a.2815.2815 0 1 0 0 .563h4.9547a.2815.2815 0 0 0 0-.563zm.5518-9.2001h-4.341a2.4042 2.4042 0 0 0-4.5804 0H5.3674c-1.7103 0-3.0968 1.3864-3.0968 3.0967v16.134C2.2706 22.6135 3.6571 24 5.3674 24h13.2652c1.7103 0 3.0968-1.3865 3.0968-3.0967V4.7693c0-1.7103-1.3865-3.0967-3.0968-3.0967zm-8.7046.563a.2815.2815 0 0 0 .2815-.2224 1.8411 1.8411 0 0 1 3.5979 0 .2815.2815 0 0 0 .2815.2224h1.5146v1.844a.8446.8446 0 0 1-.8446.8446H9.2552a.8446.8446 0 0 1-.8446-.8446v-1.844Zm11.2383 18.6677c0 1.3993-1.1344 2.5337-2.5337 2.5337H5.3674c-1.3993 0-2.5337-1.1344-2.5337-2.5337V4.7693c0-1.3993 1.1344-2.5337 2.5337-2.5337h2.4802v1.844c0 .7774.6302 1.4076 1.4076 1.4076h5.4896c.7774 0 1.4076-.6302 1.4076-1.4076v-1.844h2.4802c1.3993 0 2.5337 1.1344 2.5337 2.5337z"}},Th={shipped:"Released",merged:"Merged, not released yet",building:"Being built",designed:"Designed, not built yet",coming:"Coming"};function $T(){const e=zk(),t=Ia({from:"/architecture"}),s=Hs(),i=t.view??"map",[o,l]=E.useState(new Set),[c,u]=E.useState(null),[h,p]=E.useState(!1),[m,f]=E.useState(null),x=t.adr?t.adr.startsWith("ADR-")?{kind:"adr",id:t.adr}:{kind:"ticket",id:t.adr}:null,y=O=>void s({to:"/architecture",search:{...(O.view??i)!=="map"?{view:O.view??i}:{},..."pick"in O?O.pick?{adr:O.pick.id}:{}:t.adr?{adr:t.adr}:{}},replace:!0}),k=O=>y({pick:x?.id===O?.id?null:O}),w=e.data?.decisions??[],j=e.data?.tickets??[],N=E.useMemo(()=>XT(w,j),[w,j]),S=N.cols.length,T=c??S;if(E.useEffect(()=>{if(!h)return;const O=setInterval(()=>{u(U=>{const ne=(U??0)+1;return ne>=S?(p(!1),null):ne})},700);return()=>clearInterval(O)},[h,S]),!e.data)return n.jsx("div",{className:"top",children:n.jsx("h1",{children:"Architecture"})});const A=w.filter(O=>N.colOf(O.from)<T),q=A.filter(O=>!O.replacedBy||N.colOf(u3(w,O.replacedBy))>=T),R=N.cols.slice(0,T).reduce((O,U)=>O+(U.t?.follows.length??0),0),M=m?m.startsWith("ADR-")?{kind:"adr",id:m}:{kind:"ticket",id:m}:x,L=JT(M,w,j),B=i==="map"||i==="timeline",z=e.data.lessons??[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Architecture"}),n.jsx("span",{className:"note",children:"Every technical choice the squad made, why, and what it shaped. Every new ticket follows the rules in force."})]}),n.jsx("div",{className:"ptabs",role:"tablist",children:[["map","Map"],["timeline","Timeline"],["stack","Stack",e.data.stack.length],["list","All decisions",w.length],["project","Project map"],["lessons","Lessons",z.length]].map(([O,U,ne])=>n.jsxs("button",{role:"tab","aria-selected":i===O,className:i===O?"on":"",onClick:()=>y({view:O}),children:[U," ",ne!==void 0&&n.jsx("span",{className:"n",children:ne})]},O))}),n.jsxs("div",{className:"split",children:[n.jsx("div",{className:"scroll",children:n.jsxs("div",{className:"arch",children:[B&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"arch-stats",children:[n.jsx(hl,{n:q.length,label:"Rules in force",hint:"Every new design must follow these"}),n.jsx(hl,{n:A.length-q.length,label:"Replaced",hint:"Changed by a newer decision"}),n.jsx(hl,{n:q.filter(O=>O.checkedBy?.passing).length,label:"Checked by a test",hint:"Break one and nothing ships"}),n.jsx(hl,{n:R,label:"Times a design followed one",hint:"Past choices shaping new work"})]}),n.jsxs("div",{className:"arch-bar",children:[n.jsxs("button",{className:"btn",onClick:()=>h?p(!1):(u(c===null||c>=S?1:c),p(!0)),children:[h?n.jsx($2,{size:14}):n.jsx(Wh,{size:14})," ",h?"Pause":"Play the history"]}),n.jsx("input",{type:"range",min:1,max:S,value:T,"aria-label":"Show the project up to this ticket",onChange:O=>{p(!1);const U=Number(O.target.value);u(U>=S?null:U)}}),n.jsx("span",{className:"note mono",style:{minWidth:110},children:T>=S?"Today":`Up to ${N.cols[T-1]?.label??""}`}),n.jsx("span",{className:"grow"}),[...hc,"Other"].filter(O=>w.some(U=>(U.area??"Other")===O)).map(O=>n.jsxs("button",{className:`chip area-${O.toLowerCase()} ${o.has(O)?"on":""}`,onClick:()=>l(U=>{const ne=new Set(U);return ne.has(O)?ne.delete(O):ne.add(O),ne}),children:[n.jsx("i",{})," ",O]},O))]})]}),i==="map"&&n.jsx(WT,{decisions:w.filter(O=>o.size===0||o.has(O.area??"Other")),tickets:j,visible:O=>N.colOf(O.from)<T,related:L,picked:x?.id??null,onPick:k,onHover:f}),i==="timeline"&&n.jsx(KT,{decisions:w,tickets:j,areas:o,shown:T,related:L,picked:x?.id??null,onPick:k,g:N}),B&&n.jsx(UT,{view:i}),i==="map"&&n.jsx(QT,{decisions:w,tickets:j,onPick:k}),i==="stack"&&n.jsx(OT,{data:e.data,picked:x?.id??null,onPick:k}),i==="list"&&n.jsx(GT,{decisions:w,picked:x?.id??null,onPick:k}),i==="project"&&n.jsxs("div",{style:{maxWidth:820},children:[n.jsxs("p",{className:"note",style:{marginBottom:8,display:"flex",gap:8,alignItems:"center"},children:[n.jsx(xk,{size:15})," The Architect writes this from the code and reads it again after every merge. Every agent reads it first, then opens only the files it needs."]}),n.jsx(c3,{reading:e.data.reading}),e.data.map.map(O=>n.jsxs("div",{className:"maprow",children:[n.jsx("b",{children:O.area}),n.jsx("span",{children:O.detail})]},O.area))]}),i==="lessons"&&n.jsxs("div",{style:{maxWidth:820},children:[n.jsx("p",{className:"note",style:{marginBottom:8},children:"Learned from bugs and reviews. Each lesson makes the next ticket better."}),z.length===0&&n.jsx("p",{className:"note",children:"No lessons yet."}),z.map(O=>n.jsxs("div",{className:"lesson",children:[n.jsx("span",{className:"glyph sm",children:n.jsx(mk,{size:12})}),n.jsxs("span",{children:[O.text," ",n.jsxs("span",{className:"note",children:["From ",O.from]})]}),n.jsx("span",{className:"mono",children:Sr(O.date)})]},O.id))]})]})}),i!=="project"&&i!=="lessons"&&n.jsx(YT,{pick:x,decisions:w,tickets:j,impact:e.data.impact??[],onPick:k})]})]})}const l3=[{role:"Language",label:"Language and runtime"},{role:"Framework",label:"App framework"},{role:"Interface",label:"Screens"},{role:"Data",label:"Data"},{role:"Services",label:"Outside services"},{role:"Testing",label:"Testing"},{role:"Tooling",label:"Tooling"}];function OT({data:e,picked:t,onPick:s}){const i=e.stack.filter(l=>!l.decisions.length&&!l.via).length,o=e.stack.filter(l=>!l.decisions.length&&l.via).length;return n.jsxs("div",{className:"stackv",children:[n.jsx(c3,{reading:e.reading}),n.jsxs("div",{className:"stack-sum",children:[n.jsxs("span",{children:[n.jsx("b",{children:e.stack.length})," technologies in the code"]}),n.jsxs("span",{children:[n.jsx("b",{children:e.stack.length-i-o})," chosen by a saved decision"]}),o>0&&n.jsxs("span",{children:[n.jsx("b",{children:o})," came with one of those"]}),i>0&&n.jsxs("span",{className:"ahead",children:[n.jsx("b",{children:i})," picked while building, no decision yet"]}),n.jsxs("span",{children:[n.jsx("b",{children:e.patterns.length})," design patterns"]})]}),e.stack.length===0&&n.jsx("p",{className:"note",children:"None found yet. The Architect lists them when it reads the code."}),n.jsxs("section",{className:"stack-group",children:[n.jsx("h3",{children:"Technologies"}),n.jsx("div",{className:"techs",children:l3.flatMap(l=>e.stack.filter(c=>c.role===l.role)).map(l=>n.jsx(DT,{t:l,picked:t,onPick:s},l.name))})]}),n.jsxs("section",{className:"stack-group",children:[n.jsx("h3",{children:"Design patterns the code follows"}),e.patterns.length===0&&n.jsx("p",{className:"note",children:"Not read yet. Press Read the code again, and the Architect lists the patterns a new developer must keep."}),n.jsx("div",{className:"patterns",children:e.patterns.map(l=>n.jsxs("div",{className:"pattern",children:[n.jsx("span",{className:"glyph sm",children:n.jsx(Ck,{size:13})}),n.jsxs("div",{children:[n.jsx("b",{children:l.name}),n.jsx("p",{children:l.what}),n.jsxs("div",{className:"where",children:[l.where.map(c=>n.jsx("code",{children:c},c)),l.decision&&n.jsxs("button",{className:`pill click ${t===l.decision?"on":""}`,onClick:()=>s({kind:"adr",id:l.decision}),children:["From ",l.decision]})]})]})]},l.name))})]})]})}function DT({t:e,picked:t,onPick:s}){const i=e.icon?FT[e.icon]:void 0;return n.jsxs("div",{className:`tech ${e.decisions.some(o=>o===t)?"picked":""}`,children:[n.jsxs("div",{className:"tech-head",children:[n.jsx("span",{className:"logo",style:i?{"--brand":`#${i.hex}`}:void 0,children:i?n.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:qT(i.hex)?"ink":"",children:n.jsx("path",{d:i.path})}):n.jsx("span",{className:"mono",children:e.name.slice(0,2)})}),n.jsxs("span",{className:"tech-name",children:[n.jsx("b",{children:e.name}),e.version&&n.jsxs("span",{className:"mono",children:["v",e.version]})]}),n.jsx("span",{className:"tech-role",children:l3.find(o=>o.role===e.role)?.label})]}),n.jsx("p",{className:e.why?"":"note",children:e.why??"Not explained yet. The Architect fills this in when it reads the code."}),n.jsx("div",{className:"tech-foot",children:e.decisions.length?e.decisions.map(o=>n.jsxs("button",{className:`pill click ${t===o?"on":""}`,onClick:()=>s({kind:"adr",id:o}),children:["Chosen in ",o]},o)):e.via?e.via.decisions.map(o=>n.jsxs("button",{className:`pill click ${t===o?"on":""}`,onClick:()=>s({kind:"adr",id:o}),title:`Choosing ${e.via.name} chose ${e.name} too`,children:["Comes with ",e.via.name," · ",o]},o)):n.jsx(BT,{t:e})})]})}function BT({t:e}){const t=Se(),s=(o,l)=>t.mutate({path:"/api/v1/architecture/decide",body:{tech:e.name,do:o},done:l}),i=e.draft;if(i?.status==="writing"||t.isPending&&!i)return n.jsxs("span",{className:"pill nodecision",children:[n.jsx(In,{size:12,className:"spin"})," The Architect is writing it"]});if(i?.status==="ready"&&i.decision){const o=i.decision;return n.jsxs("div",{className:"techdraft",children:[n.jsx("span",{className:"lbl",children:"Decision for you to approve"}),n.jsx("b",{children:o.title}),n.jsxs("p",{children:[n.jsx("span",{className:"note",children:"Chosen:"})," ",o.chosen]}),n.jsx("p",{children:o.why}),o.options.filter(l=>l!==o.chosen).length>0&&n.jsxs("p",{className:"note",children:["Also looked at: ",o.options.filter(l=>l!==o.chosen).join("; ")]}),n.jsxs("div",{className:"row",children:[n.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>s("approve","Saved as a decision. Every new ticket follows it now."),children:[n.jsx(Ce,{size:13})," Approve"]}),n.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>s("discard"),children:"Discard"})]})]})}return n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pill nodecision",title:i?.status==="failed"?`The last try stopped: ${i.error??""}`:"The Builder added it while building; nobody wrote down why.",children:i?.status==="failed"?"Writing stopped, try again":"Picked while building"}),n.jsx("button",{className:"btn sm",onClick:()=>s("write",`The Architect is writing a decision for ${e.name}.`),children:"Save as a decision"})]})}function qT(e){const t=parseInt(e,16);return(t>>16&255)*.299+(t>>8&255)*.587+(t&255)*.114<60}function c3({reading:e}){const t=Se(),s=e?.status==="pending"||e?.status==="running"||t.isPending;return n.jsxs("div",{className:`reading ${e?.status==="failed"?"bad":""}`,children:[s?n.jsx(In,{size:15,className:"spin"}):n.jsx(Il,{size:15}),n.jsx("span",{children:s?"The Architect is reading the code. This takes a minute or two.":e?.status==="failed"?`The last read stopped: ${e.error??"unknown error"}`:e?.at?`Read from the code ${Un(e.at)}. It is read again after every merge.`:"Not read from the code yet."}),n.jsx("span",{className:"grow"}),n.jsxs("button",{className:"btn sm",disabled:s,onClick:()=>t.mutate({path:"/api/v1/architecture/read",done:"The Architect is reading the code."}),children:[n.jsx(Il,{size:13})," Read the code again"]})]})}function hl({n:e,label:t,hint:s}){return n.jsxs("div",{className:"arch-stat",title:s,children:[n.jsx("b",{children:e}),n.jsx("span",{children:t}),n.jsx("small",{children:s})]})}function UT({view:e}){return e==="map"?n.jsxs("div",{className:"arch-legend note",children:[n.jsxs("span",{children:[n.jsx("i",{className:"lg arrow"})," Built on"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg arrow replaces"})," Replaces"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg chip made"})," Ticket that made it"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg chip"})," Ticket that followed it"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg chip ahead"})," Will follow it, not built yet"]}),n.jsxs("span",{children:[n.jsx(Ce,{size:12,strokeWidth:3})," Checked by a test"]})]}):n.jsxs("div",{className:"arch-legend note",children:[n.jsxs("span",{children:[n.jsx("i",{className:"lg node"})," Made the decision"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg dot"})," Its design followed it"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg dot open"})," Will follow it, not built yet"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg link"})," Built on an older one"]}),n.jsxs("span",{children:[n.jsx("i",{className:"lg link replaces"})," Replaces an older one"]})]})}const ni=112,qd=18,da=16,Fg=34;function WT({decisions:e,tickets:t,visible:s,related:i,picked:o,onPick:l,onHover:c}){const[u,h]=E.useState(1100),p=E.useRef(null);E.useEffect(()=>{const L=p.current;if(!L)return;const B=new ResizeObserver(()=>h(L.clientWidth));return B.observe(L),()=>B.disconnect()},[]);const m=new Set(e.map(L=>L.id)),f=L=>[...L.buildsOn??[],...L.replaces?[L.replaces]:[]].filter(B=>m.has(B)),x=new Map,y=(L,B=new Set)=>{if(x.has(L.id))return x.get(L.id);if(B.has(L.id))return 0;B.add(L.id);const z=f(L).map(U=>e.find(ne=>ne.id===U)),O=z.length?1+Math.max(...z.map(U=>y(U,B))):0;return x.set(L.id,O),O},k=[...hc,"Other"],w=[];for(const L of e)(w[y(L)]??=[]).push(L);const j=w.length>4?30:46,N=Math.max(150,Math.min(270,(u-da*2-Math.max(0,w.length-1)*j)/Math.max(1,w.length)));for(const L of w)L?.sort((B,z)=>k.indexOf(B.area??"Other")-k.indexOf(z.area??"Other")||$g(B.id)-$g(z.id));const S=Math.max(1,...w.map(L=>L?.length??0)),T=Fg+S*(ni+qd)+da,A=new Map;w.forEach((L,B)=>{const z=(S-(L?.length??0))*(ni+qd)/2;L?.forEach((O,U)=>A.set(O.id,{x:da+B*(N+j),y:Fg+z+U*(ni+qd)}))});const q=da*2+w.length*N+Math.max(0,w.length-1)*j,R=L=>i!==null&&!i.has(L),M=["Starting points","Built on them","One more level","And on those","And further"];return n.jsx("div",{className:"dmap",ref:p,onMouseLeave:()=>c(null),children:n.jsxs("div",{className:"dmap-canvas",style:{width:q,height:T},children:[w.map((L,B)=>n.jsx("span",{className:"dmap-layer",style:{left:da+B*(N+j),width:N},children:M[B]??`Level ${B+1}`},B)),n.jsxs("svg",{width:q,height:T,className:"dmap-edges",children:[n.jsxs("defs",{children:[n.jsx("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:n.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead"})}),n.jsx("marker",{id:"arr-r",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:n.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead replaces"})})]}),e.flatMap(L=>{const B=A.get(L.id);return!B||!s(L)?[]:[...(L.buildsOn??[]).map(O=>({p:O,kind:"built"})),...L.replaces?[{p:L.replaces,kind:"replaces"}]:[]].map(({p:O,kind:U})=>{const ne=A.get(O),Z=e.find($=>$.id===O);if(!ne||!Z||!s(Z))return null;const X=ne.x+N,he=ne.y+ni/2,ce=B.x-2,Q=B.y+ni/2,se=Math.max(40,(ce-X)/2),P=i!==null&&i.has(L.id)&&i.has(O);return n.jsx("path",{className:`edge ${U} ${R(L.id)||R(O)?"off":""} ${P?"lit":""}`,d:`M${X} ${he} C${X+se} ${he}, ${ce-se} ${Q}, ${ce} ${Q}`,markerEnd:`url(#${U==="replaces"?"arr-r":"arr"})`},`${O}-${L.id}-${U}`)})})]}),e.map(L=>{const B=A.get(L.id),z=L.tickets.filter(Z=>Z!==L.from),O=t.filter(Z=>(Z.state==="designed"||Z.state==="coming")&&Z.follows.includes(L.id)&&!z.includes(Z.id)),U=[L.from==="Project scan"?"Scan":L.from,...z],ne=U.length+O.length-6;return n.jsxs("button",{className:`dcard area-${(L.area??"Other").toLowerCase()} ${s(L)?"":"later"} ${R(L.id)?"off":""} ${o===L.id?"picked":""} ${L.replacedBy?"old":""}`,style:{left:B.x,top:B.y,width:N,height:ni},onClick:()=>l({kind:"adr",id:L.id}),onMouseEnter:()=>c(L.id),children:[n.jsxs("span",{className:"dhead",children:[n.jsx("i",{}),n.jsx("span",{className:"mono",children:L.id}),n.jsx("span",{className:"darea",children:L.area??"Other"}),L.checkedBy?.passing&&n.jsx(Ce,{size:13,strokeWidth:3,className:"dtest","aria-label":"Checked by a test"})]}),n.jsx("b",{className:"dtitle",children:L.title}),n.jsx("span",{className:"dchips",children:L.replacedBy?n.jsxs("span",{className:"dchip ahead",children:["Replaced by ",L.replacedBy]}):n.jsxs(n.Fragment,{children:[U.slice(0,6).map((Z,X)=>n.jsx("span",{className:`dchip ${X===0?"made":""}`,title:X===0?"Made this decision":"Its design followed it",children:Z},Z)),O.slice(0,Math.max(0,6-U.length)).map(Z=>n.jsx("span",{className:"dchip ahead",title:"Designed, not built yet: will follow it",children:Z.id},Z.id)),ne>0&&n.jsxs("span",{className:"dchip",children:["+",ne]})]})})]},L.id)})]})})}const Ud=30,HT=26,pl=250,VT=62;function KT({decisions:e,areas:t,shown:s,related:i,picked:o,onPick:l,g:c}){const[u,h]=E.useState(1e3),p=E.useRef(null);E.useEffect(()=>{const R=p.current;if(!R)return;const M=new ResizeObserver(()=>h(R.clientWidth));return M.observe(R),()=>M.disconnect()},[]);const m=c.cols.length,f=Math.max(40,Math.min(64,(u-pl-24)/Math.max(1,m))),x=c.rows.filter(R=>t.size===0||t.has(R.area)),y=new Map;let k=VT+8,w="";const j=[];for(const R of x)R.area!==w&&(w=R.area,k+=HT,j.push({area:R.area,y:k-18})),y.set(R.d.id,k),k+=Ud;const N=k+12,S=pl+m*f+16,T=R=>pl+R*f+f/2,A=R=>R<s,q=R=>i!==null&&!i.has(R);return n.jsx("div",{className:"arch-graph",ref:p,children:n.jsxs("svg",{width:S,height:N,role:"img","aria-label":"Decisions over time, and the tickets that followed them",children:[c.cols.map((R,M)=>n.jsxs("g",{className:`col state-${R.t?.state??"scan"} ${A(M)?"":"later"} ${q(R.key)?"dim":""}`,onClick:()=>R.t&&l({kind:"ticket",id:R.key}),children:[n.jsx("rect",{className:"colbg",x:pl+M*f+2,y:6,width:f-4,height:N-12,rx:10}),n.jsx("text",{className:"colid",x:T(M),y:26,textAnchor:"middle",children:R.label}),n.jsx("circle",{className:"colstate",cx:T(M),cy:42,r:4}),n.jsx("title",{children:R.t?`${R.t.id} · ${R.t.title}
550
- ${Th[R.t.state]}`:"What the Architect found when it first read the project"})]},R.key)),j.map(R=>n.jsx("text",{className:`lane area-${R.area.toLowerCase()}`,x:14,y:R.y,children:R.area.toUpperCase()},R.area)),x.map(R=>{const M=y.get(R.d.id),L=c.colOf(R.d.from);if(!A(L))return null;const B=R.d.replacedBy?c.colOf(u3(e,R.d.replacedBy)):m-1,z=Math.min(B,s-1),O=`track area-${R.area.toLowerCase()} ${q(R.d.id)?"dim":""} ${o===R.d.id?"picked":""}`;return n.jsxs("g",{className:O,onClick:()=>l({kind:"adr",id:R.d.id}),children:[n.jsx("rect",{className:"hit",x:0,y:M-Ud/2,width:S,height:Ud}),n.jsxs("text",{className:"name",x:14,y:M+4,children:[n.jsx("tspan",{className:"rid",children:R.d.id})," ",eP(R.d.title,28)]}),n.jsx("line",{className:`rail ${R.d.replacedBy&&B<s?"gone":""}`,x1:T(L),x2:T(z)+(R.d.replacedBy?0:f/2),y1:M,y2:M}),c.cols.map((U,ne)=>ne>L&&A(ne)&&U.t?.follows.includes(R.d.id)?n.jsx("circle",{className:`dot ${U.t.state==="designed"||U.t.state==="coming"?"open":""}`,cx:T(ne),cy:M,r:5,children:n.jsx("title",{children:`${U.t.id} followed ${R.d.id}`})},U.key):null),n.jsx("circle",{className:`node ${R.d.replacedBy?"old":""}`,cx:T(L),cy:M,r:8}),R.d.checkedBy?.passing&&n.jsx("path",{className:"tick",d:`M${T(L)-3.5} ${M} l2.5 2.6 l4.8 -5`}),n.jsx("title",{children:`${R.d.id} · ${R.d.title}
551
- Chosen: ${R.d.chosen}`})]},R.d.id)}),x.flatMap(R=>{const M=y.get(R.d.id),L=c.colOf(R.d.from);return A(L)?[...(R.d.buildsOn??[]).map(z=>({b:z,kind:"built"})),...R.d.replaces?[{b:R.d.replaces,kind:"replaces"}]:[]].map(({b:z,kind:O})=>{const U=y.get(z);if(U===void 0)return null;const ne=M>U?1:-1;return n.jsxs("g",{className:`link ${O} ${q(R.d.id)||q(z)?"dim":""}`,children:[n.jsx("path",{d:`M${T(L)} ${U+6*ne} L${T(L)} ${M-9*ne}`}),n.jsx("circle",{cx:T(L),cy:U,r:3.2})]},`${R.d.id}-${z}-${O}`)}):[]})]})})}function QT({decisions:e,tickets:t,onPick:s}){return n.jsxs("div",{className:"arch-cards",children:[n.jsxs("div",{className:"arch-card",children:[n.jsx("h4",{children:"What a new ticket inherits today"}),n.jsx("p",{className:"note",children:"The Architect, the Builder and the Reviewer read all of these before they start."}),[...hc,"Other"].map(i=>{const o=e.filter(l=>!l.replacedBy&&(l.area??"Other")===i);return o.length?n.jsxs("div",{className:`inherit area-${i.toLowerCase()}`,children:[n.jsxs("b",{children:[n.jsx("i",{})," ",i]}),o.map(l=>n.jsxs("button",{onClick:()=>s({kind:"adr",id:l.id}),children:[n.jsx("span",{className:"mono",children:l.id})," ",l.title]},l.id))]},i):null})]}),n.jsxs("div",{className:"arch-card",children:[n.jsx("h4",{children:"Coming next"}),n.jsx("p",{className:"note",children:"Tickets not built yet, and the past decisions that will shape them."}),t.filter(i=>i.state==="designed"||i.state==="coming").map(i=>n.jsxs("div",{className:"coming",children:[n.jsxs("button",{onClick:()=>s({kind:"ticket",id:i.id}),children:[n.jsx("span",{className:"mono",children:i.id})," ",i.title]}),n.jsx("span",{className:"pills",children:i.follows.length?i.follows.map(o=>n.jsx("button",{className:"pill click",onClick:()=>s({kind:"adr",id:o}),children:o},o)):n.jsxs("span",{className:"note",children:["Not designed yet. Will read the ",e.filter(o=>!o.replacedBy).length," rules in force."]})})]},i.id))]})]})}function GT({decisions:e,picked:t,onPick:s}){return n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{style:{width:90},children:"ID"}),n.jsx("th",{children:"Decision"}),n.jsx("th",{style:{width:110},children:"Area"}),n.jsx("th",{style:{width:120},children:"From"}),n.jsx("th",{style:{width:150},children:"Checked by"})]})}),n.jsx("tbody",{children:[...e].reverse().map(i=>n.jsxs("tr",{className:`click ${t===i.id?"on":""}`,onClick:()=>s({kind:"adr",id:i.id}),children:[n.jsx("td",{className:"mono",children:i.id}),n.jsxs("td",{style:{fontWeight:t===i.id?600:500,color:i.replacedBy?"var(--dim)":void 0},children:[i.replacedBy?n.jsx("s",{children:i.title}):i.title," ",i.replacedBy&&n.jsxs("span",{className:"pill wait",children:["Replaced by ",i.replacedBy]})]}),n.jsx("td",{children:n.jsxs("span",{className:`areatag area-${(i.area??"Other").toLowerCase()}`,children:[n.jsx("i",{})," ",i.area??"Other"]})}),n.jsx("td",{style:{color:"var(--muted)",fontSize:13},children:i.from}),n.jsx("td",{children:i.checkedBy?i.checkedBy.passing?n.jsxs("span",{className:"pill ok",children:[n.jsx(Ce,{size:13,strokeWidth:2.5})," A ",i.checkedBy.kind]}):n.jsx("span",{className:"pill you",children:"Test being written"}):n.jsx("span",{className:"pill wait",children:"Not checkable"})})]},i.id))})]})}function YT({pick:e,decisions:t,tickets:s,impact:i,onPick:o}){const l=f=>n.jsx("button",{className:"pill click",onClick:()=>o({kind:"adr",id:f}),children:f},f),c=f=>{const x=s.find(y=>y.id===f);return n.jsx("button",{className:`pill click st-${x?.state??"shipped"}`,title:x?`${x.title} · ${Th[x.state]}`:f,onClick:()=>o({kind:"ticket",id:f}),children:f},f)};if(e?.kind==="ticket"){const f=s.find(x=>x.id===e.id);return f?n.jsxs("aside",{className:"sidepanel arch-side",children:[n.jsxs("span",{className:"note mono",children:[f.id," · ",Th[f.state],f.release?` · ${f.release}`:""]}),n.jsx("h3",{children:f.title}),n.jsx("div",{className:"lbl",children:"Decision it made"}),f.made?n.jsxs("p",{style:{fontSize:13.5},children:[l(f.made)," ",t.find(x=>x.id===f.made)?.title]}):n.jsx("p",{className:"note",children:"None. It worked inside the rules it had."}),n.jsx("div",{className:"lbl",children:"Past decisions its design followed"}),f.follows.length?n.jsx("div",{className:"pills",children:f.follows.map(l)}):n.jsx("p",{className:"note",children:f.state==="coming"?"Not designed yet. When it is, it reads every rule in force.":"None recorded."}),n.jsx("p",{style:{marginTop:18},children:n.jsx(Ge,{to:"/board",search:{ticket:f.id},className:"btn",children:"Open the ticket"})})]}):n.jsx("aside",{className:"sidepanel arch-side",children:n.jsx("p",{className:"note",children:"That ticket is not on this board."})})}const u=e?.kind==="adr"?t.find(f=>f.id===e.id):void 0;if(!u)return n.jsxs("aside",{className:"sidepanel arch-side",children:[n.jsx("span",{className:"note mono",children:"HOW IT WORKS"}),n.jsx("h3",{children:"Every choice is remembered"}),n.jsx("p",{style:{fontSize:13.5,marginTop:8},children:"When a ticket needs a technical choice, the Architect writes it with the options and the why. You approve it with the design. From then on it is a rule: every later ticket reads it, and the tickets whose design used it are linked here."}),n.jsx("p",{style:{fontSize:13.5,marginTop:10},children:"A new decision can build on an older one, or replace it. A replaced decision stops being a rule, but its history stays."}),n.jsx("p",{className:"note",style:{marginTop:14},children:"Point at a decision to light up what it touched. Click it for the full story. Press Play to watch the project grow."})]});const h=t.filter(f=>f.buildsOn?.includes(u.id)),p=u.tickets.filter(f=>f!==u.from),m=s.filter(f=>(f.state==="designed"||f.state==="coming")&&f.follows.includes(u.id)&&!p.includes(f.id));return n.jsxs("aside",{className:"sidepanel arch-side",children:[n.jsxs("span",{className:"note mono",children:[u.id," · ",u.area??"Other"," · approved by ",u.approvedBy," · ",Sr(u.date)]}),n.jsx("h3",{children:u.title}),u.replacedBy&&n.jsxs("div",{className:"box",style:{borderColor:"var(--you-line)",background:"var(--you-soft)",marginTop:8},children:[n.jsx("b",{children:"No longer a rule."})," Replaced by ",l(u.replacedBy),"."]}),n.jsx("div",{className:"lbl",children:"Chosen"}),n.jsx("p",{style:{fontSize:13.5,fontWeight:600},children:u.chosen}),n.jsx("div",{className:"lbl",children:"Why"}),n.jsx("p",{style:{fontSize:13.5},children:u.why}),u.options.length>1&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Also looked at"}),u.options.filter(f=>f!==u.chosen).map(f=>n.jsx("p",{className:"note",style:{fontSize:13},children:f},f))]}),n.jsx("div",{className:"lbl",children:"Where it came from"}),n.jsxs("div",{className:"pills",style:{alignItems:"center"},children:[u.from==="Project scan"?n.jsx("span",{className:"pill",children:"Project scan"}):c(u.from),(u.buildsOn??[]).length>0&&n.jsx("span",{className:"note",children:"built on"}),(u.buildsOn??[]).map(l),u.replaces&&n.jsx("span",{className:"note",children:"replaces"}),u.replaces&&l(u.replaces)]}),n.jsx("div",{className:"lbl",children:"What it shaped"}),p.length||h.length?n.jsxs(n.Fragment,{children:[p.length>0&&n.jsx("p",{className:"note",style:{marginBottom:6},children:"Tickets whose design followed it"}),n.jsx("div",{className:"pills",children:p.map(c)}),h.length>0&&n.jsx("p",{className:"note",style:{margin:"10px 0 6px"},children:"Decisions built on it"}),n.jsx("div",{className:"pills",children:h.map(f=>l(f.id))})]}):n.jsx("p",{className:"note",children:"Nothing yet. Every new ticket reads it."}),m.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Still ahead"}),n.jsx("p",{className:"note",style:{marginBottom:6},children:"Designed, not built yet. They will follow it."}),n.jsx("div",{className:"pills",children:m.map(f=>c(f.id))})]}),n.jsx(ZT,{d:u,check:i.find(f=>f.adr===u.id),tk:c}),n.jsx("div",{className:"lbl",children:"Checked by"}),u.checkedBy?n.jsxs("div",{className:"box",children:[n.jsx("b",{style:{color:u.checkedBy.passing?"var(--accent)":"var(--you-ink)"},children:u.checkedBy.passing?"Passing":"Being written"})," ",n.jsx("span",{className:"mono",style:{fontSize:12},children:u.checkedBy.name}),n.jsx("p",{className:"note",style:{marginTop:4},children:"If someone breaks this decision, the checks fail and nothing ships."})]}):n.jsx("p",{className:"note",children:"A fact about the project, nothing to test."})]})}function ZT({d:e,check:t,tk:s}){const i=Se();if(e.replacedBy)return null;const o=t?.status==="pending"||t?.status==="running"||i.isPending,l=()=>i.mutate({path:"/api/v1/architecture/impact",body:{adr:e.id},done:`The Architect is checking the open tickets against ${e.id}.`});return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"lbl",children:"Tickets planned before it"}),o?n.jsxs("p",{className:"note",style:{display:"flex",gap:8,alignItems:"center"},children:[n.jsx(In,{size:13,className:"spin"})," The Architect is checking the open tickets."]}):t?.status==="done"?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"note",style:{marginBottom:6},children:t.checked?.length?`Checked ${t.checked.length} open ${t.checked.length===1?"ticket":"tickets"} ${t.at?Un(t.at):""}. ${t.affected?.length?"These need a change, waiting for you:":"None need a change."}`:"No open ticket was planned before it."}),n.jsx("div",{className:"pills",children:(t.affected??[]).map(s)}),n.jsx("button",{className:"btn sm quiet",style:{marginTop:8},onClick:l,children:"Check again"})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"note",style:{marginBottom:8},children:t?.status==="failed"?`The last check stopped: ${t.error??""}`:"Not checked yet. Plans written before it may still do it the old way."}),n.jsx("button",{className:"btn sm",onClick:l,children:"Check open tickets"})]})]})}function XT(e,t){const s=[];e.some(c=>!t.some(u=>u.id===c.from))&&s.push({key:"scan",label:"Scan"});for(const c of t)s.push({key:c.id,label:c.id,t:c});const i=c=>{const u=s.findIndex(h=>h.key===c);return u<0?0:u},o=[...hc,"Other"],l=e.map(c=>({d:c,area:c.area??"Other"})).sort((c,u)=>o.indexOf(c.area)-o.indexOf(u.area)||i(c.d.from)-i(u.d.from));return{cols:s,rows:l,colOf:i}}function u3(e,t){return e.find(s=>s.id===t)?.from??""}function JT(e,t,s){if(!e)return null;const i=new Set([e.id]),o=u=>[...u.buildsOn??[],...u.replaces?[u.replaces]:[]];if(e.kind==="ticket"){const u=s.find(h=>h.id===e.id);for(const h of u?.follows??[])i.add(h);return u?.made&&i.add(u.made),i}const l=[e.id];for(;l.length;){const u=l.pop(),h=t.find(p=>p.id===u);for(const p of h?o(h):[])i.has(p)||(i.add(p),l.push(p))}const c=[e.id];for(;c.length;){const u=c.pop();for(const h of t)o(h).includes(u)&&!i.has(h.id)&&(i.add(h.id),c.push(h.id))}for(const u of[...i]){const h=t.find(p=>p.id===u);if(h&&u===e.id)for(const p of h.tickets)i.add(p);h&&i.add(h.from)}for(const u of s)u.follows.includes(e.id)&&i.add(u.id);return i}function eP(e,t){return e.length>t?`${e.slice(0,t-1).trimEnd()}…`:e}function $g(e){return Number(e.replace(/\D/g,""))||0}function tP(){const e=Ct(),t=e.data?.ready?e.data.tickets.filter(ec):[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Waiting for you"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad inbox"})]}),n.jsx("div",{className:"scroll",children:n.jsx("div",{className:"page",children:t.length===0?n.jsxs("div",{className:"calm",children:[n.jsx("span",{className:"ring",children:n.jsx(Ce,{size:18,strokeWidth:2.5})}),n.jsxs("div",{children:[n.jsx("b",{children:"Nothing needs you right now"}),n.jsx("span",{children:"The squad is working. Questions, plans, proof and decisions land here."})]})]}):n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:t.map(s=>n.jsxs("div",{className:"wcard",style:{padding:"16px 18px 16px 22px"},children:[n.jsxs("div",{className:"grow",children:[n.jsxs("div",{className:"meta",children:[n.jsx("span",{className:"id",children:s.id}),n.jsx("span",{children:qs[s.stage]}),n.jsx("span",{children:Un(s.activity[0]?.at??s.createdAt)})]}),n.jsx("h3",{children:s.title}),n.jsx("p",{children:s.waiting?.summary??(ss(s)?`Change ${Cr(s).id} to the spec waits for you`:s.outdated?.length?Vh(s):`Looks stuck: ${s.quiet?.detail??"no progress"}`)})]}),n.jsx(ye,{text:!s.waiting&&ss(s)?`squad propose ${s.id} --approve`:Hh(s)}),s.waiting?.kind==="proof"?n.jsx(Ge,{to:"/tickets/$id/proof",params:{id:s.id},className:"btn pri sm",children:zl(s)}):n.jsx(Ge,{to:"/board",search:{ticket:s.id},className:"btn pri sm",children:s.waiting?zl(s):ss(s)?"Check the change":"Check it"})]},s.id))})})})]})}function nP(){const e=Ct(),[t,s]=E.useState(!1),i=e.data?.ready?e.data.tickets.filter(o=>o.kind==="bug"):[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"top",children:[n.jsx("h1",{children:"Bugs"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:'squad bug "What happened"'}),n.jsxs("button",{className:"btn pri",onClick:()=>s(!0),children:[n.jsx(rs,{size:15})," Report a bug"]})]}),n.jsx("div",{className:"scroll",children:n.jsxs("div",{className:"page",children:[n.jsx("p",{className:"note",style:{marginBottom:12},children:"Each bug is a ticket linked to the release it was found in. It goes around the same loop, and the Tester adds a check so it can't come back."}),i.length===0?n.jsx("p",{className:"note",children:"No open bugs."}):n.jsxs("table",{className:"table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{style:{width:90},children:"ID"}),n.jsx("th",{children:"What happened"}),n.jsx("th",{style:{width:120},children:"Found in"}),n.jsx("th",{style:{width:120},children:"Stage"}),n.jsx("th",{style:{width:240},children:"Now"})]})}),n.jsx("tbody",{children:i.map(o=>n.jsxs("tr",{children:[n.jsx("td",{className:"mono",children:o.id}),n.jsx("td",{children:n.jsx(Ge,{to:"/board",search:{ticket:o.id},style:{fontWeight:600},children:o.title})}),n.jsx("td",{children:o.foundIn??""}),n.jsx("td",{children:qs[o.stage]}),n.jsx("td",{style:{color:o.waiting?"var(--you-ink)":"var(--muted)"},children:o.waiting?.summary??o.status})]},o.id))})]})]})}),t&&n.jsx(Tp,{onClose:()=>s(!1)})]})}const sP={claude:"Claude Code",codex:"Codex"};function rP(){const e=Ct(),t=K2(),s=e.data?.ready?e.data.meta:void 0,i=$e({queryKey:["agents"],queryFn:()=>ze("/api/v1/agents"),refetchInterval:2e3}),[o,l]=E.useState(null);return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"top",children:n.jsx("h1",{children:"Squad and AI"})}),n.jsx("div",{className:"scroll",children:n.jsxs("div",{className:"page",style:{maxWidth:900},children:[n.jsx("h2",{children:"The squad"}),n.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit is the lead. Each role is its own agent with its own session and tools, and the Reviewer always starts fresh, so every change gets a real second opinion. Strong models where a mistake is expensive, cheaper ones where the work is already clear. Edit an agent to give it house rules or change its models."}),n.jsx(iP,{}),n.jsx("div",{style:{marginTop:10},children:(i.data??[]).map(c=>n.jsxs("div",{className:"maprow",style:{gridTemplateColumns:"34px 120px 1fr 250px 70px",alignItems:"center"},children:[n.jsx(Nr,{role:c.role}),n.jsx("b",{children:c.name}),n.jsxs("span",{style:{fontSize:13},children:[n.jsx("span",{className:"note",children:c.job}),c.working.length>0&&n.jsx("span",{style:{display:"block",marginTop:3},children:c.working.map(u=>n.jsxs(Ge,{to:"/board",search:{ticket:u.id},style:{display:"block",color:"var(--accent)"},children:[n.jsx("b",{className:"mono",children:u.id})," ",u.status]},u.id))})]}),n.jsxs("span",{className:"pills",children:[n.jsx("span",{className:"pill",children:sP[c.tool]}),(()=>{const u=c.stepList.find(p=>p.id==="design")??c.stepList[0],h=c.levels?.find(p=>p.step===u?.id)?.now;return h?n.jsxs("span",{className:`pill ${h.from==="squad-kit"?"wait":""}`,title:`${u?.name}: ${d3(h)}`,children:[h.modelName||h.level,h.effort&&c.supportsEffort?` · ${ya[h.effort]}`:""]}):null})(),Lx(c.instructions).trim()&&n.jsx("span",{className:"pill ok",children:"House rules"})]}),n.jsx("button",{className:"btn sm",onClick:()=>l(c),children:"Edit"})]},c.role))}),n.jsxs("div",{className:"maprow",style:{marginTop:4},children:[n.jsx("b",{children:"Tickets at once"}),n.jsxs("span",{className:"note",children:["Up to ",t.data?.parallel??s?.parallel??2,", shared by all your projects. Change it in Settings."]})]}),n.jsx(qE,{}),n.jsx("h2",{style:{marginTop:30},children:"Your AI tools"}),n.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit uses the logins you already have. Nothing new to buy."}),(s?.tools??[]).map(c=>n.jsxs("div",{className:"toolrow",children:[n.jsx("span",{className:"logo",children:n.jsx(Ll,{size:18})}),n.jsxs("span",{children:[n.jsx("b",{children:c.name}),n.jsx("br",{}),n.jsx("span",{className:"note",children:c.name==="Codex"?"Your ChatGPT subscription":"Your Claude subscription"})]}),n.jsx("span",{className:`pill ${c.ready?"ok":"wait"}`,children:c.ready?"Ready":"Not found"})]},c.name)),n.jsxs("div",{className:"toolrow off",children:[n.jsx("span",{className:"logo",children:n.jsx(Ll,{size:18})}),n.jsxs("span",{children:[n.jsx("b",{children:"Gemini CLI, Copilot CLI, Cursor"}),n.jsx("br",{}),n.jsx("span",{className:"note",children:"Coming next"})]}),n.jsx("span",{})]})]})}),o&&n.jsx(aP,{agent:o,onClose:()=>l(null)})]})}const Og=[{id:"best",name:"Best",note:"The strongest model builds and reviews. Uses your plan's limits faster."},{id:"balanced",name:"Balanced",note:"The strongest model at medium effort."},{id:"thrifty",name:"Thrifty",note:"A lighter model builds. Cheapest."}];function iP(){const e=Ct(),t=Se(),s=e.data?.ready?e.data.meta:void 0;if(!s)return null;const i=s.quality??"best";return n.jsxs("div",{className:"maprow",style:{marginTop:6},children:[n.jsx("b",{style:{paddingTop:4},children:"Quality"}),n.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:6,minWidth:0},children:[n.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Og.map(o=>n.jsx("button",{className:`btn sm ${o.id===i?"pri":""}`,"aria-pressed":o.id===i,onClick:()=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{quality:o.id},done:`Quality is ${o.name} now. The squad uses it from its next step.`}),children:o.name},o.id)),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad config set quality ${i}`})]}),Og.map(o=>n.jsxs("span",{className:"note",style:{fontSize:12.5,...o.id===i?{color:"var(--text)"}:{}},children:[n.jsxs("b",{children:[o.name,":"]})," ",o.note]},o.id))]})]})}function aP({agent:e,onClose:t}){const s=Se(),i=A=>Lx(A??"").trim(),[o,l]=E.useState(e.tool),[c,u]=E.useState(e.model),[h,p]=E.useState(e.youRole?.model??""),[m,f]=E.useState(()=>Object.fromEntries(e.levels.map(A=>[A.step,A.team??{}]))),[x,y]=E.useState(()=>Object.fromEntries(e.levels.map(A=>[A.step,A.you??{}]))),[k,w]=E.useState(i(e.instructions)),[j,N]=E.useState(()=>Object.fromEntries(e.stepList.map(A=>[A.id,i(e.steps?.[A.id])]))),S=$e({queryKey:["core-prompts",e.role],queryFn:()=>ze(`/api/v1/agents/${e.role}/prompts`)}),T=async()=>{const A=(R,M)=>(R?.level??"")===(M.level??"")&&(R?.effort??"")===(M.effort??"");try{for(const R of e.levels)A(R.you,x[R.step])||await St("/api/v1/me/levels","PUT",{key:`${e.role}.${R.step}`,...x[R.step]});(e.youRole?.model??"")!==h.trim()&&await St("/api/v1/me/levels","PUT",{key:e.role,...e.youRole,model:h.trim()})}catch(R){return s.reset(),alert(R instanceof Error?R.message:String(R))}const q={};(e.teamRole?.level||e.teamRole?.effort)&&(q[e.role]={level:e.teamRole.level,effort:e.teamRole.effort});for(const[R,M]of Object.entries(m))(M.level||M.effort)&&(q[`${e.role}.${R}`]=M);s.mutate({path:`/api/v1/agents/${e.role}`,method:"PUT",body:{tool:o,model:c,instructions:k,steps:j,levels:q},done:`${e.name} saved. It uses this from its next step.`},{onSuccess:t})};return n.jsxs(at,{title:`Edit the ${e.name}`,wide:!0,onClose:t,footer:n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"btn pri",disabled:s.isPending,onClick:T,children:"Save"}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx("span",{className:"note mono",style:{fontSize:12},children:e.file})]}),children:[n.jsxs("p",{className:"note",style:{marginTop:0},children:[e.job,"."]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"AI tool"}),n.jsxs("select",{className:"input",value:o,onChange:A=>l(A.target.value),children:[n.jsx("option",{value:"claude",children:"Claude Code"}),n.jsx("option",{value:"codex",disabled:!0,children:"Codex (coming soon)"})]})]}),n.jsx(lP,{agent:e,team:m,setTeam:f,you:x,setYou:y}),n.jsxs("details",{style:{marginTop:8},children:[n.jsx("summary",{className:"note",children:"Pin exact models (advanced)"}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"For the team"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:c,placeholder:"Empty: use the levels above",onChange:A=>u(A.target.value)})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Just for me"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:h,placeholder:"Empty: use the levels above",onChange:A=>p(A.target.value)})]}),n.jsx("p",{className:"note",style:{fontSize:12.5},children:"A pinned model wins over every level. Levels are better for the team: they work whatever AI tool each person uses."})]}),n.jsxs("div",{style:{marginTop:12},children:[n.jsx("b",{style:{display:"block",marginBottom:6},children:"House rules for every step"}),n.jsx("textarea",{className:"input",rows:4,style:{width:"100%",resize:"vertical"},value:k,placeholder:`Extra instructions the ${e.name} reads in every step, in plain words.`,onChange:A=>w(A.target.value)})]}),n.jsxs("p",{className:"note",style:{fontSize:12.5},children:["Each step has a core prompt that squad-kit keeps and improves with every release. Your instructions are added to it, never instead of it.",S.data&&` The prompts below are filled in from ${S.data.ticket.id} "${S.data.ticket.title}".`]}),e.stepList.map(A=>{const q=S.data?.prompts.find(R=>R.step===A.id);return n.jsxs("div",{className:"agentstep",children:[n.jsx("b",{children:A.name}),n.jsx("textarea",{className:"input",rows:2,style:{width:"100%",resize:"vertical"},value:j[A.id]??"",placeholder:`Only for the ${A.name} step. For example: ${cP[A.id]??"keep it short"}.`,onChange:R=>N({...j,[A.id]:R.target.value})}),n.jsxs("details",{children:[n.jsxs("summary",{children:["Core prompt for ",A.name,", read only"]}),n.jsx("pre",{className:"coreprompt",children:q?q.prompt:S.isLoading?"Loading…":"Not available."})]})]},A.id)})]})}function d3(e){const t=e.from==="project"?"set by the team":e.from==="you"?"set by you":"squad-kit's default";return`${e.modelName||e.level} (${e.model?"pinned":e.level}${e.effort?`, ${ya[e.effort]} effort`:""}), ${t}${e.why?`, ${e.why}`:""}`}const oP={strongest:"Strongest",balanced:"Balanced",fast:"Fast"},ya={xhigh:"extra high",high:"high",medium:"medium",low:"low"};function Dg({value:e,onChange:t,below:s,agent:i}){return n.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:4,minWidth:0},children:[n.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.level??"",onChange:o=>t({...e,level:o.target.value||void 0}),"aria-label":"Level",children:[n.jsxs("option",{value:"",children:["Default",s.level?` (${s.level})`:""]}),["strongest","balanced","fast"].map(o=>n.jsxs("option",{value:o,children:[oP[o],i.modelOf[o]?` · ${i.modelOf[o]}`:""]},o))]}),i.supportsEffort&&n.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.effort??"",onChange:o=>t({...e,effort:o.target.value||void 0}),"aria-label":"Effort",children:[n.jsxs("option",{value:"",children:["Default",s.effort?` (${ya[s.effort]} effort)`:""]}),i.efforts.map(o=>n.jsxs("option",{value:o,children:[ya[o].charAt(0).toUpperCase(),ya[o].slice(1)," effort"]},o))]})]})}function lP({agent:e,team:t,setTeam:s,you:i,setYou:o}){return n.jsxs("div",{style:{marginTop:12},children:[n.jsx("b",{style:{display:"block",marginBottom:2},children:"Models"}),n.jsx("p",{className:"note",style:{marginTop:0,fontSize:12.5},children:"squad-kit picks a level for each step from the Quality setting: strongest where a mistake is expensive, cheaper where the work is clear. Change it for the whole team, or just for you. After a failed try, the Builder moves up a level on its own."}),n.jsxs("div",{className:"levels",role:"table",children:[n.jsxs("div",{className:"levrow head",role:"row",children:[n.jsx("span",{children:"Step"}),n.jsx("span",{children:"For the team"}),n.jsx("span",{children:"Just for me"}),n.jsx("span",{children:"Now"})]}),e.levels.map(l=>n.jsxs("div",{className:"levrow",role:"row",children:[n.jsx("span",{children:l.name}),n.jsx(Dg,{agent:e,value:t[l.step]??{},below:l.standard,onChange:c=>s({...t,[l.step]:c})}),n.jsx(Dg,{agent:e,value:i[l.step]??{},below:{...l.standard,...t[l.step]??{}},onChange:c=>o({...i,[l.step]:c})}),n.jsx("span",{className:"note",style:{fontSize:12.5},children:d3(l.now)})]},l.step))]})]})}const cP={questions:"always ask who will use it",spec:'write "done when" items a clerk can check by hand',scan:"the old /legacy folder is not used",design:"prefer the existing service layer over new packages",build:"use our logger, never console.log",fix:"never turn a failing test off",review:"check every query for missing tenant filters",proof:"take screenshots in Arabic too"},uP=[{key:"setup",label:"Set up",hint:"Installs what the project needs, e.g. npm install"},{key:"test",label:"Test",hint:"Runs the tests, e.g. npm test"},{key:"lint",label:"Lint",hint:"Checks code style, e.g. npm run lint"},{key:"build",label:"Build",hint:"Builds the project, e.g. npm run build"},{key:"start",label:"Start",hint:"Runs the app for screenshots, e.g. npm start"},{key:"url",label:"App address",hint:"Where the app opens, e.g. http://localhost:3000"},{key:"deploy",label:"Pipeline",hint:"Runs after a release, e.g. az pipelines run …"}];function dP(){const e=Ct(),t=e.data?.ready?e.data.meta:void 0;if(!t)return null;const s=t.repos?.length?t.repos:[{path:".",base:t.git?.base??"main",remote:t.git?.remote??"",commands:t.commands??{}}],i=!!t.repos?.length;return n.jsxs(n.Fragment,{children:[n.jsx("h2",{style:{marginTop:6},children:"How the squad checks and runs this project"}),n.jsxs("p",{className:"note",style:{margin:"2px 0 10px"},children:["The Architect filled these in when it read the project. squad-kit runs Test, Lint and Build itself before anything ships.",i&&" This workspace has several code repos; each ticket works in one of them."]}),s.map(o=>n.jsx(hP,{repo:o,multi:i},o.path)),n.jsx(vP,{})]})}function hP({repo:e,multi:t}){const s=Se(),[i,o]=E.useState(null),[l,c]=E.useState(null),u=i??e.commands,h=l??{base:e.base,remote:e.remote},p=()=>{const m=t?{repos:[{path:e.path,...h,commands:u}]}:{commands:u,git:h};s.mutate({path:"/api/v1/settings",method:"PUT",body:m,done:"Settings saved"},{onSuccess:()=>{o(null),c(null)}})};return n.jsxs("div",{style:{marginBottom:24},children:[t&&n.jsxs("h3",{className:"mono",style:{fontSize:14,margin:"18px 0 2px"},children:[e.path,e.summary&&n.jsx("span",{className:"note",style:{fontFamily:"inherit",marginLeft:8},children:e.summary})]}),uP.map(m=>n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:m.label}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:u[m.key]??"",placeholder:m.hint,onChange:f=>o({...u,[m.key]:f.target.value})})]},m.key)),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Release branch"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:h.base,onChange:m=>c({...h,base:m.target.value})})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Push to"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:h.remote,placeholder:"origin (empty: no push)",onChange:m=>c({...h,remote:m.target.value})})]}),n.jsx("div",{style:{marginTop:12},children:n.jsxs("button",{className:"btn pri sm",disabled:!i&&!l,onClick:p,children:["Save",t?` ${e.path}`:""]})})]})}function pP(){const e=Se(),t=$e({queryKey:["tracker"],queryFn:()=>ze("/api/v1/tracker"),refetchInterval:6e4}),[s,i]=E.useState(null),o=t.data,l=s??{organization:o?.organization??"",project:o?.project??"",token:""},c=o?.type==="azure"&&o.user;return n.jsxs("div",{style:{marginBottom:26},children:[n.jsx("h2",{style:{marginTop:6},children:"Azure DevOps"}),n.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Stories and bugs come from Azure Boards. squad-kit moves them along as the squad works, opens a pull request for each finished ticket, and merges it when you release. Your token stays on this computer."}),o&&n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Status"}),n.jsx("span",{children:c?n.jsxs("span",{className:"pill ok",children:["Connected as ",o.user]}):o.type==="azure"?n.jsx("span",{className:"pill bug",children:o.error??(o.hasToken?"Not connected":"Needs a token")}):n.jsx("span",{className:"pill wait",children:"Not set up"})})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Organization"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:l.organization,placeholder:"e.g. momenysr",onChange:u=>i({...l,organization:u.target.value})})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Project"}),n.jsx("input",{className:"input mono",style:{fontSize:13},value:l.project,placeholder:"e.g. Mawid",onChange:u=>i({...l,project:u.target.value})})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Token"}),n.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:l.token,placeholder:o?.hasToken?"Saved. Paste a new one to replace it":"Personal access token from Azure DevOps",onChange:u=>i({...l,token:u.target.value})})]}),n.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[n.jsx("button",{className:"btn pri sm",disabled:!s||e.isPending,onClick:()=>e.mutate({path:"/api/v1/tracker",method:"PUT",body:l,done:"Azure DevOps is connected"},{onSuccess:()=>{i(null),t.refetch()}}),children:e.isPending?"Checking…":"Save and check"}),n.jsx("span",{className:"note",children:"Token scopes: Work Items and Code (read, write and manage)."}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad config set tracker"})]})]})}function fP(){const e=Se(),t=$e({queryKey:["speech"],queryFn:()=>ze("/api/v1/speech")}),[s,i]=E.useState(""),o=t.data?.hasKey,l=(c,u)=>e.mutate({path:"/api/v1/speech",method:"PUT",body:c,done:u},{onSuccess:()=>{i(""),t.refetch()}});return n.jsxs("div",{style:{marginBottom:26},children:[n.jsx("h2",{style:{marginTop:6},children:"Speech to text"}),n.jsx("p",{className:"note",style:{margin:"2px 0 10px"},children:"Agents cannot listen. With a Munsit key, squad-kit writes out every voice and video note you attach, in Arabic or English, and takes pictures of the screen in videos. Without a key, notes stay attached but nobody hears them. Your key stays on this computer."}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Status"}),n.jsx("span",{children:o?n.jsx("span",{className:"pill ok",children:"Munsit is set up"}):n.jsx("span",{className:"pill wait",children:"Not set up"})})]}),n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Munsit key"}),n.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:s,placeholder:o?"Saved. Paste a new one to replace it":"API key from munsit.com",onChange:c=>i(c.target.value)})]}),n.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[n.jsx("button",{className:"btn pri sm",disabled:!s.trim()||e.isPending,onClick:()=>l({munsit:s},"Munsit is set up"),children:"Save"}),o&&n.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>l({remove:!0},"Munsit key removed"),children:"Remove"})]})]})}function mP(){const{restarting:e,restart:t}=Q2();return n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Board"}),n.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[n.jsx("button",{className:"btn sm",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart the board"}),n.jsx("span",{className:"note",children:"Same link. Running work picks up where it stopped."}),n.jsx(ye,{text:"squad console --restart"})]})]})}function gP(){const e=Ct(),t=Se(),s=e.data?.ready?e.data.meta:void 0;if(!s)return null;const i=s.runner??"acp",o=(l,c)=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{runner:l},done:c});return n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Talk to Claude"}),n.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[n.jsx("button",{className:`btn sm ${i==="acp"?"pri":""}`,onClick:()=>o("acp","The squad talks to Claude through ACP"),children:"Agent Client Protocol"}),n.jsx("button",{className:`btn sm ${i==="direct"?"pri":""}`,onClick:()=>o("direct","The squad runs Claude Code directly"),children:"Directly"}),n.jsx("span",{className:"note",style:{marginLeft:6},children:"ACP is the open standard for agents. If it cannot start, a step runs Claude Code directly."})]})]})}function yP(){const e=K2(),t=Se(),s=e.data;return s?n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Tickets at once"}),n.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Array.from({length:s.max},(i,o)=>o+1).map(i=>n.jsx("button",{className:`btn sm ${i===s.parallel?"pri":""}`,onClick:()=>t.mutate({path:"/api/v1/app/settings",method:"PUT",body:{parallel:i},done:`Up to ${i} tickets at once, across all your projects`}),children:i},i)),n.jsx("span",{className:"note",style:{marginLeft:6},children:"How many tickets the squads work on at the same time, across all your projects. They share your AI accounts."})]})]}):null}function xP({on:e}){const t=Se();return n.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[n.jsx("b",{children:"Project documents in git"}),n.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[n.jsx("button",{className:"btn sm",onClick:()=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{documentsInGit:!e},done:e?"Project documents stay out of git":"Project documents go into git with each ticket"}),children:e?"On: turn it off":"Off: turn it on"}),n.jsx("span",{className:"note",children:"On: each ticket's spec, design and decisions are committed with its code, so they reach the team through the pull request. Hand over needs it on."})]})]})}function vP(){const e=Se();return n.jsx("div",{style:{margin:"4px 0 26px"},children:n.jsx("button",{className:"btn sm",onClick:()=>e.mutate({path:"/api/v1/scan",done:"The Architect is reading the project again"}),children:"Read the project again"})})}function kP(){const e=Ct(),{theme:t,toggleTheme:s,showCommands:i,toggleCommands:o}=qe(),l=Se(),[c,u]=E.useState(!1),h=e.data?.ready?e.data.meta:void 0;return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"top",children:n.jsx("h1",{children:"Settings"})}),n.jsx("div",{className:"scroll",children:n.jsxs("div",{className:"page",style:{maxWidth:760},children:[n.jsxs("div",{className:"maprow",children:[n.jsx("b",{children:"Theme"}),n.jsx("span",{children:n.jsx("button",{className:"btn sm",onClick:s,children:t==="light"?"Switch to dark":"Switch to light"})})]}),n.jsxs("div",{className:"maprow",children:[n.jsx("b",{children:"Terminal commands"}),n.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center"},children:[n.jsx("button",{className:"btn sm",onClick:o,children:i?"Hide them":"Show them"}),n.jsx("span",{className:"note",children:"Every button shows the command that does the same thing."})]})]}),n.jsx(pw,{}),n.jsxs("div",{className:"maprow",children:[n.jsx("b",{children:"Project files"}),n.jsxs("span",{className:"note",children:[n.jsx("span",{className:"mono",style:{fontSize:13},children:".squad/"})," in the project folder: specs, decisions and releases, shared with the team. Live progress, chats and sign-ins stay on this computer."]})]}),h?.engine==="live"&&n.jsx(xP,{on:h.documentsInGit!==!1}),n.jsx(mP,{}),h?.engine==="live"&&n.jsx(yP,{}),h?.engine==="live"&&n.jsx(gP,{}),h?.engine==="live"&&n.jsx(pP,{}),h?.engine==="live"&&n.jsx(fP,{}),h?.engine==="live"&&n.jsx(dP,{}),h?.engine==="demo"&&n.jsxs("div",{className:"maprow",children:[n.jsx("b",{children:"Demo board"}),n.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[n.jsxs("button",{className:"btn sm danger",onClick:()=>u(!0),children:[n.jsx(Ca,{size:13})," Start the demo over"]}),n.jsxs("span",{className:"note",children:["The squad plays back a recorded run at ",h.speed,"x speed."]})]})]}),n.jsx("h2",{style:{marginTop:26},children:"About squad-kit"}),n.jsx(X2,{}),n.jsx(RC,{})]})}),c&&n.jsx(at,{title:"Start the demo over?",onClose:()=>u(!1),footer:n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"btn pri",onClick:()=>l.mutate({path:"/api/v1/demo/reset",done:"The demo board is fresh again."},{onSuccess:()=>u(!1)}),children:[n.jsx(Ca,{size:15})," Start over"]}),n.jsx("button",{className:"btn",onClick:()=>u(!1),children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad demo"})]}),children:n.jsx("p",{children:"Every ticket, release and decision goes back to how the demo starts."})})]})}const Bg=2e3,qg=e=>`/p/${encodeURIComponent(e)}`;function wP(e,t){const s=/\s/.test(t)?`"${t}"`:t;return e.replace(/\bsquad ([a-z-]+) (\S+)/g,`squad $1 $2 --project ${s}`)}function bP(e,t){return t&&e.startsWith(t)?`~${e.slice(t.length)}`:e}function jP(){const{theme:e,toggleTheme:t}=qe(),s=$e({queryKey:["app","projects"],queryFn:()=>ze("/api/v1/app/projects"),refetchInterval:Bg}),i=$e({queryKey:["app","waiting"],queryFn:()=>ze("/api/v1/app/waiting"),refetchInterval:Bg}),[o,l]=E.useState(!1),[c,u]=E.useState(null),h=s.data?.projects??[],p=i.data?.items??[];return n.jsxs("div",{className:"home",children:[n.jsxs("header",{className:"home-top",children:[n.jsx("img",{src:"/logo.svg",alt:""}),n.jsx("b",{children:"squad-kit"}),n.jsx("span",{className:"grow"}),s.data&&n.jsx(NP,{s:s.data}),n.jsx(Hk,{}),n.jsx("button",{className:"theme",onClick:t,"aria-label":e==="light"?"Switch to dark":"Switch to light",children:e==="light"?n.jsx(Zl,{size:15}):n.jsx(Xl,{size:15})})]}),n.jsx(Z2,{}),n.jsx(Wx,{}),n.jsx(rw,{}),n.jsx("div",{className:"scroll",children:n.jsxs("div",{className:"page home-page",children:[n.jsxs("section",{className:"home-projects",children:[n.jsxs("div",{className:"home-h",children:[n.jsx("h2",{children:"Projects"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad projects"}),n.jsxs("button",{className:"btn pri",onClick:()=>l(!0),children:[n.jsx(Rn,{size:15})," Add project"]})]}),s.isLoading?null:h.length===0?n.jsxs("button",{className:"home-empty",onClick:()=>l(!0),children:[n.jsx(F2,{size:22}),n.jsx("b",{children:"Add your first project"}),n.jsx("span",{children:"Pick its folder: one repo, a folder with several repos, or a new, empty folder for a new project."})]}):n.jsx("div",{className:"pcards",children:h.map(m=>n.jsx(SP,{p:m,onRemove:()=>u(m)},m.id))})]}),n.jsxs("section",{className:"home-inbox",id:"waiting",children:[n.jsxs("div",{className:"home-h",children:[n.jsx("h2",{children:"Waiting for you"}),p.length>0&&n.jsx("span",{className:"badge you",children:p.length}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:"squad inbox"})]}),p.length===0?n.jsxs("div",{className:"calm",children:[n.jsx("span",{className:"ring",children:n.jsx(Ce,{size:18,strokeWidth:2.5})}),n.jsxs("div",{children:[n.jsx("b",{children:"Nothing needs you right now"}),n.jsx("span",{children:h.length?"The squads are working. Questions, plans, proof and decisions from every project land here.":"Add a project to start."})]})]}):n.jsx("div",{className:"home-waiting",children:p.map(({project:m,ticket:f})=>n.jsxs("div",{className:"wcard",children:[n.jsxs("div",{className:"grow",children:[n.jsxs("div",{className:"meta",children:[n.jsx("span",{className:"pill sm",children:m.name}),n.jsx("span",{className:"id",children:f.id}),n.jsx("span",{children:qs[f.stage]}),n.jsx("span",{children:Un(f.activity[0]?.at??f.createdAt)})]}),n.jsx("h3",{children:f.title}),n.jsx("p",{children:f.waiting?.summary??(ss(f)?`Change ${Cr(f).id} to the spec waits for you`:f.outdated?.length?Vh(f):`Looks stuck: ${f.quiet?.detail??""}`)})]}),n.jsx(ye,{text:wP(Hh(f),m.name)}),n.jsx("a",{className:"btn pri sm",href:f.waiting?.kind==="proof"?`${qg(m.id)}/tickets/${encodeURIComponent(f.id)}/proof`:`${qg(m.id)}/board?ticket=${encodeURIComponent(f.id)}`,children:f.waiting?zl(f):"Check it"})]},`${m.id}/${f.id}`))})]})]})}),o&&n.jsx(EP,{onClose:()=>l(!1)}),c&&n.jsx(PP,{p:c,onClose:()=>u(null)})]})}function NP({s:e}){const t=Ws(),{toast:s}=qe(),i=async o=>{try{await St("/api/v1/app/settings","PUT",{parallel:o}),t.invalidateQueries({queryKey:["app"]}),s(`Up to ${o} tickets at once, across all projects`)}catch(l){s(l instanceof Error?l.message:String(l),"err")}};return n.jsxs("label",{className:"shared",title:"Shared by all your projects, because they use the same AI accounts",children:[n.jsxs("span",{children:["Tickets at once: ",n.jsx("b",{children:e.running})," of"]}),n.jsx("select",{className:"select sm",value:e.parallel,onChange:o=>void i(Number(o.target.value)),"aria-label":"Tickets at once, across all projects",children:Array.from({length:e.max},(o,l)=>l+1).map(o=>n.jsx("option",{value:o,children:o},o))})]})}function SP({p:e,onRemove:t}){const s=Ws(),{toast:i}=qe(),[o,l]=E.useState(!1),c=e.setup&&e.setup.status!=="done"?e.setup:null,u=async()=>{l(!0);try{await St("/api/v1/app/projects","POST",{folder:e.root}),i(`${e.name} is open`)}catch(p){i(p instanceof Error?p.message:String(p),"err")}finally{l(!1),s.invalidateQueries({queryKey:["app"]})}},h=e.open?c?.status==="failed"?n.jsx("span",{className:"bad",children:"The Architect could not read the project"}):c?n.jsxs("span",{className:"you",children:["Setting up: ",c.status==="running"?c.now??"the Architect reads the project":"the Architect reads the project next"]}):n.jsxs("span",{children:[e.tickets," open",e.working>0&&n.jsxs(n.Fragment,{children:[" · ",e.working," working"]}),e.waiting>0&&n.jsxs("span",{className:"you",children:[" · ",e.waiting," waiting for you"]})]}):n.jsxs("span",{className:"bad",children:["Could not open: ",e.why]});return n.jsxs("div",{className:`pcard ${e.open?"":"off"}`,children:[n.jsx("span",{className:"pm",children:e.name.charAt(0).toUpperCase()}),n.jsxs("div",{className:"grow",children:[n.jsxs("b",{children:[e.name,e.engine==="demo"&&n.jsx("small",{className:"demo",children:"Demo"})]}),n.jsx("span",{className:"mono path",title:e.root,children:e.root}),n.jsx("span",{className:"state",children:h})]}),n.jsxs("div",{className:"acts",children:[e.open?n.jsx("a",{className:"btn sm pri",href:e.url,children:"Open board"}):n.jsx("button",{className:"btn sm",disabled:o,onClick:()=>void u(),children:"Try again"}),n.jsx("button",{className:"btn sm quiet",onClick:t,children:"Remove"})]})]})}const CP={project:()=>"This folder has squad-kit already. Adding it opens its board.",repo:()=>"A code repo. The Architect reads its code first, then you write the first ticket.",repos:e=>`A folder with ${e.repos} code ${e.repos===1?"repo":"repos"} inside. The squad works across them; the Architect reads them first.`,empty:()=>"An empty folder: a new project. squad-kit makes a repo here, and the Architect picks the stack with you.",files:()=>"Files that are not in a repo yet. squad-kit makes one, with these files in its first commit, then the Architect reads them."};function EP({onClose:e}){const[t,s]=E.useState(""),[i,o]=E.useState(null),[l,c]=E.useState(null),[u,h]=E.useState(!1),p=$e({queryKey:["app","folders",t],queryFn:()=>ze(`/api/v1/app/folders${t?`?path=${encodeURIComponent(t)}`:""}`)}),m=p.data,f=w=>{c(null),o(null),s(w)},x=async()=>{if(m){h(!0),c(null);try{const w=await St("/api/v1/app/projects","POST",{folder:m.path});window.location.assign(w.url)}catch(w){h(!1),c(w instanceof Error?w.message:String(w))}}},y=async()=>{if(!(!m||!i?.trim()))try{const w=await St("/api/v1/app/folders","POST",{parent:m.path,name:i.trim()});f(w.path)}catch(w){c(w instanceof Error?w.message:String(w))}},k=m?TP(m.path):[];return n.jsxs(at,{title:"Add a project",wide:!0,onClose:e,footer:n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"btn pri",disabled:!m?.canAdd||u||p.isFetching,onClick:()=>void x(),children:u?"Adding…":"Add this folder"}),n.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),n.jsx("span",{className:"grow"}),m&&n.jsx(ye,{text:`cd "${m.path}" && squad console`})]}),children:[n.jsx("p",{className:"note",children:"Pick the project's folder: one repo, a folder with several repos, or a new, empty folder for a new project."}),m&&n.jsx("div",{className:"places",children:m.places.map(w=>n.jsx("button",{className:`btn sm ${w.path===m.path?"pri":""}`,onClick:()=>f(w.path),children:w.name},w.path))}),n.jsxs("div",{className:"fb",children:[n.jsxs("div",{className:"fb-bar",children:[n.jsx("button",{className:"iconbtn",disabled:!m?.parent,onClick:()=>m?.parent&&f(m.parent),"aria-label":"Up one folder",title:"Up one folder",children:n.jsx(nk,{size:15})}),n.jsx("span",{className:"crumbs mono",children:k.map((w,j)=>n.jsxs("span",{children:[j>0&&n.jsx(Bh,{size:12}),n.jsx("button",{onClick:()=>f(w.path),children:w.name})]},w.path))})]}),n.jsxs("div",{className:"fb-list",role:"list",children:[p.isError&&n.jsx("p",{className:"note bad",children:p.error.message}),m&&m.folders.length===0&&n.jsx("p",{className:"note",children:"No folders inside."}),m?.folders.map(w=>n.jsxs("button",{role:"listitem",className:"fb-row",onClick:()=>f(w.path),children:[w.kind==="project"?n.jsx(ak,{size:16}):w.kind==="repo"?n.jsx(ok,{size:16}):n.jsx(lk,{size:16}),n.jsx("span",{className:"nm",children:w.name}),w.kind==="project"&&n.jsx("span",{className:"pill ok sm",children:"squad-kit project"}),w.kind==="repo"&&n.jsx("span",{className:"pill sm",children:"code repo"})]},w.path))]}),n.jsx("div",{className:"fb-new",children:i===null?n.jsxs("button",{className:"btn sm",disabled:!m,onClick:()=>o(""),children:[n.jsx(F2,{size:14})," New folder here"]}):n.jsxs(n.Fragment,{children:[n.jsx("input",{className:"input",autoFocus:!0,placeholder:"Name of the new folder",value:i,onChange:w=>o(w.target.value),onKeyDown:w=>w.key==="Enter"&&void y()}),n.jsx("button",{className:"btn sm pri",disabled:!i.trim(),onClick:()=>void y(),children:"Make it"}),n.jsx("button",{className:"btn sm",onClick:()=>o(null),children:"Cancel"})]})})]}),m&&n.jsxs("p",{className:"fb-kind",children:[n.jsx("b",{children:bP(m.path,m.home)}),n.jsx("span",{children:m.canAdd?CP[m.kind](m):"This folder can't be a project. Open a folder inside it, or make a new one here."})]}),l&&n.jsx("p",{className:"fb-error",children:l})]})}function TP(e){const t=e.split("/").filter(Boolean);return[{name:"/",path:"/"},...t.map((s,i)=>({name:s,path:`/${t.slice(0,i+1).join("/")}`}))]}function PP({p:e,onClose:t}){const s=Ws(),{toast:i}=qe(),[o,l]=E.useState(!1),c=async()=>{l(!0);try{await St(`/api/v1/app/projects/${encodeURIComponent(e.id)}`,"DELETE"),s.invalidateQueries({queryKey:["app"]}),i(`${e.name} is out of squad-kit. Its files stay in its folder.`),t()}catch(h){l(!1),i(h instanceof Error?h.message:String(h),"err")}},u=/\s/.test(e.name)?`"${e.name}"`:e.name;return n.jsx(at,{title:`Take ${e.name} out of squad-kit?`,onClose:t,footer:n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"btn danger",disabled:o,onClick:()=>void c(),children:"Take it out"}),n.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),n.jsx("span",{className:"grow"}),n.jsx(ye,{text:`squad projects --remove ${u}`})]}),children:n.jsxs("p",{children:["Its squad stops. Nothing is deleted: its files stay in ",n.jsx("span",{className:"mono",children:e.root}),". Add it again any time."]})})}function RP(){const e=Ia({from:"/conversations"}),t=Hs({from:"/conversations"}),s=Xh(Jh),[i,o]=E.useState(""),l=Ra(i),u=Ra().data??[],h=e.ticket??u.find(y=>y.open)?.id??u[0]?.id,[p,m]=E.useState(null),f=y=>{m(null),t({search:{ticket:y}})},x=y=>{Pn.show(y),t({to:"/board"})};return s?n.jsx(FP,{id:h,all:u,pick:f,doc:p,setDoc:m}):n.jsxs("div",{className:"cpage",children:[n.jsx(AP,{q:i,setQ:o}),n.jsxs("div",{className:"cpage-b",children:[n.jsx(LP,{list:l.data??[],id:h,pick:f,searching:!!i.trim()}),n.jsx("section",{className:"ccenter","aria-label":"Conversation",children:h?n.jsx(Ip,{id:h,size:"full",onOpenDoc:m,onPanel:()=>x(h)},h):n.jsxs("div",{className:"cempty",children:[n.jsx("p",{children:"No talks yet. Start one with any agent on any ticket."}),n.jsx(qx,{})]})}),p?n.jsx(Cp,{doc:p,onClose:()=>m(null)}):h?n.jsx(_P,{id:h,onOpenDoc:m}):null]})]})}function AP({q:e,setQ:t}){const s=Ct(),{theme:i,toggleTheme:o}=qe(),l=s.data?.ready?s.data.meta.project:"";return n.jsxs("header",{className:"cpage-h",children:[n.jsxs(Ge,{to:"/board",className:"btn",children:[n.jsx(Z6,{size:15})," Back to the board"]}),n.jsx("h1",{children:"Conversations"}),n.jsx("span",{className:"cdim",children:l}),n.jsx("span",{className:"grow"}),n.jsxs("label",{className:"search cpage-search",children:[n.jsx(fi,{size:15}),n.jsx("input",{value:e,onChange:c=>t(c.target.value),placeholder:"Search all conversations","aria-label":"Search all conversations",dir:"auto"})]}),n.jsx("button",{className:"iconbtn",onClick:o,"aria-label":i==="light"?"Switch to dark":"Switch to light",children:i==="light"?n.jsx(Zl,{size:16}):n.jsx(Xl,{size:16})})]})}function h3(e){return new Date(e).toDateString()===new Date().toDateString()?Bs(e):Sr(e)}function IP(e){const s=(e.match??e.last?.text??"").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim(),i=xn(s);return{text:`${e.last?.who==="you"&&!e.match?"You: ":""}${s}`,dir:i.dir,cls:as(i)}}function LP({list:e,id:t,pick:s,searching:i}){const o=tc(),l=[["Waiting for you",e.filter(c=>c.open&&c.yourTurn)],["Talking now",e.filter(c=>c.open&&!c.yourTurn)],["Earlier",e.filter(c=>!c.open)]];return n.jsx("nav",{className:"clist","aria-label":"All conversations",children:n.jsxs("div",{className:"clist-s",children:[i&&!e.length&&n.jsx("p",{className:"cdim",style:{padding:"14px 18px"},children:"Nothing found."}),l.map(([c,u])=>u.length?n.jsxs("div",{children:[n.jsx("div",{className:"csec",children:c}),u.map(h=>{const p=h.id===t,m=IP(h),f=Lp(h,o.seen);return n.jsxs("button",{className:`crow-i ${p?"on":""}`,onClick:()=>s(h.id),"aria-current":p,children:[n.jsx(Us,{role:h.with,live:h.thinking}),n.jsxs("span",{className:"rt",children:[n.jsx("span",{className:"cid",children:h.id}),n.jsx("b",{children:ot[h.with]}),h.yourTurn&&n.jsx("span",{className:"cwait",children:"Your turn"})]}),n.jsx("span",{className:"rtime",children:h.thinking?"now":h3(h.at)}),n.jsx("span",{className:`rp ${h.thinking?"t-en":m.cls}`,dir:h.thinking?"ltr":m.dir,children:h.thinking?n.jsxs("span",{className:`rtyping c-${h.with}`,children:[n.jsxs("span",{className:"cdots sm",children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}),n.jsx("span",{className:"shim",children:"Writing"})]}):m.text||h.title}),f>0&&!p&&n.jsx("span",{className:"cbadge rb",children:f})]},h.id)})]},c):null)]})})}function _P({id:e,onOpenDoc:t}){const s=Ma(e).data,[i,o]=E.useState("spec");if(!s)return n.jsx("aside",{className:"cspec"});const l=[...new Set([...(s.chat?.messages??[]).flatMap(c=>c.files??[]),...s.attachments??[]])];return n.jsxs("aside",{className:"cspec","aria-label":"The ticket's spec",children:[n.jsxs("div",{className:"cstabs",role:"tablist",children:[n.jsx("button",{className:`cstab ${i==="spec"?"on":""}`,role:"tab","aria-selected":i==="spec",onClick:()=>o("spec"),children:s.chat?.open&&!s.chat.beside&&s.chat.with==="analyst"?"Spec draft":"Spec"}),n.jsxs("button",{className:`cstab ${i==="files"?"on":""}`,role:"tab","aria-selected":i==="files",onClick:()=>o("files"),children:["Files · ",l.length]}),n.jsx("button",{className:`cstab ${i==="activity"?"on":""}`,role:"tab","aria-selected":i==="activity",onClick:()=>o("activity"),children:"Activity"})]}),n.jsxs("div",{className:"csbody",children:[i==="spec"&&n.jsx(MP,{t:s}),i==="files"&&(l.length?n.jsx(Sp,{ticket:s.id,files:l,onOpen:t}):n.jsx("p",{className:"cdim",children:"No files yet. Paste or drop screenshots into the chat."})),i==="activity"&&n.jsx("div",{className:"cact-list",children:s.activity.slice(0,60).map((c,u)=>n.jsxs("div",{className:"cact-row",children:[n.jsx("span",{className:"cdim",children:h3(c.at)}),n.jsxs("span",{children:[n.jsx("b",{children:Os[c.who]})," ",n.jsx(zP,{text:c.text})]})]},u))})]})]})}function zP({text:e}){const t=xn(e);return n.jsx("span",{dir:t.dir,className:as(t),children:e})}function fl({text:e,fresh:t,chk:s,tone:i}){const o=xn(e);return n.jsxs("div",{className:`citem ${t?"new":""} ${i??""}`,children:[s&&n.jsx("span",{className:"cchk"}),n.jsx("span",{className:`grow ${as(o)}`,dir:o.dir,lang:o.dir==="rtl"?"ar":"en",children:e}),t&&n.jsx("span",{className:"ctag",children:"From chat"})]})}function MP({t:e}){const t=e.chat?.messages[0]?.at??"",s=e.notes??[],i=f=>!!t&&f>=t,o=e.chat?.open&&!e.chat.beside&&e.chat.with==="analyst",l=[...(e.criteria??[]).map(f=>({text:f.then,at:""})),...(e.brief?.criteria??[]).map(f=>({text:f,at:""})),...s.filter(f=>f.kind==="criterion").map(f=>({text:f.text,at:f.at}))],c=[...(e.brief?.rules??[]).map(f=>({text:f,at:""})),...s.filter(f=>f.kind==="rule").map(f=>({text:f.text,at:f.at}))],u=s.filter(f=>f.kind==="note"&&!f.to),h=(e.questions??[]).filter(f=>!f.answer).map(f=>f.text),p=e.story??e.ask,m=xn(p);return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"cdim",children:o?"Grows while you talk. Add to it from any message. The spec is written when you press Write the spec.":"What the squad works from. Add to it from any message with Add to spec."}),n.jsx("h3",{children:"Story"}),n.jsx("div",{className:as(m),dir:m.dir,children:p}),n.jsx("h3",{children:"Done when"}),l.length?l.map((f,x)=>n.jsx(fl,{text:f.text,chk:!0,fresh:i(f.at)},x)):n.jsx("p",{className:"cdim",children:"Nothing yet."}),c.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("h3",{children:"Rules"}),c.map((f,x)=>n.jsx(fl,{text:f.text,fresh:i(f.at)},x))]}),u.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("h3",{children:"Notes"}),u.map((f,x)=>n.jsx(fl,{text:f.text,fresh:i(f.at)},x))]}),h.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("h3",{children:"Still open"}),h.map((f,x)=>n.jsx(fl,{text:f,tone:"open"},x))]})]})}function FP({id:e,all:t,pick:s,doc:i,setDoc:o}){const l=Ma(e).data,c=tc(),u=Hs(),{theme:h,toggleTheme:p}=qe(),m=l?.chat,f=l?Fx(l):null,x=t.filter(k=>k.open||k.id===e),y=E.useRef(null);return E.useEffect(()=>{y.current?.querySelector(".cv.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[e,x.length]),n.jsxs("div",{className:"cphone",children:[n.jsxs("header",{className:"cph-h",children:[n.jsx("button",{className:"ib",onClick:()=>i?o(null):void u({to:"/board"}),"aria-label":i?"Close the document":"Back to the board",children:n.jsx(L2,{size:22})}),m&&n.jsx(Us,{role:m.with,live:m.thinking}),n.jsxs("div",{className:"cph-who",children:[n.jsxs("div",{children:[n.jsx("b",{children:m?ot[m.with]:"Conversations"})," ",l&&n.jsx("span",{className:"cid",children:l.id})]}),f&&n.jsx("div",{className:`cph-stage ${f.tone}`,children:f.text})]}),n.jsx("span",{className:"grow"}),n.jsx("button",{className:"ib",onClick:p,"aria-label":h==="light"?"Switch to dark":"Switch to light",children:h==="light"?n.jsx(Zl,{size:18}):n.jsx(Xl,{size:18})})]}),x.length>1&&n.jsx("div",{className:"cph-convs",role:"tablist","aria-label":"Conversations",ref:y,children:x.map(k=>{const w=k.id===e,j=Lp(k,c.seen);return n.jsxs("button",{className:`cv ${w?"on":""}`,role:"tab","aria-selected":w,"aria-label":`${ot[k.with]} on ${k.id}`,onClick:()=>s(k.id),children:[n.jsx(Us,{role:k.with,small:!0}),k.id,k.thinking&&!w&&n.jsxs("span",{className:`cdots sm c-${k.with}`,children:[n.jsx("i",{}),n.jsx("i",{}),n.jsx("i",{})]}),j>0&&!w&&n.jsx("span",{className:"cbadge",children:j})]},k.id)})}),e?n.jsx(Ip,{id:e,size:"phone",onOpenDoc:o},e):n.jsx("div",{className:"cempty",children:"No talks yet."}),i&&n.jsx("div",{className:"cph-doc",children:n.jsx(Cp,{doc:i,onClose:()=>o(null)})})]})}const on=R6({component:xr?bE:jP,beforeLoad:({location:e})=>{if(!xr&&e.pathname!=="/")throw Vl({to:"/"})}}),$P=vn({getParentRoute:()=>on,path:"/",beforeLoad:()=>{if(xr)throw Vl({to:"/board"})}}),OP=vn({getParentRoute:()=>on,path:"/board",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0,view:e.view==="mine"||e.view==="bugs"?e.view:void 0}),component:ET}),DP=vn({getParentRoute:()=>on,path:"/tickets/$id/proof",component:IT}),BP=vn({getParentRoute:()=>on,path:"/backlog",component:zT}),qP=vn({getParentRoute:()=>on,path:"/inbox",component:tP}),UP=vn({getParentRoute:()=>on,path:"/releases",component:LT}),WP=vn({getParentRoute:()=>on,path:"/decisions",beforeLoad:()=>{throw Vl({to:"/architecture",search:{view:"list"}})}}),HP=vn({getParentRoute:()=>on,path:"/architecture",validateSearch:e=>({adr:typeof e.adr=="string"&&e.adr?e.adr:void 0,view:["timeline","stack","list","project","lessons"].includes(e.view)?e.view:void 0}),component:$T}),VP=vn({getParentRoute:()=>on,path:"/conversations",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0}),component:RP}),KP=vn({getParentRoute:()=>on,path:"/bugs",component:nP}),QP=vn({getParentRoute:()=>on,path:"/squad",component:rP}),GP=vn({getParentRoute:()=>on,path:"/settings",component:kP}),YP=on.addChildren([$P,OP,BP,DP,qP,VP,UP,WP,HP,KP,QP,GP]),ZP=B6({routeTree:YP,defaultPreload:!1,basepath:nh||"/"});document.documentElement.dataset.theme=H2();const XP=new qv({defaultOptions:{queries:{staleTime:500,retry:1,refetchOnWindowFocus:!0}}}),p3=document.getElementById("root");if(!p3)throw new Error("missing #root");const JP=H6();mv.createRoot(p3).render(n.jsx(E.StrictMode,{children:JP?n.jsx(Uv,{client:XP,children:n.jsxs(Ik,{children:[n.jsx(W6,{router:ZP}),n.jsx(EC,{})]})}):n.jsx("div",{className:"center",style:{height:"100%"},children:n.jsxs("div",{children:[n.jsx("h2",{children:"Open the board from the terminal"}),n.jsxs("p",{children:["This page needs the link that ",n.jsx("span",{className:"mono",children:"squad console"})," or ",n.jsx("span",{className:"mono",children:"squad demo"})," prints."]})]})})}));