squad-kit 0.12.4 → 1.0.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +99 -1
  2. package/README.md +109 -220
  3. package/dist/cli.js +13125 -1389
  4. package/dist/console-ui/assets/ibm-plex-sans-arabic-arabic-400-normal-CyU-ddYS.woff2 +0 -0
  5. package/dist/console-ui/assets/ibm-plex-sans-arabic-arabic-500-normal-C4MQITzh.woff2 +0 -0
  6. package/dist/console-ui/assets/ibm-plex-sans-arabic-arabic-600-normal-0pRdybE_.woff2 +0 -0
  7. package/dist/console-ui/assets/ibm-plex-sans-arabic-arabic-700-normal-DrtBj6UE.woff2 +0 -0
  8. package/dist/console-ui/assets/index-Bu__eV-2.js +495 -0
  9. package/dist/console-ui/assets/index-nCcUzpPA.css +1 -0
  10. package/dist/console-ui/assets/instrument-sans-latin-ext-standard-normal-C5E2Gvlv.woff2 +0 -0
  11. package/dist/console-ui/assets/instrument-sans-latin-standard-normal-BVScPF0l.woff2 +0 -0
  12. package/dist/console-ui/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  13. package/dist/console-ui/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  14. package/dist/console-ui/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
  15. package/dist/console-ui/assets/jetbrains-mono-cyrillic-ext-400-normal-C_uLvvQ5.woff2 +0 -0
  16. package/dist/console-ui/assets/jetbrains-mono-cyrillic-ext-500-normal-C9ShMxGR.woff2 +0 -0
  17. package/dist/console-ui/assets/jetbrains-mono-cyrillic-ext-600-normal-Dj6eZy5f.woff2 +0 -0
  18. package/dist/console-ui/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  19. package/dist/console-ui/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  20. package/dist/console-ui/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
  21. package/dist/console-ui/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  22. package/dist/console-ui/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  23. package/dist/console-ui/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  24. package/dist/console-ui/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  25. package/dist/console-ui/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  26. package/dist/console-ui/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
  27. package/dist/console-ui/assets/jetbrains-mono-vietnamese-400-normal-ByoDsISC.woff2 +0 -0
  28. package/dist/console-ui/assets/jetbrains-mono-vietnamese-500-normal-BvH7FW2L.woff2 +0 -0
  29. package/dist/console-ui/assets/jetbrains-mono-vietnamese-600-normal-Dtizs43-.woff2 +0 -0
  30. package/dist/console-ui/index.html +5 -5
  31. package/dist/console-ui/logo.svg +8 -17
  32. package/package.json +4 -2
  33. package/templates/demo/proof/sk139-after.png +0 -0
  34. package/templates/demo/proof/sk139-before.png +0 -0
  35. package/templates/demo/proof/sk148-dark-b.png +0 -0
  36. package/templates/demo/proof/sk148-dark.png +0 -0
  37. package/templates/demo/proof/sk148-light.png +0 -0
  38. package/dist/console-ui/assets/index-DP-vFdYe.css +0 -1
  39. package/dist/console-ui/assets/index-DzO_eLUH.js +0 -442
@@ -0,0 +1,495 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();var Eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J0={exports:{}},yl={},em={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 oa=Symbol.for("react.element"),u3=Symbol.for("react.portal"),d3=Symbol.for("react.fragment"),h3=Symbol.for("react.strict_mode"),p3=Symbol.for("react.profiler"),f3=Symbol.for("react.provider"),m3=Symbol.for("react.context"),g3=Symbol.for("react.forward_ref"),y3=Symbol.for("react.suspense"),x3=Symbol.for("react.memo"),v3=Symbol.for("react.lazy"),Ip=Symbol.iterator;function k3(e){return e===null||typeof e!="object"?null:(e=Ip&&e[Ip]||e["@@iterator"],typeof e=="function"?e:null)}var tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nm=Object.assign,rm={};function $s(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}$s.prototype.isReactComponent={};$s.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$s.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sm(){}sm.prototype=$s.prototype;function Fd(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}var Md=Fd.prototype=new sm;Md.constructor=Fd;nm(Md,$s.prototype);Md.isPureReactComponent=!0;var zp=Array.isArray,im=Object.prototype.hasOwnProperty,Od={current:null},am={key:!0,ref:!0,__self:!0,__source:!0};function om(e,t,n){var r,s={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)im.call(t,r)&&!am.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:oa,type:e,key:a,ref:o,props:s,_owner:Od.current}}function w3(e,t){return{$$typeof:oa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $d(e){return typeof e=="object"&&e!==null&&e.$$typeof===oa}function b3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fp=/\/+/g;function ec(e,t){return typeof e=="object"&&e!==null&&e.key!=null?b3(""+e.key):t.toString(36)}function ao(e,t,n,r,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case oa:case u3:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ec(o,0):r,zp(s)?(n="",e!=null&&(n=e.replace(Fp,"$&/")+"/"),ao(s,t,n,"",function(u){return u})):s!=null&&($d(s)&&(s=w3(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Fp,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",zp(e))for(var l=0;l<e.length;l++){a=e[l];var c=r+ec(a,l);o+=ao(a,t,n,c,s)}else if(c=k3(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=r+ec(a,l++),o+=ao(a,t,n,c,s);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ea(e,t,n){if(e==null)return e;var r=[],s=0;return ao(e,r,"","",function(a){return t.call(n,a,s++)}),r}function j3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nt={current:null},oo={transition:null},S3={ReactCurrentDispatcher:nt,ReactCurrentBatchConfig:oo,ReactCurrentOwner:Od};function lm(){throw Error("act(...) is not supported in production builds of React.")}ie.Children={map:Ea,forEach:function(e,t,n){Ea(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ea(e,function(){t++}),t},toArray:function(e){return Ea(e,function(t){return t})||[]},only:function(e){if(!$d(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ie.Component=$s;ie.Fragment=d3;ie.Profiler=p3;ie.PureComponent=Fd;ie.StrictMode=h3;ie.Suspense=y3;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=S3;ie.act=lm;ie.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=nm({},e.props),s=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=Od.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)im.call(t,c)&&!am.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:oa,type:e.type,key:s,ref:a,props:r,_owner:o}};ie.createContext=function(e){return e={$$typeof:m3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:f3,_context:e},e.Consumer=e};ie.createElement=om;ie.createFactory=function(e){var t=om.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:g3,render:e}};ie.isValidElement=$d;ie.lazy=function(e){return{$$typeof:v3,_payload:{_status:-1,_result:e},_init:j3}};ie.memo=function(e,t){return{$$typeof:x3,type:e,compare:t===void 0?null:t}};ie.startTransition=function(e){var t=oo.transition;oo.transition={};try{e()}finally{oo.transition=t}};ie.unstable_act=lm;ie.useCallback=function(e,t){return nt.current.useCallback(e,t)};ie.useContext=function(e){return nt.current.useContext(e)};ie.useDebugValue=function(){};ie.useDeferredValue=function(e){return nt.current.useDeferredValue(e)};ie.useEffect=function(e,t){return nt.current.useEffect(e,t)};ie.useId=function(){return nt.current.useId()};ie.useImperativeHandle=function(e,t,n){return nt.current.useImperativeHandle(e,t,n)};ie.useInsertionEffect=function(e,t){return nt.current.useInsertionEffect(e,t)};ie.useLayoutEffect=function(e,t){return nt.current.useLayoutEffect(e,t)};ie.useMemo=function(e,t){return nt.current.useMemo(e,t)};ie.useReducer=function(e,t,n){return nt.current.useReducer(e,t,n)};ie.useRef=function(e){return nt.current.useRef(e)};ie.useState=function(e){return nt.current.useState(e)};ie.useSyncExternalStore=function(e,t,n){return nt.current.useSyncExternalStore(e,t,n)};ie.useTransition=function(){return nt.current.useTransition()};ie.version="18.3.1";em.exports=ie;var j=em.exports;const Pi=zd(j);/**
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 N3=j,C3=Symbol.for("react.element"),E3=Symbol.for("react.fragment"),T3=Object.prototype.hasOwnProperty,P3=N3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,R3={key:!0,ref:!0,__self:!0,__source:!0};function cm(e,t,n){var r,s={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)T3.call(t,r)&&!R3.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:C3,type:e,key:a,ref:o,props:s,_owner:P3.current}}yl.Fragment=E3;yl.jsx=cm;yl.jsxs=cm;J0.exports=yl;var i=J0.exports,um={exports:{}},Nt={},dm={exports:{}},hm={};/**
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
+ */(function(e){function t(_,B){var N=_.length;_.push(B);e:for(;0<N;){var V=N-1>>>1,Y=_[V];if(0<s(Y,B))_[V]=B,_[N]=Y,N=V;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var B=_[0],N=_.pop();if(N!==B){_[0]=N;e:for(var V=0,Y=_.length,P=Y>>>1;V<P;){var re=2*(V+1)-1,ce=_[re],J=re+1,ye=_[J];if(0>s(ce,N))J<Y&&0>s(ye,ce)?(_[V]=ye,_[J]=N,V=J):(_[V]=ce,_[re]=N,V=re);else if(J<Y&&0>s(ye,N))_[V]=ye,_[J]=N,V=J;else break e}}return B}function s(_,B){var N=_.sortIndex-B.sortIndex;return N!==0?N:_.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(_){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=_)r(u),B.sortIndex=B.expirationTime,t(c,B);else break;B=n(u)}}function w(_){if(g=!1,k(_),!m)if(n(c)!==null)m=!0,Z(T);else{var B=n(u);B!==null&&Q(w,B.startTime-_)}}function T(_,B){m=!1,g&&(g=!1,y(S),S=-1),p=!0;var N=f;try{for(k(B),d=n(c);d!==null&&(!(d.expirationTime>B)||_&&!R());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var Y=V(d.expirationTime<=B);B=e.unstable_now(),typeof Y=="function"?d.callback=Y:d===n(c)&&r(c),k(B)}else r(c);d=n(c)}if(d!==null)var P=!0;else{var re=n(u);re!==null&&Q(w,re.startTime-B),P=!1}return P}finally{d=null,f=N,p=!1}}var b=!1,E=null,S=-1,A=5,C=-1;function R(){return!(e.unstable_now()-C<A)}function L(){if(E!==null){var _=e.unstable_now();C=_;var B=!0;try{B=E(!0,_)}finally{B?$():(b=!1,E=null)}}else b=!1}var $;if(typeof x=="function")$=function(){x(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=L,$=function(){H.postMessage(null)}}else $=function(){v(L,0)};function Z(_){E=_,b||(b=!0,$())}function Q(_,B){S=v(function(){_(e.unstable_now())},B)}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(_){_.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,Z(T))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(_){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var N=f;f=B;try{return _()}finally{f=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,B){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var N=f;f=_;try{return B()}finally{f=N}},e.unstable_scheduleCallback=function(_,B,N){var V=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?V+N:V):N=V,_){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=N+Y,_={id:h++,callback:B,priorityLevel:_,startTime:N,expirationTime:Y,sortIndex:-1},N>V?(_.sortIndex=N,t(u,_),n(c)===null&&_===n(u)&&(g?(y(S),S=-1):g=!0,Q(w,N-V))):(_.sortIndex=Y,t(c,_),m||p||(m=!0,Z(T))),_},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(_){var B=f;return function(){var N=f;f=B;try{return _.apply(this,arguments)}finally{f=N}}}})(hm);dm.exports=hm;var A3=dm.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 L3=j,St=A3;function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pm=new Set,Ri={};function Ur(e,t){Ns(e,t),Ns(e+"Capture",t)}function Ns(e,t){for(Ri[e]=t,e=0;e<t.length;e++)pm.add(t[e])}var jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),au=Object.prototype.hasOwnProperty,_3=/^[: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]*$/,Mp={},Op={};function I3(e){return au.call(Op,e)?!0:au.call(Mp,e)?!1:_3.test(e)?Op[e]=!0:(Mp[e]=!0,!1)}function z3(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F3(e,t,n,r){if(t===null||typeof t>"u"||z3(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function rt(e,t,n,r,s,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){He[e]=new rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Dd=/[\-:]([a-z])/g;function Bd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Dd,Bd);He[t]=new rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Dd,Bd);He[t]=new rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Dd,Bd);He[t]=new rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new rt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ud(e,t,n,r){var s=He.hasOwnProperty(t)?He[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(F3(t,n,s,r)&&(n=null),r||s===null?I3(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Pn=L3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ta=Symbol.for("react.element"),is=Symbol.for("react.portal"),as=Symbol.for("react.fragment"),qd=Symbol.for("react.strict_mode"),ou=Symbol.for("react.profiler"),fm=Symbol.for("react.provider"),mm=Symbol.for("react.context"),Hd=Symbol.for("react.forward_ref"),lu=Symbol.for("react.suspense"),cu=Symbol.for("react.suspense_list"),Wd=Symbol.for("react.memo"),Fn=Symbol.for("react.lazy"),gm=Symbol.for("react.offscreen"),$p=Symbol.iterator;function Ys(e){return e===null||typeof e!="object"?null:(e=$p&&e[$p]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Object.assign,tc;function hi(e){if(tc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);tc=t&&t[1]||""}return`
34
+ `+tc+e}var nc=!1;function rc(e,t){if(!e||nc)return"";nc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35
+ `),a=r.stack.split(`
36
+ `),o=s.length-1,l=a.length-1;1<=o&&0<=l&&s[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==a[l]){var c=`
37
+ `+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{nc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hi(e):""}function M3(e){switch(e.tag){case 5:return hi(e.type);case 16:return hi("Lazy");case 13:return hi("Suspense");case 19:return hi("SuspenseList");case 0:case 2:case 15:return e=rc(e.type,!1),e;case 11:return e=rc(e.type.render,!1),e;case 1:return e=rc(e.type,!0),e;default:return""}}function uu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case as:return"Fragment";case is:return"Portal";case ou:return"Profiler";case qd:return"StrictMode";case lu:return"Suspense";case cu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mm:return(e.displayName||"Context")+".Consumer";case fm:return(e._context.displayName||"Context")+".Provider";case Hd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wd:return t=e.displayName||null,t!==null?t:uu(e.type)||"Memo";case Fn:t=e._payload,e=e._init;try{return uu(e(t))}catch{}}return null}function O3(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return uu(t);case 8:return t===qd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function or(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ym(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $3(e){var t=ym(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pa(e){e._valueTracker||(e._valueTracker=$3(e))}function xm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ym(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function To(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function du(e,t){var n=t.checked;return Ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=or(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vm(e,t){t=t.checked,t!=null&&Ud(e,"checked",t,!1)}function hu(e,t){vm(e,t);var n=or(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pu(e,t.type,n):t.hasOwnProperty("defaultValue")&&pu(e,t.type,or(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function pu(e,t,n){(t!=="number"||To(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pi=Array.isArray;function ys(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+or(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function fu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return Ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Up(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(pi(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:or(n)}}function km(e,t){var n=or(t.value),r=or(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ra,bm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ra=Ra||document.createElement("div"),Ra.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ra.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ai(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yi={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},D3=["Webkit","ms","Moz","O"];Object.keys(yi).forEach(function(e){D3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),yi[t]=yi[e]})});function jm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||yi.hasOwnProperty(e)&&yi[e]?(""+t).trim():t+"px"}function Sm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=jm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var B3=Ce({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 gu(e,t){if(t){if(B3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function yu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xu=null;function Vd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vu=null,xs=null,vs=null;function Hp(e){if(e=ua(e)){if(typeof vu!="function")throw Error(M(280));var t=e.stateNode;t&&(t=bl(t),vu(e.stateNode,e.type,t))}}function Nm(e){xs?vs?vs.push(e):vs=[e]:xs=e}function Cm(){if(xs){var e=xs,t=vs;if(vs=xs=null,Hp(e),t)for(e=0;e<t.length;e++)Hp(t[e])}}function Em(e,t){return e(t)}function Tm(){}var sc=!1;function Pm(e,t,n){if(sc)return e(t,n);sc=!0;try{return Em(e,t,n)}finally{sc=!1,(xs!==null||vs!==null)&&(Tm(),Cm())}}function Li(e,t){var n=e.stateNode;if(n===null)return null;var r=bl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var ku=!1;if(jn)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){ku=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{ku=!1}function U3(e,t,n,r,s,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var xi=!1,Po=null,Ro=!1,wu=null,q3={onError:function(e){xi=!0,Po=e}};function H3(e,t,n,r,s,a,o,l,c){xi=!1,Po=null,U3.apply(q3,arguments)}function W3(e,t,n,r,s,a,o,l,c){if(H3.apply(this,arguments),xi){if(xi){var u=Po;xi=!1,Po=null}else throw Error(M(198));Ro||(Ro=!0,wu=u)}}function qr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Rm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Wp(e){if(qr(e)!==e)throw Error(M(188))}function V3(e){var t=e.alternate;if(!t){if(t=qr(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===n)return Wp(s),e;if(a===r)return Wp(s),t;a=a.sibling}throw Error(M(188))}if(n.return!==r.return)n=s,r=a;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=a;break}if(l===r){o=!0,r=s,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=s;break}if(l===r){o=!0,r=a,n=s;break}l=l.sibling}if(!o)throw Error(M(189))}}if(n.alternate!==r)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function Am(e){return e=V3(e),e!==null?Lm(e):null}function Lm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Lm(e);if(t!==null)return t;e=e.sibling}return null}var _m=St.unstable_scheduleCallback,Vp=St.unstable_cancelCallback,K3=St.unstable_shouldYield,Q3=St.unstable_requestPaint,Ae=St.unstable_now,G3=St.unstable_getCurrentPriorityLevel,Kd=St.unstable_ImmediatePriority,Im=St.unstable_UserBlockingPriority,Ao=St.unstable_NormalPriority,Z3=St.unstable_LowPriority,zm=St.unstable_IdlePriority,xl=null,an=null;function Y3(e){if(an&&typeof an.onCommitFiberRoot=="function")try{an.onCommitFiberRoot(xl,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:e4,X3=Math.log,J3=Math.LN2;function e4(e){return e>>>=0,e===0?32:31-(X3(e)/J3|0)|0}var Aa=64,La=4194304;function fi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Lo(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=fi(l):(a&=o,a!==0&&(r=fi(a)))}else o=n&~s,o!==0?r=fi(o):a!==0&&(r=fi(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Qt(t),s=1<<n,r|=e[n],t&=~s;return r}function t4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function n4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Qt(a),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=t4(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function bu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fm(){var e=Aa;return Aa<<=1,!(Aa&4194240)&&(Aa=64),e}function ic(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function la(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function r4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Qt(n),a=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~a}}function Qd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ue=0;function Mm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Om,Gd,$m,Dm,Bm,ju=!1,_a=[],Gn=null,Zn=null,Yn=null,_i=new Map,Ii=new Map,$n=[],s4="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 Kp(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":_i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(t.pointerId)}}function Js(e,t,n,r,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},t!==null&&(t=ua(t),t!==null&&Gd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function i4(e,t,n,r,s){switch(t){case"focusin":return Gn=Js(Gn,e,t,n,r,s),!0;case"dragenter":return Zn=Js(Zn,e,t,n,r,s),!0;case"mouseover":return Yn=Js(Yn,e,t,n,r,s),!0;case"pointerover":var a=s.pointerId;return _i.set(a,Js(_i.get(a)||null,e,t,n,r,s)),!0;case"gotpointercapture":return a=s.pointerId,Ii.set(a,Js(Ii.get(a)||null,e,t,n,r,s)),!0}return!1}function Um(e){var t=br(e.target);if(t!==null){var n=qr(t);if(n!==null){if(t=n.tag,t===13){if(t=Rm(n),t!==null){e.blockedOn=t,Bm(e.priority,function(){$m(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Su(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xu=r,n.target.dispatchEvent(r),xu=null}else return t=ua(n),t!==null&&Gd(t),e.blockedOn=n,!1;t.shift()}return!0}function Qp(e,t,n){lo(e)&&n.delete(t)}function a4(){ju=!1,Gn!==null&&lo(Gn)&&(Gn=null),Zn!==null&&lo(Zn)&&(Zn=null),Yn!==null&&lo(Yn)&&(Yn=null),_i.forEach(Qp),Ii.forEach(Qp)}function ei(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,St.unstable_scheduleCallback(St.unstable_NormalPriority,a4)))}function zi(e){function t(s){return ei(s,e)}if(0<_a.length){ei(_a[0],e);for(var n=1;n<_a.length;n++){var r=_a[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&ei(Gn,e),Zn!==null&&ei(Zn,e),Yn!==null&&ei(Yn,e),_i.forEach(t),Ii.forEach(t),n=0;n<$n.length;n++)r=$n[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<$n.length&&(n=$n[0],n.blockedOn===null);)Um(n),n.blockedOn===null&&$n.shift()}var ks=Pn.ReactCurrentBatchConfig,_o=!0;function o4(e,t,n,r){var s=ue,a=ks.transition;ks.transition=null;try{ue=1,Zd(e,t,n,r)}finally{ue=s,ks.transition=a}}function l4(e,t,n,r){var s=ue,a=ks.transition;ks.transition=null;try{ue=4,Zd(e,t,n,r)}finally{ue=s,ks.transition=a}}function Zd(e,t,n,r){if(_o){var s=Su(e,t,n,r);if(s===null)mc(e,t,r,Io,n),Kp(e,r);else if(i4(s,e,t,n,r))r.stopPropagation();else if(Kp(e,r),t&4&&-1<s4.indexOf(e)){for(;s!==null;){var a=ua(s);if(a!==null&&Om(a),a=Su(e,t,n,r),a===null&&mc(e,t,r,Io,n),a===s)break;s=a}s!==null&&r.stopPropagation()}else mc(e,t,r,null,n)}}var Io=null;function Su(e,t,n,r){if(Io=null,e=Vd(r),e=br(e),e!==null)if(t=qr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Rm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Io=e,null}function qm(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(G3()){case Kd:return 1;case Im:return 4;case Ao:case Z3:return 16;case zm:return 536870912;default:return 16}default:return 16}}var Bn=null,Yd=null,co=null;function Hm(){if(co)return co;var e,t=Yd,n=t.length,r,s="value"in Bn?Bn.value:Bn.textContent,a=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[a-r];r++);return co=s.slice(e,1<r?1-r:void 0)}function uo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ia(){return!0}function Gp(){return!1}function Ct(e){function t(n,r,s,a,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ia:Gp,this.isPropagationStopped=Gp,this}return Ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ia)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ia)},persist:function(){},isPersistent:Ia}),t}var Ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xd=Ct(Ds),ca=Ce({},Ds,{view:0,detail:0}),c4=Ct(ca),ac,oc,ti,vl=Ce({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ti&&(ti&&e.type==="mousemove"?(ac=e.screenX-ti.screenX,oc=e.screenY-ti.screenY):oc=ac=0,ti=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:oc}}),Zp=Ct(vl),u4=Ce({},vl,{dataTransfer:0}),d4=Ct(u4),h4=Ce({},ca,{relatedTarget:0}),lc=Ct(h4),p4=Ce({},Ds,{animationName:0,elapsedTime:0,pseudoElement:0}),f4=Ct(p4),m4=Ce({},Ds,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g4=Ct(m4),y4=Ce({},Ds,{data:0}),Yp=Ct(y4),x4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v4={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"},k4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=k4[e])?!!t[e]:!1}function Jd(){return w4}var b4=Ce({},ca,{key:function(e){if(e.key){var t=x4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=uo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jd,charCode:function(e){return e.type==="keypress"?uo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?uo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j4=Ct(b4),S4=Ce({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xp=Ct(S4),N4=Ce({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jd}),C4=Ct(N4),E4=Ce({},Ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),T4=Ct(E4),P4=Ce({},vl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),R4=Ct(P4),A4=[9,13,27,32],eh=jn&&"CompositionEvent"in window,vi=null;jn&&"documentMode"in document&&(vi=document.documentMode);var L4=jn&&"TextEvent"in window&&!vi,Wm=jn&&(!eh||vi&&8<vi&&11>=vi),Jp=" ",ef=!1;function Vm(e,t){switch(e){case"keyup":return A4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Km(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var os=!1;function _4(e,t){switch(e){case"compositionend":return Km(t);case"keypress":return t.which!==32?null:(ef=!0,Jp);case"textInput":return e=t.data,e===Jp&&ef?null:e;default:return null}}function I4(e,t){if(os)return e==="compositionend"||!eh&&Vm(e,t)?(e=Hm(),co=Yd=Bn=null,os=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wm&&t.locale!=="ko"?null:t.data;default:return null}}var z4={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 tf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z4[e.type]:t==="textarea"}function Qm(e,t,n,r){Nm(r),t=zo(t,"onChange"),0<t.length&&(n=new Xd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ki=null,Fi=null;function F4(e){ig(e,0)}function kl(e){var t=us(e);if(xm(t))return e}function M4(e,t){if(e==="change")return t}var Gm=!1;if(jn){var cc;if(jn){var uc="oninput"in document;if(!uc){var nf=document.createElement("div");nf.setAttribute("oninput","return;"),uc=typeof nf.oninput=="function"}cc=uc}else cc=!1;Gm=cc&&(!document.documentMode||9<document.documentMode)}function rf(){ki&&(ki.detachEvent("onpropertychange",Zm),Fi=ki=null)}function Zm(e){if(e.propertyName==="value"&&kl(Fi)){var t=[];Qm(t,Fi,e,Vd(e)),Pm(F4,t)}}function O4(e,t,n){e==="focusin"?(rf(),ki=t,Fi=n,ki.attachEvent("onpropertychange",Zm)):e==="focusout"&&rf()}function $4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kl(Fi)}function D4(e,t){if(e==="click")return kl(t)}function B4(e,t){if(e==="input"||e==="change")return kl(t)}function U4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:U4;function Mi(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!au.call(t,s)||!Xt(e[s],t[s]))return!1}return!0}function sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function af(e,t){var n=sf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sf(n)}}function Ym(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ym(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xm(){for(var e=window,t=To();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=To(e.document)}return t}function th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function q4(e){var t=Xm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ym(n.ownerDocument.documentElement,n)){if(r!==null&&th(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=af(n,a);var o=af(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var H4=jn&&"documentMode"in document&&11>=document.documentMode,ls=null,Nu=null,wi=null,Cu=!1;function of(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cu||ls==null||ls!==To(r)||(r=ls,"selectionStart"in r&&th(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wi&&Mi(wi,r)||(wi=r,r=zo(Nu,"onSelect"),0<r.length&&(t=new Xd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ls)))}function za(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cs={animationend:za("Animation","AnimationEnd"),animationiteration:za("Animation","AnimationIteration"),animationstart:za("Animation","AnimationStart"),transitionend:za("Transition","TransitionEnd")},dc={},Jm={};jn&&(Jm=document.createElement("div").style,"AnimationEvent"in window||(delete cs.animationend.animation,delete cs.animationiteration.animation,delete cs.animationstart.animation),"TransitionEvent"in window||delete cs.transitionend.transition);function wl(e){if(dc[e])return dc[e];if(!cs[e])return e;var t=cs[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jm)return dc[e]=t[n];return e}var eg=wl("animationend"),tg=wl("animationiteration"),ng=wl("animationstart"),rg=wl("transitionend"),sg=new Map,lf="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 ur(e,t){sg.set(e,t),Ur(t,[e])}for(var hc=0;hc<lf.length;hc++){var pc=lf[hc],W4=pc.toLowerCase(),V4=pc[0].toUpperCase()+pc.slice(1);ur(W4,"on"+V4)}ur(eg,"onAnimationEnd");ur(tg,"onAnimationIteration");ur(ng,"onAnimationStart");ur("dblclick","onDoubleClick");ur("focusin","onFocus");ur("focusout","onBlur");ur(rg,"onTransitionEnd");Ns("onMouseEnter",["mouseout","mouseover"]);Ns("onMouseLeave",["mouseout","mouseover"]);Ns("onPointerEnter",["pointerout","pointerover"]);Ns("onPointerLeave",["pointerout","pointerover"]);Ur("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ur("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ur("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ur("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ur("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ur("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(" "),K4=new Set("cancel close invalid load scroll toggle".split(" ").concat(mi));function cf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,W3(r,t,void 0,e),e.currentTarget=null}function ig(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&s.isPropagationStopped())break e;cf(s,l,u),a=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&s.isPropagationStopped())break e;cf(s,l,u),a=c}}}if(Ro)throw e=wu,Ro=!1,wu=null,e}function xe(e,t){var n=t[Au];n===void 0&&(n=t[Au]=new Set);var r=e+"__bubble";n.has(r)||(ag(t,e,2,!1),n.add(r))}function fc(e,t,n){var r=0;t&&(r|=4),ag(n,e,r,t)}var Fa="_reactListening"+Math.random().toString(36).slice(2);function Oi(e){if(!e[Fa]){e[Fa]=!0,pm.forEach(function(n){n!=="selectionchange"&&(K4.has(n)||fc(n,!1,e),fc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fa]||(t[Fa]=!0,fc("selectionchange",!1,t))}}function ag(e,t,n,r){switch(qm(t)){case 1:var s=o4;break;case 4:s=l4;break;default:s=Zd}n=s.bind(null,t,n,e),s=void 0,!ku||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function mc(e,t,n,r,s){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=br(l),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue e}l=l.parentNode}}r=r.return}Pm(function(){var u=a,h=Vd(n),d=[];e:{var f=sg.get(e);if(f!==void 0){var p=Xd,m=e;switch(e){case"keypress":if(uo(n)===0)break e;case"keydown":case"keyup":p=j4;break;case"focusin":m="focus",p=lc;break;case"focusout":m="blur",p=lc;break;case"beforeblur":case"afterblur":p=lc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Zp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=d4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=C4;break;case eg:case tg:case ng:p=f4;break;case rg:p=T4;break;case"scroll":p=c4;break;case"wheel":p=R4;break;case"copy":case"cut":case"paste":p=g4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xp}var g=(t&4)!==0,v=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var x=u,k;x!==null;){k=x;var w=k.stateNode;if(k.tag===5&&w!==null&&(k=w,y!==null&&(w=Li(x,y),w!=null&&g.push($i(x,w,k)))),v)break;x=x.return}0<g.length&&(f=new p(f,m,null,n,h),d.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==xu&&(m=n.relatedTarget||n.fromElement)&&(br(m)||m[Sn]))break e;if((p||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?br(m):null,m!==null&&(v=qr(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=Zp,w="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=Xp,w="onPointerLeave",y="onPointerEnter",x="pointer"),v=p==null?f:us(p),k=m==null?f:us(m),f=new g(w,x+"leave",p,n,h),f.target=v,f.relatedTarget=k,w=null,br(h)===u&&(g=new g(y,x+"enter",m,n,h),g.target=k,g.relatedTarget=v,w=g),v=w,p&&m)t:{for(g=p,y=m,x=0,k=g;k;k=Xr(k))x++;for(k=0,w=y;w;w=Xr(w))k++;for(;0<x-k;)g=Xr(g),x--;for(;0<k-x;)y=Xr(y),k--;for(;x--;){if(g===y||y!==null&&g===y.alternate)break t;g=Xr(g),y=Xr(y)}g=null}else g=null;p!==null&&uf(d,f,p,g,!1),m!==null&&v!==null&&uf(d,v,m,g,!0)}}e:{if(f=u?us(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=M4;else if(tf(f))if(Gm)T=B4;else{T=$4;var b=O4}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=D4);if(T&&(T=T(e,u))){Qm(d,T,n,h);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&pu(f,"number",f.value)}switch(b=u?us(u):window,e){case"focusin":(tf(b)||b.contentEditable==="true")&&(ls=b,Nu=u,wi=null);break;case"focusout":wi=Nu=ls=null;break;case"mousedown":Cu=!0;break;case"contextmenu":case"mouseup":case"dragend":Cu=!1,of(d,n,h);break;case"selectionchange":if(H4)break;case"keydown":case"keyup":of(d,n,h)}var E;if(eh)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else os?Vm(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Wm&&n.locale!=="ko"&&(os||S!=="onCompositionStart"?S==="onCompositionEnd"&&os&&(E=Hm()):(Bn=h,Yd="value"in Bn?Bn.value:Bn.textContent,os=!0)),b=zo(u,S),0<b.length&&(S=new Yp(S,e,null,n,h),d.push({event:S,listeners:b}),E?S.data=E:(E=Km(n),E!==null&&(S.data=E)))),(E=L4?_4(e,n):I4(e,n))&&(u=zo(u,"onBeforeInput"),0<u.length&&(h=new Yp("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:u}),h.data=E))}ig(d,t)})}function $i(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zo(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=Li(e,n),a!=null&&r.unshift($i(e,a,s)),a=Li(e,t),a!=null&&r.push($i(e,a,s))),e=e.return}return r}function Xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uf(e,t,n,r,s){for(var a=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Li(n,a),c!=null&&o.unshift($i(n,c,l))):s||(c=Li(n,a),c!=null&&o.push($i(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Q4=/\r\n?/g,G4=/\u0000|\uFFFD/g;function df(e){return(typeof e=="string"?e:""+e).replace(Q4,`
38
+ `).replace(G4,"")}function Ma(e,t,n){if(t=df(t),df(e)!==t&&n)throw Error(M(425))}function Fo(){}var Eu=null,Tu=null;function Pu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ru=typeof setTimeout=="function"?setTimeout:void 0,Z4=typeof clearTimeout=="function"?clearTimeout:void 0,hf=typeof Promise=="function"?Promise:void 0,Y4=typeof queueMicrotask=="function"?queueMicrotask:typeof hf<"u"?function(e){return hf.resolve(null).then(e).catch(X4)}:Ru;function X4(e){setTimeout(function(){throw e})}function gc(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),zi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);zi(t)}function Xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function pf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Bs=Math.random().toString(36).slice(2),rn="__reactFiber$"+Bs,Di="__reactProps$"+Bs,Sn="__reactContainer$"+Bs,Au="__reactEvents$"+Bs,J4="__reactListeners$"+Bs,ev="__reactHandles$"+Bs;function br(e){var t=e[rn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sn]||n[rn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pf(e);e!==null;){if(n=e[rn])return n;e=pf(e)}return t}e=n,n=e.parentNode}return null}function ua(e){return e=e[rn]||e[Sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function us(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function bl(e){return e[Di]||null}var Lu=[],ds=-1;function dr(e){return{current:e}}function ve(e){0>ds||(e.current=Lu[ds],Lu[ds]=null,ds--)}function me(e,t){ds++,Lu[ds]=e.current,e.current=t}var lr={},Ze=dr(lr),ct=dr(!1),Ir=lr;function Cs(e,t){var n=e.type.contextTypes;if(!n)return lr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ut(e){return e=e.childContextTypes,e!=null}function Mo(){ve(ct),ve(Ze)}function ff(e,t,n){if(Ze.current!==lr)throw Error(M(168));me(Ze,t),me(ct,n)}function og(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(M(108,O3(e)||"Unknown",s));return Ce({},n,r)}function Oo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||lr,Ir=Ze.current,me(Ze,e),me(ct,ct.current),!0}function mf(e,t,n){var r=e.stateNode;if(!r)throw Error(M(169));n?(e=og(e,t,Ir),r.__reactInternalMemoizedMergedChildContext=e,ve(ct),ve(Ze),me(Ze,e)):ve(ct),me(ct,n)}var gn=null,jl=!1,yc=!1;function lg(e){gn===null?gn=[e]:gn.push(e)}function tv(e){jl=!0,lg(e)}function hr(){if(!yc&&gn!==null){yc=!0;var e=0,t=ue;try{var n=gn;for(ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}gn=null,jl=!1}catch(s){throw gn!==null&&(gn=gn.slice(e+1)),_m(Kd,hr),s}finally{ue=t,yc=!1}}return null}var hs=[],ps=0,$o=null,Do=0,At=[],Lt=0,zr=null,xn=1,vn="";function vr(e,t){hs[ps++]=Do,hs[ps++]=$o,$o=e,Do=t}function cg(e,t,n){At[Lt++]=xn,At[Lt++]=vn,At[Lt++]=zr,zr=e;var r=xn;e=vn;var s=32-Qt(r)-1;r&=~(1<<s),n+=1;var a=32-Qt(t)+s;if(30<a){var o=s-s%5;a=(r&(1<<o)-1).toString(32),r>>=o,s-=o,xn=1<<32-Qt(t)+s|n<<s|r,vn=a+e}else xn=1<<a|n<<s|r,vn=e}function nh(e){e.return!==null&&(vr(e,1),cg(e,1,0))}function rh(e){for(;e===$o;)$o=hs[--ps],hs[ps]=null,Do=hs[--ps],hs[ps]=null;for(;e===zr;)zr=At[--Lt],At[Lt]=null,vn=At[--Lt],At[Lt]=null,xn=At[--Lt],At[Lt]=null}var bt=null,kt=null,we=!1,Vt=null;function ug(e,t){var n=It(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function gf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,kt=Xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=zr!==null?{id:xn,overflow:vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=It(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,bt=e,kt=null,!0):!1;default:return!1}}function _u(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Iu(e){if(we){var t=kt;if(t){var n=t;if(!gf(e,t)){if(_u(e))throw Error(M(418));t=Xn(n.nextSibling);var r=bt;t&&gf(e,t)?ug(r,n):(e.flags=e.flags&-4097|2,we=!1,bt=e)}}else{if(_u(e))throw Error(M(418));e.flags=e.flags&-4097|2,we=!1,bt=e}}}function yf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Oa(e){if(e!==bt)return!1;if(!we)return yf(e),we=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Pu(e.type,e.memoizedProps)),t&&(t=kt)){if(_u(e))throw dg(),Error(M(418));for(;t;)ug(e,t),t=Xn(t.nextSibling)}if(yf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kt=Xn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kt=null}}else kt=bt?Xn(e.stateNode.nextSibling):null;return!0}function dg(){for(var e=kt;e;)e=Xn(e.nextSibling)}function Es(){kt=bt=null,we=!1}function sh(e){Vt===null?Vt=[e]:Vt.push(e)}var nv=Pn.ReactCurrentBatchConfig;function ni(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var r=n.stateNode}if(!r)throw Error(M(147,e));var s=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=s.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function $a(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xf(e){var t=e._init;return t(e._payload)}function hg(e){function t(y,x){if(e){var k=y.deletions;k===null?(y.deletions=[x],y.flags|=16):k.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function s(y,x){return y=nr(y,x),y.index=0,y.sibling=null,y}function a(y,x,k){return y.index=k,e?(k=y.alternate,k!==null?(k=k.index,k<x?(y.flags|=2,x):k):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,x,k,w){return x===null||x.tag!==6?(x=Sc(k,y.mode,w),x.return=y,x):(x=s(x,k),x.return=y,x)}function c(y,x,k,w){var T=k.type;return T===as?h(y,x,k.props.children,w,k.key):x!==null&&(x.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Fn&&xf(T)===x.type)?(w=s(x,k.props),w.ref=ni(y,x,k),w.return=y,w):(w=xo(k.type,k.key,k.props,null,y.mode,w),w.ref=ni(y,x,k),w.return=y,w)}function u(y,x,k,w){return x===null||x.tag!==4||x.stateNode.containerInfo!==k.containerInfo||x.stateNode.implementation!==k.implementation?(x=Nc(k,y.mode,w),x.return=y,x):(x=s(x,k.children||[]),x.return=y,x)}function h(y,x,k,w,T){return x===null||x.tag!==7?(x=Tr(k,y.mode,w,T),x.return=y,x):(x=s(x,k),x.return=y,x)}function d(y,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Sc(""+x,y.mode,k),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ta:return k=xo(x.type,x.key,x.props,null,y.mode,k),k.ref=ni(y,null,x),k.return=y,k;case is:return x=Nc(x,y.mode,k),x.return=y,x;case Fn:var w=x._init;return d(y,w(x._payload),k)}if(pi(x)||Ys(x))return x=Tr(x,y.mode,k,null),x.return=y,x;$a(y,x)}return null}function f(y,x,k,w){var T=x!==null?x.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return T!==null?null:l(y,x,""+k,w);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Ta:return k.key===T?c(y,x,k,w):null;case is:return k.key===T?u(y,x,k,w):null;case Fn:return T=k._init,f(y,x,T(k._payload),w)}if(pi(k)||Ys(k))return T!==null?null:h(y,x,k,w,null);$a(y,k)}return null}function p(y,x,k,w,T){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(k)||null,l(x,y,""+w,T);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ta:return y=y.get(w.key===null?k:w.key)||null,c(x,y,w,T);case is:return y=y.get(w.key===null?k:w.key)||null,u(x,y,w,T);case Fn:var b=w._init;return p(y,x,k,b(w._payload),T)}if(pi(w)||Ys(w))return y=y.get(k)||null,h(x,y,w,T,null);$a(x,w)}return null}function m(y,x,k,w){for(var T=null,b=null,E=x,S=x=0,A=null;E!==null&&S<k.length;S++){E.index>S?(A=E,E=null):A=E.sibling;var C=f(y,E,k[S],w);if(C===null){E===null&&(E=A);break}e&&E&&C.alternate===null&&t(y,E),x=a(C,x,S),b===null?T=C:b.sibling=C,b=C,E=A}if(S===k.length)return n(y,E),we&&vr(y,S),T;if(E===null){for(;S<k.length;S++)E=d(y,k[S],w),E!==null&&(x=a(E,x,S),b===null?T=E:b.sibling=E,b=E);return we&&vr(y,S),T}for(E=r(y,E);S<k.length;S++)A=p(E,y,S,k[S],w),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?S:A.key),x=a(A,x,S),b===null?T=A:b.sibling=A,b=A);return e&&E.forEach(function(R){return t(y,R)}),we&&vr(y,S),T}function g(y,x,k,w){var T=Ys(k);if(typeof T!="function")throw Error(M(150));if(k=T.call(k),k==null)throw Error(M(151));for(var b=T=null,E=x,S=x=0,A=null,C=k.next();E!==null&&!C.done;S++,C=k.next()){E.index>S?(A=E,E=null):A=E.sibling;var R=f(y,E,C.value,w);if(R===null){E===null&&(E=A);break}e&&E&&R.alternate===null&&t(y,E),x=a(R,x,S),b===null?T=R:b.sibling=R,b=R,E=A}if(C.done)return n(y,E),we&&vr(y,S),T;if(E===null){for(;!C.done;S++,C=k.next())C=d(y,C.value,w),C!==null&&(x=a(C,x,S),b===null?T=C:b.sibling=C,b=C);return we&&vr(y,S),T}for(E=r(y,E);!C.done;S++,C=k.next())C=p(E,y,S,C.value,w),C!==null&&(e&&C.alternate!==null&&E.delete(C.key===null?S:C.key),x=a(C,x,S),b===null?T=C:b.sibling=C,b=C);return e&&E.forEach(function(L){return t(y,L)}),we&&vr(y,S),T}function v(y,x,k,w){if(typeof k=="object"&&k!==null&&k.type===as&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Ta:e:{for(var T=k.key,b=x;b!==null;){if(b.key===T){if(T=k.type,T===as){if(b.tag===7){n(y,b.sibling),x=s(b,k.props.children),x.return=y,y=x;break e}}else if(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Fn&&xf(T)===b.type){n(y,b.sibling),x=s(b,k.props),x.ref=ni(y,b,k),x.return=y,y=x;break e}n(y,b);break}else t(y,b);b=b.sibling}k.type===as?(x=Tr(k.props.children,y.mode,w,k.key),x.return=y,y=x):(w=xo(k.type,k.key,k.props,null,y.mode,w),w.ref=ni(y,x,k),w.return=y,y=w)}return o(y);case is:e:{for(b=k.key;x!==null;){if(x.key===b)if(x.tag===4&&x.stateNode.containerInfo===k.containerInfo&&x.stateNode.implementation===k.implementation){n(y,x.sibling),x=s(x,k.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=Nc(k,y.mode,w),x.return=y,y=x}return o(y);case Fn:return b=k._init,v(y,x,b(k._payload),w)}if(pi(k))return m(y,x,k,w);if(Ys(k))return g(y,x,k,w);$a(y,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,x!==null&&x.tag===6?(n(y,x.sibling),x=s(x,k),x.return=y,y=x):(n(y,x),x=Sc(k,y.mode,w),x.return=y,y=x),o(y)):n(y,x)}return v}var Ts=hg(!0),pg=hg(!1),Bo=dr(null),Uo=null,fs=null,ih=null;function ah(){ih=fs=Uo=null}function oh(e){var t=Bo.current;ve(Bo),e._currentValue=t}function zu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ws(e,t){Uo=e,ih=fs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ot=!0),e.firstContext=null)}function Ft(e){var t=e._currentValue;if(ih!==e)if(e={context:e,memoizedValue:t,next:null},fs===null){if(Uo===null)throw Error(M(308));fs=e,Uo.dependencies={lanes:0,firstContext:e}}else fs=fs.next=e;return t}var jr=null;function lh(e){jr===null?jr=[e]:jr.push(e)}function fg(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,lh(t)):(n.next=s.next,s.next=n),t.interleaved=n,Nn(e,r)}function Nn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Mn=!1;function ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Nn(e,n)}return s=r.interleaved,s===null?(t.next=t,lh(r)):(t.next=s.next,s.next=t),r.interleaved=t,Nn(e,n)}function ho(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qd(e,n)}}function vf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?s=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?s=a=t:a=a.next=t}else s=a=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function qo(e,t,n,r){var s=e.updateQueue;Mn=!1;var a=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(a!==null){var d=s.baseState;o=0,h=u=c=null,l=a;do{var f=l.lane,p=l.eventTime;if((r&f)===f){h!==null&&(h=h.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Ce({},d,f);break e;case 2:Mn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=p,c=d):h=h.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(h===null&&(c=d),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);Mr|=o,e.lanes=o,e.memoizedState=d}}function kf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(M(191,s));s.call(r)}}}var da={},on=dr(da),Bi=dr(da),Ui=dr(da);function Sr(e){if(e===da)throw Error(M(174));return e}function uh(e,t){switch(me(Ui,t),me(Bi,e),me(on,da),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:mu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=mu(t,e)}ve(on),me(on,t)}function Ps(){ve(on),ve(Bi),ve(Ui)}function gg(e){Sr(Ui.current);var t=Sr(on.current),n=mu(t,e.type);t!==n&&(me(Bi,e),me(on,n))}function dh(e){Bi.current===e&&(ve(on),ve(Bi))}var Se=dr(0);function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xc=[];function hh(){for(var e=0;e<xc.length;e++)xc[e]._workInProgressVersionPrimary=null;xc.length=0}var po=Pn.ReactCurrentDispatcher,vc=Pn.ReactCurrentBatchConfig,Fr=0,Ne=null,Fe=null,De=null,Wo=!1,bi=!1,qi=0,rv=0;function We(){throw Error(M(321))}function ph(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xt(e[n],t[n]))return!1;return!0}function fh(e,t,n,r,s,a){if(Fr=a,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,po.current=e===null||e.memoizedState===null?ov:lv,e=n(r,s),bi){a=0;do{if(bi=!1,qi=0,25<=a)throw Error(M(301));a+=1,De=Fe=null,t.updateQueue=null,po.current=cv,e=n(r,s)}while(bi)}if(po.current=Vo,t=Fe!==null&&Fe.next!==null,Fr=0,De=Fe=Ne=null,Wo=!1,t)throw Error(M(300));return e}function mh(){var e=qi!==0;return qi=0,e}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Ne.memoizedState=De=e:De=De.next=e,De}function Mt(){if(Fe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=De===null?Ne.memoizedState:De.next;if(t!==null)De=t,Fe=e;else{if(e===null)throw Error(M(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},De===null?Ne.memoizedState=De=e:De=De.next=e}return De}function Hi(e,t){return typeof t=="function"?t(e):t}function kc(e){var t=Mt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=Fe,s=r.baseQueue,a=n.pending;if(a!==null){if(s!==null){var o=s.next;s.next=a.next,a.next=o}r.baseQueue=s=a,n.pending=null}if(s!==null){a=s.next,r=r.baseState;var l=o=null,c=null,u=a;do{var h=u.lane;if((Fr&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,o=r):c=c.next=d,Ne.lanes|=h,Mr|=h}u=u.next}while(u!==null&&u!==a);c===null?o=r:c.next=l,Xt(r,t.memoizedState)||(ot=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do a=s.lane,Ne.lanes|=a,Mr|=a,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wc(e){var t=Mt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,a=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do a=e(a,o.action),o=o.next;while(o!==s);Xt(a,t.memoizedState)||(ot=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function yg(){}function xg(e,t){var n=Ne,r=Mt(),s=t(),a=!Xt(r.memoizedState,s);if(a&&(r.memoizedState=s,ot=!0),r=r.queue,gh(wg.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||De!==null&&De.memoizedState.tag&1){if(n.flags|=2048,Wi(9,kg.bind(null,n,r,s,t),void 0,null),Be===null)throw Error(M(349));Fr&30||vg(n,t,s)}return s}function vg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kg(e,t,n,r){t.value=n,t.getSnapshot=r,bg(t)&&jg(e)}function wg(e,t,n){return n(function(){bg(t)&&jg(e)})}function bg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xt(e,n)}catch{return!0}}function jg(e){var t=Nn(e,1);t!==null&&Gt(t,e,1,-1)}function wf(e){var t=en();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=av.bind(null,Ne,e),[t.memoizedState,e]}function Wi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Sg(){return Mt().memoizedState}function fo(e,t,n,r){var s=en();Ne.flags|=e,s.memoizedState=Wi(1|t,n,void 0,r===void 0?null:r)}function Sl(e,t,n,r){var s=Mt();r=r===void 0?null:r;var a=void 0;if(Fe!==null){var o=Fe.memoizedState;if(a=o.destroy,r!==null&&ph(r,o.deps)){s.memoizedState=Wi(t,n,a,r);return}}Ne.flags|=e,s.memoizedState=Wi(1|t,n,a,r)}function bf(e,t){return fo(8390656,8,e,t)}function gh(e,t){return Sl(2048,8,e,t)}function Ng(e,t){return Sl(4,2,e,t)}function Cg(e,t){return Sl(4,4,e,t)}function Eg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tg(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4,4,Eg.bind(null,t,e),n)}function yh(){}function Pg(e,t){var n=Mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ph(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Rg(e,t){var n=Mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ph(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ag(e,t,n){return Fr&21?(Xt(n,t)||(n=Fm(),Ne.lanes|=n,Mr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ot=!0),e.memoizedState=n)}function sv(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var r=vc.transition;vc.transition={};try{e(!1),t()}finally{ue=n,vc.transition=r}}function Lg(){return Mt().memoizedState}function iv(e,t,n){var r=tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_g(e))Ig(t,n);else if(n=fg(e,t,n,r),n!==null){var s=tt();Gt(n,e,r,s),zg(n,t,r)}}function av(e,t,n){var r=tr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_g(e))Ig(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,n);if(s.hasEagerState=!0,s.eagerState=l,Xt(l,o)){var c=t.interleaved;c===null?(s.next=s,lh(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=fg(e,t,s,r),n!==null&&(s=tt(),Gt(n,e,r,s),zg(n,t,r))}}function _g(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ig(e,t){bi=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qd(e,n)}}var Vo={readContext:Ft,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useInsertionEffect:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useSyncExternalStore:We,useId:We,unstable_isNewReconciler:!1},ov={readContext:Ft,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:bf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fo(4194308,4,Eg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fo(4194308,4,e,t)},useInsertionEffect:function(e,t){return fo(4,2,e,t)},useMemo:function(e,t){var n=en();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=en();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iv.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:wf,useDebugValue:yh,useDeferredValue:function(e){return en().memoizedState=e},useTransition:function(){var e=wf(!1),t=e[0];return e=sv.bind(null,e[1]),en().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,s=en();if(we){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Be===null)throw Error(M(349));Fr&30||vg(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,bf(wg.bind(null,r,a,e),[e]),r.flags|=2048,Wi(9,kg.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=en(),t=Be.identifierPrefix;if(we){var n=vn,r=xn;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=qi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lv={readContext:Ft,useCallback:Pg,useContext:Ft,useEffect:gh,useImperativeHandle:Tg,useInsertionEffect:Ng,useLayoutEffect:Cg,useMemo:Rg,useReducer:kc,useRef:Sg,useState:function(){return kc(Hi)},useDebugValue:yh,useDeferredValue:function(e){var t=Mt();return Ag(t,Fe.memoizedState,e)},useTransition:function(){var e=kc(Hi)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:yg,useSyncExternalStore:xg,useId:Lg,unstable_isNewReconciler:!1},cv={readContext:Ft,useCallback:Pg,useContext:Ft,useEffect:gh,useImperativeHandle:Tg,useInsertionEffect:Ng,useLayoutEffect:Cg,useMemo:Rg,useReducer:wc,useRef:Sg,useState:function(){return wc(Hi)},useDebugValue:yh,useDeferredValue:function(e){var t=Mt();return Fe===null?t.memoizedState=e:Ag(t,Fe.memoizedState,e)},useTransition:function(){var e=wc(Hi)[0],t=Mt().memoizedState;return[e,t]},useMutableSource:yg,useSyncExternalStore:xg,useId:Lg,unstable_isNewReconciler:!1};function Ht(e,t){if(e&&e.defaultProps){t=Ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Fu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nl={isMounted:function(e){return(e=e._reactInternals)?qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),s=tr(e),a=wn(r,s);a.payload=t,n!=null&&(a.callback=n),t=Jn(e,a,s),t!==null&&(Gt(t,e,s,r),ho(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),s=tr(e),a=wn(r,s);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Jn(e,a,s),t!==null&&(Gt(t,e,s,r),ho(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=tr(e),s=wn(n,r);s.tag=2,t!=null&&(s.callback=t),t=Jn(e,s,r),t!==null&&(Gt(t,e,r,n),ho(t,e,r))}};function jf(e,t,n,r,s,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mi(n,r)||!Mi(s,a):!0}function Fg(e,t,n){var r=!1,s=lr,a=t.contextType;return typeof a=="object"&&a!==null?a=Ft(a):(s=ut(t)?Ir:Ze.current,r=t.contextTypes,a=(r=r!=null)?Cs(e,s):lr),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Nl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function Sf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Nl.enqueueReplaceState(t,t.state,null)}function Mu(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},ch(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=Ft(a):(a=ut(t)?Ir:Ze.current,s.context=Cs(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Fu(e,t,a,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Nl.enqueueReplaceState(s,s.state,null),qo(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Rs(e,t){try{var n="",r=t;do n+=M3(r),r=r.return;while(r);var s=n}catch(a){s=`
39
+ Error generating stack: `+a.message+`
40
+ `+a.stack}return{value:e,source:t,stack:s,digest:null}}function bc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ou(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uv=typeof WeakMap=="function"?WeakMap:Map;function Mg(e,t,n){n=wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qo||(Qo=!0,Qu=r),Ou(e,t)},n}function Og(e,t,n){n=wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ou(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Ou(e,t),typeof r!="function"&&(er===null?er=new Set([this]):er.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Nf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uv;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=Sv.bind(null,e,t,n),t.then(e,e))}function Cf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ef(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=wn(-1,1),t.tag=2,Jn(n,t,1))),n.lanes|=1),e)}var dv=Pn.ReactCurrentOwner,ot=!1;function Xe(e,t,n,r){t.child=e===null?pg(t,null,n,r):Ts(t,e.child,n,r)}function Tf(e,t,n,r,s){n=n.render;var a=t.ref;return ws(t,s),r=fh(e,t,n,r,a,s),n=mh(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Cn(e,t,s)):(we&&n&&nh(t),t.flags|=1,Xe(e,t,r,s),t.child)}function Pf(e,t,n,r,s){if(e===null){var a=n.type;return typeof a=="function"&&!Nh(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,$g(e,t,a,r,s)):(e=xo(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&s)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Mi,n(o,r)&&e.ref===t.ref)return Cn(e,t,s)}return t.flags|=1,e=nr(a,r),e.ref=t.ref,e.return=t,t.child=e}function $g(e,t,n,r,s){if(e!==null){var a=e.memoizedProps;if(Mi(a,r)&&e.ref===t.ref)if(ot=!1,t.pendingProps=r=a,(e.lanes&s)!==0)e.flags&131072&&(ot=!0);else return t.lanes=e.lanes,Cn(e,t,s)}return $u(e,t,n,r,s)}function Dg(e,t,n){var r=t.pendingProps,s=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(gs,xt),xt|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(gs,xt),xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,me(gs,xt),xt|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,me(gs,xt),xt|=r;return Xe(e,t,s,n),t.child}function Bg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $u(e,t,n,r,s){var a=ut(n)?Ir:Ze.current;return a=Cs(t,a),ws(t,s),n=fh(e,t,n,r,a,s),r=mh(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Cn(e,t,s)):(we&&r&&nh(t),t.flags|=1,Xe(e,t,n,s),t.child)}function Rf(e,t,n,r,s){if(ut(n)){var a=!0;Oo(t)}else a=!1;if(ws(t,s),t.stateNode===null)mo(e,t),Fg(t,n,r),Mu(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ft(u):(u=ut(n)?Ir:Ze.current,u=Cs(t,u));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Sf(t,o,r,u),Mn=!1;var f=t.memoizedState;o.state=f,qo(t,r,o,s),c=t.memoizedState,l!==r||f!==c||ct.current||Mn?(typeof h=="function"&&(Fu(t,n,h,r),c=t.memoizedState),(l=Mn||jf(t,n,l,r,f,c,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,mg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Ht(t.type,l),o.props=u,d=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ft(c):(c=ut(n)?Ir:Ze.current,c=Cs(t,c));var p=n.getDerivedStateFromProps;(h=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||f!==c)&&Sf(t,o,r,c),Mn=!1,f=t.memoizedState,o.state=f,qo(t,r,o,s);var m=t.memoizedState;l!==d||f!==m||ct.current||Mn?(typeof p=="function"&&(Fu(t,n,p,r),m=t.memoizedState),(u=Mn||jf(t,n,u,r,f,m,c)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Du(e,t,n,r,a,s)}function Du(e,t,n,r,s,a){Bg(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&mf(t,n,!1),Cn(e,t,a);r=t.stateNode,dv.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ts(t,e.child,null,a),t.child=Ts(t,null,l,a)):Xe(e,t,l,a),t.memoizedState=r.state,s&&mf(t,n,!0),t.child}function Ug(e){var t=e.stateNode;t.pendingContext?ff(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ff(e,t.context,!1),uh(e,t.containerInfo)}function Af(e,t,n,r,s){return Es(),sh(s),t.flags|=256,Xe(e,t,n,r),t.child}var Bu={dehydrated:null,treeContext:null,retryLane:0};function Uu(e){return{baseLanes:e,cachePool:null,transitions:null}}function qg(e,t,n){var r=t.pendingProps,s=Se.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),me(Se,s&1),e===null)return Iu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Tl(o,r,0,null),e=Tr(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Uu(n),t.memoizedState=Bu,e):xh(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return hv(e,t,o,r,l,s,n);if(a){a=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=nr(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?a=nr(l,a):(a=Tr(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Uu(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Bu,r}return a=e.child,e=a.sibling,r=nr(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xh(e,t){return t=Tl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Da(e,t,n,r){return r!==null&&sh(r),Ts(t,e.child,null,n),e=xh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hv(e,t,n,r,s,a,o){if(n)return t.flags&256?(t.flags&=-257,r=bc(Error(M(422))),Da(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,s=t.mode,r=Tl({mode:"visible",children:r.children},s,0,null),a=Tr(a,s,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Ts(t,e.child,null,o),t.child.memoizedState=Uu(o),t.memoizedState=Bu,a);if(!(t.mode&1))return Da(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,a=Error(M(419)),r=bc(a,r,void 0),Da(e,t,o,r)}if(l=(o&e.childLanes)!==0,ot||l){if(r=Be,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,Nn(e,s),Gt(r,e,s,-1))}return Sh(),r=bc(Error(M(421))),Da(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Nv.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,kt=Xn(s.nextSibling),bt=t,we=!0,Vt=null,e!==null&&(At[Lt++]=xn,At[Lt++]=vn,At[Lt++]=zr,xn=e.id,vn=e.overflow,zr=t),t=xh(t,r.children),t.flags|=4096,t)}function Lf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zu(e.return,t,n)}function jc(e,t,n,r,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=s)}function Hg(e,t,n){var r=t.pendingProps,s=r.revealOrder,a=r.tail;if(Xe(e,t,r.children,n),r=Se.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,n,t);else if(e.tag===19)Lf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(me(Se,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ho(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),jc(t,!1,s,n,a);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ho(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}jc(t,!0,n,null,a);break;case"together":jc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function mo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Cn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Mr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=nr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pv(e,t,n){switch(t.tag){case 3:Ug(t),Es();break;case 5:gg(t);break;case 1:ut(t.type)&&Oo(t);break;case 4:uh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;me(Bo,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(Se,Se.current&1),t.flags|=128,null):n&t.child.childLanes?qg(e,t,n):(me(Se,Se.current&1),e=Cn(e,t,n),e!==null?e.sibling:null);me(Se,Se.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Hg(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),me(Se,Se.current),r)break;return null;case 22:case 23:return t.lanes=0,Dg(e,t,n)}return Cn(e,t,n)}var Wg,qu,Vg,Kg;Wg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};qu=function(){};Vg=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Sr(on.current);var a=null;switch(n){case"input":s=du(e,s),r=du(e,r),a=[];break;case"select":s=Ce({},s,{value:void 0}),r=Ce({},r,{value:void 0}),a=[];break;case"textarea":s=fu(e,s),r=fu(e,r),a=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Fo)}gu(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ri.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=s?.[u],r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ri.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};Kg=function(e,t,n,r){n!==r&&(t.flags|=4)};function ri(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ve(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function fv(e,t,n){var r=t.pendingProps;switch(rh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ve(t),null;case 1:return ut(t.type)&&Mo(),Ve(t),null;case 3:return r=t.stateNode,Ps(),ve(ct),ve(Ze),hh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Oa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vt!==null&&(Yu(Vt),Vt=null))),qu(e,t),Ve(t),null;case 5:dh(t);var s=Sr(Ui.current);if(n=t.type,e!==null&&t.stateNode!=null)Vg(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(M(166));return Ve(t),null}if(e=Sr(on.current),Oa(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[rn]=t,r[Di]=a,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(s=0;s<mi.length;s++)xe(mi[s],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Dp(r,a),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},xe("invalid",r);break;case"textarea":Up(r,a),xe("invalid",r)}gu(n,a),s=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?r.textContent!==l&&(a.suppressHydrationWarning!==!0&&Ma(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Ma(r.textContent,l,e),s=["children",""+l]):Ri.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&xe("scroll",r)}switch(n){case"input":Pa(r),Bp(r,a,!0);break;case"textarea":Pa(r),qp(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Fo)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[rn]=t,e[Di]=r,Wg(e,t,!1,!1),t.stateNode=e;e:{switch(o=yu(n,r),n){case"dialog":xe("cancel",e),xe("close",e),s=r;break;case"iframe":case"object":case"embed":xe("load",e),s=r;break;case"video":case"audio":for(s=0;s<mi.length;s++)xe(mi[s],e);s=r;break;case"source":xe("error",e),s=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),s=r;break;case"details":xe("toggle",e),s=r;break;case"input":Dp(e,r),s=du(e,r),xe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Ce({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Up(e,r),s=fu(e,r),xe("invalid",e);break;default:s=r}gu(n,s),l=s;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?Sm(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&bm(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ai(e,c):typeof c=="number"&&Ai(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Ri.hasOwnProperty(a)?c!=null&&a==="onScroll"&&xe("scroll",e):c!=null&&Ud(e,a,c,o))}switch(n){case"input":Pa(e),Bp(e,r,!1);break;case"textarea":Pa(e),qp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+or(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?ys(e,!!r.multiple,a,!1):r.defaultValue!=null&&ys(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Fo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ve(t),null;case 6:if(e&&t.stateNode!=null)Kg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(M(166));if(n=Sr(Ui.current),Sr(on.current),Oa(t)){if(r=t.stateNode,n=t.memoizedProps,r[rn]=t,(a=r.nodeValue!==n)&&(e=bt,e!==null))switch(e.tag){case 3:Ma(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ma(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[rn]=t,t.stateNode=r}return Ve(t),null;case 13:if(ve(Se),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(we&&kt!==null&&t.mode&1&&!(t.flags&128))dg(),Es(),t.flags|=98560,a=!1;else if(a=Oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(M(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(M(317));a[rn]=t}else Es(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ve(t),a=!1}else Vt!==null&&(Yu(Vt),Vt=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Se.current&1?Oe===0&&(Oe=3):Sh())),t.updateQueue!==null&&(t.flags|=4),Ve(t),null);case 4:return Ps(),qu(e,t),e===null&&Oi(t.stateNode.containerInfo),Ve(t),null;case 10:return oh(t.type._context),Ve(t),null;case 17:return ut(t.type)&&Mo(),Ve(t),null;case 19:if(ve(Se),a=t.memoizedState,a===null)return Ve(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)ri(a,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ho(e),o!==null){for(t.flags|=128,ri(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(Se,Se.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ae()>As&&(t.flags|=128,r=!0,ri(a,!1),t.lanes=4194304)}else{if(!r)if(e=Ho(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ri(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!we)return Ve(t),null}else 2*Ae()-a.renderingStartTime>As&&n!==1073741824&&(t.flags|=128,r=!0,ri(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ae(),t.sibling=null,n=Se.current,me(Se,r?n&1|2:n&1),t):(Ve(t),null);case 22:case 23:return jh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xt&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function mv(e,t){switch(rh(t),t.tag){case 1:return ut(t.type)&&Mo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ps(),ve(ct),ve(Ze),hh(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dh(t),null;case 13:if(ve(Se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Es()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ve(Se),null;case 4:return Ps(),null;case 10:return oh(t.type._context),null;case 22:case 23:return jh(),null;case 24:return null;default:return null}}var Ba=!1,Ke=!1,gv=typeof WeakSet=="function"?WeakSet:Set,W=null;function ms(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ee(e,t,r)}else n.current=null}function Hu(e,t,n){try{n()}catch(r){Ee(e,t,r)}}var _f=!1;function yv(e,t){if(Eu=_o,e=Xm(),th(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(l=o+s),d!==a||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===s&&(l=o),f===a&&++h===r&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tu={focusedElem:e,selectionRange:n},_o=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ht(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(w){Ee(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return m=_f,_f=!1,m}function ji(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&Hu(t,n,a)}s=s.next}while(s!==r)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Wu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Qg(e){var t=e.alternate;t!==null&&(e.alternate=null,Qg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rn],delete t[Di],delete t[Au],delete t[J4],delete t[ev])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gg(e){return e.tag===5||e.tag===3||e.tag===4}function If(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Fo));else if(r!==4&&(e=e.child,e!==null))for(Vu(e,t,n),e=e.sibling;e!==null;)Vu(e,t,n),e=e.sibling}function Ku(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}var Ue=null,Wt=!1;function In(e,t,n){for(n=n.child;n!==null;)Zg(e,t,n),n=n.sibling}function Zg(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(xl,n)}catch{}switch(n.tag){case 5:Ke||ms(n,t);case 6:var r=Ue,s=Wt;Ue=null,In(e,t,n),Ue=r,Wt=s,Ue!==null&&(Wt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Wt?(e=Ue,n=n.stateNode,e.nodeType===8?gc(e.parentNode,n):e.nodeType===1&&gc(e,n),zi(e)):gc(Ue,n.stateNode));break;case 4:r=Ue,s=Wt,Ue=n.stateNode.containerInfo,Wt=!0,In(e,t,n),Ue=r,Wt=s;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Hu(n,t,o),s=s.next}while(s!==r)}In(e,t,n);break;case 1:if(!Ke&&(ms(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ee(n,t,l)}In(e,t,n);break;case 21:In(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,In(e,t,n),Ke=r):In(e,t,n);break;default:In(e,t,n)}}function zf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gv),t.forEach(function(r){var s=Cv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Ue=l.stateNode,Wt=!1;break e;case 3:Ue=l.stateNode.containerInfo,Wt=!0;break e;case 4:Ue=l.stateNode.containerInfo,Wt=!0;break e}l=l.return}if(Ue===null)throw Error(M(160));Zg(a,o,s),Ue=null,Wt=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ee(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Yg(t,e),t=t.sibling}function Yg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),Jt(e),r&4){try{ji(3,e,e.return),Cl(3,e)}catch(g){Ee(e,e.return,g)}try{ji(5,e,e.return)}catch(g){Ee(e,e.return,g)}}break;case 1:qt(t,e),Jt(e),r&512&&n!==null&&ms(n,n.return);break;case 5:if(qt(t,e),Jt(e),r&512&&n!==null&&ms(n,n.return),e.flags&32){var s=e.stateNode;try{Ai(s,"")}catch(g){Ee(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&vm(s,a),yu(l,o);var u=yu(l,a);for(o=0;o<c.length;o+=2){var h=c[o],d=c[o+1];h==="style"?Sm(s,d):h==="dangerouslySetInnerHTML"?bm(s,d):h==="children"?Ai(s,d):Ud(s,h,d,u)}switch(l){case"input":hu(s,a);break;case"textarea":km(s,a);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ys(s,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?ys(s,!!a.multiple,a.defaultValue,!0):ys(s,!!a.multiple,a.multiple?[]:"",!1))}s[Di]=a}catch(g){Ee(e,e.return,g)}}break;case 6:if(qt(t,e),Jt(e),r&4){if(e.stateNode===null)throw Error(M(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(g){Ee(e,e.return,g)}}break;case 3:if(qt(t,e),Jt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{zi(t.containerInfo)}catch(g){Ee(e,e.return,g)}break;case 4:qt(t,e),Jt(e);break;case 13:qt(t,e),Jt(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||(wh=Ae())),r&4&&zf(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(u=Ke)||h,qt(t,e),Ke=u):qt(t,e),Jt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&e.mode&1)for(W=e,h=e.child;h!==null;){for(d=W=h;W!==null;){switch(f=W,p=f.child,f.tag){case 0:case 11:case 14:case 15:ji(4,f,f.return);break;case 1:ms(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Ee(r,n,g)}}break;case 5:ms(f,f.return);break;case 22:if(f.memoizedState!==null){Mf(d);continue}}p!==null?(p.return=f,W=p):Mf(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{s=d.stateNode,u?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=d.stateNode,c=d.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=jm("display",o))}catch(g){Ee(e,e.return,g)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(g){Ee(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:qt(t,e),Jt(e),r&4&&zf(e);break;case 21:break;default:qt(t,e),Jt(e)}}function Jt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Gg(n)){var r=n;break e}n=n.return}throw Error(M(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ai(s,""),r.flags&=-33);var a=If(e);Ku(e,a,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=If(e);Vu(e,l,o);break;default:throw Error(M(161))}}catch(c){Ee(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xv(e,t,n){W=e,Xg(e)}function Xg(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var s=W,a=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ba;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Ke;l=Ba;var u=Ke;if(Ba=o,(Ke=c)&&!u)for(W=s;W!==null;)o=W,c=o.child,o.tag===22&&o.memoizedState!==null?Of(s):c!==null?(c.return=o,W=c):Of(s);for(;a!==null;)W=a,Xg(a),a=a.sibling;W=s,Ba=l,Ke=u}Ff(e)}else s.subtreeFlags&8772&&a!==null?(a.return=s,W=a):Ff(e)}}function Ff(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||Cl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Ht(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&kf(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}kf(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&zi(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Ke||t.flags&512&&Wu(t)}catch(f){Ee(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Mf(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Of(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cl(4,t)}catch(c){Ee(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ee(t,s,c)}}var a=t.return;try{Wu(t)}catch(c){Ee(t,a,c)}break;case 5:var o=t.return;try{Wu(t)}catch(c){Ee(t,o,c)}}}catch(c){Ee(t,t.return,c)}if(t===e){W=null;break}var l=t.sibling;if(l!==null){l.return=t.return,W=l;break}W=t.return}}var vv=Math.ceil,Ko=Pn.ReactCurrentDispatcher,vh=Pn.ReactCurrentOwner,zt=Pn.ReactCurrentBatchConfig,le=0,Be=null,_e=null,qe=0,xt=0,gs=dr(0),Oe=0,Vi=null,Mr=0,El=0,kh=0,Si=null,at=null,wh=0,As=1/0,mn=null,Qo=!1,Qu=null,er=null,Ua=!1,Un=null,Go=0,Ni=0,Gu=null,go=-1,yo=0;function tt(){return le&6?Ae():go!==-1?go:go=Ae()}function tr(e){return e.mode&1?le&2&&qe!==0?qe&-qe:nv.transition!==null?(yo===0&&(yo=Fm()),yo):(e=ue,e!==0||(e=window.event,e=e===void 0?16:qm(e.type)),e):1}function Gt(e,t,n,r){if(50<Ni)throw Ni=0,Gu=null,Error(M(185));la(e,n,r),(!(le&2)||e!==Be)&&(e===Be&&(!(le&2)&&(El|=n),Oe===4&&Dn(e,qe)),dt(e,r),n===1&&le===0&&!(t.mode&1)&&(As=Ae()+500,jl&&hr()))}function dt(e,t){var n=e.callbackNode;n4(e,t);var r=Lo(e,e===Be?qe:0);if(r===0)n!==null&&Vp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vp(n),t===1)e.tag===0?tv($f.bind(null,e)):lg($f.bind(null,e)),Y4(function(){!(le&6)&&hr()}),n=null;else{switch(Mm(r)){case 1:n=Kd;break;case 4:n=Im;break;case 16:n=Ao;break;case 536870912:n=zm;break;default:n=Ao}n=a2(n,Jg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Jg(e,t){if(go=-1,yo=0,le&6)throw Error(M(327));var n=e.callbackNode;if(bs()&&e.callbackNode!==n)return null;var r=Lo(e,e===Be?qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Zo(e,r);else{t=r;var s=le;le|=2;var a=t2();(Be!==e||qe!==t)&&(mn=null,As=Ae()+500,Er(e,t));do try{bv();break}catch(l){e2(e,l)}while(!0);ah(),Ko.current=a,le=s,_e!==null?t=0:(Be=null,qe=0,t=Oe)}if(t!==0){if(t===2&&(s=bu(e),s!==0&&(r=s,t=Zu(e,s))),t===1)throw n=Vi,Er(e,0),Dn(e,r),dt(e,Ae()),n;if(t===6)Dn(e,r);else{if(s=e.current.alternate,!(r&30)&&!kv(s)&&(t=Zo(e,r),t===2&&(a=bu(e),a!==0&&(r=a,t=Zu(e,a))),t===1))throw n=Vi,Er(e,0),Dn(e,r),dt(e,Ae()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(M(345));case 2:kr(e,at,mn);break;case 3:if(Dn(e,r),(r&130023424)===r&&(t=wh+500-Ae(),10<t)){if(Lo(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){tt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ru(kr.bind(null,e,at,mn),t);break}kr(e,at,mn);break;case 4:if(Dn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Qt(r);a=1<<o,o=t[o],o>s&&(s=o),r&=~a}if(r=s,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vv(r/1960))-r,10<r){e.timeoutHandle=Ru(kr.bind(null,e,at,mn),r);break}kr(e,at,mn);break;case 5:kr(e,at,mn);break;default:throw Error(M(329))}}}return dt(e,Ae()),e.callbackNode===n?Jg.bind(null,e):null}function Zu(e,t){var n=Si;return e.current.memoizedState.isDehydrated&&(Er(e,t).flags|=256),e=Zo(e,t),e!==2&&(t=at,at=n,t!==null&&Yu(t)),e}function Yu(e){at===null?at=e:at.push.apply(at,e)}function kv(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],a=s.getSnapshot;s=s.value;try{if(!Xt(a(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dn(e,t){for(t&=~kh,t&=~El,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),r=1<<n;e[n]=-1,t&=~r}}function $f(e){if(le&6)throw Error(M(327));bs();var t=Lo(e,0);if(!(t&1))return dt(e,Ae()),null;var n=Zo(e,t);if(e.tag!==0&&n===2){var r=bu(e);r!==0&&(t=r,n=Zu(e,r))}if(n===1)throw n=Vi,Er(e,0),Dn(e,t),dt(e,Ae()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,kr(e,at,mn),dt(e,Ae()),null}function bh(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(As=Ae()+500,jl&&hr())}}function Or(e){Un!==null&&Un.tag===0&&!(le&6)&&bs();var t=le;le|=1;var n=zt.transition,r=ue;try{if(zt.transition=null,ue=1,e)return e()}finally{ue=r,zt.transition=n,le=t,!(le&6)&&hr()}}function jh(){xt=gs.current,ve(gs)}function Er(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Z4(n)),_e!==null)for(n=_e.return;n!==null;){var r=n;switch(rh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Mo();break;case 3:Ps(),ve(ct),ve(Ze),hh();break;case 5:dh(r);break;case 4:Ps();break;case 13:ve(Se);break;case 19:ve(Se);break;case 10:oh(r.type._context);break;case 22:case 23:jh()}n=n.return}if(Be=e,_e=e=nr(e.current,null),qe=xt=t,Oe=0,Vi=null,kh=El=Mr=0,at=Si=null,jr!==null){for(t=0;t<jr.length;t++)if(n=jr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=s,r.next=o}n.pending=r}jr=null}return e}function e2(e,t){do{var n=_e;try{if(ah(),po.current=Vo,Wo){for(var r=Ne.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Wo=!1}if(Fr=0,De=Fe=Ne=null,bi=!1,qi=0,vh.current=null,n===null||n.return===null){Oe=1,Vi=t,_e=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=qe,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=Cf(o);if(p!==null){p.flags&=-257,Ef(p,o,l,a,t),p.mode&1&&Nf(a,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}else{if(!(t&1)){Nf(a,u,t),Sh();break e}c=Error(M(426))}}else if(we&&l.mode&1){var v=Cf(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Ef(v,o,l,a,t),sh(Rs(c,l));break e}}a=c=Rs(c,l),Oe!==4&&(Oe=2),Si===null?Si=[a]:Si.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=Mg(a,c,t);vf(a,y);break e;case 1:l=c;var x=a.type,k=a.stateNode;if(!(a.flags&128)&&(typeof x.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(er===null||!er.has(k)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=Og(a,l,t);vf(a,w);break e}}a=a.return}while(a!==null)}r2(n)}catch(T){t=T,_e===n&&n!==null&&(_e=n=n.return);continue}break}while(!0)}function t2(){var e=Ko.current;return Ko.current=Vo,e===null?Vo:e}function Sh(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Be===null||!(Mr&268435455)&&!(El&268435455)||Dn(Be,qe)}function Zo(e,t){var n=le;le|=2;var r=t2();(Be!==e||qe!==t)&&(mn=null,Er(e,t));do try{wv();break}catch(s){e2(e,s)}while(!0);if(ah(),le=n,Ko.current=r,_e!==null)throw Error(M(261));return Be=null,qe=0,Oe}function wv(){for(;_e!==null;)n2(_e)}function bv(){for(;_e!==null&&!K3();)n2(_e)}function n2(e){var t=i2(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?r2(e):_e=t,vh.current=null}function r2(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=mv(n,t),n!==null){n.flags&=32767,_e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,_e=null;return}}else if(n=fv(n,t,xt),n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);Oe===0&&(Oe=5)}function kr(e,t,n){var r=ue,s=zt.transition;try{zt.transition=null,ue=1,jv(e,t,n,r)}finally{zt.transition=s,ue=r}return null}function jv(e,t,n,r){do bs();while(Un!==null);if(le&6)throw Error(M(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(r4(e,a),e===Be&&(_e=Be=null,qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ua||(Ua=!0,a2(Ao,function(){return bs(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=zt.transition,zt.transition=null;var o=ue;ue=1;var l=le;le|=4,vh.current=null,yv(e,n),Yg(n,e),q4(Tu),_o=!!Eu,Tu=Eu=null,e.current=n,xv(n),Q3(),le=l,ue=o,zt.transition=a}else e.current=n;if(Ua&&(Ua=!1,Un=e,Go=s),a=e.pendingLanes,a===0&&(er=null),Y3(n.stateNode),dt(e,Ae()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Qo)throw Qo=!1,e=Qu,Qu=null,e;return Go&1&&e.tag!==0&&bs(),a=e.pendingLanes,a&1?e===Gu?Ni++:(Ni=0,Gu=e):Ni=0,hr(),null}function bs(){if(Un!==null){var e=Mm(Go),t=zt.transition,n=ue;try{if(zt.transition=null,ue=16>e?16:e,Un===null)var r=!1;else{if(e=Un,Un=null,Go=0,le&6)throw Error(M(331));var s=le;for(le|=4,W=e.current;W!==null;){var a=W,o=a.child;if(W.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(W=u;W!==null;){var h=W;switch(h.tag){case 0:case 11:case 15:ji(8,h,a)}var d=h.child;if(d!==null)d.return=h,W=d;else for(;W!==null;){h=W;var f=h.sibling,p=h.return;if(Qg(h),h===u){W=null;break}if(f!==null){f.return=p,W=f;break}W=p}}}var m=a.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}W=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,W=o;else e:for(;W!==null;){if(a=W,a.flags&2048)switch(a.tag){case 0:case 11:case 15:ji(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,W=y;break e}W=a.return}}var x=e.current;for(W=x;W!==null;){o=W;var k=o.child;if(o.subtreeFlags&2064&&k!==null)k.return=o,W=k;else e:for(o=x;W!==null;){if(l=W,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cl(9,l)}}catch(T){Ee(l,l.return,T)}if(l===o){W=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,W=w;break e}W=l.return}}if(le=s,hr(),an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(xl,e)}catch{}r=!0}return r}finally{ue=n,zt.transition=t}}return!1}function Df(e,t,n){t=Rs(n,t),t=Mg(e,t,1),e=Jn(e,t,1),t=tt(),e!==null&&(la(e,1,t),dt(e,t))}function Ee(e,t,n){if(e.tag===3)Df(e,e,n);else for(;t!==null;){if(t.tag===3){Df(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(er===null||!er.has(r))){e=Rs(n,e),e=Og(t,e,1),t=Jn(t,e,1),e=tt(),t!==null&&(la(t,1,e),dt(t,e));break}}t=t.return}}function Sv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(qe&n)===n&&(Oe===4||Oe===3&&(qe&130023424)===qe&&500>Ae()-wh?Er(e,0):kh|=n),dt(e,t)}function s2(e,t){t===0&&(e.mode&1?(t=La,La<<=1,!(La&130023424)&&(La=4194304)):t=1);var n=tt();e=Nn(e,t),e!==null&&(la(e,t,n),dt(e,n))}function Nv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),s2(e,n)}function Cv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(M(314))}r!==null&&r.delete(t),s2(e,n)}var i2;i2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ct.current)ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ot=!1,pv(e,t,n);ot=!!(e.flags&131072)}else ot=!1,we&&t.flags&1048576&&cg(t,Do,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;mo(e,t),e=t.pendingProps;var s=Cs(t,Ze.current);ws(t,n),s=fh(null,t,r,e,s,n);var a=mh();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ut(r)?(a=!0,Oo(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ch(t),s.updater=Nl,t.stateNode=s,s._reactInternals=t,Mu(t,r,e,n),t=Du(null,t,r,!0,a,n)):(t.tag=0,we&&a&&nh(t),Xe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(mo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Tv(r),e=Ht(r,e),s){case 0:t=$u(null,t,r,e,n);break e;case 1:t=Rf(null,t,r,e,n);break e;case 11:t=Tf(null,t,r,e,n);break e;case 14:t=Pf(null,t,r,Ht(r.type,e),n);break e}throw Error(M(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ht(r,s),$u(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ht(r,s),Rf(e,t,r,s,n);case 3:e:{if(Ug(t),e===null)throw Error(M(387));r=t.pendingProps,a=t.memoizedState,s=a.element,mg(e,t),qo(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Rs(Error(M(423)),t),t=Af(e,t,r,n,s);break e}else if(r!==s){s=Rs(Error(M(424)),t),t=Af(e,t,r,n,s);break e}else for(kt=Xn(t.stateNode.containerInfo.firstChild),bt=t,we=!0,Vt=null,n=pg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Es(),r===s){t=Cn(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return gg(t),e===null&&Iu(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,o=s.children,Pu(r,s)?o=null:a!==null&&Pu(r,a)&&(t.flags|=32),Bg(e,t),Xe(e,t,o,n),t.child;case 6:return e===null&&Iu(t),null;case 13:return qg(e,t,n);case 4:return uh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ts(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ht(r,s),Tf(e,t,r,s,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,o=s.value,me(Bo,r._currentValue),r._currentValue=o,a!==null)if(Xt(a.value,o)){if(a.children===s.children&&!ct.current){t=Cn(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=wn(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),zu(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(M(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),zu(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}Xe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ws(t,n),s=Ft(s),r=r(s),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,s=Ht(r,t.pendingProps),s=Ht(r.type,s),Pf(e,t,r,s,n);case 15:return $g(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ht(r,s),mo(e,t),t.tag=1,ut(r)?(e=!0,Oo(t)):e=!1,ws(t,n),Fg(t,r,s),Mu(t,r,s,n),Du(null,t,r,!0,e,n);case 19:return Hg(e,t,n);case 22:return Dg(e,t,n)}throw Error(M(156,t.tag))};function a2(e,t){return _m(e,t)}function Ev(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,r){return new Ev(e,t,n,r)}function Nh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Tv(e){if(typeof e=="function")return Nh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hd)return 11;if(e===Wd)return 14}return 2}function nr(e,t){var n=e.alternate;return n===null?(n=It(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xo(e,t,n,r,s,a){var o=2;if(r=e,typeof e=="function")Nh(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case as:return Tr(n.children,s,a,t);case qd:o=8,s|=8;break;case ou:return e=It(12,n,t,s|2),e.elementType=ou,e.lanes=a,e;case lu:return e=It(13,n,t,s),e.elementType=lu,e.lanes=a,e;case cu:return e=It(19,n,t,s),e.elementType=cu,e.lanes=a,e;case gm:return Tl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fm:o=10;break e;case mm:o=9;break e;case Hd:o=11;break e;case Wd:o=14;break e;case Fn:o=16,r=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=It(o,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Tr(e,t,n,r){return e=It(7,e,r,t),e.lanes=n,e}function Tl(e,t,n,r){return e=It(22,e,r,t),e.elementType=gm,e.lanes=n,e.stateNode={isHidden:!1},e}function Sc(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function Nc(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Pv(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ch(e,t,n,r,s,a,o,l,c){return e=new Pv(e,t,n,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=It(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ch(a),e}function Rv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:is,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function o2(e){if(!e)return lr;e=e._reactInternals;e:{if(qr(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ut(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(ut(n))return og(e,n,t)}return t}function l2(e,t,n,r,s,a,o,l,c){return e=Ch(n,r,!0,e,s,a,o,l,c),e.context=o2(null),n=e.current,r=tt(),s=tr(n),a=wn(r,s),a.callback=t??null,Jn(n,a,s),e.current.lanes=s,la(e,s,r),dt(e,r),e}function Pl(e,t,n,r){var s=t.current,a=tt(),o=tr(s);return n=o2(n),t.context===null?t.context=n:t.pendingContext=n,t=wn(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Jn(s,t,o),e!==null&&(Gt(e,s,o,a),ho(e,s,o)),o}function Yo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Eh(e,t){Bf(e,t),(e=e.alternate)&&Bf(e,t)}function Av(){return null}var c2=typeof reportError=="function"?reportError:function(e){console.error(e)};function Th(e){this._internalRoot=e}Rl.prototype.render=Th.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));Pl(e,t,null,null)};Rl.prototype.unmount=Th.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Or(function(){Pl(null,e,null,null)}),t[Sn]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$n.length&&t!==0&&t<$n[n].priority;n++);$n.splice(n,0,e),n===0&&Um(e)}};function Ph(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Al(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uf(){}function Lv(e,t,n,r,s){if(s){if(typeof r=="function"){var a=r;r=function(){var u=Yo(o);a.call(u)}}var o=l2(t,r,e,0,null,!1,!1,"",Uf);return e._reactRootContainer=o,e[Sn]=o.current,Oi(e.nodeType===8?e.parentNode:e),Or(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Yo(c);l.call(u)}}var c=Ch(e,0,!1,null,null,!1,!1,"",Uf);return e._reactRootContainer=c,e[Sn]=c.current,Oi(e.nodeType===8?e.parentNode:e),Or(function(){Pl(t,c,n,r)}),c}function Ll(e,t,n,r,s){var a=n._reactRootContainer;if(a){var o=a;if(typeof s=="function"){var l=s;s=function(){var c=Yo(o);l.call(c)}}Pl(t,o,e,s)}else o=Lv(n,t,e,s,r);return Yo(o)}Om=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fi(t.pendingLanes);n!==0&&(Qd(t,n|1),dt(t,Ae()),!(le&6)&&(As=Ae()+500,hr()))}break;case 13:Or(function(){var r=Nn(e,1);if(r!==null){var s=tt();Gt(r,e,1,s)}}),Eh(e,1)}};Gd=function(e){if(e.tag===13){var t=Nn(e,134217728);if(t!==null){var n=tt();Gt(t,e,134217728,n)}Eh(e,134217728)}};$m=function(e){if(e.tag===13){var t=tr(e),n=Nn(e,t);if(n!==null){var r=tt();Gt(n,e,t,r)}Eh(e,t)}};Dm=function(){return ue};Bm=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};vu=function(e,t,n){switch(t){case"input":if(hu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=bl(r);if(!s)throw Error(M(90));xm(r),hu(r,s)}}}break;case"textarea":km(e,n);break;case"select":t=n.value,t!=null&&ys(e,!!n.multiple,t,!1)}};Em=bh;Tm=Or;var _v={usingClientEntryPoint:!1,Events:[ua,us,bl,Nm,Cm,bh]},si={findFiberByHostInstance:br,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Iv={bundleType:si.bundleType,version:si.version,rendererPackageName:si.rendererPackageName,rendererConfig:si.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Am(e),e===null?null:e.stateNode},findFiberByHostInstance:si.findFiberByHostInstance||Av,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 qa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qa.isDisabled&&qa.supportsFiber)try{xl=qa.inject(Iv),an=qa}catch{}}Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_v;Nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ph(t))throw Error(M(200));return Rv(e,t,null,n)};Nt.createRoot=function(e,t){if(!Ph(e))throw Error(M(299));var n=!1,r="",s=c2;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ch(e,1,!1,null,null,n,!1,r,s),e[Sn]=t.current,Oi(e.nodeType===8?e.parentNode:e),new Th(t)};Nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=Am(t),e=e===null?null:e.stateNode,e};Nt.flushSync=function(e){return Or(e)};Nt.hydrate=function(e,t,n){if(!Al(t))throw Error(M(200));return Ll(null,e,t,!0,n)};Nt.hydrateRoot=function(e,t,n){if(!Ph(e))throw Error(M(405));var r=n!=null&&n.hydratedSources||null,s=!1,a="",o=c2;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=l2(t,null,e,1,n??null,s,!1,a,o),e[Sn]=t.current,Oi(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Rl(t)};Nt.render=function(e,t,n){if(!Al(t))throw Error(M(200));return Ll(null,e,t,!1,n)};Nt.unmountComponentAtNode=function(e){if(!Al(e))throw Error(M(40));return e._reactRootContainer?(Or(function(){Ll(null,null,e,!1,function(){e._reactRootContainer=null,e[Sn]=null})}),!0):!1};Nt.unstable_batchedUpdates=bh;Nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Al(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Ll(e,t,n,!1,r)};Nt.version="18.3.1-next-f1338f8080-20240426";function u2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u2)}catch(e){console.error(e)}}u2(),um.exports=Nt;var d2=um.exports,h2,qf=d2;h2=qf.createRoot,qf.hydrateRoot;var Us=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(){}},zv=class extends Us{#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 zv,Fv={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Mv=class{#e=Fv;#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)}},Nr=new Mv;function Ov(e){setTimeout(e,0)}var $v=typeof window>"u"||"Deno"in globalThis;function Je(){}function Dv(e,t){return typeof e=="function"?e(t):e}function Xu(e){return typeof e=="number"&&e>=0&&e!==1/0}function p2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e=="function"?e(t):e}function vt(e,t){return typeof e=="function"?e(t):e}function Hf(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==Ah(o,t.options))return!1}else if(!Ki(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||a&&!a(t))}function Wf(e,t){const{exact:n,status:r,predicate:s,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if($r(t.options.mutationKey)!==$r(a))return!1}else if(!Ki(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ah(e,t){return(t?.queryKeyHashFn||$r)(e)}function $r(e){return JSON.stringify(e,(t,n)=>Ju(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Ki(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ki(e[n],t[n])):!1}var Bv=Object.prototype.hasOwnProperty;function f2(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Vf(e)&&Vf(t);if(!r&&!(Ju(e)&&Ju(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),l=o.length,c=r?new Array(l):{};let u=0;for(let h=0;h<l;h++){const d=r?h:o[h],f=e[d],p=t[d];if(f===p){c[d]=f,(r?h<a:Bv.call(e,d))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[d]=p;continue}const m=f2(f,p,n+1);c[d]=m,m===f&&u++}return a===l&&u===a?e:c}function Xo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Vf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ju(e){if(!Kf(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Kf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Kf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Uv(e){return new Promise(t=>{Nr.setTimeout(t,e)})}function ed(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?f2(e,t):t}function qv(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Hv(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Lh=Symbol();function m2(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Lh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _h(e,t){return typeof e=="function"?e(...t):!!e}function Wv(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Qi=(()=>{let e=()=>$v;return{isServer(){return e()},setIsServer(t){e=t}}})();function td(){let e,t;const n=new Promise((s,a)=>{e=s,t=a});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var Vv=Ov;function Kv(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=Vv;const a=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Me=Kv(),Qv=class extends Us{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}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(n=>{n(e)}))}isOnline(){return this.#e}},Jo=new Qv;function Gv(e){return Math.min(1e3*2**e,3e4)}function g2(e){return(e??"online")==="online"?Jo.isOnline():!0}var nd=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function y2(e){let t=!1,n=0,r;const s=td(),a=()=>s.status!=="pending",o=g=>{if(!a()){const v=new nd(g);f(v),e.onCancel?.(v)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>Rh.isFocused()&&(e.networkMode==="always"||Jo.isOnline())&&e.canRun(),h=()=>g2(e.networkMode)&&e.canRun(),d=g=>{a()||(r?.(),s.resolve(g))},f=g=>{a()||(r?.(),s.reject(g))},p=()=>new Promise(g=>{r=v=>{(a()||u())&&g(v)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(y){g=Promise.reject(y)}Promise.resolve(g).then(d).catch(y=>{if(a())return;const x=e.retry??(Qi.isServer()?0:3),k=e.retryDelay??Gv,w=typeof k=="function"?k(n,y):k,T=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!T){f(y);return}n++,e.onFail?.(n,y),Uv(w).then(()=>u()?void 0:p()).then(()=>{t?f(y):m()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r?.(),s),cancelRetry:l,continueRetry:c,canStart:h,start:()=>(h()?m():p().then(m),s)}}var x2=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xu(this.gcTime)&&(this.#e=Nr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qi.isServer()?1/0:5*60*1e3))}clearGcTimeout(){this.#e!==void 0&&(Nr.clearTimeout(this.#e),this.#e=void 0)}};function Zv(e){return{onFetch:(t,n)=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const d=m=>{Wv(m,()=>t.signal,()=>h=!0)},f=m2(t.options,t.fetchOptions),p=async(m,g,v)=>{if(h)return Promise.reject(t.signal.reason);if(g==null&&m.pages.length)return Promise.resolve(m);const x=(()=>{const b={client:t.client,queryKey:t.queryKey,pageParam:g,direction:v?"backward":"forward",meta:t.options.meta};return d(b),b})(),k=await f(x),{maxPages:w}=t.options,T=v?Hv:qv;return{pages:T(m.pages,k,w),pageParams:T(m.pageParams,g,w)}};if(s&&a.length){const m=s==="backward",g=m?Yv:Qf,v={pages:a,pageParams:o},y=g(r,v);l=await p(v,y,m)}else{const m=e??a.length;do{const g=c===0?o[0]??r.initialPageParam:Qf(r,l);if(c>0&&g==null)break;l=await p(l,g),c++}while(c<m)}return l};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Qf(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Yv(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Xv=class extends x2{#e;#t;#n;#r;#i;#s;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Zf(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.#s?.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=Zf(this.options);t.data!==void 0&&(this.setState(Gf(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=ed(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(Je).catch(Je):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=>vt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>rr(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:!p2(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#s&&(this.#a||this.#u()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.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.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,r=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},s=()=>{const c=m2(this.options,t),h=(()=>{const d={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#a=!1,this.options.persister?this.options.persister(c,h,this):c(h)},o=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return r(c),c})();(this.#e==="infinite"?Zv(this.options.pages):this.options.behavior)?.onFetch(o,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta}),this.#s=y2({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:c=>{c instanceof nd&&c.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(c,u)=>{this.#l({type:"failed",failureCount:c,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const c=await this.#s.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#r.config.onSuccess?.(c,this),this.#r.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof nd){if(c.silent)return this.#s.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#l({type:"error",error:c}),this.#r.config.onError?.(c,this),this.#r.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...v2(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Gf(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Me.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function v2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:g2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Gf(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Zf(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Jv=class extends Us{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=td(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#s;#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),Yf(this.#t,this.options)?this.#p():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rd(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rd(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,n=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 vt(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&&!Xo(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Xf(this.#t,n,this.options,t)&&this.#p(),this.updateResult(),r&&(this.#t!==n||vt(this.options.enabled,this.#t)!==vt(t.enabled,this.#t)||rr(this.options.staleTime,this.#t)!==rr(t.staleTime,this.#t))&&this.#g();const s=this.#y();r&&(this.#t!==n||vt(this.options.enabled,this.#t)!==vt(t.enabled,this.#t)||s!==this.#c)&&this.#x(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return t5(this,n)&&(this.#r=n,this.#s=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="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(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#p(e){this.#b();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Je)),t}#g(){this.#k();const e=rr(this.options.staleTime,this.#t);if(Qi.isServer()||this.#r.isStale||!Xu(e))return;const n=p2(this.#r.dataUpdatedAt,e)+1;this.#d=Nr.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(e){this.#w(),this.#c=e,!(Qi.isServer()||vt(this.options.enabled,this.#t)===!1||!Xu(this.#c)||this.#c===0)&&(this.#h=Nr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rh.isFocused())&&this.#p()},this.#c))}#v(){this.#g(),this.#x(this.#y())}#k(){this.#d!==void 0&&(Nr.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#h!==void 0&&(Nr.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#t,r=this.options,s=this.#r,a=this.#i,o=this.#s,c=e!==n?e.state:this.#n,{state:u}=e;let h={...u},d=!1,f;if(t._optimisticResults){const S=this.hasListeners(),A=!S&&Yf(e,t),C=S&&Xf(e,n,t,r);(A||C)&&(h={...h,...v2(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:g}=h;f=h.data;let v=!1;if(t.placeholderData!==void 0&&f===void 0&&g==="pending"){let S;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(S=s.data,v=!0):S=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,S!==void 0&&(g="success",f=ed(s?.data,S,t),d=!0)}if(t.select&&f!==void 0&&!v)if(s&&f===a?.data&&t.select===this.#u)f=this.#l;else try{this.#u=t.select,f=t.select(f),f=ed(s?.data,f,t),this.#l=f,this.#a=null}catch(S){this.#a=S}this.#a&&(p=this.#a,f=this.#l,m=Date.now(),g="error");const y=h.fetchStatus==="fetching",x=g==="pending",k=g==="error",w=x&&y,T=f!==void 0,E={status:g,fetchStatus:h.fetchStatus,isPending:x,isSuccess:g==="success",isError:k,isInitialLoading:w,isLoading:w,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:k&&!T,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:k&&T,isStale:Ih(e,t),refetch:this.refetch,promise:this.#o,isEnabled:vt(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const S=E.data!==void 0,A=E.status==="error"&&!S,C=$=>{A?$.reject(E.error):S&&$.resolve(E.data)},R=()=>{const $=this.#o=E.promise=td();C($)},L=this.#o;switch(L.status){case"pending":e.queryHash===n.queryHash&&C(L);break;case"fulfilled":(A||E.data!==L.value)&&R();break;case"rejected":(!A||E.error!==L.reason)&&R();break}}return E}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#f=this.#t),Xo(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#m.size)return!0;const a=new Set(s??this.#m);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(o=>{const l=o;return this.#r[l]!==e[l]&&a.has(l)})};this.#j({listeners:n()})}#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){Me.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function e5(e,t){return vt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&vt(t.retryOnMount,e)===!1)}function Yf(e,t){return e5(e,t)||e.state.data!==void 0&&rd(e,t,t.refetchOnMount)}function rd(e,t,n){if(vt(t.enabled,e)!==!1&&rr(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ih(e,t)}return!1}function Xf(e,t,n,r){return(e!==t||vt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ih(e,n)}function Ih(e,t){return vt(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function t5(e,t){return!Xo(e.getCurrentResult(),t)}var n5=class extends x2{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||k2(),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.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=y2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#i({type:"failed",failureCount:a,error:o})},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 r=this.state.status==="pending",s=!this.#r.canStart();try{if(r)t();else{this.#i({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#i({type:"pending",context:o,variables:e,isPaused:s})}const a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#i({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Me.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function k2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var r5=class extends Us{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new n5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Ha(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Ha(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ha(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Ha(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Me.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(n=>Wf(t,n))}findAll(e={}){return this.getAll().filter(t=>Wf(e,t))}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Me.batch(()=>Promise.all(e.map(t=>t.continue().catch(Je))))}};function Ha(e){return e.options.scope?.id}var s5=class extends Us{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Xo(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&$r(n.mutationKey)!==$r(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.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(t,n){return this.#r=n,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??k2();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}}#s(t){Me.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,s)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(t.data,null,n,r,s)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,s)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(void 0,t.error,n,r,s)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#t)})})}},i5=class extends Us{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,s=t.queryHash??Ah(r,t);let a=this.get(s);return a||(a=new Xv({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}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(){Me.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(n=>Hf(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Hf(e,n)):t}notify(e){Me.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Me.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Me.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},a5=class{#e;#t;#n;#r;#i;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new i5,this.#t=e.mutationCache||new r5,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Rh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Jo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===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),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,o=Dv(t,a);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Me.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Me.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Me.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Je).catch(Je)}invalidateQueries(e,t={}){return Me.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Me.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let a=s.fetch(void 0,n);return n.throwOnError||(a=a.catch(Je)),s.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Je)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Je).catch(Je)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Je).catch(Je)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Jo.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.#r.set($r(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Ki(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set($r(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Ki(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}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===Lh&&(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()}},w2=j.createContext(void 0),qs=e=>{const t=j.useContext(w2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},o5=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),i.jsx(w2.Provider,{value:e,children:t})),b2=j.createContext(!1),l5=()=>j.useContext(b2);b2.Provider;function c5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var u5=j.createContext(c5()),d5=()=>j.useContext(u5),h5=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?_h(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},p5=e=>{j.useEffect(()=>{e.clearReset()},[e])},f5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||_h(n,[e.error,r])),m5=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},g5=(e,t)=>e.isLoading&&e.isFetching&&!t,y5=(e,t)=>e?.suspense&&t.isPending,Jf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function x5(e,t,n){const r=l5(),s=d5(),a=qs(),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",m5(o),h5(o,s,l),p5(s);const c=!a.getQueryCache().get(o.queryHash),[u]=j.useState(()=>new t(a,o)),h=u.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(f=>{const p=d?u.subscribe(Me.batchCalls(f)):Je;return u.updateResult(),p},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(o)},[o,u]),y5(o,h))throw Jf(o,u,s);if(f5({result:h,errorResetBoundary:s,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,h),o.experimental_prefetchInRender&&!Qi.isServer()&&g5(h,r)&&(c?Jf(o,u,s):l?.promise)?.catch(Je).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?h:u.trackResult(h)}function ge(e,t){return x5(e,Jv)}function v5(e,t){const n=qs(),[r]=j.useState(()=>new s5(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const s=j.useSyncExternalStore(j.useCallback(o=>r.subscribe(Me.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((o,l)=>{r.mutate(o,l).catch(Je)},[r]);if(s.error&&_h(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:a,mutateAsync:s.mutate}}var gi=typeof window<"u"?j.useLayoutEffect:j.useEffect;function Cc(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function k5(e,t,n={},r={}){j.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([a])=>{t(a)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function w5(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}const j2=!1;function Gi(e){return e[e.length-1]}function b5(e){return typeof e=="function"}function qn(e,t){return b5(e)?e(t):e}const S2=Object.prototype.hasOwnProperty,e1=Object.prototype.propertyIsEnumerable;function N2(e){for(const t in e)if(S2.call(e,t))return!0;return!1}const j5=()=>Object.create(null),gr=(e,t)=>Hn(e,t,j5);function Hn(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const s=t,a=r1(e)&&r1(s);if(!a&&!(Ls(e)&&Ls(s)))return s;const o=a?e:t1(e);if(!o)return s;const l=a?s:t1(s);if(!l)return s;const c=o.length,u=l.length,h=a?new Array(u):n();let d=0;for(let f=0;f<u;f++){const p=a?f:l[f],m=e[p],g=s[p];if(m===g){h[p]=m,(a?f<c:S2.call(e,p))&&d++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){h[p]=g;continue}const v=Hn(m,g,n,r+1);h[p]=v,v===m&&d++}return c===u&&d===c?e:h}function t1(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!e1.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const s of n){if(!e1.call(e,s))return!1;r.push(s)}return r}function Ls(e){if(!n1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!n1(n)||!n.hasOwnProperty("isPrototypeOf"))}function n1(e){return Object.prototype.toString.call(e)==="[object Object]"}function r1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pr(e,t,n){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 r=0,s=e.length;r<s;r++)if(!Pr(e[r],t[r],n))return!1;return!0}if(Ls(e)&&Ls(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const o in t)if((!r||t[o]!==void 0)&&!Pr(e[o],t[o],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&s++;let a=0;for(const o in t)if((!r||t[o]!==void 0)&&(a++,a>s||!Pr(e[o],t[o],n)))return!1;return s===a}return!1}function _s(e){let t,n;const r=new Promise((s,a)=>{t=s,n=a});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Zi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function S5(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function s1(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return S5(t)}const N5=["http:","https:","mailto:","tel:"];function el(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ii(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 n=0,r="",s;for(;(s=t.exec(e))!==null;)r+=s1(e.slice(n,s.index))+s[0],n=t.lastIndex;r=r+s1(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function C5(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function E5(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function bn(){throw new Error("Invariant failed")}function Yi(e){const t=new Map;let n,r;const s=a=>{a.next&&(a.prev?(a.prev.next=a.next,a.next.prev=a.prev,a.next=void 0,r&&(r.next=a,a.prev=r)):(a.next.prev=void 0,n=a.next,a.next=void 0,r&&(a.prev=r,r.next=a)),r=a)};return{get(a){const o=t.get(a);if(o)return s(o),o.value},set(a,o){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const l=t.get(a);if(l)l.value=o,s(l);else{const c={key:a,value:o,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(a,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const Wn=4,C2=5;function T5(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function E2(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,a=e.substring(t,s);if(!a||!a.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(a==="$"){const l=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=l,n[4]=l,n[5]=l,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const o=T5(a);if(o){const[l,c]=o,u=a.charCodeAt(l+1);if(u===45){if(l+2<a.length&&a.charCodeAt(l+2)===36){const h=l+3,d=c;if(h<d)return n[0]=3,n[1]=t+l,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=s,n}}else if(u===36){const h=l+1,d=l+2;return d===c?(n[0]=2,n[1]=t+l,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+l,n[2]=t+d,n[3]=t+c,n[4]=t+c+1,n[5]=s,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function _l(e,t,n,r,s,a,o){o?.(n);let l=r;{const c=n.fullPath??n.from,u=c.length,h=n.options?.caseSensitive??e,d=n.options?.params?.parse??n.options?.parseParams;for(;l<u;){const p=E2(c,l,t);let m;const g=l,v=p[5];switch(l=v+1,a++,p[0]){case 0:{const y=c.substring(p[2],p[3]);if(h){const x=s.static?.get(y);if(x)m=x;else{s.static??=new Map;const k=Cr(n.fullPath??n.from);k.parent=s,k.depth=a,m=k,s.static.set(y,k)}}else{const x=y.toLowerCase(),k=s.staticInsensitive?.get(x);if(k)m=k;else{s.staticInsensitive??=new Map;const w=Cr(n.fullPath??n.from);w.parent=s,w.depth=a,m=w,s.staticInsensitive.set(x,w)}}break}case 1:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),w=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,b=!d&&s.dynamic?.find(E=>!E.parse&&E.caseSensitive===k&&E.prefix===w&&E.suffix===T);if(b)m=b;else{const E=Tc(1,n.fullPath??n.from,k,w,T);m=E,E.depth=a,E.parent=s,s.dynamic??=[],s.dynamic.push(E)}break}case 3:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),w=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,b=!d&&s.optional?.find(E=>!E.parse&&E.caseSensitive===k&&E.prefix===w&&E.suffix===T);if(b)m=b;else{const E=Tc(3,n.fullPath??n.from,k,w,T);m=E,E.parent=s,E.depth=a,s.optional??=[],s.optional.push(E)}break}case 2:{const y=c.substring(g,p[1]),x=c.substring(p[4],v),k=h&&!!(y||x),w=y?k?y:y.toLowerCase():void 0,T=x?k?x:x.toLowerCase():void 0,b=Tc(2,n.fullPath??n.from,k,w,T);m=b,b.parent=s,b.depth=a,s.wildcard??=[],s.wildcard.push(b)}}s=m}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const p=Cr(n.fullPath??n.from);p.kind=C2,p.parent=s,a++,p.depth=a,s.pathless??=[],s.pathless.push(p),s=p}const f=(n.path||!n.children)&&!n.isRoot;if(f&&c.endsWith("/")){const p=Cr(n.fullPath??n.from);p.kind=Wn,p.parent=s,a++,p.depth=a,s.index=p,s=p}s.parse=d??null,f&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)_l(e,t,c,l,s,a,o)}function Ec(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 On(e){if(e.pathless)for(const t of e.pathless)On(t);if(e.static)for(const t of e.static.values())On(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())On(t);if(e.dynamic?.length){e.dynamic.sort(Ec);for(const t of e.dynamic)On(t)}if(e.optional?.length){e.optional.sort(Ec);for(const t of e.optional)On(t)}if(e.wildcard?.length){e.wildcard.sort(Ec);for(const t of e.wildcard)On(t)}}function Cr(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 Tc(e,t,n,r,s){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:n,prefix:r,suffix:s}}function P5(e,t){const n=Cr("/"),r=new Uint16Array(6);for(const s of e)_l(!1,r,s,1,n,0);On(n),t.masksTree=n,t.flatCache=Yi(1e3)}function R5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=zh(e,t.masksTree);return t.flatCache.set(e,r),r}function A5(e,t,n,r,s){e||="/",r||="/";const a=t?`case\0${e}`:e;let o=s.singleCache.get(a);return o||(o=Cr("/"),_l(t,new Uint16Array(6),{from:e},1,o,0),s.singleCache.set(a,o)),zh(r,o,n)}function L5(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||="/";let a;try{a=zh(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)a=null;else throw o}return a&&(a.branch=P2(a.route)),t.matchCache.set(r,a),a}function _5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I5(e,t=!1,n){const r=Cr(e.fullPath),s=new Uint16Array(6),a={},o={};let l=0;return _l(t,s,e,1,r,0,c=>{if(n?.(c,l),c.id in a&&bn(),a[c.id]=c,l!==0&&c.path){const u=_5(c.fullPath);(!o[u]||c.fullPath.endsWith("/"))&&(o[u]=c)}l++}),On(r),{processedTree:{segmentTree:r,singleCache:Yi(1e3),matchCache:Yi(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function zh(e,t,n=!1){const r=e.split("/"),s=F5(e,r,t,n);if(!s)return null;const[a]=T2(e,r,s);return{route:s.node.route,rawParams:a}}function T2(e,t,n){const r=z5(n.node);let s=null;const a=Object.create(null);let o=n.extract?.part??0,l=n.extract?.node??0,c=n.extract?.path??0,u=n.extract?.segment??0;for(;l<r.length;o++,l++,c++,u++){const h=r[l];if(h.kind===Wn)break;if(h.kind===C2){u--,o--,c--;continue}const d=t[o],f=c;if(d&&(c+=d.length),h.kind===1){s??=n.node.fullPath.split("/");const p=s[u],m=h.prefix?.length??0;if(p.charCodeAt(m)===123){const g=h.suffix?.length??0,v=p.substring(m+2,p.length-g-1),y=d.substring(m,d.length-g);a[v]=decodeURIComponent(y)}else{const g=p.substring(1);a[g]=decodeURIComponent(d)}}else if(h.kind===3){if(n.skipped&1<<l){o--,c=f-1;continue}s??=n.node.fullPath.split("/");const p=s[u],m=h.prefix?.length??0,g=h.suffix?.length??0,v=p.substring(m+3,p.length-g-1),y=h.suffix||h.prefix?d.substring(m,d.length-g):d;y&&(a[v]=decodeURIComponent(y))}else if(h.kind===2){const p=h,m=e.substring(f+(p.prefix?.length??0),e.length-(p.suffix?.length??0)),g=decodeURIComponent(m);a["*"]=g,a._splat=g;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:l,path:c,segment:u}]}function P2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function z5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function F5(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!Gi(t),a=s&&e!=="/",o=t.length-(s?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,u=null;for(;l.length;){const h=l.pop(),{node:d,index:f,skipped:p,depth:m,statics:g,dynamics:v,optionals:y}=h;let{extract:x,rawParams:k}=h;if(d.kind===2&&d.route&&!Va(u,h))continue;if(d.parse){if(!i1(e,t,h))continue;k=h.rawParams,x=h.extract}r&&d.route&&d.kind!==Wn&&Va(c,h)&&(c=h);const w=f===o;if(w&&(d.route&&(!a||d.kind===Wn||d.kind===2)&&Va(u,h)&&(u=h),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const T=w?void 0:t[f];let b;if(w&&d.index){const E={node:d.index,index:f,skipped:p,depth:m+1,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k};let S=!0;if(d.index.parse&&(i1(e,t,E)||(S=!1)),S){if(!v&&!y&&!p&&M5(g,o))return E;Va(u,E)&&(u=E)}}if(d.wildcard)for(let E=d.wildcard.length-1;E>=0;E--){const S=d.wildcard[E],{prefix:A,suffix:C}=S;if(!(A&&(w||!(S.caseSensitive?T:b??=T.toLowerCase()).startsWith(A)))){if(C){if(w)continue;const R=t.slice(f).join("/").slice(-C.length);if((S.caseSensitive?R:R.toLowerCase())!==C)continue}l.push({node:S,index:o,skipped:p,depth:m+1,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}}if(d.optional){const E=p|1<<m,S=m+1;for(let A=d.optional.length-1;A>=0;A--){const C=d.optional[A];l.push({node:C,index:f,skipped:E,depth:S,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}if(!w)for(let A=d.optional.length-1;A>=0;A--){const C=d.optional[A],{prefix:R,suffix:L}=C;if(R||L){const $=C.caseSensitive?T:b??=T.toLowerCase();if(R&&!$.startsWith(R)||L&&!$.endsWith(L))continue}l.push({node:C,index:f+1,skipped:p,depth:S,statics:g,dynamics:v,optionals:y+Wa(o,f),extract:x,rawParams:k})}}if(!w&&d.dynamic&&T)for(let E=d.dynamic.length-1;E>=0;E--){const S=d.dynamic[E],{prefix:A,suffix:C}=S;if(A||C){const R=S.caseSensitive?T:b??=T.toLowerCase();if(A&&!R.startsWith(A)||C&&!R.endsWith(C))continue}l.push({node:S,index:f+1,skipped:p,depth:m+1,statics:g,dynamics:v+Wa(o,f),optionals:y,extract:x,rawParams:k})}if(!w&&d.staticInsensitive){const E=d.staticInsensitive.get(b??=T.toLowerCase());E&&l.push({node:E,index:f+1,skipped:p,depth:m+1,statics:g+Wa(o,f),dynamics:v,optionals:y,extract:x,rawParams:k})}if(!w&&d.static){const E=d.static.get(T);E&&l.push({node:E,index:f+1,skipped:p,depth:m+1,statics:g+Wa(o,f),dynamics:v,optionals:y,extract:x,rawParams:k})}if(d.pathless){const E=m+1;for(let S=d.pathless.length-1;S>=0;S--){const A=d.pathless[S];l.push({node:A,index:f,skipped:p,depth:E,statics:g,dynamics:v,optionals:y,extract:x,rawParams:k})}}}if(u)return u;if(r&&c){let h=c.index;for(let f=0;f<c.index;f++)h+=t[f].length;const d=h===e.length?"/":e.slice(h);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(d),c}return null}function Wa(e,t){return 2**(e-t-1)}function M5(e,t){return e===2**(t-1)-1}function i1(e,t,n){let r,s;try{[r,s]=T2(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=s,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Va(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===Wn)>(e.node.kind===Wn)||t.node.kind===Wn==(e.node.kind===Wn)&&t.depth>e.depth))):!0}function vo(e){return Fh(e.filter(t=>t!==void 0).join("/"))}function Fh(e){return e.replace(/\/{2,}/g,"/")}function R2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function kn(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function A2(e){return kn(R2(e))}function tl(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function O5(e,t,n){return tl(e,n)===tl(t,n)}function $5({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),a=!s&&t===".";let o;if(r){o=s?t:a?e:e+"\0"+t;const u=r.get(o);if(u)return u}let l;if(a)l=e.split("/");else if(s)l=t.split("/");else{for(l=e.split("/");l.length>1&&Gi(l)==="";)l.pop();const u=t.split("/");for(let h=0,d=u.length;h<d;h++){const f=u[h];f===""?h?h===d-1&&l.push(f):l=[f]:f===".."?l.pop():f==="."||l.push(f)}}l.length>1&&(Gi(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));const c=Fh(l.join("/"))||"/";return o&&r&&r.set(o,c),c}function D5(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,a=>t.get(a)??a)}function Pc(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>o1(s,n)).join("/"):o1(r,n)}function a1({path:e,params:t,decoder:n,...r}){let s=!1;const a=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:s};const o=e.length;let l=0,c,u="";for(;l<o;){const h=l;c=E2(e,h,c);const d=c[5];if(l=d+1,h===d)continue;const f=c[0];if(f===0){u+="/"+e.substring(h,d);continue}if(f===2){const p=t._splat;a._splat=p,a["*"]=p;const m=e.substring(h,c[1]),g=e.substring(c[4],d);if(!p){s=!0,(m||g)&&(u+="/"+m+g);continue}const v=Pc("_splat",t,n);u+="/"+m+v+g;continue}if(f===1){const p=e.substring(c[2],c[3]);!s&&!(p in t)&&(s=!0),a[p]=t[p];const m=e.substring(h,c[1]),g=e.substring(c[4],d),v=Pc(p,t,n)??"undefined";u+="/"+m+v+g;continue}if(f===3){const p=e.substring(c[2],c[3]),m=t[p];if(m==null)continue;a[p]=m;const g=e.substring(h,c[1]),v=e.substring(c[4],d),y=Pc(p,t,n)??"";u+="/"+g+y+v;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:a,interpolatedPath:u||"/",isMissingParams:s}}function o1(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Ge(e){return e?.isNotFound===!0}function B5(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const U5="tsr-scroll-restoration-v1_3";function q5(){const e=B5();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ls(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=qn(r,t)||t},persist:()=>{try{e.setItem(U5,JSON.stringify(t))}catch{}}}}const l1=q5(),H5=e=>e.state.__TSR_key||e.href;function W5(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Ka=!1;const ai="window",c1="data-scroll-restoration-id";function V5(e,t){if(!l1)return;const n=l1;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Ka=!1;const r=e.options.getScrollRestorationKey||H5,s=new Map;window.history.scrollRestoration="manual";const a=l=>{if(!(Ka||!e.isScrollRestoring))if(l.target===document||l.target===window)s.set(ai,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=l.target;s.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},o=l=>{if(!e.isScrollRestoring||!l||s.size===0||!n)return;const c=n.state[l]||={};for(const[u,h]of s){let d;if(u===ai)d=ai;else if(u.isConnected){const f=u.getAttribute(c1);d=f?`[${c1}="${f}"]`:W5(u)}d&&(c[d]=h)}};document.addEventListener("scroll",a,!0),e.subscribe("onBeforeLoad",l=>{o(l.fromLocation?r(l.fromLocation):void 0),s.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",l=>{const c=r(l.toLocation),u=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors;if(s.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Ka=!0;try{const d=e.isScrollRestoring?n.state[c]:void 0;let f=!1;if(d)for(const p in d){const m=d[p];if(!Ls(m))continue;const{scrollX:g,scrollY:v}=m;if(!(!Number.isFinite(g)||!Number.isFinite(v))){if(p===ai)window.scrollTo({top:v,left:g,behavior:u}),f=!0;else if(p){let y;try{y=document.querySelector(p)}catch{continue}y&&(y.scrollLeft=g,y.scrollTop=v,f=!0)}}}if(!f){const p=e.history.location.hash.slice(1);if(p){const m=window.history.state?.__hashScrollIntoViewOptions??!0;if(m){const g=document.getElementById(p);g&&g.scrollIntoView(m)}}else{const m={top:0,left:0,behavior:u};if(window.scrollTo(m),h)for(const g of h){if(g===ai)continue;const v=typeof g=="function"?g():document.querySelector(g);v&&v.scrollTo(m)}}}}finally{Ka=!1}e.isScrollRestoring&&n.set(d=>(d[c]||={},d))}})}function K5(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function Rc(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Q5(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,s]of t.entries()){const a=n[r];a==null?n[r]=Rc(s):Array.isArray(a)?a.push(Rc(s)):n[r]=[a,Rc(s)]}return n}const G5=Y5(JSON.parse),Z5=X5(JSON.stringify,JSON.parse);function Y5(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Q5(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function X5(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const a=K5(s,r);return a?`?${a}`:""}}const Rr="__root__";function Il(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 n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function lt(e){return e instanceof Response&&!!e.options}function J5(e){return{input:({url:t})=>{for(const n of e)t=sd(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=L2(e[n],t);return t}}}function e6(e){const t=A2(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:o})=>{const l=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return l===s?o.pathname="/":l.startsWith(a)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=vo(["/",t,o.pathname]),o)}}function sd(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function L2(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function t6(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:s,init:a}=t,o=new Map,l=new Map,c=new Map,u=n(e.status),h=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),g=n(e.statusCode),v=n(e.redirect),y=n([]),x=n([]),k=n([]),w=r(()=>Ac(o,y.get())),T=r(()=>Ac(l,x.get())),b=r(()=>Ac(c,k.get())),E=r(()=>y.get()[0]),S=r(()=>y.get().some(Q=>o.get(Q)?.get().status==="pending")),A=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:u.get()})),C=r(()=>({status:u.get(),loadedAt:h.get(),isLoading:d.get(),isTransitioning:f.get(),matches:w.get(),location:p.get(),resolvedLocation:m.get(),statusCode:g.get(),redirect:v.get()})),R=Yi(64);function L(Q){let _=R.get(Q);return _||(_=r(()=>{const B=y.get();for(const N of B){const V=o.get(N);if(V&&V.routeId===Q)return V.get()}}),R.set(Q,_)),_}const $={status:u,loadedAt:h,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:g,redirect:v,matchesId:y,pendingIds:x,cachedIds:k,matches:w,pendingMatches:T,cachedMatches:b,firstId:E,hasPending:S,matchRouteDeps:A,matchStores:o,pendingMatchStores:l,cachedMatchStores:c,__store:C,getRouteMatchStore:L,setMatches:U,setPending:H,setCached:Z};U(e.matches),a?.($);function U(Q){Lc(Q,o,y,n,s)}function H(Q){Lc(Q,l,x,n,s)}function Z(Q){Lc(Q,c,k,n,s)}return $}function Ac(e,t){const n=[];for(const r of t){const s=e.get(r);s&&n.push(s.get())}return n}function Lc(e,t,n,r,s){const a=e.map(l=>l.id),o=new Set(a);s(()=>{for(const l of t.keys())o.has(l)||t.delete(l);for(const l of e){const c=t.get(l.id);if(!c){const u=r(l);u.routeId=l.routeId,t.set(l.id,u);continue}c.routeId=l.routeId,c.get()!==l&&c.set(l)}E5(n.get(),a)||n.set(a)})}const id=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},n6=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),zl=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Ar=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let a=0;a<=s;a++){const o=e.matches[a];if(!o)continue;const l=e.router.getMatch(o.id);l&&Object.assign(r,l.__routeContext,l.__beforeLoadContext)}return r},u1=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),s=r>=0?r:0;let a=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=s);for(let o=a;o>=0;o--){const l=e.matches[o];if(e.router.looseRoutesById[l.routeId].options.notFoundComponent)return o}return n?a:s},Vn=(e,t,n)=>{if(!(!lt(n)&&!Ge(n)))throw lt(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:lt(n)?"redirected":Ge(n)?"notFound":r.status==="pending"?"success":r.status,context:Ar(e,t.index),isFetching:!1,error:n})),Ge(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),lt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},_2=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},d1=(e,t,n)=>{const r=Ar(e,n);e.updateMatch(t,s=>({...s,context:r}))},oi=(e,t,n,r)=>{const{id:s,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Vn(e,e.router.getMatch(s),n);try{o.options.onError?.(n)}catch(l){n=l,Vn(e,e.router.getMatch(s),n)}e.updateMatch(s,l=>(l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loadPromise?.resolve(),{...l,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!lt(n)&&!Ge(n)&&(e.serialError??=n)},I2=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!zl(e,t)&&(n.options.loader||n.options.beforeLoad||F2(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const a=setTimeout(()=>{id(e)},s);r._nonReactive.pendingTimeout=a}},r6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;I2(e,t,n,r);const s=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&Vn(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},s6=(e,t,n,r)=>{const s=e.router.getMatch(t);let a=s._nonReactive.loadPromise;s._nonReactive.loadPromise=_s(()=>{a?.resolve(),a=void 0});const{paramsError:o,searchError:l}=s;o&&oi(e,n,o,"PARSE_PARAMS"),l&&oi(e,n,l,"VALIDATE_SEARCH"),I2(e,t,r,s);const c=new AbortController;let u=!1;const h=()=>{u||(u=!0,e.updateMatch(t,w=>({...w,isFetching:"beforeLoad",fetchCount:w.fetchCount+1,abortController:c})))},d=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,w=>({...w,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),d()});return}s._nonReactive.beforeLoadPromise=_s();const f={...Ar(e,n,!1),...s.__routeContext},{search:p,params:m,cause:g}=s,v=zl(e,t),y={search:p,abortController:c,params:m,preload:v,context:f,location:e.location,navigate:w=>e.router.navigate({...w,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=w=>{if(w===void 0){e.router.batch(()=>{h(),d()});return}(lt(w)||Ge(w))&&(h(),oi(e,n,w,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,T=>({...T,__beforeLoadContext:w})),d()})};let k;try{if(k=r.options.beforeLoad(y),Zi(k))return h(),k.catch(w=>{oi(e,n,w,"BEFORE_LOAD")}).then(x)}catch(w){h(),oi(e,n,w,"BEFORE_LOAD")}x(k)},i6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],a=()=>l(),o=()=>s6(e,n,t,s),l=()=>{if(_2(e,n))return;const c=r6(e,n,s);return Zi(c)?c.then(o):o()};return a()},a6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([a,o,l])=>({meta:a?.meta,links:a?.links,headScripts:a?.scripts,headers:l,scripts:o,styles:a?.styles}))},z2=(e,t,n,r,s)=>{const a=t[r-1],{params:o,loaderDeps:l,abortController:c,cause:u}=e.router.getMatch(n),h=Ar(e,r),d=zl(e,n);return{params:o,deps:l,preload:!!d,parentMatchPromise:a,abortController:c,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:d?"preload":u,route:s,...e.router.options.additionalContext}},h1=async(e,t,n,r,s)=>{try{const a=e.router.getMatch(n);try{(!(j2??e.router.isServer)||a.ssr===!0)&&Xi(s);const o=s.options.loader,l=typeof o=="function"?o:o?.handler,c=l?.(z2(e,t,n,r,s)),u=!!l&&Zi(c);if((u||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,d=>({...d,isFetching:"loader"})),l){const d=u?await c:c;Vn(e,e.router.getMatch(n),d),d!==void 0&&e.updateMatch(n,f=>({...f,loaderData:d}))}s._lazyPromise&&await s._lazyPromise;const h=a._nonReactive.minPendingPromise;h&&await h,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,d=>({...d,error:void 0,context:Ar(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(o){let l=o;if(l?.name==="AbortError"){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:Ar(e,r)}));return}const c=a._nonReactive.minPendingPromise;c&&await c,Ge(o)&&await s.options.notFoundComponent?.preload?.(),Vn(e,e.router.getMatch(n),o);try{s.options.onError?.(o)}catch(u){l=u,Vn(e,e.router.getMatch(n),u)}!lt(l)&&!Ge(l)&&await Xi(s,["errorComponent"]),e.updateMatch(n,u=>({...u,error:l,context:Ar(e,r),status:"error",isFetching:!1}))}}catch(a){const o=e.router.getMatch(n);o&&(o._nonReactive.loaderPromise=void 0),Vn(e,o,a)}},o6=async(e,t,n)=>{async function r(p,m,g,v,y){const x=Date.now()-m.updatedAt,k=p?y.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:y.options.staleTime??e.router.options.defaultStaleTime??0,w=y.options.shouldReload,T=typeof w=="function"?w(z2(e,t,s,n,y)):w,{status:b,invalid:E}=v,S=x>=k&&(!!e.forceStaleReload||v.cause==="enter"||g!==void 0&&g!==v.id);o=b==="success"&&(E||(T??S)),p&&y.options.preload===!1||(o&&!e.sync&&h?(l=!0,(async()=>{try{await h1(e,t,s,n,y);const A=e.router.getMatch(s);A._nonReactive.loaderPromise?.resolve(),A._nonReactive.loadPromise?.resolve(),A._nonReactive.loaderPromise=void 0,A._nonReactive.loadPromise=void 0}catch(A){lt(A)&&await e.router.navigate(A.options)}})()):b!=="success"||o?await h1(e,t,s,n,y):d1(e,s,n))}const{id:s,routeId:a}=e.matches[n];let o=!1,l=!1;const c=e.router.looseRoutesById[a],u=c.options.loader,h=((typeof u=="function"?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(_2(e,s)){if(!e.router.getMatch(s))return e.matches[n];d1(e,s,n)}else{const p=e.router.getMatch(s),m=e.router.stores.matchesId.get()[n],g=(m&&e.router.stores.matchStores.get(m)||null)?.routeId===a?m:e.router.stores.matches.get().find(y=>y.routeId===a)?.id,v=zl(e,s);if(p._nonReactive.loaderPromise){if(p.status==="success"&&!e.sync&&!p.preload&&h)return p;await p._nonReactive.loaderPromise;const y=e.router.getMatch(s),x=y._nonReactive.error||y.error;x&&Vn(e,y,x),y.status==="pending"&&await r(v,p,g,y,c)}else{const y=v&&!e.router.stores.matchStores.has(s),x=e.router.getMatch(s);x._nonReactive.loaderPromise=_s(),y!==x.preload&&e.updateMatch(s,k=>({...k,preload:y})),await r(v,p,g,x,c)}}const d=e.router.getMatch(s);l||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,l||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const f=l?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(s,p=>({...p,isFetching:f,invalid:!1})),e.router.getMatch(s)):d};async function p1(e){const t=e,n=[];n6(t.router)&&id(t);let r;for(let f=0;f<t.matches.length;f++){try{const p=i6(t,f);Zi(p)&&await p}catch(p){if(lt(p))throw p;if(Ge(p))r=p;else if(!t.preload)throw p;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const s=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?u1(t,r):void 0,o=r&&t.preload?0:a!==void 0?Math.min(a+1,s):s;let l,c;for(let f=0;f<o;f++)n.push(o6(t,n,f));try{await Promise.all(n)}catch{const f=await Promise.allSettled(n);for(const p of f){if(p.status!=="rejected")continue;const m=p.reason;if(lt(m))throw m;Ge(m)?l??=m:c??=m}if(c!==void 0)throw c}const u=l??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const f=u1(t,u);f===void 0&&bn();const p=t.matches[f],m=t.router.looseRoutesById[p.routeId],g=t.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&g&&(m.options.notFoundComponent=g),u.routeId=p.routeId;const v=p.routeId===t.router.routeTree.id;t.updateMatch(p.id,y=>({...y,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),h=f,await Xi(m,["notFoundComponent"])}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,p=>({...p,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Xi(f,["errorComponent"])}for(let f=0;f<=h;f++){const{id:p,routeId:m}=t.matches[f],g=t.router.looseRoutesById[m];try{const v=a6(t,p,g);if(v){const y=await v;t.updateMatch(p,x=>({...x,...y}))}}catch(v){console.error(`Error executing head for route ${m}:`,v)}}const d=id(t);if(Zi(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function f1(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Xi(e,t=ko){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:s,...a}=r.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===ko?(()=>{if(e._componentsPromise===void 0){const r=f1(e,ko);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():f1(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function F2(e){for(const t of ko)if(e.options[t]?.preload)return!0;return!1}const ko=["component","errorComponent","pendingComponent","notFoundComponent"];var sr="__TSR_index",m1="popstate",g1="beforeunload";function l6(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:o}))},s=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},a=async({task:o,navigateOpts:l,...c})=>{if(l?.ignoreBlocker??!1){o();return}const u=e.getBlockers?.()??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const d of u){const f=nl(c.path,c.state);if(await d.blockerFn({currentLocation:t,nextLocation:f,action:c.type})){e.onBlocked?.();return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,l,c)=>{const u=t.state[sr];l=y1(u+1,l),a({task:()=>{e.pushState(o,l),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:l})},replace:(o,l,c)=>{const u=t.state[sr];l=y1(u,l),a({task:()=>{e.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:l})},go:(o,l)=>{a({task:()=>{e.go(o),s({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{a({task:()=>{e.back(o?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{a({task:()=>{e.forward(o?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[sr]!==0,createHref:o=>e.createHref(o),block:o=>{if(!e.setBlockers)return()=>{};const l=e.getBlockers?.()??[];return e.setBlockers([...l,o]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==o))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function y1(e,t){t||(t={});const n=Mh();return{...t,key:n,__TSR_key:n,[sr]:e}}function c6(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const a=()=>s,o=S=>s=S,l=S=>S,c=()=>nl(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state);if(!t.history.state?.__TSR_key&&!t.history.state?.key){const S=Mh();t.history.replaceState({[sr]:0,key:S,__TSR_key:S},"")}let u=c(),h,d=!1,f=!1,p=!1,m=!1;const g=()=>u;let v,y;const x=()=>{v&&(E._ignoreSubscribers=!0,(v.isPush?t.history.pushState:t.history.replaceState)(v.state,"",v.href),E._ignoreSubscribers=!1,v=void 0,y=void 0,h=void 0)},k=(S,A,C)=>{const R=l(A);y||(h=u),u=nl(A,C),v={href:R,state:C,isPush:v?.isPush||S==="push"},y||(y=Promise.resolve().then(()=>x()))},w=S=>{u=c(),E.notify({type:S})},T=async()=>{if(f){f=!1;return}const S=c(),A=S.state[sr]-u.state[sr],C=A===1,R=A===-1,L=!C&&!R||d;d=!1;const $=L?"GO":R?"BACK":"FORWARD",U=L?{type:"GO",index:A}:{type:R?"BACK":"FORWARD"};if(p)p=!1;else{const H=a();if(typeof document<"u"&&H.length){for(const Z of H)if(await Z.blockerFn({currentLocation:u,nextLocation:S,action:$})){f=!0,t.history.go(1),E.notify(U);return}}}u=c(),E.notify(U)},b=S=>{if(m){m=!1;return}let A=!1;const C=a();if(typeof document<"u"&&C.length)for(const R of C){const L=R.enableBeforeUnload??!0;if(L===!0){A=!0;break}if(typeof L=="function"&&L()===!0){A=!0;break}}if(A)return S.preventDefault(),S.returnValue=""},E=l6({getLocation:g,getLength:()=>t.history.length,pushState:(S,A)=>k("push",S,A),replaceState:(S,A)=>k("replace",S,A),back:S=>(S&&(p=!0),m=!0,t.history.back()),forward:S=>{S&&(p=!0),m=!0,t.history.forward()},go:S=>{d=!0,t.history.go(S)},createHref:S=>l(S),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(g1,b,{capture:!0}),t.removeEventListener(m1,T)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(g1,b,{capture:!0}),t.addEventListener(m1,T),t.history.pushState=function(...S){const A=n.apply(t.history,S);return E._ignoreSubscribers||w("PUSH"),A},t.history.replaceState=function(...S){const A=r.apply(t.history,S);return E._ignoreSubscribers||w("REPLACE"),A},E}function u6(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function nl(e,t){const n=u6(e),r=n.indexOf("#"),s=n.indexOf("?"),a=Mh();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:t||{[sr]:0,key:a,__TSR_key:a}}}function Mh(){return(Math.random()+1).toString(36).substring(7)}function js(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var d6=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=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",a=this.basepath===void 0,o=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=D5(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=c6()),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 h;this.resolvePathCache=Yi(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=t6(p6(this.latestLocation),h),V5(this)}let l=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(a||s!==c||o!==u){this.basepath=c;const h=[],d=A2(c);d&&d!=="/"&&h.push(e6({basepath:c})),u&&h.push(u),this.rewrite=h.length===0?void 0:h.length===1?h[0]:J5(h),this.history&&this.updateLatestLocation(),l=!0}l&&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 n=I5(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&P5(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:u,hash:h,href:d,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const y=this.options.parseSearch(u),x=this.options.stringifySearch(y);return{href:c+x+h,publicHref:c+x+h,pathname:ii(c).path,external:!1,searchStr:x,search:gr(r?.search,y),hash:ii(h.slice(1)).path,state:Hn(r?.state,f)}}const p=new URL(d,this.origin),m=sd(this.rewrite,p),g=this.options.parseSearch(m.search),v=this.options.stringifySearch(g);return m.search=v,{href:m.href.replace(m.origin,""),publicHref:d,pathname:ii(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:v,search:gr(r?.search,g),hash:ii(m.hash.slice(1)).path,state:Hn(r?.state,f)}},a=s(n),{__tempLocation:o,__tempKey:l}=a.state;if(o&&(!l||l===this.tempLocationKey)){const c=s(o);return c.state.key=a.state.key,c.state.__TSR_key=a.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:a}}return a},this.resolvePathWithBase=(n,r)=>$5({base:n,to:r.includes("//")?Fh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>f6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(a={})=>{const o=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutesLightweight(o);a.from;const c=a.unsafeRelative==="path"?o.pathname:a.from??l.fullPath,u=a.to?`${a.to}`:void 0,h=l.search,d=Object.assign(Object.create(null),l.params),f=u?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),p=u?this.resolvePathWithBase(f,u):f,m=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?d:Object.assign(d,qn(a.params,d)),g=this.routesByPath[kn(p)];let v;if(g)v=this.getRouteBranch(g);else if(p.includes("$"))v=[];else{const R=this.getMatchedRoutes(p);v=R.matchedRoutes,this.options.notFoundRoute&&(!R.foundRoute||R.foundRoute.path!=="/"&&R.routeParams["**"])&&(v=[...v,this.options.notFoundRoute])}if(v.length&&N2(m))for(const R of v){const L=R.options.params?.stringify??R.options.stringifyParams;if(L)try{Object.assign(m,L(m))}catch{}}const y=n.leaveParams?p:ii(a1({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&this.options.search?.strict){const R={};v.forEach(L=>{if(L.options.validateSearch)try{Object.assign(R,wo(L.options.validateSearch,{...R,...x}))}catch{}}),x=R}x=m6({search:x,dest:a,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=gr(h,x);const k=this.options.stringifySearch(x),w=a.hash===!0?o.hash:a.hash?qn(a.hash,o.hash):void 0,T=w?`#${w}`:"";let b=a.state===!0?o.state:a.state?qn(a.state,o.state):{};b=Hn(o.state,b);const E=`${y}${k}${T}`;let S,A,C=!1;if(this.rewrite){const R=new URL(E,this.origin),L=L2(this.rewrite,R);S=R.href.replace(R.origin,""),L.origin!==this.origin?(A=L.href,C=!0):A=L.pathname+L.search+L.hash}else S=C5(E),A=S;return{publicHref:A,href:S,pathname:y,search:x,searchStr:k,state:b,hash:w??"",external:C,unmaskOnReload:a.unmaskOnReload}},s=(a={},o)=>{const l=r(a);let c=o?r(o):void 0;if(!c){const u=Object.create(null);if(this.options.routeMasks){const h=R5(l.pathname,this.processedTree);if(h){Object.assign(u,h.rawParams);const{from:d,params:f,...p}=h.route,m=f===!1||f===null?Object.create(null):(f??!0)===!0?u:Object.assign(u,qn(f,u));o={from:n.from,...p,params:m},c=r(o)}}}return c&&(l.maskedLocation=c),l};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{const a=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{s.state[h]=this.latestLocation.state[h]});const u=Pr(s.state,this.latestLocation.state);return c.forEach(h=>{delete s.state[h]}),u},o=kn(this.latestLocation.href)===kn(s.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=_s(()=>{l?.resolve(),l=void 0}),o&&a())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...h}=s;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:a,ignoreBlocker:o,href:l,...c}={})=>{if(l){const d=this.history.location.state.__TSR_index,f=nl(l,{__TSR_index:n?d:d+1}),p=new URL(f.pathname,this.origin);c.to=sd(this.rewrite,p).pathname,c.search=this.options.parseSearch(f.search),c.hash=f.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const h=this.commitLocation({...u,viewTransition:a,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:a,...o})=>{let l=!1;if(s)try{new URL(`${s}`),l=!0}catch{}if(l&&!r&&(r=!0),r){if(n!==void 0||!s){const u=this.buildLocation({to:n,...o});s=s??u.publicHref,a=a??u.publicHref}const c=!l&&a?a:s;if(el(c,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const h of u)if(h?.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...o,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(s=>!n.some(a=>a.id===s.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(n),this.stores.setCached(r)})},this.load=async n=>{let r,s,a;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(c=>{this.startTransition(async()=>{try{this.beforeLoad();const u=this.latestLocation,h=js(u,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...h}),this.emit({type:"onBeforeLoad",...h}),await p1({router:this,sync:n?.sync,forceStaleReload:o.href===u.href,matches:this.stores.pendingMatches.get(),location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let d=null,f=null,p=null,m=null;this.batch(()=>{const g=this.stores.pendingMatches.get(),v=g.length,y=this.stores.matches.get();d=v?y.filter(w=>!this.stores.pendingMatchStores.has(w.id)):null;const x=new Set;for(const w of this.stores.pendingMatchStores.values())w.routeId&&x.add(w.routeId);const k=new Set;for(const w of this.stores.matchStores.values())w.routeId&&k.add(w.routeId);f=v?y.filter(w=>!x.has(w.routeId)):null,p=v?g.filter(w=>!k.has(w.routeId)):null,m=v?g.filter(w=>k.has(w.routeId)):y,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...d.filter(w=>w.status!=="error"&&w.status!=="notFound"&&w.status!=="redirected")]),this.clearExpiredCache())});for(const[g,v]of[[f,"onLeave"],[p,"onEnter"],[m,"onStay"]])if(g)for(const y of g)this.looseRoutesById[y.routeId].options[v]?.(y)})})}})}catch(u){lt(u)?(r=u,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ge(u)&&(s=u);const h=r?r.status:s?404:this.stores.matches.get().some(d=>d.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(h),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(c=>c.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const a=this.latestLocation,o=this.stores.resolvedLocation.get(),l=typeof r.types=="function"?r.types(js(a,o)):r.types;if(l===!1){n();return}s={update:n,types:l}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.stores.pendingMatchStores.get(n);if(s){s.set(r);return}const a=this.stores.matchStores.get(n);if(a){a.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const l=r(o.get());l.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(u=>u!==n)):o.set(l)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),a=this.getParsedLocationHref(s);n.options.href=a,n.headers.set("Location",a)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const a=s.pathname+s.search+s.hash;n.options.href=a,n.headers.set("Location",a)}}catch{}if(n.options.href&&!n.options._builtLocation&&el(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(s=>!r(s))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=s=>{const a=this.looseRoutesById[s.routeId];if(!a.options.loader)return!0;const o=(s.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:n-s.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=Xi,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),l=s.filter(c=>!o.has(c.id));if(l.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...l])}try{return s=await p1({router:this,matches:s,location:r,preload:!0,updateMatch:(c,u)=>{a.has(c)?s=s.map(h=>h.id===c?u(h):h):this.updateMatch(c,u)}}),s}catch(c){if(lt(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Ge(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(s);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const o=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=A5(a.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,o.pathname,this.processedTree);return!l||n.params&&!Pr(l.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Pr(o.search,a.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.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??Z5,parseSearch:e.parseSearch??G5,protocolAllowlist:e.protocolAllowlist??N5}),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:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=P2(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 n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:s}=n;let{matchedRoutes:a}=n,o=!1;(r?r.path!=="/"&&s["**"]:kn(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);const l=o?y6(this.options.notFoundMode,a):void 0,c=new Array(a.length),u=new Map;for(const h of this.stores.matchStores.values())h.routeId&&u.set(h.routeId,h.get());for(let h=0;h<a.length;h++){const d=a[h],f=c[h-1];let p,m,g;{const L=f?.search??e.search,$=f?._strictSearch??void 0;try{const U=wo(d.options.validateSearch,{...L})??void 0;p={...L,...U},m={...$,...U},g=void 0}catch(U){let H=U;if(U instanceof rl||(H=new rl(U.message,{cause:U})),t?.throwOnError)throw H;p=L,m={},g=H}}const v=d.options.loaderDeps?.({search:p})??"",y=v?JSON.stringify(v):"",{interpolatedPath:x,usedParams:k}=a1({path:d.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),w=d.id+x+y,T=this.getMatch(w),b=u.get(d.id),E=T?._strictParams??k;let S;if(!T)try{x1(d,E)}catch(L){if(Ge(L)||lt(L)?S=L:S=new h6(L.message,{cause:L}),t?.throwOnError)throw S}Object.assign(s,E);const A=b?"stay":"enter";let C;if(T)C={...T,cause:A,params:b?.params??s,_strictParams:E,search:gr(b?b.search:T.search,p),_strictSearch:m};else{const L=d.options.loader||d.options.beforeLoad||d.lazyFn||F2(d)?"pending":"success";C={id:w,ssr:d.options.ssr,index:h,routeId:d.id,params:b?.params??s,_strictParams:E,pathname:x,updatedAt:Date.now(),search:b?gr(b.search,p):p,_strictSearch:m,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:S,__routeContext:void 0,_nonReactive:{loadPromise:_s()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:A,loaderDeps:b?Hn(b.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},fullPath:d.fullPath}}t?.preload||(C.globalNotFound=l===d.id),C.searchError=g;const R=this.getParentContext(f);C.context={...R,...C.__routeContext,...C.__beforeLoadContext},c[h]=C}for(let h=0;h<c.length;h++){const d=c[h],f=this.looseRoutesById[d.routeId],p=this.getMatch(d.id),m=u.get(d.routeId);if(d.params=m?gr(m.params,s):s,!p){const g=c[h-1],v=this.getParentContext(g);if(f.options.context){const y={deps:d.loaderDeps,params:d.params,context:v??{},location:e,navigate:x=>this.navigate({...x,_fromLocation:e}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:c,routeId:f.id};d.__routeContext=f.options.context(y)??void 0}d.context={...v,...d.__routeContext,...d.__beforeLoadContext}}}return c}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Gi(t),s={...e.search};for(const u of t)try{Object.assign(s,wo(u.options.validateSearch,s))}catch{}const a=Gi(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),l=o&&o.routeId===r.id&&o.pathname===e.pathname;let c;if(l)c=o.params;else{const u=Object.assign(Object.create(null),n);for(const h of t)try{x1(h,u)}catch{}c=u}return{matchedRoutes:t,fullPath:r.fullPath,search:s,params:c}}},rl=class extends Error{},h6=class extends Error{};function p6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function wo(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new rl("Async validation not supported");if(n.issues)throw new rl(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function f6({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),s=kn(e);let a;const o=L5(s,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function m6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return g6(n)(e,t,r??!1)}function g6(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const a=({search:o,next:l})=>{let c=o;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((h,d)=>d(h),o));const u=l(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((h,d)=>d(h),u):u};t.middlewares.push(a)}if(s.options.validateSearch){const a=({search:o,next:l})=>{const c=l(o);if(!t._includeValidateSearch)return c;try{return{...c,...wo(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(a)}}const n=({search:s})=>{const a=t.dest;return a.search?a.search===!0?s:qn(a.search,s):{}};t.middlewares.push(n);const r=(s,a,o)=>{if(s>=o.length)return a;const l=o[s];return l({search:a,next:u=>r(s+1,u,o)})};return function(a,o,l){return t.dest=o,t._includeValidateSearch=l,r(0,a,t.middlewares)}}function y6(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Rr}function x1(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const x6="Error preloading route! ☝️";var M2=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 n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Rr:this.parentRoute||bn();let s=r?Rr:n?.path;s&&s!=="/"&&(s=R2(s));const a=n?.id||s;let o=r?Rr:vo([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);s==="__root__"&&(s="/"),o!=="__root__"&&(o=vo(["/",o]));const l=o==="__root__"?"/":vo([this.parentRoute.fullPath,s]);this._path=s,this._id=o,this._fullPath=l,this._to=kn(l)},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=>Il({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.")}},v6=class extends M2{constructor(e){super(e)}};function k6(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function Oh(e){const t=e.errorComponent??$h;return i.jsx(w6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?j.createElement(t,{error:n,reset:r}):e.children})}var w6=class extends j.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}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 $h({error:e}){const[t,n]=j.useState(!1);return i.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[i.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[i.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),i.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),i.jsx("div",{style:{height:".25rem"}}),t?i.jsx("div",{children:i.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?i.jsx("code",{children:e.message}):null})}):null]})}function b6({children:e,fallback:t=null}){return O2()?i.jsx(Pi.Fragment,{children:e}):i.jsx(Pi.Fragment,{children:t})}function O2(){return Pi.useSyncExternalStore(j6,()=>!0,()=>!1)}function j6(){return()=>{}}var $2=j.createContext(null);function Et(e){return j.useContext($2)}var Fl=j.createContext(void 0),S6=j.createContext(void 0),ke=(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))(ke||{});function N6({update:e,notify:t,unwatched:n}){return{link:r,unlink:s,propagate:a,checkDirty:o,shallowPropagate:l};function r(u,h,d){const f=h.depsTail;if(f!==void 0&&f.dep===u)return;const p=f!==void 0?f.nextDep:h.deps;if(p!==void 0&&p.dep===u){p.version=d,h.depsTail=p;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===h)return;const g=h.depsTail=u.subsTail={version:d,dep:u,sub:h,prevDep:f,nextDep:p,prevSub:m,nextSub:void 0};p!==void 0&&(p.prevDep=g),f!==void 0?f.nextDep=g:h.deps=g,m!==void 0?m.nextSub=g:u.subs=g}function s(u,h=u.sub){const d=u.dep,f=u.prevDep,p=u.nextDep,m=u.nextSub,g=u.prevSub;return p!==void 0?p.prevDep=f:h.depsTail=f,f!==void 0?f.nextDep=p:h.deps=p,m!==void 0?m.prevSub=g:d.subsTail=g,g!==void 0?g.nextSub=m:(d.subs=m)===void 0&&n(d),p}function a(u){let h=u.nextSub,d;e:do{const f=u.sub;let p=f.flags;if(p&60?p&12?p&4?!(p&48)&&c(u,f)?(f.flags=p|40,p&=1):p=0:f.flags=p&-9|32:p=0:f.flags=p|32,p&2&&t(f),p&1){const m=f.subs;if(m!==void 0){const g=(u=m).nextSub;g!==void 0&&(d={value:h,prev:d},h=g);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function o(u,h){let d,f=0,p=!1;e:do{const m=u.dep,g=m.flags;if(h.flags&16)p=!0;else if((g&17)===17){if(e(m)){const v=m.subs;v.nextSub!==void 0&&l(v),p=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,h=m,++f;continue}if(!p){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;f--;){const v=h.subs,y=v.nextSub!==void 0;if(y?(u=d.value,d=d.prev):u=v,p){if(e(h)){y&&l(v),h=u.sub;continue}p=!1}else h.flags&=-33;h=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return p}while(!0)}function l(u){do{const h=u.sub,d=h.flags;(d&48)===32&&(h.flags=d|16,(d&6)===2&&t(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let d=h.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}function C6(e,t,n){const r=typeof e=="object",s=r?e:void 0;return{next:(r?e.next:e)?.bind(s),error:(r?e.error:t)?.bind(s),complete:(r?e.complete:n)?.bind(s)}}const ad=[];let bo=0;const{link:v1,unlink:E6,propagate:T6,checkDirty:D2,shallowPropagate:k1}=N6({update(e){return e._update()},notify(e){ad[od++]=e,e.flags&=~ke.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ke.Mutable|ke.Dirty,sl(e))}});let Qa=0,od=0,nn,ld=0;function B2(e){try{++ld,e()}finally{--ld||U2()}}function sl(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=E6(n,e)}function U2(){if(!(ld>0)){for(;Qa<od;){const e=ad[Qa];ad[Qa++]=void 0,e.notify()}Qa=0,od=0}}function w1(e,t){const n=typeof e=="function",r=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?ke.None:ke.Mutable,get(){return nn!==void 0&&v1(s,nn,bo),s._snapshot},subscribe(a){const o=C6(a),l={current:!1},c=P6(()=>{s.get(),l.current?o.next?.(s._snapshot):l.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(a){const o=nn,l=t?.compare??Object.is;if(n)nn=s,++bo,s.depsTail=void 0;else if(a===void 0)return!1;n&&(s.flags=ke.Mutable|ke.RecursedCheck);try{const c=s._snapshot,u=typeof a=="function"?a(c):a===void 0&&n?r(c):a;return c===void 0||!l(c,u)?(s._snapshot=u,!0):!1}finally{nn=o,n&&(s.flags&=~ke.RecursedCheck),sl(s)}}};return n?(s.flags=ke.Mutable|ke.Dirty,s.get=function(){const a=s.flags;if(a&ke.Dirty||a&ke.Pending&&D2(s.deps,s)){if(s._update()){const o=s.subs;o!==void 0&&k1(o)}}else a&ke.Pending&&(s.flags=a&~ke.Pending);return nn!==void 0&&v1(s,nn,bo),s._snapshot}):s.set=function(a){if(s._update(a)){const o=s.subs;o!==void 0&&(T6(o),k1(o),U2())}},s}function P6(e){const t=()=>{const r=nn;nn=n,++bo,n.depsTail=void 0,n.flags=ke.Watching|ke.RecursedCheck;try{return e()}finally{nn=r,n.flags&=~ke.RecursedCheck,sl(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ke.Watching|ke.RecursedCheck,notify(){const r=this.flags;r&ke.Dirty||r&ke.Pending&&D2(this.deps,this)?t():this.flags=ke.Watching},stop(){this.flags=ke.None,this.depsTail=void 0,sl(this)}};return t(),n}var q2={exports:{}},H2={},W2={exports:{}},V2={};/**
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 Is=j;function R6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var A6=typeof Object.is=="function"?Object.is:R6,L6=Is.useState,_6=Is.useEffect,I6=Is.useLayoutEffect,z6=Is.useDebugValue;function F6(e,t){var n=t(),r=L6({inst:{value:n,getSnapshot:t}}),s=r[0].inst,a=r[1];return I6(function(){s.value=n,s.getSnapshot=t,_c(s)&&a({inst:s})},[e,n,t]),_6(function(){return _c(s)&&a({inst:s}),e(function(){_c(s)&&a({inst:s})})},[e]),z6(n),n}function _c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!A6(e,n)}catch{return!0}}function M6(e,t){return t()}var O6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?M6:F6;V2.useSyncExternalStore=Is.useSyncExternalStore!==void 0?Is.useSyncExternalStore:O6;W2.exports=V2;var $6=W2.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 Ml=j,D6=$6;function B6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var U6=typeof Object.is=="function"?Object.is:B6,q6=D6.useSyncExternalStore,H6=Ml.useRef,W6=Ml.useEffect,V6=Ml.useMemo,K6=Ml.useDebugValue;H2.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var a=H6(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=V6(function(){function c(p){if(!u){if(u=!0,h=p,p=r(p),s!==void 0&&o.hasValue){var m=o.value;if(s(m,p))return d=m}return d=p}if(m=d,U6(h,p))return m;var g=r(p);return s!==void 0&&s(m,g)?(h=p,m):(h=p,d=g)}var u=!1,h,d,f=n===void 0?null:n;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,n,r,s]);var l=q6(e,a[0],a[1]);return W6(function(){o.hasValue=!0,o.value=l},[l]),K6(l),l};q2.exports=H2;var Q6=q2.exports;function G6(e,t){return e===t}function ht(e,t,n=G6){const r=j.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(o);return l},[e]),s=j.useCallback(()=>e?.get(),[e]);return Q6.useSyncExternalStoreWithSelector(r,s,s,t,n)}var Z6={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Hr(e){const t=Et(),n=j.useContext(e.from?S6:Fl),r=e.from??n,s=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=j.useRef(void 0);return ht(s??Z6,o=>{if((e.shouldThrow??!0)&&!o&&bn(),o===void 0)return;const l=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=Hn(a.current,l);return a.current=c,c}return l})}function K2(e){return Hr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Q2(e){const{select:t,...n}=e;return Hr({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Dh(e){return Hr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ha(e){return Hr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Wr(e){const t=Et();return j.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function G2(e){return Hr({...e,select:t=>e.select?e.select(t.context):t.context})}function Y6(e,t){const n=Et(),r=w5(t),{activeProps:s,inactiveProps:a,activeOptions:o,to:l,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:g,children:v,target:y,disabled:x,style:k,className:w,onClick:T,onBlur:b,onFocus:E,onMouseEnter:S,onMouseLeave:A,onTouchStart:C,ignoreBlocker:R,params:L,search:$,hash:U,state:H,mask:Z,reloadDocument:Q,unsafeRelative:_,from:B,_fromLocation:N,...V}=e,Y=O2(),P=j.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),re=ht(n.stores.location,pe=>pe,(pe,I)=>pe.href===I.href),ce=j.useMemo(()=>{const pe={_fromLocation:re,...P};return n.buildLocation(pe)},[n,re,P]),J=ce.maskedLocation?ce.maskedLocation.publicHref:ce.publicHref,ye=ce.maskedLocation?ce.maskedLocation.external:ce.external,Pe=j.useMemo(()=>rk(J,ye,n.history,x),[x,ye,J,n.history]),Re=j.useMemo(()=>{if(Pe?.external)return el(Pe.href,n.protocolAllowlist)?void 0:Pe.href;if(!sk(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),el(l,n.protocolAllowlist)?void 0:l}catch{}},[l,Pe,n.protocolAllowlist]),st=j.useMemo(()=>{if(Re)return!1;if(o?.exact){if(!O5(re.pathname,ce.pathname,n.basepath))return!1}else{const pe=tl(re.pathname,n.basepath),I=tl(ce.pathname,n.basepath);if(!(pe.startsWith(I)&&(pe.length===I.length||pe[I.length]==="/")))return!1}return(o?.includeSearch??!0)&&!Pr(re.search,ce.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?Y&&re.hash===ce.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,re,Re,Y,ce.hash,ce.pathname,ce.search,n.basepath]),Dt=st?qn(s,{})??X6:Ic,hn=st?Ic:qn(a,{})??Ic,Qr=[w,Dt.className,hn.className].filter(Boolean).join(" "),Gr=(k||Dt.style||hn.style)&&{...k,...Dt.style,...hn.style},[Zr,fr]=j.useState(!1),F=j.useRef(!1),je=e.reloadDocument||Re?!1:c??n.options.defaultPreload,Rt=u??n.options.defaultPreloadDelay??0,$e=j.useCallback(()=>{n.preloadRoute({...P,_builtLocation:ce}).catch(pe=>{console.warn(pe),console.warn(x6)})},[n,P,ce]);k5(r,j.useCallback(pe=>{pe?.isIntersecting&&$e()},[$e]),nk,{disabled:!!x||je!=="viewport"}),j.useEffect(()=>{F.current||!x&&je==="render"&&($e(),F.current=!0)},[x,$e,je]);const Bt=pe=>{const I=pe.currentTarget.getAttribute("target"),D=y!==void 0?y:I;if(!x&&!ik(pe)&&!pe.defaultPrevented&&(!D||D==="_self")&&pe.button===0){pe.preventDefault(),d2.flushSync(()=>{fr(!0)});const G=n.subscribe("onResolved",()=>{G(),fr(!1)});n.navigate({...P,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:g,ignoreBlocker:R})}};if(Re)return{...V,ref:r,href:Re,...v&&{children:v},...y&&{target:y},...x&&{disabled:x},...k&&{style:k},...w&&{className:w},...T&&{onClick:T},...b&&{onBlur:b},...E&&{onFocus:E},...S&&{onMouseEnter:S},...A&&{onMouseLeave:A},...C&&{onTouchStart:C}};const Na=pe=>{if(x||je!=="intent")return;if(!Rt){$e();return}const I=pe.currentTarget;if(li.has(I))return;const D=setTimeout(()=>{li.delete(I),$e()},Rt);li.set(I,D)},Jl=pe=>{x||je!=="intent"||$e()},Ca=pe=>{if(x||!je||!Rt)return;const I=pe.currentTarget,D=li.get(I);D&&(clearTimeout(D),li.delete(I))};return{...V,...Dt,...hn,href:Pe?.href,ref:r,onClick:Jr([T,Bt]),onBlur:Jr([b,Ca]),onFocus:Jr([E,Na]),onMouseEnter:Jr([S,Na]),onMouseLeave:Jr([A,Ca]),onTouchStart:Jr([C,Jl]),disabled:!!x,target:y,...Gr&&{style:Gr},...Qr&&{className:Qr},...x&&J6,...st&&ek,...Y&&Zr&&tk}}var Ic={},X6={className:"active"},J6={role:"link","aria-disabled":!0},ek={"data-status":"active","aria-current":"page"},tk={"data-transitioning":"transitioning"},li=new WeakMap,nk={rootMargin:"100px"},Jr=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function rk(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function sk(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Te=j.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,...a}=Y6(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:l,...c}=a;return j.createElement("a",c,o)}return j.createElement(n,a,o)});function ik(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var ak=class extends M2{constructor(e){super(e),this.useMatch=t=>Hr({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>G2({...t,from:this.id}),this.useSearch=t=>ha({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=>Q2({...t,from:this.id}),this.useLoaderData=t=>K2({...t,from:this.id}),this.useNavigate=()=>Wr({from:this.fullPath}),this.Link=Pi.forwardRef((t,n)=>i.jsx(Te,{ref:n,from:this.fullPath,...t}))}};function Ot(e){return new ak(e)}var ok=class extends v6{constructor(e){super(e),this.useMatch=t=>Hr({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>G2({...t,from:this.id}),this.useSearch=t=>ha({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=>Q2({...t,from:this.id}),this.useLoaderData=t=>K2({...t,from:this.id}),this.useNavigate=()=>Wr({from:this.fullPath}),this.Link=Pi.forwardRef((t,n)=>i.jsx(Te,{ref:n,from:this.fullPath,...t}))}};function lk(e){return new ok(e)}function ck(e){const t=Et(),n=`not-found-${ht(t.stores.location,r=>r.pathname)}-${ht(t.stores.status,r=>r)}`;return i.jsx(Oh,{getResetKey:()=>n,onCatch:(r,s)=>{if(Ge(r))e.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(Ge(r))return e.fallback?.(r);throw r},children:e.children})}function uk(){return i.jsx("p",{children:"Not Found"})}function rs(e){return i.jsx(i.Fragment,{children:e.children})}function Z2(e,t,n){return t.options.notFoundComponent?i.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?i.jsx(e.options.defaultNotFoundComponent,{...n}):i.jsx(uk,{})}function dk(e){return null}function hk(){return dk(Et()),null}var Y2=j.memo(function({matchId:t}){const n=Et(),r=n.stores.matchStores.get(t);r||bn();const s=ht(n.stores.loadedAt,o=>o),a=ht(r,o=>o);return i.jsx(pk,{router:n,matchId:t,resetKey:s,matchState:j.useMemo(()=>{const o=a.routeId,l=n.routesById[o].parentRoute?.id;return{routeId:o,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:l}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function pk({router:e,matchId:t,resetKey:n,matchState:r}){const s=e.routesById[r.routeId],a=s.options.pendingComponent??e.options.defaultPendingComponent,o=a?i.jsx(a,{}):null,l=s.options.errorComponent??e.options.defaultErrorComponent,c=s.options.onCatch??e.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??e.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",d=(!s.isRoot||s.options.wrapInSuspense||h)&&(s.options.wrapInSuspense??a??(s.options.errorComponent?.preload||h))?j.Suspense:rs,f=l?Oh:rs,p=u?ck:rs;return i.jsxs(s.isRoot?s.options.shellComponent??rs:rs,{children:[i.jsx(Fl.Provider,{value:t,children:i.jsx(d,{fallback:o,children:i.jsx(f,{getResetKey:()=>n,errorComponent:l||$h,onCatch:(m,g)=>{if(Ge(m))throw m.routeId??=r.routeId,m;c?.(m,g)},children:i.jsx(p,{fallback:m=>{if(m.routeId??=r.routeId,!u||m.routeId&&m.routeId!==r.routeId||!m.routeId&&!s.isRoot)throw m;return j.createElement(u,m)},children:h||r._displayPending?i.jsx(b6,{fallback:o,children:i.jsx(b1,{matchId:t})}):i.jsx(b1,{matchId:t})})})})}),r.parentRouteId===Rr?i.jsxs(i.Fragment,{children:[i.jsx(fk,{resetKey:n}),e.options.scrollRestoration&&j2?i.jsx(hk,{}):null]}):null]})}function fk({resetKey:e}){const t=Et(),n=j.useRef(void 0);return gi(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...js(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var b1=j.memo(function({matchId:t}){const n=Et(),r=(h,d)=>n.getMatch(h.id)?._nonReactive[d]??h._nonReactive[d],s=n.stores.matchStores.get(t);s||bn();const a=ht(s,h=>h),o=a.routeId,l=n.routesById[o],c=j.useMemo(()=>{const h=(n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:o,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return h?JSON.stringify(h):void 0},[o,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),u=j.useMemo(()=>{const h=l.options.component??n.options.defaultComponent;return h?i.jsx(h,{},c):i.jsx(cd,{})},[c,l.options.component,n.options.defaultComponent]);if(a._displayPending)throw r(a,"displayPendingPromise");if(a._forcePending)throw r(a,"minPendingPromise");if(a.status==="pending"){const h=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const d=n.getMatch(a.id);if(d&&!d._nonReactive.minPendingPromise){const f=_s();d._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),d._nonReactive.minPendingPromise=void 0},h)}}throw r(a,"loadPromise")}if(a.status==="notFound")return Ge(a.error)||bn(),Z2(n,l,a.error);if(a.status==="redirected")throw lt(a.error)||bn(),r(a,"loadPromise");if(a.status==="error")throw a.error;return u}),cd=j.memo(function(){const t=Et(),n=j.useContext(Fl);let r,s=!1,a;{const u=n?t.stores.matchStores.get(n):void 0;[r,s]=ht(u,h=>[h?.routeId,h?.globalNotFound??!1]),a=ht(t.stores.matchesId,h=>h[h.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,l=t.options.defaultPendingComponent?i.jsx(t.options.defaultPendingComponent,{}):null;if(s)return o||bn(),Z2(t,o,void 0);if(!a)return null;const c=i.jsx(Y2,{matchId:a});return r===Rr?i.jsx(j.Suspense,{fallback:l,children:c}):c});function mk(){const e=Et(),t=j.useRef({router:e,mounted:!1}),[n,r]=j.useState(!1),s=ht(e.stores.isLoading,d=>d),a=ht(e.stores.hasPending,d=>d),o=Cc(s),l=s||n||a,c=Cc(l),u=s||a,h=Cc(u);return e.startTransition=d=>{r(!0),j.startTransition(()=>{d(),r(!1)})},j.useEffect(()=>{const d=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return kn(e.latestLocation.publicHref)!==kn(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{d()}},[e,e.history]),gi(()=>{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(f){console.error(f)}})()},[e]),gi(()=>{o&&!s&&e.emit({type:"onLoad",...js(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,s]),gi(()=>{h&&!u&&e.emit({type:"onBeforeRouteMount",...js(e.stores.location.get(),e.stores.resolvedLocation.get())})},[u,h,e]),gi(()=>{if(c&&!l){const d=js(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),B2(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),d.hrefChanged&&k6(e)}},[l,c,e]),null}function gk(){const e=Et(),t=e.routesById[Rr].options.pendingComponent??e.options.defaultPendingComponent,n=t?i.jsx(t,{}):null,r=i.jsxs(typeof document<"u"&&e.ssr?rs:j.Suspense,{fallback:n,children:[i.jsx(mk,{}),i.jsx(yk,{})]});return e.options.InnerWrap?i.jsx(e.options.InnerWrap,{children:r}):r}function yk(){const e=Et(),t=ht(e.stores.firstId,s=>s),n=ht(e.stores.loadedAt,s=>s),r=t?i.jsx(Y2,{matchId:t}):null;return i.jsx(Fl.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:i.jsx(Oh,{getResetKey:()=>n,errorComponent:$h,onCatch:void 0,children:r})})}var xk=e=>({createMutableStore:w1,createReadonlyStore:w1,batch:B2}),vk=e=>new kk(e),kk=class extends d6{constructor(e){super(e,xk)}};function wk({router:e,children:t,...n}){N2(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=i.jsx($2.Provider,{value:e,children:t});return e.options.Wrap?i.jsx(e.options.Wrap,{children:r}):r}function bk({router:e,...t}){return i.jsx(wk,{router:e,...t,children:i.jsx(gk,{})})}function jk(e){const t=Et({warn:e?.router===void 0}),n=e?.router||t,r=j.useRef(void 0);return ht(n.stores.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const a=Hn(r.current,e.select(s));return r.current=a,a}return e.select(s)}return s})}const zs="squad.console.token",Ji=(()=>{const e=/^\/p\/([^/]+)/.exec(window.location.pathname);return e?decodeURIComponent(e[1]):null})(),ud=Ji?`/p/${encodeURIComponent(Ji)}`:"";function Ol(e){return!ud||!e.startsWith("/api/")||e.startsWith("/api/v1/app/")?e:ud+e}function Sk(){const e=new URL(window.location.href),t=e.searchParams.get("t");return t?(sessionStorage.setItem(zs,t),e.searchParams.delete("t"),window.history.replaceState({},"",e.toString()),t):sessionStorage.getItem(zs)}class il extends Error{constructor(){super("Session token missing or invalid. Reopen squad console."),this.name="UnauthorizedError"}}async function be(e,t){const n=sessionStorage.getItem(zs);if(!n)throw new il;const r=await fetch(Ol(e),{...t,headers:{"content-type":"application/json",authorization:`Bearer ${n}`}});if(r.status===401)throw new il;if(!r.ok){const s=await Nk(r);throw new Error(`${r.status} ${r.statusText}: ${s}`)}return await r.json()}async function Nk(e){try{return(await e.text()).slice(0,400)}catch{return""}}async function cn(e,t,n={}){const r=sessionStorage.getItem(zs);if(!r)throw new il;const s=await fetch(Ol(e),{method:t,headers:{"content-type":"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(n)});if(s.status===401)throw new il;const a=await s.json().catch(()=>({}));if(!s.ok)throw new Error(a.error??`${s.status} ${s.statusText}`);return a}function wt(e,t){const n=sessionStorage.getItem(zs)??"";return`${Ol(`/api/v1/tickets/${encodeURIComponent(e)}/file`)}?path=${encodeURIComponent(t.replace(/^file:\/\//,""))}&t=${encodeURIComponent(n)}`}function Kn(e){const t=sessionStorage.getItem(zs)??"";return`${Ol(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 Ck=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),X2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).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 Ek={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 Tk=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>j.createElement("svg",{ref:c,...Ek,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:X2("lucide",s),...l},[...o.map(([u,h])=>j.createElement(u,h)),...Array.isArray(a)?a:[a]]));/**
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 q=(e,t)=>{const n=j.forwardRef(({className:r,...s},a)=>j.createElement(Tk,{ref:a,iconNode:t,className:X2(`lucide-${Ck(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
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 Pk=q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
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 al=q("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"}]]);/**
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 Rk=q("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
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 ea=q("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
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 J2=q("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"}]]);/**
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 En=q("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"}]]);/**
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 te=q("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 ey=q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
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 Bh=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 Ak=q("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
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 Lk=q("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"}]]);/**
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 pa=q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
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 _k=q("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"}]]);/**
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 fa=q("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"}]]);/**
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 Ik=q("CornerLeftUp",[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]]);/**
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 Tn=q("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"}]]);/**
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 ir=q("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"}]]);/**
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 ty=q("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"}]]);/**
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 zk=q("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"}]]);/**
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 Fk=q("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"}]]);/**
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 Mk=q("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"}]]);/**
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 ny=q("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"}]]);/**
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 Ok=q("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"}]]);/**
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 $k=q("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"}]]);/**
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 Dk=q("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"}]]);/**
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 Bk=q("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"}]]);/**
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 Uk=q("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"}]]);/**
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 qk=q("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"}]]);/**
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 Hk=q("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"}]]);/**
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 Wk=q("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"}]]);/**
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 Rn=q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 Vk=q("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"}]]);/**
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 Uh=q("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"}]]);/**
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 ma=q("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
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 j1=q("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"}]]);/**
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 Kk=q("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"}]]);/**
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 S1=q("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"}]]);/**
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 Qk=q("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"}]]);/**
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 Gk=q("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
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 $l=q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
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 Zk=q("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"}]]);/**
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 ol=q("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"}]]);/**
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 ry=q("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"}]]);/**
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 sy=q("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"}]]);/**
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 Fs=q("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"}]]);/**
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 dd=q("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"}]]);/**
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 qh=q("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 Yk=q("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"}]]);/**
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 Zt=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 hd=q("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"}]]);/**
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 Xk=q("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/**
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 jo=q("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"}]]);/**
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 N1=q("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"}]]);/**
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 Hs=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 Dl=q("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"}]]);/**
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 Jk=q("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"}]]);/**
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 e8=q("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"}]]);/**
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 zc=q("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"}]]);/**
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 iy=q("SquareCheck",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
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 C1=q("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"}]]);/**
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 ta=q("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
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 Bl=q("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"}]]);/**
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 ll=q("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
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 Hh=q("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"}]]);/**
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 t8=q("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"}]]);/**
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 ay=q("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
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 n8=q("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"}]]);/**
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 oy=q("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"}]]);/**
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 pd=q("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"}]]);/**
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 $t=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ly=j.createContext(null);function cy(e){try{return localStorage.getItem(e)}catch{return null}}function E1(e,t){try{localStorage.setItem(e,t)}catch{}}function uy(){const e=cy("sk.theme");return e==="light"||e==="dark"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function r8({children:e}){const[t,n]=j.useState(uy),[r,s]=j.useState(cy("sk.commands")!=="off"),[a,o]=j.useState([]);j.useEffect(()=>{document.documentElement.dataset.theme=t,E1("sk.theme",t)},[t]);const l=j.useCallback((u,h="ok")=>{const d=Date.now()+Math.random();o(f=>[...f,{id:d,text:u,kind:h}]),setTimeout(()=>o(f=>f.filter(p=>p.id!==d)),h==="err"?5e3:3200)},[]),c=j.useMemo(()=>({theme:t,toggleTheme:()=>n(u=>u==="light"?"dark":"light"),showCommands:r,toggleCommands:()=>s(u=>(E1("sk.commands",u?"off":"on"),!u)),toast:l}),[t,r,l]);return i.jsxs(ly.Provider,{value:c,children:[e,i.jsx("div",{className:"toasts",role:"status","aria-live":"polite",children:a.map(u=>i.jsxs("div",{className:`toast ${u.kind==="err"?"err":""}`,children:[u.kind==="err"?i.jsx($t,{size:16}):i.jsx(te,{size:16}),u.text]},u.id))})]})}function ze(){const e=j.useContext(ly);if(!e)throw new Error("usePrefs outside PrefsProvider");return e}const dy=900;function Tt(){return ge({queryKey:["board"],queryFn:()=>be("/api/v1/board"),refetchInterval:dy})}function ga(e){return ge({queryKey:["ticket",e],queryFn:()=>be(`/api/v1/tickets/${e}`),enabled:!!e,refetchInterval:dy})}function s8(){return ge({queryKey:["releases"],queryFn:()=>be("/api/v1/releases"),refetchInterval:2e3})}function i8(){return ge({queryKey:["apps"],queryFn:()=>be("/api/v1/apps"),refetchInterval:5e3})}function hy(){return ge({queryKey:["app","settings"],queryFn:()=>be("/api/v1/app/settings"),refetchInterval:5e3})}function a8(){return ge({queryKey:["architecture"],queryFn:()=>be("/api/v1/architecture"),refetchInterval:2e3})}function X(){const e=qs(),{toast:t}=ze();return v5({mutationFn:({path:n,body:r,method:s="POST"})=>cn(n,s,r),onSuccess:(n,r)=>{e.invalidateQueries(),r.done&&t(r.done)},onError:n=>t(n instanceof Error?n.message:String(n),"err")})}function py(){const{toast:e}=ze(),[t,n]=j.useState(!1);return{restarting:t,restart:async()=>{n(!0);const s=await fetch("/healthz").then(o=>o.json()).catch(()=>({startedAt:void 0}));try{await cn("/api/v1/restart","POST")}catch(o){n(!1),e(o instanceof Error?o.message:String(o),"err");return}const a=Date.now()+9e4;for(;Date.now()<a;){await new Promise(l=>setTimeout(l,1e3));const o=await fetch("/healthz").then(l=>l.json()).catch(()=>null);if(o?.startedAt&&o.startedAt!==s.startedAt){window.location.reload();return}}n(!1),e("The board did not come back. Run squad console in your terminal.","err")}}}function o8(){const{restarting:e,restart:t}=py();return i.jsxs("div",{className:"updatebar",role:"status",children:[i.jsx(hd,{size:15}),i.jsxs("span",{children:[i.jsx("b",{children:"squad-kit was updated."})," Restart the board to use the new version. Running work picks up where it stopped."]}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"btn sm pri",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart now"})]})}const Lr={analyst:"Analyst",architect:"Architect",spec:"Spec writer",builder:"Builder",tester:"Tester",reviewer:"Reviewer",release:"Release",triage:"Triage",you:"You",squad:"Squad"},l8={analyst:Hs,architect:t8,spec:sy,builder:pa,tester:iy,reviewer:ty,release:ea,triage:En,you:n8,squad:oy};function Ws({role:e,small:t,size:n}){const r=l8[e];return i.jsx("span",{className:`glyph ${t?"sm":""} ${e==="you"?"you":""}`,title:Lr[e],children:i.jsx(r,{size:n??(t?12:14),strokeWidth:2})})}function ne({text:e}){const{showCommands:t,toast:n}=ze();if(!t)return null;const r=()=>{navigator.clipboard?.writeText(e).then(()=>n("Command copied"),()=>n("Could not copy. Select the text instead.","err"))};return i.jsxs("span",{className:"term",title:"The same action in the terminal",children:[i.jsx("b",{children:">_"}),i.jsx("span",{children:e}),i.jsx("button",{onClick:r,"aria-label":`Copy ${e}`,children:i.jsx(fa,{size:13})})]})}const Fc=[{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 c8({ticket:e}){const t=e.stage==="bugs"?"tickets":e.stage,n=t==="done"?Fc.length:Fc.findIndex(s=>s.stage===t),r=e.waiting?"you":"work";return i.jsx("div",{className:"track","aria-label":"Where this ticket is",children:Fc.map((s,a)=>{const o=a<n?"done":a===n?`cur ${r}`:"";return i.jsxs("div",{className:`ts ${o}`,children:[i.jsx("span",{className:"nd",children:a<n?i.jsx(te,{size:12,strokeWidth:3}):null}),s.name,a===n&&i.jsx("span",{className:"tag",children:r==="you"?"Your turn":e.stage==="release"?"Ready":"Working"})]},s.stage)})})}function pt({title:e,onClose:t,children:n,footer:r,icon:s,wide:a}){return j.useEffect(()=>{const o=l=>l.key==="Escape"&&t();return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t]),i.jsx("div",{className:"modal-veil",onMouseDown:o=>o.target===o.currentTarget&&t(),children:i.jsxs("div",{className:`modal ${a?"wide":""}`,role:"dialog","aria-modal":"true","aria-label":e,children:[i.jsxs("header",{children:[s,i.jsx("h3",{children:e}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:i.jsx($t,{size:16})})]}),i.jsx("div",{className:"mb",children:n}),r&&i.jsx("footer",{children:r})]})})}function Ms(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function Vr(e){return e?new Date(e).toLocaleDateString([],{day:"numeric",month:"short"}):""}function An(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`:Vr(e)}function T1({text:e}){const t=e.split(/(\*\*[^*]+\*\*)/g);return i.jsx(i.Fragment,{children:t.map((n,r)=>n.startsWith("**")?i.jsx("strong",{children:n.slice(2,-2)},r):i.jsx("span",{children:n},r))})}function u8({notes:e}){return i.jsx("div",{className:"notes",children:e.split(`
427
+ `).map((t,n)=>t.startsWith("### ")?i.jsx("h4",{children:t.slice(4)},n):t.startsWith("- ")?i.jsxs("p",{children:["• ",i.jsx(T1,{text:t.slice(2)})]},n):t.trim()?i.jsx("p",{children:i.jsx(T1,{text:t})},n):null)})}function Wh(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(n=>n.adr).join(" and ")} came after this plan and change it`}function cl(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 ar={tickets:"Tickets",specs:"Specs",implement:"Implement",test:"Test",review:"Review",release:"Release",bugs:"Bugs",done:"Released"};function ya(e){const t=e.changes?.at(-1);return t&&t.status!=="done"&&t.status!=="declined"?t:void 0}function sn(e){const t=ya(e)?.status;return t==="proposed"||t==="failed"||t==="design-ready"}function Dr(e){return e.stage==="release"||e.stage==="done"}function Kh(e){return Dr(e)||!!e.specApproved||["implement","test","review"].includes(e.stage)}function d8(e){return e.part==="story"?"The story":e.index===void 0?"New done when":`Done when ${e.index+1}`}function fd(e){return e.length>1?`${e.slice(0,-1).join(", ")} and ${e.at(-1)}`:String(e[0]??"")}function P1({parts:e}){return i.jsx("div",{className:"changeparts",children:e.map((t,n)=>i.jsxs("div",{className:"chrow",children:[i.jsx("div",{className:"chlabel",children:d8(t)}),i.jsx("div",{className:t.before?"chold":"chold empty",children:t.before||i.jsx("i",{children:"new"})}),i.jsx("div",{className:"chnew",children:t.after||i.jsx("i",{children:"removed"})})]},n))})}const R1={same:"Stays",changed:"Redone",new:"New"};function h8({c:e}){const t=e.design,n=t.before.filter(s=>!t.steps.some(a=>a.title===s)),r=t.steps.flatMap((s,a)=>s.change==="same"?[a+1]:[]);return i.jsxs("div",{className:"changeparts",children:[r.length>0&&i.jsxs("div",{className:"chrow",children:[i.jsxs("div",{className:"chlabel",children:[r.length===1?"Step":"Steps"," ",fd(r)]}),i.jsx("div",{children:i.jsx("span",{className:"pill wait",children:R1.same})}),i.jsx("div",{className:"chnew note",children:"Built already, as they are."})]}),t.steps.map((s,a)=>s.change==="same"?null:i.jsxs("div",{className:"chrow",children:[i.jsxs("div",{className:"chlabel",children:["Step ",a+1]}),i.jsx("div",{children:i.jsx("span",{className:"pill you",children:R1[s.change]})}),i.jsx("div",{className:"chnew",children:s.title})]},a)),n.map(s=>i.jsxs("div",{className:"chrow",children:[i.jsx("div",{className:"chlabel",children:"Dropped"}),i.jsx("div",{}),i.jsx("div",{className:"chold",children:s})]},s))]})}function p8(e,t){const n=!!e.sessions?.build;return t.size==="big"?n?"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.":n?"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 f8({t:e}){const t=X(),[n,r]=j.useState(!1),[s,a]=j.useState(""),o=ya(e);if(!o)return null;const l=o.status==="writing"||o.status==="designing"||o.status==="building",c=(e.steps??[]).flatMap((d,f)=>d.status==="done"?[]:[f+1]),u={writing:`Change ${o.id}: the Analyst is writing it into the spec`,failed:`Change ${o.id}: the Analyst could not write it`,proposed:`Change ${o.id} to the spec`,approved:`Change ${o.id} is approved`,designing:`Change ${o.id}: the Architect is updating the design`,"design-ready":`The design update for change ${o.id}`,building:o.size==="big"?`Change ${o.id}: the Builder is redoing ${c.length===1?"step":"steps"} ${fd(c)}`:`Change ${o.id}: the Builder is making it`,done:"",declined:""}[o.status],h=(d,f,p)=>t.mutate({path:`/api/v1/tickets/${e.id}/spec-change/${d}`,body:p,done:f},{onSuccess:()=>r(!1)});return i.jsx("div",{className:"outdated","aria-label":"Change to the spec",children:i.jsxs("div",{className:"outdated-item changecard",children:[i.jsxs("div",{className:"outdated-head",children:[i.jsx("span",{className:"ic",children:l?i.jsx(Rn,{size:15,className:"spin"}):o.status==="failed"?i.jsx(Hh,{size:15}):i.jsx(Fs,{size:15})}),i.jsx("b",{children:u}),o.size&&i.jsx("span",{className:`pill ${o.size==="big"?"you":"wait"}`,children:o.size==="big"?"Big change":"Small change"})]}),i.jsxs("div",{className:"changebody",children:[o.summary?i.jsx("p",{children:o.summary}):i.jsxs("p",{children:["“",o.ask,"”"]}),o.status==="writing"&&i.jsx("p",{className:"note",children:"The work goes on meanwhile. Nothing changes until you approve it."}),o.status==="failed"&&i.jsx("p",{className:"note",children:o.error}),o.why&&(o.status==="proposed"||o.status==="approved")&&i.jsx("p",{className:"note",children:o.why}),o.status==="proposed"&&o.parts&&i.jsx(P1,{parts:o.parts}),o.status==="proposed"&&i.jsx("p",{className:"note",children:p8(e,o)}),o.status==="approved"&&i.jsx("p",{className:"note",children:o.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."}),o.status==="designing"&&i.jsx("p",{className:"note",children:"The Builder paused after its step. The design update comes to you next."}),o.status==="design-ready"&&o.design&&i.jsxs(i.Fragment,{children:[o.design.summary&&i.jsx("p",{children:o.design.summary}),i.jsx(h8,{c:o}),o.parts&&i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"note",children:"And the spec, as you approved it:"}),i.jsx(P1,{parts:o.parts})]}),i.jsxs("p",{className:"note",children:["Approve, and the Builder redoes only ",(()=>{const d=o.design.steps.flatMap((f,p)=>f.change==="same"?[]:[p+1]);return d.length?`${d.length===1?"step":"steps"} ${fd(d)}`:"what changed"})(),". Decline, and the spec stays as it was; the Builder carries on."]})]})]}),n?i.jsxs("div",{className:"row",children:[i.jsx("input",{className:"input",autoFocus:!0,value:s,onChange:d=>a(d.target.value),placeholder:"Why not? (optional, it stays in the spec's record)"}),i.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>h("decline","Declined. Nothing changes.",{reason:s}),children:"Decline"}),i.jsx("button",{className:"btn sm quiet",onClick:()=>r(!1),children:"Cancel"})]}):o.status==="proposed"||o.status==="design-ready"?i.jsxs("div",{className:"row",children:[i.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>h("approve",o.status==="design-ready"?"Approved. The Builder redoes what changed.":o.size==="big"?"Approved. The Architect updates the design next.":"Approved. The spec says it now."),children:[i.jsx(te,{size:14,strokeWidth:2.5})," ",o.status==="design-ready"?"Approve the new design":"Approve"]}),i.jsx("button",{className:"btn sm",onClick:()=>r(!0),children:o.status==="design-ready"?"Decline the change":"Decline"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:o.status==="design-ready"?`squad approve ${e.id}`:`squad propose ${e.id} --approve`})]}):o.status==="failed"?i.jsxs("div",{className:"row",children:[i.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>h("retry","The Analyst writes it again."),children:"Try again"}),i.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>h("decline","Dropped the change."),children:"Drop it"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad propose ${e.id} --retry`})]}):null]})})}function Qh({t:e,initial:t="",from:n,onClose:r}){const s=X(),[a,o]=j.useState(t),l=Dr(e),c=ya(e),u=!!a.trim()&&!s.isPending,h=`"${a.trim().replace(/"/g,'\\"')||"…"}"`,d=f=>s.mutate({path:`/api/v1/tickets/${e.id}/spec-change/new-ticket`,body:{text:a,as:f},done:f==="bug"?`Reported a bug, linked to ${e.id}.`:`Made a new ticket, linked to ${e.id}.`},{onSuccess:r});return i.jsxs(pt,{title:l?"Ask for a change":"Propose a change",icon:i.jsx(Fs,{size:16}),onClose:r,footer:i.jsxs(i.Fragment,{children:[l?i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:!u,onClick:()=>d("ticket"),children:[i.jsx(Zt,{size:15})," Make a new linked ticket"]}),i.jsxs("button",{className:"btn",disabled:!u,onClick:()=>d("bug"),children:[i.jsx(En,{size:15})," Report a bug"]})]}):i.jsxs("button",{className:"btn pri",disabled:!u||!!c,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/spec-change`,body:{text:a,...n?{from:n}:{}},done:"Proposed. The Analyst writes it into the spec; the work goes on."},{onSuccess:r}),children:[i.jsx(Fs,{size:15})," Propose"]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:l?`squad propose ${e.id} --as ticket ${h}`:`squad propose ${e.id} ${h}`})]}),children:[i.jsx("p",{className:"note",style:{marginBottom:10},children:l?`${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.`:c?`Change ${c.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."}),i.jsx("textarea",{className:"input",rows:4,style:{width:"100%"},autoFocus:!0,value:a,onChange:f=>o(f.target.value),placeholder:"For example: allow 5 bookings a day, not 3"})]})}function m8({t:e}){const[t,n]=j.useState(!1);return Kh(e)?i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn sm",onClick:()=>n(!0),title:Dr(e)?"Becomes a new linked ticket or a bug report":"The Analyst writes it into the spec; you approve it",children:[i.jsx(Fs,{size:13})," ",Dr(e)?"Ask for a change":"Propose a change"]}),t&&i.jsx(Qh,{t:e,onClose:()=>n(!1)})]}):null}const g8={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 y8({t:e}){const t=[...e.changes??[]].reverse();return t.length?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"lbl",children:["Changes to the spec · ",t.length]}),i.jsx("ul",{className:"ticketnotes",children:t.map(n=>i.jsxs("li",{children:[i.jsx("span",{className:`pill ${n.status==="done"?"ok":n.status==="declined"?"wait":"you"}`,children:g8[n.status]}),i.jsxs("span",{className:"grow",children:[n.id,": ",n.summary??n.ask,n.size?` (${n.size})`:"",n.decided?.reason?`. Why not: ${n.decided.reason}`:""]}),i.jsx("span",{className:"note",children:n.by})]},n.id))})]}):null}const fy="sk.chatdock",md=new Set;function x8(){try{const e=JSON.parse(localStorage.getItem(fy)??"{}");return{tab:e.tab??null,min:!!e.min,width:my(e.width??600),seen:e.seen??{}}}catch{return{tab:null,min:!1,width:600,seen:{}}}}let _r=typeof window>"u"?{tab:null,min:!1,width:600,seen:{}}:x8();function my(e){return Math.max(440,Math.min(900,Math.round(e)))}function es(e){_r={..._r,...e};try{localStorage.setItem(fy,JSON.stringify(_r))}catch{}for(const t of md)t()}const Kt={get:()=>_r,show:e=>es({tab:e,min:!1}),pick:e=>es({tab:e}),minimize:()=>es({min:!0}),restore:()=>es({min:!1}),resize:e=>es({width:my(e)}),seen:(e,t)=>{_r.seen[e]!==t&&es({seen:{..._r.seen,[e]:t}})}};function Gh(e){return j.useSyncExternalStore(t=>{const n=window.matchMedia?.(e);return n?.addEventListener("change",t),()=>n?.removeEventListener("change",t)},()=>!!window.matchMedia?.(e).matches)}const Zh="(max-width: 760px)";function Ul(){return j.useSyncExternalStore(e=>(md.add(e),()=>md.delete(e)),()=>_r)}const gd="؀-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-\uFEFF",v8=new RegExp(`[${gd}]`,"g"),k8=/[A-Za-z]/g;function un(e){const t=String(e??"").replace(/```[\s\S]*?(```|$)/g," ").replace(/`[^`]*`/g," ").replace(/(https?:\/\/|file:\/\/)\S+/g," "),n=t.match(v8)?.length??0,r=t.match(k8)?.length??0,s=n+r;if(!s)return{lang:"none",dir:"ltr",share:0};const a=n/s;return{lang:a>=.85?"ar":a<=.15?"en":"mixed",dir:a>=.5?"rtl":"ltr",share:a}}function Ln(e){return e.dir==="rtl"?"t-ar":e.lang==="mixed"?"t-mx":"t-en"}function w8(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 gy="[0-9\\u0660-\\u0669][0-9\\u0660-\\u0669.,:%/+\\-]*",b8=`(?:${gy}[  ]+)*[A-Za-z][A-Za-z0-9._\\-/+#@:]*(?:[  ]+[A-Za-z0-9][A-Za-z0-9._\\-/+#@:]*)*`,j8=`[${gd}]+(?:[  ]+(?:${gy}[  ]+)*[${gd}]+)*`,S8=new RegExp(`(${b8})|(${j8})`,"g");function N8(e,t){const n=[];let r=0;const s=(a,o)=>{if(!a)return;const l=n.at(-1);l&&!l.dir&&!o?l.text+=a:n.push(o?{text:a,dir:o}:{text:a})};for(const a of e.matchAll(S8)){const o=a.index??0;s(e.slice(r,o));const l=!!a[1];s(a[0],l&&t==="rtl"?"ltr":!l&&t==="ltr"?"rtl":void 0),r=o+a[0].length}return s(e.slice(r)),n}function C8(e){const t=e.filter(n=>n==="rtl").length;return e.length&&t*2>=e.length?"rtl":"ltr"}function E8(e,t){if(t<=0)return"";let n=0;for(const r of e.matchAll(/\S+/g))if(n+=1,n===t)return e.slice(0,(r.index??0)+r[0].length);return e}function T8(e){return e.match(/\S+/g)?.length??0}const yy=new Set(["p","li","h1","h2","h3","h4","h5","h6","td","th","dt","dd","figcaption"]),Yh=new Set(["code","pre","svg","math"]);function xy(e,t=!1){return e.type==="text"?e.value??"":e.tagName&&Yh.has(e.tagName)||t&&e.tagName&&(e.tagName==="ul"||e.tagName==="ol")?" ":(e.children??[]).map(n=>xy(n,!0)).join("")}function P8(e,t){const n=e.properties??={},r=Array.isArray(n.className)?n.className:typeof n.className=="string"?[n.className]:[];n.className=[...r,t]}function Xh(e,t,n){return{type:"element",tagName:e,properties:t,children:n}}function vy(e,t,n){if(!e.children||e.tagName&&Yh.has(e.tagName))return;const r=[];for(const s of e.children){if(s.type!=="text"){s.type==="element"&&!(s.tagName&&yy.has(s.tagName))&&vy(s,t,n),r.push(s);continue}for(const a of N8(s.value??"",t)){const o=n?R8(a.text):[{type:"text",value:a.text}];a.dir?r.push(Xh("bdi",{dir:a.dir},o)):r.push(...o)}}e.children=r}function R8(e){return e.split(/(\s+)/).filter(Boolean).map(t=>/^\s+$/.test(t)?{type:"text",value:t}:Xh("span",{className:["fx"]},[{type:"text",value:t}]))}function A8(e,t={}){let n=null;const r=s=>{if(s.type==="element"&&s.tagName&&Yh.has(s.tagName)){s.tagName==="code"&&((s.properties??={}).dir="ltr"),s.tagName==="pre"&&(n=s);return}if(s.type==="element"&&s.tagName&&yy.has(s.tagName)){const a=un(xy(s));if(a.lang!=="none"){const o=s.properties??={};o.dir=a.dir,o.lang=a.dir==="rtl"?"ar":"en",P8(s,Ln(a))}vy(s,a.dir,!!t.stream),n=s}for(const a of s.children??[])r(a);if(s.type==="element"&&(s.tagName==="ul"||s.tagName==="ol"||s.tagName==="table")){const a=[],o=l=>{for(const c of l.children??[]){if(c.type!=="element")continue;const u=c.tagName==="li"||c.tagName==="td"||c.tagName==="th";u&&c.properties?.dir&&a.push(c.properties.dir),(!u||s.tagName==="table")&&o(c)}};o(s),a.length&&((s.properties??={}).dir=C8(a))}};return r(e),t.caret&&n&&n.tagName!=="pre"&&(n.children??=[]).push(Xh("span",{className:["caret"],ariaHidden:"true"},[])),e}function L8(e={}){return t=>{A8(t,e)}}function _8(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const I8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,F8={};function A1(e,t){return(F8.jsx?z8:I8).test(e)}const M8=/[ \t\n\f\r]/g;function O8(e){return typeof e=="object"?e.type==="text"?L1(e.value):!1:L1(e)}function L1(e){return e.replace(M8,"")===""}class xa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xa.prototype.normal={};xa.prototype.property={};xa.prototype.space=void 0;function ky(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new xa(n,r,t)}function yd(e){return e.toLowerCase()}class ft{constructor(t,n){this.attribute=n,this.property=t}}ft.prototype.attribute="";ft.prototype.booleanish=!1;ft.prototype.boolean=!1;ft.prototype.commaOrSpaceSeparated=!1;ft.prototype.commaSeparated=!1;ft.prototype.defined=!1;ft.prototype.mustUseProperty=!1;ft.prototype.number=!1;ft.prototype.overloadedBoolean=!1;ft.prototype.property="";ft.prototype.spaceSeparated=!1;ft.prototype.space=void 0;let $8=0;const ee=Kr(),Le=Kr(),xd=Kr(),O=Kr(),fe=Kr(),Ss=Kr(),yt=Kr();function Kr(){return 2**++$8}const vd=Object.freeze(Object.defineProperty({__proto__:null,boolean:ee,booleanish:Le,commaOrSpaceSeparated:yt,commaSeparated:Ss,number:O,overloadedBoolean:xd,spaceSeparated:fe},Symbol.toStringTag,{value:"Module"})),Mc=Object.keys(vd);class Jh extends ft{constructor(t,n,r,s){let a=-1;if(super(t,n),_1(this,"space",s),typeof r=="number")for(;++a<Mc.length;){const o=Mc[a];_1(this,Mc[a],(r&vd[o])===vd[o])}}}Jh.prototype.defined=!0;function _1(e,t,n){n&&(e[t]=n)}function Vs(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Jh(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[yd(r)]=r,n[yd(a.attribute)]=r}return new xa(t,n,e.space)}const wy=Vs({properties:{ariaActiveDescendant:null,ariaAtomic:Le,ariaAutoComplete:null,ariaBusy:Le,ariaChecked:Le,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:fe,ariaCurrent:null,ariaDescribedBy:fe,ariaDetails:null,ariaDisabled:Le,ariaDropEffect:fe,ariaErrorMessage:null,ariaExpanded:Le,ariaFlowTo:fe,ariaGrabbed:Le,ariaHasPopup:null,ariaHidden:Le,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fe,ariaLevel:O,ariaLive:null,ariaModal:Le,ariaMultiLine:Le,ariaMultiSelectable:Le,ariaOrientation:null,ariaOwns:fe,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Le,ariaReadOnly:Le,ariaRelevant:null,ariaRequired:Le,ariaRoleDescription:fe,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Le,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function by(e,t){return t in e?e[t]:t}function jy(e,t){return by(e,t.toLowerCase())}const D8=Vs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ss,acceptCharset:fe,accessKey:fe,action:null,allow:null,allowFullScreen:ee,allowPaymentRequest:ee,allowUserMedia:ee,alt:null,as:null,async:ee,autoCapitalize:null,autoComplete:fe,autoFocus:ee,autoPlay:ee,blocking:fe,capture:null,charSet:null,checked:ee,cite:null,className:fe,cols:O,colSpan:null,content:null,contentEditable:Le,controls:ee,controlsList:fe,coords:O|Ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ee,defer:ee,dir:null,dirName:null,disabled:ee,download:xd,draggable:Le,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ee,formTarget:null,headers:fe,height:O,hidden:xd,high:O,href:null,hrefLang:null,htmlFor:fe,httpEquiv:fe,id:null,imageSizes:null,imageSrcSet:null,inert:ee,inputMode:null,integrity:null,is:null,isMap:ee,itemId:null,itemProp:fe,itemRef:fe,itemScope:ee,itemType:fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ee,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:ee,muted:ee,name:null,nonce:null,noModule:ee,noValidate:ee,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:ee,optimum:O,pattern:null,ping:fe,placeholder:null,playsInline:ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ee,referrerPolicy:null,rel:fe,required:ee,reversed:ee,rows:O,rowSpan:O,sandbox:fe,scope:null,scoped:ee,seamless:ee,selected:ee,shadowRootClonable:ee,shadowRootDelegatesFocus:ee,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Le,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:ee,useMap:null,value:Le,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fe,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ee,declare:ee,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:ee,noHref:ee,noShade:ee,noWrap:ee,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Le,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ee,disableRemotePlayback:ee,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:jy}),B8=Vs({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:yt,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:fe,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:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,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:Ss,g2:Ss,glyphName:Ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:yt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,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:O,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:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yt,rev:yt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yt,requiredFeatures:yt,requiredFonts:yt,requiredFormats:yt,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:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:yt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yt,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:by}),Sy=Vs({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()}}),Ny=Vs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jy}),Cy=Vs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),U8={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"},q8=/[A-Z]/g,I1=/-[a-z]/g,H8=/^data[-\w.:]+$/i;function W8(e,t){const n=yd(t);let r=t,s=ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&H8.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(I1,K8);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!I1.test(a)){let o=a.replace(q8,V8);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=Jh}return new s(r,t)}function V8(e){return"-"+e.toLowerCase()}function K8(e){return e.charAt(1).toUpperCase()}const Q8=ky([wy,D8,Sy,Ny,Cy],"html"),ep=ky([wy,B8,Sy,Ny,Cy],"svg");function G8(e){return e.join(" ").trim()}var tp={},z1=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Z8=/\n/g,Y8=/^\s*/,X8=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,J8=/^:\s*/,e7=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t7=/^[;\s]*/,n7=/^\s+|\s+$/g,r7=`
428
+ `,F1="/",M1="*",wr="",s7="comment",i7="declaration";function a7(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function s(m){var g=m.match(Z8);g&&(n+=g.length);var v=m.lastIndexOf(r7);r=~v?m.length-v:r+m.length}function a(){var m={line:n,column:r};return function(g){return g.position=new o(m),u(),g}}function o(m){this.start=m,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function l(m){var g=new Error(t.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function c(m){var g=m.exec(e);if(g){var v=g[0];return s(v),e=e.slice(v.length),g}}function u(){c(Y8)}function h(m){var g;for(m=m||[];g=d();)g!==!1&&m.push(g);return m}function d(){var m=a();if(!(F1!=e.charAt(0)||M1!=e.charAt(1))){for(var g=2;wr!=e.charAt(g)&&(M1!=e.charAt(g)||F1!=e.charAt(g+1));)++g;if(g+=2,wr===e.charAt(g-1))return l("End of comment missing");var v=e.slice(2,g-2);return r+=2,s(v),e=e.slice(g),r+=2,m({type:s7,comment:v})}}function f(){var m=a(),g=c(X8);if(g){if(d(),!c(J8))return l("property missing ':'");var v=c(e7),y=m({type:i7,property:O1(g[0].replace(z1,wr)),value:v?O1(v[0].replace(z1,wr)):wr});return c(t7),y}}function p(){var m=[];h(m);for(var g;g=f();)g!==!1&&(m.push(g),h(m));return m}return u(),p()}function O1(e){return e?e.replace(n7,wr):wr}var o7=a7,l7=Eo&&Eo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tp,"__esModule",{value:!0});tp.default=u7;const c7=l7(o7);function u7(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,c7.default)(e),s=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:l}=a;s?t(o,l,a):l&&(n=n||{},n[o]=l)}),n}var ql={};Object.defineProperty(ql,"__esModule",{value:!0});ql.camelCase=void 0;var d7=/^--[a-zA-Z0-9_-]+$/,h7=/-([a-z])/g,p7=/^[^-]+$/,f7=/^-(webkit|moz|ms|o|khtml)-/,m7=/^-(ms)-/,g7=function(e){return!e||p7.test(e)||d7.test(e)},y7=function(e,t){return t.toUpperCase()},$1=function(e,t){return"".concat(t,"-")},x7=function(e,t){return t===void 0&&(t={}),g7(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(m7,$1):e=e.replace(f7,$1),e.replace(h7,y7))};ql.camelCase=x7;var v7=Eo&&Eo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},k7=v7(tp),w7=ql;function kd(e,t){var n={};return!e||typeof e!="string"||(0,k7.default)(e,function(r,s){r&&s&&(n[(0,w7.camelCase)(r,t)]=s)}),n}kd.default=kd;var b7=kd;const j7=zd(b7),Ey=Ty("end"),np=Ty("start");function Ty(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function S7(e){const t=np(e),n=Ey(e);if(t&&n)return{start:t,end:n}}function Ci(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?D1(e.position):"start"in e||"end"in e?D1(e):"line"in e||"column"in e?wd(e):""}function wd(e){return B1(e&&e.line)+":"+B1(e&&e.column)}function D1(e){return wd(e&&e.start)+"-"+wd(e&&e.end)}function B1(e){return e&&typeof e=="number"?e:1}class Ye extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(o=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Ci(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ye.prototype.file="";Ye.prototype.name="";Ye.prototype.reason="";Ye.prototype.message="";Ye.prototype.stack="";Ye.prototype.column=void 0;Ye.prototype.line=void 0;Ye.prototype.ancestors=void 0;Ye.prototype.cause=void 0;Ye.prototype.fatal=void 0;Ye.prototype.place=void 0;Ye.prototype.ruleId=void 0;Ye.prototype.source=void 0;const rp={}.hasOwnProperty,N7=new Map,C7=/[A-Z]/g,E7=new Set(["table","tbody","thead","tfoot","tr"]),T7=new Set(["td","th"]),Py="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function P7(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=M7(n,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");r=F7(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ep:Q8,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ry(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function Ry(e,t,n){if(t.type==="element")return R7(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return A7(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return _7(e,t,n);if(t.type==="mdxjsEsm")return L7(e,t);if(t.type==="root")return I7(e,t,n);if(t.type==="text")return z7(e,t)}function R7(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ep,e.schema=s),e.ancestors.push(t);const a=Ly(e,t.tagName,!1),o=O7(e,t);let l=ip(e,t);return E7.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!O8(c):!0})),Ay(e,o,a,t),sp(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function A7(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}na(e,t.position)}function L7(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);na(e,t.position)}function _7(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=ep,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:Ly(e,t.name,!0),o=$7(e,t),l=ip(e,t);return Ay(e,o,a,t),sp(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function I7(e,t,n){const r={};return sp(r,ip(e,t)),e.create(t,e.Fragment,r,n)}function z7(e,t){return t.value}function Ay(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function F7(e,t,n){return r;function r(s,a,o,l){const u=Array.isArray(o.children)?n:t;return l?u(a,o,l):u(a,o)}}function M7(e,t){return n;function n(r,s,a,o){const l=Array.isArray(a.children),c=np(r);return t(s,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function O7(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&rp.call(t.properties,s)){const a=D7(e,s,t.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&T7.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function $7(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else na(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else na(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function ip(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:N7;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const u=s.get(c)||0;o=c+"-"+u,s.set(c,u+1)}}const l=Ry(e,a,o);l!==void 0&&n.push(l)}return n}function D7(e,t,n){const r=W8(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_8(n):G8(n)),r.property==="style"){let s=typeof n=="object"?n:B7(e,String(n));return e.stylePropertyNameCase==="css"&&(s=U7(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?U8[r.property]||r.property:r.attribute,n]}}function B7(e,t){try{return j7(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Ye("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Py+"#cannot-parse-style-attribute",s}}function Ly(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,o;for(;++a<s.length;){const l=A1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=A1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return rp.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);na(e)}function na(e,t){const n=new Ye("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Py+"#cannot-handle-mdx-estrees-without-createevaluater",n}function U7(e){const t={};let n;for(n in e)rp.call(e,n)&&(t[q7(n)]=e[n]);return t}function q7(e){let t=e.replace(C7,H7);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function H7(e){return"-"+e.toLowerCase()}const Oc={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"]},W7={};function ap(e,t){const n=W7,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return _y(e,r,s)}function _y(e,t,n){if(V7(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return U1(e.children,t,n)}return Array.isArray(e)?U1(e,t,n):""}function U1(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=_y(e[s],t,n);return r.join("")}function V7(e){return!!(e&&typeof e=="object")}const q1=document.createElement("i");function op(e){const t="&"+e+";";q1.innerHTML=t;const n=q1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function jt(e,t,n,r){const s=e.length;let a=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function _t(e,t){return e.length>0?(jt(e,e.length,0,t),e):t}const H1={}.hasOwnProperty;function Iy(e){const t={};let n=-1;for(;++n<e.length;)K7(t,e[n]);return t}function K7(e,t){let n;for(n in t){const s=(H1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){H1.call(s,o)||(s[o]=[]);const l=a[o];Q7(s[o],Array.isArray(l)?l:l?[l]:[])}}}function Q7(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);jt(e,0,0,r)}function zy(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const et=pr(/[A-Za-z]/),Qe=pr(/[\dA-Za-z]/),G7=pr(/[#-'*+\--9=?A-Z^-~]/);function ul(e){return e!==null&&(e<32||e===127)}const bd=pr(/\d/),Z7=pr(/[\dA-Fa-f]/),Y7=pr(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function he(e){return e!==null&&(e<0||e===32)}function se(e){return e===-2||e===-1||e===32}const Hl=pr(/\p{P}|\p{S}/u),Br=pr(/\s/);function pr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ks(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&Qe(e.charCodeAt(n+1))&&Qe(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function oe(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return se(c)?(e.enter(n),l(c)):t(c)}function l(c){return se(c)&&a++<s?(e.consume(c),l):(e.exit(n),t(c))}}const X7={tokenize:J7};function J7(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),oe(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return K(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const ew={tokenize:tw},W1={tokenize:nw};function tw(e){const t=this,n=[];let r=0,s,a,o;return l;function l(k){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,c,u)(k)}return u(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&x();const w=t.events.length;let T=w,b;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){b=t.events[T][1].end;break}y(r);let E=w;for(;E<t.events.length;)t.events[E][1].end={...b},E++;return jt(t.events,T+1,0,t.events.slice(w)),t.events.length=E,u(k)}return l(k)}function u(k){if(r===n.length){if(!s)return f(k);if(s.currentConstruct&&s.currentConstruct.concrete)return m(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(W1,h,d)(k)}function h(k){return s&&x(),y(r),f(k)}function d(k){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(k)}function f(k){return t.containerState={},e.attempt(W1,p,m)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),f(k)}function m(k){if(k===null){s&&x(),y(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),g(k)}function g(k){if(k===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(k);return}return K(k)?(e.consume(k),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(k),g)}function v(k,w){const T=t.sliceStream(k);if(w&&T.push(null),k.previous=a,a&&(a.next=k),a=k,s.defineSkip(k.start),s.write(T),t.parser.lazy[k.start.line]){let b=s.events.length;for(;b--;)if(s.events[b][1].start.offset<o&&(!s.events[b][1].end||s.events[b][1].end.offset>o))return;const E=t.events.length;let S=E,A,C;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(A){C=t.events[S][1].end;break}A=!0}for(y(r),b=E;b<t.events.length;)t.events[b][1].end={...C},b++;jt(t.events,S+1,0,t.events.slice(E)),t.events.length=b}}function y(k){let w=n.length;for(;w-- >k;){const T=n[w];t.containerState=T[1],T[0].exit.call(t,e)}n.length=k}function x(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function nw(e,t,n){return oe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Os(e){if(e===null||he(e)||Br(e))return 1;if(Hl(e))return 2}function Wl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const jd={name:"attention",resolveAll:rw,tokenize:sw};function rw(e,t){let n=-1,r,s,a,o,l,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};V1(d,-c),V1(f,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=_t(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=_t(u,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=_t(u,Wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=_t(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=_t(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,jt(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sw(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Os(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const u=e.exit("attentionSequence"),h=Os(c),d=!h||h===2&&s||n.includes(c),f=!s||s===2&&h||n.includes(r);return u._open=!!(a===42?d:d&&(s||!f)),u._close=!!(a===42?f:f&&(h||!d)),t(c)}}function V1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const iw={name:"autolink",tokenize:aw};function aw(e,t,n){let r=0;return s;function s(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return et(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||Qe(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||Qe(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||ul(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),h):G7(p)?(e.consume(p),u):n(p)}function h(p){return Qe(p)?d(p):n(p)}function d(p){return p===46?(e.consume(p),r=0,h):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Qe(p))&&r++<63){const m=p===45?f:d;return e.consume(p),m}return n(p)}}const va={partial:!0,tokenize:ow};function ow(e,t,n){return r;function r(a){return se(a)?oe(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||K(a)?t(a):n(a)}}const Fy={continuation:{tokenize:cw},exit:uw,name:"blockQuote",tokenize:lw};function lw(e,t,n){const r=this;return s;function s(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return se(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function cw(e,t,n){const r=this;return s;function s(o){return se(o)?oe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Fy,t,n)(o)}}function uw(e){e.exit("blockQuote")}const My={name:"characterEscape",tokenize:dw};function dw(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Y7(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Oy={name:"characterReference",tokenize:hw};function hw(e,t,n){const r=this;let s=0,a,o;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,o=Qe,h(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Z7,h):(e.enter("characterReferenceValue"),a=7,o=bd,h(d))}function h(d){if(d===59&&s){const f=e.exit("characterReferenceValue");return o===Qe&&!op(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&s++<a?(e.consume(d),h):n(d)}}const K1={partial:!0,tokenize:fw},Q1={concrete:!0,name:"codeFenced",tokenize:pw};function pw(e,t,n){const r=this,s={partial:!0,tokenize:T};let a=0,o=0,l;return c;function c(b){return u(b)}function u(b){const E=r.events[r.events.length-1];return a=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(b)}function h(b){return b===l?(o++,e.consume(b),h):o<3?n(b):(e.exit("codeFencedFenceSequence"),se(b)?oe(e,d,"whitespace")(b):d(b))}function d(b){return b===null||K(b)?(e.exit("codeFencedFence"),r.interrupt?t(b):e.check(K1,g,w)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===null||K(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):se(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,p,"whitespace")(b)):b===96&&b===l?n(b):(e.consume(b),f)}function p(b){return b===null||K(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||K(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===l?n(b):(e.consume(b),m)}function g(b){return e.attempt(s,w,v)(b)}function v(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y}function y(b){return a>0&&se(b)?oe(e,x,"linePrefix",a+1)(b):x(b)}function x(b){return b===null||K(b)?e.check(K1,g,w)(b):(e.enter("codeFlowValue"),k(b))}function k(b){return b===null||K(b)?(e.exit("codeFlowValue"),x(b)):(e.consume(b),k)}function w(b){return e.exit("codeFenced"),t(b)}function T(b,E,S){let A=0;return C;function C(H){return b.enter("lineEnding"),b.consume(H),b.exit("lineEnding"),R}function R(H){return b.enter("codeFencedFence"),se(H)?oe(b,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):L(H)}function L(H){return H===l?(b.enter("codeFencedFenceSequence"),$(H)):S(H)}function $(H){return H===l?(A++,b.consume(H),$):A>=o?(b.exit("codeFencedFenceSequence"),se(H)?oe(b,U,"whitespace")(H):U(H)):S(H)}function U(H){return H===null||K(H)?(b.exit("codeFencedFence"),E(H)):S(H)}}}function fw(e,t,n){const r=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const $c={name:"codeIndented",tokenize:gw},mw={partial:!0,tokenize:yw};function gw(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),oe(e,a,"linePrefix",5)(u)}function a(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):K(u)?e.attempt(mw,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||K(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function yw(e,t,n){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?n(o):K(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):oe(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):K(o)?s(o):n(o)}}const xw={name:"codeText",previous:kw,resolve:vw,tokenize:ww};function vw(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function kw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ww(e,t,n){let r=0,s,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(a=e.enter("codeTextSequence"),s=0,h(d)):K(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||K(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function h(d){return d===96?(e.consume(d),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",u(d))}}class bw{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&ci(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ci(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ci(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);ci(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ci(this.left,n.reverse())}}}function ci(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function $y(e){const t={};let n=-1,r,s,a,o,l,c,u;const h=new bw(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,jw(h,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(o=h.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},l=h.slice(s,n),l.unshift(r),h.splice(s,n-s+1,l))}}return jt(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}function jw(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let h,d,f=-1,p=n,m=0,g=0;const v=[g];for(;p;){for(;e.get(++s)[1]!==p;);a.push(s),p._tokenizer||(h=r.sliceStream(p),p.next||h.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(h),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(g=f+1,v.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),f=v.length;f--;){const y=l.slice(v[f],v[f+1]),x=a.pop();c.push([x,x+y.length-1]),e.splice(x,2,y)}for(c.reverse(),f=-1;++f<c.length;)u[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return u}const Sw={resolve:Cw,tokenize:Ew},Nw={partial:!0,tokenize:Tw};function Cw(e){return $y(e),e}function Ew(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?a(l):K(l)?e.check(Nw,o,a)(l):(e.consume(l),s)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Tw(e,t,n){const r=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),oe(e,a,"linePrefix")}function a(o){if(o===null||K(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Dy(e,t,n,r,s,a,o,l,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(y),e.exit(a),f):y===null||y===32||y===41||ul(y)?n(y):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(y))}function f(y){return y===62?(e.enter(a),e.consume(y),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(e.exit("chunkString"),e.exit(l),f(y)):y===null||y===60||K(y)?n(y):(e.consume(y),y===92?m:p)}function m(y){return y===60||y===62||y===92?(e.consume(y),p):p(y)}function g(y){return!h&&(y===null||y===41||he(y))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(y)):h<u&&y===40?(e.consume(y),h++,g):y===41?(e.consume(y),h--,g):y===null||y===32||y===40||ul(y)?n(y):(e.consume(y),y===92?v:g)}function v(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}function By(e,t,n,r,s,a){const o=this;let l=0,c;return u;function u(p){return e.enter(r),e.enter(s),e.consume(p),e.exit(s),e.enter(a),h}function h(p){return l>999||p===null||p===91||p===93&&!c||p===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(s),e.consume(p),e.exit(s),e.exit(r),t):K(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||K(p)||l++>999?(e.exit("chunkString"),h(p)):(e.consume(p),c||(c=!se(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,d):d(p)}}function Uy(e,t,n,r,s,a){let o;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(s),e.consume(f),e.exit(s),o=f===40?41:f,c):n(f)}function c(f){return f===o?(e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):(e.enter(a),u(f))}function u(f){return f===o?(e.exit(a),c(o)):f===null?n(f):K(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),oe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===o||f===null||K(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:h)}function d(f){return f===o||f===92?(e.consume(f),h):h(f)}}function Ei(e,t){let n;return r;function r(s){return K(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):se(s)?oe(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const Pw={name:"definition",tokenize:Aw},Rw={partial:!0,tokenize:Lw};function Aw(e,t,n){const r=this;let s;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return By.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return s=Yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return he(p)?Ei(e,u)(p):u(p)}function u(p){return Dy(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function h(p){return e.attempt(Rw,d,d)(p)}function d(p){return se(p)?oe(e,f,"whitespace")(p):f(p)}function f(p){return p===null||K(p)?(e.exit("definition"),r.parser.defined.push(s),t(p)):n(p)}}function Lw(e,t,n){return r;function r(l){return he(l)?Ei(e,s)(l):n(l)}function s(l){return Uy(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return se(l)?oe(e,o,"whitespace")(l):o(l)}function o(l){return l===null||K(l)?t(l):n(l)}}const _w={name:"hardBreakEscape",tokenize:Iw};function Iw(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return K(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const zw={name:"headingAtx",resolve:Fw,tokenize:Mw};function Fw(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},jt(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function Mw(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),o(h)}function o(h){return h===35&&r++<6?(e.consume(h),o):h===null||he(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||K(h)?(e.exit("atxHeading"),t(h)):se(h)?oe(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||he(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}const Ow=["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"],G1=["pre","script","style","textarea"],$w={concrete:!0,name:"htmlFlow",resolveTo:Uw,tokenize:qw},Dw={partial:!0,tokenize:Ww},Bw={partial:!0,tokenize:Hw};function Uw(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 qw(e,t,n){const r=this;let s,a,o,l,c;return u;function u(P){return h(P)}function h(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),a=!0,g):P===63?(e.consume(P),s=3,r.interrupt?t:N):et(P)?(e.consume(P),o=String.fromCharCode(P),v):n(P)}function f(P){return P===45?(e.consume(P),s=2,p):P===91?(e.consume(P),s=5,l=0,m):et(P)?(e.consume(P),s=4,r.interrupt?t:N):n(P)}function p(P){return P===45?(e.consume(P),r.interrupt?t:N):n(P)}function m(P){const re="CDATA[";return P===re.charCodeAt(l++)?(e.consume(P),l===re.length?r.interrupt?t:L:m):n(P)}function g(P){return et(P)?(e.consume(P),o=String.fromCharCode(P),v):n(P)}function v(P){if(P===null||P===47||P===62||he(P)){const re=P===47,ce=o.toLowerCase();return!re&&!a&&G1.includes(ce)?(s=1,r.interrupt?t(P):L(P)):Ow.includes(o.toLowerCase())?(s=6,re?(e.consume(P),y):r.interrupt?t(P):L(P)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):a?x(P):k(P))}return P===45||Qe(P)?(e.consume(P),o+=String.fromCharCode(P),v):n(P)}function y(P){return P===62?(e.consume(P),r.interrupt?t:L):n(P)}function x(P){return se(P)?(e.consume(P),x):C(P)}function k(P){return P===47?(e.consume(P),C):P===58||P===95||et(P)?(e.consume(P),w):se(P)?(e.consume(P),k):C(P)}function w(P){return P===45||P===46||P===58||P===95||Qe(P)?(e.consume(P),w):T(P)}function T(P){return P===61?(e.consume(P),b):se(P)?(e.consume(P),T):k(P)}function b(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),c=P,E):se(P)?(e.consume(P),b):S(P)}function E(P){return P===c?(e.consume(P),c=null,A):P===null||K(P)?n(P):(e.consume(P),E)}function S(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||he(P)?T(P):(e.consume(P),S)}function A(P){return P===47||P===62||se(P)?k(P):n(P)}function C(P){return P===62?(e.consume(P),R):n(P)}function R(P){return P===null||K(P)?L(P):se(P)?(e.consume(P),R):n(P)}function L(P){return P===45&&s===2?(e.consume(P),Z):P===60&&s===1?(e.consume(P),Q):P===62&&s===4?(e.consume(P),V):P===63&&s===3?(e.consume(P),N):P===93&&s===5?(e.consume(P),B):K(P)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Dw,Y,$)(P)):P===null||K(P)?(e.exit("htmlFlowData"),$(P)):(e.consume(P),L)}function $(P){return e.check(Bw,U,Y)(P)}function U(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),H}function H(P){return P===null||K(P)?$(P):(e.enter("htmlFlowData"),L(P))}function Z(P){return P===45?(e.consume(P),N):L(P)}function Q(P){return P===47?(e.consume(P),o="",_):L(P)}function _(P){if(P===62){const re=o.toLowerCase();return G1.includes(re)?(e.consume(P),V):L(P)}return et(P)&&o.length<8?(e.consume(P),o+=String.fromCharCode(P),_):L(P)}function B(P){return P===93?(e.consume(P),N):L(P)}function N(P){return P===62?(e.consume(P),V):P===45&&s===2?(e.consume(P),N):L(P)}function V(P){return P===null||K(P)?(e.exit("htmlFlowData"),Y(P)):(e.consume(P),V)}function Y(P){return e.exit("htmlFlow"),t(P)}}function Hw(e,t,n){const r=this;return s;function s(o){return K(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Ww(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(va,t,n)}}const Vw={name:"htmlText",tokenize:Kw};function Kw(e,t,n){const r=this;let s,a,o;return l;function l(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),c}function c(N){return N===33?(e.consume(N),u):N===47?(e.consume(N),T):N===63?(e.consume(N),k):et(N)?(e.consume(N),S):n(N)}function u(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,m):et(N)?(e.consume(N),x):n(N)}function h(N){return N===45?(e.consume(N),p):n(N)}function d(N){return N===null?n(N):N===45?(e.consume(N),f):K(N)?(o=d,Q(N)):(e.consume(N),d)}function f(N){return N===45?(e.consume(N),p):d(N)}function p(N){return N===62?Z(N):N===45?f(N):d(N)}function m(N){const V="CDATA[";return N===V.charCodeAt(a++)?(e.consume(N),a===V.length?g:m):n(N)}function g(N){return N===null?n(N):N===93?(e.consume(N),v):K(N)?(o=g,Q(N)):(e.consume(N),g)}function v(N){return N===93?(e.consume(N),y):g(N)}function y(N){return N===62?Z(N):N===93?(e.consume(N),y):g(N)}function x(N){return N===null||N===62?Z(N):K(N)?(o=x,Q(N)):(e.consume(N),x)}function k(N){return N===null?n(N):N===63?(e.consume(N),w):K(N)?(o=k,Q(N)):(e.consume(N),k)}function w(N){return N===62?Z(N):k(N)}function T(N){return et(N)?(e.consume(N),b):n(N)}function b(N){return N===45||Qe(N)?(e.consume(N),b):E(N)}function E(N){return K(N)?(o=E,Q(N)):se(N)?(e.consume(N),E):Z(N)}function S(N){return N===45||Qe(N)?(e.consume(N),S):N===47||N===62||he(N)?A(N):n(N)}function A(N){return N===47?(e.consume(N),Z):N===58||N===95||et(N)?(e.consume(N),C):K(N)?(o=A,Q(N)):se(N)?(e.consume(N),A):Z(N)}function C(N){return N===45||N===46||N===58||N===95||Qe(N)?(e.consume(N),C):R(N)}function R(N){return N===61?(e.consume(N),L):K(N)?(o=R,Q(N)):se(N)?(e.consume(N),R):A(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,$):K(N)?(o=L,Q(N)):se(N)?(e.consume(N),L):(e.consume(N),U)}function $(N){return N===s?(e.consume(N),s=void 0,H):N===null?n(N):K(N)?(o=$,Q(N)):(e.consume(N),$)}function U(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||he(N)?A(N):(e.consume(N),U)}function H(N){return N===47||N===62||he(N)?A(N):n(N)}function Z(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function Q(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),_}function _(N){return se(N)?oe(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):B(N)}function B(N){return e.enter("htmlTextData"),o(N)}}const lp={name:"labelEnd",resolveAll:Yw,resolveTo:Xw,tokenize:Jw},Qw={tokenize:eb},Gw={tokenize:tb},Zw={tokenize:nb};function Yw(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&jt(e,0,e.length,n),e}function Xw(e,t){let n=e.length,r=0,s,a,o,l;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=_t(l,e.slice(a+1,a+r+3)),l=_t(l,[["enter",h,t]]),l=_t(l,Wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=_t(l,[["exit",h,t],e[o-2],e[o-1],["exit",u,t]]),l=_t(l,e.slice(o+1)),l=_t(l,[["exit",c,t]]),jt(e,a,e.length,l),e}function Jw(e,t,n){const r=this;let s=r.events.length,a,o;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return l;function l(f){return a?a._inactive?d(f):(o=r.parser.defined.includes(Yt(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(Qw,h,o?h:d)(f):f===91?e.attempt(Gw,h,o?u:d)(f):o?h(f):d(f)}function u(f){return e.attempt(Zw,h,d)(f)}function h(f){return t(f)}function d(f){return a._balanced=!0,n(f)}}function eb(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),s}function s(d){return he(d)?Ei(e,a)(d):a(d)}function a(d){return d===41?h(d):Dy(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return he(d)?Ei(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?Uy(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function u(d){return he(d)?Ei(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function tb(e,t,n){const r=this;return s;function s(l){return By.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function nb(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const rb={name:"labelStartImage",resolveAll:lp.resolveAll,tokenize:sb};function sb(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ib={name:"labelStartLink",resolveAll:lp.resolveAll,tokenize:ab};function ab(e,t,n){const r=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Dc={name:"lineEnding",tokenize:ob};function ob(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const So={name:"thematicBreak",tokenize:lb};function lb(e,t,n){let r=0,s;return a;function a(u){return e.enter("thematicBreak"),o(u)}function o(u){return s=u,l(u)}function l(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||K(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),se(u)?oe(e,l,"whitespace")(u):l(u))}}const it={continuation:{tokenize:hb},exit:fb,name:"list",tokenize:db},cb={partial:!0,tokenize:mb},ub={partial:!0,tokenize:pb};function db(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:bd(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(So,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return bd(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(va,r.interrupt?n:h,e.attempt(cb,f,d))}function h(p){return r.containerState.initialBlankLine=!0,a++,f(p)}function d(p){return se(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function hb(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(va,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!se(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ub,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(e,e.attempt(it,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function pb(e,t,n){const r=this;return oe(e,s,"listItemIndent",r.containerState.size+1);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function fb(e){e.exit(this.containerState.type)}function mb(e,t,n){const r=this;return oe(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=r.events[r.events.length-1];return!se(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Z1={name:"setextUnderline",resolveTo:gb,tokenize:yb};function gb(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function yb(e,t,n){const r=this;let s;return a;function a(u){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),s=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),se(u)?oe(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||K(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const xb={tokenize:vb};function vb(e){const t=this,n=e.attempt(va,r,e.attempt(this.parser.constructs.flowInitial,s,oe(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Sw,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const kb={resolveAll:Hy()},wb=qy("string"),bb=qy("text");function qy(e){return{resolveAll:Hy(e==="text"?jb:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,o,l);return o;function o(h){return u(h)?a(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),a(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;const d=s[h];let f=-1;if(d)for(;++f<d.length;){const p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Hy(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function jb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,o=-1,l=0,c;for(;a--;){const u=s[a];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Sb={42:it,43:it,45:it,48:it,49:it,50:it,51:it,52:it,53:it,54:it,55:it,56:it,57:it,62:Fy},Nb={91:Pw},Cb={[-2]:$c,[-1]:$c,32:$c},Eb={35:zw,42:So,45:[Z1,So],60:$w,61:Z1,95:So,96:Q1,126:Q1},Tb={38:Oy,92:My},Pb={[-5]:Dc,[-4]:Dc,[-3]:Dc,33:rb,38:Oy,42:jd,60:[iw,Vw],91:ib,92:[_w,My],93:lp,95:jd,96:xw},Rb={null:[jd,kb]},Ab={null:[42,95]},Lb={null:[]},_b=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ab,contentInitial:Nb,disable:Lb,document:Sb,flow:Eb,flowInitial:Cb,insideSpan:Rb,string:Tb,text:Pb},Symbol.toStringTag,{value:"Module"}));function Ib(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let o=[],l=[];const c={attempt:E(T),check:E(b),consume:x,enter:k,exit:w,interrupt:E(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d};let h=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function d(R){return o=_t(o,R),v(),o[o.length-1]!==null?[]:(S(t,0),u.events=Wl(a,u.events,u),u.events)}function f(R,L){return Fb(p(R),L)}function p(R){return zb(o,R)}function m(){const{_bufferIndex:R,_index:L,line:$,column:U,offset:H}=r;return{_bufferIndex:R,_index:L,line:$,column:U,offset:H}}function g(R){s[R.line]=R.column,C()}function v(){let R;for(;r._index<o.length;){const L=o[r._index];if(typeof L=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<L.length;)y(L.charCodeAt(r._bufferIndex));else y(L)}}function y(R){h=h(R)}function x(R){K(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,C()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=R}function k(R,L){const $=L||{};return $.type=R,$.start=m(),u.events.push(["enter",$,u]),l.push($),$}function w(R){const L=l.pop();return L.end=m(),u.events.push(["exit",L,u]),L}function T(R,L){S(R,L.from)}function b(R,L){L.restore()}function E(R,L){return $;function $(U,H,Z){let Q,_,B,N;return Array.isArray(U)?Y(U):"tokenize"in U?Y([U]):V(U);function V(J){return ye;function ye(Pe){const Re=Pe!==null&&J[Pe],st=Pe!==null&&J.null,Dt=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(st)?st:st?[st]:[]];return Y(Dt)(Pe)}}function Y(J){return Q=J,_=0,J.length===0?Z:P(J[_])}function P(J){return ye;function ye(Pe){return N=A(),B=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?ce():J.tokenize.call(L?Object.assign(Object.create(u),L):u,c,re,ce)(Pe)}}function re(J){return R(B,N),H}function ce(J){return N.restore(),++_<Q.length?P(Q[_]):Z}}}function S(R,L){R.resolveAll&&!a.includes(R)&&a.push(R),R.resolve&&jt(u.events,L,u.events.length-L,R.resolve(u.events.slice(L),u)),R.resolveTo&&(u.events=R.resolveTo(u.events,u))}function A(){const R=m(),L=u.previous,$=u.currentConstruct,U=u.events.length,H=Array.from(l);return{from:U,restore:Z};function Z(){r=R,u.previous=L,u.currentConstruct=$,u.events.length=U,l=H,C()}}function C(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function zb(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(r,a)];else{if(o=e.slice(n,s),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function Fb(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
429
+ `;break}case-3:{o=`\r
430
+ `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(a)}s=a===-2,r.push(o)}return r.join("")}function Mb(e){const r={constructs:Iy([_b,...(e||{}).extensions||[]]),content:s(X7),defined:[],document:s(ew),flow:s(xb),lazy:{},string:s(wb),text:s(bb)};return r;function s(a){return o;function o(l){return Ib(r,a,l)}}}function Ob(e){for(;!$y(e););return e}const Y1=/[\0\t\n\r]/g;function $b(){let e=1,t="",n=!0,r;return s;function s(a,o,l){const c=[];let u,h,d,f,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(Y1.lastIndex=d,u=Y1.exec(a),f=u&&u.index!==void 0?u.index:a.length,p=a.charCodeAt(f),!u){t=a.slice(d);break}if(p===10&&d===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<f&&(c.push(a.slice(d,f)),e+=f-d),p){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Db=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Bb(e){return e.replace(Db,Ub)}function Ub(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return zy(n.slice(a?2:1),a?16:10)}return op(n)||e}const Wy={}.hasOwnProperty;function qb(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Hb(n)(Ob(Mb(n).document().write($b()(e,t,!0))))}function Hb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Rt),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Zr),blockQuote:a(st),characterEscape:A,characterReference:A,codeFenced:a(Dt),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Dt,o),codeText:a(hn,o),codeTextData:A,data:A,codeFlowValue:A,definition:a(Qr),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Gr),hardBreakEscape:a(fr),hardBreakTrailing:a(fr),htmlFlow:a(F,o),htmlFlowData:A,htmlText:a(F,o),htmlTextData:A,image:a(je),label:o,link:a(Rt),listItem:a(Bt),listItemValue:f,listOrdered:a($e,d),listUnordered:a($e),paragraph:a(Na),reference:P,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Zr),strong:a(Jl),thematicBreak:a(pe)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Re,autolinkProtocol:Pe,blockQuote:c(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:J,characterReference:ye,codeFenced:c(v),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:C,codeIndented:c(y),codeText:c(H),codeTextData:C,data:C,definition:c(),definitionDestinationString:w,definitionLabelString:x,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(L),hardBreakTrailing:c(L),htmlFlow:c($),htmlFlowData:C,htmlText:c(U),htmlTextData:C,image:c(Q),label:B,labelText:_,lineEnding:R,link:c(Z),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:N,resourceTitleString:V,resource:Y,setextHeading:c(S),setextHeadingLineSequence:E,setextHeadingText:b,strong:c(),thematicBreak:c()}};Vy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(I){let D={type:"root",children:[]};const G={stack:[D],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:h,data:n},ae=[];let de=-1;for(;++de<I.length;)if(I[de][1].type==="listOrdered"||I[de][1].type==="listUnordered")if(I[de][0]==="enter")ae.push(de);else{const Ut=ae.pop();de=s(I,Ut,de)}for(de=-1;++de<I.length;){const Ut=t[I[de][0]];Wy.call(Ut,I[de][1].type)&&Ut[I[de][1].type].call(Object.assign({sliceSerialize:I[de][2].sliceSerialize},G),I[de][1])}if(G.tokenStack.length>0){const Ut=G.tokenStack[G.tokenStack.length-1];(Ut[1]||X1).call(G,void 0,Ut[0])}for(D.position={start:zn(I.length>0?I[0][1].start:{line:1,column:1,offset:0}),end:zn(I.length>0?I[I.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)D=t.transforms[de](D)||D;return D}function s(I,D,G){let ae=D-1,de=-1,Ut=!1,mr,pn,Gs,Zs;for(;++ae<=G;){const mt=I[ae];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?de++:de--,Zs=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(mr&&!Zs&&!de&&!Gs&&(Gs=ae),Zs=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zs=void 0}if(!de&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||de===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(mr){let Yr=ae;for(pn=void 0;Yr--;){const fn=I[Yr];if(fn[1].type==="lineEnding"||fn[1].type==="lineEndingBlank"){if(fn[0]==="exit")continue;pn&&(I[pn][1].type="lineEndingBlank",Ut=!0),fn[1].type="lineEnding",pn=Yr}else if(!(fn[1].type==="linePrefix"||fn[1].type==="blockQuotePrefix"||fn[1].type==="blockQuotePrefixWhitespace"||fn[1].type==="blockQuoteMarker"||fn[1].type==="listItemIndent"))break}Gs&&(!pn||Gs<pn)&&(mr._spread=!0),mr.end=Object.assign({},pn?I[pn][1].start:mt[1].end),I.splice(pn||ae,0,["exit",mr,mt[2]]),ae++,G++}if(mt[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};mr=Yr,I.splice(ae,0,["enter",Yr,mt[2]]),ae++,G++,Gs=void 0,Zs=!0}}}return I[D][1]._spread=Ut,G}function a(I,D){return G;function G(ae){l.call(this,I(ae),ae),D&&D.call(this,ae)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(I,D,G){this.stack[this.stack.length-1].children.push(I),this.stack.push(I),this.tokenStack.push([D,G||void 0]),I.position={start:zn(D.start),end:void 0}}function c(I){return D;function D(G){I&&I.call(this,G),u.call(this,G)}}function u(I,D){const G=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==I.type&&(D?D.call(this,I,ae[0]):(ae[1]||X1).call(this,I,ae[0]));else throw new Error("Cannot close `"+I.type+"` ("+Ci({start:I.start,end:I.end})+"): it’s not open");G.position.end=zn(I.end)}function h(){return ap(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(I){if(this.data.expectingFirstListItemValue){const D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(I),10),this.data.expectingFirstListItemValue=void 0}}function p(){const I=this.resume(),D=this.stack[this.stack.length-1];D.lang=I}function m(){const I=this.resume(),D=this.stack[this.stack.length-1];D.meta=I}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const I=this.resume(),D=this.stack[this.stack.length-1];D.value=I.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const I=this.resume(),D=this.stack[this.stack.length-1];D.value=I.replace(/(\r?\n|\r)$/g,"")}function x(I){const D=this.resume(),G=this.stack[this.stack.length-1];G.label=D,G.identifier=Yt(this.sliceSerialize(I)).toLowerCase()}function k(){const I=this.resume(),D=this.stack[this.stack.length-1];D.title=I}function w(){const I=this.resume(),D=this.stack[this.stack.length-1];D.url=I}function T(I){const D=this.stack[this.stack.length-1];if(!D.depth){const G=this.sliceSerialize(I).length;D.depth=G}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function E(I){const D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(I).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function A(I){const G=this.stack[this.stack.length-1].children;let ae=G[G.length-1];(!ae||ae.type!=="text")&&(ae=Ca(),ae.position={start:zn(I.start),end:void 0},G.push(ae)),this.stack.push(ae)}function C(I){const D=this.stack.pop();D.value+=this.sliceSerialize(I),D.position.end=zn(I.end)}function R(I){const D=this.stack[this.stack.length-1];if(this.data.atHardBreak){const G=D.children[D.children.length-1];G.position.end=zn(I.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(D.type)&&(A.call(this,I),C.call(this,I))}function L(){this.data.atHardBreak=!0}function $(){const I=this.resume(),D=this.stack[this.stack.length-1];D.value=I}function U(){const I=this.resume(),D=this.stack[this.stack.length-1];D.value=I}function H(){const I=this.resume(),D=this.stack[this.stack.length-1];D.value=I}function Z(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=D,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function Q(){const I=this.stack[this.stack.length-1];if(this.data.inReference){const D=this.data.referenceType||"shortcut";I.type+="Reference",I.referenceType=D,delete I.url,delete I.title}else delete I.identifier,delete I.label;this.data.referenceType=void 0}function _(I){const D=this.sliceSerialize(I),G=this.stack[this.stack.length-2];G.label=Bb(D),G.identifier=Yt(D).toLowerCase()}function B(){const I=this.stack[this.stack.length-1],D=this.resume(),G=this.stack[this.stack.length-1];if(this.data.inReference=!0,G.type==="link"){const ae=I.children;G.children=ae}else G.alt=D}function N(){const I=this.resume(),D=this.stack[this.stack.length-1];D.url=I}function V(){const I=this.resume(),D=this.stack[this.stack.length-1];D.title=I}function Y(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function re(I){const D=this.resume(),G=this.stack[this.stack.length-1];G.label=D,G.identifier=Yt(this.sliceSerialize(I)).toLowerCase(),this.data.referenceType="full"}function ce(I){this.data.characterReferenceType=I.type}function J(I){const D=this.sliceSerialize(I),G=this.data.characterReferenceType;let ae;G?(ae=zy(D,G==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=op(D);const de=this.stack[this.stack.length-1];de.value+=ae}function ye(I){const D=this.stack.pop();D.position.end=zn(I.end)}function Pe(I){C.call(this,I);const D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(I)}function Re(I){C.call(this,I);const D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(I)}function st(){return{type:"blockquote",children:[]}}function Dt(){return{type:"code",lang:null,meta:null,value:""}}function hn(){return{type:"inlineCode",value:""}}function Qr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gr(){return{type:"emphasis",children:[]}}function Zr(){return{type:"heading",depth:0,children:[]}}function fr(){return{type:"break"}}function F(){return{type:"html",value:""}}function je(){return{type:"image",title:null,url:"",alt:null}}function Rt(){return{type:"link",title:null,url:"",children:[]}}function $e(I){return{type:"list",ordered:I.type==="listOrdered",start:null,spread:I._spread,children:[]}}function Bt(I){return{type:"listItem",spread:I._spread,checked:null,children:[]}}function Na(){return{type:"paragraph",children:[]}}function Jl(){return{type:"strong",children:[]}}function Ca(){return{type:"text",value:""}}function pe(){return{type:"thematicBreak"}}}function zn(e){return{line:e.line,column:e.column,offset:e.offset}}function Vy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Vy(e,r):Wb(e,r)}}function Wb(e,t){let n;for(n in t)if(Wy.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function X1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ci({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ci({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ci({start:t.start,end:t.end})+") is still open")}function Vb(e){const t=this;t.parser=n;function n(r){return qb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Kb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Qb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
431
+ `}]}function Gb(e,t){const n=t.value?t.value+`
432
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function Zb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Ks(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function Jb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ej(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ky(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function tj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ky(e,t);const s={src:Ks(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function nj(e,t){const n={src:Ks(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function rj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sj(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ky(e,t);const s={href:Ks(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ij(e,t){const n={href:Ks(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aj(e,t,n){const r=e.all(t),s=n?oj(n):Qy(t),a={},o=[];if(typeof t.checked=="boolean"){const h=r[0];let d;h&&h.type==="element"&&h.tagName==="p"?d=h:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const h=r[l];(s||l!==0||h.type!=="element"||h.tagName!=="p")&&o.push({type:"text",value:`
433
+ `}),h.type==="element"&&h.tagName==="p"&&!s?o.push(...h.children):o.push(h)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
434
+ `});const u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)}function oj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Qy(n[r])}return t}function Qy(e){const t=e.spread;return t??e.children.length>1}function lj(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const o=r[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function cj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function dj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hj(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=np(t.children[1]),c=Ey(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function pj(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const d=t.children[c],f={},p=o?o[c]:void 0;p&&(f.align=p);let m={type:"element",tagName:a,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,h),e.applyData(t,h)}function fj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const J1=9,e0=32;function mj(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(t0(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(t0(t.slice(s),s>0,!1)),a.join("")}function t0(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===J1||a===e0;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===J1||a===e0;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function gj(e,t){const n={type:"text",value:mj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function yj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xj={blockquote:Kb,break:Qb,code:Gb,delete:Zb,emphasis:Yb,footnoteReference:Xb,heading:Jb,html:ej,imageReference:tj,image:nj,inlineCode:rj,linkReference:sj,link:ij,listItem:aj,list:lj,paragraph:cj,root:uj,strong:dj,table:hj,tableCell:fj,tableRow:pj,text:gj,thematicBreak:yj,toml:Ga,yaml:Ga,definition:Ga,footnoteDefinition:Ga};function Ga(){}const Gy=-1,Vl=0,Ti=1,dl=2,cp=3,up=4,dp=5,hp=6,Zy=7,Yy=8,n0=typeof self=="object"?self:globalThis,vj=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,o]=t[s];switch(a){case Vl:case Gy:return n(o,s);case Ti:{const l=n([],s);for(const c of o)l.push(r(c));return l}case dl:{const l=n({},s);for(const[c,u]of o)l[r(c)]=r(u);return l}case cp:return n(new Date(o),s);case up:{const{source:l,flags:c}=o;return n(new RegExp(l,c),s)}case dp:{const l=n(new Map,s);for(const[c,u]of o)l.set(r(c),r(u));return l}case hp:{const l=n(new Set,s);for(const c of o)l.add(r(c));return l}case Zy:{const{name:l,message:c}=o;return n(new n0[l](c),s)}case Yy:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new n0[a](o),s)};return r},r0=e=>vj(new Map,e)(0),ts="",{toString:kj}={},{keys:wj}=Object,ui=e=>{const t=typeof e;if(t!=="object"||!e)return[Vl,t];const n=kj.call(e).slice(8,-1);switch(n){case"Array":return[Ti,ts];case"Object":return[dl,ts];case"Date":return[cp,ts];case"RegExp":return[up,ts];case"Map":return[dp,ts];case"Set":return[hp,ts];case"DataView":return[Ti,n]}return n.includes("Array")?[Ti,n]:n.includes("Error")?[Zy,n]:[dl,n]},Za=([e,t])=>e===Vl&&(t==="function"||t==="symbol"),bj=(e,t,n,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=ui(o);switch(l){case Vl:{let h=o;switch(c){case"bigint":l=Yy,h=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([Gy],o)}return s([l,h],o)}case Ti:{if(c){let f=o;return c==="DataView"?f=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(o)),s([c,[...f]],o)}const h=[],d=s([l,h],o);for(const f of o)h.push(a(f));return d}case dl:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const h=[],d=s([l,h],o);for(const f of wj(o))(e||!Za(ui(o[f])))&&h.push([a(f),a(o[f])]);return d}case cp:return s([l,o.toISOString()],o);case up:{const{source:h,flags:d}=o;return s([l,{source:h,flags:d}],o)}case dp:{const h=[],d=s([l,h],o);for(const[f,p]of o)(e||!(Za(ui(f))||Za(ui(p))))&&h.push([a(f),a(p)]);return d}case hp:{const h=[],d=s([l,h],o);for(const f of o)(e||!Za(ui(f)))&&h.push(a(f));return d}}const{message:u}=o;return s([l,{name:c,message:u}],o)};return a},s0=(e,{json:t,lossy:n}={})=>{const r=[];return bj(!(t||n),!!t,new Map,r)(e),r},hl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?r0(s0(e,t)):structuredClone(e):(e,t)=>r0(s0(e,t));function jj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Sj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Nj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||jj,r=e.options.footnoteBackLabel||Sj,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const h=e.all(u),d=String(u.identifier).toUpperCase(),f=Ks(d.toLowerCase());let p=0;const m=[],g=e.footnoteCounts.get(d);for(;g!==void 0&&++p<=g;){m.length>0&&m.push({type:"text",value:" "});let x=typeof n=="string"?n:n(c,p);typeof x=="string"&&(x={type:"text",value:x}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const x=v.children[v.children.length-1];x&&x.type==="text"?x.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else h.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(h,!0)};e.patch(u,y),l.push(y)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...hl(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
435
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
436
+ `}]}}const ka=function(e){if(e==null)return Pj;if(typeof e=="function")return Kl(e);if(typeof e=="object")return Array.isArray(e)?Cj(e):Ej(e);if(typeof e=="string")return Tj(e);throw new Error("Expected function, string, or object as test")};function Cj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ka(e[n]);return Kl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function Ej(e){const t=e;return Kl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function Tj(e){return Kl(t);function t(n){return n&&n.type===e}}function Kl(e){return t;function t(n,r,s){return!!(Rj(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function Pj(){return!0}function Rj(e){return e!==null&&typeof e=="object"&&"type"in e}const Xy=[],Aj=!0,Sd=!1,Lj="skip";function _j(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=ka(s),o=r?-1:1;l(e,void 0,[])();function l(c,u,h){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const p=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=Xy,m,g,v;if((!t||a(c,u,h[h.length-1]||void 0))&&(p=Ij(n(c,h)),p[0]===Sd))return p;if("children"in c&&c.children){const y=c;if(y.children&&p[0]!==Lj)for(g=(r?y.children.length:-1)+o,v=h.concat(y);g>-1&&g<y.children.length;){const x=y.children[g];if(m=l(x,g,v)(),m[0]===Sd)return m;g=typeof m[1]=="number"?m[1]:g+o}}return p}}}function Ij(e){return Array.isArray(e)?e:typeof e=="number"?[Aj,e]:e==null?Xy:[e]}function pp(e,t,n,r){let s,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,s=n):(a=t,o=n,s=r),_j(e,a,l,s);function l(c,u){const h=u[u.length-1],d=h?h.children.indexOf(c):void 0;return o(c,d,h)}}const Nd={}.hasOwnProperty,zj={};function Fj(e,t){const n=t||zj,r=new Map,s=new Map,a=new Map,o={...xj,...n.handlers},l={all:u,applyData:Oj,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:Mj,wrap:Dj};return pp(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const d=h.type==="definition"?r:s,f=String(h.identifier).toUpperCase();d.has(f)||d.set(f,h)}}),l;function c(h,d){const f=h.type,p=l.handlers[f];if(Nd.call(l.handlers,f)&&p)return p(l,h,d);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in h){const{children:g,...v}=h,y=hl(v);return y.children=l.all(h),y}return hl(h)}return(l.options.unknownHandler||$j)(l,h,d)}function u(h){const d=[];if("children"in h){const f=h.children;let p=-1;for(;++p<f.length;){const m=l.one(f[p],h);if(m){if(p&&f[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=i0(m.value)),!Array.isArray(m)&&m.type==="element")){const g=m.children[0];g&&g.type==="text"&&(g.value=i0(g.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function Mj(e,t){e.position&&(t.position=S7(e))}function Oj(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,hl(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function $j(e,t){const n=t.data||{},r="value"in t&&!(Nd.call(n,"hProperties")||Nd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Dj(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
437
+ `});++r<e.length;)r&&n.push({type:"text",value:`
438
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
439
+ `}),n}function i0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function a0(e,t){const n=Fj(e,t),r=n.one(e,void 0),s=Nj(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
440
+ `},s),a}function Bj(e,t){return e&&"run"in e?async function(n,r){const s=a0(n,{file:r,...t});await e.run(s,r)}:function(n,r){return a0(n,{file:r,...e||t})}}function o0(e){if(e)throw e}var No=Object.prototype.hasOwnProperty,Jy=Object.prototype.toString,l0=Object.defineProperty,c0=Object.getOwnPropertyDescriptor,u0=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Jy.call(t)==="[object Array]"},d0=function(t){if(!t||Jy.call(t)!=="[object Object]")return!1;var n=No.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&No.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var s;for(s in t);return typeof s>"u"||No.call(t,s)},h0=function(t,n){l0&&n.name==="__proto__"?l0(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},p0=function(t,n){if(n==="__proto__")if(No.call(t,n)){if(c0)return c0(t,n).value}else return;return t[n]},Uj=function e(){var t,n,r,s,a,o,l=arguments[0],c=1,u=arguments.length,h=!1;for(typeof l=="boolean"&&(h=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=p0(l,n),s=p0(t,n),l!==s&&(h&&s&&(d0(s)||(a=u0(s)))?(a?(a=!1,o=r&&u0(r)?r:[]):o=r&&d0(r)?r:{},h0(l,{name:n,newValue:e(h,o,s)})):typeof s<"u"&&h0(l,{name:n,newValue:s}));return l};const Bc=zd(Uj);function Cd(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 qj(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...s);function l(c,...u){const h=e[++a];let d=-1;if(c){o(c);return}for(;++d<s.length;)(u[d]===null||u[d]===void 0)&&(u[d]=s[d]);s=u,h?Hj(h,l)(...u):o(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Hj(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(u){const h=u;if(l&&n)throw h;return s(h)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(o,...l){n||(n=!0,t(o,...l))}function a(o){s(null,o)}}const tn={basename:Wj,dirname:Vj,extname:Kj,join:Qj,sep:"/"};function Wj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wa(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Vj(e){if(wa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Kj(e){wa(e);let t=e.length,n=-1,r=0,s=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function Qj(...e){let t=-1,n;for(;++t<e.length;)wa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Gj(n)}function Gj(e){wa(e);const t=e.codePointAt(0)===47;let n=Zj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Zj(e,t){let n="",r=0,s=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(s===o-1||a===1))if(s!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=o,a=0;continue}}else if(n.length>0){n="",r=0,s=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),r=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function wa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Yj={cwd:Xj};function Xj(){return"/"}function Ed(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Jj(e){if(typeof e=="string")e=new URL(e);else if(!Ed(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 e9(e)}function e9(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Uc=["history","path","basename","stem","extname","dirname"];class ex{constructor(t){let n;t?Ed(t)?n={path:t}:typeof t=="string"||t9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Yj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Uc.length;){const a=Uc[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Uc.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?tn.basename(this.path):void 0}set basename(t){Hc(t,"basename"),qc(t,"basename"),this.path=tn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?tn.dirname(this.path):void 0}set dirname(t){f0(this.basename,"dirname"),this.path=tn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?tn.extname(this.path):void 0}set extname(t){if(qc(t,"extname"),f0(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=tn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ed(t)&&(t=Jj(t)),Hc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?tn.basename(this.path,this.extname):void 0}set stem(t){Hc(t,"stem"),qc(t,"stem"),this.path=tn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new Ye(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function qc(e,t){if(e&&e.includes(tn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+tn.sep+"`")}function Hc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function f0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function t9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n9=function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},r9={}.hasOwnProperty;class fp extends n9{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=qj()}copy(){const t=new fp;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Bc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Kc("data",this.frozen),this.namespace[t]=n,this):r9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Kc("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ya(t),r=this.parser||this.Parser;return Wc("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Wc("process",this.parser||this.Parser),Vc("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,o){const l=Ya(t),c=r.parse(l);r.run(c,l,function(h,d,f){if(h||!d||!f)return u(h);const p=d,m=r.stringify(p,f);a9(m)?f.value=m:f.result=m,u(h,f)});function u(h,d){h||!d?o(h):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),Wc("processSync",this.parser||this.Parser),Vc("processSync",this.compiler||this.Compiler),this.process(t,s),g0("processSync","process",n),r;function s(a,o){n=!0,o0(a),r=o}}run(t,n,r){m0(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const c=Ya(n);s.run(t,c,u);function u(h,d,f){const p=d||t;h?l(h):o?o(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),g0("runSync","run",r),s;function a(o,l){o0(o),s=l,r=!0}}stringify(t,n){this.freeze();const r=Ya(n),s=this.compiler||this.Compiler;return Vc("stringify",s),m0(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(Kc("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[h,...d]=u;c(h,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))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");l(u.plugins),u.settings&&(s.settings=Bc(!0,s.settings,u.settings))}function l(u){let h=-1;if(u!=null)if(Array.isArray(u))for(;++h<u.length;){const d=u[h];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,h){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...h]);else if(h.length>0){let[p,...m]=h;const g=r[f][1];Cd(g)&&Cd(p)&&(p=Bc(!0,g,p)),r[f]=[u,p,...m]}}}}const s9=new fp().freeze();function Wc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kc(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 m0(e){if(!Cd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function g0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ya(e){return i9(e)?e:new ex(e)}function i9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function a9(e){return typeof e=="string"||o9(e)}function o9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const l9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",y0=[],x0={allowDangerousHtml:!0},c9=/^(https?|ircs?|mailto|xmpp)$/i,u9=[{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 tx(e){const t=d9(e),n=h9(e);return p9(t.runSync(t.parse(n),n),e)}function d9(e){const t=e.rehypePlugins||y0,n=e.remarkPlugins||y0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...x0}:x0;return s9().use(Vb).use(n).use(Bj,r).use(t)}function h9(e){const t=e.children||"",n=new ex;return typeof t=="string"&&(n.value=t),n}function p9(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||f9;for(const h of u9)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+l9+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),pp(e,u),P7(e,{Fragment:i.Fragment,components:s,ignoreInvalidStyle:!0,jsx:i.jsx,jsxs:i.jsxs,passKeys:!0,passNode:!0});function u(h,d,f){if(h.type==="raw"&&f&&typeof d=="number")return o?f.children.splice(d,1):f.children[d]={type:"text",value:h.value},d;if(h.type==="element"){let p;for(p in Oc)if(Object.hasOwn(Oc,p)&&Object.hasOwn(h.properties,p)){const m=h.properties[p],g=Oc[p];(g===null||g.includes(h.tagName))&&(h.properties[p]=c(String(m||""),p,h))}}if(h.type==="element"){let p=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!p&&r&&typeof d=="number"&&(p=!r(h,d,f)),p&&f&&typeof d=="number")return l&&h.children?f.children.splice(d,1,...h.children):f.children.splice(d,1),d}}}function f9(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||c9.test(e.slice(0,t))?e:""}function v0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function m9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const nx=[],g9=!0,Qc=!1,Td="skip";function y9(e,t,n,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let s,a,o,l;if(a=t,typeof a=="function")o=a;else if(a&&typeof a=="object"){if(!(a.enter===null||a.enter===void 0))if(typeof a.enter=="function")o=a.enter;else throw new Error("Unexpected value `"+a.enter+"` for `visitors.enter`, expected optional visitor");if(typeof a.exit=="function")l=a.exit;else throw new Error("Unexpected value `"+a.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+a+"` for `enter` or `visitors`, expected visitor or object with visitors");ka(s);const c=1;u(e,void 0,[])();function u(h,d,f){const p=h&&typeof h=="object"?h:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(h.type+(g?"<"+g+">":""))+")"})}return m;function m(){const g=!s;let v=nx;if(o&&g&&(v=k0(o(h,f,d)),v[0]===Qc))return v;if("children"in h&&h.children){const y=h;if(y.children&&v[0]!==Td){let x=-1+c;const k=[...f,y];for(;x>-1&&x<y.children.length;){const w=y.children[x],T=u(w,x,k)();if(T[0]===Qc)return T;x=typeof T[1]=="number"?T[1]:x+c}}}if(l&&g){const y=k0(l(h,f,d));if(y[0]===Td)throw new Error("Unexpected value `"+y[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(y[0]===Qc||typeof y[1]=="number")return y}return v}}}function k0(e){return Array.isArray(e)?e:typeof e=="number"?[g9,e]:e==null?nx:[e]}function x9(e,t,n){const s=ka((n||{}).ignore||[]),a=v9(t);let o=-1;for(;++o<a.length;)y9(e,l);function l(u,h,d){if(u.type==="text"&&typeof d=="number")return c(u,h,d);if(s(u,d,h[h.length-1]))return Td}function c(u,h,d){const f=h[h.length-1],p=a[o][0],m=a[o][1];let g=0,v=!1,y=[];p.lastIndex=0;let x=p.exec(u.value);for(;x;){const w=x.index,T={index:x.index,input:x.input,stack:[...h,u]};let b=m(...x,T);if(typeof b=="string"&&(b=b.length>0?{type:"text",value:b}:void 0),b===!1)p.lastIndex=w+1;else{if(g!==w&&k({type:"text",value:u.value.slice(g,w)}),Array.isArray(b))for(const E of b)k(E);else b&&k(b);g=w+x[0].length,v=!0}if(!p.global)break;x=p.exec(u.value)}return v?(g<u.value.length&&k({type:"text",value:u.value.slice(g)}),f.children.splice(d,1,...y)):y=[u],d+y.length;function k(w){const T=y[y.length-1];T&&T.type==="text"&&w.type==="text"?T.value+=w.value:y.push(w)}}}function v9(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=[],n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([k9(s[0]),w9(s[1])])}return t}function k9(e){return typeof e=="string"?new RegExp(m9(e),"g"):e}function w9(e){return typeof e=="function"?e:function(){return e}}const Gc="phrasing",Zc=["autolink","link","image","label"];function b9(){return{transforms:[P9],enter:{literalAutolink:S9,literalAutolinkEmail:Yc,literalAutolinkHttp:Yc,literalAutolinkWww:Yc},exit:{literalAutolink:T9,literalAutolinkEmail:E9,literalAutolinkHttp:N9,literalAutolinkWww:C9}}}function j9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gc,notInConstruct:Zc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gc,notInConstruct:Zc},{character:":",before:"[ps]",after:"\\/",inConstruct:Gc,notInConstruct:Zc}]}}function S9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yc(e){this.config.enter.autolinkProtocol.call(this,e)}function N9(e){this.config.exit.autolinkProtocol.call(this,e)}function C9(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 E9(e){this.config.exit.autolinkEmail.call(this,e)}function T9(e){this.exit(e)}function P9(e){x9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R9],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,A9]],{ignore:["link","linkReference"]})}function R9(e,t,n,r,s){let a="";if(!rx(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!L9(n)))return!1;const o=_9(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function A9(e,t,n,r){return!rx(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function L9(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 _9(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=v0(e,"(");let a=v0(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function rx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Br(n)||Hl(n))&&(!t||n!==47)}sx.peek=U9;function I9(){this.buffer()}function z9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function F9(){this.buffer()}function M9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function O9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $9(e){this.exit(e)}function D9(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function B9(e){this.exit(e)}function U9(){return"["}function sx(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function q9(){return{enter:{gfmFootnoteCallString:I9,gfmFootnoteCall:z9,gfmFootnoteDefinitionLabelString:F9,gfmFootnoteDefinition:M9},exit:{gfmFootnoteCallString:O9,gfmFootnoteCall:$9,gfmFootnoteDefinitionLabelString:D9,gfmFootnoteDefinition:B9}}}function H9(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:sx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,o){const l=a.createTracker(o);let c=l.move("[^");const u=a.enter("footnoteDefinition"),h=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),h(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
441
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?ix:W9))),u(),c}}function W9(e,t,n){return t===0?e:ix(e,t,n)}function ix(e,t,n){return(n?"":" ")+e}const V9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];mp.attention=Y9;mp.peek=X9;function K9(){return{canContainEols:["delete"],enter:{strikethrough:G9},exit:{strikethrough:Z9}}}function Q9(){return{handlers:{delete:mp},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:V9}]}}function G9(e){this.enter({type:"delete",children:[],position:void 0},e)}function Z9(e){this.exit(e)}function mp(e,t,n,r){const s=n.createTracker(r),a=n.stack.includes("strikethrough")?"~":"~~",o=n.enter("strikethrough");let l=s.move(a);return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move(a),o(),l}function Y9(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function X9(){return"~"}function J9(e){return e.length}function eS(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||J9,a=[],o=[],l=[],c=[];let u=0,h=-1;for(;++h<e.length;){const g=[],v=[];let y=-1;for(e[h].length>u&&(u=e[h].length);++y<e[h].length;){const x=tS(e[h][y]);if(n.alignDelimiters!==!1){const k=s(x);v[y]=k,(c[y]===void 0||k>c[y])&&(c[y]=k)}g.push(x)}o[h]=g,l[h]=v}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)a[d]=w0(r[d]);else{const g=w0(r);for(;++d<u;)a[d]=g}d=-1;const f=[],p=[];for(;++d<u;){const g=a[d];let v="",y="";g===99?(v=":",y=":"):g===108?v=":":g===114&&(y=":");let x=n.alignDelimiters===!1?1:Math.max(1,c[d]-v.length-y.length);const k=v+"-".repeat(x)+y;n.alignDelimiters!==!1&&(x=v.length+x+y.length,x>c[d]&&(c[d]=x),p[d]=x),f[d]=k}o.splice(1,0,f),l.splice(1,0,p),h=-1;const m=[];for(;++h<o.length;){const g=o[h],v=l[h];d=-1;const y=[];for(;++d<u;){const x=g[d]||"";let k="",w="";if(n.alignDelimiters!==!1){const T=c[d]-(v[d]||0),b=a[d];b===114?k=" ".repeat(T):b===99?T%2?(k=" ".repeat(T/2+.5),w=" ".repeat(T/2-.5)):(k=" ".repeat(T/2),w=k):w=" ".repeat(T)}n.delimiterStart!==!1&&!d&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||d)&&y.push(" "),n.alignDelimiters!==!1&&y.push(k),y.push(x),n.alignDelimiters!==!1&&y.push(w),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
442
+ `)}function tS(e){return e==null?"":String(e)}function w0(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 nS(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),rS);return s(),o}function rS(e,t,n){return">"+(n?"":" ")+e}function sS(e,t){return b0(e,t.inConstruct,!0)&&!b0(e,t.notInConstruct,!1)}function b0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function j0(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
443
+ `&&sS(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
444
+ `}function iS(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>o&&(o=a):a=1,s=r+t.length,r=n.indexOf(t,s);return o}function aS(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 oS(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 lS(e,t,n,r){const s=oS(n),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(aS(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(a,cS);return d(),f}const l=n.createTracker(r),c=s.repeat(Math.max(iS(a,s)+1,3)),u=n.enter("codeFenced");let h=l.move(c);if(e.lang){const d=n.enter(`codeFencedLang${o}`);h+=l.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...l.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${o}`);h+=l.move(" "),h+=l.move(n.safe(e.meta,{before:h,after:`
445
+ `,encode:["`"],...l.current()})),d()}return h+=l.move(`
446
+ `),a&&(h+=l.move(a+`
447
+ `)),h+=l.move(c),u(),h}function cS(e,t,n){return(n?"":" ")+e}function gp(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 uS(e,t,n,r){const s=gp(n),a=s==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
448
+ `,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),o(),u}function dS(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 ra(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pl(e,t,n){const r=Os(e),s=Os(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ax.peek=hS;function ax(e,t,n,r){const s=dS(n),a=n.enter("emphasis"),o=n.createTracker(r),l=o.move(s);let c=o.move(n.containerPhrasing(e,{after:s,before:l,...o.current()}));const u=c.charCodeAt(0),h=pl(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=ra(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=pl(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+ra(d));const p=o.move(s);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},l+c+p}function hS(e,t,n){return n.options.emphasis||"*"}function pS(e,t){let n=!1;return pp(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Sd}),!!((!e.depth||e.depth<3)&&ap(e)&&(t.options.setext||n))}function fS(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(pS(e,n)){const h=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...a.current(),before:`
449
+ `,after:`
450
+ `});return d(),h(),f+`
451
+ `+(s===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
452
+ `))+1))}const o="#".repeat(s),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
453
+ `,...a.current()});return/^[\t ]/.test(u)&&(u=ra(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}ox.peek=mS;function ox(e){return e.value||""}function mS(){return"<"}lx.peek=gS;function lx(e,t,n,r){const s=gp(n),a=s==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),u+=c.move(")"),o(),u}function gS(){return"!"}cx.peek=yS;function cx(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),s==="full"||!u||u!==d?c+=l.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function yS(){return"!"}ux.peek=xS;function ux(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return s+r+s}function xS(){return"`"}function dx(e,t){const n=ap(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}hx.peek=vS;function hx(e,t,n,r){const s=gp(n),a=s==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(dx(e,n)){const h=n.stack;n.stack=[],l=n.enter("autolink");let d=o.move("<");return d+=o.move(n.containerPhrasing(e,{before:d,after:">",...o.current()})),d+=o.move(">"),l(),n.stack=h,d}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),u+=o.move(" "+s),u+=o.move(n.safe(e.title,{before:u,after:s,...o.current()})),u+=o.move(s),c()),u+=o.move(")"),l(),u}function vS(e,t,n){return dx(e,n)?"<":"["}px.peek=kS;function px(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const h=n.stack;n.stack=[],o=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=h,a(),s==="full"||!u||u!==d?c+=l.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function kS(){return"["}function yp(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 wS(e){const t=yp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function bS(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 fx(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 jS(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?bS(n):yp(n);const l=e.ordered?o==="."?")":".":wS(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),fx(n)===o&&h){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,s(),u}function SS(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 NS(e,t,n,r){const s=SS(n);let a=n.bulletCurrent||yp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),h);return c(),u;function h(d,f,p){return f?(p?"":" ".repeat(o))+d:(p?a:a+" ".repeat(o-a.length))+d}}function CS(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),s(),o}const ES=ka(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function TS(e,t,n,r){return(e.children.some(function(o){return ES(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function PS(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mx.peek=RS;function mx(e,t,n,r){const s=PS(n),a=n.enter("strong"),o=n.createTracker(r),l=o.move(s+s);let c=o.move(n.containerPhrasing(e,{after:s,before:l,...o.current()}));const u=c.charCodeAt(0),h=pl(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=ra(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=pl(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+ra(d));const p=o.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:h.outside},l+c+p}function RS(e,t,n){return n.options.strong||"*"}function AS(e,t,n,r){return n.safe(e.value,r)}function LS(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 _S(e,t,n){const r=(fx(n)+(n.options.ruleSpaces?" ":"")).repeat(LS(n));return n.options.ruleSpaces?r.slice(0,-1):r}const gx={blockquote:nS,break:j0,code:lS,definition:uS,emphasis:ax,hardBreak:j0,heading:fS,html:ox,image:lx,imageReference:cx,inlineCode:ux,link:hx,linkReference:px,list:jS,listItem:NS,paragraph:CS,root:TS,strong:mx,text:AS,thematicBreak:_S};function IS(){return{enter:{table:zS,tableData:S0,tableHeader:S0,tableRow:MS},exit:{codeText:OS,table:FS,tableData:Xc,tableHeader:Xc,tableRow:Xc}}}function zS(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function FS(e){this.exit(e),this.data.inTable=void 0}function MS(e){this.enter({type:"tableRow",children:[]},e)}function Xc(e){this.exit(e)}function S0(e){this.enter({type:"tableCell",children:[]},e)}function OS(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,$S));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function $S(e,t){return t==="|"?t:e}function DS(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
454
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:l}};function o(p,m,g,v){return u(h(p,g,v),p.align)}function l(p,m,g,v){const y=d(p,g,v),x=u([y]);return x.slice(0,x.indexOf(`
455
+ `))}function c(p,m,g,v){const y=g.enter("tableCell"),x=g.enter("phrasing"),k=g.containerPhrasing(p,{...v,before:a,after:a});return x(),y(),k}function u(p,m){return eS(p,{align:m,alignDelimiters:r,padding:n,stringLength:s})}function h(p,m,g){const v=p.children;let y=-1;const x=[],k=m.enter("table");for(;++y<v.length;)x[y]=d(v[y],m,g);return k(),x}function d(p,m,g){const v=p.children;let y=-1;const x=[],k=m.enter("tableRow");for(;++y<v.length;)x[y]=c(v[y],p,m,g);return k(),x}function f(p,m,g){let v=gx.inlineCode(p,m,g);return g.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function BS(){return{exit:{taskListCheckValueChecked:N0,taskListCheckValueUnchecked:N0,paragraph:qS}}}function US(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HS}}}function N0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qS(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,o;for(;++a<s.length;){const l=s[a];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function HS(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let c=gx.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(h){return h+o}}function WS(){return[b9(),q9(),K9(),IS(),BS()]}function VS(e){return{extensions:[j9(),H9(e),Q9(),DS(e),US()]}}const KS={tokenize:JS,partial:!0},yx={tokenize:eN,partial:!0},xx={tokenize:tN,partial:!0},vx={tokenize:nN,partial:!0},QS={tokenize:rN,partial:!0},kx={name:"wwwAutolink",tokenize:YS,previous:bx},wx={name:"protocolAutolink",tokenize:XS,previous:jx},_n={name:"emailAutolink",tokenize:ZS,previous:Sx},dn={};function GS(){return{text:dn}}let yr=48;for(;yr<123;)dn[yr]=_n,yr++,yr===58?yr=65:yr===91&&(yr=97);dn[43]=_n;dn[45]=_n;dn[46]=_n;dn[95]=_n;dn[72]=[_n,wx];dn[104]=[_n,wx];dn[87]=[_n,kx];dn[119]=[_n,kx];function ZS(e,t,n){const r=this;let s,a;return o;function o(d){return!Pd(d)||!Sx.call(r,r.previous)||xp(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(d))}function l(d){return Pd(d)?(e.consume(d),l):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(QS,h,u)(d):d===45||d===95||Qe(d)?(a=!0,e.consume(d),c):h(d)}function u(d){return e.consume(d),s=!0,c}function h(d){return a&&s&&et(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function YS(e,t,n){const r=this;return s;function s(o){return o!==87&&o!==119||!bx.call(r,r.previous)||xp(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(KS,e.attempt(yx,e.attempt(xx,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function XS(e,t,n){const r=this;let s="",a=!1;return o;function o(d){return(d===72||d===104)&&jx.call(r,r.previous)&&!xp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),l):n(d)}function l(d){if(et(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),l;if(d===58){const f=s.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),a?u:(a=!0,c)):n(d)}function u(d){return d===null||ul(d)||he(d)||Br(d)||Hl(d)?n(d):e.attempt(yx,e.attempt(xx,h),n)(d)}function h(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function JS(e,t,n){let r=0;return s;function s(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),s):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function eN(e,t,n){let r,s,a;return o;function o(u){return u===46||u===95?e.check(vx,c,l)(u):u===null||he(u)||Br(u)||u!==45&&Hl(u)?c(u):(a=!0,e.consume(u),o)}function l(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),o}function c(u){return s||r||!a?n(u):t(u)}}function tN(e,t){let n=0,r=0;return s;function s(o){return o===40?(n++,e.consume(o),s):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vx,t,a)(o):o===null||he(o)||Br(o)?t(o):(e.consume(o),s)}function a(o){return o===41&&r++,e.consume(o),s}}function nN(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),s):l===60||l===null||he(l)||Br(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||he(l)||Br(l)?t(l):r(l)}function a(l){return et(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):et(l)?(e.consume(l),o):n(l)}}function rN(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return Qe(a)?n(a):t(a)}}function bx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||he(e)}function jx(e){return!et(e)}function Sx(e){return!(e===47||Pd(e))}function Pd(e){return e===43||e===45||e===46||e===95||Qe(e)}function xp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sN={tokenize:hN,partial:!0};function iN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cN,continuation:{tokenize:uN},exit:dN}},text:{91:{name:"gfmFootnoteCall",tokenize:lN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:aN,resolveTo:oN}}}}function aN(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const u=Yt(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function oN(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function lN(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(a>999||d===93&&!o||d===null||d===91||he(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return s.includes(Yt(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return he(d)||(o=!0),a++,e.consume(d),d===92?h:u}function h(d){return d===91||d===92||d===93?(e.consume(d),a++,u):u(d)}}function cN(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(m)}function h(m){if(o>999||m===93&&!l||m===null||m===91||he(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return a=Yt(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return he(m)||(l=!0),o++,e.consume(m),m===92?d:h}function d(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),s.includes(a)||s.push(a),oe(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function uN(e,t,n){return e.check(va,t,e.attempt(sN,t,n))}function dN(e){e.exit("gfmFootnoteDefinition")}function hN(e,t,n){const r=this;return oe(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function pN(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},d={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},f=[["enter",h,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",d,l]],p=l.parser.constructs.insideSpan.null;p&&jt(f,f.length,0,Wl(p,o.slice(u+1,c),l)),jt(f,f.length,0,[["exit",d,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",h,l]]),jt(o,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function a(o,l,c){const u=this.previous,h=this.events;let d=0;return f;function f(m){return u===126&&h[h.length-1][1].type!=="characterEscape"?c(m):(o.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=Os(u);if(m===126)return d>1?c(m):(o.consume(m),d++,p);if(d<2&&!n)return c(m);const v=o.exit("strikethroughSequenceTemporary"),y=Os(m);return v._open=!y||y===2&&!!g,v._close=!g||g===2&&!!y,l(m)}}}class fN{constructor(){this.map=[],this.index=new Map}add(t,n,r){mN(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0,this.index.clear()}}function mN(e,t,n,r){if(n===0&&r.length===0)return;const s=e.index.get(t);if(s){s[1]+=n,s[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}function gN(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function yN(){return{flow:{null:{name:"table",tokenize:xN,resolveAll:vN}}}}function xN(e,t,n){const r=this;let s=0,a=0,o;return l;function l(C){let R=r.events.length-1;for(;R>-1;){const{type:U}=r.events[R][1];if(U==="lineEnding"||U==="linePrefix")R--;else break}const L=R>-1?r.events[R][1].type:null,$=L==="tableHead"||L==="tableRow"?b:c;return $===b&&r.parser.lazy[r.now().line]?n(C):$(C)}function c(C){return e.enter("tableHead"),e.enter("tableRow"),u(C)}function u(C){return C===124||(o=!0,a+=1),h(C)}function h(C){return C===null?n(C):K(C)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),p):n(C):se(C)?oe(e,h,"whitespace")(C):(a+=1,o&&(o=!1,s+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,h):(e.enter("data"),d(C)))}function d(C){return C===null||C===124||he(C)?(e.exit("data"),h(C)):(e.consume(C),C===92?f:d)}function f(C){return C===92||C===124?(e.consume(C),d):d(C)}function p(C){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(C):(e.enter("tableDelimiterRow"),o=!1,se(C)?oe(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):m(C))}function m(C){return C===45||C===58?v(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),g):T(C)}function g(C){return se(C)?oe(e,v,"whitespace")(C):v(C)}function v(C){return C===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),y):C===45?(a+=1,y(C)):C===null||K(C)?w(C):T(C)}function y(C){return C===45?(e.enter("tableDelimiterFiller"),x(C)):T(C)}function x(C){return C===45?(e.consume(C),x):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(C))}function k(C){return se(C)?oe(e,w,"whitespace")(C):w(C)}function w(C){return C===124?m(C):C===null||K(C)?!o||s!==a?T(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):T(C)}function T(C){return n(C)}function b(C){return e.enter("tableRow"),E(C)}function E(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),E):C===null||K(C)?(e.exit("tableRow"),t(C)):se(C)?oe(e,E,"whitespace")(C):(e.enter("data"),S(C))}function S(C){return C===null||C===124||he(C)?(e.exit("data"),E(C)):(e.consume(C),C===92?A:S)}function A(C){return C===92||C===124?(e.consume(C),S):S(C)}}function vN(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,u,h,d;const f=new fN;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(l=!1,c!==0&&(C0(f,t,c,u,h),h=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,h={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",h,t]])),s=m.type==="tableDelimiterRow"?2:h?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Xa(f,t,a,s,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Xa(f,t,a,s,void 0,d)),a=o,o=[a[1],n,0,0])):m.type==="tableHead"?(l=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,a[1]!==0?(o[0]=o[1],d=Xa(f,t,a,s,n,d)):o[1]!==0&&(d=Xa(f,t,o,s,n,d)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&C0(f,t,c,u,h),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=gN(t.events,n))}return e}function Xa(e,t,n,r,s,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},ss(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=ss(t.events,n[1]);if(a={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const u=ss(t.events,n[2]),h=ss(t.events,n[3]),d={type:l,start:Object.assign({},u),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return s!==void 0&&(a.end=Object.assign({},ss(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function C0(e,t,n,r,s){const a=[],o=ss(t.events,n);s&&(s.end=Object.assign({},o),a.push(["exit",s,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function ss(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const kN={name:"tasklistCheck",tokenize:bN};function wN(){return{text:{91:kN}}}function bN(e,t,n){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return he(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return K(c)?t(c):se(c)?e.check({tokenize:jN},t,n)(c):n(c)}}function jN(e,t,n){return oe(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function SN(e){return Iy([GS(),iN(),pN(e),yN(),wN()])}const NN={};function Nx(e){const t=this,n=e||NN,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(SN(n)),a.push(WS()),o.push(VS(n))}function Cx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Cx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ex(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Cx(e))&&(r&&(r+=" "),r+=t);return r}var CN=Object.create,Ql=Object.defineProperty,EN=Object.defineProperties,TN=Object.getOwnPropertyDescriptor,PN=Object.getOwnPropertyDescriptors,Tx=Object.getOwnPropertyNames,fl=Object.getOwnPropertySymbols,RN=Object.getPrototypeOf,vp=Object.prototype.hasOwnProperty,Px=Object.prototype.propertyIsEnumerable,E0=(e,t,n)=>t in e?Ql(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ln=(e,t)=>{for(var n in t||(t={}))vp.call(t,n)&&E0(e,n,t[n]);if(fl)for(var n of fl(t))Px.call(t,n)&&E0(e,n,t[n]);return e},Gl=(e,t)=>EN(e,PN(t)),Rx=(e,t)=>{var n={};for(var r in e)vp.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&fl)for(var r of fl(e))t.indexOf(r)<0&&Px.call(e,r)&&(n[r]=e[r]);return n},AN=(e,t)=>function(){return t||(0,e[Tx(e)[0]])((t={exports:{}}).exports,t),t.exports},LN=(e,t)=>{for(var n in t)Ql(e,n,{get:t[n],enumerable:!0})},_N=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Tx(t))!vp.call(e,s)&&s!==n&&Ql(e,s,{get:()=>t[s],enumerable:!(r=TN(t,s))||r.enumerable});return e},IN=(e,t,n)=>(n=e!=null?CN(RN(e)):{},_N(!e||!e.__esModule?Ql(n,"default",{value:e,enumerable:!0}):n,e)),zN=AN({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var r=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,a={},o={util:{encode:function m(g){return g instanceof l?new l(g.type,m(g.content),g.alias):Array.isArray(g)?g.map(m):g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(m){return Object.prototype.toString.call(m).slice(8,-1)},objId:function(m){return m.__id||Object.defineProperty(m,"__id",{value:++s}),m.__id},clone:function m(g,v){v=v||{};var y,x;switch(o.util.type(g)){case"Object":if(x=o.util.objId(g),v[x])return v[x];y={},v[x]=y;for(var k in g)g.hasOwnProperty(k)&&(y[k]=m(g[k],v));return y;case"Array":return x=o.util.objId(g),v[x]?v[x]:(y=[],v[x]=y,g.forEach(function(w,T){y[T]=m(w,v)}),y);default:return g}},getLanguage:function(m){for(;m;){var g=r.exec(m.className);if(g)return g[1].toLowerCase();m=m.parentElement}return"none"},setLanguage:function(m,g){m.className=m.className.replace(RegExp(r,"gi"),""),m.classList.add("language-"+g)},isActive:function(m,g,v){for(var y="no-"+g;m;){var x=m.classList;if(x.contains(g))return!0;if(x.contains(y))return!1;m=m.parentElement}return!!v}},languages:{plain:a,plaintext:a,text:a,txt:a,extend:function(m,g){var v=o.util.clone(o.languages[m]);for(var y in g)v[y]=g[y];return v},insertBefore:function(m,g,v,y){y=y||o.languages;var x=y[m],k={};for(var w in x)if(x.hasOwnProperty(w)){if(w==g)for(var T in v)v.hasOwnProperty(T)&&(k[T]=v[T]);v.hasOwnProperty(w)||(k[w]=x[w])}var b=y[m];return y[m]=k,o.languages.DFS(o.languages,function(E,S){S===b&&E!=m&&(this[E]=k)}),k},DFS:function m(g,v,y,x){x=x||{};var k=o.util.objId;for(var w in g)if(g.hasOwnProperty(w)){v.call(g,w,g[w],y||w);var T=g[w],b=o.util.type(T);b==="Object"&&!x[k(T)]?(x[k(T)]=!0,m(T,v,null,x)):b==="Array"&&!x[k(T)]&&(x[k(T)]=!0,m(T,v,w,x))}}},plugins:{},highlight:function(m,g,v){var y={code:m,grammar:g,language:v};if(o.hooks.run("before-tokenize",y),!y.grammar)throw new Error('The language "'+y.language+'" has no grammar.');return y.tokens=o.tokenize(y.code,y.grammar),o.hooks.run("after-tokenize",y),l.stringify(o.util.encode(y.tokens),y.language)},tokenize:function(m,g){var v=g.rest;if(v){for(var y in v)g[y]=v[y];delete g.rest}var x=new h;return d(x,x.head,m),u(m,x,g,x.head,0),p(x)},hooks:{all:{},add:function(m,g){var v=o.hooks.all;v[m]=v[m]||[],v[m].push(g)},run:function(m,g){var v=o.hooks.all[m];if(!(!v||!v.length))for(var y=0,x;x=v[y++];)x(g)}},Token:l};function l(m,g,v,y){this.type=m,this.content=g,this.alias=v,this.length=(y||"").length|0}l.stringify=function m(g,v){if(typeof g=="string")return g;if(Array.isArray(g)){var y="";return g.forEach(function(b){y+=m(b,v)}),y}var x={type:g.type,content:m(g.content,v),tag:"span",classes:["token",g.type],attributes:{},language:v},k=g.alias;k&&(Array.isArray(k)?Array.prototype.push.apply(x.classes,k):x.classes.push(k)),o.hooks.run("wrap",x);var w="";for(var T in x.attributes)w+=" "+T+'="'+(x.attributes[T]||"").replace(/"/g,"&quot;")+'"';return"<"+x.tag+' class="'+x.classes.join(" ")+'"'+w+">"+x.content+"</"+x.tag+">"};function c(m,g,v,y){m.lastIndex=g;var x=m.exec(v);if(x&&y&&x[1]){var k=x[1].length;x.index+=k,x[0]=x[0].slice(k)}return x}function u(m,g,v,y,x,k){for(var w in v)if(!(!v.hasOwnProperty(w)||!v[w])){var T=v[w];T=Array.isArray(T)?T:[T];for(var b=0;b<T.length;++b){if(k&&k.cause==w+","+b)return;var E=T[b],S=E.inside,A=!!E.lookbehind,C=!!E.greedy,R=E.alias;if(C&&!E.pattern.global){var L=E.pattern.toString().match(/[imsuy]*$/)[0];E.pattern=RegExp(E.pattern.source,L+"g")}for(var $=E.pattern||E,U=y.next,H=x;U!==g.tail&&!(k&&H>=k.reach);H+=U.value.length,U=U.next){var Z=U.value;if(g.length>m.length)return;if(!(Z instanceof l)){var Q=1,_;if(C){if(_=c($,H,m,A),!_||_.index>=m.length)break;var Y=_.index,B=_.index+_[0].length,N=H;for(N+=U.value.length;Y>=N;)U=U.next,N+=U.value.length;if(N-=U.value.length,H=N,U.value instanceof l)continue;for(var V=U;V!==g.tail&&(N<B||typeof V.value=="string");V=V.next)Q++,N+=V.value.length;Q--,Z=m.slice(H,N),_.index-=H}else if(_=c($,0,Z,A),!_)continue;var Y=_.index,P=_[0],re=Z.slice(0,Y),ce=Z.slice(Y+P.length),J=H+Z.length;k&&J>k.reach&&(k.reach=J);var ye=U.prev;re&&(ye=d(g,ye,re),H+=re.length),f(g,ye,Q);var Pe=new l(w,S?o.tokenize(P,S):P,R,P);if(U=d(g,ye,Pe),ce&&d(g,U,ce),Q>1){var Re={cause:w+","+b,reach:J};u(m,g,v,U.prev,H,Re),k&&Re.reach>k.reach&&(k.reach=Re.reach)}}}}}}function h(){var m={value:null,prev:null,next:null},g={value:null,prev:m,next:null};m.next=g,this.head=m,this.tail=g,this.length=0}function d(m,g,v){var y=g.next,x={value:v,prev:g,next:y};return g.next=x,y.prev=x,m.length++,x}function f(m,g,v){for(var y=g.next,x=0;x<v&&y!==m.tail;x++)y=y.next;g.next=y,y.prev=g,m.length-=x}function p(m){for(var g=[],v=m.head.next;v!==m.tail;)g.push(v.value),v=v.next;return g}return o}();t.exports=n,n.default=n}}),z=IN(zN());z.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]},z.languages.markup.tag.inside["attr-value"].inside.entity=z.languages.markup.entity,z.languages.markup.doctype.inside["internal-subset"].inside=z.languages.markup,z.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(z.languages.markup.tag,"addInlined",{value:function(e,r){var n={},n=(n["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:z.languages[r]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),r=(n["language-"+r]={pattern:/[\s\S]+/,inside:z.languages[r]},{});r[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},z.languages.insertBefore("markup","cdata",r)}}),Object.defineProperty(z.languages.markup.tag,"addAttribute",{value:function(e,t){z.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:z.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),z.languages.html=z.languages.markup,z.languages.mathml=z.languages.markup,z.languages.svg=z.languages.markup,z.languages.xml=z.languages.extend("markup",{}),z.languages.ssml=z.languages.xml,z.languages.atom=z.languages.xml,z.languages.rss=z.languages.xml,function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?: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]|.)/,r="(?:[^\\\\-]|"+n.source+")",r=RegExp(r+"-"+r),s={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:r,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"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":s}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":s}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(z),z.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:/[{}[\];(),.:]/},z.languages.javascript=z.languages.extend("clike",{"class-name":[z.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}|\?\?=?|\?\.?|[~:]/}),z.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,z.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:z.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:z.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:z.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:z.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:z.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),z.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:z.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"}}),z.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),z.languages.markup&&(z.languages.markup.tag.addInlined("script","javascript"),z.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")),z.languages.js=z.languages.javascript,z.languages.actionscript=z.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),z.languages.actionscript["class-name"].alias="function",delete z.languages.actionscript.parameter,delete z.languages.actionscript["literal-property"],z.languages.markup&&z.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:z.languages.markup}}),function(e){var t=/#(?!\{).+/,n={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:n}}],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:n}}}),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:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(z),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(n,r){(n=typeof n=="string"?[n]:n).forEach(function(s){var a=function(d){d.inside||(d.inside={}),d.inside.rest=r},o="doc-comment";if(l=e.languages[s]){var l,c=l[o];if((c=c||(l=e.languages.insertBefore(s,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[o])instanceof RegExp&&(c=l[o]={pattern:c}),Array.isArray(c))for(var u=0,h=c.length;u<h;u++)c[u]instanceof RegExp&&(c[u]={pattern:c[u]}),a(c[u]);else a(c)}})}}),t.addSupport(["java","javascript","php"],t)}(z),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"))}(z),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}),n={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:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(z),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",s=/(?:[^\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}),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(l,c){c=(c||"").replace(/m/g,"")+"m";var u=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<value>>/g,function(){return l});return RegExp(u,c)}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 r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return r}).replace(/<<key>>/g,function(){return"(?:"+s+"|"+a+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\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:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(z),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(u){return u=u.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+u+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,o=(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("^"+s+a+"(?:"+s+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+s+a+")(?:"+s+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+s+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+s+"$"),inside:{"table-header":{pattern:RegExp(r),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:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<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:n(/!?\[(?:(?!\])<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(u){["url","bold","italic","strike","code-snippet"].forEach(function(h){u!==h&&(e.languages.markdown[u].inside.content.inside[h]=e.languages.markdown[h])})}),e.hooks.add("after-tokenize",function(u){u.language!=="markdown"&&u.language!=="md"||function h(d){if(d&&typeof d!="string")for(var f=0,p=d.length;f<p;f++){var m,g=d[f];g.type!=="code"?h(g.content):(m=g.content[1],g=g.content[3],m&&g&&m.type==="code-language"&&g.type==="code-block"&&typeof m.content=="string"&&(m=m.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),m="language-"+(m=(/[a-z][\w-]*/i.exec(m)||[""])[0].toLowerCase()),g.alias?typeof g.alias=="string"?g.alias=[g.alias,m]:g.alias.push(m):g.alias=[m]))}}(u.tokens)}),e.hooks.add("wrap",function(u){if(u.type==="code-block"){for(var h="",d=0,f=u.classes.length;d<f;d++){var p=u.classes[d],p=/language-(.+)/.exec(p);if(p){h=p[1];break}}var m,g=e.languages[h];g?u.content=e.highlight(function(v){return v=v.replace(o,""),v=v.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(y,x){var k;return(x=x.toLowerCase())[0]==="#"?(k=x[1]==="x"?parseInt(x.slice(2),16):Number(x.slice(1)),c(k)):l[x]||y})}(u.content),g,h):h&&h!=="none"&&e.plugins.autoloader&&(m="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),u.attributes.id=m,e.plugins.autoloader.loadLanguages(h,function(){var v=document.getElementById(m);v&&(v.innerHTML=e.highlight(v.textContent,e.languages[h],h))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),l={amp:"&",lt:"<",gt:">",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(z),z.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:z.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+/},z.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var t=e.tokens.filter(function(m){return typeof m!="string"&&m.type!=="comment"&&m.type!=="scalar"}),n=0;n<t.length;){var r=t[n++];if(r.type==="keyword"&&r.content==="mutation"){var s=[];if(d(["definition-mutation","punctuation"])&&h(1).content==="("){n+=2;var a=f(/^\($/,/^\)$/);if(a===-1)continue;for(;n<a;n++){var o=h(0);o.type==="variable"&&(p(o,"variable-input"),s.push(o.content))}n=a+1}if(d(["punctuation","property-query"])&&h(0).content==="{"&&(n++,p(h(0),"property-mutation"),0<s.length)){var l=f(/^\{$/,/^\}$/);if(l!==-1)for(var c=n;c<l;c++){var u=t[c];u.type==="variable"&&0<=s.indexOf(u.content)&&p(u,"variable-input")}}}}function h(m){return t[n+m]}function d(m,g){g=g||0;for(var v=0;v<m.length;v++){var y=h(v+g);if(!y||y.type!==m[v])return}return 1}function f(m,g){for(var v=1,y=n;y<t.length;y++){var x=t[y],k=x.content;if(x.type==="punctuation"&&typeof k=="string"){if(m.test(k))v++;else if(g.test(k)&&--v===0)return y}}return-1}function p(m,g){var v=m.alias;v?Array.isArray(v)||(m.alias=v=[v]):m.alias=v=[],v.push(g)}}),z.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"],n=t.pattern.source,r=t.inside.interpolation,s=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(d,f){if(e.languages[d])return{pattern:RegExp("((?:"+f+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:d}}}}function l(d,f,p){return d={code:d,grammar:f,language:p},e.hooks.run("before-tokenize",d),d.tokens=e.tokenize(d.code,d.grammar),e.hooks.run("after-tokenize",d),d.tokens}function c(d,f,p){var v=e.tokenize(d,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),m=0,g={},v=l(v.map(function(x){if(typeof x=="string")return x;for(var k,w,x=x.content;d.indexOf((w=m++,k="___"+p.toUpperCase()+"_"+w+"___"))!==-1;);return g[k]=x,k}).join(""),f,p),y=Object.keys(g);return m=0,function x(k){for(var w=0;w<k.length;w++){if(m>=y.length)return;var T,b,E,S,A,C,R,L=k[w];typeof L=="string"||typeof L.content=="string"?(T=y[m],(R=(C=typeof L=="string"?L:L.content).indexOf(T))!==-1&&(++m,b=C.substring(0,R),A=g[T],E=void 0,(S={})["interpolation-punctuation"]=s,(S=e.tokenize(A,S)).length===3&&((E=[1,1]).push.apply(E,l(S[1],e.languages.javascript,"javascript")),S.splice.apply(S,E)),E=new e.Token("interpolation",S,r.alias,A),S=C.substring(R+T.length),A=[],b&&A.push(b),A.push(E),S&&(x(C=[S]),A.push.apply(A,C)),typeof L=="string"?(k.splice.apply(k,[w,1].concat(A)),w+=A.length-1):L.content=A)):(R=L.content,Array.isArray(R)?x(R):x([R]))}}(v),new e.Token(p,v,"language-"+p,d)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function h(d){return typeof d=="string"?d:Array.isArray(d)?d.map(h).join(""):h(d.content)}e.hooks.add("after-tokenize",function(d){d.language in u&&function f(p){for(var m=0,g=p.length;m<g;m++){var v,y,x,k=p[m];typeof k!="string"&&(v=k.content,Array.isArray(v)?k.type==="template-string"?(k=v[1],v.length===3&&typeof k!="string"&&k.type==="embedded-code"&&(y=h(k),k=k.alias,k=Array.isArray(k)?k[0]:k,x=e.languages[k])&&(v[1]=c(y,x,k))):f(v):typeof v!="string"&&f([v]))}}(d.tokens)})}(z),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}(z),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\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 n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),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)}(z),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})}(z),z.languages.n4js=z.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/}),z.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),z.languages.n4jsd=z.languages.n4js,function(e){function t(o,l){return RegExp(o.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),l)}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 n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],s=e.languages.javascript[a],a=(s=e.util.type(s)==="RegExp"?e.languages.javascript[a]={pattern:s}:s).inside||{};(s.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(z),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(c,u){return c=c.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return s}),RegExp(c,u)}s=a(s).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\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:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function o(c){for(var u=[],h=0;h<c.length;h++){var d=c[h],f=!1;typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?0<u.length&&u[u.length-1].tagName===l(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content!=="/>"&&u.push({tagName:l(d.content[0].content[1]),openedBraces:0}):0<u.length&&d.type==="punctuation"&&d.content==="{"?u[u.length-1].openedBraces++:0<u.length&&0<u[u.length-1].openedBraces&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:f=!0),(f||typeof d=="string")&&0<u.length&&u[u.length-1].openedBraces===0&&(f=l(d),h<c.length-1&&(typeof c[h+1]=="string"||c[h+1].type==="plain-text")&&(f+=l(c[h+1]),c.splice(h+1,1)),0<h&&(typeof c[h-1]=="string"||c[h-1].type==="plain-text")&&(f=l(c[h-1])+f,c.splice(h-1,1),h--),c[h]=new e.Token("plain-text",f,null,f)),d.content&&typeof d.content!="string"&&o(d.content)}}var l=function(c){return c?typeof c=="string"?c:typeof c.content=="string"?c.content:c.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(c){c.language!=="jsx"&&c.language!=="tsx"||o(c.tokens)})}(z),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}(z),z.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:/[{}[\]();,.:\\]/},z.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=z.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}(z),z.languages.c=z.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|[?:~]|[-+*/%&|^!=<>]=?/}),z.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),z.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},z.languages.c.string],char:z.languages.c.char,comment:z.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:z.languages.c}}}}),z.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 z.languages.c.boolean,z.languages.objectivec=z.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 z.languages.objectivec["class-name"],z.languages.objc=z.languages.objectivec,z.languages.reason=z.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/}),z.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 z.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)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}(z),z.languages.go=z.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/}),z.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete z.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/,n=/\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 n})+")"),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"])}(z),z.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:/[{}[\];(),.:]/},z.languages.python["string-interpolation"].inside.interpolation.inside.rest=z.languages.python,z.languages.py=z.languages.python,z.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"}},z.languages.webmanifest=z.languages.json;var sa={};LN(sa,{dracula:()=>MN,duotoneDark:()=>$N,duotoneLight:()=>BN,github:()=>qN,gruvboxMaterialDark:()=>xC,gruvboxMaterialLight:()=>kC,jettwaveDark:()=>uC,jettwaveLight:()=>hC,nightOwl:()=>WN,nightOwlLight:()=>KN,oceanicNext:()=>GN,okaidia:()=>YN,oneDark:()=>fC,oneLight:()=>gC,palenight:()=>JN,shadesOfPurple:()=>tC,synthwave84:()=>rC,ultramin:()=>iC,vsDark:()=>Ax,vsLight:()=>lC});var FN={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)"}}]},MN=FN,ON={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"}}]},$N=ON,DN={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"}}]},BN=DN,UN={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"}}]},qN=UN,HN={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)"}}]},WN=HN,VN={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)"}}]},KN=VN,gt={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},QN={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:gt.keyword}},{types:["attr-value"],style:{color:gt.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:gt.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:gt.primitive}},{types:["boolean"],style:{color:gt.boolean}},{types:["tag"],style:{color:gt.tag}},{types:["string"],style:{color:gt.string}},{types:["punctuation"],style:{color:gt.string}},{types:["selector","char","builtin","inserted"],style:{color:gt.char}},{types:["function"],style:{color:gt.function}},{types:["operator","entity","url","variable"],style:{color:gt.variable}},{types:["keyword"],style:{color:gt.keyword}},{types:["atrule","class-name"],style:{color:gt.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},GN=QN,ZN={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"}}]},YN=ZN,XN={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)"}}]},JN=XN,eC={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)"}}]},tC=eC,nC={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"}}]},rC=nC,sC={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)"}}]},iC=sC,aC={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)"}}]},Ax=aC,oC={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)"}}]},lC=oC,cC={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"}}]},uC=cC,dC={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"}}]},hC=dC,pC={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%)"}}]},fC=pC,mC={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%)"}}]},gC=mC,yC={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"}}]},xC=yC,vC={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"}}]},kC=vC,wC=e=>j.useCallback(t=>{var n=t,{className:r,style:s,line:a}=n,o=Rx(n,["className","style","line"]);const l=Gl(ln({},o),{className:Ex("token-line",r)});return typeof e=="object"&&"plain"in e&&(l.style=e.plain),typeof s=="object"&&(l.style=ln(ln({},l.style||{}),s)),l},[e]),bC=e=>{const t=j.useCallback(({types:n,empty:r})=>{if(e!=null){{if(n.length===1&&n[0]==="plain")return r!=null?{display:"inline-block"}:void 0;if(n.length===1&&r!=null)return e[n[0]]}return Object.assign(r!=null?{display:"inline-block"}:{},...n.map(s=>e[s]))}},[e]);return j.useCallback(n=>{var r=n,{token:s,className:a,style:o}=r,l=Rx(r,["token","className","style"]);const c=Gl(ln({},l),{className:Ex("token",...s.types,a),children:s.content,style:t(s)});return o!=null&&(c.style=ln(ln({},c.style||{}),o)),c},[t])},jC=/\r\n|\r|\n/,T0=e=>{e.length===0?e.push({types:["plain"],content:`
456
+ `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
457
+ `,e[0].empty=!0)},P0=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},SC=e=>{const t=[[]],n=[e],r=[0],s=[e.length];let a=0,o=0,l=[];const c=[l];for(;o>-1;){for(;(a=r[o]++)<s[o];){let u,h=t[o];const f=n[o][a];if(typeof f=="string"?(h=o>0?h:["plain"],u=f):(h=P0(h,f.type),f.alias&&(h=P0(h,f.alias)),u=f.content),typeof u!="string"){o++,t.push(h),n.push(u),r.push(0),s.push(u.length);continue}const p=u.split(jC),m=p.length;l.push({types:h,content:p[0]});for(let g=1;g<m;g++)T0(l),c.push(l=[]),l.push({types:h,content:p[g]})}o--,t.pop(),n.pop(),r.pop(),s.pop()}return T0(l),c},R0=SC,NC=({prism:e,code:t,grammar:n,language:r})=>j.useMemo(()=>{if(n==null)return R0([t]);const s={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",s),s.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",s),R0(s.tokens)},[t,n,r,e]),CC=(e,t)=>{const{plain:n}=e,r=e.styles.reduce((s,a)=>{const{languages:o,style:l}=a;return o&&!o.includes(t)||a.types.forEach(c=>{const u=ln(ln({},s[c]),l);s[c]=u}),s},{});return r.root=n,r.plain=Gl(ln({},n),{backgroundColor:void 0}),r},EC=CC,TC=({children:e,language:t,code:n,theme:r,prism:s})=>{const a=t.toLowerCase(),o=EC(r,a),l=wC(o),c=bC(o),u=s.languages[a],h=NC({prism:s,language:a,code:n,grammar:u});return e({tokens:h,className:`prism-code language-${a}`,style:o!=null?o.root:{},getLineProps:l,getTokenProps:c})},Lx=e=>j.createElement(TC,Gl(ln({},e),{prism:e.prism||z,theme:e.theme||Ax,code:e.code,language:e.language}));/*! Bundled license information:
458
+
459
+ prismjs/prism.js:
460
+ (**
461
+ * Prism: Lightweight, robust, elegant syntax highlighting
462
+ *
463
+ * @license MIT <https://opensource.org/licenses/MIT>
464
+ * @author Lea Verou <https://lea.verou.me>
465
+ * @namespace
466
+ * @public
467
+ *)
468
+ */const PC=/^\s*(?:flowchart|graph)\s*(LR|RL|TD|TB|BT)?\s*;?\s*$/i,RC=/^([A-Za-z0-9_؀-ۿ-]+)\s*(\[\[(.+?)\]\]|\(\[(.+?)\]\)|\(\((.+?)\)\)|\[(.+?)\]|\((.+?)\)|\{(.+?)\}|>(.+?)\])?/,AC=/^\s*(-->|---|-\.->|-\.-|==>|===|--\s*(.+?)\s*-->|-\.\s*(.+?)\s*\.->|==\s*(.+?)\s*==>)\s*(?:\|(.+?)\|)?\s*/;function A0(e){return e.replace(/^["']|["']$/g,"").replace(/<br\s*\/?>/gi," ").trim()}function LC(e){const t=e.split(`
469
+ `).map(f=>f.replace(/%%.*$/,"").trim()).filter(Boolean),n=t.shift()?.match(PC);if(!n)return null;const r=(n[1]??"TD").toUpperCase(),s=new Map,a=[],o=f=>{const p=f.match(RC);if(!p)return null;const m=p[1],g=p[3]??p[4]??p[5]??p[6]??p[7]??p[8]??p[9],v=p[8]?"decision":p[6]||p[3]?"box":g?"round":"box",y=s.get(m);return(!y||g)&&s.set(m,{id:m,text:A0(g??y?.text??m),shape:g?v:y?.shape??v}),{id:m,rest:f.slice(p[0].length)}};for(const f of t)if(!/^(classDef|class|style|linkStyle|click|subgraph|end|direction)\b/.test(f))for(const p of f.split(";").map(m=>m.trim()).filter(Boolean)){let m=o(p);if(!m)continue;let g=m.rest;for(;;){const v=g.match(AC);if(!v)break;const y=o(g.slice(v[0].length));if(!y)break;const x=A0(v[5]??v[2]??v[3]??v[4]??"");a.push({from:m.id,to:y.id,...x?{label:x}:{},...v[1].includes(".")?{dashed:!0}:{}}),m=y,g=y.rest}}if(!s.size)return null;const l=new Map([...s.keys()].map(f=>[f,0]));for(let f=0;f<s.size;f+=1){let p=!1;for(const m of a){if(m.from===m.to)continue;const g=(l.get(m.from)??0)+1;g>(l.get(m.to)??0)&&g<s.size&&(l.set(m.to,g),p=!0)}if(!p)break}const c=new Map,u=[...s.values()].map(f=>{const p=l.get(f.id)??0,m=c.get(p)??0;return c.set(p,m+1),{...f,rank:p,slot:m}}),h=r==="RL"||r==="BT",d=Math.max(...u.map(f=>f.rank));return{across:r==="LR"||r==="RL",nodes:h?u.map(f=>({...f,rank:d-f.rank})):u,edges:a}}function Qs({pictures:e,start:t,onClose:n}){const[r,s]=j.useState(t),a=e.length,o=j.useCallback(c=>s(u=>(u+c+a)%a),[a]);j.useEffect(()=>{const c=u=>{u.key==="Escape"?n():u.key==="ArrowRight"?o(1):u.key==="ArrowLeft"&&o(-1)};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[n,o]);const l=e[r];return l?i.jsxs("div",{className:"lightbox",role:"dialog","aria-modal":"true","aria-label":l.caption,onMouseDown:c=>c.target===c.currentTarget&&n(),children:[i.jsxs("div",{className:"lb-top",children:[i.jsx("span",{className:"lb-cap",children:l.caption}),a>1&&i.jsxs("span",{className:"lb-count",children:[r+1," of ",a]}),i.jsx("span",{className:"grow"}),i.jsx("a",{className:"iconbtn",href:l.src,target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",title:"Open in a new tab",children:i.jsx(ir,{size:15})}),i.jsx("button",{className:"iconbtn",onClick:n,"aria-label":"Close",children:i.jsx($t,{size:16})})]}),i.jsx("img",{className:"lb-img",src:l.src,alt:l.caption,onMouseDown:c=>c.stopPropagation()}),a>1&&i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"lb-nav prev",onClick:()=>o(-1),"aria-label":"Previous picture",children:i.jsx(ey,{size:22})}),i.jsx("button",{className:"lb-nav next",onClick:()=>o(1),"aria-label":"Next picture",children:i.jsx(Bh,{size:22})})]})]}):null}function kp({src:e,alt:t,className:n}){const[r,s]=j.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"zoom",onClick:()=>s(!0),"aria-label":`Open ${t} full size`,children:i.jsx("img",{className:n,src:e,alt:t,loading:"lazy"})}),r&&i.jsx(Qs,{pictures:[{src:e,caption:t}],start:0,onClose:()=>s(!1)})]})}function wp({text:e,ticket:t,stream:n,caret:r}){const[s,a]=j.useState(null),o=j.useMemo(()=>[[L8,{stream:n,caret:r}]],[n,r]);return i.jsxs("div",{className:"cmd",children:[i.jsx(tx,{remarkPlugins:[Nx],rehypePlugins:o,components:{a:({href:l,children:c})=>i.jsx("a",{href:l,target:"_blank",rel:"noreferrer",children:c}),img:({src:l,alt:c})=>{const u=l?/^(https?:|data:)/.test(l)?l:wt(t,l):"";return i.jsx("button",{className:"cimg",onClick:()=>a(u),"aria-label":`Open ${c||"the picture"} big`,children:i.jsx("img",{src:u,alt:c??"",loading:"lazy"})})},table:({node:l,children:c})=>i.jsx("div",{className:"ctable",children:i.jsx("table",{dir:l?.properties?.dir??void 0,children:c})}),pre:({node:l})=>i.jsx(_C,{node:l})},children:e}),s&&i.jsx(Qs,{pictures:[{src:s,caption:"Picture"}],start:0,onClose:()=>a(null)})]})}function _x(e){return e.type==="text"?e.value??"":(e.children??[]).map(_x).join("")}function _C({node:e}){const t=e.children?.find(a=>a.tagName==="code"),r=(t?.properties?.className??[]).find(a=>a.startsWith("language-"))?.slice(9)??"",s=_x(t??e).replace(/\n$/,"");if(r==="mermaid"){const a=LC(s);if(a)return i.jsx(zC,{chart:a})}return i.jsx(IC,{lang:r==="mermaid"?"Diagram (Mermaid)":r,code:s})}function IC({lang:e,code:t}){const{theme:n,toast:r}=ze(),s=()=>void navigator.clipboard?.writeText(t).then(()=>r("Code copied"),()=>r("Could not copy. Select the text instead.","err"));return i.jsxs("div",{className:"ccode",dir:"ltr",children:[i.jsxs("div",{className:"ccode-h",children:[i.jsx("span",{children:e||"text"}),i.jsxs("button",{className:"cact",onClick:s,"aria-label":"Copy the code",children:[i.jsx(fa,{size:13})," Copy"]})]}),i.jsx(Lx,{code:t,language:e||"text",theme:n==="dark"?sa.vsDark:sa.github,children:({tokens:a,getLineProps:o,getTokenProps:l})=>i.jsx("pre",{children:a.map((c,u)=>i.jsx("div",{...o({line:c}),children:c.map((h,d)=>i.jsx("span",{...l({token:h})},d))},u))})})]})}function zC({chart:e}){const t=j.useRef(null),[n,r]=j.useState([]),s=j.useMemo(()=>{const o=[];for(const l of e.nodes)(o[l.rank]??=[]).push(l);return o.map(l=>(l??[]).sort((c,u)=>c.slot-u.slot))},[e]),a=j.useMemo(()=>new Set(e.nodes.filter(o=>!e.edges.some(l=>l.from===o.id)).map(o=>o.id)),[e]);return j.useLayoutEffect(()=>{const o=t.current;if(!o)return;const l=()=>{const u=o.getBoundingClientRect(),h=d=>o.querySelector(`[data-node="${CSS.escape(d)}"]`)?.getBoundingClientRect();r(e.edges.flatMap(d=>{const f=h(d.from),p=h(d.to);if(!f||!p)return[];const m=e.across?p.left>=f.right-1:p.top>=f.bottom-1;let g,v,y,x,k;if(e.across){g=(m?f.right:f.left)-u.left,v=f.top+f.height/2-u.top,y=(m?p.left:p.right)-u.left,x=p.top+p.height/2-u.top;const w=Math.max(24,Math.abs(y-g)/2)*(m?1:-1);k=`M${g},${v} C${g+w},${v} ${y-w},${x} ${y},${x}`}else{g=f.left+f.width/2-u.left,v=(m?f.bottom:f.top)-u.top,y=p.left+p.width/2-u.left,x=(m?p.top:p.bottom)-u.top;const w=Math.max(18,Math.abs(x-v)/2)*(m?1:-1);k=`M${g},${v} C${g},${v+w} ${y},${x-w} ${y},${x}`}return[{d:k,x:(g+y)/2,y:(v+x)/2,...d.label?{label:d.label}:{},...d.dashed?{dashed:!0}:{}}]}))};l();const c=new ResizeObserver(l);return c.observe(o),()=>c.disconnect()},[e]),i.jsx("div",{className:"cdiagram",dir:"ltr",children:i.jsxs("div",{ref:t,className:`cflow ${e.across?"across":"down"}`,children:[i.jsxs("svg",{className:"cflow-lines","aria-hidden":"true",children:[i.jsx("defs",{children:i.jsx("marker",{id:"cflow-arrow",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:i.jsx("path",{d:"M0,0 L10,5 L0,10 z"})})}),n.map((o,l)=>i.jsx("path",{d:o.d,className:o.dashed?"dash":"",markerEnd:"url(#cflow-arrow)"},l))]}),s.map((o,l)=>i.jsx("div",{className:"cflow-rank",children:o.map(c=>i.jsx("span",{"data-node":c.id,className:`cnode ${c.shape} ${a.has(c.id)&&c.shape!=="decision"?"end":""}`,children:i.jsx("bdi",{children:c.text})},c.id))},l)),n.map((o,l)=>o.label?i.jsx("span",{className:"cflow-label",style:{left:o.x,top:o.y},children:o.label},l):null)]})})}function FC({lines:e,children:t}){const[n,r]=j.useState(!1);return e<=26?i.jsx(i.Fragment,{children:t}):i.jsxs("div",{className:`cfold ${n?"open":""}`,children:[i.jsx("div",{className:"cfold-body",children:t}),i.jsx("button",{className:"btn sm",onClick:()=>r(!n),children:n?"Show less":`Show all · ${e} lines`})]})}function MC(e){return e.split(`
470
+ `).reduce((t,n)=>t+(n.trim()?Math.ceil(n.length/80):0),0)}const L0=/\.(png|jpe?g|gif|webp)$/i,_0=/\.html?$/i;function OC({ticket:e,files:t}){const n=t.filter(a=>L0.test(a)),r=t.filter(a=>_0.test(a)),s=t.filter(a=>!L0.test(a)&&!_0.test(a));return i.jsxs("div",{className:"attached",children:[r.map(a=>i.jsx(bp,{ticket:e,file:a},a)),n.length>0&&i.jsx("div",{className:"attpics",children:n.map(a=>i.jsx(kp,{src:wt(e,a),alt:I0(a)},a))}),s.map(a=>i.jsxs("a",{className:"btn sm",href:wt(e,a),download:!0,children:[i.jsx(Tn,{size:13})," ",I0(a)]},a))]})}function bp({ticket:e,file:t,title:n="Mockup"}){const[r,s]=j.useState(!1),a=ge({queryKey:["mockup-link",e,t],queryFn:()=>be(`/api/v1/tickets/${encodeURIComponent(e)}/mockup-link?path=${encodeURIComponent(t)}`),staleTime:1/0});if(a.isError)return i.jsx("p",{className:"note",children:"The mockup could not be read."});const o=l=>i.jsx("iframe",{className:l,title:n,sandbox:"allow-scripts",src:a.data?.url??"about:blank"});return i.jsxs("div",{className:"mockup",children:[i.jsxs("div",{className:"mockbar",children:[i.jsxs("span",{children:[n," · click around, it is only a picture of the idea"]}),i.jsxs("button",{className:"btn sm",onClick:()=>s(!0),children:[i.jsx(Uh,{size:12})," Full size"]})]}),o("mockframe"),r&&i.jsx(pt,{title:n,wide:!0,onClose:()=>s(!1),children:o("mockframe big")})]})}function I0(e){return e.split(/[\\/]/).pop()??e}const Rd=/\.(png|jpe?g|gif|webp|bmp)$/i,z0=/\.(mp4|webm|mov|m4v)$/i,Ad=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba)$/i,Ix=/\.(md|markdown)$/i,zx=/\.pdf$/i,Fx=/\.html?$/i;function yn(e){return e.split(/[\\/]/).pop()??e}function Mx(e){return Ix.test(e)?{cls:"md",label:"MD"}:zx.test(e)?{cls:"pdf",label:"PDF"}:Fx.test(e)?{cls:"html",label:"HTML"}:Rd.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 jp({ticket:e,files:t,from:n,onOpen:r,sent:s}){const[a,o]=j.useState(null),[l,c]=j.useState(null),u=t.filter(p=>Rd.test(p)),h=t.filter(p=>z0.test(p)),d=t.filter(p=>Ad.test(p)),f=t.filter(p=>!Rd.test(p)&&!z0.test(p)&&!Ad.test(p)&&!/\.transcript\.txt$/.test(p));return i.jsxs("div",{className:"cfiles",children:[u.length>0&&i.jsx("div",{className:"cshots",children:u.map((p,m)=>i.jsxs("button",{className:"cshot",onClick:()=>o(m),"aria-label":`Open ${yn(p)} big`,children:[i.jsx("img",{src:wt(e,p),alt:yn(p),loading:"lazy"}),s&&i.jsx("span",{className:"cshot-ok",title:"Sent",children:i.jsx(te,{size:11,strokeWidth:3})})]},p))}),h.map(p=>i.jsxs("div",{className:"cvideo",children:[i.jsx("video",{src:wt(e,p),controls:!0,preload:"metadata"}),i.jsx(Ox,{ticket:e,file:p})]},p)),d.map(p=>i.jsx(DC,{ticket:e,file:p},p)),f.map(p=>{const m=Mx(p),g=Ix.test(p),v=zx.test(p),y=Fx.test(p),x=g?"Markdown · opens beside the chat":v?"PDF · opens beside the chat":y?"Mockup · runs here, sealed off":"File · downloads",k=i.jsxs(i.Fragment,{children:[i.jsx("span",{className:`cfic ${m.cls}`,children:m.label}),i.jsxs("span",{className:"cfile-t",children:[i.jsx("span",{className:"cfname",children:yn(p)}),i.jsx("span",{className:"cfmeta",children:x})]}),i.jsx("span",{className:"cfopen",children:g||v||y?"Open":i.jsx(Tn,{size:14})})]});return g||v?i.jsx("button",{className:"cfile",onClick:()=>r?.({ticket:e,file:p,kind:g?"md":"pdf",...n?{from:n}:{}}),children:k},p):y?i.jsx("button",{className:"cfile",onClick:()=>c(p),children:k},p):i.jsx("a",{className:"cfile",href:wt(e,p),download:!0,children:k},p)}),a!==null&&i.jsx(Qs,{pictures:u.map(p=>({src:wt(e,p),caption:yn(p)})),start:a,onClose:()=>o(null)}),l&&i.jsx(pt,{title:yn(l),wide:!0,onClose:()=>c(null),children:i.jsx(bp,{ticket:e,file:l,title:yn(l)})})]})}function $C(e,t){return ge({queryKey:["transcript",e,t],queryFn:async()=>{const n=await fetch(wt(e,`${t}.transcript.txt`));return n.ok&&(await n.text()).replace(/^Transcript of [^\n]*\n+/,"").trim()||null},staleTime:3e4,refetchInterval:n=>n.state.data?!1:1e4})}function Ox({ticket:e,file:t,open:n=!0}){const r=$C(e,t).data,[s,a]=j.useState(n);return r?i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"ctlink",onClick:()=>a(!s),children:s?"Hide the written text":"Show the written text"}),s&&i.jsx("div",{className:"ctrans",children:r.split(/\n+/).map((o,l)=>{const c=un(o);return i.jsx("p",{dir:c.dir,lang:c.dir==="rtl"?"ar":"en",className:Ln(c),children:o},l)})})]}):null}function DC({ticket:e,file:t}){const n=j.useRef(null),[r,s]=j.useState(!1),[a,o]=j.useState({at:0,length:0}),l=j.useMemo(()=>{let d=7;for(const f of t)d=(d*31+f.charCodeAt(0))%9973;return Array.from({length:34},(f,p)=>6+d*(p+3)*7%19)},[t]);j.useEffect(()=>{const d=n.current;if(!d)return;const f=()=>o({at:d.currentTime,length:Number.isFinite(d.duration)?d.duration:0}),p=()=>s(!1);return d.addEventListener("timeupdate",f),d.addEventListener("loadedmetadata",f),d.addEventListener("ended",p),()=>{d.removeEventListener("timeupdate",f),d.removeEventListener("loadedmetadata",f),d.removeEventListener("ended",p)}},[]);const c=()=>{const d=n.current;d&&(r?d.pause():d.play().catch(()=>s(!1)),s(!r))},u=r||a.at>0?a.at:a.length,h=a.length?Math.min(1,a.at/a.length):0;return i.jsxs("div",{className:"cvoice-w",children:[i.jsxs("div",{className:"cvoice",children:[i.jsx("button",{className:"cplay",onClick:c,"aria-label":r?"Pause the voice note":"Play the voice note",children:r?i.jsx(ry,{size:15,fill:"currentColor"}):i.jsx(qh,{size:15,fill:"currentColor"})}),i.jsx("div",{className:"cwave","aria-hidden":"true",children:l.map((d,f)=>i.jsx("i",{style:{height:d},className:f/l.length<h?"on":""},f))}),i.jsx("span",{className:"cvt",children:BC(u)}),i.jsx("audio",{ref:n,src:wt(e,t),preload:"metadata"})]}),i.jsx(Ox,{ticket:e,file:t})]})}function BC(e){const t=Math.max(0,Math.round(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function Sp({doc:e,onClose:t}){const{toast:n}=ze(),r=wt(e.ticket,e.file),s=ge({queryKey:["doc",e.ticket,e.file],queryFn:async()=>{const l=await fetch(r);if(!l.ok)throw new Error("The file could not be read.");return l.text()},enabled:e.kind==="md"}),a=Mx(e.file),o=()=>void navigator.clipboard?.writeText(s.data??"").then(()=>n("Document copied"));return i.jsxs("section",{className:"cdoc","aria-label":yn(e.file),children:[i.jsxs("div",{className:"cdoc-h",children:[i.jsx("span",{className:`cfic sm ${a.cls}`,children:a.label}),i.jsxs("div",{className:"grow",children:[i.jsx("div",{className:"cfname",children:yn(e.file)}),i.jsx("div",{className:"cfmeta",children:e.from??(e.kind==="md"?"Markdown":"PDF")})]}),e.kind==="md"&&i.jsx("button",{className:"btn sm",onClick:o,disabled:!s.data,children:"Copy"}),e.kind==="pdf"&&i.jsx("a",{className:"btn sm",href:r,target:"_blank",rel:"noreferrer",children:"Open in a tab"}),i.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close the document",children:i.jsx($t,{size:16})})]}),e.kind==="md"?i.jsx("div",{className:"cdoc-b",children:s.isError?i.jsx("p",{className:"note",children:"The file could not be read."}):s.data?i.jsx(wp,{text:s.data,ticket:e.ticket}):i.jsx("p",{className:"note",children:"Loading…"})}):i.jsx("iframe",{className:"cdoc-pdf",src:r,title:yn(e.file)})]})}function UC(e,t,n=3){const r=e?e.split(`
471
+ `):[],s=t.split(`
472
+ `);if(r.length*s.length>25e4)return[...r.map(p=>({kind:"del",text:p})),...s.map(p=>({kind:"add",text:p}))];const a=r.length,o=s.length,l=Array.from({length:a+1},()=>new Array(o+1).fill(0));for(let p=a-1;p>=0;p--)for(let m=o-1;m>=0;m--)l[p][m]=r[p]===s[m]?l[p+1][m+1]+1:Math.max(l[p+1][m],l[p][m+1]);const c=[];let u=0,h=0;for(;u<a&&h<o;)r[u]===s[h]?(c.push({kind:"same",text:r[u]}),u++,h++):l[u+1][h]>=l[u][h+1]?c.push({kind:"del",text:r[u++]}):c.push({kind:"add",text:s[h++]});for(;u<a;)c.push({kind:"del",text:r[u++]});for(;h<o;)c.push({kind:"add",text:s[h++]});const d=c.map((p,m)=>p.kind!=="same"||c.slice(Math.max(0,m-n),m+n+1).some(g=>g.kind!=="same")),f=[];return c.forEach((p,m)=>{d[m]?f.push(p):f.at(-1)?.kind!=="gap"&&f.push({kind:"gap",text:""})}),f}function Np(e){return!e.takenOver&&["implement","test","review"].includes(e.stage)}function Cp({t:e}){const t=X();return i.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:[i.jsx(pa,{size:12})," Take over"]})}function qC({t:e}){const n=ge({queryKey:["conversations",e.id],queryFn:()=>be(`/api/v1/tickets/${e.id}/conversations`),refetchInterval:3e3}).data??[],[r,s]=j.useState(null),a=r??n.filter(d=>d.started).at(-1)?.key??null,o=ge({queryKey:["conversation",e.id,a],queryFn:()=>be(`/api/v1/tickets/${e.id}/conversations/${a}`),enabled:!!a,refetchInterval:e.live?2e3:1e4}),l=j.useMemo(()=>$x(o.data?.updates??[]),[o.data]),[c,u]=j.useState(!0),h=j.useRef(null);return j.useEffect(()=>{c&&h.current?.scrollIntoView({block:"end"})},[l.length,c,a]),n.length?i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"pills",style:{marginBottom:6},children:[n.map(d=>i.jsx("button",{className:`btn sm ${d.key===a?"pri":""}`,disabled:!d.started,onClick:()=>s(d.key),children:d.label},d.key)),i.jsx("span",{className:"grow"}),i.jsxs("label",{className:"note",style:{display:"inline-flex",alignItems:"center",gap:6,fontSize:12.5},children:[i.jsx("input",{type:"checkbox",checked:c,onChange:d=>u(d.target.checked)})," Follow live"]})]}),i.jsxs("p",{className:"note",style:{fontSize:12.5,margin:"0 0 14px"},children:["A real Claude Code session on your subscription, read only, shown in the Agent Client Protocol format."," ",o.data&&o.data.total>(o.data.updates.length??0)?`Showing the latest ${o.data.updates.length} of ${o.data.total} updates.`:""]}),i.jsxs("div",{className:"conv",children:[l.map((d,f)=>i.jsx(WC,{it:d,ticket:e.id,cwd:o.data?.cwd},d.kind==="tool"?d.id:f)),i.jsx("div",{ref:h})]}),a&&i.jsxs("div",{className:"convactions",children:[i.jsx(HC,{t:e,to:F0[a]??"builder"}),!e.chat?.open&&!e.takenOver&&i.jsx(ba,{t:e,agent:F0[a]??"builder"})]}),o.data?.command&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Open it in Claude Code"}),i.jsx(ne,{text:o.data.command}),i.jsx("p",{className:"note",style:{fontSize:12.5,marginTop:6},children:a==="build"&&Np(e)?i.jsxs(i.Fragment,{children:["To work in it yourself, press ",i.jsx("b",{children:"Take over"})," first, so you and the squad never edit at the same time."," ",i.jsx(Cp,{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."})]})]}):i.jsx("div",{className:"db",children:i.jsx("p",{className:"note",children:"No conversation yet. It starts when the Analyst reads the ticket."})})}const F0={intake:"analyst",build:"builder",review:"reviewer",tester:"tester"},M0={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"};function HC({t:e,to:t}){const n=X(),[r,s]=j.useState("");if(e.stage==="done")return null;const a=()=>n.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:r,to:t},done:`Sent. The ${M0[t]} reads it at its next step.`},{onSuccess:()=>s("")});return i.jsxs("div",{className:"msgagent",children:[i.jsx("input",{className:"input",value:r,onChange:o=>s(o.target.value),placeholder:`Message the ${M0[t]}…`,onKeyDown:o=>o.key==="Enter"&&r.trim()&&a()}),i.jsxs("button",{className:"btn sm pri",disabled:!r.trim()||n.isPending,onClick:a,children:[i.jsx(Dl,{size:13})," Send"]})]})}function $x(e){const t=[],n=new Map;for(const{at:r,update:s}of e)switch(s.sessionUpdate){case"user_message_chunk":{const a=s.content.type==="text"&&s.content._meta?.squadKit?.from==="claude-code"?"claude-code":"squad-kit";t.push({kind:"message",from:a,content:s.content,at:r});break}case"agent_message_chunk":t.push({kind:"message",from:"agent",content:s.content,at:r});break;case"agent_thought_chunk":t.push({kind:"message",from:"thought",content:s.content,at:r});break;case"plan":t.push({kind:"plan",entries:s.entries,at:r});break;case"tool_call":{const a={kind:"tool",id:s.toolCallId,title:s.title,toolKind:s.kind??"other",status:s.status??"in_progress",content:[...s.content??[]],command:s.rawInput?.command,at:r};n.set(s.toolCallId,a),t.push(a);break}case"tool_call_update":{const a=n.get(s.toolCallId);if(!a)break;s.status&&(a.status=s.status),s.title&&(a.title=s.title),s.kind&&(a.toolKind=s.kind),s.rawInput?.command&&(a.command=s.rawInput.command),s.content&&(a.content=[...s.content]);break}}return t}function WC({it:e,ticket:t,cwd:n}){if(e.kind==="plan")return i.jsx(XC,{entries:e.entries});if(e.kind==="tool")return i.jsx(QC,{it:e,ticket:t,cwd:n});const{from:r,content:s}=e;return r==="agent"?i.jsx("div",{className:"conv-text",children:i.jsx(Ep,{content:s,ticket:t})}):i.jsx(VC,{from:r,content:s,ticket:t})}function VC({from:e,content:t,ticket:n}){const r=t.type==="text"?t.text:"",s=r.length>420||r.split(`
473
+ `).length>8,[a,o]=j.useState(!s&&e!=="thought"),l=e==="squad-kit"?"squad-kit asked":e==="claude-code"?"Note from Claude Code":"Thinking";return i.jsxs("div",{className:e==="thought"?"conv-thought":"conv-prompt",children:[i.jsxs("button",{className:"conv-who linkish",onClick:()=>o(!a),children:[e==="thought"&&i.jsx(J2,{size:12})," ",l," ",!a&&i.jsx("span",{className:"note",children:"· show"})]}),a&&(e==="thought"?i.jsx("div",{style:{whiteSpace:"pre-wrap"},children:r}):i.jsx(Ep,{content:t,ticket:n}))]})}const KC={read:zk,edit:dd,delete:$t,move:dd,search:Hs,execute:ll,think:J2,fetch:Dk,switch_mode:pd,other:pd};function QC({it:e,ticket:t,cwd:n}){const r=e.content.some(u=>u.type==="content"&&(u.content.type==="image"||u.content.type==="resource_link")),s=e.content.some(u=>u.type==="diff"),[a,o]=j.useState(s||r||e.status==="failed");j.useEffect(()=>{(e.status==="failed"||r)&&o(!0)},[e.status,r]);const l=KC[e.toolKind]??pd,c=e.content.length>0||e.command;return i.jsxs("div",{className:`conv-tool ${e.status}`,children:[i.jsxs("button",{className:"conv-tool-head",onClick:()=>c&&o(!a),"aria-expanded":a,children:[i.jsx(l,{size:14}),i.jsx("span",{className:"mono conv-tool-title",children:e.title}),i.jsx("span",{className:"conv-at",children:e.at?Ms(e.at):""}),i.jsx(GC,{status:e.status})]}),a&&c&&i.jsxs("div",{className:"conv-tool-body",children:[e.command&&e.toolKind==="execute"&&i.jsxs("pre",{className:"conv-cmd",children:["$ ",e.command]}),e.content.map((u,h)=>i.jsx(ZC,{c:u,ticket:t,cwd:n},h))]})]})}function GC({status:e}){return e==="completed"?i.jsxs("span",{className:"conv-status ok",children:[i.jsx(te,{size:12})," Done"]}):e==="failed"?i.jsxs("span",{className:"conv-status bad",children:[i.jsx($t,{size:12})," Failed"]}):i.jsxs("span",{className:"conv-status run",children:[i.jsx(Rn,{size:12,className:"spin"})," Running"]})}function ZC({c:e,ticket:t,cwd:n}){if(e.type==="diff"){const r=n&&e.path.startsWith(`${n}/`)?e.path.slice(n.length+1):e.path;return i.jsx(YC,{path:r,oldText:e.oldText??"",newText:e.newText,isNew:e.oldText==null})}return e.type==="terminal"?i.jsxs("p",{className:"note",children:["Terminal ",e.terminalId]}):e.content.type==="text"?e.content.text.trimStart().startsWith("```")?i.jsx(Bx,{text:e.content.text}):i.jsx(Dx,{text:e.content.text}):i.jsx(Ep,{content:e.content,ticket:t})}function Dx({text:e}){const t=e.length>600||e.split(`
474
+ `).length>12,[n,r]=j.useState(!t);return i.jsxs("div",{className:"conv-out",children:[i.jsx("pre",{children:n?e:`${e.split(`
475
+ `).slice(0,10).join(`
476
+ `).slice(0,600)}…`}),t&&i.jsx("button",{className:"linkbtn",onClick:()=>r(!n),children:n?"Show less":"Show all output"})]})}function YC({path:e,oldText:t,newText:n,isNew:r}){const s=j.useMemo(()=>UC(t,n),[t,n]),a=s.filter(h=>h.kind==="add").length,o=s.filter(h=>h.kind==="del").length,[l,c]=j.useState(s.length<=40),u=l?s:s.slice(0,40);return i.jsxs("div",{className:"conv-diff",children:[i.jsxs("div",{className:"conv-diff-head mono",children:[i.jsx("span",{style:{overflowWrap:"anywhere"},children:e}),i.jsx("span",{className:"grow"}),r?i.jsxs("span",{className:"add",children:["new file · ",a," lines"]}):i.jsxs("span",{children:[i.jsxs("span",{className:"add",children:["+",a]})," ",i.jsxs("span",{className:"del",children:["−",o]})]})]}),i.jsx("pre",{children:u.map((h,d)=>h.kind==="gap"?i.jsx("div",{className:"gap",children:"⋯"},d):i.jsxs("div",{className:h.kind,children:[i.jsx("span",{className:"sign",children:h.kind==="add"?"+":h.kind==="del"?"−":" "}),h.text||" "]},d))}),s.length>40&&i.jsx("button",{className:"linkbtn",style:{margin:"0 10px 8px"},onClick:()=>c(!l),children:l?"Show less":`Show all ${s.length} lines`})]})}function XC({entries:e}){const t=e.filter(n=>n.status==="completed").length;return i.jsxs("div",{className:"conv-plan",children:[i.jsxs("div",{className:"conv-who",children:[i.jsx(Hk,{size:13})," Plan · ",t," of ",e.length," done"]}),e.map((n,r)=>i.jsxs("div",{className:`conv-plan-row ${n.status}`,children:[i.jsx("span",{className:"box",children:n.status==="completed"?i.jsx(te,{size:11}):n.status==="in_progress"?i.jsx(Rn,{size:11,className:"spin"}):null}),n.content]},r))]})}function Ep({content:e,ticket:t}){switch(e.type){case"text":return i.jsx(Bx,{text:e.text});case"image":return i.jsx(kp,{className:"conv-img",src:`data:${e.mimeType};base64,${e.data}`,alt:"Picture the agent looked at"});case"audio":return i.jsx("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});case"resource_link":return i.jsx(O0,{uri:e.uri,name:e.name,mime:e.mimeType??"",size:e.size??void 0,ticket:t});case"resource":return e.resource.text?i.jsx(Dx,{text:e.resource.text}):i.jsx(O0,{uri:e.resource.uri,name:e.resource.uri.split("/").pop()??"file",mime:e.resource.mimeType??"",ticket:t})}}function O0({uri:e,name:t,mime:n,size:r,ticket:s}){const a=wt(s,e);return n.startsWith("image/")&&n!=="image/svg+xml"?i.jsxs("div",{className:"conv-media",children:[i.jsx(kp,{className:"conv-img",src:a,alt:t}),i.jsx("span",{className:"note mono",children:t})]}):n.startsWith("video/")?i.jsxs("div",{className:"conv-media",children:[i.jsx("video",{className:"conv-img",src:a,controls:!0,preload:"metadata"}),i.jsx("span",{className:"note mono",children:t})]}):n.startsWith("audio/")?i.jsx("audio",{controls:!0,src:a}):i.jsxs("a",{href:a,target:"_blank",rel:"noreferrer",className:"conv-file",children:[i.jsx(Tn,{size:15}),i.jsx("span",{className:"mono",children:t}),i.jsx("span",{className:"note",children:[n.split("/").pop(),r?`${Math.max(1,Math.round(r/1024))} KB`:""].filter(Boolean).join(" · ")})]})}function Bx({text:e}){const{theme:t}=ze();return i.jsx("div",{className:"md",children:i.jsx(tx,{remarkPlugins:[Nx],components:{a:({href:n,children:r})=>i.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:r}),code:({className:n,children:r})=>{const s=/language-(\w+)/.exec(n??"")?.[1],a=String(r).replace(/\n$/,"");return!s&&!a.includes(`
477
+ `)?i.jsx("code",{className:"mono",children:r}):i.jsxs("div",{className:"md-code",children:[s&&i.jsx("span",{className:"md-lang",children:s==="mermaid"?"Diagram (Mermaid)":s}),i.jsx(Lx,{code:a,language:s??"text",theme:t==="dark"?sa.vsDark:sa.github,children:({tokens:o,getLineProps:l,getTokenProps:c})=>i.jsx("pre",{children:o.map((u,h)=>i.jsx("div",{...l({line:u}),children:u.map((d,f)=>i.jsx("span",{...c({token:d})},f))},h))})})]})}},children:e})})}const $0=10*1024*1024;function Tp(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=String(r.result);t({name:e.name,size:e.size,data:s.slice(s.indexOf(",")+1),...e.type.startsWith("image/")?{preview:s}:{}})},r.onerror=()=>n(new Error(`Could not read ${e.name}`)),r.readAsDataURL(e)})}function xr(e){return`"${e.replace(/"/g,'\\"')}"`}function JC({onClose:e,onCreated:t}){const n=X(),{toast:r}=ze(),[s,a]=j.useState("write"),[o,l]=j.useState(""),[c,u]=j.useState(!1),[h,d]=j.useState(null),[f,p]=j.useState(""),[m,g]=j.useState(""),[v,y]=j.useState("feature"),[x,k]=j.useState("normal"),[w,T]=j.useState("full"),[b,E]=j.useState(!1),[S,A]=j.useState(null),[C,R]=j.useState([]),[L,$]=j.useState([]),[U,H]=j.useState([]),[Z,Q]=j.useState(""),[_,B]=j.useState([]),[N,V]=j.useState(""),[Y,P]=j.useState(""),[re,ce]=j.useState("annoying"),J=v==="bug",[ye,Pe]=j.useState([]),Re=async F=>{const je=[...F],Rt=je.find(Bt=>Bt.size>$0);Rt&&r(`${Rt.name} is larger than 10 MB.`,"err");const $e=await Promise.all(je.filter(Bt=>Bt.size<=$0).map(Tp)).catch(Bt=>(r(Bt.message,"err"),[]));Pe(Bt=>[...Bt,...$e].slice(0,10))},st=ye.map(({name:F,data:je})=>({name:F,data:je})),Dt=async()=>{u(!0);try{const F=await cn("/api/v1/tickets/draft","POST",{text:o,files:st});p(F.title),g(F.ask),F.kind==="bug"&&Q(F.ask),y(F.kind),k(F.priority),F.track&&(T(F.track),A(F.track)),R(F.criteria),$(F.rules),H(F.edgeCases),d(F.gaps),a("write")}catch(F){r(F instanceof Error?F.message:String(F),"err")}finally{u(!1)}},hn=_.filter(F=>F.trim()),Qr=[Z.trim()&&`What happens:
478
+ ${Z.trim()}`,hn.length&&`Steps to see it:
479
+ ${hn.map((F,je)=>`${je+1}. ${F.trim()}`).join(`
480
+ `)}`,N.trim()&&`What should happen:
481
+ ${N.trim()}`,Y.trim()&&`Where: ${Y.trim()}`].filter(Boolean).join(`
482
+
483
+ `),Gr=J?{title:f,ask:Qr,kind:v,severity:re,priority:re==="stops-work"?"high":re==="small"?"low":"normal",track:w,files:st,talkFirst:b&&w==="full"}:{title:f,ask:m,kind:v,track:w,priority:x,criteria:C,rules:L,edgeCases:U,files:st,talkFirst:b&&w==="full"},Zr=()=>n.mutate({path:"/api/v1/tickets",body:Gr},{onSuccess:F=>{t(F),e()}}),fr=s==="paste"?`squad new --from ${xr(o.trim().split(`
484
+ `)[0]?.slice(0,40)||"your message")}`:[`squad new ${xr(f.trim()||"Your title")}`,J?`--bug --severity ${re}`:"",J&&Z.trim()?`--ask ${xr(Z.trim())}`:"",w==="express"?"--express":"",b&&w==="full"?"--talk":"",...J?[]:C.filter(F=>F.trim()).map(F=>`--criteria ${xr(F)}`),...J?[]:L.filter(F=>F.trim()).map(F=>`--rule ${xr(F)}`),...J?[]:U.filter(F=>F.trim()).map(F=>`--edge ${xr(F)}`),...ye.map(F=>`--attach ${xr(F.name)}`)].filter(Boolean).join(" ");return i.jsxs(pt,{title:"New ticket",wide:!0,onClose:e,icon:i.jsx("span",{className:"glyph",children:i.jsx(Zt,{size:15})}),footer:i.jsxs(i.Fragment,{children:[s==="paste"?i.jsxs("button",{className:"btn pri",disabled:!o.trim()&&!ye.length||c,onClick:()=>void Dt(),children:[c?i.jsx(Rn,{size:15,className:"spin"}):i.jsx(zc,{size:15})," ",c?"The Analyst is reading it…":"Fill in the ticket"]}):i.jsxs("button",{className:"btn pri",disabled:!f.trim()||n.isPending,onClick:Zr,children:[i.jsx(Zt,{size:15})," Create ticket"]}),i.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:fr})]}),children:[i.jsxs("div",{className:"seg",style:{marginBottom:14,width:"fit-content"},children:[i.jsx("button",{className:s==="write"?"on":"",onClick:()=>a("write"),children:"Write it"}),i.jsxs("button",{className:s==="paste"?"on":"",onClick:()=>a("paste"),children:[i.jsx(zc,{size:13,style:{verticalAlign:"-2px",marginRight:5}}),"From an idea or message"]})]}),s==="paste"?i.jsxs(i.Fragment,{children:[i.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."}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-paste",children:"The idea or message"}),i.jsx("textarea",{id:"nt-paste",className:"textarea",style:{minHeight:150},autoFocus:!0,value:o,onChange:F=>l(F.target.value),onPaste:F=>{F.clipboardData.files.length&&(F.preventDefault(),Re(F.clipboardData.files))},placeholder:"For example: the manager says clerks should not book more than 3 appointments a day for the same person"})]}),i.jsx(Jc,{files:ye,onAdd:Re,onRemove:F=>Pe(je=>je.filter((Rt,$e)=>$e!==F))})]}):i.jsxs(i.Fragment,{children:[h?i.jsxs("div",{className:"drafted",children:[i.jsxs("b",{children:[i.jsx(zc,{size:13})," The Analyst filled this in from your message."]})," Check it and change anything.",h.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{style:{marginTop:6},children:"Still unclear, so the Analyst will ask you after you create it:"}),i.jsx("ul",{children:h.map((F,je)=>i.jsx("li",{children:F},je))})]})]}):i.jsx("p",{children:J?"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."}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Kind"}),i.jsx("div",{className:"sevs",children:["feature","bug"].map(F=>i.jsxs("button",{className:`choice ${v===F?"on":""}`,onClick:()=>y(F),children:[i.jsx("span",{className:"rd"}),F==="feature"?"New feature":"Bug"]},F))})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-title",children:"Title"}),i.jsx("input",{id:"nt-title",className:"input",autoFocus:!0,value:f,onChange:F=>p(F.target.value),placeholder:J?"For example: A price written as 1,500 is refused":"For example: Show hearing time in local time"})]}),J?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-what",children:"What happens"}),i.jsx("textarea",{id:"nt-what",className:"textarea",value:Z,onChange:F=>Q(F.target.value),placeholder:"For example: the form says the price is not valid."})]}),i.jsx(Ja,{label:"Steps to see it",hint:"One step per line, for example: Open Services and add a service.",items:_,onChange:B,add:"Add a step"}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-expected",children:"What should happen"}),i.jsx("textarea",{id:"nt-expected",className:"textarea",value:N,onChange:F=>V(F.target.value),placeholder:"For example: the price is saved as 1,500 SAR."})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-where",children:"Where"}),i.jsx("input",{id:"nt-where",className:"input",value:Y,onChange:F=>P(F.target.value),placeholder:"The page or link, for example: Setup, Services"})]}),i.jsx(Jc,{files:ye,onAdd:Re,onRemove:F=>Pe(je=>je.filter((Rt,$e)=>$e!==F))}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"How bad is it?"}),i.jsx("div",{className:"sevs",children:Ux.map(F=>i.jsxs("button",{className:`choice ${re===F.value?"on":""}`,onClick:()=>ce(F.value),children:[i.jsx("span",{className:"rd"}),F.label]},F.value))})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"nt-ask",children:"What do you want?"}),i.jsx("textarea",{id:"nt-ask",className:"textarea",value:m,onChange:F=>g(F.target.value),placeholder:"Who needs it, and why. One or two sentences is enough."})]}),i.jsx(Ja,{label:"Acceptance criteria",hint:"Each one is something you can check, for example: The clerk sees the time in their own city.",items:C,onChange:R,add:"Add a criterion"}),i.jsx(Ja,{label:"Business rules",hint:"Limits and who may do what, for example: Only a team lead can reassign a case.",items:L,onChange:$,add:"Add a rule"}),i.jsx(Ja,{label:"Edge cases",hint:"Unusual cases to handle, for example: The person has no cases yet.",items:U,onChange:H,add:"Add an edge case"}),i.jsx(Jc,{files:ye,onAdd:Re,onRemove:F=>Pe(je=>je.filter((Rt,$e)=>$e!==F))}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Priority"}),i.jsx("div",{className:"sevs",children:["high","normal","low"].map(F=>i.jsxs("button",{className:`choice ${x===F?"on":""}`,onClick:()=>k(F),children:[i.jsx("span",{className:"rd"}),F==="high"?"High":F==="normal"?"Normal":"Low"]},F))})]})]}),i.jsxs("div",{className:"field",children:[i.jsxs("label",{children:["Track",S&&i.jsxs("span",{className:"note",style:{marginLeft:8,fontWeight:400},children:["The Analyst suggests ",S==="express"?"Express":"Full"]})]}),i.jsx("div",{className:"tracks",children:eE.map(F=>i.jsxs("button",{className:`opt2 ${w===F.id?"pick":""}`,onClick:()=>T(F.id),children:[i.jsxs("b",{children:[F.name,w===F.id&&i.jsxs("span",{children:[i.jsx(te,{size:13,strokeWidth:2.5})," Chosen"]})]}),F.note]},F.id))})]}),w==="full"&&i.jsxs("label",{className:"talkfirst",children:[i.jsx("input",{type:"checkbox",checked:b,onChange:F=>E(F.target.checked)}),i.jsxs("span",{children:[i.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 eE=[{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 Ja({label:e,hint:t,items:n,onChange:r,add:s}){const a=(o,l)=>r(n.map((c,u)=>u===o?l:c));return i.jsxs("div",{className:"field",children:[i.jsx("label",{children:e}),n.length===0&&i.jsx("p",{className:"note",style:{margin:"0 0 6px"},children:t}),n.map((o,l)=>i.jsxs("div",{className:"listrow",children:[i.jsx("span",{className:"mono note",children:l+1}),i.jsx("input",{className:"input",value:o,autoFocus:o===""&&l===n.length-1,onChange:c=>a(l,c.target.value),onKeyDown:c=>{c.key==="Enter"&&l===n.length-1&&o.trim()&&r([...n,""])},"aria-label":`${e} ${l+1}`}),i.jsx("button",{className:"iconbtn",onClick:()=>r(n.filter((c,u)=>u!==l)),"aria-label":`Remove ${e.toLowerCase()} ${l+1}`,children:i.jsx($t,{size:14})})]},l)),i.jsxs("button",{className:"btn sm",onClick:()=>r([...n,""]),children:[i.jsx(Zt,{size:13})," ",s]})]})}const tE=/\.(ogg|opus|oga|m4a|mp3|wav|aac|amr|flac|weba|mp4|mov|m4v|webm)$/i;function Jc({files:e,onAdd:t,onRemove:n}){const[r,s]=j.useState(!1),a=e.some(l=>tE.test(l.name)),o=ge({queryKey:["speech"],queryFn:()=>be("/api/v1/speech"),enabled:a});return i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"Files"}),i.jsxs("label",{className:`dropzone ${r?"over":""}`,onDragOver:l=>{l.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:l=>{l.preventDefault(),s(!1),l.dataTransfer.files.length&&t(l.dataTransfer.files)},onPaste:l=>l.clipboardData.files.length&&t(l.clipboardData.files),children:[i.jsx(ol,{size:15})," Drop screenshots, documents, voice or video notes here, or click to pick",i.jsx("input",{type:"file",multiple:!0,hidden:!0,onChange:l=>{l.target.files?.length&&t(l.target.files),l.target.value=""}})]}),e.length>0&&i.jsx("div",{className:"picked",children:e.map((l,c)=>i.jsxs("span",{className:"pickedfile",children:[l.preview?i.jsx("img",{src:l.preview,alt:""}):i.jsx(ol,{size:13}),i.jsx("span",{className:"mono",children:l.name}),i.jsx("span",{className:"note",children:l.size<1024*1024?`${Math.max(1,Math.round(l.size/1024))} KB`:`${(l.size/1024/1024).toFixed(1)} MB`}),i.jsx("button",{className:"iconbtn",onClick:()=>n(c),"aria-label":`Remove ${l.name}`,children:i.jsx($t,{size:13})})]},`${l.name}-${c}`))}),a&&o.data&&i.jsx("p",{className:"note",style:{marginTop:6},children:o.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 nE({onClose:e,onCreated:t}){const n=X(),[r,s]=j.useState("AB#"),a=()=>n.mutate({path:"/api/v1/pull",body:{ref:r}},{onSuccess:o=>{t(o),e()}});return i.jsxs(pt,{title:"Pull from Azure DevOps",onClose:e,icon:i.jsx("span",{className:"glyph",children:i.jsx(Tn,{size:15})}),footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:r.replace(/\D/g,"").length===0||n.isPending,onClick:a,children:[i.jsx(Tn,{size:15})," Pull ticket"]}),i.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad pull ${r.trim()||"AB#4133"}`})]}),children:[i.jsx("p",{children:"Bring a work item in as a ticket, with its description and attachments."}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"pull-ref",children:"Work item"}),i.jsx("input",{id:"pull-ref",className:"input mono",autoFocus:!0,value:r,onChange:o=>s(o.target.value),onKeyDown:o=>o.key==="Enter"&&a()})]})]})}const Ux=[{value:"stops-work",label:"Stops work"},{value:"annoying",label:"Annoying"},{value:"small",label:"Small"}];function Pp({onClose:e,foundIn:t}){const n=X(),[r,s]=j.useState(""),[a,o]=j.useState(""),[l,c]=j.useState(""),[u,h]=j.useState("annoying"),d=()=>n.mutate({path:"/api/v1/bugs",body:{what:r,how:a,expected:l,severity:u,foundIn:t},done:"Bug reported. Triage is sorting it."},{onSuccess:e});return i.jsxs(pt,{title:"Report a bug",onClose:e,icon:i.jsx("span",{className:"glyph",style:{background:"var(--bug-soft)",color:"var(--bug)"},children:i.jsx(En,{size:15})}),footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:!r.trim()||n.isPending,onClick:d,children:[i.jsx(En,{size:15})," Report bug"]}),i.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad bug "${r.trim()||"What happened"}"${t?` --in ${t}`:""}`})]}),children:[i.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."]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"bug-what",children:"What happened?"}),i.jsx("input",{id:"bug-what",className:"input",autoFocus:!0,value:r,onChange:f=>s(f.target.value),placeholder:"For example: Table text is hard to read in dark mode"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"bug-how",children:"How can we see it?"}),i.jsx("input",{id:"bug-how",className:"input",value:a,onChange:f=>o(f.target.value),placeholder:"The steps, in a line"})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"bug-exp",children:"What did you expect?"}),i.jsx("input",{id:"bug-exp",className:"input",value:l,onChange:f=>c(f.target.value)})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{children:"How bad is it?"}),i.jsx("div",{className:"sevs",children:Ux.map(f=>i.jsxs("button",{className:`choice ${u===f.value?"on":""}`,onClick:()=>h(f.value),children:[i.jsx("span",{className:"rd"}),f.label]},f.value))})]})]})}function rE({release:e,demo:t,onClose:n}){const{toast:r}=ze(),s=()=>void navigator.clipboard?.writeText(e.whatsappDraft??"").then(()=>r("Message copied. Send it from WhatsApp.")),a=[e.addons.changelog&&"Changelog updated",e.addons.tag&&`Tagged ${e.version} in git`,e.addons.pipeline&&"Azure pipeline started"].filter(Boolean);return i.jsxs(pt,{title:`${e.version} is released`,onClose:n,icon:i.jsx("span",{className:"glyph",children:i.jsx(jo,{size:15})}),footer:i.jsxs(i.Fragment,{children:[e.addons.whatsapp&&i.jsxs("button",{className:"btn pri",onClick:s,children:[i.jsx(fa,{size:15})," Copy message"]}),i.jsx("button",{className:"btn",onClick:n,children:"Done"})]}),children:[i.jsxs("div",{className:"donelist",children:[i.jsxs("div",{children:[i.jsx(te,{size:16})," ",e.tickets.length," tickets released"]}),e.log?e.log.map(o=>i.jsxs("div",{style:o.ok?void 0:{color:"var(--you-ink)"},children:[o.ok?i.jsx(te,{size:16}):i.jsx("span",{style:{width:16,textAlign:"center",fontWeight:800},children:"!"})," ",o.text]},o.text)):a.map(o=>i.jsxs("div",{children:[i.jsx(te,{size:16})," ",o]},o))]}),t&&!e.log&&i.jsx("p",{className:"note",style:{marginBottom:12},children:"Demo board: these release steps are shown, not run."}),e.addons.whatsapp&&e.whatsappDraft&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",style:{marginTop:4},children:"A WhatsApp note for your manager. Copy it and send it yourself."}),i.jsx("div",{className:"wa",children:e.whatsappDraft})]})]})}const Ie={analyst:"Analyst",architect:"Architect",builder:"Builder",reviewer:"Reviewer",tester:"Tester"},D0={analyst:"intake",architect:"intake",builder:"build",reviewer:"review",tester:"tester"},sE={analyst:Hs,architect:_k,builder:pa,reviewer:ty,tester:iy},iE={"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 cr({role:e,small:t,live:n}){const r=sE[e]??Hs;return i.jsx("span",{className:`cav av-${e} ${t?"sm":""} ${n?"live":""}`,"aria-hidden":"true",children:i.jsx(r,{size:t?13:16,strokeWidth:2})})}function ba({t:e,agent:t,label:n,primary:r}){const s=X();return i.jsxs("button",{className:`btn ${r?"pri":""}`,disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:t}},{onSuccess:()=>Kt.show(e.id)}),children:[i.jsx(ma,{size:14})," ",n??`Talk to the ${Ie[t]}`]})}function qx(e){return e.live&&e.squad?.phase?iE[e.squad.phase]??null:null}function Hx(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=ar[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 Wx(e){const t=e.chat,n=Ie[t.with];return t.beside&&Dr(e)?{kind:"released",note:"Questions only"}:t.beside?{kind:"working",note:"Asking never stops the work"}:{kind:"talk",note:`The ${n} waits while you talk`}}function Vx(e){const t=e.chat,n=Ie[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 ${n} carries on as you agreed.`}}function aE({t:e,size:t,onFull:n,onPanel:r}){const s=X(),[a,o]=j.useState(!1),l=e.chat,c=Ie[l.with],u=Wx(e),h=Hx(e),d=l.open?Vx(e):null,f=s.isPending||!!l.thinking,p=l.with==="builder"||l.with==="reviewer"||l.with==="tester",m=qx(e),g=(k,w)=>s.mutate({path:`/api/v1/tickets/${e.id}/chat/${k}`,done:w}),v=i.jsxs(i.Fragment,{children:[l.open&&d&&i.jsxs("button",{className:"btn pri",disabled:f,onClick:()=>g(d.path,d.done),children:[i.jsx(te,{size:15,strokeWidth:2.5})," ",d.label]}),l.open&&u.kind==="talk"&&!p&&i.jsx("button",{className:"btn",disabled:f,onClick:()=>g("done","Done talking."),children:d?"Done, no changes":"Done"}),l.open&&u.kind==="talk"&&p&&Np(e)&&i.jsx(Cp,{t:e}),l.open&&u.kind==="released"&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[i.jsx(C1,{size:14})," New linked ticket"]}),i.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[i.jsx(En,{size:14})," Report a bug"]})]}),l.open&&u.kind==="working"&&Kh(e)&&i.jsxs("button",{className:"btn",onClick:()=>o(!0),children:[i.jsx(Fs,{size:14})," Propose a change"]}),l.open&&u.kind!=="talk"&&i.jsx("button",{className:"btn",disabled:s.isPending,onClick:()=>g("done",`Done asking the ${c}.`),children:"Done"}),!l.open&&!e.takenOver&&i.jsxs("button",{className:"btn",disabled:s.isPending,onClick:()=>s.mutate({path:`/api/v1/tickets/${e.id}/chat/start`,body:{with:l.with}},{onSuccess:()=>Kt.show(e.id)}),children:[i.jsx(ma,{size:14})," Talk to the ",c," again"]})]}),y=l.open&&u.kind==="working"?i.jsxs("div",{className:"cbanner work",children:[i.jsx("span",{className:"livedot","aria-hidden":"true"}),i.jsxs("span",{children:[i.jsx("b",{children:m?`The ${Ie[m]} keeps working`:e.live||e.squad?"The squad keeps working":"Nothing waits for this talk"}),e.status?i.jsxs(i.Fragment,{children:[" · ",e.status]}):null,". Your questions change nothing on ",e.id,"; a change goes through the spec."]})]}):l.open&&u.kind==="released"?i.jsx("div",{className:"cbanner done",children:i.jsxs("span",{children:[i.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,x=a?i.jsx(Qh,{t:e,from:l.with,onClose:()=>o(!1)}):null;return t==="phone"?i.jsxs("div",{className:"chead-m",children:[i.jsxs("div",{className:"chead-m-row",children:[i.jsx("span",{className:"ctitle",children:e.title}),l.open&&d&&i.jsx("button",{className:"btn pri sm",disabled:f,onClick:()=>g(d.path,d.done),children:d.label}),l.open&&!d&&i.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:()=>g("done","Done talking."),children:"Done"})]}),y,l.open&&u.kind==="released"&&i.jsxs("div",{className:"chead-m-row",children:[i.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[i.jsx(C1,{size:13})," New linked ticket"]}),i.jsxs("button",{className:"btn sm",onClick:()=>o(!0),children:[i.jsx(En,{size:13})," Report a bug"]})]}),x]}):t==="full"?i.jsxs("div",{className:"chead-f",children:[i.jsxs("div",{className:"chead-f-row",children:[i.jsx(cr,{role:l.with,live:l.thinking}),i.jsxs("div",{className:"chead-f-t",children:[i.jsxs("div",{className:"chead-line",children:[i.jsx("span",{className:"cid",children:e.id}),i.jsx("span",{className:`cstage ${h.tone}`,children:h.text}),l.open&&i.jsx("span",{className:"cnote",children:u.note})]}),i.jsx("div",{className:"ctitle",children:e.title})]}),i.jsx("span",{className:"grow"}),i.jsx("div",{className:"cbtns",children:v}),r&&i.jsx("button",{className:"iconbtn",onClick:r,"aria-label":"Back to the side panel",title:"Back to the side panel",children:i.jsx(Qk,{size:16})})]}),y,x]}):i.jsxs("div",{className:"chead-p",children:[i.jsxs("div",{className:"chead-line",children:[i.jsx("span",{className:"cid",children:e.id}),i.jsx("span",{className:`cstage ${h.tone}`,children:h.text}),i.jsx("span",{className:"grow"}),l.open&&i.jsx("span",{className:"cnote",children:u.note}),n&&i.jsx("button",{className:"iconbtn sm",onClick:n,"aria-label":"Open full screen",title:"Full screen",children:i.jsx(Uh,{size:14})})]}),i.jsx("div",{className:"ctitle",children:e.title}),y,i.jsx("div",{className:"cbtns",children:v}),x]})}const eo=e=>`${e.at}|${e.who}`,B0=e=>e.who!=="you"&&e.who!=="squad";function Rp({id:e,size:t,onOpenDoc:n,onFull:r,onPanel:s}){const a=ga(e),o=a.data,l=o?.chat,c=j.useRef(null),[u,h]=j.useState(""),d=j.useRef(null),f=j.useRef(null),[p,m]=j.useState(null),g=o?.chat?.messages.length??0;j.useEffect(()=>{p&&g>p.count&&m(null)},[g,p]);const v=l?l.beside?"chat":D0[l.with]:"",y=ge({queryKey:["conversation",e,v],queryFn:()=>be(`/api/v1/tickets/${e}/conversations/${v}`),enabled:!!(l&&(l.beside?l.side:o?.sessions?.[D0[l.with]])),refetchInterval:l?.thinking?1500:8e3,retry:!1}),x=j.useMemo(()=>$x(y.data?.updates??[]).filter(_=>_.kind==="tool"),[y.data]),k=(_,B)=>x.filter(N=>(!_||(N.at??"")>=_)&&(!B||(N.at??"")<=B)),w=j.useRef(null),[T,b]=j.useState(null),E=j.useMemo(()=>l?.messages??[],[l?.messages]);j.useEffect(()=>{if(!l)return;const _=E.map(eo);if(!w.current){w.current=new Set(_);return}const B=E.filter(V=>!w.current.has(eo(V)));for(const V of _)w.current.add(V);const N=B.filter(B0).at(-1);N&&b({key:eo(N),shown:0,total:T8(N.text)})},[l,E]),j.useEffect(()=>{if(!T)return;if(T.shown>=T.total){b(null);return}const _=Math.max(1,Math.ceil(T.total/120)),B=setTimeout(()=>b(N=>N&&{...N,shown:N.shown+_}),55);return()=>clearTimeout(B)},[T]);const S=j.useRef(!0),A=j.useRef(null);if(j.useLayoutEffect(()=>{const _=c.current;_&&S.current&&(_.scrollTop=_.scrollHeight)}),j.useEffect(()=>{const _=c.current,B=A.current;if(!_||!B)return;const N=new ResizeObserver(()=>{S.current&&(_.scrollTop=_.scrollHeight)});return N.observe(B),()=>N.disconnect()},[o?.id,!!l]),j.useEffect(()=>{l&&Kt.seen(e,E.length)},[l,e,E.length]),!o)return i.jsx("div",{className:"cempty",children:a.isError?`No ticket ${e}.`:"Loading…"});if(!l)return i.jsxs("div",{className:"cempty",children:[i.jsxs("p",{children:["No talk on ",o.id," yet."]}),i.jsx(ba,{t:o,agent:"analyst",primary:!0})]});const C=Ie[l.with],R=Wx(o),L=[...E].reverse().find(_=>_.who==="you"),$=Vx(o),U=qx(o),H=R.kind==="working"?`You are asking the ${C}. ${U?`The ${Ie[U]}`:"The squad"} keeps working on ${o.id}, and this talk changes nothing.`:R.kind==="released"?`${o.id} is ${o.stage==="done"?"released":"accepted"}. Ask the ${C} anything about it.`:`You started talking with the ${C}. Its work on ${o.id} waits until you press ${$?$.label:"Done"}${$&&$.label!=="Back to work"?" or Done":""}.`,Z=[...E].reverse().find(B0),Q=_=>{_!==void 0&&h(_),setTimeout(()=>d.current?.focus(),0)};return i.jsxs("div",{className:`chat-v csize-${t}`,children:[i.jsx(aE,{t:o,size:t,onFull:r,onPanel:s}),i.jsx("div",{className:"cthread",ref:c,"aria-live":"polite",onScroll:_=>{const B=_.currentTarget;S.current=B.scrollHeight-B.scrollTop-B.clientHeight<80},children:i.jsxs("div",{className:"ccol",ref:A,children:[l.open&&i.jsx("div",{className:"cnote-pill",children:H}),E.map((_,B)=>{if(_.who==="squad")return i.jsx(mE,{t:o,m:_,last:B===E.length-1,onAsk:()=>Q()},B);if(_.who==="you")return i.jsx(cE,{t:o,m:_,onOpenDoc:n,onReply:P=>Q(P)},B);const N=E[B-1],V=T?.key===eo(_),Y=E[B+1];return i.jsx(uE,{t:o,m:_,size:t,used:k(N?.at,_.at),writing:V?T.shown:null,answer:Y?.who==="you"?Y.text:void 0,canChoose:l.open&&!l.thinking&&_===Z&&B===E.length-1,newest:_===Z,onChoose:P=>f.current?.(P),onOther:()=>Q(),onOpenDoc:n,onReply:P=>Q(P)},B)}),p&&i.jsx(oE,{p}),l.thinking&&i.jsx(fE,{role:l.with,steps:k(L?.at??E.at(-1)?.at),hasMessage:!!L})]})}),l.open?i.jsx(gE,{t:o,size:t,text:u,setText:h,input:d,onSent:()=>S.current=!0,sendRef:f,setPending:m}):i.jsx("div",{className:"cclosed",children:"This talk is over. It stays here to read."})]})}function oE({p:e}){const t=un(e.text);return i.jsxs("div",{className:"cyou cmsg",children:[i.jsxs("div",{className:"cybub",children:[e.files.length>0&&i.jsx("div",{className:"cup",children:e.files.map((n,r)=>i.jsxs("div",{className:"cup-row",children:[n.preview?i.jsx("img",{className:"cup-img",src:n.preview,alt:""}):i.jsx("span",{className:"cfic sm file",children:(n.name.split(".").pop()??"").toUpperCase().slice(0,4)}),i.jsx("span",{className:"cfname",children:n.name}),i.jsx("span",{className:"cbar",children:i.jsx("i",{})})]},r))}),e.text.trim()&&i.jsx("p",{className:Ln(t),dir:t.dir,lang:t.dir==="rtl"?"ar":"en",children:e.text})]}),i.jsx("span",{className:"cmeta",children:"You · now · sending"})]})}function Kx({t:e,m:t,holder:n,onReply:r}){const s=X(),{toast:a}=ze(),[o,l]=j.useState(!1),[c,u]=j.useState(!1),h=()=>{const m=window.getSelection();return((m&&!m.isCollapsed&&n.current?.contains(m.anchorNode)?m.toString().trim():"")||t.text).trim().slice(0,2e3)},d=(m,g)=>{l(!1),s.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:h(),kind:m},done:`Added to the spec as ${g}.`})},f=()=>void navigator.clipboard?.writeText(t.text).then(()=>a("Copied"),()=>a("Could not copy. Select the text instead.","err")),p=()=>r(`> ${t.text.replace(/\s+/g," ").slice(0,160)}${t.text.length>160?"…":""}
485
+
486
+ `);return i.jsxs("div",{className:"cacts",children:[i.jsxs("button",{className:"cact",onClick:f,children:[i.jsx(fa,{size:13})," Copy"]}),t.who==="you"&&t.text.trim()&&Kh(e)&&i.jsxs("button",{className:"cact",onClick:()=>u(!0),children:[i.jsx(Fs,{size:13})," Propose as a change"]}),!Dr(e)&&t.text.trim()&&i.jsxs("span",{className:"cmenu-w",children:[i.jsxs("button",{className:"cact",onClick:()=>l(!o),"aria-haspopup":"menu","aria-expanded":o,onMouseDown:m=>m.preventDefault(),children:[i.jsx(Zt,{size:13})," Add to spec"]}),o&&i.jsxs("div",{className:"cmenu",role:"menu",onMouseLeave:()=>l(!1),children:[i.jsxs("button",{role:"menuitem",onClick:()=>d("rule","a business rule"),onMouseDown:m=>m.preventDefault(),children:[i.jsx("b",{children:"A business rule"}),i.jsx("small",{children:"Every agent must follow it"})]}),i.jsxs("button",{role:"menuitem",onClick:()=>d("criterion",'a "done when" item'),onMouseDown:m=>m.preventDefault(),children:[i.jsx("b",{children:'A "done when" item'}),i.jsx("small",{children:"The Tester proves it with a screenshot"})]}),i.jsxs("button",{role:"menuitem",onClick:()=>d("note","a note"),onMouseDown:m=>m.preventDefault(),children:[i.jsx("b",{children:"A note"}),i.jsx("small",{children:"Context for the next steps"})]})]})]}),e.chat?.open&&i.jsxs("button",{className:"cact",onClick:p,children:[i.jsx(Xk,{size:13})," Reply"]}),c&&i.jsx(Qh,{t:e,initial:t.text,from:e.chat?.with,onClose:()=>u(!1)})]})}function lE(e){let t=!1;return e.split(`
487
+ `).map((n,r,s)=>{/^\s*```/.test(n)&&(t=!t);const a=s[r+1]??"";return!t&&n.trim()&&a.trim()&&!/^\s*([-*+]|\d+\.|>|```)\s/.test(a)?`${n}
488
+ `:n}).join(`
489
+ `)}function cE({t:e,m:t,onOpenDoc:n,onReply:r}){const s=j.useRef(null),[a,o]=j.useState(!1),l=!t.text.trim()&&(t.files??[]).some(c=>Ad.test(c));return i.jsxs("div",{className:`cyou cmsg ${a?"picked":""}`,children:[i.jsxs("div",{className:"cybub",ref:s,onClick:()=>o(!a),children:[t.text.trim()&&i.jsx(wp,{text:lE(t.text),ticket:e.id}),t.files&&t.files.length>0&&i.jsx(jp,{ticket:e.id,files:t.files,onOpen:n,sent:!0,from:"From you"})]}),i.jsxs("span",{className:"cmeta",children:["You · ",Co(t.at),l?" · written out from your voice":""]}),i.jsx(Kx,{t:e,m:t,holder:s,onReply:r})]})}function Co(e){return new Date(e).toDateString()===new Date().toDateString()?Ms(e):`${Vr(e)} ${Ms(e)}`}function uE({t:e,m:t,size:n,used:r,writing:s,answer:a,canChoose:o,newest:l,onChoose:c,onOther:u,onOpenDoc:h,onReply:d}){const f=j.useRef(null),[p,m]=j.useState(!1),g=t.who,v=Ie[g]??"Agent",y=s!==null,x=y?E8(t.text,s):t.text,k=i.jsx(wp,{text:x,ticket:e.id,stream:y,caret:y});return i.jsxs("div",{className:`cag cmsg ag-${g} ${p?"picked":""}`,children:[i.jsx(cr,{role:g,live:y}),i.jsxs("div",{className:"cwho",children:[i.jsx("b",{children:v}),y?i.jsx("span",{className:"shim",children:"Writing"}):i.jsx("span",{className:"ctime",children:Co(t.at)})]}),i.jsxs("div",{className:"cagb",ref:f,onClick:w=>n==="phone"&&!w.target.closest("button, a")&&m(!p),children:[r.length>0&&i.jsx(pE,{steps:r}),y||l?k:i.jsx(FC,{lines:MC(t.text),children:k}),!y&&t.files&&t.files.length>0&&i.jsx(jp,{ticket:e.id,files:t.files,onOpen:h,from:`From the ${v} · ${Co(t.at)}`}),!y&&t.options&&t.options.length>0&&i.jsx(dE,{options:t.options,answer:a,can:o,onChoose:c,onOther:u})]}),!y&&n==="phone"&&i.jsxs("span",{className:"cmeta",children:[v," · ",Co(t.at)]}),!y&&i.jsx(Kx,{t:e,m:t,holder:f,onReply:d})]})}function dE({options:e,answer:t,can:n,onChoose:r,onOther:s}){const a=un(e.join(" ")),o=t?.trim();return i.jsxs("div",{className:"cchoices",dir:a.dir,children:[e.map(l=>{const c=un(l),u=o?o===l.trim()?"on":"off":n?"":"off";return i.jsx("button",{className:`cch ${u} ${Ln(c)}`,lang:c.dir==="rtl"?"ar":"en",dir:c.dir,disabled:!n,onClick:()=>r(l),children:l},l)}),n&&i.jsx("button",{className:"cch other",onClick:s,dir:a.dir,children:a.dir==="rtl"?"إجابة أخرى…":"Something else…"})]})}function hE(e){let t=0,n=0;for(const r of e.content){if(r.type!=="diff")continue;const s=(r.oldText??"").split(`
490
+ `).filter(Boolean).length,a=r.newText.split(`
491
+ `).filter(Boolean).length;t+=Math.max(0,a-(r.oldText==null?0:Math.min(s,a))),n+=r.oldText==null?0:Math.max(0,s-a)}return{title:e.title,...t||n?{plus:t,minus:n}:{}}}function Qx({s:e}){const t=hE(e);return i.jsxs("div",{className:`cstep ${e.status}`,children:[e.status==="completed"?i.jsx(te,{size:13,strokeWidth:2.5}):e.status==="failed"?i.jsx($t,{size:13}):i.jsx(Rn,{size:13,className:"spin"}),i.jsx("span",{className:"cstep-t",children:t.title}),t.plus!==void 0&&i.jsxs("span",{className:"cstep-n",children:[i.jsxs("span",{className:"add",children:["+",t.plus]})," ",i.jsxs("span",{className:"del",children:["−",t.minus]})]})]})}function pE({steps:e}){const[t,n]=j.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"cactv",onClick:()=>n(!t),"aria-expanded":t,children:[i.jsx(Bh,{size:13,style:{transform:t?"rotate(90deg)":void 0}})," Looked at ",e.length," ",e.length===1?"thing":"things"]}),t&&i.jsx("div",{className:"cactlist",children:e.map(r=>i.jsx(Qx,{s:r},r.id))})]})}function fE({role:e,steps:t,hasMessage:n}){const r=t.filter(o=>o.status==="in_progress").at(-1)??t.at(-1),s=r?r.title:n?"Reading your message":"Reading the ticket",a=t.slice(-6);return i.jsxs("div",{className:`cag cmsg ag-${e} thinking`,children:[i.jsx(cr,{role:e,live:!0}),i.jsxs("div",{className:"cwho",children:[i.jsx("b",{children:Ie[e]}),i.jsx("span",{className:"shim",children:s})]}),i.jsxs("div",{className:"cagb",children:[i.jsxs("span",{className:"cdots","aria-label":`The ${Ie[e]} is answering`,children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),a.length>0&&i.jsxs("div",{className:"csteps",children:[t.length>a.length&&i.jsxs("div",{className:"cstep more",children:["and ",t.length-a.length," earlier steps"]}),a.map(o=>i.jsx(Qx,{s:o},o.id))]})]})]})}function mE({t:e,m:t,last:n,onAsk:r}){const s=X(),a=t.note==="failed"||!t.note&&t.text.startsWith("Could not answer"),o=e.chat?Ie[e.chat.with]:"agent",l=n&&e.chat?.open&&!e.chat.thinking&&(a||t.note==="stopped"),c=()=>s.mutate({path:`/api/v1/tickets/${e.id}/chat/retry`});return a?i.jsxs("div",{className:"cfail cmsg",children:[i.jsxs("div",{className:"cfail-t",children:[i.jsx(Lk,{size:15})," The ",o," could not answer. Nothing was lost.",i.jsx("span",{className:"cfail-why",children:t.text.replace(/^Could not answer:\s*/,"")})]}),l&&i.jsxs("div",{className:"cbtns",children:[i.jsx("button",{className:"btn pri sm",disabled:s.isPending,onClick:c,children:"Try again"}),i.jsx("button",{className:"btn sm",onClick:r,children:"Ask something else"})]})]}):i.jsxs("div",{className:"cnote-w cmsg",children:[i.jsx("div",{className:"cnote-pill",children:t.text}),l&&i.jsx("div",{className:"cbtns",children:i.jsx("button",{className:"btn sm",disabled:s.isPending,onClick:c,children:"Ask again"})})]})}const U0=10*1024*1024;function gE({t:e,size:t,text:n,setText:r,input:s,onSent:a,sendRef:o,setPending:l}){const c=X(),{toast:u}=ze(),h=e.chat,d=Ie[h.with],[f,p]=j.useState([]),[m,g]=j.useState(!1),v=j.useRef(null),y=un(n),x=w8(y),k=Math.min(6,Math.max(1,n.split(`
492
+ `).length)),w=async S=>{const A=[...S],C=A.find(L=>L.size>U0);C&&u(`${C.name} is larger than 10 MB.`,"err");const R=await Promise.all(A.filter(L=>L.size<=U0).slice(0,10).map(Tp)).catch(L=>(u(L.message,"err"),[]));p(L=>[...L,...R].slice(0,10))},T=(S=n,A=[])=>{const C=[...f,...A];if(!S.trim()&&!C.length||h.thinking||c.isPending)return;l({text:S,files:C,count:h.messages.length});const R=n;r(""),p([]),a(),c.mutate({path:`/api/v1/tickets/${e.id}/chat/send`,body:{text:S,files:C.map(({name:L,data:$})=>({name:L,data:$}))}},{onError:()=>{l(null),r(R),p(C.filter(L=>!A.includes(L)))}})};o.current=S=>T(S);const b=()=>c.mutate({path:`/api/v1/tickets/${e.id}/chat/stop`}),E=t==="phone"?`Message the ${d}`:`Message the ${d} in Arabic or English`;return i.jsxs("div",{className:"ccomp",onDragOver:S=>(S.preventDefault(),g(!0)),onDragLeave:()=>g(!1),onDrop:S=>(S.preventDefault(),g(!1),void w(S.dataTransfer.files)),children:[m&&i.jsx("div",{className:"cdrop",children:"Drop files to add them to your message"}),i.jsx(yE,{who:d,size:t,onDone:S=>T(n,[S]),render:S=>S.on?S.box:i.jsxs("div",{className:`cbox ${t==="phone"?"m":""}`,children:[f.length>0&&i.jsx("div",{className:"cpicked",children:f.map((A,C)=>i.jsxs("span",{className:"chip",children:[A.preview?i.jsx("img",{src:A.preview,alt:""}):i.jsx(ol,{size:12})," ",A.name,i.jsx("button",{className:"iconbtn","aria-label":`Remove ${A.name}`,onClick:()=>p(f.filter((R,L)=>L!==C)),children:i.jsx($t,{size:11})})]},C))}),t==="phone"&&i.jsx("button",{className:"ib","aria-label":"Add screenshots or files",onClick:()=>v.current?.click(),children:i.jsx(Zt,{size:20})}),i.jsx("textarea",{ref:s,className:`cta ${n?Ln(y):"t-en"}`,dir:n?y.dir:"auto",lang:y.dir==="rtl"?"ar":"en",rows:k,value:n,placeholder:E,"aria-label":"Your message",onChange:A=>r(A.target.value),onPaste:A=>{const C=[...A.clipboardData.files];C.length&&w(C)},onKeyDown:A=>{A.key==="Enter"&&!A.shiftKey&&!A.nativeEvent.isComposing&&(A.preventDefault(),T())}}),t==="phone"?h.thinking?i.jsx("button",{className:"csend m stop",onClick:b,"aria-label":"Stop the answer",children:i.jsx(ta,{size:14,fill:"currentColor"})}):n.trim()||f.length?i.jsx("button",{className:"csend m",onClick:()=>T(),"aria-label":"Send",disabled:c.isPending,children:i.jsx(ea,{size:18})}):i.jsx("button",{className:"csend m mic",onClick:S.start,"aria-label":"Record a voice note",children:i.jsx(S1,{size:18})}):i.jsxs("div",{className:"crow",children:[i.jsx("button",{className:"ib","aria-label":"Add screenshots or files",title:"Add screenshots or files",onClick:()=>v.current?.click(),children:i.jsx(ol,{size:16})}),i.jsx("button",{className:"ib","aria-label":"Record a voice note",title:"Record a voice note",onClick:S.start,children:i.jsx(S1,{size:16})}),x&&i.jsx("span",{className:"clchip",children:x}),i.jsx("span",{className:"grow"}),h.thinking?i.jsxs("button",{className:"cstop",onClick:b,disabled:h.stopping||c.isPending,children:[i.jsx(ta,{size:11,fill:"currentColor"})," ",h.stopping?"Stopping…":"Stop"]}):i.jsx("button",{className:"csend",onClick:()=>T(),disabled:c.isPending||!n.trim()&&!f.length,"aria-label":"Send",children:i.jsx(ea,{size:17})})]}),i.jsx("input",{ref:v,type:"file",multiple:!0,hidden:!0,onChange:A=>A.target.files&&void w(A.target.files)})]})}),t!=="phone"&&i.jsx("div",{className:"chint",children:"Enter sends · Shift+Enter for a new line · It answers in the language you write"})]})}function yE({who:e,size:t,onDone:n,render:r}){const{toast:s}=ze(),[a,o]=j.useState(!1),[l,c]=j.useState(0),u=j.useRef(null),h=j.useRef(!1);j.useEffect(()=>{if(!a)return;const m=setInterval(()=>c(g=>g+1),1e3);return()=>clearInterval(m)},[a]),j.useEffect(()=>()=>u.current?.stream.getTracks().forEach(m=>m.stop()),[]);const d=async()=>{try{const m=await navigator.mediaDevices.getUserMedia({audio:!0}),g=["audio/webm","audio/ogg","audio/mp4"].find(x=>MediaRecorder.isTypeSupported?.(x))??"",v=new MediaRecorder(m,g?{mimeType:g}:void 0),y=[];v.ondataavailable=x=>x.data.size&&y.push(x.data),v.onstop=()=>{if(m.getTracks().forEach(b=>b.stop()),!h.current||!y.length)return;const x=v.mimeType||g||"audio/webm",k=x.includes("ogg")?"ogg":x.includes("mp4")?"m4a":"weba",w=new Date().toTimeString().slice(0,8).replace(/:/g,""),T=new File(y,`voice-note-${w}.${k}`,{type:x});Tp(T).then(n)},u.current=v,h.current=!1,c(0),v.start(),o(!0)}catch{s("The microphone is not available. Allow it for this page, or attach a voice note file.","err")}},f=m=>{h.current=m,u.current?.stop(),o(!1)},p=i.jsxs("div",{className:`crec ${t==="phone"?"m":""}`,role:"group","aria-label":"Recording a voice note",children:[i.jsx("span",{className:"crdot"}),i.jsxs("span",{className:"crt",children:["0:",String(l).padStart(2,"0")," · Recording for the ",e]}),i.jsx("span",{className:"clw","aria-hidden":"true",children:Array.from({length:22},(m,g)=>i.jsx("i",{style:{animationDelay:`${g%7*.11}s`}},g))}),i.jsx("button",{className:"btn sm",onClick:()=>f(!1),children:"Cancel"}),i.jsx("button",{className:"btn sm pri",onClick:()=>f(!0),children:"Send"})]});return i.jsx(i.Fragment,{children:r({on:a,start:()=>void d(),box:p})})}function ia(e=""){return ge({queryKey:["conversations",e],queryFn:()=>be(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`),refetchInterval:1500})}function Ap(e,t){if(!e.open)return 0;const n=t[e.id];return n===void 0?e.fresh:Math.min(e.fresh,Math.max(0,e.count-n))}function xE(){const e=Ul(),t=Gh(Zh),n=ia();return!t&&!e.min&&(n.data??[]).some(r=>r.open)}function vE(e){const t=Ie[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 kE(){const e=Ul(),t=Gh(Zh),n=Wr(),r=ia(),[s,a]=j.useState(null),o=j.useRef(null),l=(r.data??[]).filter(d=>d.open),c=l.find(d=>d.id===e.tab)??l[0];if(j.useEffect(()=>{o.current?.querySelector(".ctab.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[c?.id,e.min]),!c)return null;const u=d=>void n({to:"/conversations",search:{ticket:d}});if(e.min||t){const d=l.find(f=>f.thinking)??l.find(f=>f.yourTurn)??c;return i.jsxs("div",{className:"cmini",role:"status",children:[i.jsx(cr,{role:d.with,small:!0,live:d.thinking}),i.jsxs("div",{children:[i.jsxs("b",{children:[l.length," ",l.length===1?"conversation":"conversations"]}),i.jsx("small",{children:vE(d)})]}),i.jsx("button",{className:"btn pri sm",onClick:()=>t?u(d.id):Kt.restore(),children:"Open"})]})}const h=d=>{d.preventDefault();const f=d.clientX,p=e.width,m=v=>Kt.resize(p+(f-v.clientX)),g=()=>{window.removeEventListener("mousemove",m),window.removeEventListener("mouseup",g),document.body.classList.remove("cresizing")};document.body.classList.add("cresizing"),window.addEventListener("mousemove",m),window.addEventListener("mouseup",g)};return i.jsxs(i.Fragment,{children:[s&&i.jsx(Sp,{doc:s,onClose:()=>a(null)}),i.jsxs("section",{className:"cdock",style:{width:e.width},"aria-label":"Conversations",children:[i.jsx("span",{className:"cgrip",onMouseDown:h,"aria-hidden":"true"}),i.jsxs("div",{className:"ctabs",children:[i.jsx("div",{className:"ctabscroll",role:"tablist","aria-label":"Open conversations",ref:o,children:l.map(d=>{const f=d.id===c.id,p=Ap(d,e.seen);return i.jsxs("button",{className:`ctab ${f?"on":""}`,role:"tab","aria-selected":f,onClick:()=>Kt.pick(d.id),title:`${d.id} · ${d.title}`,children:[i.jsx(cr,{role:d.with,small:!0}),i.jsx("span",{className:"tid",children:d.id}),i.jsx("span",{className:"tn",children:Ie[d.with]}),d.thinking&&!f&&i.jsxs("span",{className:`cdots sm c-${d.with}`,"aria-label":"Typing",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),p>0&&!f&&i.jsx("span",{className:"cbadge","aria-label":`${p} unread`,children:p})]},d.id)})}),i.jsx(Gx,{}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"iconbtn",onClick:()=>u(c.id),"aria-label":"Open full screen",title:"Full screen",children:i.jsx(Uh,{size:15})}),i.jsx("button",{className:"iconbtn",onClick:Kt.minimize,"aria-label":"Minimize",title:"Minimize",children:i.jsx(Gk,{size:16})})]}),i.jsx(Rp,{id:c.id,size:"panel",onOpenDoc:a},c.id)]})]})}function Gx(){const e=Tt(),t=X(),[n,r]=j.useState(!1),[s,a]=j.useState(""),[o,l]=j.useState("analyst"),c=(e.data?.ready?e.data.tickets:[]).filter(h=>!h.chat?.open&&!h.takenOver),u=()=>t.mutate({path:`/api/v1/tickets/${s}/chat/start`,body:{with:o}},{onSuccess:()=>{r(!1),Kt.show(s)}});return i.jsxs("span",{className:"cmenu-w",children:[i.jsx("button",{className:"iconbtn",onClick:()=>r(!n),"aria-label":"Start a new conversation",title:"Start a new conversation","aria-expanded":n,children:i.jsx(Zt,{size:16})}),n&&i.jsxs("div",{className:"cmenu cnew",role:"dialog","aria-label":"Start a new conversation",children:[i.jsxs("label",{children:[i.jsx("span",{children:"Ticket"}),i.jsxs("select",{className:"input",value:s,onChange:h=>a(h.target.value),children:[i.jsx("option",{value:"",children:"Pick a ticket"}),c.map(h=>i.jsxs("option",{value:h.id,children:[h.id," · ",h.title]},h.id))]})]}),i.jsxs("label",{children:[i.jsx("span",{children:"Talk to"}),i.jsx("select",{className:"input",value:o,onChange:h=>l(h.target.value),children:Object.keys(Ie).map(h=>i.jsxs("option",{value:h,children:["The ",Ie[h]]},h))})]}),i.jsxs("div",{className:"cbtns",children:[i.jsx("button",{className:"btn pri sm",disabled:!s||t.isPending,onClick:u,children:"Start talking"}),i.jsx("button",{className:"btn sm",onClick:()=>r(!1),children:"Cancel"})]})]})]})}const wE=[{to:"/board",label:"Board",icon:Uk},{to:"/backlog",label:"Backlog",icon:Wk},{to:"/inbox",label:"Waiting for you",icon:Bk,badge:"you"},{to:"/conversations",label:"Conversations",icon:Kk,badge:"chats"},{to:"/releases",label:"Releases",icon:ea},{to:"/architecture",label:"Architecture",icon:Zk},{to:"/bugs",label:"Bugs",icon:En,badge:"bugs"},{to:"/squad",label:"Squad and AI",icon:oy},{to:"/settings",label:"Settings",icon:Jk}];function bE(){const e=Tt(),{theme:t,toggleTheme:n,showCommands:r,toggleCommands:s}=ze(),a=jk({select:p=>p.location.pathname}),o=e.data?.ready?e.data.meta:void 0,l=e.data?.ready?e.data.tickets:[],c=l.filter(p=>p.waiting||p.outdated?.length||sn(p)).length,u=l.filter(p=>p.kind==="bug").length,h=(o?.user.name??"You").slice(0,2).toUpperCase(),d=ia().data?.filter(p=>p.open).length??0,f=xE();return a.startsWith("/conversations")?i.jsx(cd,{}):i.jsxs("div",{className:`app ${f?"docked":""}`,children:[i.jsxs("aside",{className:"side",children:[i.jsxs("a",{className:"brand",href:"/",title:"All your projects",children:[i.jsx("img",{src:"/logo.svg",alt:""}),i.jsx("b",{children:"squad-kit"}),o?.engine==="demo"&&i.jsx("small",{title:"The squad plays back a recorded run",children:"Demo"})]}),i.jsxs("a",{className:"proj",href:"/",title:"All your projects",children:[i.jsx("span",{className:"pm",children:(o?.project??"P").charAt(0)}),i.jsxs("div",{children:[i.jsx("b",{children:o?.project??"Your project"}),i.jsxs("span",{children:[l.length," open tickets"]})]}),i.jsx(Ak,{size:14,className:"sw"})]}),wE.map(p=>{const m=p.badge==="you"?c:p.badge==="bugs"?u:p.badge==="chats"?d:0,g=a.startsWith(p.to)||p.to==="/inbox"&&a.endsWith("/proof");return i.jsxs(Te,{to:p.to,className:`nav ${g?"on":""}`,children:[i.jsx(p.icon,{size:16}),p.label,m>0&&i.jsx("span",{className:`badge ${p.badge==="you"?"you":p.badge==="chats"?"talk":""}`,children:m})]},p.to)}),i.jsx("div",{className:"grow"}),i.jsx(jE,{}),i.jsx("div",{className:"engines",children:(o?.tools??[]).map(p=>i.jsxs("div",{className:"row",children:[i.jsx("span",{children:p.name}),i.jsx("span",{className:`dot ${p.ready?"":"off"}`,children:p.ready?"Ready":"Not installed"})]},p.name))}),i.jsxs("button",{className:"switch",onClick:s,"aria-pressed":r,children:[i.jsxs("span",{children:[i.jsx(ll,{size:15}),"Show commands"]}),i.jsx("span",{className:`tog ${r?"on":""}`})]}),i.jsxs("div",{className:"me",children:[i.jsx("span",{className:"av",children:h}),i.jsxs("div",{children:[o?.user.name??"You",i.jsx("small",{children:o?.user.role??""})]}),i.jsx("button",{className:"theme",onClick:n,"aria-label":t==="light"?"Switch to dark":"Switch to light",children:t==="light"?i.jsx($l,{size:15}):i.jsx(Bl,{size:15})})]})]}),i.jsxs("main",{className:"canvas",children:[e.data?.ready&&e.data.console?.outdated&&i.jsx(o8,{}),i.jsx(cd,{})]}),i.jsx(kE,{})]})}function jE(){const e=i8().data?.apps??[];return e.length?i.jsxs("div",{className:"apps",children:[i.jsx("div",{className:"apps-h",children:"Your apps"}),e.map(t=>i.jsxs("a",{className:`app-row ${t.up?"up":""}`,href:t.url,target:"_blank",rel:"noreferrer",title:t.up?`Open ${t.url}`:`Not running. Start it in ${t.repo==="."?"the project folder":`${t.repo}/`}${t.start?` with: ${t.start}`:""}`,children:[i.jsx("i",{}),i.jsxs("span",{className:"nm",children:[i.jsx("b",{children:t.name}),i.jsx("small",{children:t.up?t.url.replace(/^https?:\/\//,""):"Not running"})]}),i.jsx(ir,{size:14})]},t.repo))]}):null}const q0={cursor:"Cursor",code:"VS Code"};function Zl({t:e}){const t=X(),r=ge({queryKey:["editors"],queryFn:()=>be("/api/v1/editors"),staleTime:3e5}).data?.editors[0];return i.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:r?{editor:r}:{},done:`Opened in ${r?q0[r]:"your editor"}`}),children:[i.jsx(ir,{size:13})," Open in ",r?q0[r]:"editor"]})}function SE({t:e}){const t=ge({queryKey:["changes",e.id,e.activity.length],queryFn:()=>be(`/api/v1/tickets/${e.id}/changes`),refetchInterval:e.live?1e4:!1}),n=t.data,r=n?.files.reduce((a,o)=>a+o.added,0)??0,s=n?.files.reduce((a,o)=>a+o.removed,0)??0;return i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"changes-head",children:[i.jsxs("div",{children:[n&&n.files.length>0?i.jsxs(i.Fragment,{children:[i.jsxs("b",{children:[n.files.length," ",n.files.length===1?"file":"files"," changed"]})," ",i.jsxs("span",{className:"add",children:["+",r]})," ",i.jsxs("span",{className:"del",children:["−",s]})]}):i.jsx("b",{children:"Changes"}),i.jsx("p",{className:"note",children:n?.from==="branch"?`Read from branch ${n.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."})]}),i.jsx("span",{className:"grow"}),i.jsx(Zl,{t:e})]}),t.isLoading&&i.jsx("p",{className:"note",children:"Reading the changes…"}),t.error&&i.jsx("p",{className:"note",children:t.error.message}),n&&!n.files.length&&i.jsx("p",{className:"note",children:n.from==="none"?"Nothing built yet.":"No changes against main yet."}),n?.cut&&i.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."}),n?.files.map(a=>i.jsx(NE,{f:a},a.path)),i.jsxs("div",{className:"pills",style:{marginTop:12},children:[i.jsx(ne,{text:`squad changes ${e.id} --full`}),i.jsx(ne,{text:`squad open ${e.id}`})]})]})}function NE({f:e}){const t=e.patch?e.patch.split(`
493
+ `):[],[n,r]=j.useState(t.length<=300);return i.jsxs("div",{className:"conv-diff",children:[i.jsxs("button",{className:"conv-diff-head mono changes-file",onClick:()=>r(!n),children:[i.jsx("span",{className:`fstat ${e.status}`,children:e.status==="added"?"new":e.status==="deleted"?"deleted":e.status==="renamed"?"moved":"changed"}),i.jsx("span",{style:{overflowWrap:"anywhere",textAlign:"left"},children:e.path}),i.jsx("span",{className:"grow"}),e.binary?i.jsx("span",{children:"binary"}):i.jsxs("span",{children:[i.jsxs("span",{className:"add",children:["+",e.added]})," ",i.jsxs("span",{className:"del",children:["−",e.removed]})]})]}),n&&t.length>0&&i.jsx("pre",{children:t.map((s,a)=>s.startsWith("@@")?i.jsx("div",{className:"gap",children:s.replace(/^(@@[^@]*@@).*/,"$1")},a):i.jsxs("div",{className:s.startsWith("+")?"add":s.startsWith("-")?"del":"same",children:[i.jsx("span",{className:"sign",children:s.startsWith("+")?"+":s.startsWith("-")?"−":" "}),s.slice(1)||" "]},a))})]})}const CE=(e,t)=>e.part===t.part&&(e.index??0)===(t.index??0);function to({review:e,at:t,children:n}){const[r,s]=j.useState(null),[a,o]=j.useState("");if(!e)return i.jsx(i.Fragment,{children:n});const l=e.comments.map((u,h)=>({c:u,i:h})).filter(({c:u})=>CE(u,t)),c=()=>{a.trim()&&e.add({...t,text:a.trim()}),o(""),s(null)};return i.jsxs("div",{className:`part ${r?"open":""}`,children:[i.jsxs("div",{className:"partbody",children:[i.jsx("div",{className:"partmain",children:r==="edit"?i.jsx(EE,{review:e,at:t,onDone:()=>s(null)}):n}),r!=="edit"&&i.jsxs("span",{className:"parttools",children:[i.jsx("button",{className:"iconbtn",title:"Comment on this","aria-label":"Comment on this",onClick:()=>s("comment"),children:i.jsx(j1,{size:13})}),e.canEdit(t)&&i.jsx("button",{className:"iconbtn",title:"Edit it yourself","aria-label":"Edit it yourself",onClick:()=>s("edit"),children:i.jsx(dd,{size:13})})]})]}),l.map(({c:u,i:h})=>i.jsxs("div",{className:"pcomment",children:[i.jsx(j1,{size:12})," ",i.jsx("span",{children:u.text}),i.jsx("button",{className:"iconbtn","aria-label":"Remove comment",onClick:()=>e.remove(h),children:i.jsx($t,{size:12})})]},h)),r==="comment"&&i.jsxs("div",{className:"pcomment new",children:[i.jsx("input",{className:"input",autoFocus:!0,value:a,placeholder:"Your comment on this part. Enter to add",onChange:u=>o(u.target.value),onKeyDown:u=>{u.key==="Enter"&&c(),u.key==="Escape"&&s(null)}}),i.jsx("button",{className:"btn sm",onClick:c,children:"Add"})]})]})}function EE({review:e,at:t,onDone:n}){const r=X(),s=e.t,a=t.index??0,[o,l]=j.useState(t.part==="story"?s.story??"":t.part==="step"?s.steps?.[a]?.title??"":""),[c,u]=j.useState(s.criteria?.[a]??{given:"",when:"",then:""}),h=()=>r.mutate({path:`/api/v1/tickets/${s.id}/plan/edit`,body:t.part==="criterion"?{...t,criterion:c}:{...t,text:o},done:"Edited. Your wording stays."},{onSuccess:n});return i.jsxs("div",{className:"editpart",children:[t.part==="criterion"?["given","when","then"].map(d=>i.jsxs("label",{children:[i.jsx("em",{children:d[0].toUpperCase()+d.slice(1)}),i.jsx("input",{className:"input",value:c[d],onChange:f=>u({...c,[d]:f.target.value})})]},d)):i.jsx("textarea",{className:"waynote",rows:t.part==="story"?3:2,autoFocus:!0,value:o,onChange:d=>l(d.target.value)}),i.jsxs("div",{className:"editbtns",children:[i.jsx("button",{className:"btn sm pri",disabled:r.isPending,onClick:h,children:"Save"}),i.jsx("button",{className:"btn sm",onClick:n,children:"Cancel"})]})]})}const H0=e=>e?`Given ${e.given}, when ${e.when}, then ${e.then}.`:"";function TE({t:e}){const[t,n]=j.useState(!0),r=e.planReview?.before;if(!r)return null;const s=[],a=(c,u="",h="")=>u!==h&&s.push({label:c,old:u,now:h});a("The story",r.story,e.story);const o=Math.max(r.criteria?.length??0,e.criteria?.length??0);for(let c=0;c<o;c++)a(`Done when ${c+1}`,H0(r.criteria?.[c]),H0(e.criteria?.[c]));(r.decision!==void 0||e.decision)&&a("The decision",r.decision,e.decision?`${e.decision.title}: ${e.decision.options.find(c=>c.chosen)?.name??""}`:"");const l=Math.max(r.steps?.length??0,e.steps?.length??0);for(let c=0;c<l;c++)a(`Step ${c+1}`,r.steps?.[c],e.steps?.[c]?.title);return i.jsxs("div",{className:"changed",children:[i.jsxs("button",{className:"changedhead",onClick:()=>n(!t),children:[i.jsx("b",{children:"What changed"})," ",s.length?`${s.length} ${s.length===1?"part":"parts"}`:"nothing"," since the last version ",t?"▾":"▸"]}),t&&i.jsxs(i.Fragment,{children:[(e.planReview?.sent??[]).length>0&&i.jsxs("div",{className:"sentlist",children:["Your comments:"," ",e.planReview.sent.map((c,u)=>i.jsxs("span",{children:["“",c.text,"”"]},u))]}),s.map(c=>i.jsxs("div",{className:"chrow",children:[i.jsx("div",{className:"chlabel",children:c.label}),i.jsx("div",{className:c.old?"chold":"chold empty",children:c.old||i.jsx("i",{children:"new"})}),i.jsx("div",{className:"chnew",children:c.now||i.jsx("i",{children:"removed"})})]},c.label))]})]})}const PE={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"},RE=["analyst","architect","builder","reviewer","tester"],Lp="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 Zx(e,t){e.runs+=t.runs;for(const n of["inputTokens","cachedTokens","outputTokens","costUsd"])t[n]!==void 0&&(e[n]=(e[n]??0)+t[n]);t.tokensUnknown&&(e.tokensUnknown=(e.tokensUnknown??0)+t.tokensUnknown),t.costUnknown&&(e.costUnknown=(e.costUnknown??0)+t.costUnknown)}function Yx(e){const t={runs:0};for(const n of e)Zx(t,n);return t}function AE(e){return RE.flatMap(t=>{const n=e.filter(s=>s.role===t);if(!n.length)return[];const r=[];for(const s of n){let a=r.find(o=>o.level===s.level&&o.model===s.model);a||r.push(a={level:s.level,model:s.model,steps:[],total:{runs:0}}),a.steps.includes(s.step)||a.steps.push(s.step),Zx(a.total,s)}return[{role:t,total:Yx(n),levels:r}]})}function aa(e){return e.costUsd===void 0?null:e.costUsd<.005?"under $0.01":`$${e.costUsd.toFixed(2)}`}function no(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 Ld=e=>`${e} ${e===1?"run":"runs"}`;function W0({t:e}){const t=aa(e);return t?i.jsxs("span",{title:e.costUnknown?`${Ld(e.costUnknown)} did not report a cost, so the real amount is higher`:void 0,children:[t,e.costUnknown?i.jsxs("span",{className:"note",children:[" +",e.costUnknown," not reported"]}):null]}):i.jsx("span",{className:"note",children:"Not reported"})}function V0({t:e}){if(e.inputTokens===void 0&&e.outputTokens===void 0)return i.jsx("span",{className:"note",children:"Not reported"});const t=e.cachedTokens?`, ${no(e.cachedTokens)} of it read again from earlier in the conversation, which costs less`:"";return i.jsxs("span",{title:`Tokens are the pieces of text the AI reads and writes. It read ${no(e.inputTokens??0)}${t}.`,children:[e.inputTokens!==void 0&&i.jsxs(i.Fragment,{children:[no(e.inputTokens)," read"]}),e.inputTokens!==void 0&&e.outputTokens!==void 0&&" · ",e.outputTokens!==void 0&&i.jsxs(i.Fragment,{children:[no(e.outputTokens)," written"]})]})}function LE({level:e,model:t}){return t?i.jsxs(i.Fragment,{children:[t," ",i.jsx("span",{className:"note",children:e})]}):i.jsx(i.Fragment,{children:e})}function Xx({roles:e,total:t,steps:n}){return i.jsxs("table",{className:"table usage",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{children:"Role"}),i.jsx("th",{children:"Model level"}),i.jsx("th",{children:n?"What it did":"Runs"}),i.jsx("th",{children:"Tokens"}),i.jsx("th",{className:"num",children:"Cost"})]})}),i.jsx("tbody",{children:e.flatMap(r=>r.levels.map((s,a)=>i.jsxs("tr",{children:[i.jsx("td",{children:a===0&&i.jsxs("span",{className:"who",children:[i.jsx(Ws,{role:r.role,small:!0})," ",Lr[r.role]]})}),i.jsx("td",{children:i.jsx(LE,{level:s.level,model:s.model})}),i.jsx("td",{children:n?i.jsxs(i.Fragment,{children:[s.steps.map(o=>PE[o]??o).join(", "),i.jsxs("span",{className:"note",children:[" · ",Ld(s.total.runs)]})]}):s.total.runs}),i.jsx("td",{children:i.jsx(V0,{t:s.total})}),i.jsx("td",{className:"num",children:i.jsx(W0,{t:s.total})})]},`${r.role}-${s.level}-${s.model}`)))}),i.jsx("tfoot",{children:i.jsxs("tr",{children:[i.jsx("td",{children:"Total"}),i.jsx("td",{}),i.jsx("td",{children:n?i.jsx("span",{className:"note",children:Ld(t.runs)}):t.runs}),i.jsx("td",{children:i.jsx(V0,{t})}),i.jsx("td",{className:"num",children:i.jsx(W0,{t})})]})})]})}function Jx({t:e}){const t=e.usage??[],n=Yx(t);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"lbl",children:["What it used",t.length>0&&i.jsx("span",{className:"pill",children:aa(n)?`${aa(n)} at API prices`:"Cost not reported"})]}),t.length?i.jsxs(i.Fragment,{children:[i.jsx(Xx,{roles:AE(t),total:n,steps:!0}),i.jsxs("p",{className:"note",style:{marginTop:8},children:[Lp," Each role's model level can be changed on the Squad page."]})]}):i.jsx("p",{className:"note",children:"Nothing yet. Each run of a role is counted here as the squad works."})]})}function e3(){return ge({queryKey:["usage"],queryFn:()=>be("/api/v1/usage"),refetchInterval:5e3})}function _E(){const e=e3().data?.total;return e?.runs?i.jsxs("span",{title:Lp,children:["Used ",i.jsx("b",{children:aa(e)??"an unknown amount"})," at API prices"]}):null}function IE(){const e=e3().data;return e?.total.runs?i.jsxs(i.Fragment,{children:[i.jsx("h2",{style:{marginTop:30},children:"What the squad used"}),i.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?` (${aa(e.project)??"cost not reported"})`:"",". ",Lp," Change a role's model level with its Edit button above."]}),i.jsx("div",{style:{marginTop:10},children:i.jsx(Xx,{roles:e.roles,total:e.total})})]}):null}function ja(e){return e.owner?.trim()||e.createdBy}function ml(e,t){return!!e?.trim()&&e.trim().toLowerCase()===t?.trim().toLowerCase()}function Yl(){const e=Tt();return e.data?.ready?e.data.meta.user?.name:void 0}function Qn(e,t){return ml(ja(e),t)}function zE(e,t){return Qn(e,t)&&!e.takenOver&&e.stage!=="release"&&e.stage!=="done"}function FE({t:e}){const[t,n]=j.useState(!1);return i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn sm",onClick:()=>n(!0),title:"Give this ticket to a teammate. Their squad carries on from its branch.",children:[i.jsx(al,{size:13})," Hand over"]}),t&&i.jsx(ME,{t:e,onClose:()=>n(!1)})]})}function ME({t:e,onClose:t}){const n=X(),r=X(),s=Tt(),a=Yl(),[o,l]=j.useState(""),[c,u]=j.useState(""),h=s.data?.ready?s.data.meta.engine==="live":!0,d=e.branch??`squad/${e.id.toLowerCase()}`,f=!!(e.live||e.squad||e.stopRequested),p=e.chat?.open?"A chat is open on this ticket. Finish the talk first.":f?"The squad is working on it right now. It hands over once the step is done, or you stop it.":null,m=j.useMemo(()=>{const y=new Map;for(const x of s.data?.ready?s.data.tickets:[])for(const k of[ja(x),x.createdBy,x.specApproved?.by,x.handedOver?.from,x.handedOver?.to,...(x.notes??[]).map(w=>w.by)])k?.trim()&&!ml(k,a)&&y.set(k.trim().toLowerCase(),k.trim());return[...y.values()].slice(0,8)},[s.data,a]),g=o.trim()||"them",v=()=>o.trim()&&n.mutate({path:`/api/v1/tickets/${e.id}/hand-over`,body:{to:o,note:c},done:`Handed ${e.id} over to ${o.trim()}. Their squad carries on from the branch.`},{onSuccess:t});return i.jsxs(pt,{title:`Hand over ${e.id}`,onClose:t,icon:i.jsx("span",{className:"glyph",children:i.jsx(al,{size:15})}),footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:!o.trim()||!!p||n.isPending,onClick:v,children:[i.jsx(al,{size:15})," ",n.isPending?"Pushing…":"Hand over"]}),i.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad hand-over ${e.id} ${o.trim()||"Name"}${c.trim()?` --note "${c.trim()}"`:""}`})]}),children:[i.jsx("p",{children:"Give this ticket to a teammate. Their squad carries on where it is now."}),p&&i.jsxs("div",{className:"stuckbox",style:{marginBottom:14,display:"flex",gap:10,alignItems:"center"},children:[i.jsx("span",{style:{flex:1},children:p}),f&&!e.chat?.open&&i.jsxs("button",{className:"btn sm",disabled:e.stopRequested||r.isPending,onClick:()=>r.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[i.jsx(ta,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]})]}),i.jsxs("div",{className:"field",children:[i.jsx("label",{htmlFor:"handover-to",children:"Hand it over to"}),i.jsx("input",{id:"handover-to",className:"input",autoFocus:!0,value:o,placeholder:"Their name, as their board shows it",onChange:y=>l(y.target.value),onKeyDown:y=>y.key==="Enter"&&!p&&v()}),m.length>0&&i.jsx("div",{className:"pills",style:{marginTop:8},children:m.map(y=>i.jsxs("button",{className:`pill click ${ml(y,o)?"on":""}`,onClick:()=>l(y),children:[i.jsx(ay,{size:12})," ",y]},y))})]}),i.jsxs("div",{className:"field",children:[i.jsxs("label",{htmlFor:"handover-note",children:["A note for ",g," (optional)"]}),i.jsx("textarea",{id:"handover-note",className:"input",rows:2,value:c,placeholder:"Where you got to, and anything to watch out for. Every agent reads it too.",onChange:y=>u(y.target.value)})]}),i.jsx("div",{className:"lbl",children:"What happens"}),i.jsxs("ul",{className:"brief",children:[h?i.jsxs(i.Fragment,{children:[i.jsxs("li",{children:["squad-kit saves the work so far and the ticket's documents on its branch, ",i.jsx("span",{className:"mono",children:d}),", and pushes it."]}),i.jsxs("li",{children:[g==="them"?"They become":`${g} 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."]})]}):i.jsxs("li",{children:[g==="them"?"They become":`${g} becomes`," the owner. This is a sample board, so nothing is pushed."]}),i.jsx("li",{children:"Your squad stops working on it. You still see it on your board, with its new owner."})]}),i.jsx("div",{className:"lbl",children:"What stays on this computer"}),i.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 OE({t:e}){const t=Yl(),n=e.handedOver;return!n||!ml(n.to,t)||!Qn(e,t)?null:i.jsxs("div",{className:"calm",style:{flex:"none",margin:"16px 28px 0"},children:[i.jsx("span",{className:"ring",children:i.jsx(al,{size:16})}),i.jsxs("div",{children:[i.jsxs("b",{children:[n.from," handed this ticket to you ",An(n.at)]}),i.jsxs("span",{children:["The spec, the design, the notes and the code came with its branch. Live progress, agent chats and screenshots stayed on ",n.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 $E({t:e}){const t=ja(e),n=e.handedOver;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"calm",children:[i.jsx("span",{className:"ring",children:i.jsx(ay,{size:17})}),i.jsxs("div",{children:[i.jsxs("b",{children:[t," owns this ticket"]}),i.jsxs("span",{children:[n?`${n.from} handed it to ${n.to} ${An(n.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."]})]})]}),i.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."]})]}),i.jsxs("div",{className:"df",children:[i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad show ${e.id}`})]})]})}function DE({id:e,onClose:t}){const n=ga(e),r=Yl(),[s,a]=j.useState("now");j.useEffect(()=>a("now"),[e]),j.useEffect(()=>{const l=c=>c.key==="Escape"&&!document.querySelector(".modal")&&t();return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[t]);const o=n.data;return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"veil",onClick:t}),i.jsx("aside",{className:"drawer","aria-label":o?`${o.id} ${o.title}`:"Ticket",children:o?i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"dh",children:[i.jsxs("div",{className:"dtop",children:[i.jsx("span",{className:"idtag",children:o.id}),o.source.type!=="manual"&&(o.source.url?i.jsxs("a",{className:"src",href:o.source.url,target:"_blank",rel:"noreferrer",children:[i.jsx(Tn,{size:14})," ",o.source.itemType??"Item"," ",o.source.ref," ",i.jsx(ir,{size:12})]}):i.jsxs("span",{className:"src",children:[i.jsx(Tn,{size:14})," From ",o.source.ref]})),o.pr&&i.jsxs("a",{className:"src",href:o.pr.url,target:"_blank",rel:"noreferrer",children:[i.jsx($k,{size:14})," Pull request ",o.pr.id," ",i.jsx(ir,{size:12})]}),o.kind==="bug"&&i.jsxs("span",{className:"prio",children:["Bug",o.foundIn?` found in ${o.foundIn}`:""]}),o.priority==="high"&&o.kind!=="bug"&&i.jsx("span",{className:"prio",children:"High priority"}),i.jsx("span",{className:"grow"}),zE(o,r)&&i.jsx(FE,{t:o}),(Qn(o,r)||!r)&&i.jsx(m8,{t:o}),o.waiting?.kind==="proof"&&i.jsx(Te,{to:"/tickets/$id/proof",params:{id:o.id},className:"iconbtn","aria-label":"Open the proof page",children:i.jsx(ir,{size:15})}),i.jsx("button",{className:"iconbtn",onClick:t,"aria-label":"Close",children:i.jsx($t,{size:16})})]}),i.jsx("h2",{children:o.title}),i.jsxs("div",{className:"sub",children:[i.jsxs("span",{children:["Created by ",i.jsx("b",{children:o.createdBy})," ",An(o.createdAt)," · ",i.jsx("b",{children:o.track==="express"?"Express":"Full"})," track"]}),i.jsxs("span",{children:["Owner ",i.jsx("b",{children:ja(o)}),Qn(o,r)?" (you)":""]}),o.repo&&i.jsxs("span",{children:["Repo ",i.jsx("b",{className:"mono",style:{fontSize:12.5},children:o.repo})]}),o.builder&&i.jsxs("span",{children:["Builder ",i.jsx("b",{children:o.builder})]}),o.reviewer&&i.jsxs("span",{children:["Reviewer ",i.jsx("b",{children:o.reviewer})]})]}),i.jsx(c8,{ticket:o})]}),i.jsxs("div",{className:"tabs",role:"tablist",children:[[["now","Now"],["story","Story"],["plan","Plan"],["activity","Activity"],["conversation","Conversation"],["proof","Proof"],["changes","Changes"],["cost","Cost"]].map(([l,c])=>i.jsxs("button",{className:s===l?"on":"",onClick:()=>a(l),children:[c,l==="now"&&(o.waiting||o.outdated?.length||sn(o))&&i.jsx("span",{className:"dot"})]},l)),i.jsxs("button",{className:`dev ${s==="developer"?"on":""}`,onClick:()=>a("developer"),children:[i.jsx(pa,{size:15})," Developer"]})]}),s==="now"&&o.outdated?.length?i.jsx(XE,{t:o}):null,s==="now"&&i.jsx(OE,{t:o}),s==="now"&&(Qn(o,r)||!r)&&i.jsx(f8,{t:o}),s==="now"&&(Qn(o,r)||!r?i.jsx(BE,{t:o}):i.jsx($E,{t:o})),s==="story"&&i.jsx(nT,{t:o}),s==="plan"&&i.jsx(iT,{t:o}),s==="activity"&&i.jsx(aT,{t:o}),s==="conversation"&&i.jsx(qC,{t:o}),s==="proof"&&i.jsx(oT,{t:o}),s==="changes"&&i.jsx(SE,{t:o}),s==="cost"&&i.jsx("div",{className:"db",children:i.jsx(Jx,{t:o})}),s==="developer"&&i.jsx(lT,{t:o})]}):i.jsx("div",{className:"center",children:n.isError?`No ticket ${e}.`:"Loading…"})})]})}function BE({t:e}){if(!e.waiting&&e.quiet)return i.jsx(YE,{t:e});switch(e.waiting?.kind){case"questions":return i.jsx(qE,{t:e});case"spec":case"plan":return i.jsx(WE,{t:e});case"proof":return i.jsx(QE,{t:e});case"stuck":return i.jsx(ZE,{t:e});case"ask":return i.jsx(GE,{t:e});case"yours":return i.jsx(eT,{t:e});case"chat":return e.chat?i.jsx(UE,{t:e}):i.jsx(_d,{t:e});default:return i.jsx(_d,{t:e})}}function UE({t:e}){const t=Ie[e.chat.with];return i.jsx("div",{className:"db",children:i.jsxs("div",{className:"youbox",children:[i.jsx("span",{className:"ring",children:i.jsx(ma,{size:15})}),i.jsxs("div",{children:[i.jsxs("b",{children:["Talking it through with the ",t]}),i.jsx("span",{children:"The talk is open in the chat panel beside the board. Its work waits until you press a button there."})]}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"btn pri sm",onClick:()=>Kt.show(e.id),children:"Open the chat"}),i.jsx(Te,{to:"/conversations",search:{ticket:e.id},className:"btn sm",children:"Full screen"})]})})}function qE({t:e}){const t=X(),[n,r]=j.useState(()=>Object.fromEntries((e.questions??[]).filter(l=>l.answer).map(l=>[l.id,l.answer]))),s=e.questions??[],a=[{from:"analyst",label:"From the Analyst, about what to build"},{from:"architect",label:"From the Architect, about how to build it"}],o=s.every(l=>{const c=n[l.id];return c?c.choice===l.inputOption||c.choice==="Other"?!!c.value?.trim():!0:!1});return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"db",children:a.map(l=>{const c=s.filter(u=>u.from===l.from);return c.length?i.jsxs("div",{className:"qblock",children:[i.jsxs("div",{className:"qgroup",children:[i.jsx(Ws,{role:l.from,small:!0}),l.label]}),c.map(u=>i.jsx(HE,{t:e,q:u,n:s.indexOf(u)+1,answer:n[u.id],onAnswer:h=>r(d=>({...d,[u.id]:h}))},u.id))]},l.from):null})}),i.jsxs("div",{className:"df",children:[i.jsxs("button",{className:"btn pri",disabled:!o||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/answers`,body:{answers:n},done:"Answers sent. The Architect is choosing the design."}),children:[i.jsx(Dl,{size:15})," Send answers"]}),i.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"}),i.jsx(ba,{t:e,agent:"analyst",label:"Talk it through instead"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad answer ${e.id}`})]})]})}function HE({t:e,q:t,n,answer:r,onAnswer:s}){const a=X(),[o,l]=j.useState(!1),[c,u]=j.useState(""),h=()=>{c.trim()&&(a.mutate({path:`/api/v1/tickets/${e.id}/ask`,body:{questionId:t.id,text:c}}),u(""),l(!1))},d=[...t.options,"Other"];return i.jsxs("div",{className:"q",children:[i.jsxs("h4",{children:[n,". ",t.text]}),(t.thread?.length||t.thinking)&&i.jsxs("div",{className:"thread",children:[t.thread?.map((f,p)=>i.jsxs("div",{className:`msg ${f.who==="you"?"":"squad"}`,children:[i.jsx("small",{children:f.who==="you"?"You":Lr[f.who]}),f.text]},p)),t.thinking&&i.jsxs("div",{className:"msg squad",children:[i.jsx("small",{children:Lr[t.from]}),i.jsxs("span",{className:"typing","aria-label":"Writing a reply",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]})]})]}),i.jsx("div",{className:"choices",children:d.map(f=>{const p=r?.choice===f,m=f===t.inputOption||f==="Other";return i.jsxs("div",{className:`choice ${p?"on":""}`,role:"radio","aria-checked":p,tabIndex:0,onClick:()=>!p&&s({choice:f}),onKeyDown:g=>g.key==="Enter"&&s({choice:f}),children:[i.jsx("span",{className:"rd"}),f==="Other"?"Other":f.replace(/:$/,""),m&&p&&i.jsx("input",{autoFocus:!0,value:r?.value??"",placeholder:f==="Other"?"Your answer":"Which one?",onChange:g=>s({choice:f,value:g.target.value}),onClick:g=>g.stopPropagation()})]},f)})}),o?i.jsxs("div",{className:"askrow",children:[i.jsx("input",{className:"input",autoFocus:!0,value:c,onChange:f=>u(f.target.value),placeholder:`Ask the ${Lr[t.from]} about this question`,onKeyDown:f=>f.key==="Enter"&&h()}),i.jsx("button",{className:"btn",onClick:h,disabled:!c.trim(),children:"Ask"})]}):i.jsxs("button",{className:"asklink",onClick:()=>l(!0),disabled:t.thinking,children:[i.jsx(ma,{size:14})," Ask about this"]})]})}function gl({t:e,review:t}){return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"The story"}),i.jsx(to,{review:t,at:{part:"story"},children:i.jsx("p",{className:"story",children:e.story})}),e.criteria&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Done when"}),i.jsx("ol",{className:"ac",children:e.criteria.map((n,r)=>i.jsx("li",{children:i.jsx(to,{review:t,at:{part:"criterion",index:r},children:i.jsxs("span",{children:[i.jsx("em",{children:"Given"})," ",n.given,", ",i.jsx("em",{children:"when"})," ",n.when,", ",i.jsx("em",{children:"then"})," ",n.then,"."]})})},r))})]}),e.decision&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"lbl",children:["The Architect's decision ",e.decision.adr&&i.jsxs("span",{className:"pill ok",children:["Saved as ",e.decision.adr]})]}),i.jsx(to,{review:t,at:{part:"decision"},children:i.jsxs("div",{className:"decision",children:[i.jsxs("h3",{children:[i.jsx(Ws,{role:"architect",small:!0}),e.decision.title]}),i.jsx("div",{className:"opts2",children:e.decision.options.map(n=>i.jsxs("div",{className:`opt2 ${n.chosen?"pick":""}`,children:[i.jsxs("b",{children:[n.name,n.chosen&&i.jsxs("span",{children:[i.jsx(te,{size:13,strokeWidth:2.5})," Chosen"]})]}),n.note]},n.name))}),i.jsxs("div",{className:"why",children:[i.jsxs("span",{children:[i.jsx("b",{children:"Why"})," ",e.decision.why]}),e.decision.clientCheck&&i.jsxs("span",{children:[i.jsx("b",{children:"Client's choice"})," ",e.decision.clientCheck]}),e.decision.replaces&&i.jsxs("span",{children:[i.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&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Follows saved decisions"}),i.jsx("div",{className:"pills",children:e.follows.map(n=>i.jsx(Te,{to:"/architecture",search:{adr:n},className:"pill",children:n},n))})]}),e.mockup&&e.work&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"How it will look"}),i.jsx(bp,{ticket:e.id,file:e.mockup,title:`${e.title}: mockup`})]}),e.work&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"The work"}),i.jsxs("div",{className:"pills",children:[i.jsxs("span",{className:"pill",children:[e.work.steps," small steps"]}),i.jsxs("span",{className:"pill",children:[e.work.tests," new tests"]}),e.work.screens>0&&i.jsxs("span",{className:"pill",children:[e.work.screens," before and after screens"]})]})]}),t&&e.work&&e.steps&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Build steps"}),i.jsx("ol",{className:"ac",children:e.steps.map((n,r)=>i.jsx("li",{children:i.jsx(to,{review:t,at:{part:"step",index:r},children:i.jsx("span",{children:n.title})})},r))})]})]})}function WE({t:e}){const t=X(),[n,r]=j.useState(null),[s,a]=j.useState(""),[o,l]=j.useState(!1),[c,u]=j.useState([]),h=e.waiting?.kind==="spec",d=!h&&!!e.specApproved,f=h?"the Analyst":d?"the Architect":"the Spec writer",p={t:e,comments:c,add:v=>u(y=>[...y,v]),remove:v=>u(y=>y.filter((x,k)=>k!==v)),canEdit:v=>h?v.part==="story"||v.part==="criterion":v.part==="step"||!d&&(v.part==="story"||v.part==="criterion")},m=()=>n==="over"?t.mutate({path:`/api/v1/tickets/${e.id}/plan/start-over`,body:{direction:s},done:`Starting over. ${f[0].toUpperCase()}${f.slice(1)} writes it again.`}):t.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:s},done:`Sent to ${f}.`}),g=c.length;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[(h||d)&&i.jsxs("div",{className:"twostep",children:[i.jsxs("span",{className:h?"on":"done",children:[h?"1":i.jsx(te,{size:12,strokeWidth:3})," The what"]}),i.jsx("span",{className:"bar"}),i.jsx("span",{className:d?"on":"",children:"2 The how"}),i.jsx("p",{children:h?'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.`})]}),i.jsx(TE,{t:e}),i.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."}),h?i.jsx(gl,{t:{...e,decision:void 0,work:void 0},review:p}):i.jsx(gl,{t:e,review:p}),!h&&e.decision&&i.jsx("p",{className:"note",style:{marginTop:14},children:"Approved decisions are saved in Decisions. Later tickets must follow them."})]}),n?i.jsxs("div",{className:"df",children:[i.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:s,onChange:v=>a(v.target.value),placeholder:n==="over"?"What is the new direction? It is written again from zero.":"What should change? One line is enough.",onKeyDown:v=>v.key==="Enter"&&s.trim()&&m()}),i.jsx("button",{className:"btn pri",disabled:!s.trim()||t.isPending,onClick:m,children:n==="over"?"Start over":"Send"}),i.jsx("button",{className:"btn",onClick:()=>r(null),children:"Cancel"})]}):i.jsxs("div",{className:"df",children:[g>0?i.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/plan/send-back`,body:{comments:c},done:`Sent back to ${f} with ${g} ${g===1?"comment":"comments"}.`},{onSuccess:()=>u([])}),children:[i.jsx(Dl,{size:15})," Send back (",g,")"]}):i.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:h?"Spec approved. The Architect is designing how to build it.":"Plan approved. The Builder started."}),children:[i.jsx(te,{size:15,strokeWidth:2.5})," ",h?"Approve spec":d?"Approve design":"Approve plan"]}),g===0&&i.jsx("button",{className:"btn",onClick:()=>r("change"),children:"Change something"}),(h||d)&&i.jsx(ba,{t:e,agent:h?"analyst":"architect",label:"Talk it through"}),i.jsx("button",{className:"btn quiet",onClick:()=>r("over"),children:"Start over"}),i.jsx("button",{className:"btn quiet",onClick:()=>l(!0),children:"Ask a developer"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:g>0?`squad send-back ${e.id} ${c.map(v=>`"${VE(v)}: ${v.text}"`).join(" ")}`:`squad approve ${e.id}`})]}),o&&i.jsx(KE,{t:e,onClose:()=>l(!1)})]})}function VE(e){return e.part==="criterion"?`done when ${(e.index??0)+1}`:e.part==="step"?`step ${(e.index??0)+1}`:e.part}function KE({t:e,onClose:t}){const{toast:n}=ze(),r=`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 i.jsxs(pt,{title:"Ask a developer",onClose:t,footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",onClick:()=>void navigator.clipboard?.writeText(r).then(()=>n("Message copied")),children:[i.jsx(fa,{size:15})," Copy message"]}),i.jsx("button",{className:"btn",onClick:t,children:"Close"})]}),children:[i.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."}),i.jsx("div",{className:"wa",children:r})]})}function _p({t:e}){const t=e.gates,n=(r,s)=>i.jsxs("span",{className:`pill ${r==="pass"?"ok":r==="skipped"?"skip":"wait"}`,children:[r==="pass"&&i.jsx(te,{size:13,strokeWidth:2.5}),s]});return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"pills",children:[n(t?.checks,t?.checks==="skipped"?"Checks failed, you continued":t?.checksText??"All checks pass"),n(t?.review,t?.review==="pass"?`Review approved by ${t.reviewBy}`:t?.review==="skipped"?"Review notes open, you continued":"Review approved"),n(t?.proof,t?.proof==="skipped"?"No screenshots, you continued":"Proof made")]}),e.overrides?.map(r=>i.jsxs("p",{className:"note override",children:[i.jsx("b",{children:"Continued anyway"})," past the ",r.gate==="checks"?"failed checks":r.gate==="proof"?"missing screenshots":"open review",", by ",r.by,": ",r.reason]},r.at))]})}function t3({t:e}){const[t,n]=j.useState(null);if(!e.proof?.length)return i.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 r=e.proof.flatMap(s=>[{src:Kn(`/api/v1/proof/${s.before}`),caption:`${s.criterion} · ${s.beforeLabel}`},{src:Kn(`/api/v1/proof/${s.after}`),caption:`${s.criterion} · ${s.afterLabel}`}]);return i.jsxs(i.Fragment,{children:[t!==null&&i.jsx(Qs,{pictures:r,start:t,onClose:()=>n(null)}),e.proof.map((s,a)=>i.jsxs("div",{className:"critrow",children:[i.jsxs("h5",{children:[i.jsx(te,{size:15,strokeWidth:2.5}),s.criterion]}),i.jsxs("div",{className:"proofmini",children:[i.jsxs("div",{children:[i.jsx("small",{children:s.beforeLabel}),i.jsx("button",{className:"zoom",onClick:()=>n(a*2),"aria-label":`Open ${s.beforeLabel} full size`,children:i.jsx("img",{src:Kn(`/api/v1/proof/${s.before}`),alt:`${s.criterion}, ${s.beforeLabel}`})})]}),i.jsxs("div",{children:[i.jsx("small",{children:s.afterLabel}),i.jsx("button",{className:"zoom",onClick:()=>n(a*2+1),"aria-label":`Open ${s.afterLabel} full size`,children:i.jsx("img",{src:Kn(`/api/v1/proof/${s.after}`),alt:`${s.criterion}, ${s.afterLabel}`})})]})]})]},s.criterion))]})}function n3({t:e,sticky:t}){const n=X(),[r,s]=j.useState(!1),[a,o]=j.useState(""),l=()=>n.mutate({path:`/api/v1/tickets/${e.id}/change`,body:{text:a},done:"Sent back to the Builder with your note."});return r?i.jsxs("div",{className:t?"stickybar":"df",children:[i.jsx("input",{className:"input",style:{flex:1},autoFocus:!0,value:a,onChange:c=>o(c.target.value),placeholder:"What's wrong? Tell the squad in one line.",onKeyDown:c=>c.key==="Enter"&&a.trim()&&l()}),i.jsx("button",{className:"btn pri",disabled:!a.trim(),onClick:l,children:"Send back"}),i.jsx("button",{className:"btn",onClick:()=>s(!1),children:"Cancel"})]}):i.jsxs("div",{className:t?"stickybar":"df",children:[i.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/tickets/${e.id}/approve`,done:`${e.id} is ready to release.`}),children:[i.jsx(te,{size:15,strokeWidth:2.5})," Looks right"]}),i.jsx("button",{className:"btn",onClick:()=>s(!0),children:"Something's wrong"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad approve ${e.id}`})]})}function QE({t:e}){return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"youbox",children:[i.jsx("span",{className:"ring",children:i.jsx(te,{size:18,strokeWidth:2.5})}),i.jsxs("div",{children:[i.jsx("b",{children:"Check that it works the way you want"}),i.jsx("span",{children:'Every gate is green. Compare the screens before and after each "done when".'})]}),i.jsx("span",{className:"grow"}),i.jsxs(Te,{to:"/tickets/$id/proof",params:{id:e.id},className:"btn sm",children:[i.jsx(ir,{size:14})," Full page"]})]}),i.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),i.jsx(_p,{t:e}),i.jsx("div",{className:"lbl",children:"Before and after"}),i.jsx(t3,{t:e})]}),i.jsx(n3,{t:e})]})}const eu="Decide yourself: take the simplest choice that fits the plan, and say what you chose";function GE({t:e}){const t=X(),n=e.agentQuestion,[r,s]=j.useState(null),[a,o]=j.useState("");if(!n)return i.jsx(_d,{t:e});const l={architect:"Architect",builder:"Builder",reviewer:"Reviewer"}[n.from],c=r===""?a.trim():r,u=[...n.options,eu];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"youbox",children:[i.jsx("span",{className:"ring",children:"?"}),i.jsxs("div",{children:[i.jsxs("b",{children:["The ",l," has a question"]}),i.jsx("span",{children:"It stopped instead of guessing. Your answer goes back into the same conversation, and the work carries on."})]})]}),i.jsxs("div",{className:"lbl",children:[l," asks"]}),i.jsx("p",{className:"stuckq",children:n.text}),n.why&&i.jsxs("p",{className:"note",style:{marginTop:-4},children:["Why it matters: ",n.why]}),n.files&&n.files.length>0&&i.jsx(OC,{ticket:e.id,files:n.files}),i.jsxs("div",{className:"opts2",children:[u.map(h=>i.jsxs("button",{className:`opt2 ${r===h?"pick":""}`,onClick:()=>s(h),children:[i.jsxs("b",{children:[h===eu?"Let it decide":h,r===h&&i.jsxs("span",{children:[i.jsx(te,{size:13,strokeWidth:2.5})," Your pick"]})]}),h===eu?"It takes the simplest choice that fits the plan and tells you which.":""]},h)),i.jsx("button",{className:`opt2 ${r===""?"pick":""}`,onClick:()=>s(""),children:i.jsx("b",{children:"Write my own answer"})})]}),r===""&&i.jsx("textarea",{className:"input",rows:3,style:{width:"100%",marginTop:8},autoFocus:!0,value:a,placeholder:"Your answer",onChange:h=>o(h.target.value)}),i.jsx(Sa,{t:e})]}),i.jsxs("div",{className:"df",children:[i.jsxs("button",{className:"btn pri",disabled:!c||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/reply`,body:{text:c},done:`Sent. The ${l} carries on.`}),children:[i.jsx(Dl,{size:15})," Send answer"]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad reply ${e.id}${c?` "${c.length>40?`${c.slice(0,40)}…`:c}"`:""}`})]})]})}function ZE({t:e}){const t=X(),[n,r]=j.useState(null),[s,a]=j.useState(""),o=e.stuck?.options??[],l=n===null?void 0:o[n]?.do??(n===0?"retry":void 0),c=l==="continue"&&!s.trim(),u=l==="yourself"?"I fixed it, check again":l==="continue"?"Continue anyway":l==="retry"?"Try again":"Decide",h=l==="continue"?` --reason "${s.trim()||"…"}"`:l==="retry"&&s.trim()?` --note "${s.trim()}"`:"";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"youbox",children:[i.jsx("span",{className:"ring",children:"!"}),i.jsxs("div",{children:[i.jsx("b",{children:"The squad stopped and needs your decision"}),i.jsx("span",{children:"Read what happened, then pick a way out. Nothing is lost whatever you pick."})]})]}),i.jsx("div",{className:"lbl",children:"What happened"}),i.jsx("p",{className:"stuckq",children:e.stuck?.question}),i.jsx("div",{className:"opts2",children:o.map((d,f)=>i.jsxs("button",{className:`opt2 ${n===f?"pick":""}`,onClick:()=>{r(f),a("")},children:[i.jsxs("b",{children:[d.name,n===f&&i.jsxs("span",{children:[i.jsx(te,{size:13,strokeWidth:2.5})," Your pick"]})]}),d.note]},d.name))}),l==="retry"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"A note for the squad (optional)"}),i.jsx("textarea",{className:"waynote",rows:2,value:s,onChange:d=>a(d.target.value),placeholder:"For example: the test server needs the VPN, it is on now"})]}),l==="continue"&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Why continue anyway?"}),i.jsx("textarea",{className:"waynote",rows:2,value:s,onChange:d=>a(d.target.value),placeholder:"For example: the failing test is broken on main too, fixed in SK-160"}),i.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."})]}),l==="yourself"&&i.jsxs("div",{className:"stuckbox",children:[i.jsxs("p",{style:{margin:"0 0 8px"},children:["Open the ticket's copy, fix it, and save. Then press ",i.jsx("b",{children:"I fixed it"}),": the checks, review and proof run again."]}),i.jsx(Zl,{t:e})]}),i.jsx(Sa,{t:e})]}),i.jsxs("div",{className:"df",children:[i.jsxs("button",{className:"btn pri",disabled:n===null||c||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decide`,body:{choice:n,...l==="continue"?{reason:s}:l==="retry"?{note:s}:{}},done:l==="yourself"?"OK. The checks run again on your fix.":"Decided. The squad carries on."}),children:[i.jsx(te,{size:15,strokeWidth:2.5})," ",u]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad decide ${e.id}${n!==null?` ${n+1}`:""}${h}`})]})]})}function YE({t:e}){const t=X(),n=e.quiet,r=n.kind==="stuck";return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsx("div",{className:"lbl",children:r?"This step looks stuck":"This step is taking long"}),i.jsxs("div",{className:"stuckbox",children:[i.jsx("p",{style:{margin:0},children:n.detail}),n.command&&i.jsx("p",{className:"mono",style:{fontSize:12.5,margin:"8px 0 0",overflowWrap:"anywhere"},children:n.command}),i.jsxs("p",{className:"note",style:{margin:"8px 0 0",fontSize:12.5},children:["No progress since ",Ms(n.since),". Nothing is lost whatever you choose."]})]}),i.jsx("div",{className:"lbl",children:"What to do"}),i.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[n.pid&&i.jsx("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/unstick`,done:"Ended the stuck command. The squad carries on."}),children:"End the stuck command"}),i.jsx("button",{className:"btn",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/keep-waiting`,done:"OK. squad-kit stays quiet about it for 10 minutes."}),children:"Keep waiting"}),i.jsxs("button",{className:"btn",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/stop`,done:"Stopping. The work so far is kept."}),children:[i.jsx(ta,{size:13})," Stop"]})]}),i.jsx("p",{className:"note",style:{marginTop:10,fontSize:12.5},children:"Ending the command gives the squad an error back, and it carries on in the same conversation. See what it was doing in the Conversation tab."})]}),i.jsxs("div",{className:"foot",children:[i.jsx("span",{className:"grow"}),i.jsx(ne,{text:n.pid?`squad unstick ${e.id}`:`squad stop ${e.id}`})]})]})}function XE({t:e}){const t=X(),[n,r]=j.useState(null),[s,a]=j.useState(""),o=!!e.mergedAt||e.stage==="done";return i.jsx("div",{className:"outdated",children:e.outdated.map(l=>i.jsxs("div",{className:"outdated-item",children:[i.jsxs("div",{className:"outdated-head",children:[i.jsx("span",{className:"ic",children:i.jsx(Hh,{size:15})}),i.jsxs("b",{children:[i.jsx(Te,{to:"/architecture",search:{adr:l.adr},children:l.adr})," came after this plan and changes it"]})]}),i.jsx("p",{children:l.why}),i.jsxs("p",{children:[i.jsx("span",{className:"note",children:o?"What a follow-up would change:":"What would change:"})," ",l.change]}),n===l.adr?i.jsxs("div",{className:"row",children:[i.jsx("input",{className:"input",autoFocus:!0,value:s,onChange:c=>a(c.target.value),placeholder:"Why the plan stays as it is"}),i.jsx("button",{className:"btn sm",disabled:!s.trim()||t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:l.adr,do:"keep",reason:s},done:"Kept the plan. The reason is on the ticket."},{onSuccess:()=>r(null)}),children:"Keep it"}),i.jsx("button",{className:"btn sm quiet",onClick:()=>r(null),children:"Cancel"})]}):i.jsxs("div",{className:"row",children:[i.jsx("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/decision-update`,body:{adr:l.adr,do:"update"},done:o?"Made a follow-up ticket.":"The Architect is updating the plan."}),children:o?"Make a follow-up ticket":"Update the plan"}),i.jsx("button",{className:"btn sm",onClick:()=>{r(l.adr),a("")},children:"Keep it as is"})]})]},l.adr))})}function JE({t:e}){const t=X(),n=e.localSetup,r=n.status==="pending"||n.status==="running";return i.jsxs("div",{className:`localsetup ${n.status}`,children:[i.jsx("span",{className:"ic",children:r?i.jsx(Rn,{size:15,className:"spin"}):n.status==="done"?i.jsx(te,{size:15,strokeWidth:2.5}):i.jsx(Hh,{size:15})}),i.jsxs("div",{children:[i.jsx("b",{children:r?"Updating your copy of the code":n.status==="done"?"Your copy of the code is ready to run":"Your copy of the code needs a hand"}),i.jsx("span",{children:r?"The merge changed your own folder, so the squad installs new packages and runs the database changes there.":n.status==="done"?`New packages and database changes are in your own folder${n.at?`, ${An(n.at)}`:""}${n.seconds!==void 0?` (${n.seconds} s)`:""}.`:"The setup stopped in your own folder. Run it there, or try again."}),i.jsx("code",{children:n.command}),n.status==="failed"&&n.output&&i.jsx("pre",{children:n.output})]}),n.status==="failed"&&i.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 _d({t:e}){const t=X(),n=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:`${tT(e)} You'll get a card when the squad needs you.`};return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"calm",children:[i.jsx("span",{className:"ring",children:e.stage==="release"?i.jsx(ea,{size:18}):i.jsx(te,{size:18,strokeWidth:2.5})}),i.jsxs("div",{children:[i.jsx("b",{children:n.title}),i.jsx("span",{children:n.text})]}),e.stage==="release"&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"grow",style:{flex:1}}),i.jsx(Te,{to:"/releases",className:"btn sm",children:"Open release"})]})]}),e.localSetup&&i.jsx(JE,{t:e}),e.steps&&e.steps.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Steps"}),i.jsx(r3,{t:e})]}),e.gates&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),i.jsx(_p,{t:e})]}),(e.stage==="release"||e.stage==="done")&&e.usage?.length?i.jsx(Jx,{t:e}):null,i.jsx(Sa,{t:e})]}),i.jsxs("div",{className:"df",children:[e.live&&e.stage!=="release"&&e.stage!=="done"&&i.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:[i.jsx(ta,{size:12})," ",e.stopRequested?"Stopping…":"Stop"]}),Np(e)&&i.jsx(Cp,{t:e}),e.chat?.open?i.jsxs("button",{className:"btn sm",onClick:()=>Kt.show(e.id),children:[i.jsx(ma,{size:13})," Open the chat"]}):!e.takenOver&&i.jsx(ba,{t:e,agent:"analyst",label:Dr(e)?"Ask a question":"Ask the Analyst"}),i.jsx("span",{className:"note",children:e.live?"Updates live as the squad works.":""}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:e.live&&e.stage!=="release"?`squad stop ${e.id}`:Wh(e)})]})]})}function eT({t:e}){const t=X(),[n,r]=j.useState(""),s=e.takenOver;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"db",children:[i.jsxs("div",{className:"youbox",children:[i.jsx("span",{className:"ring",children:i.jsx(pa,{size:15})}),i.jsxs("div",{children:[i.jsx("b",{children:"You have this ticket"}),i.jsx("span",{children:"The squad stopped and waits. Nothing runs until you give it back."})]})]}),i.jsx("div",{className:"lbl",children:"1. Open the Builder's session in Claude Code"}),i.jsx(ne,{text:`cd "${s.cwd}" && claude --resume ${s.session}`}),i.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:"}),i.jsx(Zl,{t:e}),i.jsx("div",{className:"lbl",children:"2. Give it back"}),i.jsx("textarea",{className:"waynote",rows:2,value:n,onChange:a=>r(a.target.value),placeholder:"What did you change? (optional, every agent reads it)"}),i.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."}),i.jsx(Sa,{t:e})]}),i.jsxs("div",{className:"df",children:[i.jsxs("button",{className:"btn pri",disabled:t.isPending,onClick:()=>t.mutate({path:`/api/v1/tickets/${e.id}/give-back`,body:{note:n},done:"Given back. The checks run on your changes."}),children:[i.jsx(te,{size:15,strokeWidth:2.5})," Give back"]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad give-back ${e.id}${n.trim()?` "${n.trim()}"`:""}`})]})]})}function tT(e){const t=e.steps??[],n=t.findIndex(r=>r.status==="doing");return e.stage==="implement"&&n>=0?`The Builder is on step ${n+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 r3({t:e}){return i.jsx("ul",{className:"steps",children:e.steps.map((t,n)=>i.jsxs("li",{className:t.status==="doing"?"now":t.status==="todo"?"todo":"",children:[i.jsx("span",{className:`sd ${t.status==="done"?"ok":t.status==="doing"?"now":""}`,children:t.status==="done"&&i.jsx(te,{size:11,strokeWidth:3})}),i.jsxs("span",{children:[t.status==="doing"?i.jsx("b",{style:{fontWeight:600},children:t.title}):t.title,t.live&&i.jsxs("span",{className:"livetxt",children:[i.jsx("span",{className:"live"}),t.live]})]}),i.jsx("span",{className:"time",children:t.status==="done"?`${t.minutes??1} min`:t.status==="doing"?"now":""})]},n))})}function Sa({t:e,all:t}){const n=t?e.activity:e.activity.slice(0,4);return n.length?i.jsxs(i.Fragment,{children:[!t&&i.jsx("div",{className:"lbl",children:"Latest activity"}),i.jsx("div",{className:"feed",children:n.map((r,s)=>i.jsxs("div",{className:"fe",children:[i.jsx("span",{className:"tm",children:Ms(r.at)}),i.jsx(Ws,{role:r.who,small:!0}),i.jsxs("span",{children:[i.jsx("b",{children:Lr[r.who]})," ",r.text.charAt(0).toLowerCase()+r.text.slice(1)]})]},r.at+s))})]}):null}function nT({t:e}){return i.jsxs("div",{className:"db",children:[i.jsx("div",{className:"lbl",children:"What was asked"}),i.jsx("p",{className:"story",style:{whiteSpace:"pre-wrap"},children:e.ask}),i.jsx(nu,{head:"Your acceptance criteria",items:e.brief?.criteria}),i.jsx(nu,{head:"Business rules",items:e.brief?.rules}),i.jsx(nu,{head:"Edge cases",items:e.brief?.edgeCases}),i.jsx(sT,{t:e}),i.jsx(rT,{t:e}),i.jsx(y8,{t:e}),e.story?i.jsx(gl,{t:{...e,decision:void 0,work:void 0}}):i.jsx("p",{className:"note",style:{marginTop:16},children:"The Analyst writes the user story after your answers."})]})}const tu=[{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 rT({t:e}){const t=X(),[n,r]=j.useState("note"),[s,a]=j.useState(""),o=e.notes??[],l=e.stage!=="done",c=tu.find(h=>h.kind===n),u=()=>t.mutate({path:`/api/v1/tickets/${e.id}/notes`,body:{text:s,kind:n},done:e.live?"Added. The squad reads it at its next step.":"Added. Every agent on this ticket reads it."},{onSuccess:()=>a("")});return!l&&!o.length?null:i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"lbl",children:["Notes",o.length?` · ${o.length}`:""]}),o.length>0&&i.jsx("ul",{className:"ticketnotes",children:o.map((h,d)=>i.jsxs("li",{children:[i.jsx("span",{className:`pill ${h.kind==="criterion"?"ok":h.kind==="rule"?"wait":""}`,children:tu.find(f=>f.kind===h.kind)?.head}),i.jsx("span",{className:"grow",children:h.text}),i.jsxs("span",{className:"note",children:[h.by," · ",An(h.at)]})]},d))}),l&&i.jsxs("div",{className:"addnote",children:[i.jsx("div",{className:"seg",style:{width:"fit-content"},children:tu.map(h=>i.jsx("button",{className:n===h.kind?"on":"",onClick:()=>r(h.kind),children:h.label},h.kind))}),i.jsx("textarea",{className:"input",rows:2,value:s,placeholder:c.hint,onChange:h=>a(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)&&s.trim()&&u()}}),i.jsxs("div",{style:{display:"flex",gap:10,alignItems:"center"},children:[i.jsxs("button",{className:"btn pri sm",disabled:!s.trim()||t.isPending,onClick:u,children:["Add ",c.label.toLowerCase()]}),i.jsxs("span",{className:"note",children:["Every agent on this ticket reads it",e.live?", the one working now from its next step":"","."]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad note ${e.id}${n==="note"?"":` --${n}`} "${s.trim()||"…"}"`})]})]})]})}function nu({head:e,items:t}){return t?.length?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:e}),i.jsx("ul",{className:"brief",children:t.map((n,r)=>i.jsx("li",{children:n},r))})]}):null}const K0=/\.(png|jpe?g|gif|webp|bmp)$/i;function sT({t:e}){const[t,n]=j.useState(null),r=e.attachments??[];if(!r.length)return null;const s=l=>l.split(/[\\/]/).pop()??l,a=r.filter(l=>K0.test(l)).map(l=>({src:wt(e.id,l),caption:s(l)})),o=r.filter(l=>!K0.test(l));return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"lbl",children:["Attached · ",r.length]}),a.length>0&&i.jsx("div",{className:"thumbs",children:a.map((l,c)=>i.jsx("button",{className:"zoom thumb",onClick:()=>n(c),"aria-label":`Open ${l.caption} full size`,children:i.jsx("img",{src:l.src,alt:l.caption,loading:"lazy"})},l.src))}),o.map(l=>i.jsx("a",{className:"filechip mono",href:wt(e.id,l),target:"_blank",rel:"noreferrer",children:s(l)},l)),t!==null&&i.jsx(Qs,{pictures:a,start:t,onClose:()=>n(null)})]})}function iT({t:e}){return e.story?i.jsxs("div",{className:"db",children:[i.jsx(gl,{t:e}),e.steps&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Steps"}),i.jsx(r3,{t:e})]})]}):i.jsx("div",{className:"db",children:i.jsx("p",{className:"note",children:"The plan is written after the questions are answered."})})}function aT({t:e}){return i.jsx("div",{className:"db",children:i.jsx(Sa,{t:e,all:!0})})}function oT({t:e}){return e.gates?i.jsxs("div",{className:"db",children:[i.jsx("div",{className:"lbl",children:"Gates, checked by squad-kit"}),i.jsx(_p,{t:e}),i.jsx("div",{className:"lbl",children:"Before and after"}),e.gates.proof==="pass"?i.jsx(t3,{t:e}):i.jsx("p",{className:"note",children:"The screens are recorded after all checks pass."})]}):i.jsx("div",{className:"db",children:i.jsx("p",{className:"note",children:"The Tester records the proof after the Builder finishes."})})}function lT({t:e}){const t=j.useMemo(()=>{const n=new Set,r=[...e.activity.map(s=>s.text),...(e.steps??[]).map(s=>s.live??"")];for(const s of r)for(const a of s.matchAll(/[\w./-]+\/[\w.-]+\.\w+/g))n.add(a[0]);return[...n]},[e]);return i.jsxs("div",{className:"db",children:[i.jsx("div",{className:"lbl",children:"Branch"}),i.jsxs("p",{className:"mono",style:{fontSize:13},children:[e.repo?`${e.repo}: `:"",e.branch??`squad/${e.id.toLowerCase()}`]}),e.worktree&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"The ticket's copy of the code"}),i.jsx("p",{className:"mono",style:{fontSize:12.5,overflowWrap:"anywhere"},children:e.worktree}),i.jsx(Zl,{t:e})]}),i.jsx("div",{className:"lbl",children:"Files the squad touched"}),t.length?i.jsx("div",{className:"feed",children:t.map(n=>i.jsx("div",{className:"mono",style:{fontSize:12.5},children:n},n))}):i.jsx("p",{className:"note",children:"No files changed yet."}),i.jsx("div",{className:"lbl",children:"In the terminal"}),i.jsxs("div",{className:"pills",children:[i.jsx(ne,{text:`squad show ${e.id}`}),i.jsx(ne,{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 uT(){const e=Tt(),t=ha({from:"/board"}),n=Wr({from:"/board"}),[r,s]=j.useState(null),[a,o]=j.useState(""),l=t.view??"all",c=m=>void n({search:g=>({...g,ticket:m})}),u=()=>void n({search:m=>({...m,ticket:void 0})}),h=e.data?.ready?e.data:null,d=j.useMemo(()=>{const m=h?.tickets??[],g=a.trim().toLowerCase();return m.filter(v=>l==="bugs"&&v.kind!=="bug"||l==="mine"&&!Qn(v,h?.meta.user?.name)?!1:!g||v.title.toLowerCase().includes(g)||v.id.toLowerCase().includes(g))},[h,a,l]);if(e.isLoading)return i.jsx("div",{className:"center",children:"Loading the board…"});if(!h)return i.jsx(fT,{});const f=["chat","ask","questions","spec","plan","change","stuck","proof","yours","release"],p=h.tickets.filter(m=>m.waiting||m.quiet?.kind==="stuck"||m.outdated?.length||sn(m)).sort((m,g)=>(m.waiting?f.indexOf(m.waiting.kind):-1)-(g.waiting?f.indexOf(g.waiting.kind):-1));return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Board"}),i.jsx("div",{className:"seg",role:"tablist",children:["all","mine","bugs"].map(m=>i.jsx("button",{className:l===m?"on":"",onClick:()=>void n({search:g=>({...g,view:m==="all"?void 0:m})}),children:m==="all"?"All tickets":m==="mine"?"Mine":"Bugs"},m))}),i.jsx("span",{className:"grow"}),i.jsxs("label",{className:"search",children:[i.jsx(Hs,{size:15}),i.jsx("input",{value:a,onChange:m=>o(m.target.value),placeholder:"Search tickets","aria-label":"Search tickets"})]}),i.jsx(hT,{onPull:()=>s("pull")}),i.jsxs("button",{className:"btn pri",onClick:()=>s("new"),children:[i.jsx(Zt,{size:15})," New ticket"]})]}),i.jsxs("section",{className:"waiting","aria-label":"Waiting for you",children:[i.jsxs("div",{className:"wh",children:[i.jsxs("h2",{children:["Waiting for you ",p.length>0&&i.jsx("span",{className:"count",children:p.length})]}),i.jsx("p",{children:p.length?"Everything else is handled by the squad.":""}),i.jsx("span",{className:"grow"}),p.length>3&&i.jsxs(Te,{to:"/inbox",className:"btn sm",children:["See all ",p.length]}),i.jsx(ne,{text:"squad inbox"})]}),h.meta.engine==="live"&&h.meta.scan&&h.meta.scan.status!=="done"?i.jsx(pT,{meta:h.meta}):h.meta.engine==="live"&&h.tickets.length===0?i.jsxs("div",{className:"calmlane",children:[i.jsx("span",{className:"glyph",children:i.jsx(Zt,{size:14,strokeWidth:2.5})}),i.jsxs("span",{children:[i.jsx("b",{children:"Start with your first ticket."})," Write what you want in plain words. The squad asks what it needs to know."]}),i.jsx("span",{className:"grow",style:{flex:1}}),i.jsxs("button",{className:"btn pri sm",onClick:()=>s("new"),children:[i.jsx(Zt,{size:14})," New ticket"]})]}):p.length===0?i.jsxs("div",{className:"calmlane",children:[i.jsx("span",{className:"glyph",children:i.jsx(te,{size:14,strokeWidth:2.5})}),i.jsxs("span",{children:[i.jsx("b",{children:"Nothing needs you right now."})," The squad is working. New questions and approvals show up here."]})]}):i.jsx("div",{className:"wcards",children:p.slice(0,3).map(m=>i.jsxs("button",{className:"wcard",onClick:()=>c(m.id),children:[i.jsxs("div",{className:"grow",children:[i.jsxs("div",{className:"meta",children:[i.jsx("span",{className:"id",children:m.id}),i.jsx("span",{children:ar[m.stage]})]}),i.jsx("h3",{children:m.title}),i.jsx("p",{children:m.waiting?.summary??(sn(m)?`Change ${ya(m).id} to the spec waits for you`:m.outdated?.length?Vh(m):"Looks stuck. Check what it is waiting on")})]}),i.jsx("span",{className:"btn sm pri",children:m.waiting?cl(m):sn(m)?"Check the change":"Check it"})]},m.id))})]}),i.jsx("div",{className:"board",children:cT.map(m=>{const g=d.filter(v=>v.stage===m.stage);return i.jsxs("section",{className:"lane","aria-label":ar[m.stage],children:[i.jsxs("div",{className:"lh",children:[i.jsx(Ws,{role:m.role}),i.jsxs("span",{className:"t",children:[i.jsx("b",{children:ar[m.stage]}),i.jsx("small",{children:m.who})]}),i.jsx("span",{className:"n",children:g.length})]}),g.map(v=>i.jsx(dT,{t:v,selected:t.ticket===v.id,onOpen:()=>c(v.id)},v.id)),g.length===0&&i.jsx("div",{className:"empty-lane",children:"Nothing here"})]},m.stage)})}),i.jsxs("div",{className:"foot",children:[i.jsxs("span",{children:["Last 30 days ",i.jsxs("b",{children:[h.stats.released30," tickets released"]})]}),i.jsxs("span",{children:[i.jsx("b",{children:h.stats.bugs30})," ",h.stats.bugs30===1?"bug":"bugs"," found after release"]}),i.jsxs("span",{children:[i.jsx("b",{children:h.stats.open})," open tickets"]}),i.jsx(_E,{}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"btn sm quiet",onClick:()=>s("bug"),children:"Report a bug"})]}),t.ticket&&i.jsx(DE,{id:t.ticket,onClose:u}),r==="new"&&i.jsx(JC,{onClose:()=>s(null),onCreated:m=>c(m.id)}),r==="pull"&&i.jsx(nE,{onClose:()=>s(null),onCreated:m=>c(m.id)}),r==="bug"&&i.jsx(Pp,{onClose:()=>s(null)})]})}function dT({t:e,selected:t,onOpen:n}){const r=!!e.waiting||e.quiet?.kind==="stuck"||sn(e),s=Yl();return i.jsxs("button",{className:`card ${r?"you":""} ${e.kind==="bug"?"bug":""} ${t?"sel":""}`,onClick:n,children:[i.jsxs("div",{className:"row1",children:[i.jsx("span",{className:"id",children:e.id}),e.track==="express"&&i.jsx("span",{className:"prio express",children:"Express"}),r?i.jsx("span",{className:"youtag",children:"You"}):e.kind==="bug"?i.jsx("span",{className:"prio",children:"Bug"}):e.priority==="high"?i.jsx("span",{className:"prio",children:"High"}):null,s&&!Qn(e,s)&&i.jsx("span",{className:"prio owner",title:"Their squad works on it",children:ja(e)})]}),i.jsx("h4",{children:e.title}),i.jsxs("div",{className:"st",children:[e.live&&!r?i.jsx("span",{className:"live"}):e.stage==="release"?i.jsx(te,{size:13,strokeWidth:2.5}):null,i.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"&&!r&&i.jsx("div",{className:"bar",children:i.jsx("i",{style:{width:`${e.progress}%`}})})]})}function hT({onPull:e}){const n=ge({queryKey:["tracker"],queryFn:()=>be("/api/v1/tracker"),refetchInterval:6e4}).data;return n?n.type==="none"?i.jsxs(Te,{to:"/settings",className:"btn",children:[i.jsx(Tn,{size:15})," Connect a tracker"]}):i.jsxs("button",{className:"btn",onClick:e,children:[i.jsx(Tn,{size:15})," Pull from ",n.label??"the tracker"]}):null}function pT({meta:e}){const t=X(),n=e.scan,r=n.status==="failed",s=e.tools.find(o=>o.ready),a=[{label:"Project files and board",state:"done",note:".squad/ in this folder"},s?{label:`${s.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:r?"fail":n.status==="running"?"now":"todo",note:r?n.error:n.status==="running"?n.now??"Starting…":"Starts in a moment"},{label:"Ready for your first ticket",state:"todo",note:"Write it, or pull it from your tracker"}];return i.jsxs("div",{className:"setup",children:[i.jsxs("div",{className:"setup-head",children:[i.jsx("b",{children:r?"The Architect could not read the project.":"Setting up your project"}),i.jsx("span",{children:r?"Fix what the step below says, then try again.":"The Architect maps the project and finds how to test and run it. This takes a few minutes."}),r&&i.jsx("button",{className:"btn sm",onClick:()=>t.mutate({path:"/api/v1/scan",done:"Reading the project again"}),children:"Try again"})]}),i.jsx("ol",{className:"setup-steps",children:a.map(o=>i.jsxs("li",{className:o.state,children:[i.jsx("span",{className:"mark",children:o.state==="done"?i.jsx(te,{size:12,strokeWidth:3}):o.state==="fail"?"!":o.state==="now"?i.jsx("span",{className:"live"}):null}),i.jsxs("span",{className:"txt",children:[i.jsx("b",{children:o.label}),o.note&&i.jsx("small",{title:o.note,children:o.note})]})]},o.label))}),!r&&i.jsx("div",{className:"setup-bar","aria-hidden":!0,children:i.jsx("i",{})})]})}function fT(){return i.jsx("div",{className:"center",children:i.jsxs("div",{children:[i.jsx("h2",{children:"No board yet"}),i.jsx("p",{children:"Run this in the terminal to open a sample board where the squad works on its own:"}),i.jsx("p",{style:{marginTop:12},children:i.jsx(ne,{text:"squad demo"})})]})})}function mT(){const{id:e}=Dh({from:"/tickets/$id/proof"}),t=ga(e),[n,r]=j.useState(0),[s,a]=j.useState(null),o=t.data;if(!o)return i.jsx("div",{className:"center",children:t.isError?`No ticket ${e}.`:"Loading…"});const l=o.proof??[],c=l[Math.min(n,l.length-1)],u=o.waiting?.kind==="proof",h=o.gates,d=l.flatMap(p=>[{src:Kn(`/api/v1/proof/${p.before}`),caption:`${p.criterion} · ${p.beforeLabel}`},{src:Kn(`/api/v1/proof/${p.after}`),caption:`${p.criterion} · ${p.afterLabel}`}]),f=Math.min(n,l.length-1)*2;return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"top",children:i.jsxs("span",{className:"crumbs",children:[i.jsx(Te,{to:"/inbox",children:"Waiting for you"})," /",i.jsxs(Te,{to:"/board",search:{ticket:o.id},children:[o.id," ",o.title]})," ","/ ",i.jsx("b",{children:"Proof"})]})}),i.jsxs("div",{className:"gatebar",children:[i.jsx(ru,{state:h?.checks,text:h?.checks==="skipped"?"Checks failed, you continued":h?.checksText??"All checks pass"}),i.jsx(ru,{state:h?.review,text:h?.review==="skipped"?"Review notes open, you continued":`Review approved${h?.reviewBy?` by ${h.reviewBy}`:""}`}),i.jsx(ru,{state:h?.proof,text:h?.proof==="skipped"?"No screenshots, you continued":"Proof made"}),i.jsx("span",{style:{marginLeft:6},children:"Nothing ships without these three."})]}),i.jsxs("div",{className:"split",children:[i.jsxs("div",{className:"critlist",children:[i.jsxs("div",{className:"lbl",style:{marginTop:0},children:["Done when · ",l.length]}),l.map((p,m)=>i.jsxs("button",{className:`crit ${m===n?"on":""}`,onClick:()=>r(m),children:[i.jsx(te,{size:15,strokeWidth:2.5}),i.jsx("span",{children:p.criterion})]},p.criterion)),l.length===0&&i.jsx("p",{className:"note",children:h?.proof==="skipped"||(o.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."})]}),i.jsx("div",{className:"stage",children:c?i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:c.criterion}),i.jsxs("div",{className:"ba",children:[i.jsxs("div",{children:[i.jsx("div",{className:"cap",children:i.jsx("span",{children:c.beforeLabel})}),i.jsx("button",{className:"zoom",onClick:()=>a(f),"aria-label":`Open ${c.beforeLabel} full size`,children:i.jsx("img",{src:Kn(`/api/v1/proof/${c.before}`),alt:`${c.criterion}, ${c.beforeLabel}`})})]}),i.jsxs("div",{children:[i.jsx("div",{className:"cap",children:i.jsx("span",{children:c.afterLabel})}),i.jsx("button",{className:"zoom",onClick:()=>a(f+1),"aria-label":`Open ${c.afterLabel} full size`,children:i.jsx("img",{src:Kn(`/api/v1/proof/${c.after}`),alt:`${c.criterion}, ${c.afterLabel}`})})]})]}),c.note&&i.jsx("p",{className:"note",children:c.note})]}):i.jsx("p",{className:"note",children:"Nothing to compare."})})]}),s!==null&&i.jsx(Qs,{pictures:d,start:s,onClose:()=>a(null)}),u?i.jsx(n3,{t:o,sticky:!0}):i.jsx("div",{className:"stickybar",children:i.jsx("span",{className:"note",children:o.status})})]})}function ru({state:e,text:t}){return i.jsxs("span",{className:`pill ${e==="pass"?"ok":e==="skipped"?"skip":"wait"}`,children:[e==="pass"&&i.jsx(te,{size:13,strokeWidth:2.5}),t]})}function gT(){const e=s8(),t=Tt(),[n,r]=j.useState(null),[s,a]=j.useState(null),o=e.data??[],l=o.find(u=>u.version===n)??o.find(u=>u.status==="draft")??o[0],c=t.data?.ready?t.data.meta.engine==="demo":!1;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Releases"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad release"})]}),i.jsxs("div",{className:"split",children:[i.jsx("div",{className:"listcol",children:o.map(u=>i.jsxs("button",{className:`litem ${l?.version===u.version?u.status==="draft"?"on":"on plain":""}`,onClick:()=>r(u.version),children:[i.jsxs("b",{children:[u.version,u.status==="draft"?i.jsx("span",{className:"youtag",children:u.items.length?"Ready":"Empty"}):u.bugs?.length?i.jsxs("span",{className:"prio",children:[u.bugs.length," ",u.bugs.length===1?"bug":"bugs"]}):null]}),u.status==="draft"?"Next release":Vr(u.date)," · ",u.items.length," tickets"]},u.version))}),l?i.jsx(yT,{r:l,onReleased:a}):i.jsx("div",{className:"center",children:"No releases yet."})]}),s&&i.jsx(rE,{release:s,demo:c,onClose:()=>a(null)})]})}function yT({r:e,onReleased:t}){const n=X(),[r,s]=j.useState(!1),[a,o]=j.useState(e.notes),[l,c]=j.useState(!1),[u,h]=j.useState(!1);j.useEffect(()=>{r||o(e.notes)},[e.notes,r]);const d=e.status==="draft",f=e.version.endsWith(".0")?"New features, nothing breaks for users.":"Fixes only, nothing new to learn.";return i.jsxs("div",{className:"detail",children:[i.jsx("h2",{style:{fontSize:24,fontStretch:"88%"},children:d?`Release ${e.version}`:e.version}),i.jsx("p",{className:"note",style:{marginTop:2},children:d?"The squad prepared this release. Read it, edit the notes if you like, then release.":`Released ${Vr(e.date)}`}),i.jsx("div",{className:"lbl",children:"What's inside"}),e.items.map(p=>i.jsxs("div",{className:"trow",children:[i.jsx("span",{className:"mono",children:p.id}),i.jsx("b",{children:p.title}),p.gates?i.jsxs("span",{className:"pill ok",children:[i.jsx(te,{size:13,strokeWidth:2.5})," Checks, review, proof"]}):i.jsx("span",{})]},p.id)),e.items.length===0&&i.jsx("p",{className:"note",children:"No tickets yet. Tickets join after you check their proof."}),!d&&e.bugs&&e.bugs.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Bugs found after this release"}),e.bugs.map(p=>i.jsxs("div",{className:"trow",children:[i.jsx("span",{className:"mono",children:p}),i.jsx(Te,{to:"/board",search:{ticket:p},children:i.jsx("b",{children:"Open the bug"})}),i.jsx("span",{})]},p))]}),i.jsxs("div",{className:"grid2",children:[i.jsxs("div",{children:[i.jsx("div",{className:"lbl",children:"Version"}),i.jsxs("div",{className:"ver",children:[i.jsx("span",{className:"from",children:e.from.replace(/^v/,"")}),i.jsx(Rk,{size:20}),i.jsx("span",{children:e.version.replace(/^v/,"")})]}),i.jsx("p",{className:"note",style:{marginTop:4},children:f}),i.jsx("div",{className:"lbl",children:d||!e.log?"Also":"What the release did"}),!d&&e.log?e.log.map(p=>i.jsxs("div",{className:"checkrow",style:p.ok?void 0:{color:"var(--you-ink)"},children:[i.jsx("span",{className:`cbx ${p.ok?"on":""}`,children:p.ok?i.jsx(te,{size:11,strokeWidth:3}):"!"}),p.text]},p.text)):[["changelog","Update the changelog"],["tag",`Tag ${e.version} in git`],["pipeline","Run the pipeline"],["whatsapp","Draft a WhatsApp note for my manager"]].map(([p,m])=>i.jsxs("div",{className:"checkrow",children:[i.jsx("span",{className:`cbx ${e.addons[p]?"on":""}`,children:e.addons[p]&&i.jsx(te,{size:11,strokeWidth:3})}),m]},p))]}),i.jsxs("div",{children:[i.jsxs("div",{className:"lbl",children:["Release notes",d&&", written by the squad",i.jsx("span",{className:"grow",style:{flex:1}}),d&&!r&&i.jsxs("button",{className:"btn sm",onClick:()=>s(!0),children:[i.jsx(sy,{size:13})," Edit"]})]}),r?i.jsxs(i.Fragment,{children:[i.jsx("textarea",{className:"textarea mono",style:{minHeight:180,fontSize:13},value:a,onChange:p=>o(p.target.value)}),i.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[i.jsx("button",{className:"btn sm pri",onClick:()=>n.mutate({path:`/api/v1/releases/${e.version}/notes`,method:"PUT",body:{notes:a},done:"Notes saved"},{onSuccess:()=>s(!1)}),children:"Save notes"}),i.jsx("button",{className:"btn sm",onClick:()=>s(!1),children:"Cancel"})]})]}):i.jsx(u8,{notes:e.notes})]})]}),i.jsx("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:26},children:d?i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:e.items.length===0,onClick:()=>c(!0),children:[i.jsx(jo,{size:15})," Release ",e.version]}),i.jsx("span",{className:"note",children:"You'll be asked once to confirm."})]}):i.jsxs("button",{className:"btn",onClick:()=>h(!0),children:["Report a bug in ",e.version]})}),l&&i.jsxs(pt,{title:`Release ${e.version}?`,onClose:()=>c(!1),icon:i.jsx("span",{className:"glyph",children:i.jsx(jo,{size:15})}),footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",disabled:n.isPending,onClick:()=>n.mutate({path:`/api/v1/releases/${e.version}/release`},{onSuccess:p=>{c(!1),t(p)}}),children:[i.jsx(jo,{size:15})," Yes, release it"]}),i.jsx("button",{className:"btn",onClick:()=>c(!1),children:"Not yet"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad release ${e.version}`})]}),children:[i.jsxs("p",{children:[e.items.length," tickets go live: ",e.items.map(p=>p.title).join(", "),"."]}),e.targets.length>0&&i.jsxs("div",{className:"box",style:{marginBottom:6},children:[i.jsx("b",{children:"This release changes these branches:"}),e.targets.map(p=>i.jsxs("div",{className:"mono",style:{fontSize:12.5,marginTop:6},children:[p.repo==="."?"project":p.repo,": ",p.branch," ",p.remote?`→ pushed to ${p.remote}`:"(no remote, stays on this Mac)"]},p.repo)),i.jsx("p",{className:"note",style:{marginTop:6},children:"Change the branch or remote in Settings first if this is not right."})]})]}),u&&i.jsx(Pp,{foundIn:e.version,onClose:()=>h(!1)})]})}function xT(){const[e,t]=j.useState(void 0),n=ge({queryKey:["backlog",e??""],queryFn:()=>be(`/api/v1/backlog${e?`?sprint=${encodeURIComponent(e)}`:""}`),refetchInterval:15e3}),r=n.data,s=e??r?.sprint,a=r?.sprints.find(o=>o.path===s)?.name;return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Backlog"}),r?.connected&&r.sprints.length>0&&i.jsxs("select",{className:"input",style:{width:"auto",marginLeft:12},value:s??"all",onChange:o=>t(o.target.value),"aria-label":"Sprint",children:[r.sprints.map(o=>i.jsxs("option",{value:o.path,children:[o.name,o.current?" (now)":""]},o.path)),i.jsx("option",{value:"all",children:"Everything open"})]}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:a?`squad backlog --sprint "${a}"`:"squad backlog"})]}),i.jsx("div",{className:"scroll",children:i.jsx("div",{className:"page",children:n.isLoading?i.jsx("p",{className:"note",children:"Reading the backlog from Azure…"}):r?.connected?r.error?i.jsx("p",{className:"note",style:{color:"var(--bug)"},children:r.error}):r.items.length===0?i.jsxs("p",{className:"note",children:["Nothing open in ",a??"this sprint","."]}):i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"note",style:{marginBottom:12},children:[r.items.length," open ",r.items.length===1?"item":"items"," in ",a??"the backlog",", in backlog order. Start one and the squad picks it up; Azure follows along."]}),i.jsxs("table",{className:"table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{style:{width:80},children:"ID"}),i.jsx("th",{children:"Title"}),i.jsx("th",{style:{width:70},children:"Points"}),i.jsx("th",{style:{width:100},children:"On Azure"}),i.jsx("th",{style:{width:260},children:"squad-kit"})]})}),i.jsx("tbody",{children:r.items.map(o=>i.jsx(vT,{w:o},o.id))})]})]}):i.jsxs("div",{className:"calm",children:[i.jsx("span",{className:"ring",children:i.jsx(Yk,{size:18})}),i.jsxs("div",{children:[i.jsx("b",{children:"Connect Azure DevOps"}),i.jsxs("span",{children:[r?.error??"Add your Azure organization, project and token, and your stories and bugs show up here."," ",i.jsx(Te,{to:"/settings",style:{fontWeight:600},children:"Open Settings"})]})]})]})})})]})}function vT({w:e}){const t=X();return i.jsxs("tr",{children:[i.jsx("td",{className:"mono",children:i.jsxs("a",{href:e.url,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:4},children:[e.id," ",i.jsx(ir,{size:11})]})}),i.jsx("td",{children:i.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[e.type==="Bug"&&i.jsxs("span",{className:"pill bug",style:{padding:"2px 8px"},children:[i.jsx(En,{size:12})," Bug"]}),i.jsx("span",{style:{fontWeight:600},children:e.title})]})}),i.jsx("td",{children:e.points??""}),i.jsx("td",{children:e.state}),i.jsx("td",{children:e.ticket?i.jsxs(Te,{to:"/board",search:{ticket:e.ticket.id},style:{color:"var(--muted)"},children:[i.jsx("b",{className:"mono",style:{color:"var(--text)"},children:e.ticket.id})," ",e.ticket.stage==="done"?"Released":ar[e.ticket.stage]]}):i.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:[i.jsx(qh,{size:13})," Start"]})})]})}const Xl=["Structure","Data","Security","Interface","Rules"],kT={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"}},Id={shipped:"Released",merged:"Merged, not released yet",building:"Being built",designed:"Designed, not built yet",coming:"Coming"};function wT(){const e=a8(),t=ha({from:"/architecture"}),n=Wr(),r=t.view??"map",[s,a]=j.useState(new Set),[o,l]=j.useState(null),[c,u]=j.useState(!1),[h,d]=j.useState(null),f=t.adr?t.adr.startsWith("ADR-")?{kind:"adr",id:t.adr}:{kind:"ticket",id:t.adr}:null,p=R=>void n({to:"/architecture",search:{...(R.view??r)!=="map"?{view:R.view??r}:{},..."pick"in R?R.pick?{adr:R.pick.id}:{}:t.adr?{adr:t.adr}:{}},replace:!0}),m=R=>p({pick:f?.id===R?.id?null:R}),g=e.data?.decisions??[],v=e.data?.tickets??[],y=j.useMemo(()=>zT(g,v),[g,v]),x=y.cols.length,k=o??x;if(j.useEffect(()=>{if(!c)return;const R=setInterval(()=>{l(L=>{const $=(L??0)+1;return $>=x?(u(!1),null):$})},700);return()=>clearInterval(R)},[c,x]),!e.data)return i.jsx("div",{className:"top",children:i.jsx("h1",{children:"Architecture"})});const w=g.filter(R=>y.colOf(R.from)<k),T=w.filter(R=>!R.replacedBy||y.colOf(a3(g,R.replacedBy))>=k),b=y.cols.slice(0,k).reduce((R,L)=>R+(L.t?.follows.length??0),0),E=h?h.startsWith("ADR-")?{kind:"adr",id:h}:{kind:"ticket",id:h}:f,S=FT(E,g,v),A=r==="map"||r==="timeline",C=e.data.lessons??[];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Architecture"}),i.jsx("span",{className:"note",children:"Every technical choice the squad made, why, and what it shaped. Every new ticket follows the rules in force."})]}),i.jsx("div",{className:"ptabs",role:"tablist",children:[["map","Map"],["timeline","Timeline"],["stack","Stack",e.data.stack.length],["list","All decisions",g.length],["project","Project map"],["lessons","Lessons",C.length]].map(([R,L,$])=>i.jsxs("button",{role:"tab","aria-selected":r===R,className:r===R?"on":"",onClick:()=>p({view:R}),children:[L," ",$!==void 0&&i.jsx("span",{className:"n",children:$})]},R))}),i.jsxs("div",{className:"split",children:[i.jsx("div",{className:"scroll",children:i.jsxs("div",{className:"arch",children:[A&&i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"arch-stats",children:[i.jsx(ro,{n:T.length,label:"Rules in force",hint:"Every new design must follow these"}),i.jsx(ro,{n:w.length-T.length,label:"Replaced",hint:"Changed by a newer decision"}),i.jsx(ro,{n:T.filter(R=>R.checkedBy?.passing).length,label:"Checked by a test",hint:"Break one and nothing ships"}),i.jsx(ro,{n:b,label:"Times a design followed one",hint:"Past choices shaping new work"})]}),i.jsxs("div",{className:"arch-bar",children:[i.jsxs("button",{className:"btn",onClick:()=>c?u(!1):(l(o===null||o>=x?1:o),u(!0)),children:[c?i.jsx(ry,{size:14}):i.jsx(qh,{size:14})," ",c?"Pause":"Play the history"]}),i.jsx("input",{type:"range",min:1,max:x,value:k,"aria-label":"Show the project up to this ticket",onChange:R=>{u(!1);const L=Number(R.target.value);l(L>=x?null:L)}}),i.jsx("span",{className:"note mono",style:{minWidth:110},children:k>=x?"Today":`Up to ${y.cols[k-1]?.label??""}`}),i.jsx("span",{className:"grow"}),[...Xl,"Other"].filter(R=>g.some(L=>(L.area??"Other")===R)).map(R=>i.jsxs("button",{className:`chip area-${R.toLowerCase()} ${s.has(R)?"on":""}`,onClick:()=>a(L=>{const $=new Set(L);return $.has(R)?$.delete(R):$.add(R),$}),children:[i.jsx("i",{})," ",R]},R))]})]}),r==="map"&&i.jsx(ET,{decisions:g.filter(R=>s.size===0||s.has(R.area??"Other")),tickets:v,visible:R=>y.colOf(R.from)<k,related:S,picked:f?.id??null,onPick:m,onHover:d}),r==="timeline"&&i.jsx(RT,{decisions:g,tickets:v,areas:s,shown:k,related:S,picked:f?.id??null,onPick:m,g:y}),A&&i.jsx(CT,{view:r}),r==="map"&&i.jsx(AT,{decisions:g,tickets:v,onPick:m}),r==="stack"&&i.jsx(bT,{data:e.data,picked:f?.id??null,onPick:m}),r==="list"&&i.jsx(LT,{decisions:g,picked:f?.id??null,onPick:m}),r==="project"&&i.jsxs("div",{style:{maxWidth:820},children:[i.jsxs("p",{className:"note",style:{marginBottom:8,display:"flex",gap:8,alignItems:"center"},children:[i.jsx(Vk,{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."]}),i.jsx(i3,{reading:e.data.reading}),e.data.map.map(R=>i.jsxs("div",{className:"maprow",children:[i.jsx("b",{children:R.area}),i.jsx("span",{children:R.detail})]},R.area))]}),r==="lessons"&&i.jsxs("div",{style:{maxWidth:820},children:[i.jsx("p",{className:"note",style:{marginBottom:8},children:"Learned from bugs and reviews. Each lesson makes the next ticket better."}),C.length===0&&i.jsx("p",{className:"note",children:"No lessons yet."}),C.map(R=>i.jsxs("div",{className:"lesson",children:[i.jsx("span",{className:"glyph sm",children:i.jsx(qk,{size:12})}),i.jsxs("span",{children:[R.text," ",i.jsxs("span",{className:"note",children:["From ",R.from]})]}),i.jsx("span",{className:"mono",children:Vr(R.date)})]},R.id))]})]})}),r!=="project"&&r!=="lessons"&&i.jsx(_T,{pick:f,decisions:g,tickets:v,impact:e.data.impact??[],onPick:m})]})]})}const s3=[{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 bT({data:e,picked:t,onPick:n}){const r=e.stack.filter(a=>!a.decisions.length&&!a.via).length,s=e.stack.filter(a=>!a.decisions.length&&a.via).length;return i.jsxs("div",{className:"stackv",children:[i.jsx(i3,{reading:e.reading}),i.jsxs("div",{className:"stack-sum",children:[i.jsxs("span",{children:[i.jsx("b",{children:e.stack.length})," technologies in the code"]}),i.jsxs("span",{children:[i.jsx("b",{children:e.stack.length-r-s})," chosen by a saved decision"]}),s>0&&i.jsxs("span",{children:[i.jsx("b",{children:s})," came with one of those"]}),r>0&&i.jsxs("span",{className:"ahead",children:[i.jsx("b",{children:r})," picked while building, no decision yet"]}),i.jsxs("span",{children:[i.jsx("b",{children:e.patterns.length})," design patterns"]})]}),e.stack.length===0&&i.jsx("p",{className:"note",children:"No package files found in the code yet."}),i.jsxs("section",{className:"stack-group",children:[i.jsx("h3",{children:"Technologies"}),i.jsx("div",{className:"techs",children:s3.flatMap(a=>e.stack.filter(o=>o.role===a.role)).map(a=>i.jsx(jT,{t:a,picked:t,onPick:n},a.name))})]}),i.jsxs("section",{className:"stack-group",children:[i.jsx("h3",{children:"Design patterns the code follows"}),e.patterns.length===0&&i.jsx("p",{className:"note",children:"Not read yet. Press Read the code again, and the Architect lists the patterns a new developer must keep."}),i.jsx("div",{className:"patterns",children:e.patterns.map(a=>i.jsxs("div",{className:"pattern",children:[i.jsx("span",{className:"glyph sm",children:i.jsx(e8,{size:13})}),i.jsxs("div",{children:[i.jsx("b",{children:a.name}),i.jsx("p",{children:a.what}),i.jsxs("div",{className:"where",children:[a.where.map(o=>i.jsx("code",{children:o},o)),a.decision&&i.jsxs("button",{className:`pill click ${t===a.decision?"on":""}`,onClick:()=>n({kind:"adr",id:a.decision}),children:["From ",a.decision]})]})]})]},a.name))})]})]})}function jT({t:e,picked:t,onPick:n}){const r=e.icon?kT[e.icon]:void 0;return i.jsxs("div",{className:`tech ${e.decisions.some(s=>s===t)?"picked":""}`,children:[i.jsxs("div",{className:"tech-head",children:[i.jsx("span",{className:"logo",style:r?{"--brand":`#${r.hex}`}:void 0,children:r?i.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:NT(r.hex)?"ink":"",children:i.jsx("path",{d:r.path})}):i.jsx("span",{className:"mono",children:e.name.slice(0,2)})}),i.jsxs("span",{className:"tech-name",children:[i.jsx("b",{children:e.name}),e.version&&i.jsxs("span",{className:"mono",children:["v",e.version]})]}),i.jsx("span",{className:"tech-role",children:s3.find(s=>s.role===e.role)?.label})]}),i.jsx("p",{className:e.why?"":"note",children:e.why??"Not explained yet. The Architect fills this in when it reads the code."}),i.jsx("div",{className:"tech-foot",children:e.decisions.length?e.decisions.map(s=>i.jsxs("button",{className:`pill click ${t===s?"on":""}`,onClick:()=>n({kind:"adr",id:s}),children:["Chosen in ",s]},s)):e.via?e.via.decisions.map(s=>i.jsxs("button",{className:`pill click ${t===s?"on":""}`,onClick:()=>n({kind:"adr",id:s}),title:`Choosing ${e.via.name} chose ${e.name} too`,children:["Comes with ",e.via.name," · ",s]},s)):i.jsx(ST,{t:e})})]})}function ST({t:e}){const t=X(),n=(s,a)=>t.mutate({path:"/api/v1/architecture/decide",body:{tech:e.name,do:s},done:a}),r=e.draft;if(r?.status==="writing"||t.isPending&&!r)return i.jsxs("span",{className:"pill nodecision",children:[i.jsx(Rn,{size:12,className:"spin"})," The Architect is writing it"]});if(r?.status==="ready"&&r.decision){const s=r.decision;return i.jsxs("div",{className:"techdraft",children:[i.jsx("span",{className:"lbl",children:"Decision for you to approve"}),i.jsx("b",{children:s.title}),i.jsxs("p",{children:[i.jsx("span",{className:"note",children:"Chosen:"})," ",s.chosen]}),i.jsx("p",{children:s.why}),s.options.filter(a=>a!==s.chosen).length>0&&i.jsxs("p",{className:"note",children:["Also looked at: ",s.options.filter(a=>a!==s.chosen).join("; ")]}),i.jsxs("div",{className:"row",children:[i.jsxs("button",{className:"btn sm pri",disabled:t.isPending,onClick:()=>n("approve","Saved as a decision. Every new ticket follows it now."),children:[i.jsx(te,{size:13})," Approve"]}),i.jsx("button",{className:"btn sm",disabled:t.isPending,onClick:()=>n("discard"),children:"Discard"})]})]})}return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"pill nodecision",title:r?.status==="failed"?`The last try stopped: ${r.error??""}`:"The Builder added it while building; nobody wrote down why.",children:r?.status==="failed"?"Writing stopped, try again":"Picked while building"}),i.jsx("button",{className:"btn sm",onClick:()=>n("write",`The Architect is writing a decision for ${e.name}.`),children:"Save as a decision"})]})}function NT(e){const t=parseInt(e,16);return(t>>16&255)*.299+(t>>8&255)*.587+(t&255)*.114<60}function i3({reading:e}){const t=X(),n=e?.status==="pending"||e?.status==="running"||t.isPending;return i.jsxs("div",{className:`reading ${e?.status==="failed"?"bad":""}`,children:[n?i.jsx(Rn,{size:15,className:"spin"}):i.jsx(hd,{size:15}),i.jsx("span",{children:n?"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 ${An(e.at)}. It is read again after every merge.`:"Not read from the code yet."}),i.jsx("span",{className:"grow"}),i.jsxs("button",{className:"btn sm",disabled:n,onClick:()=>t.mutate({path:"/api/v1/architecture/read",done:"The Architect is reading the code."}),children:[i.jsx(hd,{size:13})," Read the code again"]})]})}function ro({n:e,label:t,hint:n}){return i.jsxs("div",{className:"arch-stat",title:n,children:[i.jsx("b",{children:e}),i.jsx("span",{children:t}),i.jsx("small",{children:n})]})}function CT({view:e}){return e==="map"?i.jsxs("div",{className:"arch-legend note",children:[i.jsxs("span",{children:[i.jsx("i",{className:"lg arrow"})," Built on"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg arrow replaces"})," Replaces"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg chip made"})," Ticket that made it"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg chip"})," Ticket that followed it"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg chip ahead"})," Will follow it, not built yet"]}),i.jsxs("span",{children:[i.jsx(te,{size:12,strokeWidth:3})," Checked by a test"]})]}):i.jsxs("div",{className:"arch-legend note",children:[i.jsxs("span",{children:[i.jsx("i",{className:"lg node"})," Made the decision"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg dot"})," Its design followed it"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg dot open"})," Will follow it, not built yet"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg link"})," Built on an older one"]}),i.jsxs("span",{children:[i.jsx("i",{className:"lg link replaces"})," Replaces an older one"]})]})}const ns=112,su=18,di=16,Q0=34;function ET({decisions:e,tickets:t,visible:n,related:r,picked:s,onPick:a,onHover:o}){const[l,c]=j.useState(1100),u=j.useRef(null);j.useEffect(()=>{const S=u.current;if(!S)return;const A=new ResizeObserver(()=>c(S.clientWidth));return A.observe(S),()=>A.disconnect()},[]);const h=new Set(e.map(S=>S.id)),d=S=>[...S.buildsOn??[],...S.replaces?[S.replaces]:[]].filter(A=>h.has(A)),f=new Map,p=(S,A=new Set)=>{if(f.has(S.id))return f.get(S.id);if(A.has(S.id))return 0;A.add(S.id);const C=d(S).map(L=>e.find($=>$.id===L)),R=C.length?1+Math.max(...C.map(L=>p(L,A))):0;return f.set(S.id,R),R},m=[...Xl,"Other"],g=[];for(const S of e)(g[p(S)]??=[]).push(S);const v=g.length>4?30:46,y=Math.max(150,Math.min(270,(l-di*2-Math.max(0,g.length-1)*v)/Math.max(1,g.length)));for(const S of g)S?.sort((A,C)=>m.indexOf(A.area??"Other")-m.indexOf(C.area??"Other")||G0(A.id)-G0(C.id));const x=Math.max(1,...g.map(S=>S?.length??0)),k=Q0+x*(ns+su)+di,w=new Map;g.forEach((S,A)=>{const C=(x-(S?.length??0))*(ns+su)/2;S?.forEach((R,L)=>w.set(R.id,{x:di+A*(y+v),y:Q0+C+L*(ns+su)}))});const T=di*2+g.length*y+Math.max(0,g.length-1)*v,b=S=>r!==null&&!r.has(S),E=["Starting points","Built on them","One more level","And on those","And further"];return i.jsx("div",{className:"dmap",ref:u,onMouseLeave:()=>o(null),children:i.jsxs("div",{className:"dmap-canvas",style:{width:T,height:k},children:[g.map((S,A)=>i.jsx("span",{className:"dmap-layer",style:{left:di+A*(y+v),width:y},children:E[A]??`Level ${A+1}`},A)),i.jsxs("svg",{width:T,height:k,className:"dmap-edges",children:[i.jsxs("defs",{children:[i.jsx("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:i.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead"})}),i.jsx("marker",{id:"arr-r",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse",children:i.jsx("path",{d:"M0 1 L9 5 L0 9 z",className:"arrhead replaces"})})]}),e.flatMap(S=>{const A=w.get(S.id);return!A||!n(S)?[]:[...(S.buildsOn??[]).map(R=>({p:R,kind:"built"})),...S.replaces?[{p:S.replaces,kind:"replaces"}]:[]].map(({p:R,kind:L})=>{const $=w.get(R),U=e.find(V=>V.id===R);if(!$||!U||!n(U))return null;const H=$.x+y,Z=$.y+ns/2,Q=A.x-2,_=A.y+ns/2,B=Math.max(40,(Q-H)/2),N=r!==null&&r.has(S.id)&&r.has(R);return i.jsx("path",{className:`edge ${L} ${b(S.id)||b(R)?"off":""} ${N?"lit":""}`,d:`M${H} ${Z} C${H+B} ${Z}, ${Q-B} ${_}, ${Q} ${_}`,markerEnd:`url(#${L==="replaces"?"arr-r":"arr"})`},`${R}-${S.id}-${L}`)})})]}),e.map(S=>{const A=w.get(S.id),C=S.tickets.filter(U=>U!==S.from),R=t.filter(U=>(U.state==="designed"||U.state==="coming")&&U.follows.includes(S.id)&&!C.includes(U.id)),L=[S.from==="Project scan"?"Scan":S.from,...C],$=L.length+R.length-6;return i.jsxs("button",{className:`dcard area-${(S.area??"Other").toLowerCase()} ${n(S)?"":"later"} ${b(S.id)?"off":""} ${s===S.id?"picked":""} ${S.replacedBy?"old":""}`,style:{left:A.x,top:A.y,width:y,height:ns},onClick:()=>a({kind:"adr",id:S.id}),onMouseEnter:()=>o(S.id),children:[i.jsxs("span",{className:"dhead",children:[i.jsx("i",{}),i.jsx("span",{className:"mono",children:S.id}),i.jsx("span",{className:"darea",children:S.area??"Other"}),S.checkedBy?.passing&&i.jsx(te,{size:13,strokeWidth:3,className:"dtest","aria-label":"Checked by a test"})]}),i.jsx("b",{className:"dtitle",children:S.title}),i.jsx("span",{className:"dchips",children:S.replacedBy?i.jsxs("span",{className:"dchip ahead",children:["Replaced by ",S.replacedBy]}):i.jsxs(i.Fragment,{children:[L.slice(0,6).map((U,H)=>i.jsx("span",{className:`dchip ${H===0?"made":""}`,title:H===0?"Made this decision":"Its design followed it",children:U},U)),R.slice(0,Math.max(0,6-L.length)).map(U=>i.jsx("span",{className:"dchip ahead",title:"Designed, not built yet: will follow it",children:U.id},U.id)),$>0&&i.jsxs("span",{className:"dchip",children:["+",$]})]})})]},S.id)})]})})}const iu=30,TT=26,so=250,PT=62;function RT({decisions:e,areas:t,shown:n,related:r,picked:s,onPick:a,g:o}){const[l,c]=j.useState(1e3),u=j.useRef(null);j.useEffect(()=>{const b=u.current;if(!b)return;const E=new ResizeObserver(()=>c(b.clientWidth));return E.observe(b),()=>E.disconnect()},[]);const h=o.cols.length,d=Math.max(40,Math.min(64,(l-so-24)/Math.max(1,h))),f=o.rows.filter(b=>t.size===0||t.has(b.area)),p=new Map;let m=PT+8,g="";const v=[];for(const b of f)b.area!==g&&(g=b.area,m+=TT,v.push({area:b.area,y:m-18})),p.set(b.d.id,m),m+=iu;const y=m+12,x=so+h*d+16,k=b=>so+b*d+d/2,w=b=>b<n,T=b=>r!==null&&!r.has(b);return i.jsx("div",{className:"arch-graph",ref:u,children:i.jsxs("svg",{width:x,height:y,role:"img","aria-label":"Decisions over time, and the tickets that followed them",children:[o.cols.map((b,E)=>i.jsxs("g",{className:`col state-${b.t?.state??"scan"} ${w(E)?"":"later"} ${T(b.key)?"dim":""}`,onClick:()=>b.t&&a({kind:"ticket",id:b.key}),children:[i.jsx("rect",{className:"colbg",x:so+E*d+2,y:6,width:d-4,height:y-12,rx:10}),i.jsx("text",{className:"colid",x:k(E),y:26,textAnchor:"middle",children:b.label}),i.jsx("circle",{className:"colstate",cx:k(E),cy:42,r:4}),i.jsx("title",{children:b.t?`${b.t.id} · ${b.t.title}
494
+ ${Id[b.t.state]}`:"What the Architect found when it first read the project"})]},b.key)),v.map(b=>i.jsx("text",{className:`lane area-${b.area.toLowerCase()}`,x:14,y:b.y,children:b.area.toUpperCase()},b.area)),f.map(b=>{const E=p.get(b.d.id),S=o.colOf(b.d.from);if(!w(S))return null;const A=b.d.replacedBy?o.colOf(a3(e,b.d.replacedBy)):h-1,C=Math.min(A,n-1),R=`track area-${b.area.toLowerCase()} ${T(b.d.id)?"dim":""} ${s===b.d.id?"picked":""}`;return i.jsxs("g",{className:R,onClick:()=>a({kind:"adr",id:b.d.id}),children:[i.jsx("rect",{className:"hit",x:0,y:E-iu/2,width:x,height:iu}),i.jsxs("text",{className:"name",x:14,y:E+4,children:[i.jsx("tspan",{className:"rid",children:b.d.id})," ",MT(b.d.title,28)]}),i.jsx("line",{className:`rail ${b.d.replacedBy&&A<n?"gone":""}`,x1:k(S),x2:k(C)+(b.d.replacedBy?0:d/2),y1:E,y2:E}),o.cols.map((L,$)=>$>S&&w($)&&L.t?.follows.includes(b.d.id)?i.jsx("circle",{className:`dot ${L.t.state==="designed"||L.t.state==="coming"?"open":""}`,cx:k($),cy:E,r:5,children:i.jsx("title",{children:`${L.t.id} followed ${b.d.id}`})},L.key):null),i.jsx("circle",{className:`node ${b.d.replacedBy?"old":""}`,cx:k(S),cy:E,r:8}),b.d.checkedBy?.passing&&i.jsx("path",{className:"tick",d:`M${k(S)-3.5} ${E} l2.5 2.6 l4.8 -5`}),i.jsx("title",{children:`${b.d.id} · ${b.d.title}
495
+ Chosen: ${b.d.chosen}`})]},b.d.id)}),f.flatMap(b=>{const E=p.get(b.d.id),S=o.colOf(b.d.from);return w(S)?[...(b.d.buildsOn??[]).map(C=>({b:C,kind:"built"})),...b.d.replaces?[{b:b.d.replaces,kind:"replaces"}]:[]].map(({b:C,kind:R})=>{const L=p.get(C);if(L===void 0)return null;const $=E>L?1:-1;return i.jsxs("g",{className:`link ${R} ${T(b.d.id)||T(C)?"dim":""}`,children:[i.jsx("path",{d:`M${k(S)} ${L+6*$} L${k(S)} ${E-9*$}`}),i.jsx("circle",{cx:k(S),cy:L,r:3.2})]},`${b.d.id}-${C}-${R}`)}):[]})]})})}function AT({decisions:e,tickets:t,onPick:n}){return i.jsxs("div",{className:"arch-cards",children:[i.jsxs("div",{className:"arch-card",children:[i.jsx("h4",{children:"What a new ticket inherits today"}),i.jsx("p",{className:"note",children:"The Architect, the Builder and the Reviewer read all of these before they start."}),[...Xl,"Other"].map(r=>{const s=e.filter(a=>!a.replacedBy&&(a.area??"Other")===r);return s.length?i.jsxs("div",{className:`inherit area-${r.toLowerCase()}`,children:[i.jsxs("b",{children:[i.jsx("i",{})," ",r]}),s.map(a=>i.jsxs("button",{onClick:()=>n({kind:"adr",id:a.id}),children:[i.jsx("span",{className:"mono",children:a.id})," ",a.title]},a.id))]},r):null})]}),i.jsxs("div",{className:"arch-card",children:[i.jsx("h4",{children:"Coming next"}),i.jsx("p",{className:"note",children:"Tickets not built yet, and the past decisions that will shape them."}),t.filter(r=>r.state==="designed"||r.state==="coming").map(r=>i.jsxs("div",{className:"coming",children:[i.jsxs("button",{onClick:()=>n({kind:"ticket",id:r.id}),children:[i.jsx("span",{className:"mono",children:r.id})," ",r.title]}),i.jsx("span",{className:"pills",children:r.follows.length?r.follows.map(s=>i.jsx("button",{className:"pill click",onClick:()=>n({kind:"adr",id:s}),children:s},s)):i.jsxs("span",{className:"note",children:["Not designed yet. Will read the ",e.filter(s=>!s.replacedBy).length," rules in force."]})})]},r.id))]})]})}function LT({decisions:e,picked:t,onPick:n}){return i.jsxs("table",{className:"table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{style:{width:90},children:"ID"}),i.jsx("th",{children:"Decision"}),i.jsx("th",{style:{width:110},children:"Area"}),i.jsx("th",{style:{width:120},children:"From"}),i.jsx("th",{style:{width:150},children:"Checked by"})]})}),i.jsx("tbody",{children:[...e].reverse().map(r=>i.jsxs("tr",{className:`click ${t===r.id?"on":""}`,onClick:()=>n({kind:"adr",id:r.id}),children:[i.jsx("td",{className:"mono",children:r.id}),i.jsxs("td",{style:{fontWeight:t===r.id?600:500,color:r.replacedBy?"var(--dim)":void 0},children:[r.replacedBy?i.jsx("s",{children:r.title}):r.title," ",r.replacedBy&&i.jsxs("span",{className:"pill wait",children:["Replaced by ",r.replacedBy]})]}),i.jsx("td",{children:i.jsxs("span",{className:`areatag area-${(r.area??"Other").toLowerCase()}`,children:[i.jsx("i",{})," ",r.area??"Other"]})}),i.jsx("td",{style:{color:"var(--muted)",fontSize:13},children:r.from}),i.jsx("td",{children:r.checkedBy?r.checkedBy.passing?i.jsxs("span",{className:"pill ok",children:[i.jsx(te,{size:13,strokeWidth:2.5})," A ",r.checkedBy.kind]}):i.jsx("span",{className:"pill you",children:"Test being written"}):i.jsx("span",{className:"pill wait",children:"Not checkable"})})]},r.id))})]})}function _T({pick:e,decisions:t,tickets:n,impact:r,onPick:s}){const a=d=>i.jsx("button",{className:"pill click",onClick:()=>s({kind:"adr",id:d}),children:d},d),o=d=>{const f=n.find(p=>p.id===d);return i.jsx("button",{className:`pill click st-${f?.state??"shipped"}`,title:f?`${f.title} · ${Id[f.state]}`:d,onClick:()=>s({kind:"ticket",id:d}),children:d},d)};if(e?.kind==="ticket"){const d=n.find(f=>f.id===e.id);return d?i.jsxs("aside",{className:"sidepanel arch-side",children:[i.jsxs("span",{className:"note mono",children:[d.id," · ",Id[d.state],d.release?` · ${d.release}`:""]}),i.jsx("h3",{children:d.title}),i.jsx("div",{className:"lbl",children:"Decision it made"}),d.made?i.jsxs("p",{style:{fontSize:13.5},children:[a(d.made)," ",t.find(f=>f.id===d.made)?.title]}):i.jsx("p",{className:"note",children:"None. It worked inside the rules it had."}),i.jsx("div",{className:"lbl",children:"Past decisions its design followed"}),d.follows.length?i.jsx("div",{className:"pills",children:d.follows.map(a)}):i.jsx("p",{className:"note",children:d.state==="coming"?"Not designed yet. When it is, it reads every rule in force.":"None recorded."}),i.jsx("p",{style:{marginTop:18},children:i.jsx(Te,{to:"/board",search:{ticket:d.id},className:"btn",children:"Open the ticket"})})]}):i.jsx("aside",{className:"sidepanel arch-side",children:i.jsx("p",{className:"note",children:"That ticket is not on this board."})})}const l=e?.kind==="adr"?t.find(d=>d.id===e.id):void 0;if(!l)return i.jsxs("aside",{className:"sidepanel arch-side",children:[i.jsx("span",{className:"note mono",children:"HOW IT WORKS"}),i.jsx("h3",{children:"Every choice is remembered"}),i.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."}),i.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."}),i.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 c=t.filter(d=>d.buildsOn?.includes(l.id)),u=l.tickets.filter(d=>d!==l.from),h=n.filter(d=>(d.state==="designed"||d.state==="coming")&&d.follows.includes(l.id)&&!u.includes(d.id));return i.jsxs("aside",{className:"sidepanel arch-side",children:[i.jsxs("span",{className:"note mono",children:[l.id," · ",l.area??"Other"," · approved by ",l.approvedBy," · ",Vr(l.date)]}),i.jsx("h3",{children:l.title}),l.replacedBy&&i.jsxs("div",{className:"box",style:{borderColor:"var(--you-line)",background:"var(--you-soft)",marginTop:8},children:[i.jsx("b",{children:"No longer a rule."})," Replaced by ",a(l.replacedBy),"."]}),i.jsx("div",{className:"lbl",children:"Chosen"}),i.jsx("p",{style:{fontSize:13.5,fontWeight:600},children:l.chosen}),i.jsx("div",{className:"lbl",children:"Why"}),i.jsx("p",{style:{fontSize:13.5},children:l.why}),l.options.length>1&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Also looked at"}),l.options.filter(d=>d!==l.chosen).map(d=>i.jsx("p",{className:"note",style:{fontSize:13},children:d},d))]}),i.jsx("div",{className:"lbl",children:"Where it came from"}),i.jsxs("div",{className:"pills",style:{alignItems:"center"},children:[l.from==="Project scan"?i.jsx("span",{className:"pill",children:"Project scan"}):o(l.from),(l.buildsOn??[]).length>0&&i.jsx("span",{className:"note",children:"built on"}),(l.buildsOn??[]).map(a),l.replaces&&i.jsx("span",{className:"note",children:"replaces"}),l.replaces&&a(l.replaces)]}),i.jsx("div",{className:"lbl",children:"What it shaped"}),u.length||c.length?i.jsxs(i.Fragment,{children:[u.length>0&&i.jsx("p",{className:"note",style:{marginBottom:6},children:"Tickets whose design followed it"}),i.jsx("div",{className:"pills",children:u.map(o)}),c.length>0&&i.jsx("p",{className:"note",style:{margin:"10px 0 6px"},children:"Decisions built on it"}),i.jsx("div",{className:"pills",children:c.map(d=>a(d.id))})]}):i.jsx("p",{className:"note",children:"Nothing yet. Every new ticket reads it."}),h.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Still ahead"}),i.jsx("p",{className:"note",style:{marginBottom:6},children:"Designed, not built yet. They will follow it."}),i.jsx("div",{className:"pills",children:h.map(d=>o(d.id))})]}),i.jsx(IT,{d:l,check:r.find(d=>d.adr===l.id),tk:o}),i.jsx("div",{className:"lbl",children:"Checked by"}),l.checkedBy?i.jsxs("div",{className:"box",children:[i.jsx("b",{style:{color:l.checkedBy.passing?"var(--accent)":"var(--you-ink)"},children:l.checkedBy.passing?"Passing":"Being written"})," ",i.jsx("span",{className:"mono",style:{fontSize:12},children:l.checkedBy.name}),i.jsx("p",{className:"note",style:{marginTop:4},children:"If someone breaks this decision, the checks fail and nothing ships."})]}):i.jsx("p",{className:"note",children:"A fact about the project, nothing to test."})]})}function IT({d:e,check:t,tk:n}){const r=X();if(e.replacedBy)return null;const s=t?.status==="pending"||t?.status==="running"||r.isPending,a=()=>r.mutate({path:"/api/v1/architecture/impact",body:{adr:e.id},done:`The Architect is checking the open tickets against ${e.id}.`});return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"lbl",children:"Tickets planned before it"}),s?i.jsxs("p",{className:"note",style:{display:"flex",gap:8,alignItems:"center"},children:[i.jsx(Rn,{size:13,className:"spin"})," The Architect is checking the open tickets."]}):t?.status==="done"?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"note",style:{marginBottom:6},children:t.checked?.length?`Checked ${t.checked.length} open ${t.checked.length===1?"ticket":"tickets"} ${t.at?An(t.at):""}. ${t.affected?.length?"These need a change, waiting for you:":"None need a change."}`:"No open ticket was planned before it."}),i.jsx("div",{className:"pills",children:(t.affected??[]).map(n)}),i.jsx("button",{className:"btn sm quiet",style:{marginTop:8},onClick:a,children:"Check again"})]}):i.jsxs(i.Fragment,{children:[i.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."}),i.jsx("button",{className:"btn sm",onClick:a,children:"Check open tickets"})]})]})}function zT(e,t){const n=[];e.some(o=>!t.some(l=>l.id===o.from))&&n.push({key:"scan",label:"Scan"});for(const o of t)n.push({key:o.id,label:o.id,t:o});const r=o=>{const l=n.findIndex(c=>c.key===o);return l<0?0:l},s=[...Xl,"Other"],a=e.map(o=>({d:o,area:o.area??"Other"})).sort((o,l)=>s.indexOf(o.area)-s.indexOf(l.area)||r(o.d.from)-r(l.d.from));return{cols:n,rows:a,colOf:r}}function a3(e,t){return e.find(n=>n.id===t)?.from??""}function FT(e,t,n){if(!e)return null;const r=new Set([e.id]),s=l=>[...l.buildsOn??[],...l.replaces?[l.replaces]:[]];if(e.kind==="ticket"){const l=n.find(c=>c.id===e.id);for(const c of l?.follows??[])r.add(c);return l?.made&&r.add(l.made),r}const a=[e.id];for(;a.length;){const l=a.pop(),c=t.find(u=>u.id===l);for(const u of c?s(c):[])r.has(u)||(r.add(u),a.push(u))}const o=[e.id];for(;o.length;){const l=o.pop();for(const c of t)s(c).includes(l)&&!r.has(c.id)&&(r.add(c.id),o.push(c.id))}for(const l of[...r]){const c=t.find(u=>u.id===l);if(c&&l===e.id)for(const u of c.tickets)r.add(u);c&&r.add(c.from)}for(const l of n)l.follows.includes(e.id)&&r.add(l.id);return r}function MT(e,t){return e.length>t?`${e.slice(0,t-1).trimEnd()}…`:e}function G0(e){return Number(e.replace(/\D/g,""))||0}function OT(){const e=Tt(),t=e.data?.ready?e.data.tickets.filter(n=>n.waiting||n.outdated?.length||sn(n)):[];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Waiting for you"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad inbox"})]}),i.jsx("div",{className:"scroll",children:i.jsx("div",{className:"page",children:t.length===0?i.jsxs("div",{className:"calm",children:[i.jsx("span",{className:"ring",children:i.jsx(te,{size:18,strokeWidth:2.5})}),i.jsxs("div",{children:[i.jsx("b",{children:"Nothing needs you right now"}),i.jsx("span",{children:"The squad is working. Questions, plans, proof and decisions land here."})]})]}):i.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:t.map(n=>i.jsxs("div",{className:"wcard",style:{padding:"16px 18px 16px 22px"},children:[i.jsxs("div",{className:"grow",children:[i.jsxs("div",{className:"meta",children:[i.jsx("span",{className:"id",children:n.id}),i.jsx("span",{children:ar[n.stage]}),i.jsx("span",{children:An(n.activity[0]?.at??n.createdAt)})]}),i.jsx("h3",{children:n.title}),i.jsx("p",{children:n.waiting?.summary??(sn(n)?`Change ${ya(n).id} to the spec waits for you`:Vh(n))})]}),i.jsx(ne,{text:!n.waiting&&sn(n)?`squad propose ${n.id} --approve`:Wh(n)}),n.waiting?.kind==="proof"?i.jsx(Te,{to:"/tickets/$id/proof",params:{id:n.id},className:"btn pri sm",children:cl(n)}):i.jsx(Te,{to:"/board",search:{ticket:n.id},className:"btn pri sm",children:n.waiting?cl(n):sn(n)?"Check the change":"Check it"})]},n.id))})})})]})}function $T(){const e=Tt(),[t,n]=j.useState(!1),r=e.data?.ready?e.data.tickets.filter(s=>s.kind==="bug"):[];return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"top",children:[i.jsx("h1",{children:"Bugs"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:'squad bug "What happened"'}),i.jsxs("button",{className:"btn pri",onClick:()=>n(!0),children:[i.jsx(En,{size:15})," Report a bug"]})]}),i.jsx("div",{className:"scroll",children:i.jsxs("div",{className:"page",children:[i.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."}),r.length===0?i.jsx("p",{className:"note",children:"No open bugs."}):i.jsxs("table",{className:"table",children:[i.jsx("thead",{children:i.jsxs("tr",{children:[i.jsx("th",{style:{width:90},children:"ID"}),i.jsx("th",{children:"What happened"}),i.jsx("th",{style:{width:120},children:"Found in"}),i.jsx("th",{style:{width:120},children:"Stage"}),i.jsx("th",{style:{width:240},children:"Now"})]})}),i.jsx("tbody",{children:r.map(s=>i.jsxs("tr",{children:[i.jsx("td",{className:"mono",children:s.id}),i.jsx("td",{children:i.jsx(Te,{to:"/board",search:{ticket:s.id},style:{fontWeight:600},children:s.title})}),i.jsx("td",{children:s.foundIn??""}),i.jsx("td",{children:ar[s.stage]}),i.jsx("td",{style:{color:s.waiting?"var(--you-ink)":"var(--muted)"},children:s.waiting?.summary??s.status})]},s.id))})]})]})}),t&&i.jsx(Pp,{onClose:()=>n(!1)})]})}const DT={claude:"Claude Code",codex:"Codex"};function BT(){const e=Tt(),t=hy(),n=e.data?.ready?e.data.meta:void 0,r=ge({queryKey:["agents"],queryFn:()=>be("/api/v1/agents"),refetchInterval:2e3}),[s,a]=j.useState(null);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"top",children:i.jsx("h1",{children:"Squad and AI"})}),i.jsx("div",{className:"scroll",children:i.jsxs("div",{className:"page",style:{maxWidth:900},children:[i.jsx("h2",{children:"The squad"}),i.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."}),i.jsx("div",{style:{marginTop:10},children:(r.data??[]).map(o=>i.jsxs("div",{className:"maprow",style:{gridTemplateColumns:"34px 120px 1fr 250px 70px",alignItems:"center"},children:[i.jsx(Ws,{role:o.role}),i.jsx("b",{children:o.name}),i.jsxs("span",{style:{fontSize:13},children:[i.jsx("span",{className:"note",children:o.job}),o.working.length>0&&i.jsx("span",{style:{display:"block",marginTop:3},children:o.working.map(l=>i.jsxs(Te,{to:"/board",search:{ticket:l.id},style:{display:"block",color:"var(--accent)"},children:[i.jsx("b",{className:"mono",children:l.id})," ",l.status]},l.id))})]}),i.jsxs("span",{className:"pills",children:[i.jsx("span",{className:"pill",children:DT[o.tool]}),(()=>{const l=o.levels?.find(c=>c.step===o.stepList[0]?.id)?.now;return l?i.jsxs("span",{className:`pill ${l.from==="squad-kit"?"wait":""}`,title:`${o.stepList[0]?.name}: ${o3(l)}`,children:[l.modelName||l.level,l.effort&&o.supportsEffort?` · ${l.effort}`:""]}):null})(),o.instructions.replace(/<!--[\s\S]*?-->/g,"").trim()&&i.jsx("span",{className:"pill ok",children:"House rules"})]}),i.jsx("button",{className:"btn sm",onClick:()=>a(o),children:"Edit"})]},o.role))}),i.jsxs("div",{className:"maprow",style:{marginTop:4},children:[i.jsx("b",{children:"Tickets at once"}),i.jsxs("span",{className:"note",children:["Up to ",t.data?.parallel??n?.parallel??2,", shared by all your projects. Change it in Settings."]})]}),i.jsx(IE,{}),i.jsx("h2",{style:{marginTop:30},children:"Your AI tools"}),i.jsx("p",{className:"note",style:{marginTop:2},children:"squad-kit uses the logins you already have. Nothing new to buy."}),(n?.tools??[]).map(o=>i.jsxs("div",{className:"toolrow",children:[i.jsx("span",{className:"logo",children:i.jsx(ll,{size:18})}),i.jsxs("span",{children:[i.jsx("b",{children:o.name}),i.jsx("br",{}),i.jsx("span",{className:"note",children:o.name==="Codex"?"Your ChatGPT subscription":"Your Claude subscription"})]}),i.jsx("span",{className:`pill ${o.ready?"ok":"wait"}`,children:o.ready?"Ready":"Not found"})]},o.name)),i.jsxs("div",{className:"toolrow off",children:[i.jsx("span",{className:"logo",children:i.jsx(ll,{size:18})}),i.jsxs("span",{children:[i.jsx("b",{children:"Gemini CLI, Copilot CLI, Cursor"}),i.jsx("br",{}),i.jsx("span",{className:"note",children:"Coming next"})]}),i.jsx("span",{})]})]})}),s&&i.jsx(UT,{agent:s,onClose:()=>a(null)})]})}function UT({agent:e,onClose:t}){const n=X(),r=w=>(w??"").replace(/<!--[\s\S]*?-->/g,"").trim(),[s,a]=j.useState(e.tool),[o,l]=j.useState(e.model),[c,u]=j.useState(e.youRole?.model??""),[h,d]=j.useState(()=>Object.fromEntries(e.levels.map(w=>[w.step,w.team??{}]))),[f,p]=j.useState(()=>Object.fromEntries(e.levels.map(w=>[w.step,w.you??{}]))),[m,g]=j.useState(r(e.instructions)),[v,y]=j.useState(()=>Object.fromEntries(e.stepList.map(w=>[w.id,r(e.steps?.[w.id])]))),x=ge({queryKey:["core-prompts",e.role],queryFn:()=>be(`/api/v1/agents/${e.role}/prompts`)}),k=async()=>{const w=(b,E)=>(b?.level??"")===(E.level??"")&&(b?.effort??"")===(E.effort??"");try{for(const b of e.levels)w(b.you,f[b.step])||await cn("/api/v1/me/levels","PUT",{key:`${e.role}.${b.step}`,...f[b.step]});(e.youRole?.model??"")!==c.trim()&&await cn("/api/v1/me/levels","PUT",{key:e.role,...e.youRole,model:c.trim()})}catch(b){return n.reset(),alert(b instanceof Error?b.message:String(b))}const T={};(e.teamRole?.level||e.teamRole?.effort)&&(T[e.role]={level:e.teamRole.level,effort:e.teamRole.effort});for(const[b,E]of Object.entries(h))(E.level||E.effort)&&(T[`${e.role}.${b}`]=E);n.mutate({path:`/api/v1/agents/${e.role}`,method:"PUT",body:{tool:s,model:o,instructions:m,steps:v,levels:T},done:`${e.name} saved. It uses this from its next step.`},{onSuccess:t})};return i.jsxs(pt,{title:`Edit the ${e.name}`,wide:!0,onClose:t,footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn pri",disabled:n.isPending,onClick:k,children:"Save"}),i.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx("span",{className:"note mono",style:{fontSize:12},children:e.file})]}),children:[i.jsxs("p",{className:"note",style:{marginTop:0},children:[e.job,"."]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"AI tool"}),i.jsxs("select",{className:"input",value:s,onChange:w=>a(w.target.value),children:[i.jsx("option",{value:"claude",children:"Claude Code"}),i.jsx("option",{value:"codex",disabled:!0,children:"Codex (coming soon)"})]})]}),i.jsx(HT,{agent:e,team:h,setTeam:d,you:f,setYou:p}),i.jsxs("details",{style:{marginTop:8},children:[i.jsx("summary",{className:"note",children:"Pin exact models (advanced)"}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"For the team"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:o,placeholder:"Empty: use the levels above",onChange:w=>l(w.target.value)})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Just for me"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:c,placeholder:"Empty: use the levels above",onChange:w=>u(w.target.value)})]}),i.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."})]}),i.jsxs("div",{style:{marginTop:12},children:[i.jsx("b",{style:{display:"block",marginBottom:6},children:"House rules for every step"}),i.jsx("textarea",{className:"input",rows:4,style:{width:"100%",resize:"vertical"},value:m,placeholder:`Extra instructions the ${e.name} reads in every step, in plain words.`,onChange:w=>g(w.target.value)})]}),i.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.",x.data&&` The prompts below are filled in from ${x.data.ticket.id} "${x.data.ticket.title}".`]}),e.stepList.map(w=>{const T=x.data?.prompts.find(b=>b.step===w.id);return i.jsxs("div",{className:"agentstep",children:[i.jsx("b",{children:w.name}),i.jsx("textarea",{className:"input",rows:2,style:{width:"100%",resize:"vertical"},value:v[w.id]??"",placeholder:`Only for the ${w.name} step. For example: ${WT[w.id]??"keep it short"}.`,onChange:b=>y({...v,[w.id]:b.target.value})}),i.jsxs("details",{children:[i.jsxs("summary",{children:["Core prompt for ",w.name,", read only"]}),i.jsx("pre",{className:"coreprompt",children:T?T.prompt:x.isLoading?"Loading…":"Not available."})]})]},w.id)})]})}function o3(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?`, ${e.effort} effort`:""}), ${t}${e.why?`, ${e.why}`:""}`}const qT={strongest:"Strongest",balanced:"Balanced",fast:"Fast"};function Z0({value:e,onChange:t,below:n,agent:r}){return i.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:4,minWidth:0},children:[i.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.level??"",onChange:s=>t({...e,level:s.target.value||void 0}),"aria-label":"Level",children:[i.jsxs("option",{value:"",children:["Default",n.level?` (${n.level})`:""]}),["strongest","balanced","fast"].map(s=>i.jsxs("option",{value:s,children:[qT[s],r.modelOf[s]?` · ${r.modelOf[s]}`:""]},s))]}),r.supportsEffort&&i.jsxs("select",{className:"input",style:{fontSize:12.5,padding:"4px 6px",width:"100%"},value:e.effort??"",onChange:s=>t({...e,effort:s.target.value||void 0}),"aria-label":"Effort",children:[i.jsxs("option",{value:"",children:["Default",n.effort?` (${n.effort} effort)`:""]}),i.jsx("option",{value:"high",children:"High effort"}),i.jsx("option",{value:"medium",children:"Medium effort"}),i.jsx("option",{value:"low",children:"Low effort"})]})]})}function HT({agent:e,team:t,setTeam:n,you:r,setYou:s}){return i.jsxs("div",{style:{marginTop:12},children:[i.jsx("b",{style:{display:"block",marginBottom:2},children:"Models"}),i.jsx("p",{className:"note",style:{marginTop:0,fontSize:12.5},children:"squad-kit picks a level for each step: strongest where a mistake is expensive, cheaper where the work is clear. Change it for the whole team, or just for you. Fixes that keep failing move up to the strongest level on their own."}),i.jsxs("div",{className:"levels",role:"table",children:[i.jsxs("div",{className:"levrow head",role:"row",children:[i.jsx("span",{children:"Step"}),i.jsx("span",{children:"For the team"}),i.jsx("span",{children:"Just for me"}),i.jsx("span",{children:"Now"})]}),e.levels.map(a=>i.jsxs("div",{className:"levrow",role:"row",children:[i.jsx("span",{children:a.name}),i.jsx(Z0,{agent:e,value:t[a.step]??{},below:a.standard,onChange:o=>n({...t,[a.step]:o})}),i.jsx(Z0,{agent:e,value:r[a.step]??{},below:{...a.standard,...t[a.step]??{}},onChange:o=>s({...r,[a.step]:o})}),i.jsx("span",{className:"note",style:{fontSize:12.5},children:o3(a.now)})]},a.step))]})]})}const WT={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"},VT=[{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 KT(){const e=Tt(),t=e.data?.ready?e.data.meta:void 0;if(!t)return null;const n=t.repos?.length?t.repos:[{path:".",base:t.git?.base??"main",remote:t.git?.remote??"",commands:t.commands??{}}],r=!!t.repos?.length;return i.jsxs(i.Fragment,{children:[i.jsx("h2",{style:{marginTop:6},children:"How the squad checks and runs this project"}),i.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.",r&&" This workspace has several code repos; each ticket works in one of them."]}),n.map(s=>i.jsx(QT,{repo:s,multi:r},s.path)),i.jsx(tP,{})]})}function QT({repo:e,multi:t}){const n=X(),[r,s]=j.useState(null),[a,o]=j.useState(null),l=r??e.commands,c=a??{base:e.base,remote:e.remote},u=()=>{const h=t?{repos:[{path:e.path,...c,commands:l}]}:{commands:l,git:c};n.mutate({path:"/api/v1/settings",method:"PUT",body:h,done:"Settings saved"},{onSuccess:()=>{s(null),o(null)}})};return i.jsxs("div",{style:{marginBottom:24},children:[t&&i.jsxs("h3",{className:"mono",style:{fontSize:14,margin:"18px 0 2px"},children:[e.path,e.summary&&i.jsx("span",{className:"note",style:{fontFamily:"inherit",marginLeft:8},children:e.summary})]}),VT.map(h=>i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:h.label}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:l[h.key]??"",placeholder:h.hint,onChange:d=>s({...l,[h.key]:d.target.value})})]},h.key)),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Release branch"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:c.base,onChange:h=>o({...c,base:h.target.value})})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Push to"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:c.remote,placeholder:"origin (empty: no push)",onChange:h=>o({...c,remote:h.target.value})})]}),i.jsx("div",{style:{marginTop:12},children:i.jsxs("button",{className:"btn pri sm",disabled:!r&&!a,onClick:u,children:["Save",t?` ${e.path}`:""]})})]})}function GT(){const e=X(),t=ge({queryKey:["tracker"],queryFn:()=>be("/api/v1/tracker"),refetchInterval:6e4}),[n,r]=j.useState(null),s=t.data,a=n??{organization:s?.organization??"",project:s?.project??"",token:""},o=s?.type==="azure"&&s.user;return i.jsxs("div",{style:{marginBottom:26},children:[i.jsx("h2",{style:{marginTop:6},children:"Azure DevOps"}),i.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."}),s&&i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Status"}),i.jsx("span",{children:o?i.jsxs("span",{className:"pill ok",children:["Connected as ",s.user]}):s.type==="azure"?i.jsx("span",{className:"pill bug",children:s.error??(s.hasToken?"Not connected":"Needs a token")}):i.jsx("span",{className:"pill wait",children:"Not set up"})})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Organization"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:a.organization,placeholder:"e.g. momenysr",onChange:l=>r({...a,organization:l.target.value})})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Project"}),i.jsx("input",{className:"input mono",style:{fontSize:13},value:a.project,placeholder:"e.g. Mawid",onChange:l=>r({...a,project:l.target.value})})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Token"}),i.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:a.token,placeholder:s?.hasToken?"Saved. Paste a new one to replace it":"Personal access token from Azure DevOps",onChange:l=>r({...a,token:l.target.value})})]}),i.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[i.jsx("button",{className:"btn pri sm",disabled:!n||e.isPending,onClick:()=>e.mutate({path:"/api/v1/tracker",method:"PUT",body:a,done:"Azure DevOps is connected"},{onSuccess:()=>{r(null),t.refetch()}}),children:e.isPending?"Checking…":"Save and check"}),i.jsx("span",{className:"note",children:"Token scopes: Work Items and Code (read, write and manage)."}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad config set tracker"})]})]})}function ZT(){const e=X(),t=ge({queryKey:["speech"],queryFn:()=>be("/api/v1/speech")}),[n,r]=j.useState(""),s=t.data?.hasKey,a=(o,l)=>e.mutate({path:"/api/v1/speech",method:"PUT",body:o,done:l},{onSuccess:()=>{r(""),t.refetch()}});return i.jsxs("div",{style:{marginBottom:26},children:[i.jsx("h2",{style:{marginTop:6},children:"Speech to text"}),i.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."}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Status"}),i.jsx("span",{children:s?i.jsx("span",{className:"pill ok",children:"Munsit is set up"}):i.jsx("span",{className:"pill wait",children:"Not set up"})})]}),i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Munsit key"}),i.jsx("input",{className:"input mono",style:{fontSize:13},type:"password",autoComplete:"off",value:n,placeholder:s?"Saved. Paste a new one to replace it":"API key from munsit.com",onChange:o=>r(o.target.value)})]}),i.jsxs("div",{style:{marginTop:12,display:"flex",gap:10,alignItems:"center"},children:[i.jsx("button",{className:"btn pri sm",disabled:!n.trim()||e.isPending,onClick:()=>a({munsit:n},"Munsit is set up"),children:"Save"}),s&&i.jsx("button",{className:"btn sm",disabled:e.isPending,onClick:()=>a({remove:!0},"Munsit key removed"),children:"Remove"})]})]})}function YT(){const{restarting:e,restart:t}=py();return i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Board"}),i.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[i.jsx("button",{className:"btn sm",disabled:e,onClick:()=>void t(),children:e?"Restarting…":"Restart the board"}),i.jsx("span",{className:"note",children:"Same link. Running work picks up where it stopped."}),i.jsx(ne,{text:"squad console --restart"})]})]})}function XT(){const e=Tt(),t=X(),n=e.data?.ready?e.data.meta:void 0;if(!n)return null;const r=n.runner??"acp",s=(a,o)=>t.mutate({path:"/api/v1/settings",method:"PUT",body:{runner:a},done:o});return i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Talk to Claude"}),i.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[i.jsx("button",{className:`btn sm ${r==="acp"?"pri":""}`,onClick:()=>s("acp","The squad talks to Claude through ACP"),children:"Agent Client Protocol"}),i.jsx("button",{className:`btn sm ${r==="direct"?"pri":""}`,onClick:()=>s("direct","The squad runs Claude Code directly"),children:"Directly"}),i.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 JT(){const e=hy(),t=X(),n=e.data;return n?i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Tickets at once"}),i.jsxs("span",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[Array.from({length:n.max},(r,s)=>s+1).map(r=>i.jsx("button",{className:`btn sm ${r===n.parallel?"pri":""}`,onClick:()=>t.mutate({path:"/api/v1/app/settings",method:"PUT",body:{parallel:r},done:`Up to ${r} tickets at once, across all your projects`}),children:r},r)),i.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 eP({on:e}){const t=X();return i.jsxs("div",{className:"maprow",style:{alignItems:"center"},children:[i.jsx("b",{children:"Project documents in git"}),i.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[i.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"}),i.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 tP(){const e=X();return i.jsx("div",{style:{margin:"4px 0 26px"},children:i.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 nP(){const e=Tt(),{theme:t,toggleTheme:n,showCommands:r,toggleCommands:s}=ze(),a=X(),[o,l]=j.useState(!1),c=e.data?.ready?e.data.meta:void 0;return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"top",children:i.jsx("h1",{children:"Settings"})}),i.jsx("div",{className:"scroll",children:i.jsxs("div",{className:"page",style:{maxWidth:760},children:[i.jsxs("div",{className:"maprow",children:[i.jsx("b",{children:"Theme"}),i.jsx("span",{children:i.jsx("button",{className:"btn sm",onClick:n,children:t==="light"?"Switch to dark":"Switch to light"})})]}),i.jsxs("div",{className:"maprow",children:[i.jsx("b",{children:"Terminal commands"}),i.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center"},children:[i.jsx("button",{className:"btn sm",onClick:s,children:r?"Hide them":"Show them"}),i.jsx("span",{className:"note",children:"Every button shows the command that does the same thing."})]})]}),i.jsxs("div",{className:"maprow",children:[i.jsx("b",{children:"Project files"}),i.jsxs("span",{className:"note",children:[i.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."]})]}),c?.engine==="live"&&i.jsx(eP,{on:c.documentsInGit!==!1}),i.jsx(YT,{}),c?.engine==="live"&&i.jsx(JT,{}),c?.engine==="live"&&i.jsx(XT,{}),c?.engine==="live"&&i.jsx(GT,{}),c?.engine==="live"&&i.jsx(ZT,{}),c?.engine==="live"&&i.jsx(KT,{}),c?.engine==="demo"&&i.jsxs("div",{className:"maprow",children:[i.jsx("b",{children:"Demo board"}),i.jsxs("span",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap"},children:[i.jsxs("button",{className:"btn sm danger",onClick:()=>l(!0),children:[i.jsx(N1,{size:13})," Start the demo over"]}),i.jsxs("span",{className:"note",children:["The squad plays back a recorded run at ",c.speed,"x speed."]})]})]})]})}),o&&i.jsx(pt,{title:"Start the demo over?",onClose:()=>l(!1),footer:i.jsxs(i.Fragment,{children:[i.jsxs("button",{className:"btn pri",onClick:()=>a.mutate({path:"/api/v1/demo/reset",done:"The demo board is fresh again."},{onSuccess:()=>l(!1)}),children:[i.jsx(N1,{size:15})," Start over"]}),i.jsx("button",{className:"btn",onClick:()=>l(!1),children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad demo"})]}),children:i.jsx("p",{children:"Every ticket, release and decision goes back to how the demo starts."})})]})}const Y0=2e3,X0=e=>`/p/${encodeURIComponent(e)}`;function rP(e,t){const n=/\s/.test(t)?`"${t}"`:t;return e.replace(/\bsquad ([a-z-]+) (\S+)/g,`squad $1 $2 --project ${n}`)}function sP(e,t){return t&&e.startsWith(t)?`~${e.slice(t.length)}`:e}function iP(){const{theme:e,toggleTheme:t}=ze(),n=ge({queryKey:["app","projects"],queryFn:()=>be("/api/v1/app/projects"),refetchInterval:Y0}),r=ge({queryKey:["app","waiting"],queryFn:()=>be("/api/v1/app/waiting"),refetchInterval:Y0}),[s,a]=j.useState(!1),[o,l]=j.useState(null),c=n.data?.projects??[],u=r.data?.items??[];return i.jsxs("div",{className:"home",children:[i.jsxs("header",{className:"home-top",children:[i.jsx("img",{src:"/logo.svg",alt:""}),i.jsx("b",{children:"squad-kit"}),i.jsx("span",{className:"grow"}),n.data&&i.jsx(aP,{s:n.data}),i.jsx("button",{className:"theme",onClick:t,"aria-label":e==="light"?"Switch to dark":"Switch to light",children:e==="light"?i.jsx($l,{size:15}):i.jsx(Bl,{size:15})})]}),i.jsx("div",{className:"scroll",children:i.jsxs("div",{className:"page home-page",children:[i.jsxs("section",{className:"home-projects",children:[i.jsxs("div",{className:"home-h",children:[i.jsx("h2",{children:"Projects"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad projects"}),i.jsxs("button",{className:"btn pri",onClick:()=>a(!0),children:[i.jsx(Zt,{size:15})," Add project"]})]}),n.isLoading?null:c.length===0?i.jsxs("button",{className:"home-empty",onClick:()=>a(!0),children:[i.jsx(ny,{size:22}),i.jsx("b",{children:"Add your first project"}),i.jsx("span",{children:"Pick its folder: one repo, a folder with several repos, or a new, empty folder for a new project."})]}):i.jsx("div",{className:"pcards",children:c.map(h=>i.jsx(oP,{p:h,onRemove:()=>l(h)},h.id))})]}),i.jsxs("section",{className:"home-inbox",children:[i.jsxs("div",{className:"home-h",children:[i.jsx("h2",{children:"Waiting for you"}),u.length>0&&i.jsx("span",{className:"badge you",children:u.length}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:"squad inbox"})]}),u.length===0?i.jsxs("div",{className:"calm",children:[i.jsx("span",{className:"ring",children:i.jsx(te,{size:18,strokeWidth:2.5})}),i.jsxs("div",{children:[i.jsx("b",{children:"Nothing needs you right now"}),i.jsx("span",{children:c.length?"The squads are working. Questions, plans, proof and decisions from every project land here.":"Add a project to start."})]})]}):i.jsx("div",{className:"home-waiting",children:u.map(({project:h,ticket:d})=>i.jsxs("div",{className:"wcard",children:[i.jsxs("div",{className:"grow",children:[i.jsxs("div",{className:"meta",children:[i.jsx("span",{className:"pill sm",children:h.name}),i.jsx("span",{className:"id",children:d.id}),i.jsx("span",{children:ar[d.stage]}),i.jsx("span",{children:An(d.activity[0]?.at??d.createdAt)})]}),i.jsx("h3",{children:d.title}),i.jsx("p",{children:d.waiting?.summary??(d.outdated?.length?Vh(d):`Looks stuck: ${d.quiet?.detail??""}`)})]}),i.jsx(ne,{text:rP(Wh(d),h.name)}),i.jsx("a",{className:"btn pri sm",href:d.waiting?.kind==="proof"?`${X0(h.id)}/tickets/${encodeURIComponent(d.id)}/proof`:`${X0(h.id)}/board?ticket=${encodeURIComponent(d.id)}`,children:d.waiting?cl(d):"Check it"})]},`${h.id}/${d.id}`))})]})]})}),s&&i.jsx(cP,{onClose:()=>a(!1)}),o&&i.jsx(dP,{p:o,onClose:()=>l(null)})]})}function aP({s:e}){const t=qs(),{toast:n}=ze(),r=async s=>{try{await cn("/api/v1/app/settings","PUT",{parallel:s}),t.invalidateQueries({queryKey:["app"]}),n(`Up to ${s} tickets at once, across all projects`)}catch(a){n(a instanceof Error?a.message:String(a),"err")}};return i.jsxs("label",{className:"shared",title:"Shared by all your projects, because they use the same AI accounts",children:[i.jsxs("span",{children:["Tickets at once: ",i.jsx("b",{children:e.running})," of"]}),i.jsx("select",{className:"select sm",value:e.parallel,onChange:s=>void r(Number(s.target.value)),"aria-label":"Tickets at once, across all projects",children:Array.from({length:e.max},(s,a)=>a+1).map(s=>i.jsx("option",{value:s,children:s},s))})]})}function oP({p:e,onRemove:t}){const n=qs(),{toast:r}=ze(),[s,a]=j.useState(!1),o=e.setup&&e.setup.status!=="done"?e.setup:null,l=async()=>{a(!0);try{await cn("/api/v1/app/projects","POST",{folder:e.root}),r(`${e.name} is open`)}catch(u){r(u instanceof Error?u.message:String(u),"err")}finally{a(!1),n.invalidateQueries({queryKey:["app"]})}},c=e.open?o?.status==="failed"?i.jsx("span",{className:"bad",children:"The Architect could not read the project"}):o?i.jsxs("span",{className:"you",children:["Setting up: ",o.status==="running"?o.now??"the Architect reads the project":"the Architect reads the project next"]}):i.jsxs("span",{children:[e.tickets," open",e.working>0&&i.jsxs(i.Fragment,{children:[" · ",e.working," working"]}),e.waiting>0&&i.jsxs("span",{className:"you",children:[" · ",e.waiting," waiting for you"]})]}):i.jsxs("span",{className:"bad",children:["Could not open: ",e.why]});return i.jsxs("div",{className:`pcard ${e.open?"":"off"}`,children:[i.jsx("span",{className:"pm",children:e.name.charAt(0).toUpperCase()}),i.jsxs("div",{className:"grow",children:[i.jsxs("b",{children:[e.name,e.engine==="demo"&&i.jsx("small",{className:"demo",children:"Demo"})]}),i.jsx("span",{className:"mono path",title:e.root,children:e.root}),i.jsx("span",{className:"state",children:c})]}),i.jsxs("div",{className:"acts",children:[e.open?i.jsx("a",{className:"btn sm pri",href:e.url,children:"Open board"}):i.jsx("button",{className:"btn sm",disabled:s,onClick:()=>void l(),children:"Try again"}),i.jsx("button",{className:"btn sm quiet",onClick:t,children:"Remove"})]})]})}const lP={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 cP({onClose:e}){const[t,n]=j.useState(""),[r,s]=j.useState(null),[a,o]=j.useState(null),[l,c]=j.useState(!1),u=ge({queryKey:["app","folders",t],queryFn:()=>be(`/api/v1/app/folders${t?`?path=${encodeURIComponent(t)}`:""}`)}),h=u.data,d=g=>{o(null),s(null),n(g)},f=async()=>{if(h){c(!0),o(null);try{const g=await cn("/api/v1/app/projects","POST",{folder:h.path});window.location.assign(g.url)}catch(g){c(!1),o(g instanceof Error?g.message:String(g))}}},p=async()=>{if(!(!h||!r?.trim()))try{const g=await cn("/api/v1/app/folders","POST",{parent:h.path,name:r.trim()});d(g.path)}catch(g){o(g instanceof Error?g.message:String(g))}},m=h?uP(h.path):[];return i.jsxs(pt,{title:"Add a project",wide:!0,onClose:e,footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn pri",disabled:!h?.canAdd||l||u.isFetching,onClick:()=>void f(),children:l?"Adding…":"Add this folder"}),i.jsx("button",{className:"btn",onClick:e,children:"Cancel"}),i.jsx("span",{className:"grow"}),h&&i.jsx(ne,{text:`cd "${h.path}" && squad console`})]}),children:[i.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."}),h&&i.jsx("div",{className:"places",children:h.places.map(g=>i.jsx("button",{className:`btn sm ${g.path===h.path?"pri":""}`,onClick:()=>d(g.path),children:g.name},g.path))}),i.jsxs("div",{className:"fb",children:[i.jsxs("div",{className:"fb-bar",children:[i.jsx("button",{className:"iconbtn",disabled:!h?.parent,onClick:()=>h?.parent&&d(h.parent),"aria-label":"Up one folder",title:"Up one folder",children:i.jsx(Ik,{size:15})}),i.jsx("span",{className:"crumbs mono",children:m.map((g,v)=>i.jsxs("span",{children:[v>0&&i.jsx(Bh,{size:12}),i.jsx("button",{onClick:()=>d(g.path),children:g.name})]},g.path))})]}),i.jsxs("div",{className:"fb-list",role:"list",children:[u.isError&&i.jsx("p",{className:"note bad",children:u.error.message}),h&&h.folders.length===0&&i.jsx("p",{className:"note",children:"No folders inside."}),h?.folders.map(g=>i.jsxs("button",{role:"listitem",className:"fb-row",onClick:()=>d(g.path),children:[g.kind==="project"?i.jsx(Fk,{size:16}):g.kind==="repo"?i.jsx(Mk,{size:16}):i.jsx(Ok,{size:16}),i.jsx("span",{className:"nm",children:g.name}),g.kind==="project"&&i.jsx("span",{className:"pill ok sm",children:"squad-kit project"}),g.kind==="repo"&&i.jsx("span",{className:"pill sm",children:"code repo"})]},g.path))]}),i.jsx("div",{className:"fb-new",children:r===null?i.jsxs("button",{className:"btn sm",disabled:!h,onClick:()=>s(""),children:[i.jsx(ny,{size:14})," New folder here"]}):i.jsxs(i.Fragment,{children:[i.jsx("input",{className:"input",autoFocus:!0,placeholder:"Name of the new folder",value:r,onChange:g=>s(g.target.value),onKeyDown:g=>g.key==="Enter"&&void p()}),i.jsx("button",{className:"btn sm pri",disabled:!r.trim(),onClick:()=>void p(),children:"Make it"}),i.jsx("button",{className:"btn sm",onClick:()=>s(null),children:"Cancel"})]})})]}),h&&i.jsxs("p",{className:"fb-kind",children:[i.jsx("b",{children:sP(h.path,h.home)}),i.jsx("span",{children:h.canAdd?lP[h.kind](h):"This folder can't be a project. Open a folder inside it, or make a new one here."})]}),a&&i.jsx("p",{className:"fb-error",children:a})]})}function uP(e){const t=e.split("/").filter(Boolean);return[{name:"/",path:"/"},...t.map((n,r)=>({name:n,path:`/${t.slice(0,r+1).join("/")}`}))]}function dP({p:e,onClose:t}){const n=qs(),{toast:r}=ze(),[s,a]=j.useState(!1),o=async()=>{a(!0);try{await cn(`/api/v1/app/projects/${encodeURIComponent(e.id)}`,"DELETE"),n.invalidateQueries({queryKey:["app"]}),r(`${e.name} is out of squad-kit. Its files stay in its folder.`),t()}catch(c){a(!1),r(c instanceof Error?c.message:String(c),"err")}},l=/\s/.test(e.name)?`"${e.name}"`:e.name;return i.jsx(pt,{title:`Take ${e.name} out of squad-kit?`,onClose:t,footer:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn danger",disabled:s,onClick:()=>void o(),children:"Take it out"}),i.jsx("button",{className:"btn",onClick:t,children:"Cancel"}),i.jsx("span",{className:"grow"}),i.jsx(ne,{text:`squad projects --remove ${l}`})]}),children:i.jsxs("p",{children:["Its squad stops. Nothing is deleted: its files stay in ",i.jsx("span",{className:"mono",children:e.root}),". Add it again any time."]})})}function hP(){const e=ha({from:"/conversations"}),t=Wr({from:"/conversations"}),n=Gh(Zh),[r,s]=j.useState(""),a=ia(r),l=ia().data??[],c=e.ticket??l.find(p=>p.open)?.id??l[0]?.id,[u,h]=j.useState(null),d=p=>{h(null),t({search:{ticket:p}})},f=p=>{Kt.show(p),t({to:"/board"})};return n?i.jsx(vP,{id:c,all:l,pick:d,doc:u,setDoc:h}):i.jsxs("div",{className:"cpage",children:[i.jsx(pP,{q:r,setQ:s}),i.jsxs("div",{className:"cpage-b",children:[i.jsx(mP,{list:a.data??[],id:c,pick:d,searching:!!r.trim()}),i.jsx("section",{className:"ccenter","aria-label":"Conversation",children:c?i.jsx(Rp,{id:c,size:"full",onOpenDoc:h,onPanel:()=>f(c)},c):i.jsxs("div",{className:"cempty",children:[i.jsx("p",{children:"No talks yet. Start one with any agent on any ticket."}),i.jsx(Gx,{})]})}),u?i.jsx(Sp,{doc:u,onClose:()=>h(null)}):c?i.jsx(gP,{id:c,onOpenDoc:h}):null]})]})}function pP({q:e,setQ:t}){const n=Tt(),{theme:r,toggleTheme:s}=ze(),a=n.data?.ready?n.data.meta.project:"";return i.jsxs("header",{className:"cpage-h",children:[i.jsxs(Te,{to:"/board",className:"btn",children:[i.jsx(Pk,{size:15})," Back to the board"]}),i.jsx("h1",{children:"Conversations"}),i.jsx("span",{className:"cdim",children:a}),i.jsx("span",{className:"grow"}),i.jsxs("label",{className:"search cpage-search",children:[i.jsx(Hs,{size:15}),i.jsx("input",{value:e,onChange:o=>t(o.target.value),placeholder:"Search all conversations","aria-label":"Search all conversations",dir:"auto"})]}),i.jsx("button",{className:"iconbtn",onClick:s,"aria-label":r==="light"?"Switch to dark":"Switch to light",children:r==="light"?i.jsx($l,{size:16}):i.jsx(Bl,{size:16})})]})}function l3(e){return new Date(e).toDateString()===new Date().toDateString()?Ms(e):Vr(e)}function fP(e){const n=(e.match??e.last?.text??"").replace(/[*_`#>]+/g,"").replace(/\s+/g," ").trim(),r=un(n);return{text:`${e.last?.who==="you"&&!e.match?"You: ":""}${n}`,dir:r.dir,cls:Ln(r)}}function mP({list:e,id:t,pick:n,searching:r}){const s=Ul(),a=[["Waiting for you",e.filter(o=>o.open&&o.yourTurn)],["Talking now",e.filter(o=>o.open&&!o.yourTurn)],["Earlier",e.filter(o=>!o.open)]];return i.jsx("nav",{className:"clist","aria-label":"All conversations",children:i.jsxs("div",{className:"clist-s",children:[r&&!e.length&&i.jsx("p",{className:"cdim",style:{padding:"14px 18px"},children:"Nothing found."}),a.map(([o,l])=>l.length?i.jsxs("div",{children:[i.jsx("div",{className:"csec",children:o}),l.map(c=>{const u=c.id===t,h=fP(c),d=Ap(c,s.seen);return i.jsxs("button",{className:`crow-i ${u?"on":""}`,onClick:()=>n(c.id),"aria-current":u,children:[i.jsx(cr,{role:c.with,live:c.thinking}),i.jsxs("span",{className:"rt",children:[i.jsx("span",{className:"cid",children:c.id}),i.jsx("b",{children:Ie[c.with]}),c.yourTurn&&i.jsx("span",{className:"cwait",children:"Your turn"})]}),i.jsx("span",{className:"rtime",children:c.thinking?"now":l3(c.at)}),i.jsx("span",{className:`rp ${c.thinking?"t-en":h.cls}`,dir:c.thinking?"ltr":h.dir,children:c.thinking?i.jsxs("span",{className:`rtyping c-${c.with}`,children:[i.jsxs("span",{className:"cdots sm",children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),i.jsx("span",{className:"shim",children:"Writing"})]}):h.text||c.title}),d>0&&!u&&i.jsx("span",{className:"cbadge rb",children:d})]},c.id)})]},o):null)]})})}function gP({id:e,onOpenDoc:t}){const n=ga(e).data,[r,s]=j.useState("spec");if(!n)return i.jsx("aside",{className:"cspec"});const a=[...new Set([...(n.chat?.messages??[]).flatMap(o=>o.files??[]),...n.attachments??[]])];return i.jsxs("aside",{className:"cspec","aria-label":"The ticket's spec",children:[i.jsxs("div",{className:"cstabs",role:"tablist",children:[i.jsx("button",{className:`cstab ${r==="spec"?"on":""}`,role:"tab","aria-selected":r==="spec",onClick:()=>s("spec"),children:n.chat?.open&&!n.chat.beside&&n.chat.with==="analyst"?"Spec draft":"Spec"}),i.jsxs("button",{className:`cstab ${r==="files"?"on":""}`,role:"tab","aria-selected":r==="files",onClick:()=>s("files"),children:["Files · ",a.length]}),i.jsx("button",{className:`cstab ${r==="activity"?"on":""}`,role:"tab","aria-selected":r==="activity",onClick:()=>s("activity"),children:"Activity"})]}),i.jsxs("div",{className:"csbody",children:[r==="spec"&&i.jsx(xP,{t:n}),r==="files"&&(a.length?i.jsx(jp,{ticket:n.id,files:a,onOpen:t}):i.jsx("p",{className:"cdim",children:"No files yet. Paste or drop screenshots into the chat."})),r==="activity"&&i.jsx("div",{className:"cact-list",children:n.activity.slice(0,60).map((o,l)=>i.jsxs("div",{className:"cact-row",children:[i.jsx("span",{className:"cdim",children:l3(o.at)}),i.jsxs("span",{children:[i.jsx("b",{children:Lr[o.who]})," ",i.jsx(yP,{text:o.text})]})]},l))})]})]})}function yP({text:e}){const t=un(e);return i.jsx("span",{dir:t.dir,className:Ln(t),children:e})}function io({text:e,fresh:t,chk:n,tone:r}){const s=un(e);return i.jsxs("div",{className:`citem ${t?"new":""} ${r??""}`,children:[n&&i.jsx("span",{className:"cchk"}),i.jsx("span",{className:`grow ${Ln(s)}`,dir:s.dir,lang:s.dir==="rtl"?"ar":"en",children:e}),t&&i.jsx("span",{className:"ctag",children:"From chat"})]})}function xP({t:e}){const t=e.chat?.messages[0]?.at??"",n=e.notes??[],r=d=>!!t&&d>=t,s=e.chat?.open&&!e.chat.beside&&e.chat.with==="analyst",a=[...(e.criteria??[]).map(d=>({text:d.then,at:""})),...(e.brief?.criteria??[]).map(d=>({text:d,at:""})),...n.filter(d=>d.kind==="criterion").map(d=>({text:d.text,at:d.at}))],o=[...(e.brief?.rules??[]).map(d=>({text:d,at:""})),...n.filter(d=>d.kind==="rule").map(d=>({text:d.text,at:d.at}))],l=n.filter(d=>d.kind==="note"&&!d.to),c=(e.questions??[]).filter(d=>!d.answer).map(d=>d.text),u=e.story??e.ask,h=un(u);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"cdim",children:s?"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."}),i.jsx("h3",{children:"Story"}),i.jsx("div",{className:Ln(h),dir:h.dir,children:u}),i.jsx("h3",{children:"Done when"}),a.length?a.map((d,f)=>i.jsx(io,{text:d.text,chk:!0,fresh:r(d.at)},f)):i.jsx("p",{className:"cdim",children:"Nothing yet."}),o.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:"Rules"}),o.map((d,f)=>i.jsx(io,{text:d.text,fresh:r(d.at)},f))]}),l.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:"Notes"}),l.map((d,f)=>i.jsx(io,{text:d.text,fresh:r(d.at)},f))]}),c.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("h3",{children:"Still open"}),c.map((d,f)=>i.jsx(io,{text:d,tone:"open"},f))]})]})}function vP({id:e,all:t,pick:n,doc:r,setDoc:s}){const a=ga(e).data,o=Ul(),l=Wr(),{theme:c,toggleTheme:u}=ze(),h=a?.chat,d=a?Hx(a):null,f=t.filter(m=>m.open||m.id===e),p=j.useRef(null);return j.useEffect(()=>{p.current?.querySelector(".cv.on")?.scrollIntoView({block:"nearest",inline:"nearest"})},[e,f.length]),i.jsxs("div",{className:"cphone",children:[i.jsxs("header",{className:"cph-h",children:[i.jsx("button",{className:"ib",onClick:()=>r?s(null):void l({to:"/board"}),"aria-label":r?"Close the document":"Back to the board",children:i.jsx(ey,{size:22})}),h&&i.jsx(cr,{role:h.with,live:h.thinking}),i.jsxs("div",{className:"cph-who",children:[i.jsxs("div",{children:[i.jsx("b",{children:h?Ie[h.with]:"Conversations"})," ",a&&i.jsx("span",{className:"cid",children:a.id})]}),d&&i.jsx("div",{className:`cph-stage ${d.tone}`,children:d.text})]}),i.jsx("span",{className:"grow"}),i.jsx("button",{className:"ib",onClick:u,"aria-label":c==="light"?"Switch to dark":"Switch to light",children:c==="light"?i.jsx($l,{size:18}):i.jsx(Bl,{size:18})})]}),f.length>1&&i.jsx("div",{className:"cph-convs",role:"tablist","aria-label":"Conversations",ref:p,children:f.map(m=>{const g=m.id===e,v=Ap(m,o.seen);return i.jsxs("button",{className:`cv ${g?"on":""}`,role:"tab","aria-selected":g,"aria-label":`${Ie[m.with]} on ${m.id}`,onClick:()=>n(m.id),children:[i.jsx(cr,{role:m.with,small:!0}),m.id,m.thinking&&!g&&i.jsxs("span",{className:`cdots sm c-${m.with}`,children:[i.jsx("i",{}),i.jsx("i",{}),i.jsx("i",{})]}),v>0&&!g&&i.jsx("span",{className:"cbadge",children:v})]},m.id)})}),e?i.jsx(Rp,{id:e,size:"phone",onOpenDoc:s},e):i.jsx("div",{className:"cempty",children:"No talks yet."}),r&&i.jsx("div",{className:"cph-doc",children:i.jsx(Sp,{doc:r,onClose:()=>s(null)})})]})}const Pt=lk({component:Ji?bE:iP,beforeLoad:({location:e})=>{if(!Ji&&e.pathname!=="/")throw Il({to:"/"})}}),kP=Ot({getParentRoute:()=>Pt,path:"/",beforeLoad:()=>{if(Ji)throw Il({to:"/board"})}}),wP=Ot({getParentRoute:()=>Pt,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:uT}),bP=Ot({getParentRoute:()=>Pt,path:"/tickets/$id/proof",component:mT}),jP=Ot({getParentRoute:()=>Pt,path:"/backlog",component:xT}),SP=Ot({getParentRoute:()=>Pt,path:"/inbox",component:OT}),NP=Ot({getParentRoute:()=>Pt,path:"/releases",component:gT}),CP=Ot({getParentRoute:()=>Pt,path:"/decisions",beforeLoad:()=>{throw Il({to:"/architecture",search:{view:"list"}})}}),EP=Ot({getParentRoute:()=>Pt,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:wT}),TP=Ot({getParentRoute:()=>Pt,path:"/conversations",validateSearch:e=>({ticket:typeof e.ticket=="string"&&e.ticket?e.ticket:void 0}),component:hP}),PP=Ot({getParentRoute:()=>Pt,path:"/bugs",component:$T}),RP=Ot({getParentRoute:()=>Pt,path:"/squad",component:BT}),AP=Ot({getParentRoute:()=>Pt,path:"/settings",component:nP}),LP=Pt.addChildren([kP,wP,jP,bP,SP,TP,NP,CP,EP,PP,RP,AP]),_P=vk({routeTree:LP,defaultPreload:!1,basepath:ud||"/"});document.documentElement.dataset.theme=uy();const IP=new a5({defaultOptions:{queries:{staleTime:500,retry:1,refetchOnWindowFocus:!0}}}),c3=document.getElementById("root");if(!c3)throw new Error("missing #root");const zP=Sk();h2(c3).render(i.jsx(j.StrictMode,{children:zP?i.jsx(o5,{client:IP,children:i.jsx(r8,{children:i.jsx(bk,{router:_P})})}):i.jsx("div",{className:"center",style:{height:"100%"},children:i.jsxs("div",{children:[i.jsx("h2",{children:"Open the board from the terminal"}),i.jsxs("p",{children:["This page needs the link that ",i.jsx("span",{className:"mono",children:"squad console"})," or ",i.jsx("span",{className:"mono",children:"squad demo"})," prints."]})]})})}));