@open-code-review/cli 1.6.0 → 1.8.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 (59) hide show
  1. package/README.md +20 -4
  2. package/dist/dashboard/client/assets/{_basePickBy-BGuMbEDR.js → _basePickBy-DbLJVCA4.js} +1 -1
  3. package/dist/dashboard/client/assets/{_baseUniq-Bx8loabg.js → _baseUniq-IXEG0cJJ.js} +1 -1
  4. package/dist/dashboard/client/assets/{arc-DUgpt7nY.js → arc-lsKxmOJY.js} +1 -1
  5. package/dist/dashboard/client/assets/{architectureDiagram-VXUJARFQ-D25nt6Xz.js → architectureDiagram-VXUJARFQ-DfMlzFJX.js} +1 -1
  6. package/dist/dashboard/client/assets/{blockDiagram-VD42YOAC-D8PUF3h4.js → blockDiagram-VD42YOAC-bSpnd26J.js} +1 -1
  7. package/dist/dashboard/client/assets/{c4Diagram-YG6GDRKO-lorsCz-I.js → c4Diagram-YG6GDRKO-DPYmVhCZ.js} +1 -1
  8. package/dist/dashboard/client/assets/channel-C--wY_Wd.js +1 -0
  9. package/dist/dashboard/client/assets/{chunk-4BX2VUAB-8lVyfRJM.js → chunk-4BX2VUAB-CI9zC4lV.js} +1 -1
  10. package/dist/dashboard/client/assets/{chunk-55IACEB6-C4SjgsZO.js → chunk-55IACEB6-BqUdJdx5.js} +1 -1
  11. package/dist/dashboard/client/assets/{chunk-B4BG7PRW-BXzTPbH1.js → chunk-B4BG7PRW-DymQrTp-.js} +1 -1
  12. package/dist/dashboard/client/assets/{chunk-DI55MBZ5-Bp7QllDt.js → chunk-DI55MBZ5-lZ_9LKGJ.js} +1 -1
  13. package/dist/dashboard/client/assets/{chunk-FMBD7UC4-B4g9S67N.js → chunk-FMBD7UC4-DC5rgLNm.js} +1 -1
  14. package/dist/dashboard/client/assets/{chunk-QN33PNHL-Dyk7Hc0J.js → chunk-QN33PNHL-BrygpHrX.js} +1 -1
  15. package/dist/dashboard/client/assets/{chunk-QZHKN3VN-DTvkGdnm.js → chunk-QZHKN3VN-CWJqBdNg.js} +1 -1
  16. package/dist/dashboard/client/assets/{chunk-TZMSLE5B-BAeZLvrI.js → chunk-TZMSLE5B-BACgM5pG.js} +1 -1
  17. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-DoxmMlnf.js +1 -0
  18. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-DoxmMlnf.js +1 -0
  19. package/dist/dashboard/client/assets/clone-BgvweD4v.js +1 -0
  20. package/dist/dashboard/client/assets/{cose-bilkent-S5V4N54A--6-kzrdu.js → cose-bilkent-S5V4N54A-BYvGIfo0.js} +1 -1
  21. package/dist/dashboard/client/assets/{dagre-6UL2VRFP-D10_QE2P.js → dagre-6UL2VRFP-B1rZyiLJ.js} +1 -1
  22. package/dist/dashboard/client/assets/{diagram-PSM6KHXK-kS1x75Bl.js → diagram-PSM6KHXK-Dvl5dQMd.js} +1 -1
  23. package/dist/dashboard/client/assets/{diagram-QEK2KX5R-D_LLCPas.js → diagram-QEK2KX5R-Cmntmhht.js} +1 -1
  24. package/dist/dashboard/client/assets/{diagram-S2PKOQOG-Duy1t5UO.js → diagram-S2PKOQOG-BqZcpG85.js} +1 -1
  25. package/dist/dashboard/client/assets/{erDiagram-Q2GNP2WA-DyQXwzLf.js → erDiagram-Q2GNP2WA-Cw7BALso.js} +1 -1
  26. package/dist/dashboard/client/assets/{flowDiagram-NV44I4VS-D9U11XVw.js → flowDiagram-NV44I4VS-B_amTHzQ.js} +1 -1
  27. package/dist/dashboard/client/assets/{ganttDiagram-JELNMOA3-STy-TC-3.js → ganttDiagram-JELNMOA3-B1j2-sTo.js} +1 -1
  28. package/dist/dashboard/client/assets/{gitGraphDiagram-V2S2FVAM-B04PgURg.js → gitGraphDiagram-V2S2FVAM-D5BkfAMt.js} +1 -1
  29. package/dist/dashboard/client/assets/{graph-AiGwnT5H.js → graph-B_v15DHv.js} +1 -1
  30. package/dist/dashboard/client/assets/index-UkJZZdYD.js +548 -0
  31. package/dist/dashboard/client/assets/index-Zl---B_3.css +1 -0
  32. package/dist/dashboard/client/assets/{infoDiagram-HS3SLOUP-D4arwl6T.js → infoDiagram-HS3SLOUP-C4dtIkj3.js} +1 -1
  33. package/dist/dashboard/client/assets/{journeyDiagram-XKPGCS4Q-CsKqlKkf.js → journeyDiagram-XKPGCS4Q-hha4Am8v.js} +1 -1
  34. package/dist/dashboard/client/assets/{kanban-definition-3W4ZIXB7-CUFnzQE3.js → kanban-definition-3W4ZIXB7-1EY8l7Ng.js} +1 -1
  35. package/dist/dashboard/client/assets/{layout-BvvYJVPv.js → layout-7SmAbjFT.js} +1 -1
  36. package/dist/dashboard/client/assets/{linear-BiBJkzyE.js → linear-BfjSBezh.js} +1 -1
  37. package/dist/dashboard/client/assets/{mermaid-renderer-DGUmIWXY.js → mermaid-renderer-PPIt-kY4.js} +4 -4
  38. package/dist/dashboard/client/assets/{mindmap-definition-VGOIOE7T-D-Kc9Xgu.js → mindmap-definition-VGOIOE7T-BFpjN9LY.js} +1 -1
  39. package/dist/dashboard/client/assets/{pieDiagram-ADFJNKIX-CooPKLnX.js → pieDiagram-ADFJNKIX-GBbQtDBQ.js} +1 -1
  40. package/dist/dashboard/client/assets/{quadrantDiagram-AYHSOK5B-3soPtaSQ.js → quadrantDiagram-AYHSOK5B-Dm0vOhOw.js} +1 -1
  41. package/dist/dashboard/client/assets/{requirementDiagram-UZGBJVZJ-rE40t0IG.js → requirementDiagram-UZGBJVZJ-BrKONIV8.js} +1 -1
  42. package/dist/dashboard/client/assets/{sankeyDiagram-TZEHDZUN-CrgDF_jW.js → sankeyDiagram-TZEHDZUN-IOobtmDc.js} +1 -1
  43. package/dist/dashboard/client/assets/{sequenceDiagram-WL72ISMW-B628IlDW.js → sequenceDiagram-WL72ISMW-Dnb0bOW5.js} +1 -1
  44. package/dist/dashboard/client/assets/{stateDiagram-FKZM4ZOC-C4yb7S9D.js → stateDiagram-FKZM4ZOC-C9-bf7bn.js} +1 -1
  45. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-C8Gr4khP.js +1 -0
  46. package/dist/dashboard/client/assets/{timeline-definition-IT6M3QCI-5uLN4f_J.js → timeline-definition-IT6M3QCI-tJogDEHB.js} +1 -1
  47. package/dist/dashboard/client/assets/{treemap-GDKQZRPO-BHXME3bw.js → treemap-GDKQZRPO-DQY6HADq.js} +1 -1
  48. package/dist/dashboard/client/assets/{xychartDiagram-PRI3JC2R-BYTod6eI.js → xychartDiagram-PRI3JC2R-DfxeQmTO.js} +1 -1
  49. package/dist/dashboard/client/index.html +2 -2
  50. package/dist/dashboard/server.js +312 -187
  51. package/dist/index.js +326 -10
  52. package/package.json +2 -2
  53. package/dist/dashboard/client/assets/channel-yW2sWou_.js +0 -1
  54. package/dist/dashboard/client/assets/classDiagram-2ON5EDUG-1pMX5UXO.js +0 -1
  55. package/dist/dashboard/client/assets/classDiagram-v2-WZHVMYZB-1pMX5UXO.js +0 -1
  56. package/dist/dashboard/client/assets/clone-DQwdw3YR.js +0 -1
  57. package/dist/dashboard/client/assets/index-BzQ3i_QR.js +0 -458
  58. package/dist/dashboard/client/assets/index-CGGYXSm-.css +0 -1
  59. package/dist/dashboard/client/assets/stateDiagram-v2-4FDKWEC3-BoFeOfLI.js +0 -1
@@ -1,458 +0,0 @@
1
- function ow(e,n){for(var r=0;r<n.length;r++){const a=n[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(a,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=r(l);fetch(l.href,o)}})();function Eu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xI(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var r=function a(){return this instanceof a?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var l=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:function(){return e[a]}})}),r}var If={exports:{}},jl={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and 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 Nb;function cw(){if(Nb)return jl;Nb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(a,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var d in l)d!=="key"&&(o[d]=l[d])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:u,ref:l!==void 0?l:null,props:o}}return jl.Fragment=n,jl.jsx=r,jl.jsxs=r,jl}var Cb;function uw(){return Cb||(Cb=1,If.exports=cw()),If.exports}var p=uw(),Bf={exports:{}},Ze={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and 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 Tb;function dw(){if(Tb)return Ze;Tb=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=x&&M[x]||M["@@iterator"],typeof M=="function"?M:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function C(M,G,z){this.props=M,this.context=G,this.refs=w,this.updater=z||_}C.prototype.isReactComponent={},C.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,G,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function j(){}j.prototype=C.prototype;function R(M,G,z){this.props=M,this.context=G,this.refs=w,this.updater=z||_}var H=R.prototype=new j;H.constructor=R,k(H,C.prototype),H.isPureReactComponent=!0;var $=Array.isArray;function O(){}var Z={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function ae(M,G,z){var he=z.ref;return{$$typeof:e,type:M,key:G,ref:he!==void 0?he:null,props:z}}function P(M,G){return ae(M.type,G,M.props)}function J(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ee(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(z){return G[z]})}var ve=/\/+/g;function le(M,G){return typeof M=="object"&&M!==null&&M.key!=null?ee(""+M.key):G.toString(36)}function X(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(O,O):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,G,z,he,Ee){var be=typeof M;(be==="undefined"||be==="boolean")&&(M=null);var He=!1;if(M===null)He=!0;else switch(be){case"bigint":case"string":case"number":He=!0;break;case"object":switch(M.$$typeof){case e:case n:He=!0;break;case b:return He=M._init,B(He(M._payload),G,z,he,Ee)}}if(He)return Ee=Ee(M),He=he===""?"."+le(M,0):he,$(Ee)?(z="",He!=null&&(z=He.replace(ve,"$&/")+"/"),B(Ee,G,z,"",function(Zt){return Zt})):Ee!=null&&(J(Ee)&&(Ee=P(Ee,z+(Ee.key==null||M&&M.key===Ee.key?"":(""+Ee.key).replace(ve,"$&/")+"/")+He)),G.push(Ee)),1;He=0;var st=he===""?".":he+":";if($(M))for(var Be=0;Be<M.length;Be++)he=M[Be],be=st+le(he,Be),He+=B(he,G,z,be,Ee);else if(Be=v(M),typeof Be=="function")for(M=Be.call(M),Be=0;!(he=M.next()).done;)he=he.value,be=st+le(he,Be++),He+=B(he,G,z,be,Ee);else if(be==="object"){if(typeof M.then=="function")return B(X(M),G,z,he,Ee);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return He}function te(M,G,z){if(M==null)return M;var he=[],Ee=0;return B(M,he,"","",function(be){return G.call(z,be,Ee++)}),he}function oe(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(z){(M._status===0||M._status===-1)&&(M._status=1,M._result=z)},function(z){(M._status===0||M._status===-1)&&(M._status=2,M._result=z)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var fe=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},T={map:te,forEach:function(M,G,z){te(M,function(){G.apply(this,arguments)},z)},count:function(M){var G=0;return te(M,function(){G++}),G},toArray:function(M){return te(M,function(G){return G})||[]},only:function(M){if(!J(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Ze.Activity=y,Ze.Children=T,Ze.Component=C,Ze.Fragment=r,Ze.Profiler=l,Ze.PureComponent=R,Ze.StrictMode=a,Ze.Suspense=f,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(M){return Z.H.useMemoCache(M)}},Ze.cache=function(M){return function(){return M.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(M,G,z){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var he=k({},M.props),Ee=M.key;if(G!=null)for(be in G.key!==void 0&&(Ee=""+G.key),G)!A.call(G,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&G.ref===void 0||(he[be]=G[be]);var be=arguments.length-2;if(be===1)he.children=z;else if(1<be){for(var He=Array(be),st=0;st<be;st++)He[st]=arguments[st+2];he.children=He}return ae(M.type,Ee,he)},Ze.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:o,_context:M},M},Ze.createElement=function(M,G,z){var he,Ee={},be=null;if(G!=null)for(he in G.key!==void 0&&(be=""+G.key),G)A.call(G,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(Ee[he]=G[he]);var He=arguments.length-2;if(He===1)Ee.children=z;else if(1<He){for(var st=Array(He),Be=0;Be<He;Be++)st[Be]=arguments[Be+2];Ee.children=st}if(M&&M.defaultProps)for(he in He=M.defaultProps,He)Ee[he]===void 0&&(Ee[he]=He[he]);return ae(M,be,Ee)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(M){return{$$typeof:d,render:M}},Ze.isValidElement=J,Ze.lazy=function(M){return{$$typeof:b,_payload:{_status:-1,_result:M},_init:oe}},Ze.memo=function(M,G){return{$$typeof:h,type:M,compare:G===void 0?null:G}},Ze.startTransition=function(M){var G=Z.T,z={};Z.T=z;try{var he=M(),Ee=Z.S;Ee!==null&&Ee(z,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(O,fe)}catch(be){fe(be)}finally{G!==null&&z.types!==null&&(G.types=z.types),Z.T=G}},Ze.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},Ze.use=function(M){return Z.H.use(M)},Ze.useActionState=function(M,G,z){return Z.H.useActionState(M,G,z)},Ze.useCallback=function(M,G){return Z.H.useCallback(M,G)},Ze.useContext=function(M){return Z.H.useContext(M)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(M,G){return Z.H.useDeferredValue(M,G)},Ze.useEffect=function(M,G){return Z.H.useEffect(M,G)},Ze.useEffectEvent=function(M){return Z.H.useEffectEvent(M)},Ze.useId=function(){return Z.H.useId()},Ze.useImperativeHandle=function(M,G,z){return Z.H.useImperativeHandle(M,G,z)},Ze.useInsertionEffect=function(M,G){return Z.H.useInsertionEffect(M,G)},Ze.useLayoutEffect=function(M,G){return Z.H.useLayoutEffect(M,G)},Ze.useMemo=function(M,G){return Z.H.useMemo(M,G)},Ze.useOptimistic=function(M,G){return Z.H.useOptimistic(M,G)},Ze.useReducer=function(M,G,z){return Z.H.useReducer(M,G,z)},Ze.useRef=function(M){return Z.H.useRef(M)},Ze.useState=function(M){return Z.H.useState(M)},Ze.useSyncExternalStore=function(M,G,z){return Z.H.useSyncExternalStore(M,G,z)},Ze.useTransition=function(){return Z.H.useTransition()},Ze.version="19.2.4",Ze}var zb;function em(){return zb||(zb=1,Bf.exports=dw()),Bf.exports}var N=em();const fw=Eu(N),hw=ow({__proto__:null,default:fw},[N]);var Uf={exports:{}},Il={},Ff={exports:{}},Pf={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Rb;function mw(){return Rb||(Rb=1,(function(e){function n(B,te){var oe=B.length;B.push(te);e:for(;0<oe;){var fe=oe-1>>>1,T=B[fe];if(0<l(T,te))B[fe]=te,B[oe]=T,oe=fe;else break e}}function r(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var te=B[0],oe=B.pop();if(oe!==te){B[0]=oe;e:for(var fe=0,T=B.length,M=T>>>1;fe<M;){var G=2*(fe+1)-1,z=B[G],he=G+1,Ee=B[he];if(0>l(z,oe))he<T&&0>l(Ee,z)?(B[fe]=Ee,B[he]=oe,fe=he):(B[fe]=z,B[G]=oe,fe=G);else if(he<T&&0>l(Ee,oe))B[fe]=Ee,B[he]=oe,fe=he;else break e}}return te}function l(B,te){var oe=B.sortIndex-te.sortIndex;return oe!==0?oe:B.id-te.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],h=[],b=1,y=null,x=3,v=!1,_=!1,k=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function H(B){for(var te=r(h);te!==null;){if(te.callback===null)a(h);else if(te.startTime<=B)a(h),te.sortIndex=te.expirationTime,n(f,te);else break;te=r(h)}}function $(B){if(k=!1,H(B),!_)if(r(f)!==null)_=!0,O||(O=!0,ee());else{var te=r(h);te!==null&&X($,te.startTime-B)}}var O=!1,Z=-1,A=5,ae=-1;function P(){return w?!0:!(e.unstable_now()-ae<A)}function J(){if(w=!1,O){var B=e.unstable_now();ae=B;var te=!0;try{e:{_=!1,k&&(k=!1,j(Z),Z=-1),v=!0;var oe=x;try{t:{for(H(B),y=r(f);y!==null&&!(y.expirationTime>B&&P());){var fe=y.callback;if(typeof fe=="function"){y.callback=null,x=y.priorityLevel;var T=fe(y.expirationTime<=B);if(B=e.unstable_now(),typeof T=="function"){y.callback=T,H(B),te=!0;break t}y===r(f)&&a(f),H(B)}else a(f);y=r(f)}if(y!==null)te=!0;else{var M=r(h);M!==null&&X($,M.startTime-B),te=!1}}break e}finally{y=null,x=oe,v=!1}te=void 0}}finally{te?ee():O=!1}}}var ee;if(typeof R=="function")ee=function(){R(J)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,le=ve.port2;ve.port1.onmessage=J,ee=function(){le.postMessage(null)}}else ee=function(){C(J,0)};function X(B,te){Z=C(function(){B(e.unstable_now())},te)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var te=3;break;default:te=x}var oe=x;x=te;try{return B()}finally{x=oe}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(B,te){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var oe=x;x=B;try{return te()}finally{x=oe}},e.unstable_scheduleCallback=function(B,te,oe){var fe=e.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?fe+oe:fe):oe=fe,B){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=oe+T,B={id:b++,callback:te,priorityLevel:B,startTime:oe,expirationTime:T,sortIndex:-1},oe>fe?(B.sortIndex=oe,n(h,B),r(f)===null&&B===r(h)&&(k?(j(Z),Z=-1):k=!0,X($,oe-fe))):(B.sortIndex=T,n(f,B),_||v||(_=!0,O||(O=!0,ee()))),B},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(B){var te=x;return function(){var oe=x;x=te;try{return B.apply(this,arguments)}finally{x=oe}}}})(Pf)),Pf}var Ab;function pw(){return Ab||(Ab=1,Ff.exports=mw()),Ff.exports}var Hf={exports:{}},In={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and 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 Ob;function gw(){if(Ob)return In;Ob=1;var e=em();function n(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(f,h,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:f,containerInfo:h,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return In.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,In.createPortal=function(f,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return o(f,h,null,b)},In.flushSync=function(f){var h=u.T,b=a.p;try{if(u.T=null,a.p=2,f)return f()}finally{u.T=h,a.p=b,a.d.f()}},In.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(f,h))},In.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},In.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var b=h.as,y=d(b,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?a.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:v}):b==="script"&&a.d.X(f,{crossOrigin:y,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},In.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=d(h.as,h.crossOrigin);a.d.M(f,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(f)},In.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,y=d(b,h.crossOrigin);a.d.L(f,b,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},In.preloadModule=function(f,h){if(typeof f=="string")if(h){var b=d(h.as,h.crossOrigin);a.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(f)},In.requestFormReset=function(f){a.d.r(f)},In.unstable_batchedUpdates=function(f,h){return f(h)},In.useFormState=function(f,h,b){return u.H.useFormState(f,h,b)},In.useFormStatus=function(){return u.H.useHostTransitionStatus()},In.version="19.2.4",In}var Mb;function Yx(){if(Mb)return Hf.exports;Mb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Hf.exports=gw(),Hf.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var Db;function bw(){if(Db)return Il;Db=1;var e=pw(),n=em(),r=Yx();function a(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var i=t,s=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(s=i.return),t=i.return;while(t)}return i.tag===3?s:null}function u(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function d(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function f(t){if(o(t)!==t)throw Error(a(188))}function h(t){var i=t.alternate;if(!i){if(i=o(t),i===null)throw Error(a(188));return i!==t?null:t}for(var s=t,c=i;;){var m=s.return;if(m===null)break;var g=m.alternate;if(g===null){if(c=m.return,c!==null){s=c;continue}break}if(m.child===g.child){for(g=m.child;g;){if(g===s)return f(m),t;if(g===c)return f(m),i;g=g.sibling}throw Error(a(188))}if(s.return!==c.return)s=m,c=g;else{for(var E=!1,S=m.child;S;){if(S===s){E=!0,s=m,c=g;break}if(S===c){E=!0,c=m,s=g;break}S=S.sibling}if(!E){for(S=g.child;S;){if(S===s){E=!0,s=g,c=m;break}if(S===c){E=!0,c=g,s=m;break}S=S.sibling}if(!E)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?t:i}function b(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=b(t),i!==null)return i;t=t.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),R=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ee(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var ve=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ve?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case C:return"Profiler";case w:return"StrictMode";case $:return"Suspense";case O:return"SuspenseList";case ae:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case _:return"Portal";case R:return t.displayName||"Context";case j:return(t._context.displayName||"Context")+".Consumer";case H:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return i=t.displayName||null,i!==null?i:le(t.type)||"Memo";case A:i=t._payload,t=t._init;try{return le(t(i))}catch{}}return null}var X=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},fe=[],T=-1;function M(t){return{current:t}}function G(t){0>T||(t.current=fe[T],fe[T]=null,T--)}function z(t,i){T++,fe[T]=t.current,t.current=i}var he=M(null),Ee=M(null),be=M(null),He=M(null);function st(t,i){switch(z(be,i),z(Ee,t),z(he,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?Q0(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=Q0(i),t=X0(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}G(he),z(he,t)}function Be(){G(he),G(Ee),G(be)}function Zt(t){t.memoizedState!==null&&z(He,t);var i=he.current,s=X0(i,t.type);i!==s&&(z(Ee,t),z(he,s))}function un(t){Ee.current===t&&(G(he),G(Ee)),He.current===t&&(G(He),Ol._currentValue=oe)}var Ln,At;function Kt(t){if(Ln===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Ln=i&&i[1]||"",At=-1<s.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ln+t+At}var rr=!1;function lt(t,i){if(!t||rr)return"";rr=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(W){var Q=W}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(W){Q=W}t.call(ce.prototype)}}else{try{throw Error()}catch(W){Q=W}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(W){if(W&&Q&&typeof W.stack=="string")return[W.stack,Q.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),E=g[0],S=g[1];if(E&&S){var L=E.split(`
44
- `),V=S.split(`
45
- `);for(m=c=0;c<L.length&&!L[c].includes("DetermineComponentFrameRoot");)c++;for(;m<V.length&&!V[m].includes("DetermineComponentFrameRoot");)m++;if(c===L.length||m===V.length)for(c=L.length-1,m=V.length-1;1<=c&&0<=m&&L[c]!==V[m];)m--;for(;1<=c&&0<=m;c--,m--)if(L[c]!==V[m]){if(c!==1||m!==1)do if(c--,m--,0>m||L[c]!==V[m]){var re=`
46
- `+L[c].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=c&&0<=m);break}}}finally{rr=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Kt(s):""}function vn(t,i){switch(t.tag){case 26:case 27:case 5:return Kt(t.type);case 16:return Kt("Lazy");case 13:return t.child!==i&&i!==null?Kt("Suspense Fallback"):Kt("Suspense");case 19:return Kt("SuspenseList");case 0:case 15:return lt(t.type,!1);case 11:return lt(t.type.render,!1);case 1:return lt(t.type,!0);case 31:return Kt("Activity");default:return""}}function Kn(t){try{var i="",s=null;do i+=vn(t,s),s=t,t=t.return;while(t);return i}catch(c){return`
47
- Error generating stack: `+c.message+`
48
- `+c.stack}}var gr=Object.prototype.hasOwnProperty,br=e.unstable_scheduleCallback,ti=e.unstable_cancelCallback,ha=e.unstable_shouldYield,Ni=e.unstable_requestPaint,Vt=e.unstable_now,Vn=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,ge=e.unstable_UserBlockingPriority,Fe=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,Je=e.unstable_IdlePriority,wn=e.log,ir=e.unstable_setDisableYieldValue,an=null,Wt=null;function qt(t){if(typeof wn=="function"&&ir(t),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(an,t)}catch{}}var kt=Math.clz32?Math.clz32:Ka,ar=Math.log,Sn=Math.LN2;function Ka(t){return t>>>=0,t===0?32:31-(ar(t)/Sn|0)|0}var Pr=256,Mr=262144,Hr=4194304;function Nn(t){var i=t&42;if(i!==0)return i;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function I(t,i,s){var c=t.pendingLanes;if(c===0)return 0;var m=0,g=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var S=c&134217727;return S!==0?(c=S&~g,c!==0?m=Nn(c):(E&=S,E!==0?m=Nn(E):s||(s=S&~t,s!==0&&(m=Nn(s))))):(S=c&~g,S!==0?m=Nn(S):E!==0?m=Nn(E):s||(s=c&~t,s!==0&&(m=Nn(s)))),m===0?0:i!==0&&i!==m&&(i&g)===0&&(g=m&-m,s=i&-i,g>=s||g===32&&(s&4194048)!==0)?i:m}function ie(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function _e(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var t=Hr;return Hr<<=1,(Hr&62914560)===0&&(Hr=4194304),t}function zt(t){for(var i=[],s=0;31>s;s++)i.push(t);return i}function wt(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Te(t,i,s,c,m,g){var E=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var S=t.entanglements,L=t.expirationTimes,V=t.hiddenUpdates;for(s=E&~s;0<s;){var re=31-kt(s),ce=1<<re;S[re]=0,L[re]=-1;var Q=V[re];if(Q!==null)for(V[re]=null,re=0;re<Q.length;re++){var W=Q[re];W!==null&&(W.lane&=-536870913)}s&=~ce}c!==0&&Se(t,c,0),g!==0&&m===0&&t.tag!==0&&(t.suspendedLanes|=g&~(E&~i))}function Se(t,i,s){t.pendingLanes|=i,t.suspendedLanes&=~i;var c=31-kt(i);t.entangledLanes|=i,t.entanglements[c]=t.entanglements[c]|1073741824|s&261930}function $e(t,i){var s=t.entangledLanes|=i;for(t=t.entanglements;s;){var c=31-kt(s),m=1<<c;m&i|t[c]&i&&(t[c]|=i),s&=~m}}function D(t,i){var s=i&-i;return s=(s&42)!==0?1:U(s),(s&(t.suspendedLanes|i))!==0?0:s}function U(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Y(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function ue(){var t=te.p;return t!==0?t:(t=window.event,t===void 0?32:xb(t.type))}function me(t,i){var s=te.p;try{return te.p=t,i()}finally{te.p=s}}var Ce=Math.random().toString(36).slice(2),ye="__reactFiber$"+Ce,we="__reactProps$"+Ce,Ne="__reactContainer$"+Ce,Ie="__reactEvents$"+Ce,Ue="__reactListeners$"+Ce,Oe="__reactHandles$"+Ce,yt="__reactResources$"+Ce,rt="__reactMarker$"+Ce;function Ot(t){delete t[ye],delete t[we],delete t[Ie],delete t[Ue],delete t[Oe]}function xt(t){var i=t[ye];if(i)return i;for(var s=t.parentNode;s;){if(i=s[Ne]||s[ye]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(t=rb(t);t!==null;){if(s=t[ye])return s;t=rb(t)}return i}t=s,s=t.parentNode}return null}function Yt(t){if(t=t[ye]||t[Ne]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function ot(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(a(33))}function sn(t){var i=t[yt];return i||(i=t[yt]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function jt(t){t[rt]=!0}var qr=new Set,jn={};function dn(t,i){de(t,i),de(t+"Capture",i)}function de(t,i){for(jn[t]=i,t=0;t<i.length;t++)qr.add(i[t])}var Me=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Xe={},vt={};function $t(t){return gr.call(vt,t)?!0:gr.call(Xe,t)?!1:Me.test(t)?vt[t]=!0:(Xe[t]=!0,!1)}function Ve(t,i,s){if($t(i))if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+s)}}function Rt(t,i,s){if(s===null)t.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+s)}}function ln(t,i,s,c){if(c===null)t.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(i,s,""+c)}}function Et(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ft(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ni(t,i,s){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,g=c.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return m.call(this)},set:function(E){s=""+E,g.call(this,E)}}),Object.defineProperty(t,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(E){s=""+E},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function ri(t){if(!t._valueTracker){var i=ft(t)?"checked":"value";t._valueTracker=ni(t,i,""+t[i])}}function ma(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return t&&(c=ft(t)?t.checked?"true":"false":t.value),t=c,t!==s?(i.setValue(t),!0):!1}function Va(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Lu=/[\n"\\]/g;function Yn(t){return t.replace(Lu,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ks(t,i,s,c,m,g,E,S){t.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.type=E:t.removeAttribute("type"),i!=null?E==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+Et(i)):t.value!==""+Et(i)&&(t.value=""+Et(i)):E!=="submit"&&E!=="reset"||t.removeAttribute("value"),i!=null?Ya(t,E,Et(i)):s!=null?Ya(t,E,Et(s)):c!=null&&t.removeAttribute("value"),m==null&&g!=null&&(t.defaultChecked=!!g),m!=null&&(t.checked=m&&typeof m!="function"&&typeof m!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+Et(S):t.removeAttribute("name")}function pa(t,i,s,c,m,g,E,S){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),i!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||i!=null)){ri(t);return}s=s!=null?""+Et(s):"",i=i!=null?""+Et(i):s,S||i===t.value||(t.value=i),t.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=S?t.checked:!!c,t.defaultChecked=!!c,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(t.name=E),ri(t)}function Ya(t,i,s){i==="number"&&Va(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function zn(t,i,s,c){if(t=t.options,i){i={};for(var m=0;m<s.length;m++)i["$"+s[m]]=!0;for(s=0;s<t.length;s++)m=i.hasOwnProperty("$"+t[s].value),t[s].selected!==m&&(t[s].selected=m),m&&c&&(t[s].defaultSelected=!0)}else{for(s=""+Et(s),i=null,m=0;m<t.length;m++){if(t[m].value===s){t[m].selected=!0,c&&(t[m].defaultSelected=!0);return}i!==null||t[m].disabled||(i=t[m])}i!==null&&(i.selected=!0)}}function wo(t,i,s){if(i!=null&&(i=""+Et(i),i!==t.value&&(t.value=i),s==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=s!=null?""+Et(s):""}function Qa(t,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(X(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=Et(i),t.defaultValue=s,c=t.textContent,c===s&&c!==""&&c!==null&&(t.value=c),ri(t)}function Ye(t,i){if(i){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=i;return}}t.textContent=i}var So=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fn(t,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":c?t.setProperty(i,s):typeof s!="number"||s===0||So.has(i)?i==="float"?t.cssFloat=s:t[i]=(""+s).trim():t[i]=s+"px"}function Mt(t,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(t=t.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&s[m]!==c&&fn(t,m,c)}else for(var g in i)i.hasOwnProperty(g)&&fn(t,g,i[g])}function Ci(t){if(t.indexOf("-")===-1)return!1;switch(t){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 ii=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Vs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ti(t){return Vs.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function xe(){}var Le=null;function We(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ht=null,en=null;function yr(t){var i=Yt(t);if(i&&(t=i.stateNode)){var s=t[we]||null;e:switch(t=i.stateNode,i.type){case"input":if(Ks(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Yn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==t&&c.form===t.form){var m=c[we]||null;if(!m)throw Error(a(90));Ks(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===t.form&&ma(c)}break e;case"textarea":wo(t,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&zn(t,!!s.multiple,i,!1)}}}var Ys=!1;function No(t,i,s){if(Ys)return t(i,s);Ys=!0;try{var c=t(i);return c}finally{if(Ys=!1,(ht!==null||en!==null)&&(hc(),ht&&(i=ht,t=en,en=ht=null,yr(i),t)))for(i=0;i<t.length;i++)yr(t[i])}}function Qs(t,i){var s=t.stateNode;if(s===null)return null;var c=s[we]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ju=!1;if(ai)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){ju=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{ju=!1}var zi=null,Iu=null,Co=null;function Xm(){if(Co)return Co;var t,i=Iu,s=i.length,c,m="value"in zi?zi.value:zi.textContent,g=m.length;for(t=0;t<s&&i[t]===m[t];t++);var E=s-t;for(c=1;c<=E&&i[s-c]===m[g-c];c++);return Co=m.slice(t,1<c?1-c:void 0)}function To(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function zo(){return!0}function Zm(){return!1}function Qn(t){function i(s,c,m,g,E){this._reactName=s,this._targetInst=m,this.type=c,this.nativeEvent=g,this.target=E,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(s=t[S],this[S]=s?s(g):g[S]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?zo:Zm,this.isPropagationStopped=Zm,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=zo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=zo)},persist:function(){},isPersistent:zo}),i}var ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ro=Qn(ga),Zs=y({},ga,{view:0,detail:0}),s1=Qn(Zs),Bu,Uu,Ws,Ao=y({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ws&&(Ws&&t.type==="mousemove"?(Bu=t.screenX-Ws.screenX,Uu=t.screenY-Ws.screenY):Uu=Bu=0,Ws=t),Bu)},movementY:function(t){return"movementY"in t?t.movementY:Uu}}),Wm=Qn(Ao),l1=y({},Ao,{dataTransfer:0}),o1=Qn(l1),c1=y({},Zs,{relatedTarget:0}),Fu=Qn(c1),u1=y({},ga,{animationName:0,elapsedTime:0,pseudoElement:0}),d1=Qn(u1),f1=y({},ga,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),h1=Qn(f1),m1=y({},ga,{data:0}),Jm=Qn(m1),p1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g1={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"},b1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function y1(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=b1[t])?!!i[t]:!1}function Pu(){return y1}var x1=y({},Zs,{key:function(t){if(t.key){var i=p1[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=To(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?g1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pu,charCode:function(t){return t.type==="keypress"?To(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?To(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),v1=Qn(x1),E1=y({},Ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ep=Qn(E1),_1=y({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pu}),k1=Qn(_1),w1=y({},ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),S1=Qn(w1),N1=y({},Ao,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),C1=Qn(N1),T1=y({},ga,{newState:0,oldState:0}),z1=Qn(T1),R1=[9,13,27,32],Hu=ai&&"CompositionEvent"in window,Js=null;ai&&"documentMode"in document&&(Js=document.documentMode);var A1=ai&&"TextEvent"in window&&!Js,tp=ai&&(!Hu||Js&&8<Js&&11>=Js),np=" ",rp=!1;function ip(t,i){switch(t){case"keyup":return R1.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ap(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Xa=!1;function O1(t,i){switch(t){case"compositionend":return ap(i);case"keypress":return i.which!==32?null:(rp=!0,np);case"textInput":return t=i.data,t===np&&rp?null:t;default:return null}}function M1(t,i){if(Xa)return t==="compositionend"||!Hu&&ip(t,i)?(t=Xm(),Co=Iu=zi=null,Xa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return tp&&i.locale!=="ko"?null:i.data;default:return null}}var D1={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 sp(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!D1[t.type]:i==="textarea"}function lp(t,i,s,c){ht?en?en.push(c):en=[c]:ht=c,i=vc(i,"onChange"),0<i.length&&(s=new Ro("onChange","change",null,s,c),t.push({event:s,listeners:i}))}var el=null,tl=null;function L1(t){q0(t,0)}function Oo(t){var i=ot(t);if(ma(i))return t}function op(t,i){if(t==="change")return i}var cp=!1;if(ai){var qu;if(ai){var $u="oninput"in document;if(!$u){var up=document.createElement("div");up.setAttribute("oninput","return;"),$u=typeof up.oninput=="function"}qu=$u}else qu=!1;cp=qu&&(!document.documentMode||9<document.documentMode)}function dp(){el&&(el.detachEvent("onpropertychange",fp),tl=el=null)}function fp(t){if(t.propertyName==="value"&&Oo(tl)){var i=[];lp(i,tl,t,We(t)),No(L1,i)}}function j1(t,i,s){t==="focusin"?(dp(),el=i,tl=s,el.attachEvent("onpropertychange",fp)):t==="focusout"&&dp()}function I1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Oo(tl)}function B1(t,i){if(t==="click")return Oo(i)}function U1(t,i){if(t==="input"||t==="change")return Oo(i)}function F1(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var sr=typeof Object.is=="function"?Object.is:F1;function nl(t,i){if(sr(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var s=Object.keys(t),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var m=s[c];if(!gr.call(i,m)||!sr(t[m],i[m]))return!1}return!0}function hp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mp(t,i){var s=hp(t);t=0;for(var c;s;){if(s.nodeType===3){if(c=t+s.textContent.length,t<=i&&c>=i)return{node:s,offset:i-t};t=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=hp(s)}}function pp(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?pp(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function gp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=Va(t.document);i instanceof t.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)t=i.contentWindow;else break;i=Va(t.document)}return i}function Gu(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var P1=ai&&"documentMode"in document&&11>=document.documentMode,Za=null,Ku=null,rl=null,Vu=!1;function bp(t,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Vu||Za==null||Za!==Va(c)||(c=Za,"selectionStart"in c&&Gu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),rl&&nl(rl,c)||(rl=c,c=vc(Ku,"onSelect"),0<c.length&&(i=new Ro("onSelect","select",null,i,s),t.push({event:i,listeners:c}),i.target=Za)))}function ba(t,i){var s={};return s[t.toLowerCase()]=i.toLowerCase(),s["Webkit"+t]="webkit"+i,s["Moz"+t]="moz"+i,s}var Wa={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionrun:ba("Transition","TransitionRun"),transitionstart:ba("Transition","TransitionStart"),transitioncancel:ba("Transition","TransitionCancel"),transitionend:ba("Transition","TransitionEnd")},Yu={},yp={};ai&&(yp=document.createElement("div").style,"AnimationEvent"in window||(delete Wa.animationend.animation,delete Wa.animationiteration.animation,delete Wa.animationstart.animation),"TransitionEvent"in window||delete Wa.transitionend.transition);function ya(t){if(Yu[t])return Yu[t];if(!Wa[t])return t;var i=Wa[t],s;for(s in i)if(i.hasOwnProperty(s)&&s in yp)return Yu[t]=i[s];return t}var xp=ya("animationend"),vp=ya("animationiteration"),Ep=ya("animationstart"),H1=ya("transitionrun"),q1=ya("transitionstart"),$1=ya("transitioncancel"),_p=ya("transitionend"),kp=new Map,Qu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Qu.push("scrollEnd");function Dr(t,i){kp.set(t,i),dn(i,[t])}var Mo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},xr=[],Ja=0,Xu=0;function Do(){for(var t=Ja,i=Xu=Ja=0;i<t;){var s=xr[i];xr[i++]=null;var c=xr[i];xr[i++]=null;var m=xr[i];xr[i++]=null;var g=xr[i];if(xr[i++]=null,c!==null&&m!==null){var E=c.pending;E===null?m.next=m:(m.next=E.next,E.next=m),c.pending=m}g!==0&&wp(s,m,g)}}function Lo(t,i,s,c){xr[Ja++]=t,xr[Ja++]=i,xr[Ja++]=s,xr[Ja++]=c,Xu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Zu(t,i,s,c){return Lo(t,i,s,c),jo(t)}function xa(t,i){return Lo(t,null,null,i),jo(t)}function wp(t,i,s){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s);for(var m=!1,g=t.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(m=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,m&&i!==null&&(m=31-kt(s),t=g.hiddenUpdates,c=t[m],c===null?t[m]=[i]:c.push(i),i.lane=s|536870912),g):null}function jo(t){if(50<Sl)throw Sl=0,lf=null,Error(a(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var es={};function G1(t,i,s,c){this.tag=t,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lr(t,i,s,c){return new G1(t,i,s,c)}function Wu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function si(t,i){var s=t.alternate;return s===null?(s=lr(t.tag,i,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=i,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,i=t.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function Sp(t,i){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,i=s.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function Io(t,i,s,c,m,g){var E=0;if(c=t,typeof t=="function")Wu(t)&&(E=1);else if(typeof t=="string")E=Xk(t,s,he.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ae:return t=lr(31,s,i,m),t.elementType=ae,t.lanes=g,t;case k:return va(s.children,m,g,i);case w:E=8,m|=24;break;case C:return t=lr(12,s,i,m|2),t.elementType=C,t.lanes=g,t;case $:return t=lr(13,s,i,m),t.elementType=$,t.lanes=g,t;case O:return t=lr(19,s,i,m),t.elementType=O,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:E=10;break e;case j:E=9;break e;case H:E=11;break e;case Z:E=14;break e;case A:E=16,c=null;break e}E=29,s=Error(a(130,t===null?"null":typeof t,"")),c=null}return i=lr(E,s,i,m),i.elementType=t,i.type=c,i.lanes=g,i}function va(t,i,s,c){return t=lr(7,t,c,i),t.lanes=s,t}function Ju(t,i,s){return t=lr(6,t,null,i),t.lanes=s,t}function Np(t){var i=lr(18,null,null,0);return i.stateNode=t,i}function ed(t,i,s){return i=lr(4,t.children!==null?t.children:[],t.key,i),i.lanes=s,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var Cp=new WeakMap;function vr(t,i){if(typeof t=="object"&&t!==null){var s=Cp.get(t);return s!==void 0?s:(i={value:t,source:i,stack:Kn(i)},Cp.set(t,i),i)}return{value:t,source:i,stack:Kn(i)}}var ts=[],ns=0,Bo=null,il=0,Er=[],_r=0,Ri=null,$r=1,Gr="";function li(t,i){ts[ns++]=il,ts[ns++]=Bo,Bo=t,il=i}function Tp(t,i,s){Er[_r++]=$r,Er[_r++]=Gr,Er[_r++]=Ri,Ri=t;var c=$r;t=Gr;var m=32-kt(c)-1;c&=~(1<<m),s+=1;var g=32-kt(i)+m;if(30<g){var E=m-m%5;g=(c&(1<<E)-1).toString(32),c>>=E,m-=E,$r=1<<32-kt(i)+m|s<<m|c,Gr=g+t}else $r=1<<g|s<<m|c,Gr=t}function td(t){t.return!==null&&(li(t,1),Tp(t,1,0))}function nd(t){for(;t===Bo;)Bo=ts[--ns],ts[ns]=null,il=ts[--ns],ts[ns]=null;for(;t===Ri;)Ri=Er[--_r],Er[_r]=null,Gr=Er[--_r],Er[_r]=null,$r=Er[--_r],Er[_r]=null}function zp(t,i){Er[_r++]=$r,Er[_r++]=Gr,Er[_r++]=Ri,$r=i.id,Gr=i.overflow,Ri=t}var Rn=null,Qt=null,gt=!1,Ai=null,kr=!1,rd=Error(a(519));function Oi(t){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw al(vr(i,t)),rd}function Rp(t){var i=t.stateNode,s=t.type,c=t.memoizedProps;switch(i[ye]=t,i[we]=c,s){case"dialog":ut("cancel",i),ut("close",i);break;case"iframe":case"object":case"embed":ut("load",i);break;case"video":case"audio":for(s=0;s<Cl.length;s++)ut(Cl[s],i);break;case"source":ut("error",i);break;case"img":case"image":case"link":ut("error",i),ut("load",i);break;case"details":ut("toggle",i);break;case"input":ut("invalid",i),pa(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ut("invalid",i);break;case"textarea":ut("invalid",i),Qa(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||V0(i.textContent,s)?(c.popover!=null&&(ut("beforetoggle",i),ut("toggle",i)),c.onScroll!=null&&ut("scroll",i),c.onScrollEnd!=null&&ut("scrollend",i),c.onClick!=null&&(i.onclick=xe),i=!0):i=!1,i||Oi(t,!0)}function Ap(t){for(Rn=t.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:kr=!1;return;case 27:case 3:kr=!0;return;default:Rn=Rn.return}}function rs(t){if(t!==Rn)return!1;if(!gt)return Ap(t),gt=!0,!1;var i=t.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||_f(t.type,t.memoizedProps)),s=!s),s&&Qt&&Oi(t),Ap(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Qt=nb(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Qt=nb(t)}else i===27?(i=Qt,Ki(t.type)?(t=Cf,Cf=null,Qt=t):Qt=i):Qt=Rn?Sr(t.stateNode.nextSibling):null;return!0}function Ea(){Qt=Rn=null,gt=!1}function id(){var t=Ai;return t!==null&&(Jn===null?Jn=t:Jn.push.apply(Jn,t),Ai=null),t}function al(t){Ai===null?Ai=[t]:Ai.push(t)}var ad=M(null),_a=null,oi=null;function Mi(t,i,s){z(ad,i._currentValue),i._currentValue=s}function ci(t){t._currentValue=ad.current,G(ad)}function sd(t,i,s){for(;t!==null;){var c=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),t===s)break;t=t.return}}function ld(t,i,s,c){var m=t.child;for(m!==null&&(m.return=t);m!==null;){var g=m.dependencies;if(g!==null){var E=m.child;g=g.firstContext;e:for(;g!==null;){var S=g;g=m;for(var L=0;L<i.length;L++)if(S.context===i[L]){g.lanes|=s,S=g.alternate,S!==null&&(S.lanes|=s),sd(g.return,s,t),c||(E=null);break e}g=S.next}}else if(m.tag===18){if(E=m.return,E===null)throw Error(a(341));E.lanes|=s,g=E.alternate,g!==null&&(g.lanes|=s),sd(E,s,t),E=null}else E=m.child;if(E!==null)E.return=m;else for(E=m;E!==null;){if(E===t){E=null;break}if(m=E.sibling,m!==null){m.return=E.return,E=m;break}E=E.return}m=E}}function is(t,i,s,c){t=null;for(var m=i,g=!1;m!==null;){if(!g){if((m.flags&524288)!==0)g=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var E=m.alternate;if(E===null)throw Error(a(387));if(E=E.memoizedProps,E!==null){var S=m.type;sr(m.pendingProps.value,E.value)||(t!==null?t.push(S):t=[S])}}else if(m===He.current){if(E=m.alternate,E===null)throw Error(a(387));E.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(t!==null?t.push(Ol):t=[Ol])}m=m.return}t!==null&&ld(i,t,s,c),i.flags|=262144}function Uo(t){for(t=t.firstContext;t!==null;){if(!sr(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ka(t){_a=t,oi=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function An(t){return Op(_a,t)}function Fo(t,i){return _a===null&&ka(t),Op(t,i)}function Op(t,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},oi===null){if(t===null)throw Error(a(308));oi=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else oi=oi.next=i;return s}var K1=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(s,c){t.push(c)}};this.abort=function(){i.aborted=!0,t.forEach(function(s){return s()})}},V1=e.unstable_scheduleCallback,Y1=e.unstable_NormalPriority,hn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function od(){return{controller:new K1,data:new Map,refCount:0}}function sl(t){t.refCount--,t.refCount===0&&V1(Y1,function(){t.controller.abort()})}var ll=null,cd=0,as=0,ss=null;function Q1(t,i){if(ll===null){var s=ll=[];cd=0,as=hf(),ss={status:"pending",value:void 0,then:function(c){s.push(c)}}}return cd++,i.then(Mp,Mp),i}function Mp(){if(--cd===0&&ll!==null){ss!==null&&(ss.status="fulfilled");var t=ll;ll=null,as=0,ss=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function X1(t,i){var s=[],c={status:"pending",value:null,reason:null,then:function(m){s.push(m)}};return t.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<s.length;m++)(0,s[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<s.length;m++)(0,s[m])(void 0)}),c}var Dp=B.S;B.S=function(t,i){b0=Vt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Q1(t,i),Dp!==null&&Dp(t,i)};var wa=M(null);function ud(){var t=wa.current;return t!==null?t:Pt.pooledCache}function Po(t,i){i===null?z(wa,wa.current):z(wa,i.pool)}function Lp(){var t=ud();return t===null?null:{parent:hn._currentValue,pool:t}}var ls=Error(a(460)),dd=Error(a(474)),Ho=Error(a(542)),qo={then:function(){}};function jp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ip(t,i,s){switch(s=t[s],s===void 0?t.push(i):s!==i&&(i.then(xe,xe),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Up(t),t;default:if(typeof i.status=="string")i.then(xe,xe);else{if(t=Pt,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=i,t.status="pending",t.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Up(t),t}throw Na=i,ls}}function Sa(t){try{var i=t._init;return i(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Na=s,ls):s}}var Na=null;function Bp(){if(Na===null)throw Error(a(459));var t=Na;return Na=null,t}function Up(t){if(t===ls||t===Ho)throw Error(a(483))}var os=null,ol=0;function $o(t){var i=ol;return ol+=1,os===null&&(os=[]),Ip(os,t,i)}function cl(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function Go(t,i){throw i.$$typeof===x?Error(a(525)):(t=Object.prototype.toString.call(i),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function Fp(t){function i(q,F){if(t){var K=q.deletions;K===null?(q.deletions=[F],q.flags|=16):K.push(F)}}function s(q,F){if(!t)return null;for(;F!==null;)i(q,F),F=F.sibling;return null}function c(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function m(q,F){return q=si(q,F),q.index=0,q.sibling=null,q}function g(q,F,K){return q.index=K,t?(K=q.alternate,K!==null?(K=K.index,K<F?(q.flags|=67108866,F):K):(q.flags|=67108866,F)):(q.flags|=1048576,F)}function E(q){return t&&q.alternate===null&&(q.flags|=67108866),q}function S(q,F,K,se){return F===null||F.tag!==6?(F=Ju(K,q.mode,se),F.return=q,F):(F=m(F,K),F.return=q,F)}function L(q,F,K,se){var Pe=K.type;return Pe===k?re(q,F,K.props.children,se,K.key):F!==null&&(F.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===A&&Sa(Pe)===F.type)?(F=m(F,K.props),cl(F,K),F.return=q,F):(F=Io(K.type,K.key,K.props,null,q.mode,se),cl(F,K),F.return=q,F)}function V(q,F,K,se){return F===null||F.tag!==4||F.stateNode.containerInfo!==K.containerInfo||F.stateNode.implementation!==K.implementation?(F=ed(K,q.mode,se),F.return=q,F):(F=m(F,K.children||[]),F.return=q,F)}function re(q,F,K,se,Pe){return F===null||F.tag!==7?(F=va(K,q.mode,se,Pe),F.return=q,F):(F=m(F,K),F.return=q,F)}function ce(q,F,K){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Ju(""+F,q.mode,K),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return K=Io(F.type,F.key,F.props,null,q.mode,K),cl(K,F),K.return=q,K;case _:return F=ed(F,q.mode,K),F.return=q,F;case A:return F=Sa(F),ce(q,F,K)}if(X(F)||ee(F))return F=va(F,q.mode,K,null),F.return=q,F;if(typeof F.then=="function")return ce(q,$o(F),K);if(F.$$typeof===R)return ce(q,Fo(q,F),K);Go(q,F)}return null}function Q(q,F,K,se){var Pe=F!==null?F.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Pe!==null?null:S(q,F,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case v:return K.key===Pe?L(q,F,K,se):null;case _:return K.key===Pe?V(q,F,K,se):null;case A:return K=Sa(K),Q(q,F,K,se)}if(X(K)||ee(K))return Pe!==null?null:re(q,F,K,se,null);if(typeof K.then=="function")return Q(q,F,$o(K),se);if(K.$$typeof===R)return Q(q,F,Fo(q,K),se);Go(q,K)}return null}function W(q,F,K,se,Pe){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return q=q.get(K)||null,S(F,q,""+se,Pe);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return q=q.get(se.key===null?K:se.key)||null,L(F,q,se,Pe);case _:return q=q.get(se.key===null?K:se.key)||null,V(F,q,se,Pe);case A:return se=Sa(se),W(q,F,K,se,Pe)}if(X(se)||ee(se))return q=q.get(K)||null,re(F,q,se,Pe,null);if(typeof se.then=="function")return W(q,F,K,$o(se),Pe);if(se.$$typeof===R)return W(q,F,K,Fo(F,se),Pe);Go(F,se)}return null}function ze(q,F,K,se){for(var Pe=null,St=null,je=F,tt=F=0,pt=null;je!==null&&tt<K.length;tt++){je.index>tt?(pt=je,je=null):pt=je.sibling;var Nt=Q(q,je,K[tt],se);if(Nt===null){je===null&&(je=pt);break}t&&je&&Nt.alternate===null&&i(q,je),F=g(Nt,F,tt),St===null?Pe=Nt:St.sibling=Nt,St=Nt,je=pt}if(tt===K.length)return s(q,je),gt&&li(q,tt),Pe;if(je===null){for(;tt<K.length;tt++)je=ce(q,K[tt],se),je!==null&&(F=g(je,F,tt),St===null?Pe=je:St.sibling=je,St=je);return gt&&li(q,tt),Pe}for(je=c(je);tt<K.length;tt++)pt=W(je,q,tt,K[tt],se),pt!==null&&(t&&pt.alternate!==null&&je.delete(pt.key===null?tt:pt.key),F=g(pt,F,tt),St===null?Pe=pt:St.sibling=pt,St=pt);return t&&je.forEach(function(Zi){return i(q,Zi)}),gt&&li(q,tt),Pe}function Ge(q,F,K,se){if(K==null)throw Error(a(151));for(var Pe=null,St=null,je=F,tt=F=0,pt=null,Nt=K.next();je!==null&&!Nt.done;tt++,Nt=K.next()){je.index>tt?(pt=je,je=null):pt=je.sibling;var Zi=Q(q,je,Nt.value,se);if(Zi===null){je===null&&(je=pt);break}t&&je&&Zi.alternate===null&&i(q,je),F=g(Zi,F,tt),St===null?Pe=Zi:St.sibling=Zi,St=Zi,je=pt}if(Nt.done)return s(q,je),gt&&li(q,tt),Pe;if(je===null){for(;!Nt.done;tt++,Nt=K.next())Nt=ce(q,Nt.value,se),Nt!==null&&(F=g(Nt,F,tt),St===null?Pe=Nt:St.sibling=Nt,St=Nt);return gt&&li(q,tt),Pe}for(je=c(je);!Nt.done;tt++,Nt=K.next())Nt=W(je,q,tt,Nt.value,se),Nt!==null&&(t&&Nt.alternate!==null&&je.delete(Nt.key===null?tt:Nt.key),F=g(Nt,F,tt),St===null?Pe=Nt:St.sibling=Nt,St=Nt);return t&&je.forEach(function(lw){return i(q,lw)}),gt&&li(q,tt),Pe}function Ut(q,F,K,se){if(typeof K=="object"&&K!==null&&K.type===k&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case v:e:{for(var Pe=K.key;F!==null;){if(F.key===Pe){if(Pe=K.type,Pe===k){if(F.tag===7){s(q,F.sibling),se=m(F,K.props.children),se.return=q,q=se;break e}}else if(F.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===A&&Sa(Pe)===F.type){s(q,F.sibling),se=m(F,K.props),cl(se,K),se.return=q,q=se;break e}s(q,F);break}else i(q,F);F=F.sibling}K.type===k?(se=va(K.props.children,q.mode,se,K.key),se.return=q,q=se):(se=Io(K.type,K.key,K.props,null,q.mode,se),cl(se,K),se.return=q,q=se)}return E(q);case _:e:{for(Pe=K.key;F!==null;){if(F.key===Pe)if(F.tag===4&&F.stateNode.containerInfo===K.containerInfo&&F.stateNode.implementation===K.implementation){s(q,F.sibling),se=m(F,K.children||[]),se.return=q,q=se;break e}else{s(q,F);break}else i(q,F);F=F.sibling}se=ed(K,q.mode,se),se.return=q,q=se}return E(q);case A:return K=Sa(K),Ut(q,F,K,se)}if(X(K))return ze(q,F,K,se);if(ee(K)){if(Pe=ee(K),typeof Pe!="function")throw Error(a(150));return K=Pe.call(K),Ge(q,F,K,se)}if(typeof K.then=="function")return Ut(q,F,$o(K),se);if(K.$$typeof===R)return Ut(q,F,Fo(q,K),se);Go(q,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,F!==null&&F.tag===6?(s(q,F.sibling),se=m(F,K),se.return=q,q=se):(s(q,F),se=Ju(K,q.mode,se),se.return=q,q=se),E(q)):s(q,F)}return function(q,F,K,se){try{ol=0;var Pe=Ut(q,F,K,se);return os=null,Pe}catch(je){if(je===ls||je===Ho)throw je;var St=lr(29,je,null,q.mode);return St.lanes=se,St.return=q,St}finally{}}}var Ca=Fp(!0),Pp=Fp(!1),Di=!1;function fd(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hd(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Li(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ji(t,i,s){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ct&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=jo(t),wp(t,null,s),i}return Lo(t,c,i,s),jo(t)}function ul(t,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=t.pendingLanes,s|=c,i.lanes=s,$e(t,s)}}function md(t,i){var s=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var m=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var E={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?m=g=E:g=g.next=E,s=s.next}while(s!==null);g===null?m=g=i:g=g.next=i}else m=g=i;s={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=i:t.next=i,s.lastBaseUpdate=i}var pd=!1;function dl(){if(pd){var t=ss;if(t!==null)throw t}}function fl(t,i,s,c){pd=!1;var m=t.updateQueue;Di=!1;var g=m.firstBaseUpdate,E=m.lastBaseUpdate,S=m.shared.pending;if(S!==null){m.shared.pending=null;var L=S,V=L.next;L.next=null,E===null?g=V:E.next=V,E=L;var re=t.alternate;re!==null&&(re=re.updateQueue,S=re.lastBaseUpdate,S!==E&&(S===null?re.firstBaseUpdate=V:S.next=V,re.lastBaseUpdate=L))}if(g!==null){var ce=m.baseState;E=0,re=V=L=null,S=g;do{var Q=S.lane&-536870913,W=Q!==S.lane;if(W?(mt&Q)===Q:(c&Q)===Q){Q!==0&&Q===as&&(pd=!0),re!==null&&(re=re.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ze=t,Ge=S;Q=i;var Ut=s;switch(Ge.tag){case 1:if(ze=Ge.payload,typeof ze=="function"){ce=ze.call(Ut,ce,Q);break e}ce=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Ge.payload,Q=typeof ze=="function"?ze.call(Ut,ce,Q):ze,Q==null)break e;ce=y({},ce,Q);break e;case 2:Di=!0}}Q=S.callback,Q!==null&&(t.flags|=64,W&&(t.flags|=8192),W=m.callbacks,W===null?m.callbacks=[Q]:W.push(Q))}else W={lane:Q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},re===null?(V=re=W,L=ce):re=re.next=W,E|=Q;if(S=S.next,S===null){if(S=m.shared.pending,S===null)break;W=S,S=W.next,W.next=null,m.lastBaseUpdate=W,m.shared.pending=null}}while(!0);re===null&&(L=ce),m.baseState=L,m.firstBaseUpdate=V,m.lastBaseUpdate=re,g===null&&(m.shared.lanes=0),Pi|=E,t.lanes=E,t.memoizedState=ce}}function Hp(t,i){if(typeof t!="function")throw Error(a(191,t));t.call(i)}function qp(t,i){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Hp(s[t],i)}var cs=M(null),Ko=M(0);function $p(t,i){t=yi,z(Ko,t),z(cs,i),yi=t|i.baseLanes}function gd(){z(Ko,yi),z(cs,cs.current)}function bd(){yi=Ko.current,G(cs),G(Ko)}var or=M(null),wr=null;function Ii(t){var i=t.alternate;z(on,on.current&1),z(or,t),wr===null&&(i===null||cs.current!==null||i.memoizedState!==null)&&(wr=t)}function yd(t){z(on,on.current),z(or,t),wr===null&&(wr=t)}function Gp(t){t.tag===22?(z(on,on.current),z(or,t),wr===null&&(wr=t)):Bi()}function Bi(){z(on,on.current),z(or,or.current)}function cr(t){G(or),wr===t&&(wr=null),G(on)}var on=M(0);function Vo(t){for(var i=t;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Sf(s)||Nf(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ui=0,et=null,It=null,mn=null,Yo=!1,us=!1,Ta=!1,Qo=0,hl=0,ds=null,Z1=0;function nn(){throw Error(a(321))}function xd(t,i){if(i===null)return!1;for(var s=0;s<i.length&&s<t.length;s++)if(!sr(t[s],i[s]))return!1;return!0}function vd(t,i,s,c,m,g){return ui=g,et=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,B.H=t===null||t.memoizedState===null?Tg:Ld,Ta=!1,g=s(c,m),Ta=!1,us&&(g=Vp(i,s,c,m)),Kp(t),g}function Kp(t){B.H=gl;var i=It!==null&&It.next!==null;if(ui=0,mn=It=et=null,Yo=!1,hl=0,ds=null,i)throw Error(a(300));t===null||pn||(t=t.dependencies,t!==null&&Uo(t)&&(pn=!0))}function Vp(t,i,s,c){et=t;var m=0;do{if(us&&(ds=null),hl=0,us=!1,25<=m)throw Error(a(301));if(m+=1,mn=It=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}B.H=zg,g=i(s,c)}while(us);return g}function W1(){var t=B.H,i=t.useState()[0];return i=typeof i.then=="function"?ml(i):i,t=t.useState()[0],(It!==null?It.memoizedState:null)!==t&&(et.flags|=1024),i}function Ed(){var t=Qo!==0;return Qo=0,t}function _d(t,i,s){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~s}function kd(t){if(Yo){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}Yo=!1}ui=0,mn=It=et=null,us=!1,hl=Qo=0,ds=null}function Pn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?et.memoizedState=mn=t:mn=mn.next=t,mn}function cn(){if(It===null){var t=et.alternate;t=t!==null?t.memoizedState:null}else t=It.next;var i=mn===null?et.memoizedState:mn.next;if(i!==null)mn=i,It=t;else{if(t===null)throw et.alternate===null?Error(a(467)):Error(a(310));It=t,t={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},mn===null?et.memoizedState=mn=t:mn=mn.next=t}return mn}function Xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ml(t){var i=hl;return hl+=1,ds===null&&(ds=[]),t=Ip(ds,t,i),i=et,(mn===null?i.memoizedState:mn.next)===null&&(i=i.alternate,B.H=i===null||i.memoizedState===null?Tg:Ld),t}function Zo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ml(t);if(t.$$typeof===R)return An(t)}throw Error(a(438,String(t)))}function wd(t){var i=null,s=et.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=et.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Xo(),et.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(t),c=0;c<t;c++)s[c]=P;return i.index++,s}function di(t,i){return typeof i=="function"?i(t):i}function Wo(t){var i=cn();return Sd(i,It,t)}function Sd(t,i,s){var c=t.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var m=t.baseQueue,g=c.pending;if(g!==null){if(m!==null){var E=m.next;m.next=g.next,g.next=E}i.baseQueue=m=g,c.pending=null}if(g=t.baseState,m===null)t.memoizedState=g;else{i=m.next;var S=E=null,L=null,V=i,re=!1;do{var ce=V.lane&-536870913;if(ce!==V.lane?(mt&ce)===ce:(ui&ce)===ce){var Q=V.revertLane;if(Q===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ce===as&&(re=!0);else if((ui&Q)===Q){V=V.next,Q===as&&(re=!0);continue}else ce={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(S=L=ce,E=g):L=L.next=ce,et.lanes|=Q,Pi|=Q;ce=V.action,Ta&&s(g,ce),g=V.hasEagerState?V.eagerState:s(g,ce)}else Q={lane:ce,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(S=L=Q,E=g):L=L.next=Q,et.lanes|=ce,Pi|=ce;V=V.next}while(V!==null&&V!==i);if(L===null?E=g:L.next=S,!sr(g,t.memoizedState)&&(pn=!0,re&&(s=ss,s!==null)))throw s;t.memoizedState=g,t.baseState=E,t.baseQueue=L,c.lastRenderedState=g}return m===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Nd(t){var i=cn(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=t;var c=s.dispatch,m=s.pending,g=i.memoizedState;if(m!==null){s.pending=null;var E=m=m.next;do g=t(g,E.action),E=E.next;while(E!==m);sr(g,i.memoizedState)||(pn=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),s.lastRenderedState=g}return[g,c]}function Yp(t,i,s){var c=et,m=cn(),g=gt;if(g){if(s===void 0)throw Error(a(407));s=s()}else s=i();var E=!sr((It||m).memoizedState,s);if(E&&(m.memoizedState=s,pn=!0),m=m.queue,zd(Zp.bind(null,c,m,t),[t]),m.getSnapshot!==i||E||mn!==null&&mn.memoizedState.tag&1){if(c.flags|=2048,fs(9,{destroy:void 0},Xp.bind(null,c,m,s,i),null),Pt===null)throw Error(a(349));g||(ui&127)!==0||Qp(c,i,s)}return s}function Qp(t,i,s){t.flags|=16384,t={getSnapshot:i,value:s},i=et.updateQueue,i===null?(i=Xo(),et.updateQueue=i,i.stores=[t]):(s=i.stores,s===null?i.stores=[t]:s.push(t))}function Xp(t,i,s,c){i.value=s,i.getSnapshot=c,Wp(i)&&Jp(t)}function Zp(t,i,s){return s(function(){Wp(i)&&Jp(t)})}function Wp(t){var i=t.getSnapshot;t=t.value;try{var s=i();return!sr(t,s)}catch{return!0}}function Jp(t){var i=xa(t,2);i!==null&&er(i,t,2)}function Cd(t){var i=Pn();if(typeof t=="function"){var s=t;if(t=s(),Ta){qt(!0);try{s()}finally{qt(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:t},i}function eg(t,i,s,c){return t.baseState=s,Sd(t,It,typeof c=="function"?c:di)}function J1(t,i,s,c,m){if(tc(t))throw Error(a(485));if(t=i.action,t!==null){var g={payload:m,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){g.listeners.push(E)}};B.T!==null?s(!0):g.isTransition=!1,c(g),s=i.pending,s===null?(g.next=i.pending=g,tg(i,g)):(g.next=s.next,i.pending=s.next=g)}}function tg(t,i){var s=i.action,c=i.payload,m=t.state;if(i.isTransition){var g=B.T,E={};B.T=E;try{var S=s(m,c),L=B.S;L!==null&&L(E,S),ng(t,i,S)}catch(V){Td(t,i,V)}finally{g!==null&&E.types!==null&&(g.types=E.types),B.T=g}}else try{g=s(m,c),ng(t,i,g)}catch(V){Td(t,i,V)}}function ng(t,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){rg(t,i,c)},function(c){return Td(t,i,c)}):rg(t,i,s)}function rg(t,i,s){i.status="fulfilled",i.value=s,ig(i),t.state=s,i=t.pending,i!==null&&(s=i.next,s===i?t.pending=null:(s=s.next,i.next=s,tg(t,s)))}function Td(t,i,s){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,ig(i),i=i.next;while(i!==c)}t.action=null}function ig(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function ag(t,i){return i}function sg(t,i){if(gt){var s=Pt.formState;if(s!==null){e:{var c=et;if(gt){if(Qt){t:{for(var m=Qt,g=kr;m.nodeType!==8;){if(!g){m=null;break t}if(m=Sr(m.nextSibling),m===null){m=null;break t}}g=m.data,m=g==="F!"||g==="F"?m:null}if(m){Qt=Sr(m.nextSibling),c=m.data==="F!";break e}}Oi(c)}c=!1}c&&(i=s[0])}}return s=Pn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ag,lastRenderedState:i},s.queue=c,s=Sg.bind(null,et,c),c.dispatch=s,c=Cd(!1),g=Dd.bind(null,et,!1,c.queue),c=Pn(),m={state:i,dispatch:null,action:t,pending:null},c.queue=m,s=J1.bind(null,et,m,g,s),m.dispatch=s,c.memoizedState=t,[i,s,!1]}function lg(t){var i=cn();return og(i,It,t)}function og(t,i,s){if(i=Sd(t,i,ag)[0],t=Wo(di)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=ml(i)}catch(E){throw E===ls?Ho:E}else c=i;i=cn();var m=i.queue,g=m.dispatch;return s!==i.memoizedState&&(et.flags|=2048,fs(9,{destroy:void 0},ek.bind(null,m,s),null)),[c,g,t]}function ek(t,i){t.action=i}function cg(t){var i=cn(),s=It;if(s!==null)return og(i,s,t);cn(),i=i.memoizedState,s=cn();var c=s.queue.dispatch;return s.memoizedState=t,[i,c,!1]}function fs(t,i,s,c){return t={tag:t,create:s,deps:c,inst:i,next:null},i=et.updateQueue,i===null&&(i=Xo(),et.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=t.next=t:(c=s.next,s.next=t,t.next=c,i.lastEffect=t),t}function ug(){return cn().memoizedState}function Jo(t,i,s,c){var m=Pn();et.flags|=t,m.memoizedState=fs(1|i,{destroy:void 0},s,c===void 0?null:c)}function ec(t,i,s,c){var m=cn();c=c===void 0?null:c;var g=m.memoizedState.inst;It!==null&&c!==null&&xd(c,It.memoizedState.deps)?m.memoizedState=fs(i,g,s,c):(et.flags|=t,m.memoizedState=fs(1|i,g,s,c))}function dg(t,i){Jo(8390656,8,t,i)}function zd(t,i){ec(2048,8,t,i)}function tk(t){et.flags|=4;var i=et.updateQueue;if(i===null)i=Xo(),et.updateQueue=i,i.events=[t];else{var s=i.events;s===null?i.events=[t]:s.push(t)}}function fg(t){var i=cn().memoizedState;return tk({ref:i,nextImpl:t}),function(){if((Ct&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function hg(t,i){return ec(4,2,t,i)}function mg(t,i){return ec(4,4,t,i)}function pg(t,i){if(typeof i=="function"){t=t();var s=i(t);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function gg(t,i,s){s=s!=null?s.concat([t]):null,ec(4,4,pg.bind(null,i,t),s)}function Rd(){}function bg(t,i){var s=cn();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&xd(i,c[1])?c[0]:(s.memoizedState=[t,i],t)}function yg(t,i){var s=cn();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&xd(i,c[1]))return c[0];if(c=t(),Ta){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[c,i],c}function Ad(t,i,s){return s===void 0||(ui&1073741824)!==0&&(mt&261930)===0?t.memoizedState=i:(t.memoizedState=s,t=x0(),et.lanes|=t,Pi|=t,s)}function xg(t,i,s,c){return sr(s,i)?s:cs.current!==null?(t=Ad(t,s,c),sr(t,i)||(pn=!0),t):(ui&42)===0||(ui&1073741824)!==0&&(mt&261930)===0?(pn=!0,t.memoizedState=s):(t=x0(),et.lanes|=t,Pi|=t,i)}function vg(t,i,s,c,m){var g=te.p;te.p=g!==0&&8>g?g:8;var E=B.T,S={};B.T=S,Dd(t,!1,i,s);try{var L=m(),V=B.S;if(V!==null&&V(S,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=X1(L,c);pl(t,i,re,fr(t))}else pl(t,i,c,fr(t))}catch(ce){pl(t,i,{then:function(){},status:"rejected",reason:ce},fr())}finally{te.p=g,E!==null&&S.types!==null&&(E.types=S.types),B.T=E}}function nk(){}function Od(t,i,s,c){if(t.tag!==5)throw Error(a(476));var m=Eg(t).queue;vg(t,m,i,oe,s===null?nk:function(){return _g(t),s(c)})}function Eg(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:oe},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:di,lastRenderedState:s},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function _g(t){var i=Eg(t);i.next===null&&(i=t.alternate.memoizedState),pl(t,i.next.queue,{},fr())}function Md(){return An(Ol)}function kg(){return cn().memoizedState}function wg(){return cn().memoizedState}function rk(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var s=fr();t=Li(s);var c=ji(i,t,s);c!==null&&(er(c,i,s),ul(c,i,s)),i={cache:od()},t.payload=i;return}i=i.return}}function ik(t,i,s){var c=fr();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tc(t)?Ng(i,s):(s=Zu(t,i,s,c),s!==null&&(er(s,t,c),Cg(s,i,c)))}function Sg(t,i,s){var c=fr();pl(t,i,s,c)}function pl(t,i,s,c){var m={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(tc(t))Ng(i,m);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var E=i.lastRenderedState,S=g(E,s);if(m.hasEagerState=!0,m.eagerState=S,sr(S,E))return Lo(t,i,m,0),Pt===null&&Do(),!1}catch{}finally{}if(s=Zu(t,i,m,c),s!==null)return er(s,t,c),Cg(s,i,c),!0}return!1}function Dd(t,i,s,c){if(c={lane:2,revertLane:hf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},tc(t)){if(i)throw Error(a(479))}else i=Zu(t,s,c,2),i!==null&&er(i,t,2)}function tc(t){var i=t.alternate;return t===et||i!==null&&i===et}function Ng(t,i){us=Yo=!0;var s=t.pending;s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i}function Cg(t,i,s){if((s&4194048)!==0){var c=i.lanes;c&=t.pendingLanes,s|=c,i.lanes=s,$e(t,s)}}var gl={readContext:An,use:Zo,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn,useHostTransitionStatus:nn,useFormState:nn,useActionState:nn,useOptimistic:nn,useMemoCache:nn,useCacheRefresh:nn};gl.useEffectEvent=nn;var Tg={readContext:An,use:Zo,useCallback:function(t,i){return Pn().memoizedState=[t,i===void 0?null:i],t},useContext:An,useEffect:dg,useImperativeHandle:function(t,i,s){s=s!=null?s.concat([t]):null,Jo(4194308,4,pg.bind(null,i,t),s)},useLayoutEffect:function(t,i){return Jo(4194308,4,t,i)},useInsertionEffect:function(t,i){Jo(4,2,t,i)},useMemo:function(t,i){var s=Pn();i=i===void 0?null:i;var c=t();if(Ta){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[c,i],c},useReducer:function(t,i,s){var c=Pn();if(s!==void 0){var m=s(i);if(Ta){qt(!0);try{s(i)}finally{qt(!1)}}}else m=i;return c.memoizedState=c.baseState=m,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:m},c.queue=t,t=t.dispatch=ik.bind(null,et,t),[c.memoizedState,t]},useRef:function(t){var i=Pn();return t={current:t},i.memoizedState=t},useState:function(t){t=Cd(t);var i=t.queue,s=Sg.bind(null,et,i);return i.dispatch=s,[t.memoizedState,s]},useDebugValue:Rd,useDeferredValue:function(t,i){var s=Pn();return Ad(s,t,i)},useTransition:function(){var t=Cd(!1);return t=vg.bind(null,et,t.queue,!0,!1),Pn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,s){var c=et,m=Pn();if(gt){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),Pt===null)throw Error(a(349));(mt&127)!==0||Qp(c,i,s)}m.memoizedState=s;var g={value:s,getSnapshot:i};return m.queue=g,dg(Zp.bind(null,c,g,t),[t]),c.flags|=2048,fs(9,{destroy:void 0},Xp.bind(null,c,g,s,i),null),s},useId:function(){var t=Pn(),i=Pt.identifierPrefix;if(gt){var s=Gr,c=$r;s=(c&~(1<<32-kt(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Qo++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=Z1++,i="_"+i+"r_"+s.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Md,useFormState:sg,useActionState:sg,useOptimistic:function(t){var i=Pn();i.memoizedState=i.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Dd.bind(null,et,!0,s),s.dispatch=i,[t,i]},useMemoCache:wd,useCacheRefresh:function(){return Pn().memoizedState=rk.bind(null,et)},useEffectEvent:function(t){var i=Pn(),s={impl:t};return i.memoizedState=s,function(){if((Ct&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},Ld={readContext:An,use:Zo,useCallback:bg,useContext:An,useEffect:zd,useImperativeHandle:gg,useInsertionEffect:hg,useLayoutEffect:mg,useMemo:yg,useReducer:Wo,useRef:ug,useState:function(){return Wo(di)},useDebugValue:Rd,useDeferredValue:function(t,i){var s=cn();return xg(s,It.memoizedState,t,i)},useTransition:function(){var t=Wo(di)[0],i=cn().memoizedState;return[typeof t=="boolean"?t:ml(t),i]},useSyncExternalStore:Yp,useId:kg,useHostTransitionStatus:Md,useFormState:lg,useActionState:lg,useOptimistic:function(t,i){var s=cn();return eg(s,It,t,i)},useMemoCache:wd,useCacheRefresh:wg};Ld.useEffectEvent=fg;var zg={readContext:An,use:Zo,useCallback:bg,useContext:An,useEffect:zd,useImperativeHandle:gg,useInsertionEffect:hg,useLayoutEffect:mg,useMemo:yg,useReducer:Nd,useRef:ug,useState:function(){return Nd(di)},useDebugValue:Rd,useDeferredValue:function(t,i){var s=cn();return It===null?Ad(s,t,i):xg(s,It.memoizedState,t,i)},useTransition:function(){var t=Nd(di)[0],i=cn().memoizedState;return[typeof t=="boolean"?t:ml(t),i]},useSyncExternalStore:Yp,useId:kg,useHostTransitionStatus:Md,useFormState:cg,useActionState:cg,useOptimistic:function(t,i){var s=cn();return It!==null?eg(s,It,t,i):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:wd,useCacheRefresh:wg};zg.useEffectEvent=fg;function jd(t,i,s,c){i=t.memoizedState,s=s(c,i),s=s==null?i:y({},i,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var Id={enqueueSetState:function(t,i,s){t=t._reactInternals;var c=fr(),m=Li(c);m.payload=i,s!=null&&(m.callback=s),i=ji(t,m,c),i!==null&&(er(i,t,c),ul(i,t,c))},enqueueReplaceState:function(t,i,s){t=t._reactInternals;var c=fr(),m=Li(c);m.tag=1,m.payload=i,s!=null&&(m.callback=s),i=ji(t,m,c),i!==null&&(er(i,t,c),ul(i,t,c))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var s=fr(),c=Li(s);c.tag=2,i!=null&&(c.callback=i),i=ji(t,c,s),i!==null&&(er(i,t,s),ul(i,t,s))}};function Rg(t,i,s,c,m,g,E){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,E):i.prototype&&i.prototype.isPureReactComponent?!nl(s,c)||!nl(m,g):!0}function Ag(t,i,s,c){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==t&&Id.enqueueReplaceState(i,i.state,null)}function za(t,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(t=t.defaultProps){s===i&&(s=y({},s));for(var m in t)s[m]===void 0&&(s[m]=t[m])}return s}function Og(t){Mo(t)}function Mg(t){console.error(t)}function Dg(t){Mo(t)}function nc(t,i){try{var s=t.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function Lg(t,i,s){try{var c=t.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Bd(t,i,s){return s=Li(s),s.tag=3,s.payload={element:null},s.callback=function(){nc(t,i)},s}function jg(t){return t=Li(t),t.tag=3,t}function Ig(t,i,s,c){var m=s.type.getDerivedStateFromError;if(typeof m=="function"){var g=c.value;t.payload=function(){return m(g)},t.callback=function(){Lg(i,s,c)}}var E=s.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(t.callback=function(){Lg(i,s,c),typeof m!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function ak(t,i,s,c,m){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&is(i,s,m,!0),s=or.current,s!==null){switch(s.tag){case 31:case 13:return wr===null?mc():s.alternate===null&&rn===0&&(rn=3),s.flags&=-257,s.flags|=65536,s.lanes=m,c===qo?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),uf(t,c,m)),!1;case 22:return s.flags|=65536,c===qo?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),uf(t,c,m)),!1}throw Error(a(435,s.tag))}return uf(t,c,m),mc(),!1}if(gt)return i=or.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==rd&&(t=Error(a(422),{cause:c}),al(vr(t,s)))):(c!==rd&&(i=Error(a(423),{cause:c}),al(vr(i,s))),t=t.current.alternate,t.flags|=65536,m&=-m,t.lanes|=m,c=vr(c,s),m=Bd(t.stateNode,c,m),md(t,m),rn!==4&&(rn=2)),!1;var g=Error(a(520),{cause:c});if(g=vr(g,s),wl===null?wl=[g]:wl.push(g),rn!==4&&(rn=2),i===null)return!0;c=vr(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,t=m&-m,s.lanes|=t,t=Bd(s.stateNode,c,t),md(s,t),!1;case 1:if(i=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Hi===null||!Hi.has(g))))return s.flags|=65536,m&=-m,s.lanes|=m,m=jg(m),Ig(m,t,s,c),md(s,m),!1}s=s.return}while(s!==null);return!1}var Ud=Error(a(461)),pn=!1;function On(t,i,s,c){i.child=t===null?Pp(i,null,s,c):Ca(i,t.child,s,c)}function Bg(t,i,s,c,m){s=s.render;var g=i.ref;if("ref"in c){var E={};for(var S in c)S!=="ref"&&(E[S]=c[S])}else E=c;return ka(i),c=vd(t,i,s,E,g,m),S=Ed(),t!==null&&!pn?(_d(t,i,m),fi(t,i,m)):(gt&&S&&td(i),i.flags|=1,On(t,i,c,m),i.child)}function Ug(t,i,s,c,m){if(t===null){var g=s.type;return typeof g=="function"&&!Wu(g)&&g.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=g,Fg(t,i,g,c,m)):(t=Io(s.type,null,c,i,i.mode,m),t.ref=i.ref,t.return=i,i.child=t)}if(g=t.child,!Vd(t,m)){var E=g.memoizedProps;if(s=s.compare,s=s!==null?s:nl,s(E,c)&&t.ref===i.ref)return fi(t,i,m)}return i.flags|=1,t=si(g,c),t.ref=i.ref,t.return=i,i.child=t}function Fg(t,i,s,c,m){if(t!==null){var g=t.memoizedProps;if(nl(g,c)&&t.ref===i.ref)if(pn=!1,i.pendingProps=c=g,Vd(t,m))(t.flags&131072)!==0&&(pn=!0);else return i.lanes=t.lanes,fi(t,i,m)}return Fd(t,i,s,c,m)}function Pg(t,i,s,c){var m=c.children,g=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,t!==null){for(c=i.child=t.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~g}else c=0,i.child=null;return Hg(t,i,g,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&Po(i,g!==null?g.cachePool:null),g!==null?$p(i,g):gd(),Gp(i);else return c=i.lanes=536870912,Hg(t,i,g!==null?g.baseLanes|s:s,s,c)}else g!==null?(Po(i,g.cachePool),$p(i,g),Bi(),i.memoizedState=null):(t!==null&&Po(i,null),gd(),Bi());return On(t,i,m,s),i.child}function bl(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Hg(t,i,s,c,m){var g=ud();return g=g===null?null:{parent:hn._currentValue,pool:g},i.memoizedState={baseLanes:s,cachePool:g},t!==null&&Po(i,null),gd(),Gp(i),t!==null&&is(t,i,c,!0),i.childLanes=m,null}function rc(t,i){return i=ac({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function qg(t,i,s){return Ca(i,t.child,null,s),t=rc(i,i.pendingProps),t.flags|=2,cr(i),i.memoizedState=null,t}function sk(t,i,s){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(gt){if(c.mode==="hidden")return t=rc(i,c),i.lanes=536870912,bl(null,t);if(yd(i),(t=Qt)?(t=tb(t,kr),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Ri!==null?{id:$r,overflow:Gr}:null,retryLane:536870912,hydrationErrors:null},s=Np(t),s.return=i,i.child=s,Rn=i,Qt=null)):t=null,t===null)throw Oi(i);return i.lanes=536870912,null}return rc(i,c)}var g=t.memoizedState;if(g!==null){var E=g.dehydrated;if(yd(i),m)if(i.flags&256)i.flags&=-257,i=qg(t,i,s);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(a(558));else if(pn||is(t,i,s,!1),m=(s&t.childLanes)!==0,pn||m){if(c=Pt,c!==null&&(E=D(c,s),E!==0&&E!==g.retryLane))throw g.retryLane=E,xa(t,E),er(c,t,E),Ud;mc(),i=qg(t,i,s)}else t=g.treeContext,Qt=Sr(E.nextSibling),Rn=i,gt=!0,Ai=null,kr=!1,t!==null&&zp(i,t),i=rc(i,c),i.flags|=4096;return i}return t=si(t.child,{mode:c.mode,children:c.children}),t.ref=i.ref,i.child=t,t.return=i,t}function ic(t,i){var s=i.ref;if(s===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(t===null||t.ref!==s)&&(i.flags|=4194816)}}function Fd(t,i,s,c,m){return ka(i),s=vd(t,i,s,c,void 0,m),c=Ed(),t!==null&&!pn?(_d(t,i,m),fi(t,i,m)):(gt&&c&&td(i),i.flags|=1,On(t,i,s,m),i.child)}function $g(t,i,s,c,m,g){return ka(i),i.updateQueue=null,s=Vp(i,c,s,m),Kp(t),c=Ed(),t!==null&&!pn?(_d(t,i,g),fi(t,i,g)):(gt&&c&&td(i),i.flags|=1,On(t,i,s,g),i.child)}function Gg(t,i,s,c,m){if(ka(i),i.stateNode===null){var g=es,E=s.contextType;typeof E=="object"&&E!==null&&(g=An(E)),g=new s(c,g),i.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Id,i.stateNode=g,g._reactInternals=i,g=i.stateNode,g.props=c,g.state=i.memoizedState,g.refs={},fd(i),E=s.contextType,g.context=typeof E=="object"&&E!==null?An(E):es,g.state=i.memoizedState,E=s.getDerivedStateFromProps,typeof E=="function"&&(jd(i,s,E,c),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(E=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),E!==g.state&&Id.enqueueReplaceState(g,g.state,null),fl(i,c,g,m),dl(),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(t===null){g=i.stateNode;var S=i.memoizedProps,L=za(s,S);g.props=L;var V=g.context,re=s.contextType;E=es,typeof re=="object"&&re!==null&&(E=An(re));var ce=s.getDerivedStateFromProps;re=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,re||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(S||V!==E)&&Ag(i,g,c,E),Di=!1;var Q=i.memoizedState;g.state=Q,fl(i,c,g,m),dl(),V=i.memoizedState,S||Q!==V||Di?(typeof ce=="function"&&(jd(i,s,ce,c),V=i.memoizedState),(L=Di||Rg(i,s,L,c,Q,V,E))?(re||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(i.flags|=4194308)):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=V),g.props=c,g.state=V,g.context=E,c=L):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{g=i.stateNode,hd(t,i),E=i.memoizedProps,re=za(s,E),g.props=re,ce=i.pendingProps,Q=g.context,V=s.contextType,L=es,typeof V=="object"&&V!==null&&(L=An(V)),S=s.getDerivedStateFromProps,(V=typeof S=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(E!==ce||Q!==L)&&Ag(i,g,c,L),Di=!1,Q=i.memoizedState,g.state=Q,fl(i,c,g,m),dl();var W=i.memoizedState;E!==ce||Q!==W||Di||t!==null&&t.dependencies!==null&&Uo(t.dependencies)?(typeof S=="function"&&(jd(i,s,S,c),W=i.memoizedState),(re=Di||Rg(i,s,re,c,Q,W,L)||t!==null&&t.dependencies!==null&&Uo(t.dependencies))?(V||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,W,L),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,W,L)),typeof g.componentDidUpdate=="function"&&(i.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof g.componentDidUpdate!="function"||E===t.memoizedProps&&Q===t.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&Q===t.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=W),g.props=c,g.state=W,g.context=L,c=re):(typeof g.componentDidUpdate!="function"||E===t.memoizedProps&&Q===t.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||E===t.memoizedProps&&Q===t.memoizedState||(i.flags|=1024),c=!1)}return g=c,ic(t,i),c=(i.flags&128)!==0,g||c?(g=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),i.flags|=1,t!==null&&c?(i.child=Ca(i,t.child,null,m),i.child=Ca(i,null,s,m)):On(t,i,s,m),i.memoizedState=g.state,t=i.child):t=fi(t,i,m),t}function Kg(t,i,s,c){return Ea(),i.flags|=256,On(t,i,s,c),i.child}var Pd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hd(t){return{baseLanes:t,cachePool:Lp()}}function qd(t,i,s){return t=t!==null?t.childLanes&~s:0,i&&(t|=dr),t}function Vg(t,i,s){var c=i.pendingProps,m=!1,g=(i.flags&128)!==0,E;if((E=g)||(E=t!==null&&t.memoizedState===null?!1:(on.current&2)!==0),E&&(m=!0,i.flags&=-129),E=(i.flags&32)!==0,i.flags&=-33,t===null){if(gt){if(m?Ii(i):Bi(),(t=Qt)?(t=tb(t,kr),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Ri!==null?{id:$r,overflow:Gr}:null,retryLane:536870912,hydrationErrors:null},s=Np(t),s.return=i,i.child=s,Rn=i,Qt=null)):t=null,t===null)throw Oi(i);return Nf(t)?i.lanes=32:i.lanes=536870912,null}var S=c.children;return c=c.fallback,m?(Bi(),m=i.mode,S=ac({mode:"hidden",children:S},m),c=va(c,m,s,null),S.return=i,c.return=i,S.sibling=c,i.child=S,c=i.child,c.memoizedState=Hd(s),c.childLanes=qd(t,E,s),i.memoizedState=Pd,bl(null,c)):(Ii(i),$d(i,S))}var L=t.memoizedState;if(L!==null&&(S=L.dehydrated,S!==null)){if(g)i.flags&256?(Ii(i),i.flags&=-257,i=Gd(t,i,s)):i.memoizedState!==null?(Bi(),i.child=t.child,i.flags|=128,i=null):(Bi(),S=c.fallback,m=i.mode,c=ac({mode:"visible",children:c.children},m),S=va(S,m,s,null),S.flags|=2,c.return=i,S.return=i,c.sibling=S,i.child=c,Ca(i,t.child,null,s),c=i.child,c.memoizedState=Hd(s),c.childLanes=qd(t,E,s),i.memoizedState=Pd,i=bl(null,c));else if(Ii(i),Nf(S)){if(E=S.nextSibling&&S.nextSibling.dataset,E)var V=E.dgst;E=V,c=Error(a(419)),c.stack="",c.digest=E,al({value:c,source:null,stack:null}),i=Gd(t,i,s)}else if(pn||is(t,i,s,!1),E=(s&t.childLanes)!==0,pn||E){if(E=Pt,E!==null&&(c=D(E,s),c!==0&&c!==L.retryLane))throw L.retryLane=c,xa(t,c),er(E,t,c),Ud;Sf(S)||mc(),i=Gd(t,i,s)}else Sf(S)?(i.flags|=192,i.child=t.child,i=null):(t=L.treeContext,Qt=Sr(S.nextSibling),Rn=i,gt=!0,Ai=null,kr=!1,t!==null&&zp(i,t),i=$d(i,c.children),i.flags|=4096);return i}return m?(Bi(),S=c.fallback,m=i.mode,L=t.child,V=L.sibling,c=si(L,{mode:"hidden",children:c.children}),c.subtreeFlags=L.subtreeFlags&65011712,V!==null?S=si(V,S):(S=va(S,m,s,null),S.flags|=2),S.return=i,c.return=i,c.sibling=S,i.child=c,bl(null,c),c=i.child,S=t.child.memoizedState,S===null?S=Hd(s):(m=S.cachePool,m!==null?(L=hn._currentValue,m=m.parent!==L?{parent:L,pool:L}:m):m=Lp(),S={baseLanes:S.baseLanes|s,cachePool:m}),c.memoizedState=S,c.childLanes=qd(t,E,s),i.memoizedState=Pd,bl(t.child,c)):(Ii(i),s=t.child,t=s.sibling,s=si(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,t!==null&&(E=i.deletions,E===null?(i.deletions=[t],i.flags|=16):E.push(t)),i.child=s,i.memoizedState=null,s)}function $d(t,i){return i=ac({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function ac(t,i){return t=lr(22,t,null,i),t.lanes=0,t}function Gd(t,i,s){return Ca(i,t.child,null,s),t=$d(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function Yg(t,i,s){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i),sd(t.return,i,s)}function Kd(t,i,s,c,m,g){var E=t.memoizedState;E===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:m,treeForkCount:g}:(E.isBackwards=i,E.rendering=null,E.renderingStartTime=0,E.last=c,E.tail=s,E.tailMode=m,E.treeForkCount=g)}function Qg(t,i,s){var c=i.pendingProps,m=c.revealOrder,g=c.tail;c=c.children;var E=on.current,S=(E&2)!==0;if(S?(E=E&1|2,i.flags|=128):E&=1,z(on,E),On(t,i,c,s),c=gt?il:0,!S&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Yg(t,s,i);else if(t.tag===19)Yg(t,s,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(m){case"forwards":for(s=i.child,m=null;s!==null;)t=s.alternate,t!==null&&Vo(t)===null&&(m=s),s=s.sibling;s=m,s===null?(m=i.child,i.child=null):(m=s.sibling,s.sibling=null),Kd(i,!1,m,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,m=i.child,i.child=null;m!==null;){if(t=m.alternate,t!==null&&Vo(t)===null){i.child=m;break}t=m.sibling,m.sibling=s,s=m,m=t}Kd(i,!0,s,null,g,c);break;case"together":Kd(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function fi(t,i,s){if(t!==null&&(i.dependencies=t.dependencies),Pi|=i.lanes,(s&i.childLanes)===0)if(t!==null){if(is(t,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(a(153));if(i.child!==null){for(t=i.child,s=si(t,t.pendingProps),i.child=s,s.return=i;t.sibling!==null;)t=t.sibling,s=s.sibling=si(t,t.pendingProps),s.return=i;s.sibling=null}return i.child}function Vd(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&Uo(t)))}function lk(t,i,s){switch(i.tag){case 3:st(i,i.stateNode.containerInfo),Mi(i,hn,t.memoizedState.cache),Ea();break;case 27:case 5:Zt(i);break;case 4:st(i,i.stateNode.containerInfo);break;case 10:Mi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,yd(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Ii(i),i.flags|=128,null):(s&i.child.childLanes)!==0?Vg(t,i,s):(Ii(i),t=fi(t,i,s),t!==null?t.sibling:null);Ii(i);break;case 19:var m=(t.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(is(t,i,s,!1),c=(s&i.childLanes)!==0),m){if(c)return Qg(t,i,s);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),z(on,on.current),c)break;return null;case 22:return i.lanes=0,Pg(t,i,s,i.pendingProps);case 24:Mi(i,hn,t.memoizedState.cache)}return fi(t,i,s)}function Xg(t,i,s){if(t!==null)if(t.memoizedProps!==i.pendingProps)pn=!0;else{if(!Vd(t,s)&&(i.flags&128)===0)return pn=!1,lk(t,i,s);pn=(t.flags&131072)!==0}else pn=!1,gt&&(i.flags&1048576)!==0&&Tp(i,il,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(t=Sa(i.elementType),i.type=t,typeof t=="function")Wu(t)?(c=za(t,c),i.tag=1,i=Gg(null,i,t,c,s)):(i.tag=0,i=Fd(null,i,t,c,s));else{if(t!=null){var m=t.$$typeof;if(m===H){i.tag=11,i=Bg(null,i,t,c,s);break e}else if(m===Z){i.tag=14,i=Ug(null,i,t,c,s);break e}}throw i=le(t)||t,Error(a(306,i,""))}}return i;case 0:return Fd(t,i,i.type,i.pendingProps,s);case 1:return c=i.type,m=za(c,i.pendingProps),Gg(t,i,c,m,s);case 3:e:{if(st(i,i.stateNode.containerInfo),t===null)throw Error(a(387));c=i.pendingProps;var g=i.memoizedState;m=g.element,hd(t,i),fl(i,c,null,s);var E=i.memoizedState;if(c=E.cache,Mi(i,hn,c),c!==g.cache&&ld(i,[hn],s,!0),dl(),c=E.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:E.cache},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){i=Kg(t,i,c,s);break e}else if(c!==m){m=vr(Error(a(424)),i),al(m),i=Kg(t,i,c,s);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Qt=Sr(t.firstChild),Rn=i,gt=!0,Ai=null,kr=!0,s=Pp(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ea(),c===m){i=fi(t,i,s);break e}On(t,i,c,s)}i=i.child}return i;case 26:return ic(t,i),t===null?(s=lb(i.type,null,i.pendingProps,null))?i.memoizedState=s:gt||(s=i.type,t=i.pendingProps,c=Ec(be.current).createElement(s),c[ye]=i,c[we]=t,Mn(c,s,t),jt(c),i.stateNode=c):i.memoizedState=lb(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return Zt(i),t===null&&gt&&(c=i.stateNode=ib(i.type,i.pendingProps,be.current),Rn=i,kr=!0,m=Qt,Ki(i.type)?(Cf=m,Qt=Sr(c.firstChild)):Qt=m),On(t,i,i.pendingProps.children,s),ic(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&gt&&((m=c=Qt)&&(c=Ik(c,i.type,i.pendingProps,kr),c!==null?(i.stateNode=c,Rn=i,Qt=Sr(c.firstChild),kr=!1,m=!0):m=!1),m||Oi(i)),Zt(i),m=i.type,g=i.pendingProps,E=t!==null?t.memoizedProps:null,c=g.children,_f(m,g)?c=null:E!==null&&_f(m,E)&&(i.flags|=32),i.memoizedState!==null&&(m=vd(t,i,W1,null,null,s),Ol._currentValue=m),ic(t,i),On(t,i,c,s),i.child;case 6:return t===null&&gt&&((t=s=Qt)&&(s=Bk(s,i.pendingProps,kr),s!==null?(i.stateNode=s,Rn=i,Qt=null,t=!0):t=!1),t||Oi(i)),null;case 13:return Vg(t,i,s);case 4:return st(i,i.stateNode.containerInfo),c=i.pendingProps,t===null?i.child=Ca(i,null,c,s):On(t,i,c,s),i.child;case 11:return Bg(t,i,i.type,i.pendingProps,s);case 7:return On(t,i,i.pendingProps,s),i.child;case 8:return On(t,i,i.pendingProps.children,s),i.child;case 12:return On(t,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Mi(i,i.type,c.value),On(t,i,c.children,s),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,ka(i),m=An(m),c=c(m),i.flags|=1,On(t,i,c,s),i.child;case 14:return Ug(t,i,i.type,i.pendingProps,s);case 15:return Fg(t,i,i.type,i.pendingProps,s);case 19:return Qg(t,i,s);case 31:return sk(t,i,s);case 22:return Pg(t,i,s,i.pendingProps);case 24:return ka(i),c=An(hn),t===null?(m=ud(),m===null&&(m=Pt,g=od(),m.pooledCache=g,g.refCount++,g!==null&&(m.pooledCacheLanes|=s),m=g),i.memoizedState={parent:c,cache:m},fd(i),Mi(i,hn,m)):((t.lanes&s)!==0&&(hd(t,i),fl(i,null,null,s),dl()),m=t.memoizedState,g=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),Mi(i,hn,c)):(c=g.cache,Mi(i,hn,c),c!==m.cache&&ld(i,[hn],s,!0))),On(t,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function hi(t){t.flags|=4}function Yd(t,i,s,c,m){if((i=(t.mode&32)!==0)&&(i=!1),i){if(t.flags|=16777216,(m&335544128)===m)if(t.stateNode.complete)t.flags|=8192;else if(k0())t.flags|=8192;else throw Na=qo,dd}else t.flags&=-16777217}function Zg(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!fb(i))if(k0())t.flags|=8192;else throw Na=qo,dd}function sc(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?Ke():536870912,t.lanes|=i,gs|=i)}function yl(t,i){if(!gt)switch(t.tailMode){case"hidden":i=t.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Xt(t){var i=t.alternate!==null&&t.alternate.child===t.child,s=0,c=0;if(i)for(var m=t.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=t,m=m.sibling;else for(m=t.child;m!==null;)s|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=t,m=m.sibling;return t.subtreeFlags|=c,t.childLanes=s,i}function ok(t,i,s){var c=i.pendingProps;switch(nd(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xt(i),null;case 1:return Xt(i),null;case 3:return s=i.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),ci(hn),Be(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(rs(i)?hi(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,id())),Xt(i),null;case 26:var m=i.type,g=i.memoizedState;return t===null?(hi(i),g!==null?(Xt(i),Zg(i,g)):(Xt(i),Yd(i,m,null,c,s))):g?g!==t.memoizedState?(hi(i),Xt(i),Zg(i,g)):(Xt(i),i.flags&=-16777217):(t=t.memoizedProps,t!==c&&hi(i),Xt(i),Yd(i,m,t,c,s)),null;case 27:if(un(i),s=be.current,m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&hi(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Xt(i),null}t=he.current,rs(i)?Rp(i):(t=ib(m,c,s),i.stateNode=t,hi(i))}return Xt(i),null;case 5:if(un(i),m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&hi(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Xt(i),null}if(g=he.current,rs(i))Rp(i);else{var E=Ec(be.current);switch(g){case 1:g=E.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:g=E.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":g=E.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":g=E.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":g=E.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?E.createElement("select",{is:c.is}):E.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?E.createElement(m,{is:c.is}):E.createElement(m)}}g[ye]=i,g[we]=c;e:for(E=i.child;E!==null;){if(E.tag===5||E.tag===6)g.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===i)break e;for(;E.sibling===null;){if(E.return===null||E.return===i)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}i.stateNode=g;e:switch(Mn(g,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&hi(i)}}return Xt(i),Yd(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,s),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==c&&hi(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(t=be.current,rs(i)){if(t=i.stateNode,s=i.memoizedProps,c=null,m=Rn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}t[ye]=i,t=!!(t.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||V0(t.nodeValue,s)),t||Oi(i,!0)}else t=Ec(t).createTextNode(c),t[ye]=i,i.stateNode=t}return Xt(i),null;case 31:if(s=i.memoizedState,t===null||t.memoizedState!==null){if(c=rs(i),s!==null){if(t===null){if(!c)throw Error(a(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[ye]=i}else Ea(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Xt(i),t=!1}else s=id(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return i.flags&256?(cr(i),i):(cr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Xt(i),null;case 13:if(c=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(m=rs(i),c!==null&&c.dehydrated!==null){if(t===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[ye]=i}else Ea(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Xt(i),m=!1}else m=id(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(cr(i),i):(cr(i),null)}return cr(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,t=t!==null&&t.memoizedState!==null,s&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==m&&(c.flags|=2048)),s!==t&&s&&(i.child.flags|=8192),sc(i,i.updateQueue),Xt(i),null);case 4:return Be(),t===null&&bf(i.stateNode.containerInfo),Xt(i),null;case 10:return ci(i.type),Xt(i),null;case 19:if(G(on),c=i.memoizedState,c===null)return Xt(i),null;if(m=(i.flags&128)!==0,g=c.rendering,g===null)if(m)yl(c,!1);else{if(rn!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(g=Vo(t),g!==null){for(i.flags|=128,yl(c,!1),t=g.updateQueue,i.updateQueue=t,sc(i,t),i.subtreeFlags=0,t=s,s=i.child;s!==null;)Sp(s,t),s=s.sibling;return z(on,on.current&1|2),gt&&li(i,c.treeForkCount),i.child}t=t.sibling}c.tail!==null&&Vt()>dc&&(i.flags|=128,m=!0,yl(c,!1),i.lanes=4194304)}else{if(!m)if(t=Vo(g),t!==null){if(i.flags|=128,m=!0,t=t.updateQueue,i.updateQueue=t,sc(i,t),yl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!gt)return Xt(i),null}else 2*Vt()-c.renderingStartTime>dc&&s!==536870912&&(i.flags|=128,m=!0,yl(c,!1),i.lanes=4194304);c.isBackwards?(g.sibling=i.child,i.child=g):(t=c.last,t!==null?t.sibling=g:i.child=g,c.last=g)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Vt(),t.sibling=null,s=on.current,z(on,m?s&1|2:s&1),gt&&li(i,c.treeForkCount),t):(Xt(i),null);case 22:case 23:return cr(i),bd(),c=i.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(Xt(i),i.subtreeFlags&6&&(i.flags|=8192)):Xt(i),s=i.updateQueue,s!==null&&sc(i,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),t!==null&&G(wa),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ci(hn),Xt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function ck(t,i){switch(nd(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return ci(hn),Be(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return un(i),null;case 31:if(i.memoizedState!==null){if(cr(i),i.alternate===null)throw Error(a(340));Ea()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(cr(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ea()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return G(on),null;case 4:return Be(),null;case 10:return ci(i.type),null;case 22:case 23:return cr(i),bd(),t!==null&&G(wa),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return ci(hn),null;case 25:return null;default:return null}}function Wg(t,i){switch(nd(i),i.tag){case 3:ci(hn),Be();break;case 26:case 27:case 5:un(i);break;case 4:Be();break;case 31:i.memoizedState!==null&&cr(i);break;case 13:cr(i);break;case 19:G(on);break;case 10:ci(i.type);break;case 22:case 23:cr(i),bd(),t!==null&&G(wa);break;case 24:ci(hn)}}function xl(t,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var m=c.next;s=m;do{if((s.tag&t)===t){c=void 0;var g=s.create,E=s.inst;c=g(),E.destroy=c}s=s.next}while(s!==m)}}catch(S){Lt(i,i.return,S)}}function Ui(t,i,s){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var g=m.next;c=g;do{if((c.tag&t)===t){var E=c.inst,S=E.destroy;if(S!==void 0){E.destroy=void 0,m=i;var L=s,V=S;try{V()}catch(re){Lt(m,L,re)}}}c=c.next}while(c!==g)}}catch(re){Lt(i,i.return,re)}}function Jg(t){var i=t.updateQueue;if(i!==null){var s=t.stateNode;try{qp(i,s)}catch(c){Lt(t,t.return,c)}}}function e0(t,i,s){s.props=za(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(c){Lt(t,i,c)}}function vl(t,i){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof s=="function"?t.refCleanup=s(c):s.current=c}}catch(m){Lt(t,i,m)}}function Kr(t,i){var s=t.ref,c=t.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(m){Lt(t,i,m)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(m){Lt(t,i,m)}else s.current=null}function t0(t){var i=t.type,s=t.memoizedProps,c=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(m){Lt(t,t.return,m)}}function Qd(t,i,s){try{var c=t.stateNode;Ak(c,t.type,s,i),c[we]=i}catch(m){Lt(t,t.return,m)}}function n0(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ki(t.type)||t.tag===4}function Xd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||n0(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ki(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zd(t,i,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(t),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=xe));else if(c!==4&&(c===27&&Ki(t.type)&&(s=t.stateNode,i=null),t=t.child,t!==null))for(Zd(t,i,s),t=t.sibling;t!==null;)Zd(t,i,s),t=t.sibling}function lc(t,i,s){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?s.insertBefore(t,i):s.appendChild(t);else if(c!==4&&(c===27&&Ki(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(lc(t,i,s),t=t.sibling;t!==null;)lc(t,i,s),t=t.sibling}function r0(t){var i=t.stateNode,s=t.memoizedProps;try{for(var c=t.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Mn(i,c,s),i[ye]=t,i[we]=s}catch(g){Lt(t,t.return,g)}}var mi=!1,gn=!1,Wd=!1,i0=typeof WeakSet=="function"?WeakSet:Set,Cn=null;function uk(t,i){if(t=t.containerInfo,vf=Tc,t=gp(t),Gu(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var m=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var E=0,S=-1,L=-1,V=0,re=0,ce=t,Q=null;t:for(;;){for(var W;ce!==s||m!==0&&ce.nodeType!==3||(S=E+m),ce!==g||c!==0&&ce.nodeType!==3||(L=E+c),ce.nodeType===3&&(E+=ce.nodeValue.length),(W=ce.firstChild)!==null;)Q=ce,ce=W;for(;;){if(ce===t)break t;if(Q===s&&++V===m&&(S=E),Q===g&&++re===c&&(L=E),(W=ce.nextSibling)!==null)break;ce=Q,Q=ce.parentNode}ce=W}s=S===-1||L===-1?null:{start:S,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ef={focusedElem:t,selectionRange:s},Tc=!1,Cn=i;Cn!==null;)if(i=Cn,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,Cn=t;else for(;Cn!==null;){switch(i=Cn,g=i.alternate,t=i.flags,i.tag){case 0:if((t&4)!==0&&(t=i.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)m=t[s],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,s=i,m=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var ze=za(s.type,m);t=c.getSnapshotBeforeUpdate(ze,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(Ge){Lt(s,s.return,Ge)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,s=t.nodeType,s===9)wf(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":wf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=i.sibling,t!==null){t.return=i.return,Cn=t;break}Cn=i.return}}function a0(t,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:gi(t,s),c&4&&xl(5,s);break;case 1:if(gi(t,s),c&4)if(t=s.stateNode,i===null)try{t.componentDidMount()}catch(E){Lt(s,s.return,E)}else{var m=za(s.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(m,i,t.__reactInternalSnapshotBeforeUpdate)}catch(E){Lt(s,s.return,E)}}c&64&&Jg(s),c&512&&vl(s,s.return);break;case 3:if(gi(t,s),c&64&&(t=s.updateQueue,t!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{qp(t,i)}catch(E){Lt(s,s.return,E)}}break;case 27:i===null&&c&4&&r0(s);case 26:case 5:gi(t,s),i===null&&c&4&&t0(s),c&512&&vl(s,s.return);break;case 12:gi(t,s);break;case 31:gi(t,s),c&4&&o0(t,s);break;case 13:gi(t,s),c&4&&c0(t,s),c&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=xk.bind(null,s),Uk(t,s))));break;case 22:if(c=s.memoizedState!==null||mi,!c){i=i!==null&&i.memoizedState!==null||gn,m=mi;var g=gn;mi=c,(gn=i)&&!g?bi(t,s,(s.subtreeFlags&8772)!==0):gi(t,s),mi=m,gn=g}break;case 30:break;default:gi(t,s)}}function s0(t){var i=t.alternate;i!==null&&(t.alternate=null,s0(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&Ot(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Jt=null,Xn=!1;function pi(t,i,s){for(s=s.child;s!==null;)l0(t,i,s),s=s.sibling}function l0(t,i,s){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(an,s)}catch{}switch(s.tag){case 26:gn||Kr(s,i),pi(t,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:gn||Kr(s,i);var c=Jt,m=Xn;Ki(s.type)&&(Jt=s.stateNode,Xn=!1),pi(t,i,s),zl(s.stateNode),Jt=c,Xn=m;break;case 5:gn||Kr(s,i);case 6:if(c=Jt,m=Xn,Jt=null,pi(t,i,s),Jt=c,Xn=m,Jt!==null)if(Xn)try{(Jt.nodeType===9?Jt.body:Jt.nodeName==="HTML"?Jt.ownerDocument.body:Jt).removeChild(s.stateNode)}catch(g){Lt(s,i,g)}else try{Jt.removeChild(s.stateNode)}catch(g){Lt(s,i,g)}break;case 18:Jt!==null&&(Xn?(t=Jt,J0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),ws(t)):J0(Jt,s.stateNode));break;case 4:c=Jt,m=Xn,Jt=s.stateNode.containerInfo,Xn=!0,pi(t,i,s),Jt=c,Xn=m;break;case 0:case 11:case 14:case 15:Ui(2,s,i),gn||Ui(4,s,i),pi(t,i,s);break;case 1:gn||(Kr(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&e0(s,i,c)),pi(t,i,s);break;case 21:pi(t,i,s);break;case 22:gn=(c=gn)||s.memoizedState!==null,pi(t,i,s),gn=c;break;default:pi(t,i,s)}}function o0(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ws(t)}catch(s){Lt(i,i.return,s)}}}function c0(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ws(t)}catch(s){Lt(i,i.return,s)}}function dk(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new i0),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new i0),i;default:throw Error(a(435,t.tag))}}function oc(t,i){var s=dk(t);i.forEach(function(c){if(!s.has(c)){s.add(c);var m=vk.bind(null,t,c);c.then(m,m)}})}function Zn(t,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var m=s[c],g=t,E=i,S=E;e:for(;S!==null;){switch(S.tag){case 27:if(Ki(S.type)){Jt=S.stateNode,Xn=!1;break e}break;case 5:Jt=S.stateNode,Xn=!1;break e;case 3:case 4:Jt=S.stateNode.containerInfo,Xn=!0;break e}S=S.return}if(Jt===null)throw Error(a(160));l0(g,E,m),Jt=null,Xn=!1,g=m.alternate,g!==null&&(g.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)u0(i,t),i=i.sibling}var Lr=null;function u0(t,i){var s=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Zn(i,t),Wn(t),c&4&&(Ui(3,t,t.return),xl(3,t),Ui(5,t,t.return));break;case 1:Zn(i,t),Wn(t),c&512&&(gn||s===null||Kr(s,s.return)),c&64&&mi&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var m=Lr;if(Zn(i,t),Wn(t),c&512&&(gn||s===null||Kr(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=t.memoizedState,s===null)if(c===null)if(t.stateNode===null){e:{c=t.type,s=t.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":g=m.getElementsByTagName("title")[0],(!g||g[rt]||g[ye]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=m.createElement(c),m.head.insertBefore(g,m.querySelector("head > title"))),Mn(g,c,s),g[ye]=t,jt(g),c=g;break e;case"link":var E=ub("link","href",m).get(c+(s.href||""));if(E){for(var S=0;S<E.length;S++)if(g=E[S],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){E.splice(S,1);break t}}g=m.createElement(c),Mn(g,c,s),m.head.appendChild(g);break;case"meta":if(E=ub("meta","content",m).get(c+(s.content||""))){for(S=0;S<E.length;S++)if(g=E[S],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){E.splice(S,1);break t}}g=m.createElement(c),Mn(g,c,s),m.head.appendChild(g);break;default:throw Error(a(468,c))}g[ye]=t,jt(g),c=g}t.stateNode=c}else db(m,t.type,t.stateNode);else t.stateNode=cb(m,c,t.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?db(m,t.type,t.stateNode):cb(m,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Qd(t,t.memoizedProps,s.memoizedProps)}break;case 27:Zn(i,t),Wn(t),c&512&&(gn||s===null||Kr(s,s.return)),s!==null&&c&4&&Qd(t,t.memoizedProps,s.memoizedProps);break;case 5:if(Zn(i,t),Wn(t),c&512&&(gn||s===null||Kr(s,s.return)),t.flags&32){m=t.stateNode;try{Ye(m,"")}catch(ze){Lt(t,t.return,ze)}}c&4&&t.stateNode!=null&&(m=t.memoizedProps,Qd(t,m,s!==null?s.memoizedProps:m)),c&1024&&(Wd=!0);break;case 6:if(Zn(i,t),Wn(t),c&4){if(t.stateNode===null)throw Error(a(162));c=t.memoizedProps,s=t.stateNode;try{s.nodeValue=c}catch(ze){Lt(t,t.return,ze)}}break;case 3:if(wc=null,m=Lr,Lr=_c(i.containerInfo),Zn(i,t),Lr=m,Wn(t),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ws(i.containerInfo)}catch(ze){Lt(t,t.return,ze)}Wd&&(Wd=!1,d0(t));break;case 4:c=Lr,Lr=_c(t.stateNode.containerInfo),Zn(i,t),Wn(t),Lr=c;break;case 12:Zn(i,t),Wn(t);break;case 31:Zn(i,t),Wn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,oc(t,c)));break;case 13:Zn(i,t),Wn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(uc=Vt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,oc(t,c)));break;case 22:m=t.memoizedState!==null;var L=s!==null&&s.memoizedState!==null,V=mi,re=gn;if(mi=V||m,gn=re||L,Zn(i,t),gn=re,mi=V,Wn(t),c&8192)e:for(i=t.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(s===null||L||mi||gn||Ra(t)),s=null,i=t;;){if(i.tag===5||i.tag===26){if(s===null){L=s=i;try{if(g=L.stateNode,m)E=g.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{S=L.stateNode;var ce=L.memoizedProps.style,Q=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;S.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ze){Lt(L,L.return,ze)}}}else if(i.tag===6){if(s===null){L=i;try{L.stateNode.nodeValue=m?"":L.memoizedProps}catch(ze){Lt(L,L.return,ze)}}}else if(i.tag===18){if(s===null){L=i;try{var W=L.stateNode;m?eb(W,!0):eb(L.stateNode,!1)}catch(ze){Lt(L,L.return,ze)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=t.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,oc(t,s))));break;case 19:Zn(i,t),Wn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,oc(t,c)));break;case 30:break;case 21:break;default:Zn(i,t),Wn(t)}}function Wn(t){var i=t.flags;if(i&2){try{for(var s,c=t.return;c!==null;){if(n0(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var m=s.stateNode,g=Xd(t);lc(t,g,m);break;case 5:var E=s.stateNode;s.flags&32&&(Ye(E,""),s.flags&=-33);var S=Xd(t);lc(t,S,E);break;case 3:case 4:var L=s.stateNode.containerInfo,V=Xd(t);Zd(t,V,L);break;default:throw Error(a(161))}}catch(re){Lt(t,t.return,re)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function d0(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;d0(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function gi(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)a0(t,i.alternate,i),i=i.sibling}function Ra(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:Ui(4,i,i.return),Ra(i);break;case 1:Kr(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&e0(i,i.return,s),Ra(i);break;case 27:zl(i.stateNode);case 26:case 5:Kr(i,i.return),Ra(i);break;case 22:i.memoizedState===null&&Ra(i);break;case 30:Ra(i);break;default:Ra(i)}t=t.sibling}}function bi(t,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=t,g=i,E=g.flags;switch(g.tag){case 0:case 11:case 15:bi(m,g,s),xl(4,g);break;case 1:if(bi(m,g,s),c=g,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(V){Lt(c,c.return,V)}if(c=g,m=c.updateQueue,m!==null){var S=c.stateNode;try{var L=m.shared.hiddenCallbacks;if(L!==null)for(m.shared.hiddenCallbacks=null,m=0;m<L.length;m++)Hp(L[m],S)}catch(V){Lt(c,c.return,V)}}s&&E&64&&Jg(g),vl(g,g.return);break;case 27:r0(g);case 26:case 5:bi(m,g,s),s&&c===null&&E&4&&t0(g),vl(g,g.return);break;case 12:bi(m,g,s);break;case 31:bi(m,g,s),s&&E&4&&o0(m,g);break;case 13:bi(m,g,s),s&&E&4&&c0(m,g);break;case 22:g.memoizedState===null&&bi(m,g,s),vl(g,g.return);break;case 30:break;default:bi(m,g,s)}i=i.sibling}}function Jd(t,i){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&sl(s))}function ef(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&sl(t))}function jr(t,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)f0(t,i,s,c),i=i.sibling}function f0(t,i,s,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:jr(t,i,s,c),m&2048&&xl(9,i);break;case 1:jr(t,i,s,c);break;case 3:jr(t,i,s,c),m&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&sl(t)));break;case 12:if(m&2048){jr(t,i,s,c),t=i.stateNode;try{var g=i.memoizedProps,E=g.id,S=g.onPostCommit;typeof S=="function"&&S(E,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(L){Lt(i,i.return,L)}}else jr(t,i,s,c);break;case 31:jr(t,i,s,c);break;case 13:jr(t,i,s,c);break;case 23:break;case 22:g=i.stateNode,E=i.alternate,i.memoizedState!==null?g._visibility&2?jr(t,i,s,c):El(t,i):g._visibility&2?jr(t,i,s,c):(g._visibility|=2,hs(t,i,s,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Jd(E,i);break;case 24:jr(t,i,s,c),m&2048&&ef(i.alternate,i);break;default:jr(t,i,s,c)}}function hs(t,i,s,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var g=t,E=i,S=s,L=c,V=E.flags;switch(E.tag){case 0:case 11:case 15:hs(g,E,S,L,m),xl(8,E);break;case 23:break;case 22:var re=E.stateNode;E.memoizedState!==null?re._visibility&2?hs(g,E,S,L,m):El(g,E):(re._visibility|=2,hs(g,E,S,L,m)),m&&V&2048&&Jd(E.alternate,E);break;case 24:hs(g,E,S,L,m),m&&V&2048&&ef(E.alternate,E);break;default:hs(g,E,S,L,m)}i=i.sibling}}function El(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=t,c=i,m=c.flags;switch(c.tag){case 22:El(s,c),m&2048&&Jd(c.alternate,c);break;case 24:El(s,c),m&2048&&ef(c.alternate,c);break;default:El(s,c)}i=i.sibling}}var _l=8192;function ms(t,i,s){if(t.subtreeFlags&_l)for(t=t.child;t!==null;)h0(t,i,s),t=t.sibling}function h0(t,i,s){switch(t.tag){case 26:ms(t,i,s),t.flags&_l&&t.memoizedState!==null&&Zk(s,Lr,t.memoizedState,t.memoizedProps);break;case 5:ms(t,i,s);break;case 3:case 4:var c=Lr;Lr=_c(t.stateNode.containerInfo),ms(t,i,s),Lr=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=_l,_l=16777216,ms(t,i,s),_l=c):ms(t,i,s));break;default:ms(t,i,s)}}function m0(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function kl(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Cn=c,g0(c,t)}m0(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)p0(t),t=t.sibling}function p0(t){switch(t.tag){case 0:case 11:case 15:kl(t),t.flags&2048&&Ui(9,t,t.return);break;case 3:kl(t);break;case 12:kl(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,cc(t)):kl(t);break;default:kl(t)}}function cc(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Cn=c,g0(c,t)}m0(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:Ui(8,i,i.return),cc(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,cc(i));break;default:cc(i)}t=t.sibling}}function g0(t,i){for(;Cn!==null;){var s=Cn;switch(s.tag){case 0:case 11:case 15:Ui(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:sl(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Cn=c;else e:for(s=t;Cn!==null;){c=Cn;var m=c.sibling,g=c.return;if(s0(c),c===s){Cn=null;break e}if(m!==null){m.return=g,Cn=m;break e}Cn=g}}}var fk={getCacheForType:function(t){var i=An(hn),s=i.data.get(t);return s===void 0&&(s=t(),i.data.set(t,s)),s},cacheSignal:function(){return An(hn).controller.signal}},hk=typeof WeakMap=="function"?WeakMap:Map,Ct=0,Pt=null,ct=null,mt=0,Dt=0,ur=null,Fi=!1,ps=!1,tf=!1,yi=0,rn=0,Pi=0,Aa=0,nf=0,dr=0,gs=0,wl=null,Jn=null,rf=!1,uc=0,b0=0,dc=1/0,fc=null,Hi=null,En=0,qi=null,bs=null,xi=0,af=0,sf=null,y0=null,Sl=0,lf=null;function fr(){return(Ct&2)!==0&&mt!==0?mt&-mt:B.T!==null?hf():ue()}function x0(){if(dr===0)if((mt&536870912)===0||gt){var t=Mr;Mr<<=1,(Mr&3932160)===0&&(Mr=262144),dr=t}else dr=536870912;return t=or.current,t!==null&&(t.flags|=32),dr}function er(t,i,s){(t===Pt&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)&&(ys(t,0),$i(t,mt,dr,!1)),wt(t,s),((Ct&2)===0||t!==Pt)&&(t===Pt&&((Ct&2)===0&&(Aa|=s),rn===4&&$i(t,mt,dr,!1)),Vr(t))}function v0(t,i,s){if((Ct&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&t.expiredLanes)===0||ie(t,i),m=c?gk(t,i):cf(t,i,!0),g=c;do{if(m===0){ps&&!c&&$i(t,i,0,!1);break}else{if(s=t.current.alternate,g&&!mk(s)){m=cf(t,i,!1),g=!1;continue}if(m===2){if(g=i,t.errorRecoveryDisabledLanes&g)var E=0;else E=t.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){i=E;e:{var S=t;m=wl;var L=S.current.memoizedState.isDehydrated;if(L&&(ys(S,E).flags|=256),E=cf(S,E,!1),E!==2){if(tf&&!L){S.errorRecoveryDisabledLanes|=g,Aa|=g,m=4;break e}g=Jn,Jn=m,g!==null&&(Jn===null?Jn=g:Jn.push.apply(Jn,g))}m=E}if(g=!1,m!==2)continue}}if(m===1){ys(t,0),$i(t,i,0,!0);break}e:{switch(c=t,g=m,g){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:$i(c,i,dr,!Fi);break e;case 2:Jn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=uc+300-Vt(),10<m)){if($i(c,i,dr,!Fi),I(c,0,!0)!==0)break e;xi=i,c.timeoutHandle=Z0(E0.bind(null,c,s,Jn,fc,rf,i,dr,Aa,gs,Fi,g,"Throttled",-0,0),m);break e}E0(c,s,Jn,fc,rf,i,dr,Aa,gs,Fi,g,null,-0,0)}}break}while(!0);Vr(t)}function E0(t,i,s,c,m,g,E,S,L,V,re,ce,Q,W){if(t.timeoutHandle=-1,ce=i.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xe},h0(i,g,ce);var ze=(g&62914560)===g?uc-Vt():(g&4194048)===g?b0-Vt():0;if(ze=Wk(ce,ze),ze!==null){xi=g,t.cancelPendingCommit=ze(z0.bind(null,t,i,g,s,c,m,E,S,L,re,ce,null,Q,W)),$i(t,g,E,!V);return}}z0(t,i,g,s,c,m,E,S,L)}function mk(t){for(var i=t;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var m=s[c],g=m.getSnapshot;m=m.value;try{if(!sr(g(),m))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function $i(t,i,s,c){i&=~nf,i&=~Aa,t.suspendedLanes|=i,t.pingedLanes&=~i,c&&(t.warmLanes|=i),c=t.expirationTimes;for(var m=i;0<m;){var g=31-kt(m),E=1<<g;c[g]=-1,m&=~E}s!==0&&Se(t,s,i)}function hc(){return(Ct&6)===0?(Nl(0),!1):!0}function of(){if(ct!==null){if(Dt===0)var t=ct.return;else t=ct,oi=_a=null,kd(t),os=null,ol=0,t=ct;for(;t!==null;)Wg(t.alternate,t),t=t.return;ct=null}}function ys(t,i){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,Dk(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),xi=0,of(),Pt=t,ct=s=si(t.current,null),mt=i,Dt=0,ur=null,Fi=!1,ps=ie(t,i),tf=!1,gs=dr=nf=Aa=Pi=rn=0,Jn=wl=null,rf=!1,(i&8)!==0&&(i|=i&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=i;0<c;){var m=31-kt(c),g=1<<m;i|=t[m],c&=~g}return yi=i,Do(),s}function _0(t,i){et=null,B.H=gl,i===ls||i===Ho?(i=Bp(),Dt=3):i===dd?(i=Bp(),Dt=4):Dt=i===Ud?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,ur=i,ct===null&&(rn=1,nc(t,vr(i,t.current)))}function k0(){var t=or.current;return t===null?!0:(mt&4194048)===mt?wr===null:(mt&62914560)===mt||(mt&536870912)!==0?t===wr:!1}function w0(){var t=B.H;return B.H=gl,t===null?gl:t}function S0(){var t=B.A;return B.A=fk,t}function mc(){rn=4,Fi||(mt&4194048)!==mt&&or.current!==null||(ps=!0),(Pi&134217727)===0&&(Aa&134217727)===0||Pt===null||$i(Pt,mt,dr,!1)}function cf(t,i,s){var c=Ct;Ct|=2;var m=w0(),g=S0();(Pt!==t||mt!==i)&&(fc=null,ys(t,i)),i=!1;var E=rn;e:do try{if(Dt!==0&&ct!==null){var S=ct,L=ur;switch(Dt){case 8:of(),E=6;break e;case 3:case 2:case 9:case 6:or.current===null&&(i=!0);var V=Dt;if(Dt=0,ur=null,xs(t,S,L,V),s&&ps){E=0;break e}break;default:V=Dt,Dt=0,ur=null,xs(t,S,L,V)}}pk(),E=rn;break}catch(re){_0(t,re)}while(!0);return i&&t.shellSuspendCounter++,oi=_a=null,Ct=c,B.H=m,B.A=g,ct===null&&(Pt=null,mt=0,Do()),E}function pk(){for(;ct!==null;)N0(ct)}function gk(t,i){var s=Ct;Ct|=2;var c=w0(),m=S0();Pt!==t||mt!==i?(fc=null,dc=Vt()+500,ys(t,i)):ps=ie(t,i);e:do try{if(Dt!==0&&ct!==null){i=ct;var g=ur;t:switch(Dt){case 1:Dt=0,ur=null,xs(t,i,g,1);break;case 2:case 9:if(jp(g)){Dt=0,ur=null,C0(i);break}i=function(){Dt!==2&&Dt!==9||Pt!==t||(Dt=7),Vr(t)},g.then(i,i);break e;case 3:Dt=7;break e;case 4:Dt=5;break e;case 7:jp(g)?(Dt=0,ur=null,C0(i)):(Dt=0,ur=null,xs(t,i,g,7));break;case 5:var E=null;switch(ct.tag){case 26:E=ct.memoizedState;case 5:case 27:var S=ct;if(E?fb(E):S.stateNode.complete){Dt=0,ur=null;var L=S.sibling;if(L!==null)ct=L;else{var V=S.return;V!==null?(ct=V,pc(V)):ct=null}break t}}Dt=0,ur=null,xs(t,i,g,5);break;case 6:Dt=0,ur=null,xs(t,i,g,6);break;case 8:of(),rn=6;break e;default:throw Error(a(462))}}bk();break}catch(re){_0(t,re)}while(!0);return oi=_a=null,B.H=c,B.A=m,Ct=s,ct!==null?0:(Pt=null,mt=0,Do(),rn)}function bk(){for(;ct!==null&&!ha();)N0(ct)}function N0(t){var i=Xg(t.alternate,t,yi);t.memoizedProps=t.pendingProps,i===null?pc(t):ct=i}function C0(t){var i=t,s=i.alternate;switch(i.tag){case 15:case 0:i=$g(s,i,i.pendingProps,i.type,void 0,mt);break;case 11:i=$g(s,i,i.pendingProps,i.type.render,i.ref,mt);break;case 5:kd(i);default:Wg(s,i),i=ct=Sp(i,yi),i=Xg(s,i,yi)}t.memoizedProps=t.pendingProps,i===null?pc(t):ct=i}function xs(t,i,s,c){oi=_a=null,kd(i),os=null,ol=0;var m=i.return;try{if(ak(t,m,i,s,mt)){rn=1,nc(t,vr(s,t.current)),ct=null;return}}catch(g){if(m!==null)throw ct=m,g;rn=1,nc(t,vr(s,t.current)),ct=null;return}i.flags&32768?(gt||c===1?t=!0:ps||(mt&536870912)!==0?t=!1:(Fi=t=!0,(c===2||c===9||c===3||c===6)&&(c=or.current,c!==null&&c.tag===13&&(c.flags|=16384))),T0(i,t)):pc(i)}function pc(t){var i=t;do{if((i.flags&32768)!==0){T0(i,Fi);return}t=i.return;var s=ok(i.alternate,i,yi);if(s!==null){ct=s;return}if(i=i.sibling,i!==null){ct=i;return}ct=i=t}while(i!==null);rn===0&&(rn=5)}function T0(t,i){do{var s=ck(t.alternate,t);if(s!==null){s.flags&=32767,ct=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(t=t.sibling,t!==null)){ct=t;return}ct=t=s}while(t!==null);rn=6,ct=null}function z0(t,i,s,c,m,g,E,S,L){t.cancelPendingCommit=null;do gc();while(En!==0);if((Ct&6)!==0)throw Error(a(327));if(i!==null){if(i===t.current)throw Error(a(177));if(g=i.lanes|i.childLanes,g|=Xu,Te(t,s,g,E,S,L),t===Pt&&(ct=Pt=null,mt=0),bs=i,qi=t,xi=s,af=g,sf=m,y0=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Ek(Fe,function(){return D0(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,m=te.p,te.p=2,E=Ct,Ct|=4;try{uk(t,i,s)}finally{Ct=E,te.p=m,B.T=c}}En=1,R0(),A0(),O0()}}function R0(){if(En===1){En=0;var t=qi,i=bs,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var c=te.p;te.p=2;var m=Ct;Ct|=4;try{u0(i,t);var g=Ef,E=gp(t.containerInfo),S=g.focusedElem,L=g.selectionRange;if(E!==S&&S&&S.ownerDocument&&pp(S.ownerDocument.documentElement,S)){if(L!==null&&Gu(S)){var V=L.start,re=L.end;if(re===void 0&&(re=V),"selectionStart"in S)S.selectionStart=V,S.selectionEnd=Math.min(re,S.value.length);else{var ce=S.ownerDocument||document,Q=ce&&ce.defaultView||window;if(Q.getSelection){var W=Q.getSelection(),ze=S.textContent.length,Ge=Math.min(L.start,ze),Ut=L.end===void 0?Ge:Math.min(L.end,ze);!W.extend&&Ge>Ut&&(E=Ut,Ut=Ge,Ge=E);var q=mp(S,Ge),F=mp(S,Ut);if(q&&F&&(W.rangeCount!==1||W.anchorNode!==q.node||W.anchorOffset!==q.offset||W.focusNode!==F.node||W.focusOffset!==F.offset)){var K=ce.createRange();K.setStart(q.node,q.offset),W.removeAllRanges(),Ge>Ut?(W.addRange(K),W.extend(F.node,F.offset)):(K.setEnd(F.node,F.offset),W.addRange(K))}}}}for(ce=[],W=S;W=W.parentNode;)W.nodeType===1&&ce.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ce.length;S++){var se=ce[S];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Tc=!!vf,Ef=vf=null}finally{Ct=m,te.p=c,B.T=s}}t.current=i,En=2}}function A0(){if(En===2){En=0;var t=qi,i=bs,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var c=te.p;te.p=2;var m=Ct;Ct|=4;try{a0(t,i.alternate,i)}finally{Ct=m,te.p=c,B.T=s}}En=3}}function O0(){if(En===4||En===3){En=0,Ni();var t=qi,i=bs,s=xi,c=y0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?En=5:(En=0,bs=qi=null,M0(t,t.pendingLanes));var m=t.pendingLanes;if(m===0&&(Hi=null),Y(s),i=i.stateNode,Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(an,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=B.T,m=te.p,te.p=2,B.T=null;try{for(var g=t.onRecoverableError,E=0;E<c.length;E++){var S=c[E];g(S.value,{componentStack:S.stack})}}finally{B.T=i,te.p=m}}(xi&3)!==0&&gc(),Vr(t),m=t.pendingLanes,(s&261930)!==0&&(m&42)!==0?t===lf?Sl++:(Sl=0,lf=t):Sl=0,Nl(0)}}function M0(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,sl(i)))}function gc(){return R0(),A0(),O0(),D0()}function D0(){if(En!==5)return!1;var t=qi,i=af;af=0;var s=Y(xi),c=B.T,m=te.p;try{te.p=32>s?32:s,B.T=null,s=sf,sf=null;var g=qi,E=xi;if(En=0,bs=qi=null,xi=0,(Ct&6)!==0)throw Error(a(331));var S=Ct;if(Ct|=4,p0(g.current),f0(g,g.current,E,s),Ct=S,Nl(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(an,g)}catch{}return!0}finally{te.p=m,B.T=c,M0(t,i)}}function L0(t,i,s){i=vr(s,i),i=Bd(t.stateNode,i,2),t=ji(t,i,2),t!==null&&(wt(t,2),Vr(t))}function Lt(t,i,s){if(t.tag===3)L0(t,t,s);else for(;i!==null;){if(i.tag===3){L0(i,t,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Hi===null||!Hi.has(c))){t=vr(s,t),s=jg(2),c=ji(i,s,2),c!==null&&(Ig(s,c,i,t),wt(c,2),Vr(c));break}}i=i.return}}function uf(t,i,s){var c=t.pingCache;if(c===null){c=t.pingCache=new hk;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(s)||(tf=!0,m.add(s),t=yk.bind(null,t,i,s),i.then(t,t))}function yk(t,i,s){var c=t.pingCache;c!==null&&c.delete(i),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,Pt===t&&(mt&s)===s&&(rn===4||rn===3&&(mt&62914560)===mt&&300>Vt()-uc?(Ct&2)===0&&ys(t,0):nf|=s,gs===mt&&(gs=0)),Vr(t)}function j0(t,i){i===0&&(i=Ke()),t=xa(t,i),t!==null&&(wt(t,i),Vr(t))}function xk(t){var i=t.memoizedState,s=0;i!==null&&(s=i.retryLane),j0(t,s)}function vk(t,i){var s=0;switch(t.tag){case 31:case 13:var c=t.stateNode,m=t.memoizedState;m!==null&&(s=m.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),j0(t,s)}function Ek(t,i){return br(t,i)}var bc=null,vs=null,df=!1,yc=!1,ff=!1,Gi=0;function Vr(t){t!==vs&&t.next===null&&(vs===null?bc=vs=t:vs=vs.next=t),yc=!0,df||(df=!0,kk())}function Nl(t,i){if(!ff&&yc){ff=!0;do for(var s=!1,c=bc;c!==null;){if(t!==0){var m=c.pendingLanes;if(m===0)var g=0;else{var E=c.suspendedLanes,S=c.pingedLanes;g=(1<<31-kt(42|t)+1)-1,g&=m&~(E&~S),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,F0(c,g))}else g=mt,g=I(c,c===Pt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||ie(c,g)||(s=!0,F0(c,g));c=c.next}while(s);ff=!1}}function _k(){I0()}function I0(){yc=df=!1;var t=0;Gi!==0&&Mk()&&(t=Gi);for(var i=Vt(),s=null,c=bc;c!==null;){var m=c.next,g=B0(c,i);g===0?(c.next=null,s===null?bc=m:s.next=m,m===null&&(vs=s)):(s=c,(t!==0||(g&3)!==0)&&(yc=!0)),c=m}En!==0&&En!==5||Nl(t),Gi!==0&&(Gi=0)}function B0(t,i){for(var s=t.suspendedLanes,c=t.pingedLanes,m=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var E=31-kt(g),S=1<<E,L=m[E];L===-1?((S&s)===0||(S&c)!==0)&&(m[E]=_e(S,i)):L<=i&&(t.expiredLanes|=S),g&=~S}if(i=Pt,s=mt,s=I(t,t===i?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,s===0||t===i&&(Dt===2||Dt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&ti(c),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||ie(t,s)){if(i=s&-s,i===t.callbackPriority)return i;switch(c!==null&&ti(c),Y(s)){case 2:case 8:s=ge;break;case 32:s=Fe;break;case 268435456:s=Je;break;default:s=Fe}return c=U0.bind(null,t),s=br(s,c),t.callbackPriority=i,t.callbackNode=s,i}return c!==null&&c!==null&&ti(c),t.callbackPriority=2,t.callbackNode=null,2}function U0(t,i){if(En!==0&&En!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if(gc()&&t.callbackNode!==s)return null;var c=mt;return c=I(t,t===Pt?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(v0(t,c,i),B0(t,Vt()),t.callbackNode!=null&&t.callbackNode===s?U0.bind(null,t):null)}function F0(t,i){if(gc())return null;v0(t,i,!0)}function kk(){Lk(function(){(Ct&6)!==0?br(ne,_k):I0()})}function hf(){if(Gi===0){var t=as;t===0&&(t=Pr,Pr<<=1,(Pr&261888)===0&&(Pr=256)),Gi=t}return Gi}function P0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ti(""+t)}function H0(t,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,t.id&&s.setAttribute("form",t.id),i.parentNode.insertBefore(s,i),t=new FormData(t),s.parentNode.removeChild(s),t}function wk(t,i,s,c,m){if(i==="submit"&&s&&s.stateNode===m){var g=P0((m[we]||null).action),E=c.submitter;E&&(i=(i=E[we]||null)?P0(i.formAction):E.getAttribute("formAction"),i!==null&&(g=i,E=null));var S=new Ro("action","action",null,c,m);t.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Gi!==0){var L=E?H0(m,E):new FormData(m);Od(s,{pending:!0,data:L,method:m.method,action:g},null,L)}}else typeof g=="function"&&(S.preventDefault(),L=E?H0(m,E):new FormData(m),Od(s,{pending:!0,data:L,method:m.method,action:g},g,L))},currentTarget:m}]})}}for(var mf=0;mf<Qu.length;mf++){var pf=Qu[mf],Sk=pf.toLowerCase(),Nk=pf[0].toUpperCase()+pf.slice(1);Dr(Sk,"on"+Nk)}Dr(xp,"onAnimationEnd"),Dr(vp,"onAnimationIteration"),Dr(Ep,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(H1,"onTransitionRun"),Dr(q1,"onTransitionStart"),Dr($1,"onTransitionCancel"),Dr(_p,"onTransitionEnd"),de("onMouseEnter",["mouseout","mouseover"]),de("onMouseLeave",["mouseout","mouseover"]),de("onPointerEnter",["pointerout","pointerover"]),de("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Cl="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(" "),Ck=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cl));function q0(t,i){i=(i&4)!==0;for(var s=0;s<t.length;s++){var c=t[s],m=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var E=c.length-1;0<=E;E--){var S=c[E],L=S.instance,V=S.currentTarget;if(S=S.listener,L!==g&&m.isPropagationStopped())break e;g=S,m.currentTarget=V;try{g(m)}catch(re){Mo(re)}m.currentTarget=null,g=L}else for(E=0;E<c.length;E++){if(S=c[E],L=S.instance,V=S.currentTarget,S=S.listener,L!==g&&m.isPropagationStopped())break e;g=S,m.currentTarget=V;try{g(m)}catch(re){Mo(re)}m.currentTarget=null,g=L}}}}function ut(t,i){var s=i[Ie];s===void 0&&(s=i[Ie]=new Set);var c=t+"__bubble";s.has(c)||($0(i,t,2,!1),s.add(c))}function gf(t,i,s){var c=0;i&&(c|=4),$0(s,t,c,i)}var xc="_reactListening"+Math.random().toString(36).slice(2);function bf(t){if(!t[xc]){t[xc]=!0,qr.forEach(function(s){s!=="selectionchange"&&(Ck.has(s)||gf(s,!1,t),gf(s,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[xc]||(i[xc]=!0,gf("selectionchange",!1,i))}}function $0(t,i,s,c){switch(xb(i)){case 2:var m=tw;break;case 8:m=nw;break;default:m=Of}s=m.bind(null,i,s,t),m=void 0,!ju||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?t.addEventListener(i,s,{capture:!0,passive:m}):t.addEventListener(i,s,!0):m!==void 0?t.addEventListener(i,s,{passive:m}):t.addEventListener(i,s,!1)}function yf(t,i,s,c,m){var g=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var E=c.tag;if(E===3||E===4){var S=c.stateNode.containerInfo;if(S===m)break;if(E===4)for(E=c.return;E!==null;){var L=E.tag;if((L===3||L===4)&&E.stateNode.containerInfo===m)return;E=E.return}for(;S!==null;){if(E=xt(S),E===null)return;if(L=E.tag,L===5||L===6||L===26||L===27){c=g=E;continue e}S=S.parentNode}}c=c.return}No(function(){var V=g,re=We(s),ce=[];e:{var Q=kp.get(t);if(Q!==void 0){var W=Ro,ze=t;switch(t){case"keypress":if(To(s)===0)break e;case"keydown":case"keyup":W=v1;break;case"focusin":ze="focus",W=Fu;break;case"focusout":ze="blur",W=Fu;break;case"beforeblur":case"afterblur":W=Fu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Wm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=o1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=k1;break;case xp:case vp:case Ep:W=d1;break;case _p:W=S1;break;case"scroll":case"scrollend":W=s1;break;case"wheel":W=C1;break;case"copy":case"cut":case"paste":W=h1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=ep;break;case"toggle":case"beforetoggle":W=z1}var Ge=(i&4)!==0,Ut=!Ge&&(t==="scroll"||t==="scrollend"),q=Ge?Q!==null?Q+"Capture":null:Q;Ge=[];for(var F=V,K;F!==null;){var se=F;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||q===null||(se=Qs(F,q),se!=null&&Ge.push(Tl(F,se,K))),Ut)break;F=F.return}0<Ge.length&&(Q=new W(Q,ze,null,s,re),ce.push({event:Q,listeners:Ge}))}}if((i&7)===0){e:{if(Q=t==="mouseover"||t==="pointerover",W=t==="mouseout"||t==="pointerout",Q&&s!==Le&&(ze=s.relatedTarget||s.fromElement)&&(xt(ze)||ze[Ne]))break e;if((W||Q)&&(Q=re.window===re?re:(Q=re.ownerDocument)?Q.defaultView||Q.parentWindow:window,W?(ze=s.relatedTarget||s.toElement,W=V,ze=ze?xt(ze):null,ze!==null&&(Ut=o(ze),Ge=ze.tag,ze!==Ut||Ge!==5&&Ge!==27&&Ge!==6)&&(ze=null)):(W=null,ze=V),W!==ze)){if(Ge=Wm,se="onMouseLeave",q="onMouseEnter",F="mouse",(t==="pointerout"||t==="pointerover")&&(Ge=ep,se="onPointerLeave",q="onPointerEnter",F="pointer"),Ut=W==null?Q:ot(W),K=ze==null?Q:ot(ze),Q=new Ge(se,F+"leave",W,s,re),Q.target=Ut,Q.relatedTarget=K,se=null,xt(re)===V&&(Ge=new Ge(q,F+"enter",ze,s,re),Ge.target=K,Ge.relatedTarget=Ut,se=Ge),Ut=se,W&&ze)t:{for(Ge=Tk,q=W,F=ze,K=0,se=q;se;se=Ge(se))K++;se=0;for(var Pe=F;Pe;Pe=Ge(Pe))se++;for(;0<K-se;)q=Ge(q),K--;for(;0<se-K;)F=Ge(F),se--;for(;K--;){if(q===F||F!==null&&q===F.alternate){Ge=q;break t}q=Ge(q),F=Ge(F)}Ge=null}else Ge=null;W!==null&&G0(ce,Q,W,Ge,!1),ze!==null&&Ut!==null&&G0(ce,Ut,ze,Ge,!0)}}e:{if(Q=V?ot(V):window,W=Q.nodeName&&Q.nodeName.toLowerCase(),W==="select"||W==="input"&&Q.type==="file")var St=op;else if(sp(Q))if(cp)St=U1;else{St=I1;var je=j1}else W=Q.nodeName,!W||W.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?V&&Ci(V.elementType)&&(St=op):St=B1;if(St&&(St=St(t,V))){lp(ce,St,s,re);break e}je&&je(t,Q,V),t==="focusout"&&V&&Q.type==="number"&&V.memoizedProps.value!=null&&Ya(Q,"number",Q.value)}switch(je=V?ot(V):window,t){case"focusin":(sp(je)||je.contentEditable==="true")&&(Za=je,Ku=V,rl=null);break;case"focusout":rl=Ku=Za=null;break;case"mousedown":Vu=!0;break;case"contextmenu":case"mouseup":case"dragend":Vu=!1,bp(ce,s,re);break;case"selectionchange":if(P1)break;case"keydown":case"keyup":bp(ce,s,re)}var tt;if(Hu)e:{switch(t){case"compositionstart":var pt="onCompositionStart";break e;case"compositionend":pt="onCompositionEnd";break e;case"compositionupdate":pt="onCompositionUpdate";break e}pt=void 0}else Xa?ip(t,s)&&(pt="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(pt="onCompositionStart");pt&&(tp&&s.locale!=="ko"&&(Xa||pt!=="onCompositionStart"?pt==="onCompositionEnd"&&Xa&&(tt=Xm()):(zi=re,Iu="value"in zi?zi.value:zi.textContent,Xa=!0)),je=vc(V,pt),0<je.length&&(pt=new Jm(pt,t,null,s,re),ce.push({event:pt,listeners:je}),tt?pt.data=tt:(tt=ap(s),tt!==null&&(pt.data=tt)))),(tt=A1?O1(t,s):M1(t,s))&&(pt=vc(V,"onBeforeInput"),0<pt.length&&(je=new Jm("onBeforeInput","beforeinput",null,s,re),ce.push({event:je,listeners:pt}),je.data=tt)),wk(ce,t,V,s,re)}q0(ce,i)})}function Tl(t,i,s){return{instance:t,listener:i,currentTarget:s}}function vc(t,i){for(var s=i+"Capture",c=[];t!==null;){var m=t,g=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||g===null||(m=Qs(t,s),m!=null&&c.unshift(Tl(t,m,g)),m=Qs(t,i),m!=null&&c.push(Tl(t,m,g))),t.tag===3)return c;t=t.return}return[]}function Tk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function G0(t,i,s,c,m){for(var g=i._reactName,E=[];s!==null&&s!==c;){var S=s,L=S.alternate,V=S.stateNode;if(S=S.tag,L!==null&&L===c)break;S!==5&&S!==26&&S!==27||V===null||(L=V,m?(V=Qs(s,g),V!=null&&E.unshift(Tl(s,V,L))):m||(V=Qs(s,g),V!=null&&E.push(Tl(s,V,L)))),s=s.return}E.length!==0&&t.push({event:i,listeners:E})}var zk=/\r\n?/g,Rk=/\u0000|\uFFFD/g;function K0(t){return(typeof t=="string"?t:""+t).replace(zk,`
49
- `).replace(Rk,"")}function V0(t,i){return i=K0(i),K0(t)===i}function Bt(t,i,s,c,m,g){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||Ye(t,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&Ye(t,""+c);break;case"className":Rt(t,"class",c);break;case"tabIndex":Rt(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Rt(t,s,c);break;case"style":Mt(t,c,g);break;case"data":if(i!=="object"){Rt(t,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){t.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Ti(""+c),t.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(i!=="input"&&Bt(t,i,"name",m.name,m,null),Bt(t,i,"formEncType",m.formEncType,m,null),Bt(t,i,"formMethod",m.formMethod,m,null),Bt(t,i,"formTarget",m.formTarget,m,null)):(Bt(t,i,"encType",m.encType,m,null),Bt(t,i,"method",m.method,m,null),Bt(t,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(s);break}c=Ti(""+c),t.setAttribute(s,c);break;case"onClick":c!=null&&(t.onclick=xe);break;case"onScroll":c!=null&&ut("scroll",t);break;case"onScrollEnd":c!=null&&ut("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}s=Ti(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""+c):t.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":c===!0?t.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(s,c):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(s,c):t.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(s):t.setAttribute(s,c);break;case"popover":ut("beforetoggle",t),ut("toggle",t),Ve(t,"popover",c);break;case"xlinkActuate":ln(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":ln(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":ln(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":ln(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":ln(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":ln(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":ln(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":ln(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":ln(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Ve(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ii.get(s)||s,Ve(t,s,c))}}function xf(t,i,s,c,m,g){switch(s){case"style":Mt(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(m.children!=null)throw Error(a(60));t.innerHTML=s}}break;case"children":typeof c=="string"?Ye(t,c):(typeof c=="number"||typeof c=="bigint")&&Ye(t,""+c);break;case"onScroll":c!=null&&ut("scroll",t);break;case"onScrollEnd":c!=null&&ut("scrollend",t);break;case"onClick":c!=null&&(t.onclick=xe);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jn.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(m=s.endsWith("Capture"),i=s.slice(2,m?s.length-7:void 0),g=t[we]||null,g=g!=null?g[s]:null,typeof g=="function"&&t.removeEventListener(i,g,m),typeof c=="function")){typeof g!="function"&&g!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(i,c,m);break e}s in t?t[s]=c:c===!0?t.setAttribute(s,""):Ve(t,s,c)}}}function Mn(t,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ut("error",t),ut("load",t);var c=!1,m=!1,g;for(g in s)if(s.hasOwnProperty(g)){var E=s[g];if(E!=null)switch(g){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Bt(t,i,g,E,s,null)}}m&&Bt(t,i,"srcSet",s.srcSet,s,null),c&&Bt(t,i,"src",s.src,s,null);return;case"input":ut("invalid",t);var S=g=E=m=null,L=null,V=null;for(c in s)if(s.hasOwnProperty(c)){var re=s[c];if(re!=null)switch(c){case"name":m=re;break;case"type":E=re;break;case"checked":L=re;break;case"defaultChecked":V=re;break;case"value":g=re;break;case"defaultValue":S=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:Bt(t,i,c,re,s,null)}}pa(t,g,S,L,V,E,m,!1);return;case"select":ut("invalid",t),c=E=g=null;for(m in s)if(s.hasOwnProperty(m)&&(S=s[m],S!=null))switch(m){case"value":g=S;break;case"defaultValue":E=S;break;case"multiple":c=S;default:Bt(t,i,m,S,s,null)}i=g,s=E,t.multiple=!!c,i!=null?zn(t,!!c,i,!1):s!=null&&zn(t,!!c,s,!0);return;case"textarea":ut("invalid",t),g=m=c=null;for(E in s)if(s.hasOwnProperty(E)&&(S=s[E],S!=null))switch(E){case"value":c=S;break;case"defaultValue":m=S;break;case"children":g=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Bt(t,i,E,S,s,null)}Qa(t,c,m,g);return;case"option":for(L in s)if(s.hasOwnProperty(L)&&(c=s[L],c!=null))switch(L){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Bt(t,i,L,c,s,null)}return;case"dialog":ut("beforetoggle",t),ut("toggle",t),ut("cancel",t),ut("close",t);break;case"iframe":case"object":ut("load",t);break;case"video":case"audio":for(c=0;c<Cl.length;c++)ut(Cl[c],t);break;case"image":ut("error",t),ut("load",t);break;case"details":ut("toggle",t);break;case"embed":case"source":case"link":ut("error",t),ut("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in s)if(s.hasOwnProperty(V)&&(c=s[V],c!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Bt(t,i,V,c,s,null)}return;default:if(Ci(i)){for(re in s)s.hasOwnProperty(re)&&(c=s[re],c!==void 0&&xf(t,i,re,c,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(c=s[S],c!=null&&Bt(t,i,S,c,s,null))}function Ak(t,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,g=null,E=null,S=null,L=null,V=null,re=null;for(W in s){var ce=s[W];if(s.hasOwnProperty(W)&&ce!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":L=ce;default:c.hasOwnProperty(W)||Bt(t,i,W,null,c,ce)}}for(var Q in c){var W=c[Q];if(ce=s[Q],c.hasOwnProperty(Q)&&(W!=null||ce!=null))switch(Q){case"type":g=W;break;case"name":m=W;break;case"checked":V=W;break;case"defaultChecked":re=W;break;case"value":E=W;break;case"defaultValue":S=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:W!==ce&&Bt(t,i,Q,W,c,ce)}}Ks(t,E,S,L,V,re,g,m);return;case"select":W=E=S=Q=null;for(g in s)if(L=s[g],s.hasOwnProperty(g)&&L!=null)switch(g){case"value":break;case"multiple":W=L;default:c.hasOwnProperty(g)||Bt(t,i,g,null,c,L)}for(m in c)if(g=c[m],L=s[m],c.hasOwnProperty(m)&&(g!=null||L!=null))switch(m){case"value":Q=g;break;case"defaultValue":S=g;break;case"multiple":E=g;default:g!==L&&Bt(t,i,m,g,c,L)}i=S,s=E,c=W,Q!=null?zn(t,!!s,Q,!1):!!c!=!!s&&(i!=null?zn(t,!!s,i,!0):zn(t,!!s,s?[]:"",!1));return;case"textarea":W=Q=null;for(S in s)if(m=s[S],s.hasOwnProperty(S)&&m!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Bt(t,i,S,null,c,m)}for(E in c)if(m=c[E],g=s[E],c.hasOwnProperty(E)&&(m!=null||g!=null))switch(E){case"value":Q=m;break;case"defaultValue":W=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==g&&Bt(t,i,E,m,c,g)}wo(t,Q,W);return;case"option":for(var ze in s)if(Q=s[ze],s.hasOwnProperty(ze)&&Q!=null&&!c.hasOwnProperty(ze))switch(ze){case"selected":t.selected=!1;break;default:Bt(t,i,ze,null,c,Q)}for(L in c)if(Q=c[L],W=s[L],c.hasOwnProperty(L)&&Q!==W&&(Q!=null||W!=null))switch(L){case"selected":t.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Bt(t,i,L,Q,c,W)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ge in s)Q=s[Ge],s.hasOwnProperty(Ge)&&Q!=null&&!c.hasOwnProperty(Ge)&&Bt(t,i,Ge,null,c,Q);for(V in c)if(Q=c[V],W=s[V],c.hasOwnProperty(V)&&Q!==W&&(Q!=null||W!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,i));break;default:Bt(t,i,V,Q,c,W)}return;default:if(Ci(i)){for(var Ut in s)Q=s[Ut],s.hasOwnProperty(Ut)&&Q!==void 0&&!c.hasOwnProperty(Ut)&&xf(t,i,Ut,void 0,c,Q);for(re in c)Q=c[re],W=s[re],!c.hasOwnProperty(re)||Q===W||Q===void 0&&W===void 0||xf(t,i,re,Q,c,W);return}}for(var q in s)Q=s[q],s.hasOwnProperty(q)&&Q!=null&&!c.hasOwnProperty(q)&&Bt(t,i,q,null,c,Q);for(ce in c)Q=c[ce],W=s[ce],!c.hasOwnProperty(ce)||Q===W||Q==null&&W==null||Bt(t,i,ce,Q,c,W)}function Y0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ok(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var m=s[c],g=m.transferSize,E=m.initiatorType,S=m.duration;if(g&&S&&Y0(E)){for(E=0,S=m.responseEnd,c+=1;c<s.length;c++){var L=s[c],V=L.startTime;if(V>S)break;var re=L.transferSize,ce=L.initiatorType;re&&Y0(ce)&&(L=L.responseEnd,E+=re*(L<S?1:(S-V)/(L-V)))}if(--c,i+=8*(g+E)/(m.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var vf=null,Ef=null;function Ec(t){return t.nodeType===9?t:t.ownerDocument}function Q0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function X0(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function _f(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var kf=null;function Mk(){var t=window.event;return t&&t.type==="popstate"?t===kf?!1:(kf=t,!0):(kf=null,!1)}var Z0=typeof setTimeout=="function"?setTimeout:void 0,Dk=typeof clearTimeout=="function"?clearTimeout:void 0,W0=typeof Promise=="function"?Promise:void 0,Lk=typeof queueMicrotask=="function"?queueMicrotask:typeof W0<"u"?function(t){return W0.resolve(null).then(t).catch(jk)}:Z0;function jk(t){setTimeout(function(){throw t})}function Ki(t){return t==="head"}function J0(t,i){var s=i,c=0;do{var m=s.nextSibling;if(t.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"||s==="/&"){if(c===0){t.removeChild(m),ws(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")zl(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,zl(s);for(var g=s.firstChild;g;){var E=g.nextSibling,S=g.nodeName;g[rt]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=E}}else s==="body"&&zl(t.ownerDocument.body);s=m}while(s);ws(i)}function eb(t,i){var s=t;t=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=c}while(s)}function wf(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":wf(s),Ot(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function Ik(t,i,s,c){for(;t.nodeType===1;){var m=s;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[rt])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==m.rel||t.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||t.getAttribute("title")!==(m.title==null?null:m.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(m.src==null?null:m.src)||t.getAttribute("type")!==(m.type==null?null:m.type)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var g=m.name==null?null:""+m.name;if(m.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Sr(t.nextSibling),t===null)break}return null}function Bk(t,i,s){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=Sr(t.nextSibling),t===null))return null;return t}function tb(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Sr(t.nextSibling),t===null))return null;return t}function Sf(t){return t.data==="$?"||t.data==="$~"}function Nf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Uk(t,i){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Sr(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var Cf=null;function nb(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(i===0)return Sr(t.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}t=t.nextSibling}return null}function rb(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return t;i--}else s!=="/$"&&s!=="/&"||i++}t=t.previousSibling}return null}function ib(t,i,s){switch(i=Ec(s),t){case"html":if(t=i.documentElement,!t)throw Error(a(452));return t;case"head":if(t=i.head,!t)throw Error(a(453));return t;case"body":if(t=i.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function zl(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ot(t)}var Nr=new Map,ab=new Set;function _c(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var vi=te.d;te.d={f:Fk,r:Pk,D:Hk,C:qk,L:$k,m:Gk,X:Vk,S:Kk,M:Yk};function Fk(){var t=vi.f(),i=hc();return t||i}function Pk(t){var i=Yt(t);i!==null&&i.tag===5&&i.type==="form"?_g(i):vi.r(t)}var Es=typeof document>"u"?null:document;function sb(t,i,s){var c=Es;if(c&&typeof i=="string"&&i){var m=Yn(i);m='link[rel="'+t+'"][href="'+m+'"]',typeof s=="string"&&(m+='[crossorigin="'+s+'"]'),ab.has(m)||(ab.add(m),t={rel:t,crossOrigin:s,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),Mn(i,"link",t),jt(i),c.head.appendChild(i)))}}function Hk(t){vi.D(t),sb("dns-prefetch",t,null)}function qk(t,i){vi.C(t,i),sb("preconnect",t,i)}function $k(t,i,s){vi.L(t,i,s);var c=Es;if(c&&t&&i){var m='link[rel="preload"][as="'+Yn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(m+='[imagesrcset="'+Yn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(m+='[imagesizes="'+Yn(s.imageSizes)+'"]')):m+='[href="'+Yn(t)+'"]';var g=m;switch(i){case"style":g=_s(t);break;case"script":g=ks(t)}Nr.has(g)||(t=y({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:t,as:i},s),Nr.set(g,t),c.querySelector(m)!==null||i==="style"&&c.querySelector(Rl(g))||i==="script"&&c.querySelector(Al(g))||(i=c.createElement("link"),Mn(i,"link",t),jt(i),c.head.appendChild(i)))}}function Gk(t,i){vi.m(t,i);var s=Es;if(s&&t){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Yn(c)+'"][href="'+Yn(t)+'"]',g=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=ks(t)}if(!Nr.has(g)&&(t=y({rel:"modulepreload",href:t},i),Nr.set(g,t),s.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Al(g)))return}c=s.createElement("link"),Mn(c,"link",t),jt(c),s.head.appendChild(c)}}}function Kk(t,i,s){vi.S(t,i,s);var c=Es;if(c&&t){var m=sn(c).hoistableStyles,g=_s(t);i=i||"default";var E=m.get(g);if(!E){var S={loading:0,preload:null};if(E=c.querySelector(Rl(g)))S.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":i},s),(s=Nr.get(g))&&Tf(t,s);var L=E=c.createElement("link");jt(L),Mn(L,"link",t),L._p=new Promise(function(V,re){L.onload=V,L.onerror=re}),L.addEventListener("load",function(){S.loading|=1}),L.addEventListener("error",function(){S.loading|=2}),S.loading|=4,kc(E,i,c)}E={type:"stylesheet",instance:E,count:1,state:S},m.set(g,E)}}}function Vk(t,i){vi.X(t,i);var s=Es;if(s&&t){var c=sn(s).hoistableScripts,m=ks(t),g=c.get(m);g||(g=s.querySelector(Al(m)),g||(t=y({src:t,async:!0},i),(i=Nr.get(m))&&zf(t,i),g=s.createElement("script"),jt(g),Mn(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function Yk(t,i){vi.M(t,i);var s=Es;if(s&&t){var c=sn(s).hoistableScripts,m=ks(t),g=c.get(m);g||(g=s.querySelector(Al(m)),g||(t=y({src:t,async:!0,type:"module"},i),(i=Nr.get(m))&&zf(t,i),g=s.createElement("script"),jt(g),Mn(g,"link",t),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(m,g))}}function lb(t,i,s,c){var m=(m=be.current)?_c(m):null;if(!m)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=_s(s.href),s=sn(m).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=_s(s.href);var g=sn(m).hoistableStyles,E=g.get(t);if(E||(m=m.ownerDocument||m,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,E),(g=m.querySelector(Rl(t)))&&!g._p&&(E.instance=g,E.state.loading=5),Nr.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Nr.set(t,s),g||Qk(m,t,s,E.state))),i&&c===null)throw Error(a(528,""));return E}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=ks(s),s=sn(m).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function _s(t){return'href="'+Yn(t)+'"'}function Rl(t){return'link[rel="stylesheet"]['+t+"]"}function ob(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function Qk(t,i,s,c){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=t.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),Mn(i,"link",s),jt(i),t.head.appendChild(i))}function ks(t){return'[src="'+Yn(t)+'"]'}function Al(t){return"script[async]"+t}function cb(t,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=t.querySelector('style[data-href~="'+Yn(s.href)+'"]');if(c)return i.instance=c,jt(c),c;var m=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),jt(c),Mn(c,"style",m),kc(c,s.precedence,t),i.instance=c;case"stylesheet":m=_s(s.href);var g=t.querySelector(Rl(m));if(g)return i.state.loading|=4,i.instance=g,jt(g),g;c=ob(s),(m=Nr.get(m))&&Tf(c,m),g=(t.ownerDocument||t).createElement("link"),jt(g);var E=g;return E._p=new Promise(function(S,L){E.onload=S,E.onerror=L}),Mn(g,"link",c),i.state.loading|=4,kc(g,s.precedence,t),i.instance=g;case"script":return g=ks(s.src),(m=t.querySelector(Al(g)))?(i.instance=m,jt(m),m):(c=s,(m=Nr.get(g))&&(c=y({},s),zf(c,m)),t=t.ownerDocument||t,m=t.createElement("script"),jt(m),Mn(m,"link",c),t.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,kc(c,s.precedence,t));return i.instance}function kc(t,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,g=m,E=0;E<c.length;E++){var S=c[E];if(S.dataset.precedence===i)g=S;else if(g!==m)break}g?g.parentNode.insertBefore(t,g.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(t,i.firstChild))}function Tf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function zf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var wc=null;function ub(t,i,s){if(wc===null){var c=new Map,m=wc=new Map;m.set(s,c)}else m=wc,c=m.get(s),c||(c=new Map,m.set(s,c));if(c.has(t))return c;for(c.set(t,null),s=s.getElementsByTagName(t),m=0;m<s.length;m++){var g=s[m];if(!(g[rt]||g[ye]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var E=g.getAttribute(i)||"";E=t+E;var S=c.get(E);S?S.push(g):c.set(E,[g])}}return c}function db(t,i,s){t=t.ownerDocument||t,t.head.insertBefore(s,i==="title"?t.querySelector("head > title"):null)}function Xk(t,i,s){if(s===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function fb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Zk(t,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var m=_s(c.href),g=i.querySelector(Rl(m));if(g){i=g._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=Sc.bind(t),i.then(t,t)),s.state.loading|=4,s.instance=g,jt(g);return}g=i.ownerDocument||i,c=ob(c),(m=Nr.get(m))&&Tf(c,m),g=g.createElement("link"),jt(g);var E=g;E._p=new Promise(function(S,L){E.onload=S,E.onerror=L}),Mn(g,"link",c),s.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Sc.bind(t),i.addEventListener("load",s),i.addEventListener("error",s))}}var Rf=0;function Wk(t,i){return t.stylesheets&&t.count===0&&Cc(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var c=setTimeout(function(){if(t.stylesheets&&Cc(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+i);0<t.imgBytes&&Rf===0&&(Rf=62500*Ok());var m=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Cc(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Rf?50:800)+i);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Nc=null;function Cc(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Nc=new Map,i.forEach(Jk,t),Nc=null,Sc.call(t))}function Jk(t,i){if(!(i.state.loading&4)){var s=Nc.get(t);if(s)var c=s.get(null);else{s=new Map,Nc.set(t,s);for(var m=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<m.length;g++){var E=m[g];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(s.set(E.dataset.precedence,E),c=E)}c&&s.set(null,c)}m=i.instance,E=m.getAttribute("data-precedence"),g=s.get(E)||c,g===c&&s.set(null,m),s.set(E,m),this.count++,c=Sc.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),g?g.parentNode.insertBefore(m,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(m,t.firstChild)),i.state.loading|=4}}var Ol={$$typeof:R,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function ew(t,i,s,c,m,g,E,S,L){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=zt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zt(0),this.hiddenUpdates=zt(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=g,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function hb(t,i,s,c,m,g,E,S,L,V,re,ce){return t=new ew(t,i,s,E,L,V,re,ce,S),i=1,g===!0&&(i|=24),g=lr(3,null,null,i),t.current=g,g.stateNode=t,i=od(),i.refCount++,t.pooledCache=i,i.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:i},fd(g),t}function mb(t){return t?(t=es,t):es}function pb(t,i,s,c,m,g){m=mb(m),c.context===null?c.context=m:c.pendingContext=m,c=Li(i),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=ji(t,c,i),s!==null&&(er(s,t,i),ul(s,t,i))}function gb(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<i?s:i}}function Af(t,i){gb(t,i),(t=t.alternate)&&gb(t,i)}function bb(t){if(t.tag===13||t.tag===31){var i=xa(t,67108864);i!==null&&er(i,t,67108864),Af(t,67108864)}}function yb(t){if(t.tag===13||t.tag===31){var i=fr();i=U(i);var s=xa(t,i);s!==null&&er(s,t,i),Af(t,i)}}var Tc=!0;function tw(t,i,s,c){var m=B.T;B.T=null;var g=te.p;try{te.p=2,Of(t,i,s,c)}finally{te.p=g,B.T=m}}function nw(t,i,s,c){var m=B.T;B.T=null;var g=te.p;try{te.p=8,Of(t,i,s,c)}finally{te.p=g,B.T=m}}function Of(t,i,s,c){if(Tc){var m=Mf(c);if(m===null)yf(t,i,c,zc,s),vb(t,c);else if(iw(m,t,i,s,c))c.stopPropagation();else if(vb(t,c),i&4&&-1<rw.indexOf(t)){for(;m!==null;){var g=Yt(m);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var E=Nn(g.pendingLanes);if(E!==0){var S=g;for(S.pendingLanes|=2,S.entangledLanes|=2;E;){var L=1<<31-kt(E);S.entanglements[1]|=L,E&=~L}Vr(g),(Ct&6)===0&&(dc=Vt()+500,Nl(0))}}break;case 31:case 13:S=xa(g,2),S!==null&&er(S,g,2),hc(),Af(g,2)}if(g=Mf(c),g===null&&yf(t,i,c,zc,s),g===m)break;m=g}m!==null&&c.stopPropagation()}else yf(t,i,c,null,s)}}function Mf(t){return t=We(t),Df(t)}var zc=null;function Df(t){if(zc=null,t=xt(t),t!==null){var i=o(t);if(i===null)t=null;else{var s=i.tag;if(s===13){if(t=u(i),t!==null)return t;t=null}else if(s===31){if(t=d(i),t!==null)return t;t=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return zc=t,null}function xb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Vn()){case ne:return 2;case ge:return 8;case Fe:case Qe:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Lf=!1,Vi=null,Yi=null,Qi=null,Ml=new Map,Dl=new Map,Xi=[],rw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function vb(t,i){switch(t){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":Yi=null;break;case"mouseover":case"mouseout":Qi=null;break;case"pointerover":case"pointerout":Ml.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(i.pointerId)}}function Ll(t,i,s,c,m,g){return t===null||t.nativeEvent!==g?(t={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[m]},i!==null&&(i=Yt(i),i!==null&&bb(i)),t):(t.eventSystemFlags|=c,i=t.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),t)}function iw(t,i,s,c,m){switch(i){case"focusin":return Vi=Ll(Vi,t,i,s,c,m),!0;case"dragenter":return Yi=Ll(Yi,t,i,s,c,m),!0;case"mouseover":return Qi=Ll(Qi,t,i,s,c,m),!0;case"pointerover":var g=m.pointerId;return Ml.set(g,Ll(Ml.get(g)||null,t,i,s,c,m)),!0;case"gotpointercapture":return g=m.pointerId,Dl.set(g,Ll(Dl.get(g)||null,t,i,s,c,m)),!0}return!1}function Eb(t){var i=xt(t.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){t.blockedOn=i,me(t.priority,function(){yb(s)});return}}else if(i===31){if(i=d(s),i!==null){t.blockedOn=i,me(t.priority,function(){yb(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Rc(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var s=Mf(t.nativeEvent);if(s===null){s=t.nativeEvent;var c=new s.constructor(s.type,s);Le=c,s.target.dispatchEvent(c),Le=null}else return i=Yt(s),i!==null&&bb(i),t.blockedOn=s,!1;i.shift()}return!0}function _b(t,i,s){Rc(t)&&s.delete(i)}function aw(){Lf=!1,Vi!==null&&Rc(Vi)&&(Vi=null),Yi!==null&&Rc(Yi)&&(Yi=null),Qi!==null&&Rc(Qi)&&(Qi=null),Ml.forEach(_b),Dl.forEach(_b)}function Ac(t,i){t.blockedOn===i&&(t.blockedOn=null,Lf||(Lf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,aw)))}var Oc=null;function kb(t){Oc!==t&&(Oc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Oc===t&&(Oc=null);for(var i=0;i<t.length;i+=3){var s=t[i],c=t[i+1],m=t[i+2];if(typeof c!="function"){if(Df(c||s)===null)continue;break}var g=Yt(s);g!==null&&(t.splice(i,3),i-=3,Od(g,{pending:!0,data:m,method:s.method,action:c},c,m))}}))}function ws(t){function i(L){return Ac(L,t)}Vi!==null&&Ac(Vi,t),Yi!==null&&Ac(Yi,t),Qi!==null&&Ac(Qi,t),Ml.forEach(i),Dl.forEach(i);for(var s=0;s<Xi.length;s++){var c=Xi[s];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Xi.length&&(s=Xi[0],s.blockedOn===null);)Eb(s),s.blockedOn===null&&Xi.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var m=s[c],g=s[c+1],E=m[we]||null;if(typeof g=="function")E||kb(s);else if(E){var S=null;if(g&&g.hasAttribute("formAction")){if(m=g,E=g[we]||null)S=E.formAction;else if(Df(m)!==null)continue}else S=E.action;typeof S=="function"?s[c+1]=S:(s.splice(c,3),c-=3),kb(s)}}}function wb(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(E){return m=E})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function jf(t){this._internalRoot=t}Mc.prototype.render=jf.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=fr();pb(s,c,t,i,null,null)},Mc.prototype.unmount=jf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;pb(t.current,2,null,t,null,null),hc(),i[Ne]=null}};function Mc(t){this._internalRoot=t}Mc.prototype.unstable_scheduleHydration=function(t){if(t){var i=ue();t={blockedOn:null,target:t,priority:i};for(var s=0;s<Xi.length&&i!==0&&i<Xi[s].priority;s++);Xi.splice(s,0,t),s===0&&Eb(t)}};var Sb=n.version;if(Sb!=="19.2.4")throw Error(a(527,Sb,"19.2.4"));te.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(i),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var sw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dc.isDisabled&&Dc.supportsFiber)try{an=Dc.inject(sw),Wt=Dc}catch{}}return Il.createRoot=function(t,i){if(!l(t))throw Error(a(299));var s=!1,c="",m=Og,g=Mg,E=Dg;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(E=i.onRecoverableError)),i=hb(t,1,!1,null,null,s,c,null,m,g,E,wb),t[Ne]=i.current,bf(t),new jf(i)},Il.hydrateRoot=function(t,i,s){if(!l(t))throw Error(a(299));var c=!1,m="",g=Og,E=Mg,S=Dg,L=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(L=s.formState)),i=hb(t,1,!0,i,s??null,c,m,L,g,E,S,wb),i.context=mb(null),s=i.current,c=fr(),c=U(c),m=Li(c),m.callback=null,ji(s,m,c),s=c,i.current.lanes=s,wt(i,s),Vr(i),t[Ne]=i.current,bf(t),new Mc(i)},Il.version="19.2.4",Il}var Lb;function yw(){if(Lb)return Uf.exports;Lb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Uf.exports=bw(),Uf.exports}var xw=yw();/**
50
- * react-router v7.13.1
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var Qx=e=>{throw TypeError(e)},vw=(e,n,r)=>n.has(e)||Qx("Cannot "+r),qf=(e,n,r)=>(vw(e,n,"read from private field"),r?r.call(e):n.get(e)),Ew=(e,n,r)=>n.has(e)?Qx("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),jb="popstate";function Ib(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function _w(e={}){function n(a,l){let o=l.state?.masked,{pathname:u,search:d,hash:f}=o||a.location;return io("",{pathname:u,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:Xr(l)}return ww(n,r,null,e)}function at(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function xn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function kw(){return Math.random().toString(36).substring(2,10)}function Bb(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function io(e,n,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?wi(n):n,state:r,key:n&&n.key||a||kw(),unstable_mask:l}}function Xr({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function wi(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function ww(e,n,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,u=l.history,d="POP",f=null,h=b();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function b(){return(u.state||{idx:null}).idx}function y(){d="POP";let w=b(),C=w==null?null:w-h;h=w,f&&f({action:d,location:k.location,delta:C})}function x(w,C){d="PUSH";let j=Ib(w)?w:io(k.location,w,C);h=b()+1;let R=Bb(j,h),H=k.createHref(j.unstable_mask||j);try{u.pushState(R,"",H)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(H)}o&&f&&f({action:d,location:k.location,delta:1})}function v(w,C){d="REPLACE";let j=Ib(w)?w:io(k.location,w,C);h=b();let R=Bb(j,h),H=k.createHref(j.unstable_mask||j);u.replaceState(R,"",H),o&&f&&f({action:d,location:k.location,delta:0})}function _(w){return Xx(w)}let k={get action(){return d},get location(){return e(l,u)},listen(w){if(f)throw new Error("A history only accepts one active listener");return l.addEventListener(jb,y),f=w,()=>{l.removeEventListener(jb,y),f=null}},createHref(w){return n(l,w)},createURL:_,encodeLocation(w){let C=_(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:x,replace:v,go(w){return u.go(w)}};return k}function Xx(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),at(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Xr(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var Yl,Ub=class{constructor(e){if(Ew(this,Yl,new Map),e)for(let[n,r]of e)this.set(n,r)}get(e){if(qf(this,Yl).has(e))return qf(this,Yl).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,n){qf(this,Yl).set(e,n)}};Yl=new WeakMap;var Sw=new Set(["lazy","caseSensitive","path","id","index","children"]);function Nw(e){return Sw.has(e)}var Cw=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Tw(e){return Cw.has(e)}function zw(e){return e.index===!0}function ao(e,n,r=[],a={},l=!1){return e.map((o,u)=>{let d=[...r,String(u)],f=typeof o.id=="string"?o.id:d.join("-");if(at(o.index!==!0||!o.children,"Cannot specify children on an index route"),at(l||!a[f],`Found a route id collision on id "${f}". Route id's must be globally unique within Data Router usages`),zw(o)){let h={...o,id:f};return a[f]=Fb(h,n(h)),h}else{let h={...o,id:f,children:void 0};return a[f]=Fb(h,n(h)),o.children&&(h.children=ao(o.children,n,d,a,l)),h}})}function Fb(e,n){return Object.assign(e,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...e.lazy,...n.lazy}}:{}})}function ra(e,n,r="/"){return Ql(e,n,r,!1)}function Ql(e,n,r,a){let l=typeof n=="string"?wi(n):n,o=Ar(l.pathname||"/",r);if(o==null)return null;let u=Zx(e);Aw(u);let d=null;for(let f=0;d==null&&f<u.length;++f){let h=Hw(o);d=Fw(u[f],h,a)}return d}function Rw(e,n){let{route:r,pathname:a,params:l}=e;return{id:r.id,pathname:a,params:l,data:n[r.id],loaderData:n[r.id],handle:r.handle}}function Zx(e,n=[],r=[],a="",l=!1){let o=(u,d,f=l,h)=>{let b={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&f)return;at(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let y=Br([a,b.relativePath]),x=r.concat(b);u.children&&u.children.length>0&&(at(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Zx(u.children,n,x,y,f)),!(u.path==null&&!u.index)&&n.push({path:y,score:Bw(y,u.index),routesMeta:x})};return e.forEach((u,d)=>{if(u.path===""||!u.path?.includes("?"))o(u,d);else for(let f of Wx(u.path))o(u,d,!0,f)}),n}function Wx(e){let n=e.split("/");if(n.length===0)return[];let[r,...a]=n,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let u=Wx(a.join("/")),d=[];return d.push(...u.map(f=>f===""?o:[o,f].join("/"))),l&&d.push(...u),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function Aw(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:Uw(n.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ow=/^:[\w-]+$/,Mw=3,Dw=2,Lw=1,jw=10,Iw=-2,Pb=e=>e==="*";function Bw(e,n){let r=e.split("/"),a=r.length;return r.some(Pb)&&(a+=Iw),n&&(a+=Dw),r.filter(l=>!Pb(l)).reduce((l,o)=>l+(Ow.test(o)?Mw:o===""?Lw:jw),a)}function Uw(e,n){return e.length===n.length&&e.slice(0,-1).every((a,l)=>a===n[l])?e[e.length-1]-n[n.length-1]:0}function Fw(e,n,r=!1){let{routesMeta:a}=e,l={},o="/",u=[];for(let d=0;d<a.length;++d){let f=a[d],h=d===a.length-1,b=o==="/"?n:n.slice(o.length)||"/",y=ou({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},b),x=f.route;if(!y&&h&&r&&!a[a.length-1].route.index&&(y=ou({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},b)),!y)return null;Object.assign(l,y.params),u.push({params:l,pathname:Br([o,y.pathname]),pathnameBase:Gw(Br([o,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(o=Br([o,y.pathnameBase]))}return u}function ou(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Pw(e.path,e.caseSensitive,e.end),l=n.match(r);if(!l)return null;let o=l[0],u=o.replace(/(.)\/+$/,"$1"),d=l.slice(1);return{params:a.reduce((h,{paramName:b,isOptional:y},x)=>{if(b==="*"){let _=d[x]||"";u=o.slice(0,o.length-_.length).replace(/(.)\/+$/,"$1")}const v=d[x];return y&&!v?h[b]=void 0:h[b]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:u,pattern:e}}function Pw(e,n=!1,r=!0){xn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f,h,b)=>{if(a.push({paramName:d,isOptional:f!=null}),f){let y=b.charAt(h+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),a]}function Hw(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return xn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Ar(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function qw({basename:e,pathname:n}){return n==="/"?e:Br([e,n])}var Jx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tm=e=>Jx.test(e);function $w(e,n="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?wi(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=Hb(r.substring(1),"/"):o=Hb(r,n)):o=n,{pathname:o,search:Kw(a),hash:Vw(l)}}function Hb(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function $f(e,n,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ev(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function nm(e){let n=ev(e);return n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase)}function _u(e,n,r,a=!1){let l;typeof e=="string"?l=wi(e):(l={...e},at(!l.pathname||!l.pathname.includes("?"),$f("?","pathname","search",l)),at(!l.pathname||!l.pathname.includes("#"),$f("#","pathname","hash",l)),at(!l.search||!l.search.includes("#"),$f("#","search","hash",l)));let o=e===""||l.pathname==="",u=o?"/":l.pathname,d;if(u==null)d=r;else{let y=n.length-1;if(!a&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),y-=1;l.pathname=x.join("/")}d=y>=0?n[y]:"/"}let f=$w(l,d),h=u&&u!=="/"&&u.endsWith("/"),b=(o||u===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(h||b)&&(f.pathname+="/"),f}var Br=e=>e.join("/").replace(/\/\/+/g,"/"),Gw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mo=class{constructor(e,n,r,a=!1){this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function so(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function po(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var tv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nv(e,n){let r=e;if(typeof r!="string"||!Jx.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(tv)try{let o=new URL(window.location.href),u=r.startsWith("//")?new URL(o.protocol+r):new URL(r),d=Ar(u.pathname,n);u.origin===o.origin&&d!=null?r=d+u.search+u.hash:l=!0}catch{xn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}var sa=Symbol("Uninstrumented");function Yw(e,n){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:n.id,index:n.index,path:n.path,instrument(o){let u=Object.keys(r);for(let d of u)o[d]&&r[d].push(o[d])}}));let a={};if(typeof n.lazy=="function"&&r.lazy.length>0){let l=Os(r.lazy,n.lazy,()=>{});l&&(a.lazy=l)}if(typeof n.lazy=="object"){let l=n.lazy;["middleware","loader","action"].forEach(o=>{let u=l[o],d=r[`lazy.${o}`];if(typeof u=="function"&&d.length>0){let f=Os(d,u,()=>{});f&&(a.lazy=Object.assign(a.lazy||{},{[o]:f}))}})}return["loader","action"].forEach(l=>{let o=n[l];if(typeof o=="function"&&r[l].length>0){let u=o[sa]??o,d=Os(r[l],u,(...f)=>qb(f[0]));d&&(l==="loader"&&u.hydrate===!0&&(d.hydrate=!0),d[sa]=u,a[l]=d)}}),n.middleware&&n.middleware.length>0&&r.middleware.length>0&&(a.middleware=n.middleware.map(l=>{let o=l[sa]??l,u=Os(r.middleware,o,(...d)=>qb(d[0]));return u?(u[sa]=o,u):l})),a}function Qw(e,n){let r={navigate:[],fetch:[]};if(n.forEach(a=>a({instrument(l){let o=Object.keys(l);for(let u of o)l[u]&&r[u].push(l[u])}})),r.navigate.length>0){let a=e.navigate[sa]??e.navigate,l=Os(r.navigate,a,(...o)=>{let[u,d]=o;return{to:typeof u=="number"||typeof u=="string"?u:u?Xr(u):".",...$b(e,d??{})}});l&&(l[sa]=a,e.navigate=l)}if(r.fetch.length>0){let a=e.fetch[sa]??e.fetch,l=Os(r.fetch,a,(...o)=>{let[u,,d,f]=o;return{href:d??".",fetcherKey:u,...$b(e,f??{})}});l&&(l[sa]=a,e.fetch=l)}return e}function Os(e,n,r){return e.length===0?null:async(...a)=>{let l=await rv(e,r(...a),()=>n(...a),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function rv(e,n,r,a){let l=e[a],o;if(l){let u,d=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=rv(e,n,r,a-1),o=await u,at(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await l(d,n)}catch(f){console.error("An instrumentation function threw an error:",f)}u||await d(),await u}else try{o={type:"success",value:await r()}}catch(u){o={type:"error",value:u}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function qb(e){let{request:n,context:r,params:a,unstable_pattern:l}=e;return{request:Xw(n),params:{...a},unstable_pattern:l,context:Zw(r)}}function $b(e,n){return{currentUrl:Xr(e.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function Xw(e){return{method:e.method,url:e.url,headers:{get:(...n)=>e.headers.get(...n)}}}function Zw(e){if(Jw(e)){let n={...e};return Object.freeze(n),n}else return{get:n=>e.get(n)}}var Ww=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Jw(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===Ww}var iv=["POST","PUT","PATCH","DELETE"],eS=new Set(iv),tS=["GET",...iv],nS=new Set(tS),av=new Set([301,302,303,307,308]),rS=new Set([307,308]),Gf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},iS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},aS=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),sv="remix-router-transitions",lv=Symbol("ResetLoaderData");function sS(e){const n=e.window?e.window:typeof window<"u"?window:void 0,r=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";at(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],l=e.mapRouteProperties||aS,o=l;if(e.unstable_instrumentations){let D=e.unstable_instrumentations;o=U=>({...l(U),...Yw(D.map(Y=>Y.route).filter(Boolean),U)})}let u={},d=ao(e.routes,o,void 0,u),f,h=e.basename||"/";h.startsWith("/")||(h=`/${h}`);let b=e.dataStrategy||dS,y={...e.future},x=null,v=new Set,_=null,k=null,w=null,C=e.hydrationData!=null,j=ra(d,e.history.location,h),R=!1,H=null,$,O;if(j==null&&!e.patchRoutesOnNavigation){let D=Cr(404,{pathname:e.history.location.pathname}),{matches:U,route:Y}=Lc(d);$=!0,O=!$,j=U,H={[Y.id]:D}}else if(j&&!e.hydrationData&&zt(j,d,e.history.location.pathname).active&&(j=null),j)if(j.some(D=>D.route.lazy))$=!1,O=!$;else if(!j.some(D=>rm(D.route)))$=!0,O=!$;else{let D=e.hydrationData?e.hydrationData.loaderData:null,U=e.hydrationData?e.hydrationData.errors:null,Y=j;if(U){let ue=j.findIndex(me=>U[me.route.id]!==void 0);Y=Y.slice(0,ue+1)}O=!1,$=Y.every(ue=>{let me=ov(ue.route,D,U);return O=O||me.renderFallback,!me.shouldLoad})}else{$=!1,O=!$,j=[];let D=zt(null,d,e.history.location.pathname);D.active&&D.matches&&(R=!0,j=D.matches)}let Z,A={historyAction:e.history.action,location:e.history.location,matches:j,initialized:$,renderFallback:O,navigation:Gf,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||H,fetchers:new Map,blockers:new Map},ae="POP",P=null,J=!1,ee,ve=!1,le=new Map,X=null,B=!1,te=!1,oe=new Set,fe=new Map,T=0,M=-1,G=new Map,z=new Set,he=new Map,Ee=new Map,be=new Set,He=new Map,st,Be=null;function Zt(){if(x=e.history.listen(({action:D,location:U,delta:Y})=>{if(st){st(),st=void 0;return}xn(He.size===0||Y!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ue=Hr({currentLocation:A.location,nextLocation:U,historyAction:D});if(ue&&Y!=null){let me=new Promise(Ce=>{st=Ce});e.history.go(Y*-1),Mr(ue,{state:"blocked",location:U,proceed(){Mr(ue,{state:"proceeding",proceed:void 0,reset:void 0,location:U}),me.then(()=>e.history.go(Y))},reset(){let Ce=new Map(A.blockers);Ce.set(ue,Bl),At({blockers:Ce})}}),P?.resolve(),P=null;return}return vn(D,U)}),r){zS(n,le);let D=()=>RS(n,le);n.addEventListener("pagehide",D),X=()=>n.removeEventListener("pagehide",D)}return A.initialized||vn("POP",A.location,{initialHydration:!0}),Z}function un(){x&&x(),X&&X(),v.clear(),ee&&ee.abort(),A.fetchers.forEach((D,U)=>an(U)),A.blockers.forEach((D,U)=>Pr(U))}function Ln(D){return v.add(D),()=>v.delete(D)}function At(D,U={}){D.matches&&(D.matches=D.matches.map(me=>{let Ce=u[me.route.id],ye=me.route;return ye.element!==Ce.element||ye.errorElement!==Ce.errorElement||ye.hydrateFallbackElement!==Ce.hydrateFallbackElement?{...me,route:Ce}:me})),A={...A,...D};let Y=[],ue=[];A.fetchers.forEach((me,Ce)=>{me.state==="idle"&&(be.has(Ce)?Y.push(Ce):ue.push(Ce))}),be.forEach(me=>{!A.fetchers.has(me)&&!fe.has(me)&&Y.push(me)}),[...v].forEach(me=>me(A,{deletedFetchers:Y,newErrors:D.errors??null,viewTransitionOpts:U.viewTransitionOpts,flushSync:U.flushSync===!0})),Y.forEach(me=>an(me)),ue.forEach(me=>A.fetchers.delete(me))}function Kt(D,U,{flushSync:Y}={}){let ue=A.actionData!=null&&A.navigation.formMethod!=null&&Bn(A.navigation.formMethod)&&A.navigation.state==="loading"&&D.state?._isRedirect!==!0,me;U.actionData?Object.keys(U.actionData).length>0?me=U.actionData:me=null:ue?me=A.actionData:me=null;let Ce=U.loaderData?ey(A.loaderData,U.loaderData,U.matches||[],U.errors):A.loaderData,ye=A.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((Ue,Oe)=>ye.set(Oe,Bl)));let we=B?!1:Ke(D,U.matches||A.matches),Ne=J===!0||A.navigation.formMethod!=null&&Bn(A.navigation.formMethod)&&D.state?._isRedirect!==!0;f&&(d=f,f=void 0),B||ae==="POP"||(ae==="PUSH"?e.history.push(D,D.state):ae==="REPLACE"&&e.history.replace(D,D.state));let Ie;if(ae==="POP"){let Ue=le.get(A.location.pathname);Ue&&Ue.has(D.pathname)?Ie={currentLocation:A.location,nextLocation:D}:le.has(D.pathname)&&(Ie={currentLocation:D,nextLocation:A.location})}else if(ve){let Ue=le.get(A.location.pathname);Ue?Ue.add(D.pathname):(Ue=new Set([D.pathname]),le.set(A.location.pathname,Ue)),Ie={currentLocation:A.location,nextLocation:D}}At({...U,actionData:me,loaderData:Ce,historyAction:ae,location:D,initialized:!0,renderFallback:!1,navigation:Gf,revalidation:"idle",restoreScrollPosition:we,preventScrollReset:Ne,blockers:ye},{viewTransitionOpts:Ie,flushSync:Y===!0}),ae="POP",J=!1,ve=!1,B=!1,te=!1,P?.resolve(),P=null,Be?.resolve(),Be=null}async function rr(D,U){if(P?.resolve(),P=null,typeof D=="number"){P||(P=iy());let Ot=P.promise;return e.history.go(D),Ot}let Y=Nh(A.location,A.matches,h,D,U?.fromRouteId,U?.relative),{path:ue,submission:me,error:Ce}=Gb(!1,Y,U),ye;U?.unstable_mask&&(ye={pathname:"",search:"",hash:"",...typeof U.unstable_mask=="string"?wi(U.unstable_mask):{...A.location.unstable_mask,...U.unstable_mask}});let we=A.location,Ne=io(we,ue,U&&U.state,void 0,ye);Ne={...Ne,...e.history.encodeLocation(Ne)};let Ie=U&&U.replace!=null?U.replace:void 0,Ue="PUSH";Ie===!0?Ue="REPLACE":Ie===!1||me!=null&&Bn(me.formMethod)&&me.formAction===A.location.pathname+A.location.search&&(Ue="REPLACE");let Oe=U&&"preventScrollReset"in U?U.preventScrollReset===!0:void 0,yt=(U&&U.flushSync)===!0,rt=Hr({currentLocation:we,nextLocation:Ne,historyAction:Ue});if(rt){Mr(rt,{state:"blocked",location:Ne,proceed(){Mr(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ne}),rr(D,U)},reset(){let Ot=new Map(A.blockers);Ot.set(rt,Bl),At({blockers:Ot})}});return}await vn(Ue,Ne,{submission:me,pendingError:Ce,preventScrollReset:Oe,replace:U&&U.replace,enableViewTransition:U&&U.viewTransition,flushSync:yt,callSiteDefaultShouldRevalidate:U&&U.unstable_defaultShouldRevalidate})}function lt(){Be||(Be=iy()),Fe(),At({revalidation:"loading"});let D=Be.promise;return A.navigation.state==="submitting"?D:A.navigation.state==="idle"?(vn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),D):(vn(ae||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:ve===!0}),D)}async function vn(D,U,Y){ee&&ee.abort(),ee=null,ae=D,B=(Y&&Y.startUninterruptedRevalidation)===!0,_e(A.location,A.matches),J=(Y&&Y.preventScrollReset)===!0,ve=(Y&&Y.enableViewTransition)===!0;let ue=f||d,me=Y&&Y.overrideNavigation,Ce=Y?.initialHydration&&A.matches&&A.matches.length>0&&!R?A.matches:ra(ue,U,h),ye=(Y&&Y.flushSync)===!0;if(Ce&&A.initialized&&!te&&xS(A.location,U)&&!(Y&&Y.submission&&Bn(Y.submission.formMethod))){Kt(U,{matches:Ce},{flushSync:ye});return}let we=zt(Ce,ue,U.pathname);if(we.active&&we.matches&&(Ce=we.matches),!Ce){let{error:xt,notFoundMatches:Yt,route:ot}=Nn(U.pathname);Kt(U,{matches:Yt,loaderData:{},errors:{[ot.id]:xt}},{flushSync:ye});return}ee=new AbortController;let Ne=Ts(e.history,U,ee.signal,Y&&Y.submission),Ie=e.getContext?await e.getContext():new Ub,Ue;if(Y&&Y.pendingError)Ue=[ia(Ce).route.id,{type:"error",error:Y.pendingError}];else if(Y&&Y.submission&&Bn(Y.submission.formMethod)){let xt=await Kn(Ne,U,Y.submission,Ce,Ie,we.active,Y&&Y.initialHydration===!0,{replace:Y.replace,flushSync:ye});if(xt.shortCircuited)return;if(xt.pendingActionResult){let[Yt,ot]=xt.pendingActionResult;if(mr(ot)&&so(ot.error)&&ot.error.status===404){ee=null,Kt(U,{matches:xt.matches,loaderData:{},errors:{[Yt]:ot.error}});return}}Ce=xt.matches||Ce,Ue=xt.pendingActionResult,me=Kf(U,Y.submission),ye=!1,we.active=!1,Ne=Ts(e.history,Ne.url,Ne.signal)}let{shortCircuited:Oe,matches:yt,loaderData:rt,errors:Ot}=await gr(Ne,U,Ce,Ie,we.active,me,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,ye,Ue,Y&&Y.callSiteDefaultShouldRevalidate);Oe||(ee=null,Kt(U,{matches:yt||Ce,...ty(Ue),loaderData:rt,errors:Ot}))}async function Kn(D,U,Y,ue,me,Ce,ye,we={}){Fe();let Ne=CS(U,Y);if(At({navigation:Ne},{flushSync:we.flushSync===!0}),Ce){let Oe=await wt(ue,U.pathname,D.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){if(Oe.partialMatches.length===0){let{matches:rt,route:Ot}=Lc(d);return{matches:rt,pendingActionResult:[Ot.id,{type:"error",error:Oe.error}]}}let yt=ia(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,pendingActionResult:[yt,{type:"error",error:Oe.error}]}}else if(Oe.matches)ue=Oe.matches;else{let{notFoundMatches:yt,error:rt,route:Ot}=Nn(U.pathname);return{matches:yt,pendingActionResult:[Ot.id,{type:"error",error:rt}]}}}let Ie,Ue=Jc(ue,U);if(!Ue.route.action&&!Ue.route.lazy)Ie={type:"error",error:Cr(405,{method:D.method,pathname:U.pathname,routeId:Ue.route.id})};else{let Oe=Ms(o,u,D,ue,Ue,ye?[]:a,me),yt=await ne(D,Oe,me,null);if(Ie=yt[Ue.route.id],!Ie){for(let rt of ue)if(yt[rt.route.id]){Ie=yt[rt.route.id];break}}if(D.signal.aborted)return{shortCircuited:!0}}if(Da(Ie)){let Oe;return we&&we.replace!=null?Oe=we.replace:Oe=Zb(Ie.response.headers.get("Location"),new URL(D.url),h,e.history)===A.location.pathname+A.location.search,await Vn(D,Ie,!0,{submission:Y,replace:Oe}),{shortCircuited:!0}}if(mr(Ie)){let Oe=ia(ue,Ue.route.id);return(we&&we.replace)!==!0&&(ae="PUSH"),{matches:ue,pendingActionResult:[Oe.route.id,Ie,Ue.route.id]}}return{matches:ue,pendingActionResult:[Ue.route.id,Ie]}}async function gr(D,U,Y,ue,me,Ce,ye,we,Ne,Ie,Ue,Oe,yt){let rt=Ce||Kf(U,ye),Ot=ye||we||ry(rt),xt=!B&&!Ie;if(me){if(xt){let Rt=br(Oe);At({navigation:rt,...Rt!==void 0?{actionData:Rt}:{}},{flushSync:Ue})}let Ve=await wt(Y,U.pathname,D.signal);if(Ve.type==="aborted")return{shortCircuited:!0};if(Ve.type==="error"){if(Ve.partialMatches.length===0){let{matches:ln,route:Et}=Lc(d);return{matches:ln,loaderData:{},errors:{[Et.id]:Ve.error}}}let Rt=ia(Ve.partialMatches).route.id;return{matches:Ve.partialMatches,loaderData:{},errors:{[Rt]:Ve.error}}}else if(Ve.matches)Y=Ve.matches;else{let{error:Rt,notFoundMatches:ln,route:Et}=Nn(U.pathname);return{matches:ln,loaderData:{},errors:{[Et.id]:Rt}}}}let Yt=f||d,{dsMatches:ot,revalidatingFetchers:sn}=Kb(D,ue,o,u,e.history,A,Y,Ot,U,Ie?[]:a,Ie===!0,te,oe,be,he,z,Yt,h,e.patchRoutesOnNavigation!=null,Oe,yt);if(M=++T,!e.dataStrategy&&!ot.some(Ve=>Ve.shouldLoad)&&!ot.some(Ve=>Ve.route.middleware&&Ve.route.middleware.length>0)&&sn.length===0){let Ve=ar();return Kt(U,{matches:Y,loaderData:{},errors:Oe&&mr(Oe[1])?{[Oe[0]]:Oe[1].error}:null,...ty(Oe),...Ve?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ue}),{shortCircuited:!0}}if(xt){let Ve={};if(!me){Ve.navigation=rt;let Rt=br(Oe);Rt!==void 0&&(Ve.actionData=Rt)}sn.length>0&&(Ve.fetchers=ti(sn)),At(Ve,{flushSync:Ue})}sn.forEach(Ve=>{qt(Ve.key),Ve.controller&&fe.set(Ve.key,Ve.controller)});let jt=()=>sn.forEach(Ve=>qt(Ve.key));ee&&ee.signal.addEventListener("abort",jt);let{loaderResults:qr,fetcherResults:jn}=await ge(ot,sn,D,ue);if(D.signal.aborted)return{shortCircuited:!0};ee&&ee.signal.removeEventListener("abort",jt),sn.forEach(Ve=>fe.delete(Ve.key));let dn=jc(qr);if(dn)return await Vn(D,dn.result,!0,{replace:Ne}),{shortCircuited:!0};if(dn=jc(jn),dn)return z.add(dn.key),await Vn(D,dn.result,!0,{replace:Ne}),{shortCircuited:!0};let{loaderData:de,errors:Me}=Jb(A,Y,qr,Oe,sn,jn);Ie&&A.errors&&(Me={...A.errors,...Me});let Xe=ar(),vt=Sn(M),$t=Xe||vt||sn.length>0;return{matches:Y,loaderData:de,errors:Me,...$t?{fetchers:new Map(A.fetchers)}:{}}}function br(D){if(D&&!mr(D[1]))return{[D[0]]:D[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function ti(D){return D.forEach(U=>{let Y=A.fetchers.get(U.key),ue=Ul(void 0,Y?Y.data:void 0);A.fetchers.set(U.key,ue)}),new Map(A.fetchers)}async function ha(D,U,Y,ue){qt(D);let me=(ue&&ue.flushSync)===!0,Ce=f||d,ye=Nh(A.location,A.matches,h,Y,U,ue?.relative),we=ra(Ce,ye,h),Ne=zt(we,Ce,ye);if(Ne.active&&Ne.matches&&(we=Ne.matches),!we){Je(D,U,Cr(404,{pathname:ye}),{flushSync:me});return}let{path:Ie,submission:Ue,error:Oe}=Gb(!0,ye,ue);if(Oe){Je(D,U,Oe,{flushSync:me});return}let yt=e.getContext?await e.getContext():new Ub,rt=(ue&&ue.preventScrollReset)===!0;if(Ue&&Bn(Ue.formMethod)){await Ni(D,U,Ie,we,yt,Ne.active,me,rt,Ue,ue&&ue.unstable_defaultShouldRevalidate);return}he.set(D,{routeId:U,path:Ie}),await Vt(D,U,Ie,we,yt,Ne.active,me,rt,Ue)}async function Ni(D,U,Y,ue,me,Ce,ye,we,Ne,Ie){Fe(),he.delete(D);let Ue=A.fetchers.get(D);Qe(D,TS(Ne,Ue),{flushSync:ye});let Oe=new AbortController,yt=Ts(e.history,Y,Oe.signal,Ne);if(Ce){let ft=await wt(ue,new URL(yt.url).pathname,yt.signal,D);if(ft.type==="aborted")return;if(ft.type==="error"){Je(D,U,ft.error,{flushSync:ye});return}else if(ft.matches)ue=ft.matches;else{Je(D,U,Cr(404,{pathname:Y}),{flushSync:ye});return}}let rt=Jc(ue,Y);if(!rt.route.action&&!rt.route.lazy){let ft=Cr(405,{method:Ne.formMethod,pathname:Y,routeId:U});Je(D,U,ft,{flushSync:ye});return}fe.set(D,Oe);let Ot=T,xt=Ms(o,u,yt,ue,rt,a,me),Yt=await ne(yt,xt,me,D),ot=Yt[rt.route.id];if(!ot){for(let ft of xt)if(Yt[ft.route.id]){ot=Yt[ft.route.id];break}}if(yt.signal.aborted){fe.get(D)===Oe&&fe.delete(D);return}if(be.has(D)){if(Da(ot)||mr(ot)){Qe(D,_i(void 0));return}}else{if(Da(ot))if(fe.delete(D),M>Ot){Qe(D,_i(void 0));return}else return z.add(D),Qe(D,Ul(Ne)),Vn(yt,ot,!1,{fetcherSubmission:Ne,preventScrollReset:we});if(mr(ot)){Je(D,U,ot.error);return}}let sn=A.navigation.location||A.location,jt=Ts(e.history,sn,Oe.signal),qr=f||d,jn=A.navigation.state!=="idle"?ra(qr,A.navigation.location,h):A.matches;at(jn,"Didn't find any matches after fetcher action");let dn=++T;G.set(D,dn);let de=Ul(Ne,ot.data);A.fetchers.set(D,de);let{dsMatches:Me,revalidatingFetchers:Xe}=Kb(jt,me,o,u,e.history,A,jn,Ne,sn,a,!1,te,oe,be,he,z,qr,h,e.patchRoutesOnNavigation!=null,[rt.route.id,ot],Ie);Xe.filter(ft=>ft.key!==D).forEach(ft=>{let ni=ft.key,ri=A.fetchers.get(ni),ma=Ul(void 0,ri?ri.data:void 0);A.fetchers.set(ni,ma),qt(ni),ft.controller&&fe.set(ni,ft.controller)}),At({fetchers:new Map(A.fetchers)});let vt=()=>Xe.forEach(ft=>qt(ft.key));Oe.signal.addEventListener("abort",vt);let{loaderResults:$t,fetcherResults:Ve}=await ge(Me,Xe,jt,me);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",vt),G.delete(D),fe.delete(D),Xe.forEach(ft=>fe.delete(ft.key)),A.fetchers.has(D)){let ft=_i(ot.data);A.fetchers.set(D,ft)}let Rt=jc($t);if(Rt)return Vn(jt,Rt.result,!1,{preventScrollReset:we});if(Rt=jc(Ve),Rt)return z.add(Rt.key),Vn(jt,Rt.result,!1,{preventScrollReset:we});let{loaderData:ln,errors:Et}=Jb(A,jn,$t,void 0,Xe,Ve);Sn(dn),A.navigation.state==="loading"&&dn>M?(at(ae,"Expected pending action"),ee&&ee.abort(),Kt(A.navigation.location,{matches:jn,loaderData:ln,errors:Et,fetchers:new Map(A.fetchers)})):(At({errors:Et,loaderData:ey(A.loaderData,ln,jn,Et),fetchers:new Map(A.fetchers)}),te=!1)}async function Vt(D,U,Y,ue,me,Ce,ye,we,Ne){let Ie=A.fetchers.get(D);Qe(D,Ul(Ne,Ie?Ie.data:void 0),{flushSync:ye});let Ue=new AbortController,Oe=Ts(e.history,Y,Ue.signal);if(Ce){let ot=await wt(ue,new URL(Oe.url).pathname,Oe.signal,D);if(ot.type==="aborted")return;if(ot.type==="error"){Je(D,U,ot.error,{flushSync:ye});return}else if(ot.matches)ue=ot.matches;else{Je(D,U,Cr(404,{pathname:Y}),{flushSync:ye});return}}let yt=Jc(ue,Y);fe.set(D,Ue);let rt=T,Ot=Ms(o,u,Oe,ue,yt,a,me),Yt=(await ne(Oe,Ot,me,D))[yt.route.id];if(fe.get(D)===Ue&&fe.delete(D),!Oe.signal.aborted){if(be.has(D)){Qe(D,_i(void 0));return}if(Da(Yt))if(M>rt){Qe(D,_i(void 0));return}else{z.add(D),await Vn(Oe,Yt,!1,{preventScrollReset:we});return}if(mr(Yt)){Je(D,U,Yt.error);return}Qe(D,_i(Yt.data))}}async function Vn(D,U,Y,{submission:ue,fetcherSubmission:me,preventScrollReset:Ce,replace:ye}={}){Y||(P?.resolve(),P=null),U.response.headers.has("X-Remix-Revalidate")&&(te=!0);let we=U.response.headers.get("Location");at(we,"Expected a Location header on the redirect Response"),we=Zb(we,new URL(D.url),h,e.history);let Ne=io(A.location,we,{_isRedirect:!0});if(r){let Ot=!1;if(U.response.headers.has("X-Remix-Reload-Document"))Ot=!0;else if(tm(we)){const xt=Xx(we,!0);Ot=xt.origin!==n.location.origin||Ar(xt.pathname,h)==null}if(Ot){ye?n.location.replace(we):n.location.assign(we);return}}ee=null;let Ie=ye===!0||U.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ue,formAction:Oe,formEncType:yt}=A.navigation;!ue&&!me&&Ue&&Oe&&yt&&(ue=ry(A.navigation));let rt=ue||me;if(rS.has(U.response.status)&&rt&&Bn(rt.formMethod))await vn(Ie,Ne,{submission:{...rt,formAction:we},preventScrollReset:Ce||J,enableViewTransition:Y?ve:void 0});else{let Ot=Kf(Ne,ue);await vn(Ie,Ne,{overrideNavigation:Ot,fetcherSubmission:me,preventScrollReset:Ce||J,enableViewTransition:Y?ve:void 0})}}async function ne(D,U,Y,ue){let me,Ce={};try{me=await hS(b,D,U,ue,Y,!1)}catch(ye){return U.filter(we=>we.shouldLoad).forEach(we=>{Ce[we.route.id]={type:"error",error:ye}}),Ce}if(D.signal.aborted)return Ce;if(!Bn(D.method))for(let ye of U){if(me[ye.route.id]?.type==="error")break;!me.hasOwnProperty(ye.route.id)&&!A.loaderData.hasOwnProperty(ye.route.id)&&(!A.errors||!A.errors.hasOwnProperty(ye.route.id))&&ye.shouldCallHandler()&&(me[ye.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ye.route.id}`)})}for(let[ye,we]of Object.entries(me))if(kS(we)){let Ne=we.result;Ce[ye]={type:"redirect",response:bS(Ne,D,ye,U,h)}}else Ce[ye]=await gS(we);return Ce}async function ge(D,U,Y,ue){let me=ne(Y,D,ue,null),Ce=Promise.all(U.map(async Ne=>{if(Ne.matches&&Ne.match&&Ne.request&&Ne.controller){let Ue=(await ne(Ne.request,Ne.matches,ue,Ne.key))[Ne.match.route.id];return{[Ne.key]:Ue}}else return Promise.resolve({[Ne.key]:{type:"error",error:Cr(404,{pathname:Ne.path})}})})),ye=await me,we=(await Ce).reduce((Ne,Ie)=>Object.assign(Ne,Ie),{});return{loaderResults:ye,fetcherResults:we}}function Fe(){te=!0,he.forEach((D,U)=>{fe.has(U)&&oe.add(U),qt(U)})}function Qe(D,U,Y={}){A.fetchers.set(D,U),At({fetchers:new Map(A.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Je(D,U,Y,ue={}){let me=ia(A.matches,U);an(D),At({errors:{[me.route.id]:Y},fetchers:new Map(A.fetchers)},{flushSync:(ue&&ue.flushSync)===!0})}function wn(D){return Ee.set(D,(Ee.get(D)||0)+1),be.has(D)&&be.delete(D),A.fetchers.get(D)||iS}function ir(D,U){qt(D,U?.reason),Qe(D,_i(null))}function an(D){let U=A.fetchers.get(D);fe.has(D)&&!(U&&U.state==="loading"&&G.has(D))&&qt(D),he.delete(D),G.delete(D),z.delete(D),be.delete(D),oe.delete(D),A.fetchers.delete(D)}function Wt(D){let U=(Ee.get(D)||0)-1;U<=0?(Ee.delete(D),be.add(D)):Ee.set(D,U),At({fetchers:new Map(A.fetchers)})}function qt(D,U){let Y=fe.get(D);Y&&(Y.abort(U),fe.delete(D))}function kt(D){for(let U of D){let Y=wn(U),ue=_i(Y.data);A.fetchers.set(U,ue)}}function ar(){let D=[],U=!1;for(let Y of z){let ue=A.fetchers.get(Y);at(ue,`Expected fetcher: ${Y}`),ue.state==="loading"&&(z.delete(Y),D.push(Y),U=!0)}return kt(D),U}function Sn(D){let U=[];for(let[Y,ue]of G)if(ue<D){let me=A.fetchers.get(Y);at(me,`Expected fetcher: ${Y}`),me.state==="loading"&&(qt(Y),G.delete(Y),U.push(Y))}return kt(U),U.length>0}function Ka(D,U){let Y=A.blockers.get(D)||Bl;return He.get(D)!==U&&He.set(D,U),Y}function Pr(D){A.blockers.delete(D),He.delete(D)}function Mr(D,U){let Y=A.blockers.get(D)||Bl;at(Y.state==="unblocked"&&U.state==="blocked"||Y.state==="blocked"&&U.state==="blocked"||Y.state==="blocked"&&U.state==="proceeding"||Y.state==="blocked"&&U.state==="unblocked"||Y.state==="proceeding"&&U.state==="unblocked",`Invalid blocker state transition: ${Y.state} -> ${U.state}`);let ue=new Map(A.blockers);ue.set(D,U),At({blockers:ue})}function Hr({currentLocation:D,nextLocation:U,historyAction:Y}){if(He.size===0)return;He.size>1&&xn(!1,"A router only supports one blocker at a time");let ue=Array.from(He.entries()),[me,Ce]=ue[ue.length-1],ye=A.blockers.get(me);if(!(ye&&ye.state==="proceeding")&&Ce({currentLocation:D,nextLocation:U,historyAction:Y}))return me}function Nn(D){let U=Cr(404,{pathname:D}),Y=f||d,{matches:ue,route:me}=Lc(Y);return{notFoundMatches:ue,route:me,error:U}}function I(D,U,Y){if(_=D,w=U,k=Y||null,!C&&A.navigation===Gf){C=!0;let ue=Ke(A.location,A.matches);ue!=null&&At({restoreScrollPosition:ue})}return()=>{_=null,w=null,k=null}}function ie(D,U){return k&&k(D,U.map(ue=>Rw(ue,A.loaderData)))||D.key}function _e(D,U){if(_&&w){let Y=ie(D,U);_[Y]=w()}}function Ke(D,U){if(_){let Y=ie(D,U),ue=_[Y];if(typeof ue=="number")return ue}return null}function zt(D,U,Y){if(e.patchRoutesOnNavigation)if(D){if(Object.keys(D[0].params).length>0)return{active:!0,matches:Ql(U,Y,h,!0)}}else return{active:!0,matches:Ql(U,Y,h,!0)||[]};return{active:!1,matches:null}}async function wt(D,U,Y,ue){if(!e.patchRoutesOnNavigation)return{type:"success",matches:D};let me=D;for(;;){let Ce=f==null,ye=f||d,we=u;try{await e.patchRoutesOnNavigation({signal:Y,path:U,matches:me,fetcherKey:ue,patch:(Ue,Oe)=>{Y.aborted||Vb(Ue,Oe,ye,we,o,!1)}})}catch(Ue){return{type:"error",error:Ue,partialMatches:me}}finally{Ce&&!Y.aborted&&(d=[...d])}if(Y.aborted)return{type:"aborted"};let Ne=ra(ye,U,h),Ie=null;if(Ne){if(Object.keys(Ne[0].params).length===0)return{type:"success",matches:Ne};if(Ie=Ql(ye,U,h,!0),!(Ie&&me.length<Ie.length&&Te(me,Ie.slice(0,me.length))))return{type:"success",matches:Ne}}if(Ie||(Ie=Ql(ye,U,h,!0)),!Ie||Te(me,Ie))return{type:"success",matches:null};me=Ie}}function Te(D,U){return D.length===U.length&&D.every((Y,ue)=>Y.route.id===U[ue].route.id)}function Se(D){u={},f=ao(D,o,void 0,u)}function $e(D,U,Y=!1){let ue=f==null;Vb(D,U,f||d,u,o,Y),ue&&(d=[...d],At({}))}return Z={get basename(){return h},get future(){return y},get state(){return A},get routes(){return d},get window(){return n},initialize:Zt,subscribe:Ln,enableScrollRestoration:I,navigate:rr,fetch:ha,revalidate:lt,createHref:D=>e.history.createHref(D),encodeLocation:D=>e.history.encodeLocation(D),getFetcher:wn,resetFetcher:ir,deleteFetcher:Wt,dispose:un,getBlocker:Ka,deleteBlocker:Pr,patchRoutes:$e,_internalFetchControllers:fe,_internalSetRoutes:Se,_internalSetStateDoNotUseOrYouWillBreakYourApp(D){At(D)}},e.unstable_instrumentations&&(Z=Qw(Z,e.unstable_instrumentations.map(D=>D.router).filter(Boolean))),Z}function lS(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nh(e,n,r,a,l,o){let u,d;if(l){u=[];for(let h of n)if(u.push(h),h.route.id===l){d=h;break}}else u=n,d=n[n.length-1];let f=_u(a||".",nm(u),Ar(e.pathname,r)||e.pathname,o==="path");if(a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&d){let h=am(f.search);if(d.route.index&&!h)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let b=new URLSearchParams(f.search),y=b.getAll("index");b.delete("index"),y.filter(v=>v).forEach(v=>b.append("index",v));let x=b.toString();f.search=x?`?${x}`:""}}return r!=="/"&&(f.pathname=qw({basename:r,pathname:f.pathname})),Xr(f)}function Gb(e,n,r){if(!r||!lS(r))return{path:n};if(r.formMethod&&!NS(r.formMethod))return{path:n,error:Cr(405,{method:r.formMethod})};let a=()=>({path:n,error:Cr(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),u=mv(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Bn(o))return a();let y=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((x,[v,_])=>`${x}${v}=${_}
59
- `,""):String(r.body);return{path:n,submission:{formMethod:o,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:y}}}else if(r.formEncType==="application/json"){if(!Bn(o))return a();try{let y=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:u,formEncType:r.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}at(typeof FormData=="function","FormData is not available in this environment");let d,f;if(r.formData)d=Th(r.formData),f=r.formData;else if(r.body instanceof FormData)d=Th(r.body),f=r.body;else if(r.body instanceof URLSearchParams)d=r.body,f=Wb(d);else if(r.body==null)d=new URLSearchParams,f=new FormData;else try{d=new URLSearchParams(r.body),f=Wb(d)}catch{return a()}let h={formMethod:o,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(Bn(h.formMethod))return{path:n,submission:h};let b=wi(n);return e&&b.search&&am(b.search)&&d.append("index",""),b.search=`?${d}`,{path:Xr(b),submission:h}}function Kb(e,n,r,a,l,o,u,d,f,h,b,y,x,v,_,k,w,C,j,R,H){let $=R?mr(R[1])?R[1].error:R[1].data:void 0,O=l.createURL(o.location),Z=l.createURL(f),A;if(b&&o.errors){let X=Object.keys(o.errors)[0];A=u.findIndex(B=>B.route.id===X)}else if(R&&mr(R[1])){let X=R[0];A=u.findIndex(B=>B.route.id===X)-1}let ae=R?R[1].statusCode:void 0,P=ae&&ae>=400,J={currentUrl:O,currentParams:o.matches[0]?.params||{},nextUrl:Z,nextParams:u[0].params,...d,actionResult:$,actionStatus:ae},ee=po(u),ve=u.map((X,B)=>{let{route:te}=X,oe=null;if(A!=null&&B>A)oe=!1;else if(te.lazy)oe=!0;else if(!rm(te))oe=!1;else if(b){let{shouldLoad:G}=ov(te,o.loaderData,o.errors);oe=G}else oS(o.loaderData,o.matches[B],X)&&(oe=!0);if(oe!==null)return Ch(r,a,e,ee,X,h,n,oe);let fe=!1;typeof H=="boolean"?fe=H:P?fe=!1:(y||O.pathname+O.search===Z.pathname+Z.search||O.search!==Z.search||cS(o.matches[B],X))&&(fe=!0);let T={...J,defaultShouldRevalidate:fe},M=eo(X,T);return Ch(r,a,e,ee,X,h,n,M,T,H)}),le=[];return _.forEach((X,B)=>{if(b||!u.some(he=>he.route.id===X.routeId)||v.has(B))return;let te=o.fetchers.get(B),oe=te&&te.state!=="idle"&&te.data===void 0,fe=ra(w,X.path,C);if(!fe){if(j&&oe)return;le.push({key:B,routeId:X.routeId,path:X.path,matches:null,match:null,request:null,controller:null});return}if(k.has(B))return;let T=Jc(fe,X.path),M=new AbortController,G=Ts(l,X.path,M.signal),z=null;if(x.has(B))x.delete(B),z=Ms(r,a,G,fe,T,h,n);else if(oe)y&&(z=Ms(r,a,G,fe,T,h,n));else{let he;typeof H=="boolean"?he=H:P?he=!1:he=y;let Ee={...J,defaultShouldRevalidate:he};eo(T,Ee)&&(z=Ms(r,a,G,fe,T,h,n,Ee))}z&&le.push({key:B,routeId:X.routeId,path:X.path,matches:z,match:T,request:G,controller:M})}),{dsMatches:ve,revalidatingFetchers:le}}function rm(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ov(e,n,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!rm(e))return{shouldLoad:!1,renderFallback:!1};let a=n!=null&&e.id in n,l=r!=null&&r[e.id]!==void 0;if(!a&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!l;return{shouldLoad:o,renderFallback:o}}function oS(e,n,r){let a=!n||r.route.id!==n.route.id,l=!e.hasOwnProperty(r.route.id);return a||l}function cS(e,n){let r=e.route.path;return e.pathname!==n.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==n.params["*"]}function eo(e,n){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(n);if(typeof r=="boolean")return r}return n.defaultShouldRevalidate}function Vb(e,n,r,a,l,o){let u;if(e){let h=a[e];at(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),u=h.children}else u=r;let d=[],f=[];if(n.forEach(h=>{let b=u.find(y=>cv(h,y));b?f.push({existingRoute:b,newRoute:h}):d.push(h)}),d.length>0){let h=ao(d,l,[e||"_","patch",String(u?.length||"0")],a);u.push(...h)}if(o&&f.length>0)for(let h=0;h<f.length;h++){let{existingRoute:b,newRoute:y}=f[h],x=b,[v]=ao([y],l,[],{},!0);Object.assign(x,{element:v.element?v.element:x.element,errorElement:v.errorElement?v.errorElement:x.errorElement,hydrateFallbackElement:v.hydrateFallbackElement?v.hydrateFallbackElement:x.hydrateFallbackElement})}}function cv(e,n){return"id"in e&&"id"in n&&e.id===n.id?!0:e.index===n.index&&e.path===n.path&&e.caseSensitive===n.caseSensitive?(!e.children||e.children.length===0)&&(!n.children||n.children.length===0)?!0:e.children?.every((r,a)=>n.children?.some(l=>cv(r,l)))??!1:!1}var Yb=new WeakMap,uv=({key:e,route:n,manifest:r,mapRouteProperties:a})=>{let l=r[n.id];if(at(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let o=l.lazy[e];if(!o)return;let u=Yb.get(l);u||(u={},Yb.set(l,u));let d=u[e];if(d)return d;let f=(async()=>{let h=Nw(e),y=l[e]!==void 0&&e!=="hasErrorBoundary";if(h)xn(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(y)xn(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await o();x!=null&&(Object.assign(l,{[e]:x}),Object.assign(l,a(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(x=>x===void 0)&&(l.lazy=void 0))})();return u[e]=f,f},Qb=new WeakMap;function uS(e,n,r,a,l){let o=r[e.id];if(at(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let b=Qb.get(o);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let y=(async()=>{at(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),v={};for(let _ in x){let k=x[_];if(k===void 0)continue;let w=Tw(_),j=o[_]!==void 0&&_!=="hasErrorBoundary";w?xn(!w,"Route property "+_+" is not a supported property to be returned from a lazy route function. This property will be ignored."):j?xn(!j,`Route "${o.id}" has a static property "${_}" defined but its lazy function is also returning a value for this property. The lazy route property "${_}" will be ignored.`):v[_]=k}Object.assign(o,v),Object.assign(o,{...a(o),lazy:void 0})})();return Qb.set(o,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let u=Object.keys(e.lazy),d=[],f;for(let b of u){if(l&&l.includes(b))continue;let y=uv({key:b,route:e,manifest:r,mapRouteProperties:a});y&&(d.push(y),b===n&&(f=y))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),f?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:f}}async function Xb(e){let n=e.matches.filter(l=>l.shouldLoad),r={};return(await Promise.all(n.map(l=>l.resolve()))).forEach((l,o)=>{r[n[o].route.id]=l}),r}async function dS(e){return e.matches.some(n=>n.route.middleware)?dv(e,()=>Xb(e)):Xb(e)}function dv(e,n){return fS(e,n,a=>{if(SS(a))throw a;return a},ES,r);function r(a,l,o){if(o)return Promise.resolve(Object.assign(o.value,{[l]:{type:"error",result:a}}));{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(h=>h.route.id===l),0),Math.max(u.findIndex(h=>h.shouldCallHandler()),0)),f=ia(u,u[d].route.id).route.id;return Promise.resolve({[f]:{type:"error",result:a}})}}}async function fS(e,n,r,a,l){let{matches:o,request:u,params:d,context:f,unstable_pattern:h}=e,b=o.flatMap(x=>x.route.middleware?x.route.middleware.map(v=>[x.route.id,v]):[]);return await fv({request:u,params:d,context:f,unstable_pattern:h},b,n,r,a,l)}async function fv(e,n,r,a,l,o,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let f=n[u];if(!f)return await r();let[h,b]=f,y,x=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await fv(e,n,r,a,l,o,u+1)},y.value}catch(v){return y={value:await o(v,h,y)},y.value}};try{let v=await b(e,x),_=v!=null?a(v):void 0;return l(_)?_:y?_??y.value:(y={value:await x()},y.value)}catch(v){return await o(v,h,y)}}function hv(e,n,r,a,l){let o=uv({key:"middleware",route:a.route,manifest:n,mapRouteProperties:e}),u=uS(a.route,Bn(r.method)?"action":"loader",n,e,l);return{middleware:o,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Ch(e,n,r,a,l,o,u,d,f=null,h){let b=!1,y=hv(e,n,r,l,o);return{...l,_lazyPromises:y,shouldLoad:d,shouldRevalidateArgs:f,shouldCallHandler(x){return b=!0,f?typeof h=="boolean"?eo(l,{...f,defaultShouldRevalidate:h}):typeof x=="boolean"?eo(l,{...f,defaultShouldRevalidate:x}):eo(l,f):d},resolve(x){let{lazy:v,loader:_,middleware:k}=l.route,w=b||d||x&&!Bn(r.method)&&(v||_),C=k&&k.length>0&&!_&&!v;return w&&(Bn(r.method)||!C)?mS({request:r,unstable_pattern:a,match:l,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:x,scopedContext:u}):Promise.resolve({type:"data",result:void 0})}}}function Ms(e,n,r,a,l,o,u,d=null){return a.map(f=>f.route.id!==l.route.id?{...f,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:hv(e,n,r,f,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ch(e,n,r,po(a),f,o,u,!0,d))}async function hS(e,n,r,a,l,o){r.some(h=>h._lazyPromises?.middleware)&&await Promise.all(r.map(h=>h._lazyPromises?.middleware));let u={request:n,unstable_pattern:po(r),params:r[0].params,context:l,matches:r},f=await e({...u,fetcherKey:a,runClientMiddleware:h=>{let b=u;return dv(b,()=>h({...b,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return f}async function mS({request:e,unstable_pattern:n,match:r,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:o,scopedContext:u}){let d,f,h=Bn(e.method),b=h?"action":"loader",y=x=>{let v,_=new Promise((C,j)=>v=j);f=()=>v(),e.signal.addEventListener("abort",f);let k=C=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${r.route.id}]`)):x({request:e,unstable_pattern:n,params:r.params,context:u},...C!==void 0?[C]:[]),w=(async()=>{try{return{type:"data",result:await(o?o(j=>k(j)):k())}}catch(C){return{type:"error",result:C}}})();return Promise.race([w,_])};try{let x=h?r.route.action:r.route.loader;if(a||l)if(x){let v,[_]=await Promise.all([y(x).catch(k=>{v=k}),a,l]);if(v!==void 0)throw v;d=_}else{await a;let v=h?r.route.action:r.route.loader;if(v)[d]=await Promise.all([y(v),l]);else if(b==="action"){let _=new URL(e.url),k=_.pathname+_.search;throw Cr(405,{method:e.method,pathname:k,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(x)d=await y(x);else{let v=new URL(e.url),_=v.pathname+v.search;throw Cr(404,{pathname:_})}}catch(x){return{type:"error",result:x}}finally{f&&e.signal.removeEventListener("abort",f)}return d}async function pS(e){let n=e.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?e.body==null?null:e.json():e.text()}async function gS(e){let{result:n,type:r}=e;if(im(n)){let a;try{a=await pS(n)}catch(l){return{type:"error",error:l}}return r==="error"?{type:"error",error:new mo(n.status,n.statusText,a),statusCode:n.status,headers:n.headers}:{type:"data",data:a,statusCode:n.status,headers:n.headers}}return r==="error"?ny(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:vS(n),statusCode:so(n)?n.status:void 0,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:so(n)?n.status:void 0}:ny(n)?{type:"data",data:n.data,statusCode:n.init?.status,headers:n.init?.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function bS(e,n,r,a,l){let o=e.headers.get("Location");if(at(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!tm(o)){let u=a.slice(0,a.findIndex(d=>d.route.id===r)+1);o=Nh(new URL(n.url),u,l,o),e.headers.set("Location",o)}return e}function Zb(e,n,r,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(tm(e)){let o=e,u=o.startsWith("//")?new URL(n.protocol+o):new URL(o);if(l.includes(u.protocol))throw new Error("Invalid redirect location");let d=Ar(u.pathname,r)!=null;if(u.origin===n.origin&&d)return u.pathname+u.search+u.hash}try{let o=a.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ts(e,n,r,a){let l=e.createURL(mv(n)).toString(),o={signal:r};if(a&&Bn(a.formMethod)){let{formMethod:u,formEncType:d}=a;o.method=u.toUpperCase(),d==="application/json"?(o.headers=new Headers({"Content-Type":d}),o.body=JSON.stringify(a.json)):d==="text/plain"?o.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?o.body=Th(a.formData):o.body=a.formData}return new Request(l,o)}function Th(e){let n=new URLSearchParams;for(let[r,a]of e.entries())n.append(r,typeof a=="string"?a:a.name);return n}function Wb(e){let n=new FormData;for(let[r,a]of e.entries())n.append(r,a);return n}function yS(e,n,r,a=!1,l=!1){let o={},u=null,d,f=!1,h={},b=r&&mr(r[1])?r[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in n))return;let x=y.route.id,v=n[x];if(at(!Da(v),"Cannot handle redirect results in processLoaderData"),mr(v)){let _=v.error;if(b!==void 0&&(_=b,b=void 0),u=u||{},l)u[x]=_;else{let k=ia(e,x);u[k.route.id]==null&&(u[k.route.id]=_)}a||(o[x]=lv),f||(f=!0,d=so(v.error)?v.error.status:500),v.headers&&(h[x]=v.headers)}else o[x]=v.data,v.statusCode&&v.statusCode!==200&&!f&&(d=v.statusCode),v.headers&&(h[x]=v.headers)}),b!==void 0&&r&&(u={[r[0]]:b},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:u,statusCode:d||200,loaderHeaders:h}}function Jb(e,n,r,a,l,o){let{loaderData:u,errors:d}=yS(n,r,a);return l.filter(f=>!f.matches||f.matches.some(h=>h.shouldLoad)).forEach(f=>{let{key:h,match:b,controller:y}=f;if(y&&y.signal.aborted)return;let x=o[h];if(at(x,"Did not find corresponding fetcher result"),mr(x)){let v=ia(e.matches,b?.route.id);d&&d[v.route.id]||(d={...d,[v.route.id]:x.error}),e.fetchers.delete(h)}else if(Da(x))at(!1,"Unhandled fetcher revalidation redirect");else{let v=_i(x.data);e.fetchers.set(h,v)}}),{loaderData:u,errors:d}}function ey(e,n,r,a){let l=Object.entries(n).filter(([,o])=>o!==lv).reduce((o,[u,d])=>(o[u]=d,o),{});for(let o of r){let u=o.route.id;if(!n.hasOwnProperty(u)&&e.hasOwnProperty(u)&&o.route.loader&&(l[u]=e[u]),a&&a.hasOwnProperty(u))break}return l}function ty(e){return e?mr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ia(e,n){return(n?e.slice(0,e.findIndex(a=>a.route.id===n)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Lc(e){let n=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function Cr(e,{pathname:n,routeId:r,method:a,type:l,message:o}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&n&&r?d=`You made a ${a} request to "${n}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:l==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${r}" does not match URL "${n}"`):e===404?(u="Not Found",d=`No route matches URL "${n}"`):e===405&&(u="Method Not Allowed",a&&n&&r?d=`You made a ${a.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(d=`Invalid request method "${a.toUpperCase()}"`)),new mo(e||500,u,new Error(d),!0)}function jc(e){let n=Object.entries(e);for(let r=n.length-1;r>=0;r--){let[a,l]=n[r];if(Da(l))return{key:a,result:l}}}function mv(e){let n=typeof e=="string"?wi(e):e;return Xr({...n,hash:""})}function xS(e,n){return e.pathname!==n.pathname||e.search!==n.search?!1:e.hash===""?n.hash!=="":e.hash===n.hash?!0:n.hash!==""}function vS(e){return new mo(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ES(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([n,r])=>typeof n=="string"&&_S(r))}function _S(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function kS(e){return im(e.result)&&av.has(e.result.status)}function mr(e){return e.type==="error"}function Da(e){return(e&&e.type)==="redirect"}function ny(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function im(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function wS(e){return av.has(e)}function SS(e){return im(e)&&wS(e.status)&&e.headers.has("Location")}function NS(e){return nS.has(e.toUpperCase())}function Bn(e){return eS.has(e.toUpperCase())}function am(e){return new URLSearchParams(e).getAll("index").some(n=>n==="")}function Jc(e,n){let r=typeof n=="string"?wi(n).search:n.search;if(e[e.length-1].route.index&&am(r||""))return e[e.length-1];let a=ev(e);return a[a.length-1]}function ry(e){let{formMethod:n,formAction:r,formEncType:a,text:l,formData:o,json:u}=e;if(!(!n||!r||!a)){if(l!=null)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:n,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(u!==void 0)return{formMethod:n,formAction:r,formEncType:a,formData:void 0,json:u,text:void 0}}}function Kf(e,n){return n?{state:"loading",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function CS(e,n){return{state:"submitting",location:e,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Ul(e,n){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function TS(e,n){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:n?n.data:void 0}}function _i(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function zS(e,n){try{let r=e.sessionStorage.getItem(sv);if(r){let a=JSON.parse(r);for(let[l,o]of Object.entries(a||{}))o&&Array.isArray(o)&&n.set(l,new Set(o||[]))}}catch{}}function RS(e,n){if(n.size>0){let r={};for(let[a,l]of n)r[a]=[...l];try{e.sessionStorage.setItem(sv,JSON.stringify(r))}catch(a){xn(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function iy(){let e,n,r=new Promise((a,l)=>{e=async o=>{a(o);try{await r}catch{}},n=async o=>{l(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:n}}var Ua=N.createContext(null);Ua.displayName="DataRouter";var go=N.createContext(null);go.displayName="DataRouterState";var pv=N.createContext(!1);function AS(){return N.useContext(pv)}var sm=N.createContext({isTransitioning:!1});sm.displayName="ViewTransition";var gv=N.createContext(new Map);gv.displayName="Fetchers";var OS=N.createContext(null);OS.displayName="Await";var Or=N.createContext(null);Or.displayName="Navigation";var ku=N.createContext(null);ku.displayName="Location";var Fr=N.createContext({outlet:null,matches:[],isDataRoute:!1});Fr.displayName="Route";var lm=N.createContext(null);lm.displayName="RouteError";var bv="REACT_ROUTER_ERROR",MS="REDIRECT",DS="ROUTE_ERROR_RESPONSE";function LS(e){if(e.startsWith(`${bv}:${MS}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function jS(e){if(e.startsWith(`${bv}:${DS}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new mo(n.status,n.statusText,n.data)}catch{}}function IS(e,{relative:n}={}){at(bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=N.useContext(Or),{hash:l,pathname:o,search:u}=yo(e,{relative:n}),d=o;return r!=="/"&&(d=o==="/"?r:Br([r,o])),a.createHref({pathname:d,search:u,hash:l})}function bo(){return N.useContext(ku)!=null}function Jr(){return at(bo(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(ku).location}var yv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xv(e){N.useContext(Or).static||N.useLayoutEffect(e)}function om(){let{isDataRoute:e}=N.useContext(Fr);return e?WS():BS()}function BS(){at(bo(),"useNavigate() may be used only in the context of a <Router> component.");let e=N.useContext(Ua),{basename:n,navigator:r}=N.useContext(Or),{matches:a}=N.useContext(Fr),{pathname:l}=Jr(),o=JSON.stringify(nm(a)),u=N.useRef(!1);return xv(()=>{u.current=!0}),N.useCallback((f,h={})=>{if(xn(u.current,yv),!u.current)return;if(typeof f=="number"){r.go(f);return}let b=_u(f,JSON.parse(o),l,h.relative==="path");e==null&&n!=="/"&&(b.pathname=b.pathname==="/"?n:Br([n,b.pathname])),(h.replace?r.replace:r.push)(b,h.state,h)},[n,r,o,l,e])}var US=N.createContext(null);function FS(e){let n=N.useContext(Fr).outlet;return N.useMemo(()=>n&&N.createElement(US.Provider,{value:e},n),[n,e])}function wu(){let{matches:e}=N.useContext(Fr),n=e[e.length-1];return n?n.params:{}}function yo(e,{relative:n}={}){let{matches:r}=N.useContext(Fr),{pathname:a}=Jr(),l=JSON.stringify(nm(r));return N.useMemo(()=>_u(e,JSON.parse(l),a,n==="path"),[e,l,a,n])}function PS(e,n,r){at(bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=N.useContext(Or),{matches:l}=N.useContext(Fr),o=l[l.length-1],u=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let w=h&&h.path||"";Ev(d,!h||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
-
61
- Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let b=Jr(),y;y=b;let x=y.pathname||"/",v=x;if(f!=="/"){let w=f.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(w.length).join("/")}let _=ra(e,{pathname:v});return xn(h||_!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),xn(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),KS(_&&_.map(w=>Object.assign({},w,{params:Object.assign({},u,w.params),pathname:Br([f,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:Br([f,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),l,r)}function HS(){let e=ZS(),n=so(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:o},"ErrorBoundary")," or"," ",N.createElement("code",{style:o},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},n),r?N.createElement("pre",{style:l},r):null,u)}var qS=N.createElement(HS,null),vv=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=jS(e.digest);r&&(e=r)}let n=e!==void 0?N.createElement(Fr.Provider,{value:this.props.routeContext},N.createElement(lm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?N.createElement($S,{error:e},n):n}};vv.contextType=pv;var Vf=new WeakMap;function $S({children:e,error:n}){let{basename:r}=N.useContext(Or);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=LS(n.digest);if(a){let l=Vf.get(n);if(l)throw l;let o=nv(a.location,r);if(tv&&!Vf.get(n))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Vf.set(n,u),u}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function GS({routeContext:e,match:n,children:r}){let a=N.useContext(Ua);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Fr.Provider,{value:e},r)}function KS(e,n=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(n.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a?.errors;if(o!=null){let b=l.findIndex(y=>y.route.id&&o?.[y.route.id]!==void 0);at(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,b+1))}let u=!1,d=-1;if(r&&a){u=a.renderFallback;for(let b=0;b<l.length;b++){let y=l[b];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(d=b),y.route.id){let{loaderData:x,errors:v}=a,_=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!v||v[y.route.id]===void 0);if(y.route.lazy||_){r.isStatic&&(u=!0),d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}}let f=r?.onError,h=a&&f?(b,y)=>{f(b,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:po(a.matches),errorInfo:y})}:void 0;return l.reduceRight((b,y,x)=>{let v,_=!1,k=null,w=null;a&&(v=o&&y.route.id?o[y.route.id]:void 0,k=y.route.errorElement||qS,u&&(d<0&&x===0?(Ev("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,w=null):d===x&&(_=!0,w=y.route.hydrateFallbackElement||null)));let C=n.concat(l.slice(0,x+1)),j=()=>{let R;return v?R=k:_?R=w:y.route.Component?R=N.createElement(y.route.Component,null):y.route.element?R=y.route.element:R=b,N.createElement(GS,{match:y,routeContext:{outlet:b,matches:C,isDataRoute:a!=null},children:R})};return a&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?N.createElement(vv,{location:a.location,revalidation:a.revalidation,component:k,error:v,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:h}):j()},null)}function cm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function VS(e){let n=N.useContext(Ua);return at(n,cm(e)),n}function YS(e){let n=N.useContext(go);return at(n,cm(e)),n}function QS(e){let n=N.useContext(Fr);return at(n,cm(e)),n}function um(e){let n=QS(e),r=n.matches[n.matches.length-1];return at(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function XS(){return um("useRouteId")}function ZS(){let e=N.useContext(lm),n=YS("useRouteError"),r=um("useRouteError");return e!==void 0?e:n.errors?.[r]}function WS(){let{router:e}=VS("useNavigate"),n=um("useNavigate"),r=N.useRef(!1);return xv(()=>{r.current=!0}),N.useCallback(async(l,o={})=>{xn(r.current,yv),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:n,...o}))},[e,n])}var ay={};function Ev(e,n,r){!n&&!ay[e]&&(ay[e]=!0,xn(!1,r))}var sy={};function ly(e,n){!e&&!sy[n]&&(sy[n]=!0,console.warn(n))}var JS="useOptimistic",oy=hw[JS],eN=()=>{};function tN(e){return oy?oy(e):[e,eN]}function nN(e){let n={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&xn(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:N.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&xn(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&xn(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),n}var rN=["HydrateFallback","hydrateFallbackElement"],iN=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function aN({router:e,flushSync:n,onError:r,unstable_useTransitions:a}){a=AS()||a;let[o,u]=N.useState(e.state),[d,f]=tN(o),[h,b]=N.useState(),[y,x]=N.useState({isTransitioning:!1}),[v,_]=N.useState(),[k,w]=N.useState(),[C,j]=N.useState(),R=N.useRef(new Map),H=N.useCallback((A,{deletedFetchers:ae,newErrors:P,flushSync:J,viewTransitionOpts:ee})=>{P&&r&&Object.values(P).forEach(le=>r(le,{location:A.location,params:A.matches[0]?.params??{},unstable_pattern:po(A.matches)})),A.fetchers.forEach((le,X)=>{le.data!==void 0&&R.current.set(X,le.data)}),ae.forEach(le=>R.current.delete(le)),ly(J===!1||n!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ve=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(ly(ee==null||ve,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ee||!ve){n&&J?n(()=>u(A)):a===!1?u(A):N.startTransition(()=>{a===!0&&f(le=>cy(le,A)),u(A)});return}if(n&&J){n(()=>{k&&(v?.resolve(),k.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})});let le=e.window.document.startViewTransition(()=>{n(()=>u(A))});le.finished.finally(()=>{n(()=>{_(void 0),w(void 0),b(void 0),x({isTransitioning:!1})})}),n(()=>w(le));return}k?(v?.resolve(),k.skipTransition(),j({state:A,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation})):(b(A),x({isTransitioning:!0,flushSync:!1,currentLocation:ee.currentLocation,nextLocation:ee.nextLocation}))},[e.window,n,k,v,a,f,r]);N.useLayoutEffect(()=>e.subscribe(H),[e,H]),N.useEffect(()=>{y.isTransitioning&&!y.flushSync&&_(new iN)},[y]),N.useEffect(()=>{if(v&&h&&e.window){let A=h,ae=v.promise,P=e.window.document.startViewTransition(async()=>{a===!1?u(A):N.startTransition(()=>{a===!0&&f(J=>cy(J,A)),u(A)}),await ae});P.finished.finally(()=>{_(void 0),w(void 0),b(void 0),x({isTransitioning:!1})}),w(P)}},[h,v,e.window,a,f]),N.useEffect(()=>{v&&h&&d.location.key===h.location.key&&v.resolve()},[v,k,d.location,h]),N.useEffect(()=>{!y.isTransitioning&&C&&(b(C.state),x({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),j(void 0))},[y.isTransitioning,C]);let $=N.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,ae,P)=>e.navigate(A,{state:ae,preventScrollReset:P?.preventScrollReset}),replace:(A,ae,P)=>e.navigate(A,{replace:!0,state:ae,preventScrollReset:P?.preventScrollReset})}),[e]),O=e.basename||"/",Z=N.useMemo(()=>({router:e,navigator:$,static:!1,basename:O,onError:r}),[e,$,O,r]);return N.createElement(N.Fragment,null,N.createElement(Ua.Provider,{value:Z},N.createElement(go.Provider,{value:d},N.createElement(gv.Provider,{value:R.current},N.createElement(sm.Provider,{value:y},N.createElement(cN,{basename:O,location:d.location,navigationType:d.historyAction,navigator:$,unstable_useTransitions:a},N.createElement(sN,{routes:e.routes,future:e.future,state:d,isStatic:!1,onError:r})))))),null)}function cy(e,n){return{...e,navigation:n.navigation.state!=="idle"?n.navigation:e.navigation,revalidation:n.revalidation!=="idle"?n.revalidation:e.revalidation,actionData:n.navigation.state!=="submitting"?n.actionData:e.actionData,fetchers:n.fetchers}}var sN=N.memo(lN);function lN({routes:e,future:n,state:r,isStatic:a,onError:l}){return PS(e,void 0,{state:r,isStatic:a,onError:l})}function oN(e){return FS(e.context)}function cN({basename:e="/",children:n=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:u}){at(!bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=N.useMemo(()=>({basename:d,navigator:l,static:o,unstable_useTransitions:u,future:{}}),[d,l,o,u]);typeof r=="string"&&(r=wi(r));let{pathname:h="/",search:b="",hash:y="",state:x=null,key:v="default",unstable_mask:_}=r,k=N.useMemo(()=>{let w=Ar(h,d);return w==null?null:{location:{pathname:w,search:b,hash:y,state:x,key:v,unstable_mask:_},navigationType:a}},[d,h,b,y,x,v,a,_]);return xn(k!=null,`<Router basename="${d}"> is not able to match the URL "${h}${b}${y}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:N.createElement(Or.Provider,{value:f},N.createElement(ku.Provider,{children:n,value:k}))}var eu="get",tu="application/x-www-form-urlencoded";function Su(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function uN(e){return Su(e)&&e.tagName.toLowerCase()==="button"}function dN(e){return Su(e)&&e.tagName.toLowerCase()==="form"}function fN(e){return Su(e)&&e.tagName.toLowerCase()==="input"}function hN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mN(e,n){return e.button===0&&(!n||n==="_self")&&!hN(e)}var Ic=null;function pN(){if(Ic===null)try{new FormData(document.createElement("form"),0),Ic=!1}catch{Ic=!0}return Ic}var gN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Yf(e){return e!=null&&!gN.has(e)?(xn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tu}"`),null):e}function bN(e,n){let r,a,l,o,u;if(dN(e)){let d=e.getAttribute("action");a=d?Ar(d,n):null,r=e.getAttribute("method")||eu,l=Yf(e.getAttribute("enctype"))||tu,o=new FormData(e)}else if(uN(e)||fN(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?Ar(f,n):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||eu,l=Yf(e.getAttribute("formenctype"))||Yf(d.getAttribute("enctype"))||tu,o=new FormData(d,e),!pN()){let{name:h,type:b,value:y}=e;if(b==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,y)}}else{if(Su(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=eu,a=null,l=tu,u=e}return o&&l==="text/plain"&&(u=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dm(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function yN(e,n,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:n&&Ar(l.pathname,n)==="/"?l.pathname=`${n.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function xN(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function vN(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function EN(e,n,r){let a=await Promise.all(e.map(async l=>{let o=n.routes[l.route.id];if(o){let u=await xN(o,r);return u.links?u.links():[]}return[]}));return SN(a.flat(1).filter(vN).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function uy(e,n,r,a,l,o){let u=(f,h)=>r[h]?f.route.id!==r[h].route.id:!0,d=(f,h)=>r[h].pathname!==f.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==f.params["*"];return o==="assets"?n.filter((f,h)=>u(f,h)||d(f,h)):o==="data"?n.filter((f,h)=>{let b=a.routes[f.route.id];if(!b||!b.hasLoader)return!1;if(u(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function _N(e,n,{includeHydrateFallback:r}={}){return kN(e.map(a=>{let l=n.routes[a.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function kN(e){return[...new Set(e)]}function wN(e){let n={},r=Object.keys(e).sort();for(let a of r)n[a]=e[a];return n}function SN(e,n){let r=new Set;return new Set(n),e.reduce((a,l)=>{let o=JSON.stringify(wN(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function _v(){let e=N.useContext(Ua);return dm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function NN(){let e=N.useContext(go);return dm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var fm=N.createContext(void 0);fm.displayName="FrameworkContext";function kv(){let e=N.useContext(fm);return dm(e,"You must render this element inside a <HydratedRouter> element"),e}function CN(e,n){let r=N.useContext(fm),[a,l]=N.useState(!1),[o,u]=N.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:b,onTouchStart:y}=n,x=N.useRef(null);N.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let k=C=>{C.forEach(j=>{u(j.isIntersecting)})},w=new IntersectionObserver(k,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[e]),N.useEffect(()=>{if(a){let k=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(k)}}},[a]);let v=()=>{l(!0)},_=()=>{l(!1),u(!1)};return r?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Fl(d,v),onBlur:Fl(f,_),onMouseEnter:Fl(h,v),onMouseLeave:Fl(b,_),onTouchStart:Fl(y,v)}]:[!1,x,{}]}function Fl(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function TN({page:e,...n}){let{router:r}=_v(),a=N.useMemo(()=>ra(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?N.createElement(RN,{page:e,matches:a,...n}):null}function zN(e){let{manifest:n,routeModules:r}=kv(),[a,l]=N.useState([]);return N.useEffect(()=>{let o=!1;return EN(e,n,r).then(u=>{o||l(u)}),()=>{o=!0}},[e,n,r]),a}function RN({page:e,matches:n,...r}){let a=Jr(),{future:l,manifest:o,routeModules:u}=kv(),{basename:d}=_v(),{loaderData:f,matches:h}=NN(),b=N.useMemo(()=>uy(e,n,h,o,a,"data"),[e,n,h,o,a]),y=N.useMemo(()=>uy(e,n,h,o,a,"assets"),[e,n,h,o,a]),x=N.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let k=new Set,w=!1;if(n.forEach(j=>{let R=o.routes[j.route.id];!R||!R.hasLoader||(!b.some(H=>H.route.id===j.route.id)&&j.route.id in f&&u[j.route.id]?.shouldRevalidate||R.hasClientLoader?w=!0:k.add(j.route.id))}),k.size===0)return[];let C=yN(e,d,l.unstable_trailingSlashAwareDataRequests,"data");return w&&k.size>0&&C.searchParams.set("_routes",n.filter(j=>k.has(j.route.id)).map(j=>j.route.id).join(",")),[C.pathname+C.search]},[d,l.unstable_trailingSlashAwareDataRequests,f,a,o,b,n,e,u]),v=N.useMemo(()=>_N(y,o),[y,o]),_=zN(y);return N.createElement(N.Fragment,null,x.map(k=>N.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),v.map(k=>N.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),_.map(({key:k,link:w})=>N.createElement("link",{key:k,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function AN(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var ON=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ON&&(window.__reactRouterVersion="7.13.1")}catch{}function MN(e,n){return sS({basename:n?.basename,getContext:n?.getContext,future:n?.future,history:_w({window:n?.window}),hydrationData:DN(),routes:e,mapRouteProperties:nN,hydrationRouteProperties:rN,dataStrategy:n?.dataStrategy,patchRoutesOnNavigation:n?.patchRoutesOnNavigation,window:n?.window,unstable_instrumentations:n?.unstable_instrumentations}).initialize()}function DN(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:LN(e.errors)}),e}function LN(e){if(!e)return null;let n=Object.entries(e),r={};for(let[a,l]of n)if(l&&l.__type==="RouteErrorResponse")r[a]=new mo(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let u=new o(l.message);u.stack="",r[a]=u}catch{}}if(r[a]==null){let o=new Error(l.message);o.stack="",r[a]=o}}else r[a]=l;return r}var wv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=N.forwardRef(function({onClick:n,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:u,unstable_mask:d,state:f,target:h,to:b,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:v,..._},k){let{basename:w,navigator:C,unstable_useTransitions:j}=N.useContext(Or),R=typeof b=="string"&&wv.test(b),H=nv(b,w);b=H.to;let $=IS(b,{relative:l}),O=Jr(),Z=null;if(d){let X=_u(d,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);w!=="/"&&(X.pathname=X.pathname==="/"?w:Br([w,X.pathname])),Z=C.createHref(X)}let[A,ae,P]=CN(a,_),J=UN(b,{replace:u,unstable_mask:d,state:f,target:h,preventScrollReset:y,relative:l,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:j});function ee(X){n&&n(X),X.defaultPrevented||J(X)}let ve=!(H.isExternal||o),le=N.createElement("a",{..._,...P,href:(ve?Z:void 0)||H.absoluteURL||$,onClick:ve?ee:n,ref:AN(k,ae),target:h,"data-discover":!R&&r==="render"?"true":void 0});return A&&!R?N.createElement(N.Fragment,null,le,N.createElement(TN,{page:$})):le});Dn.displayName="Link";var jN=N.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:u,viewTransition:d,children:f,...h},b){let y=yo(u,{relative:h.relative}),x=Jr(),v=N.useContext(go),{navigator:_,basename:k}=N.useContext(Or),w=v!=null&&$N(y)&&d===!0,C=_.encodeLocation?_.encodeLocation(y).pathname:y.pathname,j=x.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(j=j.toLowerCase(),R=R?R.toLowerCase():null,C=C.toLowerCase()),R&&k&&(R=Ar(R,k)||R);const H=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let $=j===C||!l&&j.startsWith(C)&&j.charAt(H)==="/",O=R!=null&&(R===C||!l&&R.startsWith(C)&&R.charAt(C.length)==="/"),Z={isActive:$,isPending:O,isTransitioning:w},A=$?n:void 0,ae;typeof a=="function"?ae=a(Z):ae=[a,$?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(Z):o;return N.createElement(Dn,{...h,"aria-current":A,className:ae,ref:b,style:P,to:u,viewTransition:d},typeof f=="function"?f(Z):f)});jN.displayName="NavLink";var IN=N.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:a,replace:l,state:o,method:u=eu,action:d,onSubmit:f,relative:h,preventScrollReset:b,viewTransition:y,unstable_defaultShouldRevalidate:x,...v},_)=>{let{unstable_useTransitions:k}=N.useContext(Or),w=HN(),C=qN(d,{relative:h}),j=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&wv.test(d),H=$=>{if(f&&f($),$.defaultPrevented)return;$.preventDefault();let O=$.nativeEvent.submitter,Z=O?.getAttribute("formmethod")||u,A=()=>w(O||$.currentTarget,{fetcherKey:n,method:Z,navigate:r,replace:l,state:o,relative:h,preventScrollReset:b,viewTransition:y,unstable_defaultShouldRevalidate:x});k&&r!==!1?N.startTransition(()=>A()):A()};return N.createElement("form",{ref:_,method:j,action:C,onSubmit:a?f:H,...v,"data-discover":!R&&e==="render"?"true":void 0})});IN.displayName="Form";function BN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sv(e){let n=N.useContext(Ua);return at(n,BN(e)),n}function UN(e,{target:n,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let b=om(),y=Jr(),x=yo(e,{relative:u});return N.useCallback(v=>{if(mN(v,n)){v.preventDefault();let _=r!==void 0?r:Xr(y)===Xr(x),k=()=>b(e,{replace:_,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:d,unstable_defaultShouldRevalidate:f});h?N.startTransition(()=>k()):k()}},[y,b,x,r,a,l,n,e,o,u,d,f,h])}var FN=0,PN=()=>`__${String(++FN)}__`;function HN(){let{router:e}=Sv("useSubmit"),{basename:n}=N.useContext(Or),r=XS(),a=e.fetch,l=e.navigate;return N.useCallback(async(o,u={})=>{let{action:d,method:f,encType:h,formData:b,body:y}=bN(o,n);if(u.navigate===!1){let x=u.fetcherKey||PN();await a(x,r,u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:y,formMethod:u.method||f,formEncType:u.encType||h,flushSync:u.flushSync})}else await l(u.action||d,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:y,formMethod:u.method||f,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:r,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,l,n,r])}function qN(e,{relative:n}={}){let{basename:r}=N.useContext(Or),a=N.useContext(Fr);at(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...yo(e||".",{relative:n})},u=Jr();if(e==null){o.search=u.search;let d=new URLSearchParams(o.search),f=d.getAll("index");if(f.some(b=>b==="")){d.delete("index"),f.filter(y=>y).forEach(y=>d.append("index",y));let b=d.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Br([r,o.pathname])),Xr(o)}function $N(e,{relative:n}={}){let r=N.useContext(sm);at(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Sv("useViewTransitionState"),l=yo(e,{relative:n});if(!r.isTransitioning)return!1;let o=Ar(r.currentLocation.pathname,a)||r.currentLocation.pathname,u=Ar(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ou(l.pathname,u)!=null||ou(l.pathname,o)!=null}var GN=Yx();function KN(e){return N.createElement(aN,{flushSync:GN.flushSync,...e})}const Nv=N.createContext(null),Cv="ocr-dashboard-theme",Qf=["system","light","dark"];function VN(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function YN(){try{const e=localStorage.getItem(Cv);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}function QN({children:e}){const[n,r]=N.useState(YN),[a,l]=N.useState(VN);N.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),h=b=>{l(b.matches?"dark":"light")};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);const o=n==="system"?a:n;N.useEffect(()=>{const f=document.documentElement;f.classList.remove("light","dark"),f.classList.add(o);const h=o==="dark"?"/favicon-light.ico":"/favicon-dark.ico",b=document.querySelector("link#favicon");b&&(b.href=h)},[o]),N.useEffect(()=>{try{localStorage.setItem(Cv,n)}catch{}},[n]);const u=N.useCallback(()=>{r(f=>{const h=Qf.indexOf(f);return Qf[(h+1)%Qf.length]})},[]),d=N.useMemo(()=>({mode:n,resolved:o,cycle:u,theme:n,toggleTheme:u}),[n,o,u]);return p.jsx(Nv,{value:d,children:e})}function Tv(){const e=N.useContext(Nv);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Zr=Object.create(null);Zr.open="0";Zr.close="1";Zr.ping="2";Zr.pong="3";Zr.message="4";Zr.upgrade="5";Zr.noop="6";const nu=Object.create(null);Object.keys(Zr).forEach(e=>{nu[Zr[e]]=e});const zh={type:"error",data:"parser error"},zv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Rv=typeof ArrayBuffer=="function",Av=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hm=({type:e,data:n},r,a)=>zv&&n instanceof Blob?r?a(n):dy(n,a):Rv&&(n instanceof ArrayBuffer||Av(n))?r?a(n):dy(new Blob([n]),a):a(Zr[e]+(n||"")),dy=(e,n)=>{const r=new FileReader;return r.onload=function(){const a=r.result.split(",")[1];n("b"+(a||""))},r.readAsDataURL(e)};function fy(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Xf;function XN(e,n){if(zv&&e.data instanceof Blob)return e.data.arrayBuffer().then(fy).then(n);if(Rv&&(e.data instanceof ArrayBuffer||Av(e.data)))return n(fy(e.data));hm(e,!1,r=>{Xf||(Xf=new TextEncoder),n(Xf.encode(r))})}const hy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<hy.length;e++)Xl[hy.charCodeAt(e)]=e;const ZN=e=>{let n=e.length*.75,r=e.length,a,l=0,o,u,d,f;e[e.length-1]==="="&&(n--,e[e.length-2]==="="&&n--);const h=new ArrayBuffer(n),b=new Uint8Array(h);for(a=0;a<r;a+=4)o=Xl[e.charCodeAt(a)],u=Xl[e.charCodeAt(a+1)],d=Xl[e.charCodeAt(a+2)],f=Xl[e.charCodeAt(a+3)],b[l++]=o<<2|u>>4,b[l++]=(u&15)<<4|d>>2,b[l++]=(d&3)<<6|f&63;return h},WN=typeof ArrayBuffer=="function",mm=(e,n)=>{if(typeof e!="string")return{type:"message",data:Ov(e,n)};const r=e.charAt(0);return r==="b"?{type:"message",data:JN(e.substring(1),n)}:nu[r]?e.length>1?{type:nu[r],data:e.substring(1)}:{type:nu[r]}:zh},JN=(e,n)=>{if(WN){const r=ZN(e);return Ov(r,n)}else return{base64:!0,data:e}},Ov=(e,n)=>{switch(n){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Mv="",eC=(e,n)=>{const r=e.length,a=new Array(r);let l=0;e.forEach((o,u)=>{hm(o,!1,d=>{a[u]=d,++l===r&&n(a.join(Mv))})})},tC=(e,n)=>{const r=e.split(Mv),a=[];for(let l=0;l<r.length;l++){const o=mm(r[l],n);if(a.push(o),o.type==="error")break}return a};function nC(){return new TransformStream({transform(e,n){XN(e,r=>{const a=r.length;let l;if(a<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,a);else if(a<65536){l=new Uint8Array(3);const o=new DataView(l.buffer);o.setUint8(0,126),o.setUint16(1,a)}else{l=new Uint8Array(9);const o=new DataView(l.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(l[0]|=128),n.enqueue(l),n.enqueue(r)})}})}let Zf;function Bc(e){return e.reduce((n,r)=>n+r.length,0)}function Uc(e,n){if(e[0].length===n)return e.shift();const r=new Uint8Array(n);let a=0;for(let l=0;l<n;l++)r[l]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),r}function rC(e,n){Zf||(Zf=new TextDecoder);const r=[];let a=0,l=-1,o=!1;return new TransformStream({transform(u,d){for(r.push(u);;){if(a===0){if(Bc(r)<1)break;const f=Uc(r,1);o=(f[0]&128)===128,l=f[0]&127,l<126?a=3:l===126?a=1:a=2}else if(a===1){if(Bc(r)<2)break;const f=Uc(r,2);l=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),a=3}else if(a===2){if(Bc(r)<8)break;const f=Uc(r,8),h=new DataView(f.buffer,f.byteOffset,f.length),b=h.getUint32(0);if(b>Math.pow(2,21)-1){d.enqueue(zh);break}l=b*Math.pow(2,32)+h.getUint32(4),a=3}else{if(Bc(r)<l)break;const f=Uc(r,l);d.enqueue(mm(o?f:Zf.decode(f),n)),a=0}if(l===0||l>e){d.enqueue(zh);break}}}})}const Dv=4;function yn(e){if(e)return iC(e)}function iC(e){for(var n in yn.prototype)e[n]=yn.prototype[n];return e}yn.prototype.on=yn.prototype.addEventListener=function(e,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(n),this};yn.prototype.once=function(e,n){function r(){this.off(e,r),n.apply(this,arguments)}return r.fn=n,this.on(e,r),this};yn.prototype.off=yn.prototype.removeListener=yn.prototype.removeAllListeners=yn.prototype.removeEventListener=function(e,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,l=0;l<r.length;l++)if(a=r[l],a===n||a.fn===n){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+e],this};yn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),r=this._callbacks["$"+e],a=1;a<arguments.length;a++)n[a-1]=arguments[a];if(r){r=r.slice(0);for(var a=0,l=r.length;a<l;++a)r[a].apply(this,n)}return this};yn.prototype.emitReserved=yn.prototype.emit;yn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};yn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Nu=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0),zr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),aC="arraybuffer";function Lv(e,...n){return n.reduce((r,a)=>(e.hasOwnProperty(a)&&(r[a]=e[a]),r),{})}const sC=zr.setTimeout,lC=zr.clearTimeout;function Cu(e,n){n.useNativeTimers?(e.setTimeoutFn=sC.bind(zr),e.clearTimeoutFn=lC.bind(zr)):(e.setTimeoutFn=zr.setTimeout.bind(zr),e.clearTimeoutFn=zr.clearTimeout.bind(zr))}const oC=1.33;function cC(e){return typeof e=="string"?uC(e):Math.ceil((e.byteLength||e.size)*oC)}function uC(e){let n=0,r=0;for(let a=0,l=e.length;a<l;a++)n=e.charCodeAt(a),n<128?r+=1:n<2048?r+=2:n<55296||n>=57344?r+=3:(a++,r+=4);return r}function jv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function dC(e){let n="";for(let r in e)e.hasOwnProperty(r)&&(n.length&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return n}function fC(e){let n={},r=e.split("&");for(let a=0,l=r.length;a<l;a++){let o=r[a].split("=");n[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return n}class hC extends Error{constructor(n,r,a){super(n),this.description=r,this.context=a,this.type="TransportError"}}class pm extends yn{constructor(n){super(),this.writable=!1,Cu(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,r,a){return super.emitReserved("error",new hC(n,r,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const r=mm(n,this.socket.binaryType);this.onPacket(r)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,r={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(n){const r=dC(n);return r.length?"?"+r:""}}class mC extends pm{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const r=()=>{this.readyState="paused",n()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||r()})),this.writable||(a++,this.once("drain",function(){--a||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(n){const r=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};tC(n,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,eC(n,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=jv()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(n,r)}}let Iv=!1;try{Iv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const pC=Iv;function gC(){}class bC extends mC{constructor(n){if(super(n),typeof location<"u"){const r=location.protocol==="https:";let a=location.port;a||(a=r?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||a!==n.port}}doWrite(n,r){const a=this.request({method:"POST",data:n});a.on("success",r),a.on("error",(l,o)=>{this.onError("xhr post error",l,o)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(r,a)=>{this.onError("xhr poll error",r,a)}),this.pollXhr=n}}let Ds=class ru extends yn{constructor(n,r,a){super(),this.createRequest=n,Cu(this,a),this._opts=a,this._method=a.method||"GET",this._uri=r,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var n;const r=Lv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(r);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&a.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(n=this._opts.cookieJar)===null||n===void 0||n.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var l;a.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=ru.requestsCount++,ru.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=gC,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ru.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Ds.requestsCount=0;Ds.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",my);else if(typeof addEventListener=="function"){const e="onpagehide"in zr?"pagehide":"unload";addEventListener(e,my,!1)}}function my(){for(let e in Ds.requests)Ds.requests.hasOwnProperty(e)&&Ds.requests[e].abort()}const yC=(function(){const e=Bv({xdomain:!1});return e&&e.responseType!==null})();class xC extends bC{constructor(n){super(n);const r=n&&n.forceBase64;this.supportsBinary=yC&&!r}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new Ds(Bv,this.uri(),n)}}function Bv(e){const n=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||pC))return new XMLHttpRequest}catch{}if(!n)try{return new zr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Uv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class vC extends pm{get name(){return"websocket"}doOpen(){const n=this.uri(),r=this.opts.protocols,a=Uv?{}:Lv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(n,r,a)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const a=n[r],l=r===n.length-1;hm(a,this.supportsBinary,o=>{try{this.doWrite(a,o)}catch{}l&&Nu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=jv()),this.supportsBinary||(r.b64=1),this.createUri(n,r)}}const Wf=zr.WebSocket||zr.MozWebSocket;class EC extends vC{createSocket(n,r,a){return Uv?new Wf(n,r,a):r?new Wf(n,r):new Wf(n)}doWrite(n,r){this.ws.send(r)}}class _C extends pm{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const r=rC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=n.readable.pipeThrough(r).getReader(),l=nC();l.readable.pipeTo(n.writable),this._writer=l.writable.getWriter();const o=()=>{a.read().then(({done:d,value:f})=>{d||(this.onPacket(f),o())}).catch(d=>{})};o();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const a=n[r],l=r===n.length-1;this._writer.write(a).then(()=>{l&&Nu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const kC={websocket:EC,webtransport:_C,polling:xC},wC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,SC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rh(e){if(e.length>8e3)throw"URI too long";const n=e,r=e.indexOf("["),a=e.indexOf("]");r!=-1&&a!=-1&&(e=e.substring(0,r)+e.substring(r,a).replace(/:/g,";")+e.substring(a,e.length));let l=wC.exec(e||""),o={},u=14;for(;u--;)o[SC[u]]=l[u]||"";return r!=-1&&a!=-1&&(o.source=n,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=NC(o,o.path),o.queryKey=CC(o,o.query),o}function NC(e,n){const r=/\/{2,9}/g,a=n.replace(r,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&a.splice(0,1),n.slice(-1)=="/"&&a.splice(a.length-1,1),a}function CC(e,n){const r={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,l,o){l&&(r[l]=o)}),r}const Ah=typeof addEventListener=="function"&&typeof removeEventListener=="function",iu=[];Ah&&addEventListener("offline",()=>{iu.forEach(e=>e())},!1);class la extends yn{constructor(n,r){if(super(),this.binaryType=aC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(r=n,n=null),n){const a=Rh(n);r.hostname=a.host,r.secure=a.protocol==="https"||a.protocol==="wss",r.port=a.port,a.query&&(r.query=a.query)}else r.host&&(r.hostname=Rh(r.host).host);Cu(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(a=>{const l=a.prototype.name;this.transports.push(l),this._transportsByName[l]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=fC(this.opts.query)),Ah&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},iu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const r=Object.assign({},this.opts.query);r.EIO=Dv,r.transport=n,this.id&&(r.sid=this.id);const a=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new this._transportsByName[n](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&la.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(n);r.open(),this.setTransport(r)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",la.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=n.data,this._onError(r);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let a=0;a<this.writeBuffer.length;a++){const l=this.writeBuffer[a].data;if(l&&(r+=cC(l)),a>0&&r>this._maxPayload)return this.writeBuffer.slice(0,a);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,Nu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,r,a){return this._sendPacket("message",n,r,a),this}send(n,r,a){return this._sendPacket("message",n,r,a),this}_sendPacket(n,r,a,l){if(typeof r=="function"&&(l=r,r=void 0),typeof a=="function"&&(l=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const o={type:n,data:r,options:a};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),l&&this.once("flush",l),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),n()},a=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():n()}):this.upgrading?a():n()),this}_onError(n){if(la.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ah&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=iu.indexOf(this._offlineEventListener);a!==-1&&iu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,r),this.writeBuffer=[],this._prevBufferLen=0}}}la.protocol=Dv;class TC extends la{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let r=this.createTransport(n),a=!1;la.priorWebsocketSuccess=!1;const l=()=>{a||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!a)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;la.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(b(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=r.name,this.emitReserved("upgradeError",x)}}))};function o(){a||(a=!0,b(),r.close(),r=null)}const u=y=>{const x=new Error("probe error: "+y);x.transport=r.name,o(),this.emitReserved("upgradeError",x)};function d(){u("transport closed")}function f(){u("socket closed")}function h(y){r&&y.name!==r.name&&o()}const b=()=>{r.removeListener("open",l),r.removeListener("error",u),r.removeListener("close",d),this.off("close",f),this.off("upgrading",h)};r.once("open",l),r.once("error",u),r.once("close",d),this.once("close",f),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{a||r.open()},200):r.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const r=[];for(let a=0;a<n.length;a++)~this.transports.indexOf(n[a])&&r.push(n[a]);return r}}let zC=class extends TC{constructor(n,r={}){const a=typeof n=="object"?n:r;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(l=>kC[l]).filter(l=>!!l)),super(n,a)}};function RC(e,n="",r){let a=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),a=Rh(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const o=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+o+":"+a.port+n,a.href=a.protocol+"://"+o+(r&&r.port===a.port?"":":"+a.port),a}const AC=typeof ArrayBuffer=="function",OC=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Fv=Object.prototype.toString,MC=typeof Blob=="function"||typeof Blob<"u"&&Fv.call(Blob)==="[object BlobConstructor]",DC=typeof File=="function"||typeof File<"u"&&Fv.call(File)==="[object FileConstructor]";function gm(e){return AC&&(e instanceof ArrayBuffer||OC(e))||MC&&e instanceof Blob||DC&&e instanceof File}function au(e,n){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,a=e.length;r<a;r++)if(au(e[r]))return!0;return!1}if(gm(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return au(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&au(e[r]))return!0;return!1}function LC(e){const n=[],r=e.data,a=e;return a.data=Oh(r,n),a.attachments=n.length,{packet:a,buffers:n}}function Oh(e,n){if(!e)return e;if(gm(e)){const r={_placeholder:!0,num:n.length};return n.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let a=0;a<e.length;a++)r[a]=Oh(e[a],n);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=Oh(e[a],n));return r}return e}function jC(e,n){return e.data=Mh(e.data,n),delete e.attachments,e}function Mh(e,n){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<n.length)return n[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=Mh(e[r],n);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=Mh(e[r],n));return e}const IC=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var bt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(bt||(bt={}));class BC{constructor(n){this.replacer=n}encode(n){return(n.type===bt.EVENT||n.type===bt.ACK)&&au(n)?this.encodeAsBinary({type:n.type===bt.EVENT?bt.BINARY_EVENT:bt.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let r=""+n.type;return(n.type===bt.BINARY_EVENT||n.type===bt.BINARY_ACK)&&(r+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(r+=n.nsp+","),n.id!=null&&(r+=n.id),n.data!=null&&(r+=JSON.stringify(n.data,this.replacer)),r}encodeAsBinary(n){const r=LC(n),a=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(a),l}}class bm extends yn{constructor(n){super(),this.reviver=n}add(n){let r;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(n);const a=r.type===bt.BINARY_EVENT;a||r.type===bt.BINARY_ACK?(r.type=a?bt.EVENT:bt.ACK,this.reconstructor=new UC(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(gm(n)||n.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(n),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n)}decodeString(n){let r=0;const a={type:Number(n.charAt(0))};if(bt[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===bt.BINARY_EVENT||a.type===bt.BINARY_ACK){const o=r+1;for(;n.charAt(++r)!=="-"&&r!=n.length;);const u=n.substring(o,r);if(u!=Number(u)||n.charAt(r)!=="-")throw new Error("Illegal attachments");a.attachments=Number(u)}if(n.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(n.charAt(r)===","||r===n.length););a.nsp=n.substring(o,r)}else a.nsp="/";const l=n.charAt(r+1);if(l!==""&&Number(l)==l){const o=r+1;for(;++r;){const u=n.charAt(r);if(u==null||Number(u)!=u){--r;break}if(r===n.length)break}a.id=Number(n.substring(o,r+1))}if(n.charAt(++r)){const o=this.tryParse(n.substr(r));if(bm.isPayloadValid(a.type,o))a.data=o;else throw new Error("invalid payload")}return a}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,r){switch(n){case bt.CONNECT:return py(r);case bt.DISCONNECT:return r===void 0;case bt.CONNECT_ERROR:return typeof r=="string"||py(r);case bt.EVENT:case bt.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&IC.indexOf(r[0])===-1);case bt.ACK:case bt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class UC{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const r=jC(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function py(e){return Object.prototype.toString.call(e)==="[object Object]"}const FC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:bm,Encoder:BC,get PacketType(){return bt}},Symbol.toStringTag,{value:"Module"}));function Ir(e,n,r){return e.on(n,r),function(){e.off(n,r)}}const PC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Pv extends yn{constructor(n,r,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=n,this.nsp=r,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const n=this.io;this.subs=[Ir(n,"open",this.onopen.bind(this)),Ir(n,"packet",this.onpacket.bind(this)),Ir(n,"error",this.onerror.bind(this)),Ir(n,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...r){var a,l,o;if(PC.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(r.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const u={type:bt.EVENT,data:r};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const b=this.ids++,y=r.pop();this._registerAckCallback(b,y),u.id=b}const d=(l=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||l===void 0?void 0:l.writable,f=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(n,r){var a;const l=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(l===void 0){this.acks[n]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let d=0;d<this.sendBuffer.length;d++)this.sendBuffer[d].id===n&&this.sendBuffer.splice(d,1);r.call(this,new Error("operation has timed out"))},l),u=(...d)=>{this.io.clearTimeoutFn(o),r.apply(this,d)};u.withError=!0,this.acks[n]=u}emitWithAck(n,...r){return new Promise((a,l)=>{const o=(u,d)=>u?l(u):a(d);o.withError=!0,r.push(o),this.emit(n,...r)})}_addToQueue(n){let r;typeof n[n.length-1]=="function"&&(r=n.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.push((l,...o)=>(this._queue[0],l!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(l)):(this._queue.shift(),r&&r(null,...o)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(n=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!n||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:bt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(a=>String(a.id)===n)){const a=this.acks[n];delete this.acks[n],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case bt.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case bt.EVENT:case bt.BINARY_EVENT:this.onevent(n);break;case bt.ACK:case bt.BINARY_ACK:this.onack(n);break;case bt.DISCONNECT:this.ondisconnect();break;case bt.CONNECT_ERROR:this.destroy();const a=new Error(n.data.message);a.data=n.data.data,this.emitReserved("connect_error",a);break}}onevent(n){const r=n.data||[];n.id!=null&&r.push(this.ack(n.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const a of r)a.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const r=this;let a=!1;return function(...l){a||(a=!0,r.packet({type:bt.ACK,id:n,data:l}))}}onack(n){const r=this.acks[n.id];typeof r=="function"&&(delete this.acks[n.id],r.withError&&n.data.unshift(null),r.apply(this,n.data))}onconnect(n,r){this.id=n,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:bt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const r=this._anyListeners;for(let a=0;a<r.length;a++)if(n===r[a])return r.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const r=this._anyOutgoingListeners;for(let a=0;a<r.length;a++)if(n===r[a])return r.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const a of r)a.apply(this,n.data)}}}function Us(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Us.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*e);e=(Math.floor(n*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};Us.prototype.reset=function(){this.attempts=0};Us.prototype.setMin=function(e){this.ms=e};Us.prototype.setMax=function(e){this.max=e};Us.prototype.setJitter=function(e){this.jitter=e};class Dh extends yn{constructor(n,r){var a;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(r=n,n=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Cu(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((a=r.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Us({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=n;const l=r.parser||FC;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var r;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(r=this.backoff)===null||r===void 0||r.setMin(n),this)}randomizationFactor(n){var r;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(r=this.backoff)===null||r===void 0||r.setJitter(n),this)}reconnectionDelayMax(n){var r;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(r=this.backoff)===null||r===void 0||r.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new zC(this.uri,this.opts);const r=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const l=Ir(r,"open",function(){a.onopen(),n&&n()}),o=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),n?n(d):this.maybeReconnectOnOpen()},u=Ir(r,"error",o);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{l(),o(new Error("timeout")),r.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(l),this.subs.push(u),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(Ir(n,"ping",this.onping.bind(this)),Ir(n,"data",this.ondata.bind(this)),Ir(n,"error",this.onerror.bind(this)),Ir(n,"close",this.onclose.bind(this)),Ir(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(r){this.onclose("parse error",r)}}ondecoded(n){Nu(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,r){let a=this.nsps[n];return a?this._autoConnect&&!a.active&&a.connect():(a=new Pv(this,n,r),this.nsps[n]=a),a}_destroy(n){const r=Object.keys(this.nsps);for(const a of r)if(this.nsps[a].active)return;this._close()}_packet(n){const r=this.encoder.encode(n);for(let a=0;a<r.length;a++)this.engine.write(r[a],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,r){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(l=>{l?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",l)):n.onreconnect()}))},r);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Pl={};function su(e,n){typeof e=="object"&&(n=e,e=void 0),n=n||{};const r=RC(e,n.path||"/socket.io"),a=r.source,l=r.id,o=r.path,u=Pl[l]&&o in Pl[l].nsps,d=n.forceNew||n["force new connection"]||n.multiplex===!1||u;let f;return d?f=new Dh(a,n):(Pl[l]||(Pl[l]=new Dh(a,n)),f=Pl[l]),r.query&&!n.query&&(n.query=r.queryKey),f.socket(r.path,n)}Object.assign(su,{Manager:Dh,Socket:Pv,io:su,connect:su});let Zl=null,Jf=null;function Hv(){return Zl||(window.__OCR_TOKEN__?(Zl=window.__OCR_TOKEN__,Zl):null)}async function qv(){const e=Hv();return e||(Jf||(Jf=fetch("/auth/token").then(n=>{if(!n.ok)throw new Error(`Failed to fetch auth token: ${n.status}`);return n.json()}).then(n=>(Zl=n.token,window.__OCR_TOKEN__=n.token,n.token))),Jf)}function HC(){const e=Hv();return e?{Authorization:`Bearer ${e}`}:{}}const $v=N.createContext(null);function qC({children:e}){const[n,r]=N.useState("connecting"),a=N.useRef(null),l=N.useRef(new Set);N.useEffect(()=>{let f=!1;return qv().then(h=>{if(f)return;const b=su({autoConnect:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:5e3,auth:{token:h}});a.current=b,b.on("connect",()=>{r("connected");for(const y of l.current)b.emit("join:session",y)}),b.on("disconnect",()=>{r("disconnected")}),b.io.on("reconnect_attempt",()=>{r("reconnecting")})}),()=>{f=!0,a.current?.disconnect(),a.current=null}},[]);const o=N.useCallback(f=>{l.current.add(f),a.current?.emit("join:session",f)},[]),u=N.useCallback(f=>{l.current.delete(f),a.current?.emit("leave:session",f)},[]),d=N.useMemo(()=>({socket:a.current,status:n,isConnected:n==="connected",joinRoom:o,leaveRoom:u}),[n,o,u]);return p.jsx($v,{value:d,children:e})}function Fa(){const e=N.useContext($v);if(!e)throw new Error("useSocket must be used within SocketProvider");return e}function Tt(e,n){const{socket:r}=Fa(),a=N.useRef(n);a.current=n,N.useEffect(()=>{if(!r)return;const l=o=>a.current(o);return r.on(e,l),()=>{r.off(e,l)}},[r,e])}var Fs=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(){}},$C={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},GC=class{#e=$C;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},La=new GC;function KC(e){setTimeout(e,0)}var ja=typeof window>"u"||"Deno"in globalThis;function qn(){}function VC(e,n){return typeof e=="function"?e(n):e}function Lh(e){return typeof e=="number"&&e>=0&&e!==1/0}function Gv(e,n){return Math.max(e+(n||0)-Date.now(),0)}function oa(e,n){return typeof e=="function"?e(n):e}function Tr(e,n){return typeof e=="function"?e(n):e}function gy(e,n){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:u,stale:d}=e;if(u){if(a){if(n.queryHash!==ym(u,n.options))return!1}else if(!lo(n.queryKey,u))return!1}if(r!=="all"){const f=n.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof d=="boolean"&&n.isStale()!==d||l&&l!==n.state.fetchStatus||o&&!o(n))}function by(e,n){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!n.options.mutationKey)return!1;if(r){if(Ia(n.options.mutationKey)!==Ia(o))return!1}else if(!lo(n.options.mutationKey,o))return!1}return!(a&&n.state.status!==a||l&&!l(n))}function ym(e,n){return(n?.queryKeyHashFn||Ia)(e)}function Ia(e){return JSON.stringify(e,(n,r)=>jh(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function lo(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(r=>lo(e[r],n[r])):!1}var YC=Object.prototype.hasOwnProperty;function Kv(e,n,r=0){if(e===n)return e;if(r>500)return n;const a=yy(e)&&yy(n);if(!a&&!(jh(e)&&jh(n)))return n;const o=(a?e:Object.keys(e)).length,u=a?n:Object.keys(n),d=u.length,f=a?new Array(d):{};let h=0;for(let b=0;b<d;b++){const y=a?b:u[b],x=e[y],v=n[y];if(x===v){f[y]=x,(a?b<o:YC.call(e,y))&&h++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){f[y]=v;continue}const _=Kv(x,v,r+1);f[y]=_,_===x&&h++}return o===d&&h===o?e:f}function cu(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const r in e)if(e[r]!==n[r])return!1;return!0}function yy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jh(e){if(!xy(e))return!1;const n=e.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!xy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xy(e){return Object.prototype.toString.call(e)==="[object Object]"}function QC(e){return new Promise(n=>{La.setTimeout(n,e)})}function Ih(e,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,n):r.structuralSharing!==!1?Kv(e,n):n}function XC(e,n,r=0){const a=[...e,n];return r&&a.length>r?a.slice(1):a}function ZC(e,n,r=0){const a=[n,...e];return r&&a.length>r?a.slice(0,-1):a}var xm=Symbol();function Vv(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===xm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vm(e,n){return typeof e=="function"?e(...n):!!e}function WC(e,n,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??=n(),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var JC=class extends Fs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ja&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",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(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Em=new JC;function Bh(){let e,n;const r=new Promise((l,o)=>{e=l,n=o});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),n(l)},r}var eT=KC;function tT(){let e=[],n=0,r=d=>{d()},a=d=>{d()},l=eT;const o=d=>{n?e.push(d):l(()=>{r(d)})},u=()=>{const d=e;e=[],d.length&&l(()=>{a(()=>{d.forEach(f=>{r(f)})})})};return{batch:d=>{let f;n++;try{f=d()}finally{n--,n||u()}return f},batchCalls:d=>(...f)=>{o(()=>{d(...f)})},schedule:o,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{l=d}}}var kn=tT(),nT=class extends Fs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ja&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}}}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(r=>{r(e)}))}isOnline(){return this.#e}},uu=new nT;function rT(e){return Math.min(1e3*2**e,3e4)}function Yv(e){return(e??"online")==="online"?uu.isOnline():!0}var Uh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Qv(e){let n=!1,r=0,a;const l=Bh(),o=()=>l.status!=="pending",u=k=>{if(!o()){const w=new Uh(k);x(w),e.onCancel?.(w)}},d=()=>{n=!0},f=()=>{n=!1},h=()=>Em.isFocused()&&(e.networkMode==="always"||uu.isOnline())&&e.canRun(),b=()=>Yv(e.networkMode)&&e.canRun(),y=k=>{o()||(a?.(),l.resolve(k))},x=k=>{o()||(a?.(),l.reject(k))},v=()=>new Promise(k=>{a=w=>{(o()||h())&&k(w)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),_=()=>{if(o())return;let k;const w=r===0?e.initialPromise:void 0;try{k=w??e.fn()}catch(C){k=Promise.reject(C)}Promise.resolve(k).then(y).catch(C=>{if(o())return;const j=e.retry??(ja?0:3),R=e.retryDelay??rT,H=typeof R=="function"?R(r,C):R,$=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,C);if(n||!$){x(C);return}r++,e.onFail?.(r,C),QC(H).then(()=>h()?void 0:v()).then(()=>{n?x(C):_()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(a?.(),l),cancelRetry:d,continueRetry:f,canStart:b,start:()=>(b()?_():v().then(_),l)}}var Xv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lh(this.gcTime)&&(this.#e=La.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ja?1/0:300*1e3))}clearGcTimeout(){this.#e&&(La.clearTimeout(this.#e),this.#e=void 0)}},iT=class extends Xv{#e;#t;#n;#i;#r;#s;#l;constructor(e){super(),this.#l=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ey(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ey(this.options);n.data!==void 0&&(this.setState(vy(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const r=Ih(this.state.data,e,this.options);return this.#a({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(e,n){this.#a({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(qn).catch(qn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Tr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xm||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>oa(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:!Gv(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#l?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#l=!0,r.signal)})},l=()=>{const d=Vv(this.options,n),h=(()=>{const b={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(b),b})();return this.#l=!1,this.options.persister?this.options.persister(d,h,this):d(h)},u=(()=>{const d={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return a(d),d})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=Qv({initialPromise:n?.initialPromise,fn:u.fetchFn,onCancel:d=>{d instanceof Uh&&d.revert&&this.setState({...this.#t,fetchStatus:"idle"}),r.abort()},onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const d=await this.#r.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Uh){if(d.silent)return this.#r.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#a({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#a(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Zv(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...vy(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const l=e.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),kn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Zv(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yv(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function vy(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ey(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,r=n!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var aT=class extends Fs{constructor(e,n){super(),this.options=n,this.#e=e,this.#a=null,this.#l=Bh(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#l;#a;#p;#f;#h;#c;#u;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_y(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fh(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fh(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,r=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 Tr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!cu(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&ky(this.#t,r,this.options,n)&&this.#d(),this.updateResult(),a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(n.enabled,this.#t)||oa(this.options.staleTime,this.#t)!==oa(n.staleTime,this.#t))&&this.#g();const l=this.#b();a&&(this.#t!==r||Tr(this.options.enabled,this.#t)!==Tr(n.enabled,this.#t)||l!==this.#o)&&this.#y(l)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(n,e);return lT(this,r)&&(this.#i=r,this.#s=this.options,this.#r=this.#t.state),r}getCurrentResult(){return this.#i}trackResult(e,n){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),n?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#d(e){this.#_();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(qn)),n}#g(){this.#v();const e=oa(this.options.staleTime,this.#t);if(ja||this.#i.isStale||!Lh(e))return;const r=Gv(this.#i.dataUpdatedAt,e)+1;this.#c=La.setTimeout(()=>{this.#i.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#o=e,!(ja||Tr(this.options.enabled,this.#t)===!1||!Lh(this.#o)||this.#o===0)&&(this.#u=La.setInterval(()=>{(this.options.refetchIntervalInBackground||Em.isFocused())&&this.#d()},this.#o))}#x(){this.#g(),this.#y(this.#b())}#v(){this.#c&&(La.clearTimeout(this.#c),this.#c=void 0)}#E(){this.#u&&(La.clearInterval(this.#u),this.#u=void 0)}createResult(e,n){const r=this.#t,a=this.options,l=this.#i,o=this.#r,u=this.#s,f=e!==r?e.state:this.#n,{state:h}=e;let b={...h},y=!1,x;if(n._optimisticResults){const A=this.hasListeners(),ae=!A&&_y(e,n),P=A&&ky(e,r,n,a);(ae||P)&&(b={...b,...Zv(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:v,errorUpdatedAt:_,status:k}=b;x=b.data;let w=!1;if(n.placeholderData!==void 0&&x===void 0&&k==="pending"){let A;l?.isPlaceholderData&&n.placeholderData===u?.placeholderData?(A=l.data,w=!0):A=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,A!==void 0&&(k="success",x=Ih(l?.data,A,n),y=!0)}if(n.select&&x!==void 0&&!w)if(l&&x===o?.data&&n.select===this.#p)x=this.#f;else try{this.#p=n.select,x=n.select(x),x=Ih(l?.data,x,n),this.#f=x,this.#a=null}catch(A){this.#a=A}this.#a&&(v=this.#a,x=this.#f,_=Date.now(),k="error");const C=b.fetchStatus==="fetching",j=k==="pending",R=k==="error",H=j&&C,$=x!==void 0,Z={status:k,fetchStatus:b.fetchStatus,isPending:j,isSuccess:k==="success",isError:R,isInitialLoading:H,isLoading:H,data:x,dataUpdatedAt:b.dataUpdatedAt,error:v,errorUpdatedAt:_,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>f.dataUpdateCount||b.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:R&&!$,isPaused:b.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:R&&$,isStale:_m(e,n),refetch:this.refetch,promise:this.#l,isEnabled:Tr(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const A=Z.data!==void 0,ae=Z.status==="error"&&!A,P=ve=>{ae?ve.reject(Z.error):A&&ve.resolve(Z.data)},J=()=>{const ve=this.#l=Z.promise=Bh();P(ve)},ee=this.#l;switch(ee.status){case"pending":e.queryHash===r.queryHash&&P(ee);break;case"fulfilled":(ae||Z.data!==ee.value)&&J();break;case"rejected":(!ae||Z.error!==ee.reason)&&J();break}}return Z}updateResult(){const e=this.#i,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#h=this.#t),cu(n,e))return;this.#i=n;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!this.#m.size)return!0;const o=new Set(l??this.#m);return this.options.throwOnError&&o.add("error"),Object.keys(this.#i).some(u=>{const d=u;return this.#i[d]!==e[d]&&o.has(d)})};this.#k({listeners:r()})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#k(e){kn.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function sT(e,n){return Tr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function _y(e,n){return sT(e,n)||e.state.data!==void 0&&Fh(e,n,n.refetchOnMount)}function Fh(e,n,r){if(Tr(n.enabled,e)!==!1&&oa(n.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&_m(e,n)}return!1}function ky(e,n,r,a){return(e!==n||Tr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&_m(e,r)}function _m(e,n){return Tr(n.enabled,e)!==!1&&e.isStaleByTime(oa(n.staleTime,e))}function lT(e,n){return!cu(e.getCurrentResult(),n)}function wy(e){return{onFetch:(n,r)=>{const a=n.options,l=n.fetchOptions?.meta?.fetchMore?.direction,o=n.state.data?.pages||[],u=n.state.data?.pageParams||[];let d={pages:[],pageParams:[]},f=0;const h=async()=>{let b=!1;const y=_=>{WC(_,()=>n.signal,()=>b=!0)},x=Vv(n.options,n.fetchOptions),v=async(_,k,w)=>{if(b)return Promise.reject();if(k==null&&_.pages.length)return Promise.resolve(_);const j=(()=>{const O={client:n.client,queryKey:n.queryKey,pageParam:k,direction:w?"backward":"forward",meta:n.options.meta};return y(O),O})(),R=await x(j),{maxPages:H}=n.options,$=w?ZC:XC;return{pages:$(_.pages,R,H),pageParams:$(_.pageParams,k,H)}};if(l&&o.length){const _=l==="backward",k=_?oT:Sy,w={pages:o,pageParams:u},C=k(a,w);d=await v(w,C,_)}else{const _=e??o.length;do{const k=f===0?u[0]??a.initialPageParam:Sy(a,d);if(f>0&&k==null)break;d=await v(d,k),f++}while(f<_)}return d};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h}}}function Sy(e,{pages:n,pageParams:r}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,r[a],r):void 0}function oT(e,{pages:n,pageParams:r}){return n.length>0?e.getPreviousPageParam?.(n[0],n,r[0],r):void 0}var cT=class extends Xv{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Wv(),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(n=>n!==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.#i?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=Qv({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",l=!this.#i.canStart();try{if(a)n();else{this.#r({type:"pending",variables:e,isPaused:l}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const u=await this.options.onMutate?.(e,r);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:l})}const o=await this.#i.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#r({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,e,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#r(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),kn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Wv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var uT=class extends Fs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const a=new cT({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(a),a}add(e){this.#e.add(e);const n=Fc(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=Fc(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Fc(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(l=>l.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=Fc(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){kn.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 n={exact:!0,...e};return this.getAll().find(r=>by(n,r))}findAll(e={}){return this.getAll().filter(n=>by(e,n))}notify(e){kn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return kn.batch(()=>Promise.all(e.map(n=>n.continue().catch(qn))))}};function Fc(e){return e.options.scope?.id}var dT=class extends Fs{#e;#t=void 0;#n;#i;constructor(n,r){super(),this.#e=n,this.setOptions(r),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#e.defaultMutationOptions(n),cu(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ia(r.mutationKey)!==Ia(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#s(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(n,r){return this.#i=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??Wv();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#s(n){kn.batch(()=>{if(this.#i&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#i.onSuccess?.(n.data,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(n.data,null,r,a,l)}catch(o){Promise.reject(o)}}else if(n?.type==="error"){try{this.#i.onError?.(n.error,r,a,l)}catch(o){Promise.reject(o)}try{this.#i.onSettled?.(void 0,n.error,r,a,l)}catch(o){Promise.reject(o)}}}this.listeners.forEach(r=>{r(this.#t)})})}},fT=class extends Fs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const a=n.queryKey,l=n.queryHash??ym(a,n);let o=this.get(l);return o||(o=new iT({client:e,queryKey:a,queryHash:l,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){kn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>gy(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>gy(e,r)):n}notify(e){kn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){kn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){kn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},hT=class{#e;#t;#n;#i;#r;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new fT,this.#t=e.mutationCache||new uT,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Em.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=uu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=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 n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(oa(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const a=r.data;return[n,a]})}setQueryData(e,n,r){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,u=VC(n,o);if(u!==void 0)return this.#e.build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,n,r){return kn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;kn.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return kn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},a=kn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(qn).catch(qn)}invalidateQueries(e,n={}){return kn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},a=kn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,r);return r.throwOnError||(o=o.catch(qn)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(qn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(oa(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qn).catch(qn)}fetchInfiniteQuery(e){return e.behavior=wy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qn).catch(qn)}ensureInfiniteQueryData(e){return e.behavior=wy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uu.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,n){this.#i.set(Ia(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#i.values()],r={};return n.forEach(a=>{lo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,n){this.#r.set(Ia(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(a=>{lo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=ym(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===xm&&(n.enabled=!1),n}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()}},Jv=N.createContext(void 0),Gn=e=>{const n=N.useContext(Jv);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},mT=({client:e,children:n})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Jv.Provider,{value:e,children:n})),eE=N.createContext(!1),pT=()=>N.useContext(eE);eE.Provider;function gT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bT=N.createContext(gT()),yT=()=>N.useContext(bT),xT=(e,n,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?vm(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},vT=e=>{N.useEffect(()=>{e.clearReset()},[e])},ET=({result:e,errorResetBoundary:n,throwOnError:r,query:a,suspense:l})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||vm(r,[e.error,a])),_T=e=>{if(e.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...l)=>r(a(...l)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},kT=(e,n)=>e.isLoading&&e.isFetching&&!n,wT=(e,n)=>e?.suspense&&n.isPending,Ny=(e,n,r)=>n.fetchOptimistic(e).catch(()=>{r.clearReset()});function ST(e,n,r){const a=pT(),l=yT(),o=Gn(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const d=o.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",_T(u),xT(u,l,d),vT(l);const f=!o.getQueryCache().get(u.queryHash),[h]=N.useState(()=>new n(o,u)),b=h.getOptimisticResult(u),y=!a&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(x=>{const v=y?h.subscribe(kn.batchCalls(x)):qn;return h.updateResult(),v},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),N.useEffect(()=>{h.setOptions(u)},[u,h]),wT(u,b))throw Ny(u,h,l);if(ET({result:b,errorResetBoundary:l,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw b.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,b),u.experimental_prefetchInRender&&!ja&&kT(b,a)&&(f?Ny(u,h,l):d?.promise)?.catch(qn).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?b:h.trackResult(b)}function Tn(e,n){return ST(e,aT)}function Tu(e,n){const r=Gn(),[a]=N.useState(()=>new dT(r,e));N.useEffect(()=>{a.setOptions(e)},[a,e]);const l=N.useSyncExternalStore(N.useCallback(u=>a.subscribe(kn.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=N.useCallback((u,d)=>{a.mutate(u,d).catch(qn)},[a]);if(l.error&&vm(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}function NT({children:e}){const[n]=N.useState(()=>new hT({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}}));return p.jsx(mT,{client:n,children:e})}function tE(e){var n,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=tE(e[n]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function CT(){for(var e,n,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=tE(e))&&(a&&(a+=" "),a+=n);return a}const TT=(e,n)=>{const r=new Array(e.length+n.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<n.length;a++)r[e.length+a]=n[a];return r},zT=(e,n)=>({classGroupId:e,validator:n}),nE=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),du="-",Cy=[],RT="arbitrary..",AT=e=>{const n=MT(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return OT(u);const d=u.split(du),f=d[0]===""&&d.length>1?1:0;return rE(d,f,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=a[u],h=r[u];return f?h?TT(h,f):f:h||Cy}return r[u]||Cy}}},rE=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const l=e[n],o=r.nextPart.get(l);if(o){const h=rE(e,n+1,o);if(h)return h}const u=r.validators;if(u===null)return;const d=n===0?e.join(du):e.slice(n).join(du),f=u.length;for(let h=0;h<f;h++){const b=u[h];if(b.validator(d))return b.classGroupId}},OT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),a=n.slice(0,r);return a?RT+a:void 0})(),MT=e=>{const{theme:n,classGroups:r}=e;return DT(r,n)},DT=(e,n)=>{const r=nE();for(const a in e){const l=e[a];km(l,r,a,n)}return r},km=(e,n,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const u=e[o];LT(u,n,r,a)}},LT=(e,n,r,a)=>{if(typeof e=="string"){jT(e,n,r);return}if(typeof e=="function"){IT(e,n,r,a);return}BT(e,n,r,a)},jT=(e,n,r)=>{const a=e===""?n:iE(n,e);a.classGroupId=r},IT=(e,n,r,a)=>{if(UT(e)){km(e(a),n,r,a);return}n.validators===null&&(n.validators=[]),n.validators.push(zT(r,e))},BT=(e,n,r,a)=>{const l=Object.entries(e),o=l.length;for(let u=0;u<o;u++){const[d,f]=l[u];km(f,iE(n,d),r,a)}},iE=(e,n)=>{let r=e;const a=n.split(du),l=a.length;for(let o=0;o<l;o++){const u=a[o];let d=r.nextPart.get(u);d||(d=nE(),r.nextPart.set(u,d)),r=d}return r},UT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,FT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),a=Object.create(null);const l=(o,u)=>{r[o]=u,n++,n>e&&(n=0,a=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return l(o,u),u},set(o,u){o in r?r[o]=u:l(o,u)}}},Ph="!",Ty=":",PT=[],zy=(e,n,r,a,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),HT=e=>{const{prefix:n,experimentalParseClassName:r}=e;let a=l=>{const o=[];let u=0,d=0,f=0,h;const b=l.length;for(let k=0;k<b;k++){const w=l[k];if(u===0&&d===0){if(w===Ty){o.push(l.slice(f,k)),f=k+1;continue}if(w==="/"){h=k;continue}}w==="["?u++:w==="]"?u--:w==="("?d++:w===")"&&d--}const y=o.length===0?l:l.slice(f);let x=y,v=!1;y.endsWith(Ph)?(x=y.slice(0,-1),v=!0):y.startsWith(Ph)&&(x=y.slice(1),v=!0);const _=h&&h>f?h-f:void 0;return zy(o,v,x,_)};if(n){const l=n+Ty,o=a;a=u=>u.startsWith(l)?o(u.slice(l.length)):zy(PT,!1,u,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},qT=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{n.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const u=r[o],d=u[0]==="[",f=n.has(u);d||f?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(u)):l.push(u)}return l.length>0&&(l.sort(),a.push(...l)),a}},$T=e=>({cache:FT(e.cacheSize),parseClassName:HT(e),sortModifiers:qT(e),...AT(e)}),GT=/\s+/,KT=(e,n)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=n,u=[],d=e.trim().split(GT);let f="";for(let h=d.length-1;h>=0;h-=1){const b=d[h],{isExternal:y,modifiers:x,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:k}=r(b);if(y){f=b+(f.length>0?" "+f:f);continue}let w=!!k,C=a(w?_.substring(0,k):_);if(!C){if(!w){f=b+(f.length>0?" "+f:f);continue}if(C=a(_),!C){f=b+(f.length>0?" "+f:f);continue}w=!1}const j=x.length===0?"":x.length===1?x[0]:o(x).join(":"),R=v?j+Ph:j,H=R+C;if(u.indexOf(H)>-1)continue;u.push(H);const $=l(C,w);for(let O=0;O<$.length;++O){const Z=$[O];u.push(R+Z)}f=b+(f.length>0?" "+f:f)}return f},VT=(...e)=>{let n=0,r,a,l="";for(;n<e.length;)(r=e[n++])&&(a=aE(r))&&(l&&(l+=" "),l+=a);return l},aE=e=>{if(typeof e=="string")return e;let n,r="";for(let a=0;a<e.length;a++)e[a]&&(n=aE(e[a]))&&(r&&(r+=" "),r+=n);return r},YT=(e,...n)=>{let r,a,l,o;const u=f=>{const h=n.reduce((b,y)=>y(b),e());return r=$T(h),a=r.cache.get,l=r.cache.set,o=d,d(f)},d=f=>{const h=a(f);if(h)return h;const b=KT(f,r);return l(f,b),b};return o=u,(...f)=>o(VT(...f))},QT=[],_n=e=>{const n=r=>r[e]||QT;return n.isThemeGetter=!0,n},sE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,XT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ez=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wi=e=>XT.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),Ji=e=>!!e&&Number.isInteger(Number(e)),eh=e=>e.endsWith("%")&&it(e.slice(0,-1)),Ei=e=>ZT.test(e),oE=()=>!0,nz=e=>WT.test(e)&&!JT.test(e),wm=()=>!1,rz=e=>ez.test(e),iz=e=>tz.test(e),az=e=>!Re(e)&&!Ae(e),sz=e=>da(e,dE,wm),Re=e=>sE.test(e),Oa=e=>da(e,fE,nz),Ry=e=>da(e,mz,it),lz=e=>da(e,mE,oE),oz=e=>da(e,hE,wm),Ay=e=>da(e,cE,wm),cz=e=>da(e,uE,iz),Pc=e=>da(e,pE,rz),Ae=e=>lE.test(e),Hl=e=>Pa(e,fE),uz=e=>Pa(e,hE),Oy=e=>Pa(e,cE),dz=e=>Pa(e,dE),fz=e=>Pa(e,uE),Hc=e=>Pa(e,pE,!0),hz=e=>Pa(e,mE,!0),da=(e,n,r)=>{const a=sE.exec(e);return a?a[1]?n(a[1]):r(a[2]):!1},Pa=(e,n,r=!1)=>{const a=lE.exec(e);return a?a[1]?n(a[1]):r:!1},cE=e=>e==="position"||e==="percentage",uE=e=>e==="image"||e==="url",dE=e=>e==="length"||e==="size"||e==="bg-size",fE=e=>e==="length",mz=e=>e==="number",hE=e=>e==="family-name",mE=e=>e==="number"||e==="weight",pE=e=>e==="shadow",pz=()=>{const e=_n("color"),n=_n("font"),r=_n("text"),a=_n("font-weight"),l=_n("tracking"),o=_n("leading"),u=_n("breakpoint"),d=_n("container"),f=_n("spacing"),h=_n("radius"),b=_n("shadow"),y=_n("inset-shadow"),x=_n("text-shadow"),v=_n("drop-shadow"),_=_n("blur"),k=_n("perspective"),w=_n("aspect"),C=_n("ease"),j=_n("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...H(),Ae,Re],O=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],A=()=>[Ae,Re,f],ae=()=>[Wi,"full","auto",...A()],P=()=>[Ji,"none","subgrid",Ae,Re],J=()=>["auto",{span:["full",Ji,Ae,Re]},Ji,Ae,Re],ee=()=>[Ji,"auto",Ae,Re],ve=()=>["auto","min","max","fr",Ae,Re],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...A()],te=()=>[Wi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],oe=()=>[Wi,"screen","full","dvw","lvw","svw","min","max","fit",...A()],fe=()=>[Wi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],T=()=>[e,Ae,Re],M=()=>[...H(),Oy,Ay,{position:[Ae,Re]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",dz,sz,{size:[Ae,Re]}],he=()=>[eh,Hl,Oa],Ee=()=>["","none","full",h,Ae,Re],be=()=>["",it,Hl,Oa],He=()=>["solid","dashed","dotted","double"],st=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Be=()=>[it,eh,Oy,Ay],Zt=()=>["","none",_,Ae,Re],un=()=>["none",it,Ae,Re],Ln=()=>["none",it,Ae,Re],At=()=>[it,Ae,Re],Kt=()=>[Wi,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ei],breakpoint:[Ei],color:[oE],container:[Ei],"drop-shadow":[Ei],ease:["in","out","in-out"],font:[az],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ei],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ei],shadow:[Ei],spacing:["px",it],text:[Ei],"text-shadow":[Ei],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Wi,Re,Ae,w]}],container:["container"],columns:[{columns:[it,Re,Ae,d]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ae()}],"inset-x":[{"inset-x":ae()}],"inset-y":[{"inset-y":ae()}],start:[{"inset-s":ae(),start:ae()}],end:[{"inset-e":ae(),end:ae()}],"inset-bs":[{"inset-bs":ae()}],"inset-be":[{"inset-be":ae()}],top:[{top:ae()}],right:[{right:ae()}],bottom:[{bottom:ae()}],left:[{left:ae()}],visibility:["visible","invisible","collapse"],z:[{z:[Ji,"auto",Ae,Re]}],basis:[{basis:[Wi,"full","auto",d,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,Wi,"auto","initial","none",Re]}],grow:[{grow:["",it,Ae,Re]}],shrink:[{shrink:["",it,Ae,Re]}],order:[{order:[Ji,"first","last","none",Ae,Re]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],"inline-size":[{inline:["auto",...oe()]}],"min-inline-size":[{"min-inline":["auto",...oe()]}],"max-inline-size":[{"max-inline":["none",...oe()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...te()]}],"min-w":[{"min-w":[d,"screen","none",...te()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,Hl,Oa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,hz,lz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",eh,Re]}],"font-family":[{font:[uz,oz,n]}],"font-features":[{"font-features":[Re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Ae,Re]}],"line-clamp":[{"line-clamp":[it,"none",Ae,Ry]}],leading:[{leading:[o,...A()]}],"list-image":[{"list-image":["none",Ae,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ae,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",Ae,Oa]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[it,"auto",Ae,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ae,Re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ae,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ji,Ae,Re],radial:["",Ae,Re],conic:[Ji,Ae,Re]},fz,cz]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:be()}],"border-w-x":[{"border-x":be()}],"border-w-y":[{"border-y":be()}],"border-w-s":[{"border-s":be()}],"border-w-e":[{"border-e":be()}],"border-w-bs":[{"border-bs":be()}],"border-w-be":[{"border-be":be()}],"border-w-t":[{"border-t":be()}],"border-w-r":[{"border-r":be()}],"border-w-b":[{"border-b":be()}],"border-w-l":[{"border-l":be()}],"divide-x":[{"divide-x":be()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":be()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,Ae,Re]}],"outline-w":[{outline:["",it,Hl,Oa]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",b,Hc,Pc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",y,Hc,Pc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[it,Oa]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":be()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",x,Hc,Pc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[it,Ae,Re]}],"mix-blend":[{"mix-blend":[...st(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":st()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[it]}],"mask-image-linear-from-pos":[{"mask-linear-from":Be()}],"mask-image-linear-to-pos":[{"mask-linear-to":Be()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Be()}],"mask-image-t-to-pos":[{"mask-t-to":Be()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Be()}],"mask-image-r-to-pos":[{"mask-r-to":Be()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Be()}],"mask-image-b-to-pos":[{"mask-b-to":Be()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Be()}],"mask-image-l-to-pos":[{"mask-l-to":Be()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Be()}],"mask-image-x-to-pos":[{"mask-x-to":Be()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Be()}],"mask-image-y-to-pos":[{"mask-y-to":Be()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Ae,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":Be()}],"mask-image-radial-to-pos":[{"mask-radial-to":Be()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":H()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":Be()}],"mask-image-conic-to-pos":[{"mask-conic-to":Be()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ae,Re]}],filter:[{filter:["","none",Ae,Re]}],blur:[{blur:Zt()}],brightness:[{brightness:[it,Ae,Re]}],contrast:[{contrast:[it,Ae,Re]}],"drop-shadow":[{"drop-shadow":["","none",v,Hc,Pc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",it,Ae,Re]}],"hue-rotate":[{"hue-rotate":[it,Ae,Re]}],invert:[{invert:["",it,Ae,Re]}],saturate:[{saturate:[it,Ae,Re]}],sepia:[{sepia:["",it,Ae,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Ae,Re]}],"backdrop-blur":[{"backdrop-blur":Zt()}],"backdrop-brightness":[{"backdrop-brightness":[it,Ae,Re]}],"backdrop-contrast":[{"backdrop-contrast":[it,Ae,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Ae,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Ae,Re]}],"backdrop-invert":[{"backdrop-invert":["",it,Ae,Re]}],"backdrop-opacity":[{"backdrop-opacity":[it,Ae,Re]}],"backdrop-saturate":[{"backdrop-saturate":[it,Ae,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Ae,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ae,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Ae,Re]}],ease:[{ease:["linear","initial",C,Ae,Re]}],delay:[{delay:[it,Ae,Re]}],animate:[{animate:["none",j,Ae,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,Ae,Re]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:un()}],"rotate-x":[{"rotate-x":un()}],"rotate-y":[{"rotate-y":un()}],"rotate-z":[{"rotate-z":un()}],scale:[{scale:Ln()}],"scale-x":[{"scale-x":Ln()}],"scale-y":[{"scale-y":Ln()}],"scale-z":[{"scale-z":Ln()}],"scale-3d":["scale-3d"],skew:[{skew:At()}],"skew-x":[{"skew-x":At()}],"skew-y":[{"skew-y":At()}],transform:[{transform:[Ae,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Kt()}],"translate-x":[{"translate-x":Kt()}],"translate-y":[{"translate-y":Kt()}],"translate-z":[{"translate-z":Kt()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ae,Re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ae,Re]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[it,Hl,Oa,Ry]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gz=YT(pz);function ke(...e){return gz(CT(e))}async function tn(e,n){const r=await fetch(e,{...n,headers:{...HC(),...n?.headers}});if(!r.ok){const a=await r.text().catch(()=>"");throw new Error(`${r.status}: ${a||r.statusText}`)}return r.json()}function Ha(e){return/[Zz]$/.test(e)||/[+-]\d{2}:\d{2}$/.test(e)?new Date(e):new Date(e.replace(" ","T")+"Z")}function fu(e,n,r,a,l){const o=r.startsWith("/")?r:`${n}/${r}`,u=o.replace(/^\//,""),d=a??1,f=1;switch(e){case"vscode":return`vscode://file/${u}:${d}:${f}`;case"cursor":return`cursor://file/${u}:${d}:${f}`;case"windsurf":return`windsurf://file/${u}:${d}:${f}`;case"jetbrains":return`jetbrains://open?file=${encodeURIComponent(o)}&line=${d}`;case"sublime":return`subl://open?url=file://${encodeURIComponent(o)}&line=${d}`}}const gE=N.createContext(null);function bz({children:e}){const[n,r]=N.useState(new Map),[a,l]=N.useState(null),o=N.useRef(!1),{socket:u}=Fa(),d=N.useMemo(()=>Array.from(n.values()),[n]),f=N.useMemo(()=>d.filter(v=>v.status==="running").length,[d]),h=N.useMemo(()=>f>0,[f]);N.useEffect(()=>{o.current||(o.current=!0,tn("/api/commands/active").then(v=>{if(v.commands.length>0){const _=new Map;let k=null;for(const w of v.commands)_.set(w.execution_id,{executionId:w.execution_id,command:w.command,output:w.output??"",status:"running",exitCode:null,startedAt:w.started_at}),k=w.execution_id;r(_),l(k)}}).catch(()=>{}))},[]),Tt("command:started",v=>{const _={executionId:v.execution_id,command:v.command,output:"",status:"running",exitCode:null,startedAt:v.started_at};r(k=>{const w=new Map(k);return w.set(v.execution_id,_),w}),l(v.execution_id)}),Tt("command:output",v=>{r(_=>{const k=_.get(v.execution_id);if(!k)return _;const w=new Map(_);return w.set(v.execution_id,{...k,output:k.output+v.content}),w})}),Tt("command:finished",v=>{r(_=>{const k=_.get(v.execution_id);if(!k)return _;const w=new Map(_);return w.set(v.execution_id,{...k,status:v.exitCode===-2?"cancelled":v.exitCode===0?"complete":"failed",exitCode:v.exitCode}),w})});const b=N.useCallback(v=>{r(_=>{const k=new Map(_);return k.delete(v),l(w=>{if(w!==v)return w;const C=Array.from(k.keys());return C.length>0?C[C.length-1]:null}),k})},[]),y=N.useCallback(v=>{u?.emit("command:cancel",{execution_id:v})},[u]),x=N.useMemo(()=>({tabs:d,activeTabId:a,runningCount:f,isRunning:h,setActiveTabId:l,dismissTab:b,cancelCommand:y}),[d,a,f,h,b,y]);return p.jsx(gE,{value:x,children:e})}function Sm(){const e=N.useContext(gE);if(!e)throw new Error("useCommandState must be used within CommandStateProvider");return e}/**
62
- * @license lucide-react v0.577.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
- */const bE=(...e)=>e.filter((n,r,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===r).join(" ").trim();/**
67
- * @license lucide-react v0.577.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 yz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
72
- * @license lucide-react v0.577.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 xz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
77
- * @license lucide-react v0.577.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 My=e=>{const n=xz(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
82
- * @license lucide-react v0.577.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
- */var vz={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"};/**
87
- * @license lucide-react v0.577.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 Ez=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
92
- * @license lucide-react v0.577.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 _z=N.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:u,...d},f)=>N.createElement("svg",{ref:f,...vz,width:n,height:n,stroke:e,strokeWidth:a?Number(r)*24/Number(n):r,className:bE("lucide",l),...!o&&!Ez(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,b])=>N.createElement(h,b)),...Array.isArray(o)?o:[o]]));/**
97
- * @license lucide-react v0.577.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 De=(e,n)=>{const r=N.forwardRef(({className:a,...l},o)=>N.createElement(_z,{ref:o,iconNode:n,className:bE(`lucide-${yz(My(e))}`,`lucide-${e}`,a),...l}));return r.displayName=My(e),r};/**
102
- * @license lucide-react v0.577.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 kz=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],wz=De("activity",kz);/**
107
- * @license lucide-react v0.577.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 Sz=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Nz=De("arrow-down",Sz);/**
112
- * @license lucide-react v0.577.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 Cz=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ca=De("arrow-left",Cz);/**
117
- * @license lucide-react v0.577.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 Tz=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],yE=De("arrow-up-down",Tz);/**
122
- * @license lucide-react v0.577.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 zz=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rz=De("arrow-up",zz);/**
127
- * @license lucide-react v0.577.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 Az=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],Oz=De("ban",Az);/**
132
- * @license lucide-react v0.577.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 Mz=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Dz=De("book-open",Mz);/**
137
- * @license lucide-react v0.577.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 Lz=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],jz=De("brain",Lz);/**
142
- * @license lucide-react v0.577.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 Iz=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Is=De("check",Iz);/**
147
- * @license lucide-react v0.577.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 Bz=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zu=De("chevron-down",Bz);/**
152
- * @license lucide-react v0.577.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 Uz=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xo=De("chevron-right",Uz);/**
157
- * @license lucide-react v0.577.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 Fz=[["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"}]],Pz=De("circle-alert",Fz);/**
162
- * @license lucide-react v0.577.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 Hz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],xE=De("circle-check",Hz);/**
167
- * @license lucide-react v0.577.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 qz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],vE=De("circle-x",qz);/**
172
- * @license lucide-react v0.577.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 $z=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Gz=De("circle",$z);/**
177
- * @license lucide-react v0.577.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 Kz=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],EE=De("clipboard-copy",Kz);/**
182
- * @license lucide-react v0.577.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 Vz=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],_E=De("clock",Vz);/**
187
- * @license lucide-react v0.577.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 Yz=[["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"}]],Nm=De("external-link",Yz);/**
192
- * @license lucide-react v0.577.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 Qz=[["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"}]],Xz=De("eye",Qz);/**
197
- * @license lucide-react v0.577.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 Zz=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Wz=De("file-code",Zz);/**
202
- * @license lucide-react v0.577.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 Jz=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]],ki=De("file-search",Jz);/**
207
- * @license lucide-react v0.577.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 eR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cm=De("file-text",eR);/**
212
- * @license lucide-react v0.577.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 tR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],nR=De("file",tR);/**
217
- * @license lucide-react v0.577.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 rR=[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}],["circle",{cx:"14",cy:"15",r:"1",key:"1gm4qj"}]],iR=De("folder-open-dot",rR);/**
222
- * @license lucide-react v0.577.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 aR=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],sR=De("folder-open",aR);/**
227
- * @license lucide-react v0.577.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 lR=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],kE=De("funnel",lR);/**
232
- * @license lucide-react v0.577.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 oR=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Ps=De("git-branch",oR);/**
237
- * @license lucide-react v0.577.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 cR=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],wE=De("github",cR);/**
242
- * @license lucide-react v0.577.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 uR=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],dR=De("handshake",uR);/**
247
- * @license lucide-react v0.577.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 fR=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Dy=De("history",fR);/**
252
- * @license lucide-react v0.577.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 hR=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],mR=De("house",hR);/**
257
- * @license lucide-react v0.577.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 pR=[["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"}]],gR=De("lightbulb",pR);/**
262
- * @license lucide-react v0.577.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 bR=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],yR=De("link-2",bR);/**
267
- * @license lucide-react v0.577.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 xR=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ls=De("loader-circle",xR);/**
272
- * @license lucide-react v0.577.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 vR=[["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"}]],ua=De("map",vR);/**
277
- * @license lucide-react v0.577.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 ER=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],_R=De("message-circle",ER);/**
282
- * @license lucide-react v0.577.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 kR=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],hu=De("message-square",kR);/**
287
- * @license lucide-react v0.577.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 wR=[["path",{d:"M5 12h14",key:"1ays0h"}]],SE=De("minus",wR);/**
292
- * @license lucide-react v0.577.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 SR=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],NR=De("monitor",SR);/**
297
- * @license lucide-react v0.577.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 CR=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],TR=De("moon",CR);/**
302
- * @license lucide-react v0.577.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 zR=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Ly=De("pen-line",zR);/**
307
- * @license lucide-react v0.577.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 RR=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],oo=De("play",RR);/**
312
- * @license lucide-react v0.577.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 AR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],OR=De("plus",AR);/**
317
- * @license lucide-react v0.577.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 MR=[["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"}]],mu=De("refresh-cw",MR);/**
322
- * @license lucide-react v0.577.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 DR=[["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"}]],LR=De("rotate-ccw",DR);/**
327
- * @license lucide-react v0.577.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 jR=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],jy=De("save",jR);/**
332
- * @license lucide-react v0.577.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 IR=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],NE=De("search",IR);/**
337
- * @license lucide-react v0.577.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 BR=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],UR=De("send-horizontal",BR);/**
342
- * @license lucide-react v0.577.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 FR=[["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"}]],Iy=De("send",FR);/**
347
- * @license lucide-react v0.577.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 PR=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],CE=De("shield-alert",PR);/**
352
- * @license lucide-react v0.577.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 HR=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],qR=De("shield",HR);/**
357
- * @license lucide-react v0.577.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 $R=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Tm=De("sparkles",$R);/**
362
- * @license lucide-react v0.577.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 GR=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],KR=De("square",GR);/**
367
- * @license lucide-react v0.577.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 VR=[["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"}]],YR=De("sun",VR);/**
372
- * @license lucide-react v0.577.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 QR=[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]],XR=De("swords",QR);/**
377
- * @license lucide-react v0.577.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 ZR=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],zm=De("terminal",ZR);/**
382
- * @license lucide-react v0.577.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 WR=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],JR=De("test-tube",WR);/**
387
- * @license lucide-react v0.577.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 eA=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],tA=De("trash-2",eA);/**
392
- * @license lucide-react v0.577.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 nA=[["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"}]],Rm=De("triangle-alert",nA);/**
397
- * @license lucide-react v0.577.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 rA=[["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"}]],co=De("user",rA);/**
402
- * @license lucide-react v0.577.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 iA=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],aA=De("wrench",iA);/**
407
- * @license lucide-react v0.577.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 sA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],qa=De("x",sA);function Hs(){return Tn({queryKey:["config"],queryFn:()=>tn("/api/config"),staleTime:1/0})}const lA=[{to:"/",label:"Home",icon:mR},{to:"/commands",label:"Commands",icon:zm},{to:"/sessions",label:"Sessions",icon:Ps},{to:"/reviews",label:"Reviews",icon:ki}],oA={connected:"bg-emerald-500",connecting:"bg-amber-500 animate-pulse",reconnecting:"bg-amber-500 animate-pulse",disconnected:"bg-red-500"};function cA(){const e=Jr(),{status:n}=Fa(),{runningCount:r}=Sm(),{data:a}=Hs();return N.useEffect(()=>{if(a?.workspaceName){const l=a.gitBranch?` (${a.gitBranch})`:"";document.title=`${a.workspaceName}${l} — OCR Dashboard`}else document.title="OCR Dashboard"},[a?.workspaceName,a?.gitBranch]),p.jsxs("aside",{className:"flex h-full w-56 flex-col border-r border-zinc-200 bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-950",children:[p.jsxs("div",{className:"group/brand relative flex h-14 items-center gap-2 border-b border-zinc-200 px-4 dark:border-zinc-800",children:[p.jsx(ki,{className:"h-5 w-5 shrink-0 text-zinc-700 dark:text-zinc-300"}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"OCR Dashboard"}),a?.workspaceName&&p.jsxs("span",{className:"block truncate text-[11px] text-zinc-500 dark:text-zinc-400",children:[a.workspaceName,a.gitBranch&&p.jsxs("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:["(",a.gitBranch,")"]})]})]}),a?.workspaceName&&p.jsxs("div",{className:"pointer-events-none absolute left-full top-2 z-50 ml-2 min-w-[280px] max-w-sm opacity-0 transition-opacity delay-300 group-hover/brand:opacity-100",children:[p.jsx("div",{className:"absolute -left-1 top-3 h-2 w-2 rotate-45 bg-zinc-900 dark:bg-zinc-700"}),p.jsxs("div",{className:"relative rounded-lg bg-zinc-900 px-3 py-2 text-xs shadow-lg dark:bg-zinc-700",children:[p.jsx("div",{className:"font-medium text-white",children:a.workspaceName}),a.gitBranch&&p.jsx("div",{className:"mt-0.5 font-mono text-emerald-400",children:a.gitBranch}),p.jsx("div",{className:"mt-1.5 break-words border-t border-zinc-700 pt-1.5 font-mono text-[10px] text-zinc-400 dark:border-zinc-600",children:a.projectRoot})]})]})]}),p.jsx("nav",{className:"flex-1 space-y-1 p-2",children:lA.map(({to:l,label:o,icon:u})=>{const d=l==="/"?e.pathname==="/":e.pathname.startsWith(l);return p.jsxs(Dn,{to:l,className:ke("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",d?"bg-zinc-200 font-medium text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100":"text-zinc-600 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-900 dark:hover:text-zinc-100"),children:[p.jsx(u,{className:"h-4 w-4"}),o,l==="/commands"&&r>0&&p.jsx("span",{className:"ml-auto inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-indigo-500 px-1.5 text-[10px] font-semibold text-white",children:r})]},l)})}),p.jsx("div",{className:"border-t border-zinc-200 p-3 dark:border-zinc-800",children:p.jsxs("div",{role:"status","aria-label":`Connection status: ${n}`,className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsx("div",{className:ke("h-2 w-2 rounded-full",oA[n]),"aria-hidden":"true"}),p.jsx("span",{className:"capitalize",children:n})]})})]})}const uA={system:NR,light:YR,dark:TR};function dA(e){if(e==="/")return[{label:"Home",path:"/"}];const n=e.split("/").filter(Boolean),r=[{label:"Home",path:"/"}];let a="";for(const l of n){a+=`/${l}`;const o=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");r.push({label:o,path:a})}return r}function fA(){const{mode:e,cycle:n}=Tv(),r=Jr(),a=dA(r.pathname),l=uA[e];return p.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-zinc-200 px-6 dark:border-zinc-800",children:[p.jsx("nav",{className:"flex items-center gap-1 text-sm","aria-label":"Breadcrumb",children:a.map((o,u)=>p.jsxs("span",{className:"flex items-center gap-1",children:[u>0&&p.jsx("span",{className:"text-zinc-400 dark:text-zinc-600",children:"/"}),u<a.length-1?p.jsx(Dn,{to:o.path,className:ke("text-zinc-500 dark:text-zinc-400","hover:text-zinc-700 dark:hover:text-zinc-200"),children:o.label}):p.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:o.label})]},o.path))}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("a",{href:"https://github.com/spencermarx/open-code-review",target:"_blank",rel:"noopener noreferrer",className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":"Documentation on GitHub",title:"Docs",children:p.jsx(wE,{className:"h-4 w-4"})}),p.jsx("button",{onClick:n,className:"flex h-8 w-8 items-center justify-center rounded-md text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100","aria-label":`Theme: ${e}. Click to cycle.`,title:`Theme: ${e}`,children:p.jsx(l,{className:"h-4 w-4"})})]})]})}function hA(){return p.jsxs("div",{className:"flex h-screen bg-white text-zinc-900 dark:bg-zinc-950 dark:text-zinc-100",children:[p.jsx(cA,{}),p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsx(fA,{}),p.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:p.jsx(oN,{})})]})]})}class mA extends N.Component{constructor(n){super(n),this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}render(){return this.state.hasError?this.props.fallback?this.props.fallback:p.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:p.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-6 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[p.jsx(Rm,{className:"mx-auto h-8 w-8 text-red-500"}),p.jsx("h2",{className:"mt-3 text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Something went wrong"}),p.jsx("p",{className:"mt-1 text-sm text-zinc-600 dark:text-zinc-400",children:this.state.error?.message??"An unexpected error occurred."}),p.jsxs("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-4 inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[p.jsx(mu,{className:"h-4 w-4"}),"Try again"]})]})}):this.props.children}}function ea(){return p.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:p.jsxs("div",{className:"max-w-md rounded-lg border border-red-200 bg-red-50 p-8 text-center dark:border-red-900/50 dark:bg-red-950/30",children:[p.jsx(Rm,{className:"mx-auto h-10 w-10 text-red-500"}),p.jsx("h1",{className:"mt-4 text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:"Page Error"}),p.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This page encountered an error. Try navigating back or refreshing."}),p.jsxs("div",{className:"mt-6 flex justify-center gap-3",children:[p.jsx("button",{onClick:()=>window.history.back(),className:"rounded-md border border-zinc-300 bg-white px-4 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Go back"}),p.jsxs("button",{onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 rounded-md bg-zinc-900 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:[p.jsx(mu,{className:"h-4 w-4"}),"Reload"]})]})]})})}function Ss({title:e,value:n,icon:r,trend:a}){return p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:e}),p.jsx(r,{className:"h-4 w-4 text-zinc-400 dark:text-zinc-500"})]}),p.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[p.jsx("span",{className:"text-2xl font-semibold text-zinc-900 dark:text-zinc-100",children:n}),a&&p.jsx("span",{className:ke("text-xs font-medium",a==="up"?"text-emerald-600 dark:text-emerald-400":"text-red-600 dark:text-red-400"),children:a==="up"?"↑":"↓"})]})]})}const By={active:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",closed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",unread:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",read:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",acknowledged:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",fixed:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",wont_fix:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",needs_review:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",in_progress:"bg-violet-500/15 text-violet-700 dark:text-violet-400 border-violet-500/25",changes_made:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",dismissed:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",critical:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",high:"bg-orange-500/15 text-orange-700 dark:text-orange-400 border-orange-500/25",medium:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",low:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",info:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25",default:"bg-zinc-500/15 text-zinc-600 dark:text-zinc-400 border-zinc-500/25"},pA={wont_fix:"Won't Fix",needs_review:"Needs Review",in_progress:"In Progress",changes_made:"Changes Made"};function qs({variant:e,label:n,className:r}){const a=n??pA[e]??e.charAt(0).toUpperCase()+e.slice(1);return p.jsx("span",{className:ke("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",By[e]??By.default,r),children:a})}function gA(e){return Ha(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function bA(e){return Ha(e).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function yA(e){return Ha(e).toLocaleString()}function xA(e){const n=Math.floor((Date.now()-Ha(e).getTime())/1e3);if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function vA(e){const n=Date.now()-Ha(e).getTime(),r=Math.floor(n/1e3);if(r<60)return`${r}s`;const a=Math.floor(r/60);if(a<60)return`${a}m`;const l=Math.floor(a/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function EA(e){return e==null||Number.isNaN(e)?"-":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function _A({sessions:e}){return e.length===0?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions yet. Run a code review or map to get started."}):p.jsx("div",{className:"space-y-1",children:e.map(n=>{const r=n.workflow_type==="map"?ua:ki;return p.jsxs(Dn,{to:`/sessions/${n.id}`,className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[p.jsx(Ps,{className:"h-4 w-4 shrink-0 text-zinc-400"}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-zinc-900 dark:text-zinc-100",children:n.branch}),p.jsx(r,{className:"h-3.5 w-3.5 shrink-0 text-zinc-400"}),p.jsx(qs,{variant:n.status}),p.jsx("span",{className:"shrink-0 text-xs text-zinc-400 dark:text-zinc-500",children:xA(n.updated_at)})]},n.id)})})}function kA(){const e=Tn({queryKey:["stats"],queryFn:()=>tn("/api/stats")}),n=Tn({queryKey:["sessions","recent"],queryFn:()=>tn("/api/sessions?limit=10")}),r=e.data;return p.jsxs("div",{className:"space-y-8",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold",children:"Dashboard"}),p.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"Overview of your code review activity."})]}),(e.isError||n.isError)&&p.jsx("div",{className:"rounded-lg border border-red-500/25 bg-red-500/5 p-4 text-sm text-red-600 dark:text-red-400",children:"Failed to load dashboard data. Check that the server is running."}),p.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[p.jsx(Ss,{title:"Total Sessions",value:r?.totalSessions??0,icon:Ps}),p.jsx(Ss,{title:"Active Sessions",value:r?.activeSessions??0,icon:wz}),p.jsx(Ss,{title:"Completed Reviews",value:r?.completedReviews??0,icon:ki}),p.jsx(Ss,{title:"Completed Maps",value:r?.completedMaps??0,icon:ua}),p.jsx(Ss,{title:"Files Tracked",value:r?.filesTracked??0,icon:nR}),p.jsx(Ss,{title:"Unresolved Blockers",value:r?.unresolvedBlockers??0,icon:Rm})]}),p.jsxs("div",{children:[p.jsx("h2",{className:"mb-4 text-lg font-medium text-zinc-900 dark:text-zinc-100",children:"Recent Sessions"}),p.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-800 dark:bg-zinc-900",children:n.isLoading?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."}):p.jsx(_A,{sessions:n.data??[]})})]})]})}function wA(){const e=Gn(),n=Tn({queryKey:["sessions"],queryFn:()=>tn("/api/sessions")});return Tt("session:created",()=>{e.invalidateQueries({queryKey:["sessions"]})}),Tt("session:updated",()=>{e.invalidateQueries({queryKey:["sessions"]})}),n}function SA(e){const n=Gn(),r=Tn({queryKey:["sessions",e],queryFn:()=>tn(`/api/sessions/${e}`),enabled:!!e});return Tt("session:updated",()=>{n.invalidateQueries({queryKey:["sessions",e]})}),r}const NA=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"closed",label:"Closed"}],CA=[{value:"all",label:"All"},{value:"review",label:"Review"},{value:"map",label:"Map"}];function Uy({options:e,value:n,onChange:r,label:a}){return p.jsx("div",{role:"group","aria-label":a,className:"inline-flex rounded-md border border-zinc-200 dark:border-zinc-700",children:e.map((l,o)=>p.jsx("button",{onClick:()=>r(l.value),"aria-pressed":n===l.value,className:ke("px-3 py-1.5 text-xs font-medium transition-colors",o>0&&"border-l border-zinc-200 dark:border-zinc-700",o===0&&"rounded-l-md",o===e.length-1&&"rounded-r-md",n===l.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-white text-zinc-600 hover:bg-zinc-50 dark:bg-zinc-900 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:l.label},l.value))})}function TA({statusFilter:e,workflowFilter:n,onStatusChange:r,onWorkflowChange:a}){return p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),p.jsx(Uy,{label:"Filter by status",options:NA,value:e,onChange:r}),p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Workflow:"}),p.jsx(Uy,{label:"Filter by workflow",options:CA,value:n,onChange:a})]})}const zA={APPROVED:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",LGTM:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400","REQUEST CHANGES":"bg-red-500/15 text-red-700 dark:text-red-400","CHANGES REQUESTED":"bg-red-500/15 text-red-700 dark:text-red-400"};function RA(e){return zA[e.toUpperCase()]??"bg-amber-500/15 text-amber-700 dark:text-amber-400"}const AA=new Set(["changes_made","acknowledged","dismissed"]),OA={changes_made:"Changes Made",acknowledged:"Acknowledged",dismissed:"Dismissed"};function MA({session:e}){const r=e.has_review&&e.has_map?"Review + Map":e.has_map?"Map":"Review",l=(e.has_review?e.review_phase:e.map_phase).split("-").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" "),o=e.latest_round_status,u=o!=null&&AA.has(o);return p.jsxs(Dn,{to:`/sessions/${e.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:[p.jsxs("div",{className:"flex items-start justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(Ps,{className:"h-4 w-4 shrink-0 text-zinc-400"}),p.jsx("span",{className:"truncate text-sm font-medium text-zinc-900 dark:text-zinc-100",children:e.branch})]}),p.jsx(qs,{variant:e.status})]}),p.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[e.has_review&&p.jsx(ki,{className:"h-3.5 w-3.5"}),e.has_map&&p.jsx(ua,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:r})]}),p.jsx("span",{className:"text-zinc-300 dark:text-zinc-700",children:"|"}),e.latest_verdict?p.jsx("span",{className:"flex items-center gap-1.5",children:u?p.jsx("span",{className:"inline-flex items-center rounded bg-zinc-500/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-zinc-500 dark:text-zinc-400",children:OA[o]??o}):p.jsxs(p.Fragment,{children:[p.jsx("span",{className:ke("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-semibold uppercase",RA(e.latest_verdict)),children:e.latest_verdict}),e.latest_blocker_count>0&&p.jsxs("span",{className:"inline-flex items-center rounded bg-red-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-red-700 dark:text-red-400",children:[e.latest_blocker_count," blocker",e.latest_blocker_count!==1?"s":""]})]})}):p.jsxs("span",{children:["Phase: ",l]})]}),p.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-zinc-400 dark:text-zinc-500",children:[p.jsx("span",{children:bA(e.started_at)}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(_E,{className:"h-3 w-3"}),vA(e.updated_at)]})]})]})}function DA({sessions:e}){return e.length===0?p.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No sessions match your filters."}):p.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(n=>p.jsx(MA,{session:n},n.id))})}function LA(){const{data:e,isLoading:n}=wA(),[r,a]=N.useState("all"),[l,o]=N.useState("all"),u=N.useMemo(()=>e?e.filter(d=>!(r!=="all"&&d.status!==r||l!=="all"&&d.workflow_type!==l)):[],[e,r,l]);return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold",children:"Sessions"}),p.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:"All code review and map sessions."})]}),p.jsx(TA,{statusFilter:r,workflowFilter:l,onStatusChange:a,onWorkflowChange:o}),n?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading sessions..."}):p.jsx(DA,{sessions:u})]})}function th({phases:e,className:n}){return p.jsx("div",{role:"list","aria-label":"Phase timeline",className:ke("flex items-center gap-1",n),children:e.map((r,a)=>p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(jA,{phase:r}),a<e.length-1&&p.jsx("div",{className:ke("h-px w-6",r.status==="complete"&&e[a+1]?.status!=="skipped"?"bg-emerald-500":"bg-zinc-300 dark:bg-zinc-700")})]},r.name))})}function jA({phase:e}){return p.jsxs("div",{className:"group relative flex flex-col items-center",children:[p.jsxs("div",{tabIndex:0,role:"listitem","aria-label":`${e.name}: ${e.status}${e.timestamp?`, ${e.timestamp}`:""}`,className:ke("flex h-6 w-6 items-center justify-center rounded-full border",e.status==="complete"&&"border-emerald-500 bg-emerald-500 text-white",e.status==="active"&&"border-blue-500 bg-blue-500/10 text-blue-600 dark:text-blue-400",e.status==="pending"&&"border-zinc-300 bg-zinc-100 text-zinc-400 dark:border-zinc-600 dark:bg-zinc-800 dark:text-zinc-500",e.status==="skipped"&&"border-zinc-200 bg-zinc-50 text-zinc-300 dark:border-zinc-700 dark:bg-zinc-800/50 dark:text-zinc-600"),children:[e.status==="complete"&&p.jsx(Is,{className:"h-3.5 w-3.5"}),e.status==="active"&&p.jsx(Ls,{className:"h-3.5 w-3.5 animate-spin"}),e.status==="pending"&&p.jsx(Gz,{className:"h-2.5 w-2.5"}),e.status==="skipped"&&p.jsx(SE,{className:"h-3 w-3"})]}),p.jsxs("div",{className:"pointer-events-none absolute top-8 hidden whitespace-nowrap rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg group-hover:block group-focus-within:block dark:bg-zinc-100 dark:text-zinc-900",children:[p.jsx("span",{className:"font-medium",children:e.name}),e.timestamp&&p.jsx("span",{className:"ml-1 text-zinc-400 dark:text-zinc-500",children:e.timestamp})]})]})}function IA({session:e}){const n=e.has_review,r=e.has_map,a=n?"review":"map",[l,o]=N.useState(a),d=[{id:"review",label:"Review",icon:ki,visible:n},{id:"map",label:"Map",icon:ua,visible:r}].filter(f=>f.visible);return d.length===0?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No review or map data yet."}):p.jsxs("div",{children:[p.jsx("div",{className:"flex border-b border-zinc-200 dark:border-zinc-800",children:d.map(f=>p.jsxs("button",{onClick:()=>o(f.id),className:ke("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors",l===f.id?"border-zinc-900 text-zinc-900 dark:border-zinc-100 dark:text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[p.jsx(f.icon,{className:"h-4 w-4"}),f.label]},f.id))}),p.jsxs("div",{className:"mt-4",children:[l==="review"&&p.jsx(BA,{sessionId:e.id,status:e.status}),l==="map"&&p.jsx(UA,{sessionId:e.id,status:e.status})]})]})}function BA({sessionId:e,status:n}){const r=Gn();Tt("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})}),Tt("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"rounds"]})});const{data:a,isLoading:l}=Tn({queryKey:["sessions",e,"rounds"],queryFn:()=>tn(`/api/sessions/${e}/rounds`),enabled:!!e});return l?p.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[p.jsx(Ls,{className:"h-4 w-4 animate-spin"}),"Loading rounds..."]}):!a||a.length===0?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:n==="closed"?"This session was closed without completing any review rounds.":"Review in progress — no completed rounds yet."}):p.jsx("div",{className:"space-y-2",children:a.map(o=>p.jsxs(Dn,{to:`/sessions/${e}/reviews/${o.round_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[p.jsx(ki,{className:"h-4 w-4 text-zinc-400"}),p.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Round ",o.round_number]}),p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[o.progress&&p.jsx(qs,{variant:o.progress.status}),o.verdict&&p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o.verdict})]})]},o.round_number))})}function UA({sessionId:e,status:n}){const r=Gn();Tt("artifact:created",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})}),Tt("artifact:updated",()=>{r.invalidateQueries({queryKey:["sessions",e,"runs"]})});const{data:a,isLoading:l}=Tn({queryKey:["sessions",e,"runs"],queryFn:()=>tn(`/api/sessions/${e}/runs`),enabled:!!e});return l?p.jsxs("p",{className:"flex items-center gap-2 text-sm text-zinc-500 dark:text-zinc-400",children:[p.jsx(Ls,{className:"h-4 w-4 animate-spin"}),"Loading runs..."]}):!a||a.length===0?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:n==="closed"?"This session was closed without completing any map runs.":"Map in progress — no completed runs yet."}):p.jsx("div",{className:"space-y-2",children:a.map(o=>p.jsxs(Dn,{to:`/sessions/${e}/maps/${o.run_number}`,className:"flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors hover:bg-zinc-100 dark:hover:bg-zinc-800/50",children:[p.jsx(ua,{className:"h-4 w-4 text-zinc-400"}),p.jsxs("span",{className:"text-zinc-900 dark:text-zinc-100",children:["Run ",o.run_number]})]},o.run_number))})}const FA=["context","change-context","analysis","reviews","aggregation","discourse","synthesis","complete"],PA=["map-context","topology","flow-analysis","requirements-mapping","synthesis","complete"];function nh(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function rh(e,n,r,a){const l=e==="map"?PA:FA,o=l.length;return r>=o?l.map(u=>({name:nh(u),status:"complete"})):a==="closed"?l.map((u,d)=>({name:nh(u),status:d+1<=r?"complete":"skipped"})):l.map((u,d)=>({name:nh(u),status:d+1<r?"complete":d+1===r?"active":"pending"}))}function HA(){const{id:e}=wu(),n=Gn(),{data:r,isLoading:a}=SA(e??""),l=Tn({queryKey:["sessions",e,"events"],queryFn:()=>tn(`/api/sessions/${e}/events`),enabled:!!e});if(Tt("session:events",()=>{n.invalidateQueries({queryKey:["sessions",e,"events"]})}),a)return p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading session..."});if(!r)return p.jsxs("div",{children:[p.jsxs(Dn,{to:"/sessions",className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to sessions"]}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Session not found."})]});const o=r.has_review&&r.has_map,u=o?"Review + Map":r.has_map?"Map":"Review";return p.jsxs("div",{className:"space-y-6",children:[p.jsxs(Dn,{to:"/sessions",className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to sessions"]}),p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Ps,{className:"h-5 w-5 text-zinc-400"}),p.jsx("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:r.branch})]}),p.jsxs("div",{className:"flex items-center gap-3 text-sm text-zinc-500 dark:text-zinc-400",children:[p.jsxs("span",{className:"flex items-center gap-1",children:[r.has_review&&p.jsx(ki,{className:"h-4 w-4"}),r.has_map&&p.jsx(ua,{className:"h-4 w-4"}),p.jsx("span",{children:u})]}),p.jsxs("span",{className:"flex items-center gap-1",children:[p.jsx(_E,{className:"h-4 w-4"}),gA(r.started_at)]})]})]}),p.jsx(qs,{variant:r.status})]}),p.jsxs("div",{className:"mt-6",children:[p.jsx("h3",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-zinc-500 dark:text-zinc-400",children:"Progress"}),o?p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsx(ki,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Review"})]}),p.jsx(th,{phases:rh("review",r.review_phase,r.review_phase_number,r.status)})]}),p.jsxs("div",{children:[p.jsxs("div",{className:"mb-1 flex items-center gap-1.5 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsx(ua,{className:"h-3.5 w-3.5"}),p.jsx("span",{children:"Map"})]}),p.jsx(th,{phases:rh("map",r.map_phase,r.map_phase_number,r.status)})]})]}):p.jsx(th,{phases:rh(r.has_map?"map":"review",r.has_map?r.map_phase:r.review_phase,r.has_map?r.map_phase_number:r.review_phase_number,r.status)})]})]}),p.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:p.jsx(IA,{session:r})}),p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Event Log"}),l.isLoading?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading events..."}):(l.data??[]).length===0?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No events recorded."}):p.jsx("div",{className:"space-y-2",children:(l.data??[]).map(d=>p.jsxs("div",{className:"flex items-start gap-3 rounded-md px-3 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[p.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-400 dark:text-zinc-500",children:Ha(d.created_at).toLocaleTimeString()}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:d.event_type}),d.phase&&p.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Phase: ",d.phase]}),d.round!=null&&p.jsxs("span",{className:"ml-2 text-zinc-500 dark:text-zinc-400",children:["Round: ",d.round]})]})]},d.id))})]})]})}function TE(){const{data:e}=Hs(),n=e?.aiCli?.active??null,r=e?.aiCli?.available??[],a=e?.aiCli?.preferred??"auto";return{isAvailable:n!=null,activeCli:n,availableClis:r,isDisabledByConfig:a==="off"&&r.length>0}}const Wl=[{id:"review",command:"ocr review",label:"Review",description:"Run multi-agent AI code review",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]},{id:"map",command:"ocr map",label:"Map",description:"Generate a Code Review Map for large changesets",params:[{name:"target",type:"text",label:"Target",placeholder:"staged (default)"},{name:"requirements",type:"text",label:"Requirements",placeholder:"spec.md or describe what to focus on..."},{name:"fresh",type:"toggle",label:"Fresh start"}]}];function qA(e){const r=e.replace(/^ocr\s+/,"").split(/\s+/),a=r[0]??"";if(!Wl.find(u=>u.id===a))return null;const l={};let o=1;for(;o<r.length;){const u=r[o]??"";if(u==="--fresh")l.fresh=!0,o++;else if(u==="--requirements"&&o+1<r.length){l.requirements=r.slice(o+1).join(" ");break}else u.startsWith("--")||(l.target=u),o++}return{commandId:a,params:l}}function $A({isRunning:e,runningCount:n,onRunCommand:r,prefill:a,onPrefillConsumed:l}){const[o,u]=N.useState(Wl[0]?.id??""),[d,f]=N.useState({}),[h,b]=N.useState(!1),[y,x]=N.useState(!1),v=N.useRef(void 0),_=Wl.find(O=>O.id===o)??Wl[0],[k,w]=N.useState(null);a!==k&&(w(a),a&&(u(a.commandId),f(a.params),b(!1),x(!0),l())),N.useEffect(()=>{if(y)return v.current=setTimeout(()=>x(!1),1200),()=>clearTimeout(v.current)},[y]);function C(O){O!==o&&(u(O),f({}),b(!1))}function j(O,Z){f(A=>({...A,[O]:Z}))}function R(){const O=[_.command],Z=d.target;typeof Z=="string"&&Z.trim()&&O.push(Z.trim()),d.fresh===!0&&O.push("--fresh");const A=d.requirements;return typeof A=="string"&&A.trim()&&O.push("--requirements",A.trim()),O.join(" ")}function H(){e||b(!0)}function $(){const O=R();b(!1),f({}),r(O)}return p.jsxs("div",{className:ke("relative overflow-hidden rounded-lg border border-zinc-200 border-l-[3px] border-l-indigo-500 transition-shadow duration-500 dark:border-zinc-800 dark:border-l-indigo-400",y&&"ring-2 ring-indigo-400/60 shadow-md shadow-indigo-500/10"),children:[p.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx(Tm,{className:"mr-1.5 h-4 w-4 text-indigo-500 dark:text-indigo-400"}),Wl.map(O=>p.jsx("button",{type:"button",onClick:()=>C(O.id),className:ke("rounded-full px-3.5 py-1 text-xs font-medium transition-colors",O.id===o?"bg-indigo-600 text-white shadow-sm":"text-zinc-600 hover:bg-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:O.label},O.id))]}),p.jsxs("div",{className:"flex items-start gap-2 border-b border-amber-200 bg-amber-50 px-4 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[p.jsx(CE,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),p.jsx("span",{children:"Commands run an AI agent with full read/write and shell access to your project. Only run in trusted environments."})]}),p.jsxs("div",{className:"space-y-4 bg-white px-5 py-4 dark:bg-zinc-900/50",children:[p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:_.description}),p.jsx("div",{className:"space-y-3",children:_.params.map(O=>O.type==="text"?p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("label",{className:"w-28 shrink-0 text-right text-xs font-medium text-zinc-500 dark:text-zinc-400",children:O.label}),p.jsx("input",{type:"text",placeholder:O.placeholder,disabled:e,value:d[O.name]??"",onChange:Z=>j(O.name,Z.target.value),className:ke("w-full rounded-md border px-3 py-1.5 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","disabled:cursor-not-allowed disabled:opacity-50")})]},O.name):p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"w-28 shrink-0"}),p.jsxs("label",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsx("input",{type:"checkbox",disabled:e,checked:d[O.name]===!0,onChange:Z=>j(O.name,Z.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),O.label]})]},O.name))}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"w-28 shrink-0"}),p.jsxs("button",{type:"button",disabled:e,onClick:H,className:ke("flex w-full items-center justify-center gap-1.5 rounded-md px-4 py-2 text-sm font-medium transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:[p.jsx(oo,{className:"h-3.5 w-3.5"}),"Run ",_.label,n!=null&&n>0&&p.jsxs("span",{className:"ml-1.5 rounded-full bg-indigo-500/20 px-1.5 text-[10px] font-normal text-indigo-300",children:[n," running"]})]})]})]}),h&&p.jsx("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-white/95 backdrop-blur-sm dark:bg-zinc-900/95",children:p.jsxs("div",{className:"flex flex-col items-center gap-3 px-4",children:[p.jsxs("p",{className:"text-sm font-medium",children:["Run ",_.label,"?"]}),p.jsx("p",{className:"max-w-[260px] text-center text-xs text-zinc-500 dark:text-zinc-400",children:"This will spawn a Claude Code session that may take several minutes."}),p.jsx("code",{className:"max-w-[320px] truncate rounded bg-zinc-100 px-2 py-1 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:R()}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx("button",{type:"button",onClick:()=>b(!1),className:"rounded-md border border-zinc-300 px-4 py-1.5 text-xs font-medium transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:hover:bg-zinc-800",children:"Cancel"}),p.jsxs("button",{type:"button",onClick:$,className:"flex items-center gap-1 rounded-md bg-indigo-600 px-4 py-1.5 text-xs font-medium text-white transition-colors hover:bg-indigo-700",children:[p.jsx(oo,{className:"h-3 w-3"}),"Start"]})]})]})})]})}function GA({output:e,isRunning:n,exitCode:r,commandName:a,onCancel:l,bare:o}){const u=N.useRef(null);N.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[e]);const d=N.useMemo(()=>KA(e),[e]);return e.length>0||n?p.jsxs("div",{className:ke(!o&&"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800"),children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 bg-zinc-50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("div",{className:"flex items-center gap-2",children:n?p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"relative flex h-2 w-2",children:[p.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),p.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),p.jsxs("span",{className:"text-xs font-medium text-zinc-600 dark:text-zinc-300",children:["Running ",a??"workflow","..."]})]}):p.jsxs(p.Fragment,{children:[p.jsx(Tm,{className:"h-3.5 w-3.5 text-zinc-400"}),p.jsx("span",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Workflow Output"})]})}),p.jsxs("div",{className:"flex items-center gap-2",children:[n&&p.jsxs("button",{type:"button",onClick:l,className:ke("flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors","border-zinc-300 text-zinc-600 hover:bg-zinc-100","dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800"),children:[p.jsx(KR,{className:"h-2.5 w-2.5"}),"Cancel"]}),r!==null&&p.jsx("span",{className:ke("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",r===0?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":r===-2?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400"),children:r===0?"Complete":r===-2?"Cancelled":`Exit: ${r}`})]})]}),p.jsxs("div",{ref:u,className:"max-h-[600px] min-h-[120px] overflow-y-auto bg-white px-5 py-4 dark:bg-zinc-950",children:[d.length===0&&n?p.jsxs("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[p.jsx("span",{className:"h-1 w-1 animate-pulse rounded-full bg-zinc-400"}),"Waiting for output..."]}):d.map((h,b)=>{if(h.type==="tool")return p.jsxs("div",{className:"my-1 flex items-center gap-1.5 border-l-2 border-indigo-400/40 py-0.5 pl-2.5 font-mono text-xs text-zinc-400 dark:text-zinc-500",children:[p.jsx("span",{className:"shrink-0 text-indigo-400/70",children:"▸"}),p.jsx("span",{className:"truncate",children:h.text})]},b);if(h.type==="empty")return p.jsx("div",{className:"h-3"},b);const y=h.text.match(/^(#{1,6})\s+(.+)/);if(y){const x=y[1].length,v=y[2],_=x<=2?"text-base font-semibold":x<=4?"text-sm font-semibold":"text-sm font-medium";return p.jsx("div",{className:ke(_,"mt-3 mb-1 text-zinc-800 dark:text-zinc-200"),children:v},b)}return/^[-*+]\s/.test(h.text)||/^\d+\.\s/.test(h.text)?p.jsx("div",{className:"ml-4 text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:h.text},b):p.jsx("div",{className:"text-sm leading-relaxed text-zinc-700 dark:text-zinc-300",children:h.text},b)}),n&&d.length>0&&p.jsx("span",{className:"inline-block h-4 w-0.5 animate-pulse bg-indigo-500"})]})]}):null}function KA(e){if(!e)return[];const n=e.split(`
412
- `),r=[];for(const a of n){const l=a.trim();if(l===""){r.length>0&&r[r.length-1]?.type!=="empty"&&r.push({type:"empty",text:""});continue}if(l.startsWith("▸")){r.push({type:"tool",text:l.replace(/^▸\s*/,"")});continue}if(/^(#{1,6}\s|[-*+]\s|\d+\.\s|```|>\s|---|\*\*\*|___)/.test(l))r.push({type:"text",text:l});else{const u=r[r.length-1];u&&u.type==="text"?u.text+=" "+l:r.push({type:"text",text:l})}}return r.length>0&&r[r.length-1]?.type==="empty"&&r.pop(),r}function VA(){return Tn({queryKey:["command-history"],queryFn:()=>tn("/api/commands/history")})}function YA(e,n){const r=e.toLowerCase(),a=n.toLowerCase();let l=0;for(let o=0;o<a.length;o++){const u=r.indexOf(a[o],l);if(u<0)return!1;l=u+1}return!0}function uo(e){return e.exit_code===null?"running":e.exit_code===0?"success":e.exit_code===-2?"cancelled":"fail"}function QA(e){switch(e){case"success":return"Success";case"fail":return"Fail";case"cancelled":return"Cancelled";case"running":return"Running";default:return"All"}}function XA(e,n,r,a){let l=0;switch(r){case"date":l=new Date(e.started_at).getTime()-new Date(n.started_at).getTime();break;case"command":l=e.command.localeCompare(n.command);break;case"duration":l=(e.duration_ms??-1)-(n.duration_ms??-1);break;case"status":{const o={running:0,success:1,cancelled:2,fail:3,all:-1};l=(o[uo(e)]??0)-(o[uo(n)]??0);break}}return a==="asc"?l:-l}const ZA=[{value:"all",label:"All"},{value:"success",label:"Success"},{value:"fail",label:"Fail"},{value:"cancelled",label:"Cancelled"},{value:"running",label:"Running"}];function qc({label:e,field:n,activeField:r,dir:a,onToggle:l}){const o=n===r;return p.jsxs("button",{type:"button",onClick:()=>l(n),className:ke("inline-flex items-center gap-1 text-xs transition-colors",o?"font-medium text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[e,o?a==="desc"?p.jsx(Nz,{className:"h-3 w-3"}):p.jsx(Rz,{className:"h-3 w-3"}):p.jsx(yE,{className:"h-3 w-3 opacity-40"})]})}const WA=new Set(["map","review"]);function JA(e){const n=e.replace(/^ocr\s+/,"").split(/\s+/)[0]??"";return WA.has(n)}function e2({entry:e,isRunning:n,onRerun:r}){const[a,l]=N.useState(!1),u=e.exit_code!==null&&JA(e.command);return p.jsxs("div",{className:"border-b border-zinc-200 last:border-b-0 dark:border-zinc-800",children:[p.jsxs("div",{className:"flex w-full items-center gap-3 px-4 py-3 min-w-0",children:[p.jsxs("button",{type:"button",onClick:()=>l(!a),className:"flex min-w-0 flex-1 items-center gap-3 text-left transition-colors hover:text-zinc-900 dark:hover:text-zinc-100",children:[a?p.jsx(zu,{className:"h-4 w-4 shrink-0 text-zinc-400"}):p.jsx(xo,{className:"h-4 w-4 shrink-0 text-zinc-400"}),p.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-sm",children:e.command})]}),p.jsx("span",{className:"shrink-0 text-xs text-zinc-500 dark:text-zinc-400",children:yA(e.started_at)}),p.jsx("span",{className:"shrink-0 text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:EA(e.duration_ms)}),p.jsx("span",{className:ke("inline-flex shrink-0 items-center rounded-md border px-2 py-0.5 text-xs font-medium",e.exit_code===0?"border-emerald-500/25 bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":e.exit_code===-2?"border-amber-500/25 bg-amber-500/15 text-amber-700 dark:text-amber-400":e.exit_code!==null?"border-red-500/25 bg-red-500/15 text-red-700 dark:text-red-400":"border-zinc-500/25 bg-zinc-500/15 text-zinc-600 dark:text-zinc-400"),children:QA(uo(e))}),u&&p.jsx("button",{type:"button",disabled:n,onClick:()=>r(e.command),title:"Re-run this command",className:ke("shrink-0 rounded-md p-1.5 text-zinc-400 transition-colors","hover:bg-indigo-50 hover:text-indigo-600","dark:hover:bg-indigo-500/10 dark:hover:text-indigo-400",n&&"cursor-not-allowed opacity-30"),children:p.jsx(LR,{className:"h-3.5 w-3.5"})})]}),a&&p.jsx("pre",{className:"max-h-[300px] overflow-y-auto bg-zinc-950 px-4 py-3 font-mono text-sm leading-relaxed text-zinc-300",children:e.output||"No output recorded."})]})}function t2({isRunning:e,onRerun:n}){const{data:r,isLoading:a}=VA(),[l,o]=N.useState(""),[u,d]=N.useState("all"),[f,h]=N.useState("date"),[b,y]=N.useState("desc"),x=w=>{w===f?y(C=>C==="desc"?"asc":"desc"):(h(w),y(w==="date"?"desc":"asc"))},v=N.useMemo(()=>{if(!r)return[];let w=r;if(u!=="all"&&(w=w.filter(C=>uo(C)===u)),l.trim()){const C=l.trim();w=w.filter(j=>{const R=j.command+(j.args?" "+j.args:"");return YA(R,C)})}return[...w].sort((C,j)=>XA(C,j,f,b))},[r,u,l,f,b]),_=N.useMemo(()=>{if(!r)return{};const w={all:r.length,success:0,fail:0,cancelled:0,running:0};for(const C of r)w[uo(C)]++;return w},[r]);if(a)return p.jsxs("div",{className:"rounded-lg border border-zinc-200 dark:border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[p.jsx(Dy,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),p.jsx("span",{className:"text-sm font-medium",children:"Command History"})]}),p.jsx("div",{className:"p-4 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"Loading..."})]});const k=r&&r.length>0;return p.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx(Dy,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),p.jsx("span",{className:"text-sm font-medium",children:"Command History"}),k&&p.jsx("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:v.length===r.length?`${r.length}`:`${v.length} / ${r.length}`})]}),k&&p.jsxs("div",{className:"space-y-2 border-b border-zinc-200 bg-zinc-50/50 px-4 py-2.5 dark:border-zinc-800 dark:bg-zinc-900/50",children:[p.jsxs("div",{className:"relative",children:[p.jsx(NE,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-zinc-400"}),p.jsx("input",{type:"text",value:l,onChange:w=>o(w.target.value),placeholder:"Search commands...",className:"w-full rounded-md border border-zinc-200 bg-white py-1.5 pl-8 pr-8 text-sm text-zinc-900 placeholder:text-zinc-400 focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-400 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100 dark:placeholder:text-zinc-500"}),l&&p.jsx("button",{type:"button",onClick:()=>o(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",children:p.jsx(qa,{className:"h-3.5 w-3.5"})})]}),p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[p.jsx("div",{className:"flex flex-wrap items-center gap-1",children:ZA.map(w=>{const C=_[w.value]??0;return w.value!=="all"&&C===0?null:p.jsxs("button",{type:"button",onClick:()=>d(w.value),className:ke("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-medium transition-colors",u===w.value?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"bg-zinc-100 text-zinc-600 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:bg-zinc-700"),children:[w.label,p.jsx("span",{className:ke("tabular-nums",u===w.value?"text-zinc-300 dark:text-zinc-400":"text-zinc-400 dark:text-zinc-500"),children:C})]},w.value)})}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-wider text-zinc-400 dark:text-zinc-500",children:"Sort"}),p.jsx(qc,{label:"Date",field:"date",activeField:f,dir:b,onToggle:x}),p.jsx(qc,{label:"Command",field:"command",activeField:f,dir:b,onToggle:x}),p.jsx(qc,{label:"Duration",field:"duration",activeField:f,dir:b,onToggle:x}),p.jsx(qc,{label:"Status",field:"status",activeField:f,dir:b,onToggle:x})]})]})]}),k?v.length===0?p.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands match your filters."}):v.map(w=>p.jsx(e2,{entry:w,isRunning:e,onRerun:n},w.id)):p.jsx("div",{className:"p-6 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No commands have been run yet."})]})}function n2({tabs:e,activeTabId:n,onSelectTab:r,onDismissTab:a}){return e.length===0?null:p.jsx("div",{className:"flex items-center gap-0.5 overflow-x-auto border-b border-zinc-200 bg-zinc-50 px-2 dark:border-zinc-800 dark:bg-zinc-900",children:e.map(l=>{const o=l.executionId===n,u=l.command.replace(/^ocr\s+/,"").split(/\s+/)[0]??"command";return p.jsxs("button",{type:"button",onClick:()=>r(l.executionId),className:ke("group relative flex items-center gap-1.5 whitespace-nowrap px-3 py-2 text-xs font-medium transition-colors",o?"border-b-2 border-indigo-500 text-zinc-900 dark:text-zinc-100":"text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200"),children:[l.status==="running"?p.jsxs("span",{className:"relative flex h-2 w-2",children:[p.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),p.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}):l.status==="complete"?p.jsx(xE,{className:"h-3 w-3 text-emerald-500"}):l.status==="cancelled"?p.jsx(Oz,{className:"h-3 w-3 text-amber-500"}):p.jsx(vE,{className:"h-3 w-3 text-red-500"}),p.jsx("span",{className:"capitalize",children:u}),p.jsxs("span",{className:"text-[10px] text-zinc-400 dark:text-zinc-500",children:["#",l.executionId]}),l.status!=="running"&&p.jsx("span",{role:"button",tabIndex:0,onClick:d=>{d.stopPropagation(),a(l.executionId)},onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.stopPropagation(),a(l.executionId))},className:"ml-1 rounded p-0.5 opacity-0 transition-opacity hover:bg-zinc-200 group-hover:opacity-100 dark:hover:bg-zinc-700",children:p.jsx(qa,{className:"h-3 w-3"})})]},l.executionId)})})}const r2={claude:"Claude Code",opencode:"OpenCode"};function i2(){const{socket:e}=Fa(),n=Gn(),{isAvailable:r,activeCli:a,isDisabledByConfig:l}=TE(),{tabs:o,activeTabId:u,runningCount:d,setActiveTabId:f,dismissTab:h,cancelCommand:b}=Sm(),y=o.find(R=>R.executionId===u)??null,[x,v]=N.useState(null),_=N.useRef(null);Tt("command:finished",()=>{n.invalidateQueries({queryKey:["command-history"]})});const k=N.useCallback(R=>{e&&e.emit("command:run",{command:R})},[e]),w=N.useCallback(()=>{y&&y.status==="running"&&b(y.executionId)},[y,b]),C=N.useCallback(R=>{const H=qA(R);H&&(v(H),_.current?.scrollIntoView({behavior:"smooth",block:"start"}))},[]),j=N.useCallback(()=>{v(null)},[]);return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold",children:"Command Center"}),p.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:["Launch AI-powered code review workflows.",a&&p.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 rounded-full bg-zinc-100 px-2.5 py-0.5 text-[10px] font-medium text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:["Using ",r2[a]??a]})]})]}),r?p.jsx("div",{ref:_,children:p.jsx($A,{isRunning:!1,runningCount:d,onRunCommand:k,prefill:x,onPrefillConsumed:j})}):p.jsx("div",{className:"rounded-lg border border-zinc-200 bg-zinc-50 p-6 dark:border-zinc-800 dark:bg-zinc-900/50",children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsx(zm,{className:"mt-0.5 h-5 w-5 shrink-0 text-zinc-400"}),p.jsxs("div",{children:[p.jsx("h3",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:l?"AI Commands Disabled":"AI CLI Required"}),p.jsx("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:l?p.jsxs(p.Fragment,{children:["AI commands are turned off in your project config. Set ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"ai_cli"})," to"," ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"auto"}),","," ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"claude"}),", or"," ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:"opencode"})," ","in ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-xs dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable them."]}):p.jsxs(p.Fragment,{children:["Install"," ",p.jsx("a",{href:"https://docs.anthropic.com/en/docs/claude-code/getting-started",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"Claude Code"})," ","or"," ",p.jsx("a",{href:"https://opencode.ai",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400",children:"OpenCode"})," ","to run AI-powered review commands from the dashboard."]})}),p.jsx("p",{className:"mt-2 text-xs text-zinc-400 dark:text-zinc-500",children:"You can still use OCR slash commands directly from your IDE, and browse existing sessions, reviews, and maps below."})]})]})}),o.length>0&&p.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[p.jsx(n2,{tabs:o,activeTabId:u,onSelectTab:f,onDismissTab:h}),y&&p.jsx(GA,{bare:!0,output:y.output,isRunning:y.status==="running",exitCode:y.exitCode,commandName:y.command,onCancel:w})]}),p.jsx(t2,{isRunning:!1,onRerun:C})]})}function zE({value:e,max:n,className:r,showLabel:a=!1,size:l="md"}){const o=n>0?Math.round(e/n*100):0,u=Math.min(100,Math.max(0,o));return p.jsxs("div",{className:ke("flex items-center gap-2",r),children:[p.jsx("div",{className:ke("flex-1 overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800",l==="sm"?"h-1.5":"h-2.5"),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":n,"aria-label":`${e} of ${n} (${u}%)`,children:p.jsx("div",{className:ke("h-full rounded-full transition-all duration-300",u===100?"bg-emerald-500":u>50?"bg-blue-500":"bg-amber-500"),style:{width:`${u}%`}})}),a&&p.jsxs("span",{className:"text-xs tabular-nums text-zinc-500 dark:text-zinc-400",children:[e,"/",n]})]})}function a2({file:e,onToggle:n,highlighted:r}){const{data:a}=Hs();return p.jsxs("label",{"data-file-id":e.id,className:ke("group flex cursor-pointer items-center gap-3 px-4 py-2.5 pl-11 transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",r&&"bg-indigo-50 ring-1 ring-inset ring-indigo-200 dark:bg-indigo-950/30 dark:ring-indigo-800"),children:[p.jsx("input",{type:"checkbox",checked:e.is_reviewed,onChange:l=>n(l.target.checked),className:"h-4 w-4 rounded border-zinc-300 text-emerald-600 focus:ring-emerald-500 dark:border-zinc-600 dark:bg-zinc-800"}),p.jsx(Cm,{className:"h-4 w-4 shrink-0 text-zinc-400"}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("span",{className:"flex items-center gap-1.5",children:[a?p.jsx("a",{href:fu(a.ide,a.projectRoot,e.file_path),onClick:l=>l.stopPropagation(),className:ke("truncate text-sm font-mono hover:underline",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),title:`Open in ${a.ide}`,children:e.file_path}):p.jsx("span",{className:ke("truncate text-sm font-mono",e.is_reviewed?"text-zinc-400 line-through dark:text-zinc-500":"text-zinc-900 dark:text-zinc-100"),children:e.file_path}),a&&p.jsx(Nm,{className:"h-3 w-3 shrink-0 text-zinc-400 opacity-0 transition-opacity group-hover:opacity-100"})]}),e.role&&p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:e.role})]}),p.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums",children:[e.lines_added>0&&p.jsxs("span",{className:"flex items-center gap-0.5 text-emerald-600 dark:text-emerald-400",children:[p.jsx(OR,{className:"h-3 w-3"}),e.lines_added]}),e.lines_deleted>0&&p.jsxs("span",{className:"flex items-center gap-0.5 text-red-600 dark:text-red-400",children:[p.jsx(SE,{className:"h-3 w-3"}),e.lines_deleted]})]})]})}function s2({section:e,onToggleFile:n}){const[r,a]=N.useState(!1),[l,o]=N.useState(null),u=N.useRef(null),{data:d}=Hs();N.useEffect(()=>{!r||l==null||!u.current||requestAnimationFrame(()=>{u.current?.querySelector(`[data-file-id="${l}"]`)?.scrollIntoView({behavior:"smooth",block:"nearest"})})},[r,l]);const f=N.useCallback(h=>{if(h.stopPropagation(),!d||e.files.length===0)return;a(!0);const b=e.files.find(k=>!k.is_reviewed);o(b?.id??e.files[0]?.id??null);const y=e.files.filter(k=>!k.is_reviewed),v=(y.length>0?y:e.files).map(k=>fu(d.ide,d.projectRoot,k.file_path));function _(k){if(k>=v.length)return;const w=document.createElement("iframe");w.style.display="none",w.src=v[k],document.body.appendChild(w),setTimeout(()=>{w.remove(),_(k+1)},500)}_(0)},[d,e.files]);return p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("button",{onClick:()=>a(!r),"aria-expanded":r,className:"flex w-full items-start gap-3 p-4 text-left transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",children:[p.jsx("div",{className:"mt-0.5 text-zinc-400",children:r?p.jsx(zu,{className:"h-4 w-4"}):p.jsx(xo,{className:"h-4 w-4"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(sR,{className:"h-4 w-4 text-zinc-400"}),p.jsxs("span",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:[e.section_number,". ",e.title]}),p.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[e.file_count," ",e.file_count===1?"file":"files"]}),d&&e.files.length>0&&p.jsxs("button",{onClick:f,title:`Open all ${e.file_count} files in ${d.ide}`,className:"inline-flex items-center gap-1 rounded-md border border-zinc-200 bg-white px-2 py-0.5 text-xs text-zinc-600 transition-colors hover:border-zinc-300 hover:bg-zinc-50 hover:text-zinc-900 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400 dark:hover:border-zinc-600 dark:hover:bg-zinc-700 dark:hover:text-zinc-200",children:[p.jsx(iR,{className:"h-3 w-3"}),"Open all"]})]}),e.description&&p.jsx("p",{className:"mt-1 text-xs text-zinc-500 dark:text-zinc-400",children:e.description}),p.jsx("div",{className:"mt-2",children:p.jsx(zE,{value:e.reviewed_count,max:e.file_count,showLabel:!0,size:"sm"})})]})]}),r&&p.jsx("div",{ref:u,className:ke("border-t border-zinc-200 dark:border-zinc-800",e.files.length>0&&"divide-y divide-zinc-100 dark:divide-zinc-800"),children:e.files.length===0?p.jsx("p",{className:"px-4 py-3 text-sm text-zinc-500 dark:text-zinc-400",children:"No files in this section."}):e.files.map(h=>p.jsx(a2,{file:h,highlighted:h.id===l,onToggle:b=>{if(n(h.id,b),b&&h.id===l){const y=e.files.find(x=>x.id!==h.id&&!x.is_reviewed);o(y?.id??null)}}},h.id))})]})}function l2({onConfirm:e,isPending:n}){const[r,a]=N.useState(!1),l=N.useRef(null),o=N.useCallback(()=>a(!1),[]);return N.useEffect(()=>{if(!r)return;const u=d=>{d.key==="Escape"&&o()};return document.addEventListener("keydown",u),l.current?.focus(),()=>document.removeEventListener("keydown",u)},[r,o]),p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[p.jsx(tA,{className:"h-3.5 w-3.5"}),"Clear Progress"]}),r&&p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:o}),p.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"clear-progress-title",tabIndex:-1,className:"relative z-10 w-full max-w-sm rounded-lg border border-zinc-200 bg-white p-6 shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("button",{onClick:o,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:p.jsx(qa,{className:"h-4 w-4"})}),p.jsx("h3",{id:"clear-progress-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Clear all progress?"}),p.jsx("p",{className:"mt-2 text-sm text-zinc-600 dark:text-zinc-400",children:"This will uncheck all reviewed files for this map run. This action cannot be undone."}),p.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[p.jsx("button",{onClick:()=>a(!1),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),p.jsx("button",{onClick:()=>{e(),a(!1)},disabled:n,className:ke("rounded-md bg-red-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-red-700",n&&"cursor-not-allowed opacity-50"),children:n?"Clearing...":"Clear Progress"})]})]})]})]})}function o2(e,n){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const c2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d2={};function Fy(e,n){return(d2.jsx?u2:c2).test(e)}const f2=/[ \t\n\f\r]/g;function h2(e){return typeof e=="object"?e.type==="text"?Py(e.value):!1:Py(e)}function Py(e){return e.replace(f2,"")===""}class vo{constructor(n,r,a){this.normal=r,this.property=n,a&&(this.space=a)}}vo.prototype.normal={};vo.prototype.property={};vo.prototype.space=void 0;function RE(e,n){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new vo(r,a,n)}function Hh(e){return e.toLowerCase()}class nr{constructor(n,r){this.attribute=r,this.property=n}}nr.prototype.attribute="";nr.prototype.booleanish=!1;nr.prototype.boolean=!1;nr.prototype.commaOrSpaceSeparated=!1;nr.prototype.commaSeparated=!1;nr.prototype.defined=!1;nr.prototype.mustUseProperty=!1;nr.prototype.number=!1;nr.prototype.overloadedBoolean=!1;nr.prototype.property="";nr.prototype.spaceSeparated=!1;nr.prototype.space=void 0;let m2=0;const nt=$a(),bn=$a(),qh=$a(),pe=$a(),Gt=$a(),js=$a(),hr=$a();function $a(){return 2**++m2}const $h=Object.freeze(Object.defineProperty({__proto__:null,boolean:nt,booleanish:bn,commaOrSpaceSeparated:hr,commaSeparated:js,number:pe,overloadedBoolean:qh,spaceSeparated:Gt},Symbol.toStringTag,{value:"Module"})),ih=Object.keys($h);class Am extends nr{constructor(n,r,a,l){let o=-1;if(super(n,r),Hy(this,"space",l),typeof a=="number")for(;++o<ih.length;){const u=ih[o];Hy(this,ih[o],(a&$h[u])===$h[u])}}}Am.prototype.defined=!0;function Hy(e,n,r){r&&(e[n]=r)}function $s(e){const n={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new Am(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),n[a]=o,r[Hh(a)]=a,r[Hh(o.attribute)]=a}return new vo(n,r,e.space)}const AE=$s({properties:{ariaActiveDescendant:null,ariaAtomic:bn,ariaAutoComplete:null,ariaBusy:bn,ariaChecked:bn,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:Gt,ariaCurrent:null,ariaDescribedBy:Gt,ariaDetails:null,ariaDisabled:bn,ariaDropEffect:Gt,ariaErrorMessage:null,ariaExpanded:bn,ariaFlowTo:Gt,ariaGrabbed:bn,ariaHasPopup:null,ariaHidden:bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gt,ariaLevel:pe,ariaLive:null,ariaModal:bn,ariaMultiLine:bn,ariaMultiSelectable:bn,ariaOrientation:null,ariaOwns:Gt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:bn,ariaReadOnly:bn,ariaRelevant:null,ariaRequired:bn,ariaRoleDescription:Gt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:bn,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function OE(e,n){return n in e?e[n]:n}function ME(e,n){return OE(e,n.toLowerCase())}const p2=$s({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:Gt,accessKey:Gt,action:null,allow:null,allowFullScreen:nt,allowPaymentRequest:nt,allowUserMedia:nt,alt:null,as:null,async:nt,autoCapitalize:null,autoComplete:Gt,autoFocus:nt,autoPlay:nt,blocking:Gt,capture:null,charSet:null,checked:nt,cite:null,className:Gt,cols:pe,colSpan:null,content:null,contentEditable:bn,controls:nt,controlsList:Gt,coords:pe|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:nt,defer:nt,dir:null,dirName:null,disabled:nt,download:qh,draggable:bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:nt,formTarget:null,headers:Gt,height:pe,hidden:qh,high:pe,href:null,hrefLang:null,htmlFor:Gt,httpEquiv:Gt,id:null,imageSizes:null,imageSrcSet:null,inert:nt,inputMode:null,integrity:null,is:null,isMap:nt,itemId:null,itemProp:Gt,itemRef:Gt,itemScope:nt,itemType:Gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:nt,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:nt,muted:nt,name:null,nonce:null,noModule:nt,noValidate:nt,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:nt,optimum:pe,pattern:null,ping:Gt,placeholder:null,playsInline:nt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:nt,referrerPolicy:null,rel:Gt,required:nt,reversed:nt,rows:pe,rowSpan:pe,sandbox:Gt,scope:null,scoped:nt,seamless:nt,selected:nt,shadowRootClonable:nt,shadowRootDelegatesFocus:nt,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:nt,useMap:null,value:bn,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:nt,declare:nt,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:nt,noHref:nt,noShade:nt,noWrap:nt,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:bn,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:nt,disableRemotePlayback:nt,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:ME}),g2=$s({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:hr,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:Gt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:nt,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:js,g2:js,glyphName:js,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:hr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hr,rev:hr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hr,requiredFeatures:hr,requiredFonts:hr,requiredFormats:hr,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:hr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hr,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:OE}),DE=$s({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),LE=$s({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ME}),jE=$s({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),b2={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"},y2=/[A-Z]/g,qy=/-[a-z]/g,x2=/^data[-\w.:]+$/i;function v2(e,n){const r=Hh(n);let a=n,l=nr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&x2.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace(qy,_2);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!qy.test(o)){let u=o.replace(y2,E2);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}l=Am}return new l(a,n)}function E2(e){return"-"+e.toLowerCase()}function _2(e){return e.charAt(1).toUpperCase()}const k2=RE([AE,p2,DE,LE,jE],"html"),Om=RE([AE,g2,DE,LE,jE],"svg");function w2(e){return e.join(" ").trim()}var Ns={},ah,$y;function S2(){if($y)return ah;$y=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
413
- `,h="/",b="*",y="",x="comment",v="declaration";function _(w,C){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];C=C||{};var j=1,R=1;function H(le){var X=le.match(n);X&&(j+=X.length);var B=le.lastIndexOf(f);R=~B?le.length-B:R+le.length}function $(){var le={line:j,column:R};return function(X){return X.position=new O(le),ae(),X}}function O(le){this.start=le,this.end={line:j,column:R},this.source=C.source}O.prototype.content=w;function Z(le){var X=new Error(C.source+":"+j+":"+R+": "+le);if(X.reason=le,X.filename=C.source,X.line=j,X.column=R,X.source=w,!C.silent)throw X}function A(le){var X=le.exec(w);if(X){var B=X[0];return H(B),w=w.slice(B.length),X}}function ae(){A(r)}function P(le){var X;for(le=le||[];X=J();)X!==!1&&le.push(X);return le}function J(){var le=$();if(!(h!=w.charAt(0)||b!=w.charAt(1))){for(var X=2;y!=w.charAt(X)&&(b!=w.charAt(X)||h!=w.charAt(X+1));)++X;if(X+=2,y===w.charAt(X-1))return Z("End of comment missing");var B=w.slice(2,X-2);return R+=2,H(B),w=w.slice(X),R+=2,le({type:x,comment:B})}}function ee(){var le=$(),X=A(a);if(X){if(J(),!A(l))return Z("property missing ':'");var B=A(o),te=le({type:v,property:k(X[0].replace(e,y)),value:B?k(B[0].replace(e,y)):y});return A(u),te}}function ve(){var le=[];P(le);for(var X;X=ee();)X!==!1&&(le.push(X),P(le));return le}return ae(),ve()}function k(w){return w?w.replace(d,y):y}return ah=_,ah}var Gy;function N2(){if(Gy)return Ns;Gy=1;var e=Ns&&Ns.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=r;const n=e(S2());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const u=(0,n.default)(a),d=typeof l=="function";return u.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:b}=f;d?l(h,b,f):b&&(o=o||{},o[h]=b)}),o}return Ns}var ql={},Ky;function C2(){if(Ky)return ql;Ky=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(h){return!h||r.test(h)||e.test(h)},u=function(h,b){return b.toUpperCase()},d=function(h,b){return"".concat(b,"-")},f=function(h,b){return b===void 0&&(b={}),o(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(l,d):h=h.replace(a,d),h.replace(n,u))};return ql.camelCase=f,ql}var $l,Vy;function T2(){if(Vy)return $l;Vy=1;var e=$l&&$l.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(N2()),r=C2();function a(l,o){var u={};return!l||typeof l!="string"||(0,n.default)(l,function(d,f){d&&f&&(u[(0,r.camelCase)(d,o)]=f)}),u}return a.default=a,$l=a,$l}var z2=T2();const R2=Eu(z2),IE=BE("end"),Mm=BE("start");function BE(e){return n;function n(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function A2(e){const n=Mm(e),r=IE(e);if(n&&r)return{start:n,end:r}}function to(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yy(e.position):"start"in e||"end"in e?Yy(e):"line"in e||"column"in e?Gh(e):""}function Gh(e){return Qy(e&&e.line)+":"+Qy(e&&e.column)}function Yy(e){return Gh(e&&e.start)+"-"+Gh(e&&e.end)}function Qy(e){return e&&typeof e=="number"?e:1}class Fn extends Error{constructor(n,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},u=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof n=="string"?l=n:!o.cause&&n&&(u=!0,l=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof a=="string"){const f=a.indexOf(":");f===-1?o.ruleId=a:(o.source=a.slice(0,f),o.ruleId=a.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=d?d.line:void 0,this.name=to(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Fn.prototype.file="";Fn.prototype.name="";Fn.prototype.reason="";Fn.prototype.message="";Fn.prototype.stack="";Fn.prototype.column=void 0;Fn.prototype.line=void 0;Fn.prototype.ancestors=void 0;Fn.prototype.cause=void 0;Fn.prototype.fatal=void 0;Fn.prototype.place=void 0;Fn.prototype.ruleId=void 0;Fn.prototype.source=void 0;const Dm={}.hasOwnProperty,O2=new Map,M2=/[A-Z]/g,D2=new Set(["table","tbody","thead","tfoot","tr"]),L2=new Set(["td","th"]),UE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function j2(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let a;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=$2(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=q2(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:a,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Om:k2,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=FE(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function FE(e,n,r){if(n.type==="element")return I2(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return B2(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return F2(e,n,r);if(n.type==="mdxjsEsm")return U2(e,n);if(n.type==="root")return P2(e,n,r);if(n.type==="text")return H2(e,n)}function I2(e,n,r){const a=e.schema;let l=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=Om,e.schema=l),e.ancestors.push(n);const o=HE(e,n.tagName,!1),u=G2(e,n);let d=jm(e,n);return D2.has(n.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!h2(f):!0})),PE(e,u,o,n),Lm(u,d),e.ancestors.pop(),e.schema=a,e.create(n,o,u,r)}function B2(e,n){if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}fo(e,n.position)}function U2(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);fo(e,n.position)}function F2(e,n,r){const a=e.schema;let l=a;n.name==="svg"&&a.space==="html"&&(l=Om,e.schema=l),e.ancestors.push(n);const o=n.name===null?e.Fragment:HE(e,n.name,!0),u=K2(e,n),d=jm(e,n);return PE(e,u,o,n),Lm(u,d),e.ancestors.pop(),e.schema=a,e.create(n,o,u,r)}function P2(e,n,r){const a={};return Lm(a,jm(e,n)),e.create(n,e.Fragment,a,r)}function H2(e,n){return n.value}function PE(e,n,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=a)}function Lm(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function q2(e,n,r){return a;function a(l,o,u,d){const h=Array.isArray(u.children)?r:n;return d?h(o,u,d):h(o,u)}}function $2(e,n){return r;function r(a,l,o,u){const d=Array.isArray(o.children),f=Mm(a);return n(l,o,u,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function G2(e,n){const r={};let a,l;for(l in n.properties)if(l!=="children"&&Dm.call(n.properties,l)){const o=V2(e,l,n.properties[l]);if(o){const[u,d]=o;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&L2.has(n.tagName)?a=d:r[u]=d}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function K2(e,n){const r={};for(const a of n.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const u=o.expression;u.type;const d=u.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else fo(e,n.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else fo(e,n.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function jm(e,n){const r=[];let a=-1;const l=e.passKeys?new Map:O2;for(;++a<n.children.length;){const o=n.children[a];let u;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=l.get(f)||0;u=f+"-"+h,l.set(f,h+1)}}const d=FE(e,o,u);d!==void 0&&r.push(d)}return r}function V2(e,n,r){const a=v2(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?o2(r):w2(r)),a.property==="style"){let l=typeof r=="object"?r:Y2(e,String(r));return e.stylePropertyNameCase==="css"&&(l=Q2(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?b2[a.property]||a.property:a.attribute,r]}}function Y2(e,n){try{return R2(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new Fn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=UE+"#cannot-parse-style-attribute",l}}function HE(e,n,r){let a;if(!r)a={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let o=-1,u;for(;++o<l.length;){const d=Fy(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=u}else a=Fy(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const l=a.value;return Dm.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);fo(e)}function fo(e,n){const r=new Fn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=UE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Q2(e){const n={};let r;for(r in e)Dm.call(e,r)&&(n[X2(r)]=e[r]);return n}function X2(e){let n=e.replace(M2,Z2);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Z2(e){return"-"+e.toLowerCase()}const sh={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"]},W2={};function Im(e,n){const r=W2,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return qE(e,a,l)}function qE(e,n,r){if(J2(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xy(e.children,n,r)}return Array.isArray(e)?Xy(e,n,r):""}function Xy(e,n,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=qE(e[l],n,r);return a.join("")}function J2(e){return!!(e&&typeof e=="object")}const Zy=document.createElement("i");function Bm(e){const n="&"+e+";";Zy.innerHTML=n;const r=Zy.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function pr(e,n,r,a){const l=e.length;let o=0,u;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,a.length<1e4)u=Array.from(a),u.unshift(n,r),e.splice(...u);else for(r&&e.splice(n,r);o<a.length;)u=a.slice(o,o+1e4),u.unshift(n,0),e.splice(...u),o+=1e4,n+=1e4}function Rr(e,n){return e.length>0?(pr(e,e.length,0,n),e):n}const Wy={}.hasOwnProperty;function $E(e){const n={};let r=-1;for(;++r<e.length;)eO(n,e[r]);return n}function eO(e,n){let r;for(r in n){const l=(Wy.call(e,r)?e[r]:void 0)||(e[r]={}),o=n[r];let u;if(o)for(u in o){Wy.call(l,u)||(l[u]=[]);const d=o[u];tO(l[u],Array.isArray(d)?d:d?[d]:[])}}}function tO(e,n){let r=-1;const a=[];for(;++r<n.length;)(n[r].add==="after"?e:a).push(n[r]);pr(e,0,0,a)}function GE(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Ur(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const $n=fa(/[A-Za-z]/),Un=fa(/[\dA-Za-z]/),nO=fa(/[#-'*+\--9=?A-Z^-~]/);function pu(e){return e!==null&&(e<32||e===127)}const Kh=fa(/\d/),rO=fa(/[\dA-Fa-f]/),iO=fa(/[!-/:-@[-`{-~]/);function qe(e){return e!==null&&e<-2}function Ht(e){return e!==null&&(e<0||e===32)}function dt(e){return e===-2||e===-1||e===32}const Ru=fa(/\p{P}|\p{S}/u),Ba=fa(/\s/);function fa(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Gs(e){const n=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let u="";if(o===37&&Un(e.charCodeAt(r+1))&&Un(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(u=String.fromCharCode(o,d),l=1):u="�"}else u=String.fromCharCode(o);u&&(n.push(e.slice(a,r),encodeURIComponent(u)),a=r+l+1,u=""),l&&(r+=l,l=0)}return n.join("")+e.slice(a)}function _t(e,n,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(f){return dt(f)?(e.enter(r),d(f)):n(f)}function d(f){return dt(f)&&o++<l?(e.consume(f),d):(e.exit(r),n(f))}}const aO={tokenize:sO};function sO(e){const n=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return n;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),_t(e,n,"linePrefix")}function l(d){return e.enter("paragraph"),o(d)}function o(d){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return qe(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),u)}}const lO={tokenize:oO},Jy={tokenize:cO};function oO(e){const n=this,r=[];let a=0,l,o,u;return d;function d(R){if(a<r.length){const H=r[a];return n.containerState=H[1],e.attempt(H[0].continuation,f,h)(R)}return h(R)}function f(R){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&j();const H=n.events.length;let $=H,O;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type==="chunkFlow"){O=n.events[$][1].end;break}C(a);let Z=H;for(;Z<n.events.length;)n.events[Z][1].end={...O},Z++;return pr(n.events,$+1,0,n.events.slice(H)),n.events.length=Z,h(R)}return d(R)}function h(R){if(a===r.length){if(!l)return x(R);if(l.currentConstruct&&l.currentConstruct.concrete)return _(R);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Jy,b,y)(R)}function b(R){return l&&j(),C(a),x(R)}function y(R){return n.parser.lazy[n.now().line]=a!==r.length,u=n.now().offset,_(R)}function x(R){return n.containerState={},e.attempt(Jy,v,_)(R)}function v(R){return a++,r.push([n.currentConstruct,n.containerState]),x(R)}function _(R){if(R===null){l&&j(),C(0),e.consume(R);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),k(R)}function k(R){if(R===null){w(e.exit("chunkFlow"),!0),C(0),e.consume(R);return}return qe(R)?(e.consume(R),w(e.exit("chunkFlow")),a=0,n.interrupt=void 0,d):(e.consume(R),k)}function w(R,H){const $=n.sliceStream(R);if(H&&$.push(null),R.previous=o,o&&(o.next=R),o=R,l.defineSkip(R.start),l.write($),n.parser.lazy[R.start.line]){let O=l.events.length;for(;O--;)if(l.events[O][1].start.offset<u&&(!l.events[O][1].end||l.events[O][1].end.offset>u))return;const Z=n.events.length;let A=Z,ae,P;for(;A--;)if(n.events[A][0]==="exit"&&n.events[A][1].type==="chunkFlow"){if(ae){P=n.events[A][1].end;break}ae=!0}for(C(a),O=Z;O<n.events.length;)n.events[O][1].end={...P},O++;pr(n.events,A+1,0,n.events.slice(Z)),n.events.length=O}}function C(R){let H=r.length;for(;H-- >R;){const $=r[H];n.containerState=$[1],$[0].exit.call(n,e)}r.length=R}function j(){l.write([null]),o=void 0,l=void 0,n.containerState._closeFlow=void 0}}function cO(e,n,r){return _t(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bs(e){if(e===null||Ht(e)||Ba(e))return 1;if(Ru(e))return 2}function Au(e,n,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(n=o(n,r),a.push(o))}return n}const Vh={name:"attention",resolveAll:uO,tokenize:dO};function uO(e,n){let r=-1,a,l,o,u,d,f,h,b;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&n.sliceSerialize(e[a][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[a][1].end},x={...e[r][1].start};ex(y,-f),ex(x,f),u={type:f>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},o={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[a][1].end={...u.start},e[r][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=Rr(h,[["enter",e[a][1],n],["exit",e[a][1],n]])),h=Rr(h,[["enter",l,n],["enter",u,n],["exit",u,n],["enter",o,n]]),h=Rr(h,Au(n.parser.constructs.insideSpan.null,e.slice(a+1,r),n)),h=Rr(h,[["exit",o,n],["enter",d,n],["exit",d,n],["exit",l,n]]),e[r][1].end.offset-e[r][1].start.offset?(b=2,h=Rr(h,[["enter",e[r][1],n],["exit",e[r][1],n]])):b=0,pr(e,a-1,r-a+3,h),r=a+h.length-b-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function dO(e,n){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Bs(a);let o;return u;function u(f){return o=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===o)return e.consume(f),d;const h=e.exit("attentionSequence"),b=Bs(f),y=!b||b===2&&l||r.includes(f),x=!l||l===2&&b||r.includes(a);return h._open=!!(o===42?y:y&&(l||!x)),h._close=!!(o===42?x:x&&(b||!y)),n(f)}}function ex(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const fO={name:"autolink",tokenize:hO};function hO(e,n,r){let a=0;return l;function l(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return $n(v)?(e.consume(v),u):v===64?r(v):h(v)}function u(v){return v===43||v===45||v===46||Un(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(e.consume(v),a=0,f):(v===43||v===45||v===46||Un(v))&&a++<32?(e.consume(v),d):(a=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):v===null||v===32||v===60||pu(v)?r(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),b):nO(v)?(e.consume(v),h):r(v)}function b(v){return Un(v)?y(v):r(v)}function y(v){return v===46?(e.consume(v),a=0,b):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),n):x(v)}function x(v){if((v===45||Un(v))&&a++<63){const _=v===45?x:y;return e.consume(v),_}return r(v)}}const Eo={partial:!0,tokenize:mO};function mO(e,n,r){return a;function a(o){return dt(o)?_t(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||qe(o)?n(o):r(o)}}const KE={continuation:{tokenize:gO},exit:bO,name:"blockQuote",tokenize:pO};function pO(e,n,r){const a=this;return l;function l(u){if(u===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return r(u)}function o(u){return dt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(u))}}function gO(e,n,r){const a=this;return l;function l(u){return dt(u)?_t(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(KE,n,r)(u)}}function bO(e){e.exit("blockQuote")}const VE={name:"characterEscape",tokenize:yO};function yO(e,n,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return iO(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(o)}}const YE={name:"characterReference",tokenize:xO};function xO(e,n,r){const a=this;let l=0,o,u;return d;function d(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),f}function f(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=Un,b(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=rO,b):(e.enter("characterReferenceValue"),o=7,u=Kh,b(y))}function b(y){if(y===59&&l){const x=e.exit("characterReferenceValue");return u===Un&&!Bm(a.sliceSerialize(x))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return u(y)&&l++<o?(e.consume(y),b):r(y)}}const tx={partial:!0,tokenize:EO},nx={concrete:!0,name:"codeFenced",tokenize:vO};function vO(e,n,r){const a=this,l={partial:!0,tokenize:$};let o=0,u=0,d;return f;function f(O){return h(O)}function h(O){const Z=a.events[a.events.length-1];return o=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,d=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(O)}function b(O){return O===d?(u++,e.consume(O),b):u<3?r(O):(e.exit("codeFencedFenceSequence"),dt(O)?_t(e,y,"whitespace")(O):y(O))}function y(O){return O===null||qe(O)?(e.exit("codeFencedFence"),a.interrupt?n(O):e.check(tx,k,H)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===null||qe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(O)):dt(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_t(e,v,"whitespace")(O)):O===96&&O===d?r(O):(e.consume(O),x)}function v(O){return O===null||qe(O)?y(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(O))}function _(O){return O===null||qe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(O)):O===96&&O===d?r(O):(e.consume(O),_)}function k(O){return e.attempt(l,H,w)(O)}function w(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),C}function C(O){return o>0&&dt(O)?_t(e,j,"linePrefix",o+1)(O):j(O)}function j(O){return O===null||qe(O)?e.check(tx,k,H)(O):(e.enter("codeFlowValue"),R(O))}function R(O){return O===null||qe(O)?(e.exit("codeFlowValue"),j(O)):(e.consume(O),R)}function H(O){return e.exit("codeFenced"),n(O)}function $(O,Z,A){let ae=0;return P;function P(X){return O.enter("lineEnding"),O.consume(X),O.exit("lineEnding"),J}function J(X){return O.enter("codeFencedFence"),dt(X)?_t(O,ee,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):ee(X)}function ee(X){return X===d?(O.enter("codeFencedFenceSequence"),ve(X)):A(X)}function ve(X){return X===d?(ae++,O.consume(X),ve):ae>=u?(O.exit("codeFencedFenceSequence"),dt(X)?_t(O,le,"whitespace")(X):le(X)):A(X)}function le(X){return X===null||qe(X)?(O.exit("codeFencedFence"),Z(X)):A(X)}}}function EO(e,n,r){const a=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return a.parser.lazy[a.now().line]?r(u):n(u)}}const lh={name:"codeIndented",tokenize:kO},_O={partial:!0,tokenize:wO};function kO(e,n,r){const a=this;return l;function l(h){return e.enter("codeIndented"),_t(e,o,"linePrefix",5)(h)}function o(h){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?f(h):qe(h)?e.attempt(_O,u,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||qe(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),n(h)}}function wO(e,n,r){const a=this;return l;function l(u){return a.parser.lazy[a.now().line]?r(u):qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):_t(e,o,"linePrefix",5)(u)}function o(u){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):qe(u)?l(u):r(u)}}const SO={name:"codeText",previous:CO,resolve:NO,tokenize:TO};function NO(e){let n=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(a=r;++a<n;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(a=r-1,n++;++a<=n;)l===void 0?a!==n&&e[a][1].type!=="lineEnding"&&(l=a):(a===n||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),n-=a-l-2,a=l+2),l=void 0);return e}function CO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function TO(e,n,r){let a=0,l,o;return u;function u(y){return e.enter("codeText"),e.enter("codeTextSequence"),d(y)}function d(y){return y===96?(e.consume(y),a++,d):(e.exit("codeTextSequence"),f(y))}function f(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),f):y===96?(o=e.enter("codeTextSequence"),l=0,b(y)):qe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||qe(y)?(e.exit("codeTextData"),f(y)):(e.consume(y),h)}function b(y){return y===96?(e.consume(y),l++,b):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(o.type="codeTextData",h(y))}}class zO{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(n,a):n>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(n,r,a){const l=r||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&Gl(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Gl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Gl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);Gl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Gl(this.left,r.reverse())}}}function Gl(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function QE(e){const n={};let r=-1,a,l,o,u,d,f,h;const b=new zO(e);for(;++r<b.length;){for(;r in n;)r=n[r];if(a=b.get(r),r&&a[1].type==="chunkFlow"&&b.get(r-1)[1].type==="listItemPrefix"&&(f=a[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(n,RO(b,r)),r=n[r],h=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(u=b.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(b.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(a[1].end={...b.get(l)[1].start},d=b.slice(l,r),d.unshift(a),b.splice(l,r-l+1,d))}}return pr(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function RO(e,n){const r=e.get(n)[1],a=e.get(n)[2];let l=n-1;const o=[];let u=r._tokenizer;u||(u=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,f=[],h={};let b,y,x=-1,v=r,_=0,k=0;const w=[k];for(;v;){for(;e.get(++l)[1]!==v;);o.push(l),v._tokenizer||(b=a.sliceStream(v),v.next||b.push(null),y&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(b),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=r;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(k=x+1,w.push(k),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):w.pop(),x=w.length;x--;){const C=d.slice(w[x],w[x+1]),j=o.pop();f.push([j,j+C.length-1]),e.splice(j,2,C)}for(f.reverse(),x=-1;++x<f.length;)h[_+f[x][0]]=_+f[x][1],_+=f[x][1]-f[x][0]-1;return h}const AO={resolve:MO,tokenize:DO},OO={partial:!0,tokenize:LO};function MO(e){return QE(e),e}function DO(e,n){let r;return a;function a(d){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(d)}function l(d){return d===null?o(d):qe(d)?e.check(OO,u,o)(d):(e.consume(d),l)}function o(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function u(d){return e.consume(d),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function LO(e,n,r){const a=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),_t(e,o,"linePrefix")}function o(u){if(u===null||qe(u))return r(u);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):e.interrupt(a.parser.constructs.flow,r,n)(u)}}function XE(e,n,r,a,l,o,u,d,f){const h=f||Number.POSITIVE_INFINITY;let b=0;return y;function y(C){return C===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(C),e.exit(o),x):C===null||C===32||C===41||pu(C)?r(C):(e.enter(a),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),k(C))}function x(C){return C===62?(e.enter(o),e.consume(C),e.exit(o),e.exit(l),e.exit(a),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(e.exit("chunkString"),e.exit(d),x(C)):C===null||C===60||qe(C)?r(C):(e.consume(C),C===92?_:v)}function _(C){return C===60||C===62||C===92?(e.consume(C),v):v(C)}function k(C){return!b&&(C===null||C===41||Ht(C))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(a),n(C)):b<h&&C===40?(e.consume(C),b++,k):C===41?(e.consume(C),b--,k):C===null||C===32||C===40||pu(C)?r(C):(e.consume(C),C===92?w:k)}function w(C){return C===40||C===41||C===92?(e.consume(C),k):k(C)}}function ZE(e,n,r,a,l,o){const u=this;let d=0,f;return h;function h(v){return e.enter(a),e.enter(l),e.consume(v),e.exit(l),e.enter(o),b}function b(v){return d>999||v===null||v===91||v===93&&!f||v===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?r(v):v===93?(e.exit(o),e.enter(l),e.consume(v),e.exit(l),e.exit(a),n):qe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||qe(v)||d++>999?(e.exit("chunkString"),b(v)):(e.consume(v),f||(f=!dt(v)),v===92?x:y)}function x(v){return v===91||v===92||v===93?(e.consume(v),d++,y):y(v)}}function WE(e,n,r,a,l,o){let u;return d;function d(x){return x===34||x===39||x===40?(e.enter(a),e.enter(l),e.consume(x),e.exit(l),u=x===40?41:x,f):r(x)}function f(x){return x===u?(e.enter(l),e.consume(x),e.exit(l),e.exit(a),n):(e.enter(o),h(x))}function h(x){return x===u?(e.exit(o),f(u)):x===null?r(x):qe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),_t(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===u||x===null||qe(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?y:b)}function y(x){return x===u||x===92?(e.consume(x),b):b(x)}}function no(e,n){let r;return a;function a(l){return qe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):dt(l)?_t(e,a,r?"linePrefix":"lineSuffix")(l):n(l)}}const jO={name:"definition",tokenize:BO},IO={partial:!0,tokenize:UO};function BO(e,n,r){const a=this;let l;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return ZE.call(a,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return l=Ur(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):r(v)}function f(v){return Ht(v)?no(e,h)(v):h(v)}function h(v){return XE(e,b,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return e.attempt(IO,y,y)(v)}function y(v){return dt(v)?_t(e,x,"whitespace")(v):x(v)}function x(v){return v===null||qe(v)?(e.exit("definition"),a.parser.defined.push(l),n(v)):r(v)}}function UO(e,n,r){return a;function a(d){return Ht(d)?no(e,l)(d):r(d)}function l(d){return WE(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return dt(d)?_t(e,u,"whitespace")(d):u(d)}function u(d){return d===null||qe(d)?n(d):r(d)}}const FO={name:"hardBreakEscape",tokenize:PO};function PO(e,n,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return qe(o)?(e.exit("hardBreakEscape"),n(o)):r(o)}}const HO={name:"headingAtx",resolve:qO,tokenize:$O};function qO(e,n){let r=e.length-2,a=3,l,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},pr(e,a,r-a+1,[["enter",l,n],["enter",o,n],["exit",o,n],["exit",l,n]])),e}function $O(e,n,r){let a=0;return l;function l(b){return e.enter("atxHeading"),o(b)}function o(b){return e.enter("atxHeadingSequence"),u(b)}function u(b){return b===35&&a++<6?(e.consume(b),u):b===null||Ht(b)?(e.exit("atxHeadingSequence"),d(b)):r(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),f(b)):b===null||qe(b)?(e.exit("atxHeading"),n(b)):dt(b)?_t(e,d,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function f(b){return b===35?(e.consume(b),f):(e.exit("atxHeadingSequence"),d(b))}function h(b){return b===null||b===35||Ht(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),h)}}const GO=["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"],rx=["pre","script","style","textarea"],KO={concrete:!0,name:"htmlFlow",resolveTo:QO,tokenize:XO},VO={partial:!0,tokenize:WO},YO={partial:!0,tokenize:ZO};function QO(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function XO(e,n,r){const a=this;let l,o,u,d,f;return h;function h(z){return b(z)}function b(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),y}function y(z){return z===33?(e.consume(z),x):z===47?(e.consume(z),o=!0,k):z===63?(e.consume(z),l=3,a.interrupt?n:T):$n(z)?(e.consume(z),u=String.fromCharCode(z),w):r(z)}function x(z){return z===45?(e.consume(z),l=2,v):z===91?(e.consume(z),l=5,d=0,_):$n(z)?(e.consume(z),l=4,a.interrupt?n:T):r(z)}function v(z){return z===45?(e.consume(z),a.interrupt?n:T):r(z)}function _(z){const he="CDATA[";return z===he.charCodeAt(d++)?(e.consume(z),d===he.length?a.interrupt?n:ee:_):r(z)}function k(z){return $n(z)?(e.consume(z),u=String.fromCharCode(z),w):r(z)}function w(z){if(z===null||z===47||z===62||Ht(z)){const he=z===47,Ee=u.toLowerCase();return!he&&!o&&rx.includes(Ee)?(l=1,a.interrupt?n(z):ee(z)):GO.includes(u.toLowerCase())?(l=6,he?(e.consume(z),C):a.interrupt?n(z):ee(z)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(z):o?j(z):R(z))}return z===45||Un(z)?(e.consume(z),u+=String.fromCharCode(z),w):r(z)}function C(z){return z===62?(e.consume(z),a.interrupt?n:ee):r(z)}function j(z){return dt(z)?(e.consume(z),j):P(z)}function R(z){return z===47?(e.consume(z),P):z===58||z===95||$n(z)?(e.consume(z),H):dt(z)?(e.consume(z),R):P(z)}function H(z){return z===45||z===46||z===58||z===95||Un(z)?(e.consume(z),H):$(z)}function $(z){return z===61?(e.consume(z),O):dt(z)?(e.consume(z),$):R(z)}function O(z){return z===null||z===60||z===61||z===62||z===96?r(z):z===34||z===39?(e.consume(z),f=z,Z):dt(z)?(e.consume(z),O):A(z)}function Z(z){return z===f?(e.consume(z),f=null,ae):z===null||qe(z)?r(z):(e.consume(z),Z)}function A(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||Ht(z)?$(z):(e.consume(z),A)}function ae(z){return z===47||z===62||dt(z)?R(z):r(z)}function P(z){return z===62?(e.consume(z),J):r(z)}function J(z){return z===null||qe(z)?ee(z):dt(z)?(e.consume(z),J):r(z)}function ee(z){return z===45&&l===2?(e.consume(z),B):z===60&&l===1?(e.consume(z),te):z===62&&l===4?(e.consume(z),M):z===63&&l===3?(e.consume(z),T):z===93&&l===5?(e.consume(z),fe):qe(z)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(VO,G,ve)(z)):z===null||qe(z)?(e.exit("htmlFlowData"),ve(z)):(e.consume(z),ee)}function ve(z){return e.check(YO,le,G)(z)}function le(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),X}function X(z){return z===null||qe(z)?ve(z):(e.enter("htmlFlowData"),ee(z))}function B(z){return z===45?(e.consume(z),T):ee(z)}function te(z){return z===47?(e.consume(z),u="",oe):ee(z)}function oe(z){if(z===62){const he=u.toLowerCase();return rx.includes(he)?(e.consume(z),M):ee(z)}return $n(z)&&u.length<8?(e.consume(z),u+=String.fromCharCode(z),oe):ee(z)}function fe(z){return z===93?(e.consume(z),T):ee(z)}function T(z){return z===62?(e.consume(z),M):z===45&&l===2?(e.consume(z),T):ee(z)}function M(z){return z===null||qe(z)?(e.exit("htmlFlowData"),G(z)):(e.consume(z),M)}function G(z){return e.exit("htmlFlow"),n(z)}}function ZO(e,n,r){const a=this;return l;function l(u){return qe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):r(u)}function o(u){return a.parser.lazy[a.now().line]?r(u):n(u)}}function WO(e,n,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Eo,n,r)}}const JO={name:"htmlText",tokenize:eM};function eM(e,n,r){const a=this;let l,o,u;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),$):T===63?(e.consume(T),R):$n(T)?(e.consume(T),A):r(T)}function h(T){return T===45?(e.consume(T),b):T===91?(e.consume(T),o=0,_):$n(T)?(e.consume(T),j):r(T)}function b(T){return T===45?(e.consume(T),v):r(T)}function y(T){return T===null?r(T):T===45?(e.consume(T),x):qe(T)?(u=y,te(T)):(e.consume(T),y)}function x(T){return T===45?(e.consume(T),v):y(T)}function v(T){return T===62?B(T):T===45?x(T):y(T)}function _(T){const M="CDATA[";return T===M.charCodeAt(o++)?(e.consume(T),o===M.length?k:_):r(T)}function k(T){return T===null?r(T):T===93?(e.consume(T),w):qe(T)?(u=k,te(T)):(e.consume(T),k)}function w(T){return T===93?(e.consume(T),C):k(T)}function C(T){return T===62?B(T):T===93?(e.consume(T),C):k(T)}function j(T){return T===null||T===62?B(T):qe(T)?(u=j,te(T)):(e.consume(T),j)}function R(T){return T===null?r(T):T===63?(e.consume(T),H):qe(T)?(u=R,te(T)):(e.consume(T),R)}function H(T){return T===62?B(T):R(T)}function $(T){return $n(T)?(e.consume(T),O):r(T)}function O(T){return T===45||Un(T)?(e.consume(T),O):Z(T)}function Z(T){return qe(T)?(u=Z,te(T)):dt(T)?(e.consume(T),Z):B(T)}function A(T){return T===45||Un(T)?(e.consume(T),A):T===47||T===62||Ht(T)?ae(T):r(T)}function ae(T){return T===47?(e.consume(T),B):T===58||T===95||$n(T)?(e.consume(T),P):qe(T)?(u=ae,te(T)):dt(T)?(e.consume(T),ae):B(T)}function P(T){return T===45||T===46||T===58||T===95||Un(T)?(e.consume(T),P):J(T)}function J(T){return T===61?(e.consume(T),ee):qe(T)?(u=J,te(T)):dt(T)?(e.consume(T),J):ae(T)}function ee(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,ve):qe(T)?(u=ee,te(T)):dt(T)?(e.consume(T),ee):(e.consume(T),le)}function ve(T){return T===l?(e.consume(T),l=void 0,X):T===null?r(T):qe(T)?(u=ve,te(T)):(e.consume(T),ve)}function le(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Ht(T)?ae(T):(e.consume(T),le)}function X(T){return T===47||T===62||Ht(T)?ae(T):r(T)}function B(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),n):r(T)}function te(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),oe}function oe(T){return dt(T)?_t(e,fe,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):fe(T)}function fe(T){return e.enter("htmlTextData"),u(T)}}const Um={name:"labelEnd",resolveAll:iM,resolveTo:aM,tokenize:sM},tM={tokenize:lM},nM={tokenize:oM},rM={tokenize:cM};function iM(e){let n=-1;const r=[];for(;++n<e.length;){const a=e[n][1];if(r.push(e[n]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",n+=l}}return e.length!==r.length&&pr(e,0,e.length,r),e}function aM(e,n){let r=e.length,a=0,l,o,u,d;for(;r--;)if(l=e[r][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=r,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(u=r);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},b={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",f,n],["enter",h,n]],d=Rr(d,e.slice(o+1,o+a+3)),d=Rr(d,[["enter",b,n]]),d=Rr(d,Au(n.parser.constructs.insideSpan.null,e.slice(o+a+4,u-3),n)),d=Rr(d,[["exit",b,n],e[u-2],e[u-1],["exit",h,n]]),d=Rr(d,e.slice(u+1)),d=Rr(d,[["exit",f,n]]),pr(e,o,e.length,d),e}function sM(e,n,r){const a=this;let l=a.events.length,o,u;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return d;function d(x){return o?o._inactive?y(x):(u=a.parser.defined.includes(Ur(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):r(x)}function f(x){return x===40?e.attempt(tM,b,u?b:y)(x):x===91?e.attempt(nM,b,u?h:y)(x):u?b(x):y(x)}function h(x){return e.attempt(rM,b,y)(x)}function b(x){return n(x)}function y(x){return o._balanced=!0,r(x)}}function lM(e,n,r){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return Ht(y)?no(e,o)(y):o(y)}function o(y){return y===41?b(y):XE(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return Ht(y)?no(e,f)(y):b(y)}function d(y){return r(y)}function f(y){return y===34||y===39||y===40?WE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function h(y){return Ht(y)?no(e,b)(y):b(y)}function b(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function oM(e,n,r){const a=this;return l;function l(d){return ZE.call(a,e,o,u,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(Ur(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?n(d):r(d)}function u(d){return r(d)}}function cM(e,n,r){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):r(o)}}const uM={name:"labelStartImage",resolveAll:Um.resolveAll,tokenize:dM};function dM(e,n,r){const a=this;return l;function l(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):r(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):n(d)}}const fM={name:"labelStartLink",resolveAll:Um.resolveAll,tokenize:hM};function hM(e,n,r){const a=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(u):n(u)}}const oh={name:"lineEnding",tokenize:mM};function mM(e,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_t(e,n,"linePrefix")}}const lu={name:"thematicBreak",tokenize:pM};function pM(e,n,r){let a=0,l;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return l=h,d(h)}function d(h){return h===l?(e.enter("thematicBreakSequence"),f(h)):a>=3&&(h===null||qe(h))?(e.exit("thematicBreak"),n(h)):r(h)}function f(h){return h===l?(e.consume(h),a++,f):(e.exit("thematicBreakSequence"),dt(h)?_t(e,d,"whitespace")(h):d(h))}}const tr={continuation:{tokenize:xM},exit:EM,name:"list",tokenize:yM},gM={partial:!0,tokenize:_M},bM={partial:!0,tokenize:vM};function yM(e,n,r){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return d;function d(v){const _=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Kh(v)){if(a.containerState.type||(a.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(lu,r,h)(v):h(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return r(v)}function f(v){return Kh(v)&&++u<10?(e.consume(v),f):(!a.interrupt||u<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):r(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Eo,a.interrupt?r:b,e.attempt(gM,x,y))}function b(v){return a.containerState.initialBlankLine=!0,o++,x(v)}function y(v){return dt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):r(v)}function x(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(v)}}function xM(e,n,r){const a=this;return a.containerState._closeFlow=void 0,e.check(Eo,l,o);function l(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,_t(e,n,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!dt(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(bM,n,u)(d))}function u(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,_t(e,e.attempt(tr,n,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function vM(e,n,r){const a=this;return _t(e,l,"listItemIndent",a.containerState.size+1);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?n(o):r(o)}}function EM(e){e.exit(this.containerState.type)}function _M(e,n,r){const a=this;return _t(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const u=a.events[a.events.length-1];return!dt(o)&&u&&u[1].type==="listItemPrefixWhitespace"?n(o):r(o)}}const ix={name:"setextUnderline",resolveTo:kM,tokenize:wM};function kM(e,n){let r=e.length,a,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",u,n]),e.splice(o+1,0,["exit",e[a][1],n]),e[a][1].end={...e[o][1].end}):e[a][1]=u,e.push(["exit",u,n]),e}function wM(e,n,r){const a=this;let l;return o;function o(h){let b=a.events.length,y;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){y=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),l=h,u(h)):r(h)}function u(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===l?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),dt(h)?_t(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||qe(h)?(e.exit("setextHeadingLine"),n(h)):r(h)}}const SM={tokenize:NM};function NM(e){const n=this,r=e.attempt(Eo,a,e.attempt(this.parser.constructs.flowInitial,l,_t(e,e.attempt(this.parser.constructs.flow,l,e.attempt(AO,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const CM={resolveAll:e_()},TM=JE("string"),zM=JE("text");function JE(e){return{resolveAll:e_(e==="text"?RM:void 0),tokenize:n};function n(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,u,d);return u;function u(b){return h(b)?o(b):d(b)}function d(b){if(b===null){r.consume(b);return}return r.enter("data"),r.consume(b),f}function f(b){return h(b)?(r.exit("data"),o(b)):(r.consume(b),f)}function h(b){if(b===null)return!0;const y=l[b];let x=-1;if(y)for(;++x<y.length;){const v=y[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function e_(e){return n;function n(r,a){let l=-1,o;for(;++l<=r.length;)o===void 0?r[l]&&r[l][1].type==="data"&&(o=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==o+2&&(r[o][1].end=r[l-1][1].end,r.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(r,a):r}}function RM(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],l=n.sliceStream(a);let o=l.length,u=-1,d=0,f;for(;o--;){const h=l[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(h===-2)f=!0,d++;else if(h!==-1){o++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(d=0),d){const h={type:r===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:a.start._bufferIndex+u,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return e}const AM={42:tr,43:tr,45:tr,48:tr,49:tr,50:tr,51:tr,52:tr,53:tr,54:tr,55:tr,56:tr,57:tr,62:KE},OM={91:jO},MM={[-2]:lh,[-1]:lh,32:lh},DM={35:HO,42:lu,45:[ix,lu],60:KO,61:ix,95:lu,96:nx,126:nx},LM={38:YE,92:VE},jM={[-5]:oh,[-4]:oh,[-3]:oh,33:uM,38:YE,42:Vh,60:[fO,JO],91:fM,92:[FO,VE],93:Um,95:Vh,96:SO},IM={null:[Vh,CM]},BM={null:[42,95]},UM={null:[]},FM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:BM,contentInitial:OM,disable:UM,document:AM,flow:DM,flowInitial:MM,insideSpan:IM,string:LM,text:jM},Symbol.toStringTag,{value:"Module"}));function PM(e,n,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},o=[];let u=[],d=[];const f={attempt:Z($),check:Z(O),consume:j,enter:R,exit:H,interrupt:Z(O,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:_,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:y};let b=n.tokenize.call(h,f);return n.resolveAll&&o.push(n),h;function y(J){return u=Rr(u,J),w(),u[u.length-1]!==null?[]:(A(n,0),h.events=Au(o,h.events,h),h.events)}function x(J,ee){return qM(v(J),ee)}function v(J){return HM(u,J)}function _(){const{_bufferIndex:J,_index:ee,line:ve,column:le,offset:X}=a;return{_bufferIndex:J,_index:ee,line:ve,column:le,offset:X}}function k(J){l[J.line]=J.column,P()}function w(){let J;for(;a._index<u.length;){const ee=u[a._index];if(typeof ee=="string")for(J=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===J&&a._bufferIndex<ee.length;)C(ee.charCodeAt(a._bufferIndex));else C(ee)}}function C(J){b=b(J)}function j(J){qe(J)?(a.line++,a.column=1,a.offset+=J===-3?2:1,P()):J!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=J}function R(J,ee){const ve=ee||{};return ve.type=J,ve.start=_(),h.events.push(["enter",ve,h]),d.push(ve),ve}function H(J){const ee=d.pop();return ee.end=_(),h.events.push(["exit",ee,h]),ee}function $(J,ee){A(J,ee.from)}function O(J,ee){ee.restore()}function Z(J,ee){return ve;function ve(le,X,B){let te,oe,fe,T;return Array.isArray(le)?G(le):"tokenize"in le?G([le]):M(le);function M(be){return He;function He(st){const Be=st!==null&&be[st],Zt=st!==null&&be.null,un=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(Zt)?Zt:Zt?[Zt]:[]];return G(un)(st)}}function G(be){return te=be,oe=0,be.length===0?B:z(be[oe])}function z(be){return He;function He(st){return T=ae(),fe=be,be.partial||(h.currentConstruct=be),be.name&&h.parser.constructs.disable.null.includes(be.name)?Ee():be.tokenize.call(ee?Object.assign(Object.create(h),ee):h,f,he,Ee)(st)}}function he(be){return J(fe,T),X}function Ee(be){return T.restore(),++oe<te.length?z(te[oe]):B}}}function A(J,ee){J.resolveAll&&!o.includes(J)&&o.push(J),J.resolve&&pr(h.events,ee,h.events.length-ee,J.resolve(h.events.slice(ee),h)),J.resolveTo&&(h.events=J.resolveTo(h.events,h))}function ae(){const J=_(),ee=h.previous,ve=h.currentConstruct,le=h.events.length,X=Array.from(d);return{from:le,restore:B};function B(){a=J,h.previous=ee,h.currentConstruct=ve,h.events.length=le,d=X,P()}}function P(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function HM(e,n){const r=n.start._index,a=n.start._bufferIndex,l=n.end._index,o=n.end._bufferIndex;let u;if(r===l)u=[e[r].slice(a,o)];else{if(u=e.slice(r,l),a>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(a):u.shift()}o>0&&u.push(e[l].slice(0,o))}return u}function qM(e,n){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
414
- `;break}case-3:{u=`\r
415
- `;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&l)continue;u=" ";break}default:u=String.fromCharCode(o)}l=o===-2,a.push(u)}return a.join("")}function $M(e){const a={constructs:$E([FM,...(e||{}).extensions||[]]),content:l(aO),defined:[],document:l(lO),flow:l(SM),lazy:{},string:l(TM),text:l(zM)};return a;function l(o){return u;function u(d){return PM(a,o,d)}}}function GM(e){for(;!QE(e););return e}const ax=/[\0\t\n\r]/g;function KM(){let e=1,n="",r=!0,a;return l;function l(o,u,d){const f=[];let h,b,y,x,v;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),y=0,n="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if(ax.lastIndex=y,h=ax.exec(o),x=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(x),!h){n=o.slice(y);break}if(v===10&&y===x&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),y<x&&(f.push(o.slice(y,x)),e+=x-y),v){case 0:{f.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,f.push(-2);e++<b;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}y=x+1}return d&&(a&&f.push(-5),n&&f.push(n),f.push(null)),f}}const VM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YM(e){return e.replace(VM,QM)}function QM(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return GE(r.slice(o?2:1),o?16:10)}return Bm(r)||e}const t_={}.hasOwnProperty;function XM(e,n,r){return n&&typeof n=="object"&&(r=n,n=void 0),ZM(r)(GM($M(r).document().write(KM()(e,n,!0))))}function ZM(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(gr),autolinkProtocol:ae,autolinkEmail:ae,atxHeading:o(rr),blockQuote:o(Zt),characterEscape:ae,characterReference:ae,codeFenced:o(un),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(un,u),codeText:o(Ln,u),codeTextData:ae,data:ae,codeFlowValue:ae,definition:o(At),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(Kt),hardBreakEscape:o(lt),hardBreakTrailing:o(lt),htmlFlow:o(vn,u),htmlFlowData:ae,htmlText:o(vn,u),htmlTextData:ae,image:o(Kn),label:u,link:o(gr),listItem:o(ti),listItemValue:x,listOrdered:o(br,y),listUnordered:o(br),paragraph:o(ha),reference:z,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(rr),strong:o(Ni),thematicBreak:o(Vn)},exit:{atxHeading:f(),atxHeadingSequence:$,autolink:f(),autolinkEmail:Be,autolinkProtocol:st,blockQuote:f(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:be,characterReference:He,codeFenced:f(w),codeFencedFence:k,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:P,codeIndented:f(C),codeText:f(X),codeTextData:P,data:P,definition:f(),definitionDestinationString:H,definitionLabelString:j,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(ee),hardBreakTrailing:f(ee),htmlFlow:f(ve),htmlFlowData:P,htmlText:f(le),htmlTextData:P,image:f(te),label:fe,labelText:oe,lineEnding:J,link:f(B),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:he,resourceDestinationString:T,resourceTitleString:M,resource:G,setextHeading:f(A),setextHeadingLineSequence:Z,setextHeadingText:O,strong:f(),thematicBreak:f()}};n_(n,(e||{}).mdastExtensions||[]);const r={};return a;function a(ne){let ge={type:"root",children:[]};const Fe={stack:[ge],tokenStack:[],config:n,enter:d,exit:h,buffer:u,resume:b,data:r},Qe=[];let Je=-1;for(;++Je<ne.length;)if(ne[Je][1].type==="listOrdered"||ne[Je][1].type==="listUnordered")if(ne[Je][0]==="enter")Qe.push(Je);else{const wn=Qe.pop();Je=l(ne,wn,Je)}for(Je=-1;++Je<ne.length;){const wn=n[ne[Je][0]];t_.call(wn,ne[Je][1].type)&&wn[ne[Je][1].type].call(Object.assign({sliceSerialize:ne[Je][2].sliceSerialize},Fe),ne[Je][1])}if(Fe.tokenStack.length>0){const wn=Fe.tokenStack[Fe.tokenStack.length-1];(wn[1]||sx).call(Fe,void 0,wn[0])}for(ge.position={start:ta(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:ta(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<n.transforms.length;)ge=n.transforms[Je](ge)||ge;return ge}function l(ne,ge,Fe){let Qe=ge-1,Je=-1,wn=!1,ir,an,Wt,qt;for(;++Qe<=Fe;){const kt=ne[Qe];switch(kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{kt[0]==="enter"?Je++:Je--,qt=void 0;break}case"lineEndingBlank":{kt[0]==="enter"&&(ir&&!qt&&!Je&&!Wt&&(Wt=Qe),qt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qt=void 0}if(!Je&&kt[0]==="enter"&&kt[1].type==="listItemPrefix"||Je===-1&&kt[0]==="exit"&&(kt[1].type==="listUnordered"||kt[1].type==="listOrdered")){if(ir){let ar=Qe;for(an=void 0;ar--;){const Sn=ne[ar];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",wn=!0),Sn[1].type="lineEnding",an=ar}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}Wt&&(!an||Wt<an)&&(ir._spread=!0),ir.end=Object.assign({},an?ne[an][1].start:kt[1].end),ne.splice(an||Qe,0,["exit",ir,kt[2]]),Qe++,Fe++}if(kt[1].type==="listItemPrefix"){const ar={type:"listItem",_spread:!1,start:Object.assign({},kt[1].start),end:void 0};ir=ar,ne.splice(Qe,0,["enter",ar,kt[2]]),Qe++,Fe++,Wt=void 0,qt=!0}}}return ne[ge][1]._spread=wn,Fe}function o(ne,ge){return Fe;function Fe(Qe){d.call(this,ne(Qe),Qe),ge&&ge.call(this,Qe)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(ne,ge,Fe){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([ge,Fe||void 0]),ne.position={start:ta(ge.start),end:void 0}}function f(ne){return ge;function ge(Fe){ne&&ne.call(this,Fe),h.call(this,Fe)}}function h(ne,ge){const Fe=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==ne.type&&(ge?ge.call(this,ne,Qe[0]):(Qe[1]||sx).call(this,ne,Qe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+to({start:ne.start,end:ne.end})+"): it’s not open");Fe.position.end=ta(ne.end)}function b(){return Im(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ne}function _(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ne}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne.replace(/(\r?\n|\r)$/g,"")}function j(ne){const ge=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ge,Fe.identifier=Ur(this.sliceSerialize(ne)).toLowerCase()}function R(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ne}function H(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ne}function $(ne){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Fe=this.sliceSerialize(ne).length;ge.depth=Fe}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function Z(ne){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function ae(ne){const Fe=this.stack[this.stack.length-1].children;let Qe=Fe[Fe.length-1];(!Qe||Qe.type!=="text")&&(Qe=Vt(),Qe.position={start:ta(ne.start),end:void 0},Fe.push(Qe)),this.stack.push(Qe)}function P(ne){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ne),ge.position.end=ta(ne.end)}function J(ne){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=ge.children[ge.children.length-1];Fe.position.end=ta(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(ge.type)&&(ae.call(this,ne),P.call(this,ne))}function ee(){this.data.atHardBreak=!0}function ve(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function le(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function X(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ne}function B(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ge,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function te(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=ge,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function oe(ne){const ge=this.sliceSerialize(ne),Fe=this.stack[this.stack.length-2];Fe.label=YM(ge),Fe.identifier=Ur(ge).toLowerCase()}function fe(){const ne=this.stack[this.stack.length-1],ge=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const Qe=ne.children;Fe.children=Qe}else Fe.alt=ge}function T(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ne}function M(){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ne}function G(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function he(ne){const ge=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=ge,Fe.identifier=Ur(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function Ee(ne){this.data.characterReferenceType=ne.type}function be(ne){const ge=this.sliceSerialize(ne),Fe=this.data.characterReferenceType;let Qe;Fe?(Qe=GE(ge,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=Bm(ge);const Je=this.stack[this.stack.length-1];Je.value+=Qe}function He(ne){const ge=this.stack.pop();ge.position.end=ta(ne.end)}function st(ne){P.call(this,ne);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ne)}function Be(ne){P.call(this,ne);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ne)}function Zt(){return{type:"blockquote",children:[]}}function un(){return{type:"code",lang:null,meta:null,value:""}}function Ln(){return{type:"inlineCode",value:""}}function At(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kt(){return{type:"emphasis",children:[]}}function rr(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function vn(){return{type:"html",value:""}}function Kn(){return{type:"image",title:null,url:"",alt:null}}function gr(){return{type:"link",title:null,url:"",children:[]}}function br(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function ti(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function ha(){return{type:"paragraph",children:[]}}function Ni(){return{type:"strong",children:[]}}function Vt(){return{type:"text",value:""}}function Vn(){return{type:"thematicBreak"}}}function ta(e){return{line:e.line,column:e.column,offset:e.offset}}function n_(e,n){let r=-1;for(;++r<n.length;){const a=n[r];Array.isArray(a)?n_(e,a):WM(e,a)}}function WM(e,n){let r;for(r in n)if(t_.call(n,r))switch(r){case"canContainEols":{const a=n[r];a&&e[r].push(...a);break}case"transforms":{const a=n[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=n[r];a&&Object.assign(e[r],a);break}}}function sx(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+to({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+to({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+to({start:n.start,end:n.end})+") is still open")}function JM(e){const n=this;n.parser=r;function r(a){return XM(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function eD(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function tD(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
416
- `}]}function nD(e,n){const r=n.value?n.value+`
417
- `:"",a={},l=n.lang?n.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function rD(e,n){const r={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function iD(e,n){const r={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function aD(e,n){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(n.identifier).toUpperCase(),l=Gs(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let u,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=o+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(n,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(n,h),e.applyData(n,h)}function sD(e,n){const r={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function lD(e,n){if(e.options.allowDangerousHtml){const r={type:"raw",value:n.value};return e.patch(n,r),e.applyData(n,r)}}function r_(e,n){const r=n.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+a}];const l=e.all(n),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=a:l.push({type:"text",value:a}),l}function oD(e,n){const r=String(n.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return r_(e,n);const l={src:Gs(a.url||""),alt:n.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(n,o),e.applyData(n,o)}function cD(e,n){const r={src:Gs(n.url)};n.alt!==null&&n.alt!==void 0&&(r.alt=n.alt),n.title!==null&&n.title!==void 0&&(r.title=n.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,a),e.applyData(n,a)}function uD(e,n){const r={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(n,a),e.applyData(n,a)}function dD(e,n){const r=String(n.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return r_(e,n);const l={href:Gs(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function fD(e,n){const r={href:Gs(n.url)};n.title!==null&&n.title!==void 0&&(r.title=n.title);const a={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function hD(e,n,r){const a=e.all(n),l=r?mD(r):i_(n),o={},u=[];if(typeof n.checked=="boolean"){const b=a[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const b=a[d];(l||d!==0||b.type!=="element"||b.tagName!=="p")&&u.push({type:"text",value:`
418
- `}),b.type==="element"&&b.tagName==="p"&&!l?u.push(...b.children):u.push(b)}const f=a[a.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
419
- `});const h={type:"element",tagName:"li",properties:o,children:u};return e.patch(n,h),e.applyData(n,h)}function mD(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let a=-1;for(;!n&&++a<r.length;)n=i_(r[a])}return n}function i_(e){const n=e.spread;return n??e.children.length>1}function pD(e,n){const r={},a=e.all(n);let l=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++l<a.length;){const u=a[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(n,o),e.applyData(n,o)}function gD(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function bD(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function yD(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function xD(e,n){const r=e.all(n),a=r.shift(),l=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(n.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=Mm(n.children[1]),f=IE(n.children[n.children.length-1]);d&&f&&(u.position={start:d,end:f}),l.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(n,o),e.applyData(n,o)}function vD(e,n,r){const a=r?r.children:void 0,o=(a?a.indexOf(n):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,d=u?u.length:n.children.length;let f=-1;const h=[];for(;++f<d;){const y=n.children[f],x={},v=u?u[f]:void 0;v&&(x.align=v);let _={type:"element",tagName:o,properties:x,children:[]};y&&(_.children=e.all(y),e.patch(y,_),_=e.applyData(y,_)),h.push(_)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,b),e.applyData(n,b)}function ED(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const lx=9,ox=32;function _D(e){const n=String(e),r=/\r?\n|\r/g;let a=r.exec(n),l=0;const o=[];for(;a;)o.push(cx(n.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(n);return o.push(cx(n.slice(l),l>0,!1)),o.join("")}function cx(e,n,r){let a=0,l=e.length;if(n){let o=e.codePointAt(a);for(;o===lx||o===ox;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===lx||o===ox;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function kD(e,n){const r={type:"text",value:_D(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function wD(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const SD={blockquote:eD,break:tD,code:nD,delete:rD,emphasis:iD,footnoteReference:aD,heading:sD,html:lD,imageReference:oD,image:cD,inlineCode:uD,linkReference:dD,link:fD,listItem:hD,list:pD,paragraph:gD,root:bD,strong:yD,table:xD,tableCell:ED,tableRow:vD,text:kD,thematicBreak:wD,toml:$c,yaml:$c,definition:$c,footnoteDefinition:$c};function $c(){}const a_=-1,Ou=0,ro=1,gu=2,Fm=3,Pm=4,Hm=5,qm=6,s_=7,l_=8,ux=typeof self=="object"?self:globalThis,ND=(e,n)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,u]=n[l];switch(o){case Ou:case a_:return r(u,l);case ro:{const d=r([],l);for(const f of u)d.push(a(f));return d}case gu:{const d=r({},l);for(const[f,h]of u)d[a(f)]=a(h);return d}case Fm:return r(new Date(u),l);case Pm:{const{source:d,flags:f}=u;return r(new RegExp(d,f),l)}case Hm:{const d=r(new Map,l);for(const[f,h]of u)d.set(a(f),a(h));return d}case qm:{const d=r(new Set,l);for(const f of u)d.add(a(f));return d}case s_:{const{name:d,message:f}=u;return r(new ux[d](f),l)}case l_:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return r(new DataView(d),u)}}return r(new ux[o](u),l)};return a},dx=e=>ND(new Map,e)(0),Cs="",{toString:CD}={},{keys:TD}=Object,Kl=e=>{const n=typeof e;if(n!=="object"||!e)return[Ou,n];const r=CD.call(e).slice(8,-1);switch(r){case"Array":return[ro,Cs];case"Object":return[gu,Cs];case"Date":return[Fm,Cs];case"RegExp":return[Pm,Cs];case"Map":return[Hm,Cs];case"Set":return[qm,Cs];case"DataView":return[ro,r]}return r.includes("Array")?[ro,r]:r.includes("Error")?[s_,r]:[gu,r]},Gc=([e,n])=>e===Ou&&(n==="function"||n==="symbol"),zD=(e,n,r,a)=>{const l=(u,d)=>{const f=a.push(u)-1;return r.set(d,f),f},o=u=>{if(r.has(u))return r.get(u);let[d,f]=Kl(u);switch(d){case Ou:{let b=u;switch(f){case"bigint":d=l_,b=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);b=null;break;case"undefined":return l([a_],u)}return l([d,b],u)}case ro:{if(f){let x=u;return f==="DataView"?x=new Uint8Array(u.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(u)),l([f,[...x]],u)}const b=[],y=l([d,b],u);for(const x of u)b.push(o(x));return y}case gu:{if(f)switch(f){case"BigInt":return l([f,u.toString()],u);case"Boolean":case"Number":case"String":return l([f,u.valueOf()],u)}if(n&&"toJSON"in u)return o(u.toJSON());const b=[],y=l([d,b],u);for(const x of TD(u))(e||!Gc(Kl(u[x])))&&b.push([o(x),o(u[x])]);return y}case Fm:return l([d,u.toISOString()],u);case Pm:{const{source:b,flags:y}=u;return l([d,{source:b,flags:y}],u)}case Hm:{const b=[],y=l([d,b],u);for(const[x,v]of u)(e||!(Gc(Kl(x))||Gc(Kl(v))))&&b.push([o(x),o(v)]);return y}case qm:{const b=[],y=l([d,b],u);for(const x of u)(e||!Gc(Kl(x)))&&b.push(o(x));return y}}const{message:h}=u;return l([d,{name:f,message:h}],u)};return o},fx=(e,{json:n,lossy:r}={})=>{const a=[];return zD(!(n||r),!!n,new Map,a)(e),a},bu=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?dx(fx(e,n)):structuredClone(e):(e,n)=>dx(fx(e,n));function RD(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function AD(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function OD(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||RD,a=e.options.footnoteBackLabel||AD,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const b=e.all(h),y=String(h.identifier).toUpperCase(),x=Gs(y.toLowerCase());let v=0;const _=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++v<=k;){_.length>0&&_.push({type:"text",value:" "});let j=typeof r=="string"?r:r(f,v);typeof j=="string"&&(j={type:"text",value:j}),_.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,v),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const w=b[b.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const j=w.children[w.children.length-1];j&&j.type==="text"?j.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(..._)}else b.push(..._);const C={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(b,!0)};e.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...bu(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
420
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
421
- `}]}}const _o=(function(e){if(e==null)return jD;if(typeof e=="function")return Mu(e);if(typeof e=="object")return Array.isArray(e)?MD(e):DD(e);if(typeof e=="string")return LD(e);throw new Error("Expected function, string, or object as test")});function MD(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=_o(e[r]);return Mu(a);function a(...l){let o=-1;for(;++o<n.length;)if(n[o].apply(this,l))return!0;return!1}}function DD(e){const n=e;return Mu(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==n[o])return!1;return!0}}function LD(e){return Mu(n);function n(r){return r&&r.type===e}}function Mu(e){return n;function n(r,a,l){return!!(ID(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function jD(){return!0}function ID(e){return e!==null&&typeof e=="object"&&"type"in e}const o_=[],BD=!0,Yh=!1,UD="skip";function c_(e,n,r,a){let l;typeof n=="function"&&typeof r!="function"?(a=r,r=n):l=n;const o=_o(l),u=a?-1:1;d(e,void 0,[])();function d(f,h,b){const y=f&&typeof f=="object"?f:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=o_,_,k,w;if((!n||o(f,h,b[b.length-1]||void 0))&&(v=FD(r(f,b)),v[0]===Yh))return v;if("children"in f&&f.children){const C=f;if(C.children&&v[0]!==UD)for(k=(a?C.children.length:-1)+u,w=b.concat(C);k>-1&&k<C.children.length;){const j=C.children[k];if(_=d(j,k,w)(),_[0]===Yh)return _;k=typeof _[1]=="number"?_[1]:k+u}}return v}}}function FD(e){return Array.isArray(e)?e:typeof e=="number"?[BD,e]:e==null?o_:[e]}function Du(e,n,r,a){let l,o,u;typeof n=="function"&&typeof r!="function"?(o=void 0,u=n,l=r):(o=n,u=r,l=a),c_(e,o,d,l);function d(f,h){const b=h[h.length-1],y=b?b.children.indexOf(f):void 0;return u(f,y,b)}}const Qh={}.hasOwnProperty,PD={};function HD(e,n){const r=n||PD,a=new Map,l=new Map,o=new Map,u={...SD,...r.handlers},d={all:h,applyData:$D,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:u,one:f,options:r,patch:qD,wrap:KD};return Du(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const y=b.type==="definition"?a:l,x=String(b.identifier).toUpperCase();y.has(x)||y.set(x,b)}}),d;function f(b,y){const x=b.type,v=d.handlers[x];if(Qh.call(d.handlers,x)&&v)return v(d,b,y);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in b){const{children:k,...w}=b,C=bu(w);return C.children=d.all(b),C}return bu(b)}return(d.options.unknownHandler||GD)(d,b,y)}function h(b){const y=[];if("children"in b){const x=b.children;let v=-1;for(;++v<x.length;){const _=d.one(x[v],b);if(_){if(v&&x[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=hx(_.value)),!Array.isArray(_)&&_.type==="element")){const k=_.children[0];k&&k.type==="text"&&(k.value=hx(k.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function qD(e,n){e.position&&(n.position=A2(e))}function $D(e,n){let r=n;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const u="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:u}}r.type==="element"&&o&&Object.assign(r.properties,bu(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function GD(e,n){const r=n.data||{},a="value"in n&&!(Qh.call(r,"hProperties")||Qh.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function KD(e,n){const r=[];let a=-1;for(n&&r.push({type:"text",value:`
422
- `});++a<e.length;)a&&r.push({type:"text",value:`
423
- `}),r.push(e[a]);return n&&e.length>0&&r.push({type:"text",value:`
424
- `}),r}function hx(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function mx(e,n){const r=HD(e,n),a=r.one(e,void 0),l=OD(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
425
- `},l),o}function VD(e,n){return e&&"run"in e?async function(r,a){const l=mx(r,{file:a,...n});await e.run(l,a)}:function(r,a){return mx(r,{file:a,...e||n})}}function px(e){if(e)throw e}var ch,gx;function YD(){if(gx)return ch;gx=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},o=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!y)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},u=function(h,b){r&&b.name==="__proto__"?r(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},d=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(a)return a(h,b).value}else return;return h[b]};return ch=function f(){var h,b,y,x,v,_,k=arguments[0],w=1,C=arguments.length,j=!1;for(typeof k=="boolean"&&(j=k,k=arguments[1]||{},w=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});w<C;++w)if(h=arguments[w],h!=null)for(b in h)y=d(k,b),x=d(h,b),k!==x&&(j&&x&&(o(x)||(v=l(x)))?(v?(v=!1,_=y&&l(y)?y:[]):_=y&&o(y)?y:{},u(k,{name:b,newValue:f(j,_,x)})):typeof x<"u"&&u(k,{name:b,newValue:x}));return k},ch}var QD=YD();const uh=Eu(QD);function Xh(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function XD(){const e=[],n={run:r,use:a};return n;function r(...l){let o=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...l);function d(f,...h){const b=e[++o];let y=-1;if(f){u(f);return}for(;++y<l.length;)(h[y]===null||h[y]===void 0)&&(h[y]=l[y]);l=h,b?ZD(b,d)(...h):u(null,...h)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),n}}function ZD(e,n){let r;return a;function a(...u){const d=e.length>u.length;let f;d&&u.push(l);try{f=e.apply(this,u)}catch(h){const b=h;if(d&&r)throw b;return l(b)}d||(f&&f.then&&typeof f.then=="function"?f.then(o,l):f instanceof Error?l(f):o(f))}function l(u,...d){r||(r=!0,n(u,...d))}function o(u){l(null,u)}}const Qr={basename:WD,dirname:JD,extname:e4,join:t4,sep:"/"};function WD(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');ko(e);let r=0,a=-1,l=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else a<0&&(o=!0,a=l+1);return a<0?"":e.slice(r,a)}if(n===e)return"";let u=-1,d=n.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else u<0&&(o=!0,u=l+1),d>-1&&(e.codePointAt(l)===n.codePointAt(d--)?d<0&&(a=l):(d=-1,a=u));return r===a?a=u:a<0&&(a=e.length),e.slice(r,a)}function JD(e){if(ko(e),e.length===0)return".";let n=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){n=r;break}}else a||(a=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function e4(e){ko(e);let n=e.length,r=-1,a=0,l=-1,o=0,u;for(;n--;){const d=e.codePointAt(n);if(d===47){if(u){a=n+1;break}continue}r<0&&(u=!0,r=n+1),d===46?l<0?l=n:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||r<0||o===0||o===1&&l===r-1&&l===a+1?"":e.slice(l,r)}function t4(...e){let n=-1,r;for(;++n<e.length;)ko(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":n4(r)}function n4(e){ko(e);const n=e.codePointAt(0)===47;let r=r4(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function r4(e,n){let r="",a=0,l=-1,o=0,u=-1,d,f;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(l===u-1||o===1))if(l!==u-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",a=0):(r=r.slice(0,f),a=r.length-1-r.lastIndexOf("/")),l=u,o=0;continue}}else if(r.length>0){r="",a=0,l=u,o=0;continue}}n&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),a=u-l-1;l=u,o=0}else d===46&&o>-1?o++:o=-1}return r}function ko(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const i4={cwd:a4};function a4(){return"/"}function Zh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function s4(e){if(typeof e=="string")e=new URL(e);else if(!Zh(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return l4(e)}function l4(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const a=n.codePointAt(r+2);if(a===70||a===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(n)}const dh=["history","path","basename","stem","extname","dirname"];class u_{constructor(n){let r;n?Zh(n)?r={path:n}:typeof n=="string"||o4(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":i4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<dh.length;){const o=dh[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let l;for(l in r)dh.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Qr.basename(this.path):void 0}set basename(n){hh(n,"basename"),fh(n,"basename"),this.path=Qr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Qr.dirname(this.path):void 0}set dirname(n){bx(this.basename,"dirname"),this.path=Qr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Qr.extname(this.path):void 0}set extname(n){if(fh(n,"extname"),bx(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Zh(n)&&(n=s4(n)),hh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Qr.basename(this.path,this.extname):void 0}set stem(n){hh(n,"stem"),fh(n,"stem"),this.path=Qr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,a){const l=this.message(n,r,a);throw l.fatal=!0,l}info(n,r,a){const l=this.message(n,r,a);return l.fatal=void 0,l}message(n,r,a){const l=new Fn(n,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function fh(e,n){if(e&&e.includes(Qr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Qr.sep+"`")}function hh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function bx(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function o4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const c4=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),u4={}.hasOwnProperty;class $m extends c4{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=XD()}copy(){const n=new $m;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];n.use(...a)}return n.data(uh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(gh("data",this.frozen),this.namespace[n]=r,this):u4.call(this.namespace,n)&&this.namespace[n]||void 0:n?(gh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=r.call(n,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Kc(n),a=this.parser||this.Parser;return mh("parse",a),a(String(r),r)}process(n,r){const a=this;return this.freeze(),mh("process",this.parser||this.Parser),ph("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,u){const d=Kc(n),f=a.parse(d);a.run(f,d,function(b,y,x){if(b||!y||!x)return h(b);const v=y,_=a.stringify(v,x);h4(_)?x.value=_:x.result=_,h(b,x)});function h(b,y){b||!y?u(b):o?o(y):r(void 0,y)}}}processSync(n){let r=!1,a;return this.freeze(),mh("processSync",this.parser||this.Parser),ph("processSync",this.compiler||this.Compiler),this.process(n,l),xx("processSync","process",r),a;function l(o,u){r=!0,px(o),a=u}}run(n,r,a){yx(n),this.freeze();const l=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(u,d){const f=Kc(r);l.run(n,f,h);function h(b,y,x){const v=y||n;b?d(b):u?u(v):a(void 0,v,x)}}}runSync(n,r){let a=!1,l;return this.run(n,r,o),xx("runSync","run",a),l;function o(u,d){px(u),l=d,a=!0}}stringify(n,r){this.freeze();const a=Kc(r),l=this.compiler||this.Compiler;return ph("stringify",l),yx(n),l(n,a)}use(n,...r){const a=this.attachers,l=this.namespace;if(gh("use",this.frozen),n!=null)if(typeof n=="function")f(n,r);else if(typeof n=="object")Array.isArray(n)?d(n):u(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...y]=h;f(b,y)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))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");d(h.plugins),h.settings&&(l.settings=uh(!0,l.settings,h.settings))}function d(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const y=h[b];o(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,b){let y=-1,x=-1;for(;++y<a.length;)if(a[y][0]===h){x=y;break}if(x===-1)a.push([h,...b]);else if(b.length>0){let[v,..._]=b;const k=a[x][1];Xh(k)&&Xh(v)&&(v=uh(!0,k,v)),a[x]=[h,v,..._]}}}}const d4=new $m().freeze();function mh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ph(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function gh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yx(e){if(!Xh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function xx(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Kc(e){return f4(e)?e:new u_(e)}function f4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function h4(e){return typeof e=="string"||m4(e)}function m4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vx=[],Ex={allowDangerousHtml:!0},g4=/^(https?|ircs?|mailto|xmpp)$/i,b4=[{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 y4(e){const n=x4(e),r=v4(e);return E4(n.runSync(n.parse(r),r),e)}function x4(e){const n=e.rehypePlugins||vx,r=e.remarkPlugins||vx,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ex}:Ex;return d4().use(JM).use(r).use(VD,a).use(n)}function v4(e){const n=e.children||"",r=new u_;return typeof n=="string"&&(r.value=n),r}function E4(e,n){const r=n.allowedElements,a=n.allowElement,l=n.components,o=n.disallowedElements,u=n.skipHtml,d=n.unwrapDisallowed,f=n.urlTransform||_4;for(const b of b4)Object.hasOwn(n,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+p4+b.id,void 0);return n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:e.type==="root"?e.children:[e]}),Du(e,h),j2(e,{Fragment:p.Fragment,components:l,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(b,y,x){if(b.type==="raw"&&x&&typeof y=="number")return u?x.children.splice(y,1):x.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let v;for(v in sh)if(Object.hasOwn(sh,v)&&Object.hasOwn(b.properties,v)){const _=b.properties[v],k=sh[v];(k===null||k.includes(b.tagName))&&(b.properties[v]=f(String(_||""),v,b))}}if(b.type==="element"){let v=r?!r.includes(b.tagName):o?o.includes(b.tagName):!1;if(!v&&a&&typeof y=="number"&&(v=!a(b,y,x)),v&&x&&typeof y=="number")return d&&b.children?x.children.splice(y,1,...b.children):x.children.splice(y,1),y}}}function _4(e){const n=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return n===-1||l!==-1&&n>l||r!==-1&&n>r||a!==-1&&n>a||g4.test(e.slice(0,n))?e:""}function _x(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(n);for(;l!==-1;)a++,l=r.indexOf(n,l+n.length);return a}function k4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function w4(e,n,r){const l=_o((r||{}).ignore||[]),o=S4(n);let u=-1;for(;++u<o.length;)c_(e,"text",d);function d(h,b){let y=-1,x;for(;++y<b.length;){const v=b[y],_=x?x.children:void 0;if(l(v,_?_.indexOf(v):void 0,x))return;x=v}if(x)return f(h,b)}function f(h,b){const y=b[b.length-1],x=o[u][0],v=o[u][1];let _=0;const w=y.children.indexOf(h);let C=!1,j=[];x.lastIndex=0;let R=x.exec(h.value);for(;R;){const H=R.index,$={index:R.index,input:R.input,stack:[...b,h]};let O=v(...R,$);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?x.lastIndex=H+1:(_!==H&&j.push({type:"text",value:h.value.slice(_,H)}),Array.isArray(O)?j.push(...O):O&&j.push(O),_=H+R[0].length,C=!0),!x.global)break;R=x.exec(h.value)}return C?(_<h.value.length&&j.push({type:"text",value:h.value.slice(_)}),y.children.splice(w,1,...j)):j=[h],w+j.length}}function S4(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const l=r[a];n.push([N4(l[0]),C4(l[1])])}return n}function N4(e){return typeof e=="string"?new RegExp(k4(e),"g"):e}function C4(e){return typeof e=="function"?e:function(){return e}}const bh="phrasing",yh=["autolink","link","image","label"];function T4(){return{transforms:[L4],enter:{literalAutolink:R4,literalAutolinkEmail:xh,literalAutolinkHttp:xh,literalAutolinkWww:xh},exit:{literalAutolink:D4,literalAutolinkEmail:M4,literalAutolinkHttp:A4,literalAutolinkWww:O4}}}function z4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bh,notInConstruct:yh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bh,notInConstruct:yh},{character:":",before:"[ps]",after:"\\/",inConstruct:bh,notInConstruct:yh}]}}function R4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function xh(e){this.config.enter.autolinkProtocol.call(this,e)}function A4(e){this.config.exit.autolinkProtocol.call(this,e)}function O4(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function M4(e){this.config.exit.autolinkEmail.call(this,e)}function D4(e){this.exit(e)}function L4(e){w4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j4],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,I4]],{ignore:["link","linkReference"]})}function j4(e,n,r,a,l){let o="";if(!d_(l)||(/^w/i.test(n)&&(r=n+r,n="",o="http://"),!B4(r)))return!1;const u=U4(r+a);if(!u[0])return!1;const d={type:"link",title:null,url:o+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function I4(e,n,r,a){return!d_(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function B4(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function U4(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],a=r.indexOf(")");const l=_x(e,"(");let o=_x(e,")");for(;a!==-1&&l>o;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[e,r]}function d_(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ba(r)||Ru(r))&&(!n||r!==47)}f_.peek=Y4;function F4(){this.buffer()}function P4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function H4(){this.buffer()}function q4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $4(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),r.label=n}function G4(e){this.exit(e)}function K4(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Ur(this.sliceSerialize(e)).toLowerCase(),r.label=n}function V4(e){this.exit(e)}function Y4(){return"["}function f_(e,n,r,a){const l=r.createTracker(a);let o=l.move("[^");const u=r.enter("footnoteReference"),d=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),d(),u(),o+=l.move("]"),o}function Q4(){return{enter:{gfmFootnoteCallString:F4,gfmFootnoteCall:P4,gfmFootnoteDefinitionLabelString:H4,gfmFootnoteDefinition:q4},exit:{gfmFootnoteCallString:$4,gfmFootnoteCall:G4,gfmFootnoteDefinitionLabelString:K4,gfmFootnoteDefinition:V4}}}function X4(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:f_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,u){const d=o.createTracker(u);let f=d.move("[^");const h=o.enter("footnoteDefinition"),b=o.enter("label");return f+=d.move(o.safe(o.associationId(a),{before:f,after:"]"})),b(),f+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),f+=d.move((n?`
426
- `:" ")+o.indentLines(o.containerFlow(a,d.current()),n?h_:Z4))),h(),f}}function Z4(e,n,r){return n===0?e:h_(e,n,r)}function h_(e,n,r){return(r?"":" ")+e}const W4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];m_.peek=r5;function J4(){return{canContainEols:["delete"],enter:{strikethrough:t5},exit:{strikethrough:n5}}}function e5(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W4}],handlers:{delete:m_}}}function t5(e){this.enter({type:"delete",children:[]},e)}function n5(e){this.exit(e)}function m_(e,n,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),o(),u}function r5(){return"~"}function i5(e){return e.length}function a5(e,n){const r=n||{},a=(r.align||[]).concat(),l=r.stringLength||i5,o=[],u=[],d=[],f=[];let h=0,b=-1;for(;++b<e.length;){const k=[],w=[];let C=-1;for(e[b].length>h&&(h=e[b].length);++C<e[b].length;){const j=s5(e[b][C]);if(r.alignDelimiters!==!1){const R=l(j);w[C]=R,(f[C]===void 0||R>f[C])&&(f[C]=R)}k.push(j)}u[b]=k,d[b]=w}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<h;)o[y]=kx(a[y]);else{const k=kx(a);for(;++y<h;)o[y]=k}y=-1;const x=[],v=[];for(;++y<h;){const k=o[y];let w="",C="";k===99?(w=":",C=":"):k===108?w=":":k===114&&(C=":");let j=r.alignDelimiters===!1?1:Math.max(1,f[y]-w.length-C.length);const R=w+"-".repeat(j)+C;r.alignDelimiters!==!1&&(j=w.length+j+C.length,j>f[y]&&(f[y]=j),v[y]=j),x[y]=R}u.splice(1,0,x),d.splice(1,0,v),b=-1;const _=[];for(;++b<u.length;){const k=u[b],w=d[b];y=-1;const C=[];for(;++y<h;){const j=k[y]||"";let R="",H="";if(r.alignDelimiters!==!1){const $=f[y]-(w[y]||0),O=o[y];O===114?R=" ".repeat($):O===99?$%2?(R=" ".repeat($/2+.5),H=" ".repeat($/2-.5)):(R=" ".repeat($/2),H=R):H=" ".repeat($)}r.delimiterStart!==!1&&!y&&C.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&j==="")&&(r.delimiterStart!==!1||y)&&C.push(" "),r.alignDelimiters!==!1&&C.push(R),C.push(j),r.alignDelimiters!==!1&&C.push(H),r.padding!==!1&&C.push(" "),(r.delimiterEnd!==!1||y!==h-1)&&C.push("|")}_.push(r.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return _.join(`
427
- `)}function s5(e){return e==null?"":String(e)}function kx(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function l5(e,n,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const u=r.indentLines(r.containerFlow(e,o.current()),o5);return l(),u}function o5(e,n,r){return">"+(r?"":" ")+e}function c5(e,n){return wx(e,n.inConstruct,!0)&&!wx(e,n.notInConstruct,!1)}function wx(e,n,r){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return r;let a=-1;for(;++a<n.length;)if(e.includes(n[a]))return!0;return!1}function Sx(e,n,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
428
- `&&c5(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
429
- `}function u5(e,n){const r=String(e);let a=r.indexOf(n),l=a,o=0,u=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>u&&(u=o):o=1,l=a+n.length,a=r.indexOf(n,l);return u}function d5(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function f5(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function h5(e,n,r,a){const l=f5(r),o=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(d5(e,r)){const y=r.enter("codeIndented"),x=r.indentLines(o,m5);return y(),x}const d=r.createTracker(a),f=l.repeat(Math.max(u5(o,l)+1,3)),h=r.enter("codeFenced");let b=d.move(f);if(e.lang){const y=r.enter(`codeFencedLang${u}`);b+=d.move(r.safe(e.lang,{before:b,after:" ",encode:["`"],...d.current()})),y()}if(e.lang&&e.meta){const y=r.enter(`codeFencedMeta${u}`);b+=d.move(" "),b+=d.move(r.safe(e.meta,{before:b,after:`
430
- `,encode:["`"],...d.current()})),y()}return b+=d.move(`
431
- `),o&&(b+=d.move(o+`
432
- `)),b+=d.move(f),h(),b}function m5(e,n,r){return(r?"":" ")+e}function Gm(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function p5(e,n,r,a){const l=Gm(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let d=r.enter("label");const f=r.createTracker(a);let h=f.move("[");return h+=f.move(r.safe(r.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(r.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=r.enter("destinationRaw"),h+=f.move(r.safe(e.url,{before:h,after:e.title?" ":`
433
- `,...f.current()}))),d(),e.title&&(d=r.enter(`title${o}`),h+=f.move(" "+l),h+=f.move(r.safe(e.title,{before:h,after:l,...f.current()})),h+=f.move(l),d()),u(),h}function g5(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ho(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yu(e,n,r){const a=Bs(e),l=Bs(n);return a===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}p_.peek=b5;function p_(e,n,r,a){const l=g5(r),o=r.enter("emphasis"),u=r.createTracker(a),d=u.move(l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const h=f.charCodeAt(0),b=yu(a.before.charCodeAt(a.before.length-1),h,l);b.inside&&(f=ho(h)+f.slice(1));const y=f.charCodeAt(f.length-1),x=yu(a.after.charCodeAt(0),y,l);x.inside&&(f=f.slice(0,-1)+ho(y));const v=u.move(l);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},d+f+v}function b5(e,n,r){return r.options.emphasis||"*"}function y5(e,n){let r=!1;return Du(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,Yh}),!!((!e.depth||e.depth<3)&&Im(e)&&(n.options.setext||r))}function x5(e,n,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(y5(e,r)){const b=r.enter("headingSetext"),y=r.enter("phrasing"),x=r.containerPhrasing(e,{...o.current(),before:`
434
- `,after:`
435
- `});return y(),b(),x+`
436
- `+(l===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
437
- `))+1))}const u="#".repeat(l),d=r.enter("headingAtx"),f=r.enter("phrasing");o.move(u+" ");let h=r.containerPhrasing(e,{before:"# ",after:`
438
- `,...o.current()});return/^[\t ]/.test(h)&&(h=ho(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,r.options.closeAtx&&(h+=" "+u),f(),d(),h}g_.peek=v5;function g_(e){return e.value||""}function v5(){return"<"}b_.peek=E5;function b_(e,n,r,a){const l=Gm(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=r.enter("label");const f=r.createTracker(a);let h=f.move("![");return h+=f.move(r.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(r.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=r.enter("destinationRaw"),h+=f.move(r.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=r.enter(`title${o}`),h+=f.move(" "+l),h+=f.move(r.safe(e.title,{before:h,after:l,...f.current()})),h+=f.move(l),d()),h+=f.move(")"),u(),h}function E5(){return"!"}y_.peek=_5;function y_(e,n,r,a){const l=e.referenceType,o=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(a);let f=d.move("![");const h=r.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=b,o(),l==="full"||!h||h!==y?f+=d.move(y+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function _5(){return"!"}x_.peek=k5;function x_(e,n,r){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const u=r.unsafe[o],d=r.compilePattern(u);let f;if(u.atBreak)for(;f=d.exec(a);){let h=f.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(f.index+1)}}return l+a+l}function k5(){return"`"}function v_(e,n){const r=Im(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}E_.peek=w5;function E_(e,n,r,a){const l=Gm(r),o=l==='"'?"Quote":"Apostrophe",u=r.createTracker(a);let d,f;if(v_(e,r)){const b=r.stack;r.stack=[],d=r.enter("autolink");let y=u.move("<");return y+=u.move(r.containerPhrasing(e,{before:y,after:">",...u.current()})),y+=u.move(">"),d(),r.stack=b,y}d=r.enter("link"),f=r.enter("label");let h=u.move("[");return h+=u.move(r.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(r.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(f=r.enter("destinationRaw"),h+=u.move(r.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=u.move(" "+l),h+=u.move(r.safe(e.title,{before:h,after:l,...u.current()})),h+=u.move(l),f()),h+=u.move(")"),d(),h}function w5(e,n,r){return v_(e,r)?"<":"["}__.peek=S5;function __(e,n,r,a){const l=e.referenceType,o=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(a);let f=d.move("[");const h=r.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const b=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=b,o(),l==="full"||!h||h!==y?f+=d.move(y+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function S5(){return"["}function Km(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function N5(e){const n=Km(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function C5(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function k_(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function T5(e,n,r,a){const l=r.enter("list"),o=r.bulletCurrent;let u=e.ordered?C5(r):Km(r);const d=e.ordered?u==="."?")":".":N5(r);let f=n&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&b&&(!b.children||!b.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(f=!0),k_(r)===u&&b){let y=-1;for(;++y<e.children.length;){const x=e.children[y];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=d),r.bulletCurrent=u;const h=r.containerFlow(e,a);return r.bulletLastUsed=u,r.bulletCurrent=o,l(),h}function z5(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function R5(e,n,r,a){const l=z5(r);let o=r.bulletCurrent||Km(r);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(a);d.move(o+" ".repeat(u-o.length)),d.shift(u);const f=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,d.current()),b);return f(),h;function b(y,x,v){return x?(v?"":" ".repeat(u))+y:(v?o:o+" ".repeat(u-o.length))+y}}function A5(e,n,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),u=r.containerPhrasing(e,a);return o(),l(),u}const O5=_o(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function M5(e,n,r,a){return(e.children.some(function(u){return O5(u)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function D5(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}w_.peek=L5;function w_(e,n,r,a){const l=D5(r),o=r.enter("strong"),u=r.createTracker(a),d=u.move(l+l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const h=f.charCodeAt(0),b=yu(a.before.charCodeAt(a.before.length-1),h,l);b.inside&&(f=ho(h)+f.slice(1));const y=f.charCodeAt(f.length-1),x=yu(a.after.charCodeAt(0),y,l);x.inside&&(f=f.slice(0,-1)+ho(y));const v=u.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},d+f+v}function L5(e,n,r){return r.options.strong||"*"}function j5(e,n,r,a){return r.safe(e.value,a)}function I5(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function B5(e,n,r){const a=(k_(r)+(r.options.ruleSpaces?" ":"")).repeat(I5(r));return r.options.ruleSpaces?a.slice(0,-1):a}const S_={blockquote:l5,break:Sx,code:h5,definition:p5,emphasis:p_,hardBreak:Sx,heading:x5,html:g_,image:b_,imageReference:y_,inlineCode:x_,link:E_,linkReference:__,list:T5,listItem:R5,paragraph:A5,root:M5,strong:w_,text:j5,thematicBreak:B5};function U5(){return{enter:{table:F5,tableData:Nx,tableHeader:Nx,tableRow:H5},exit:{codeText:q5,table:P5,tableData:vh,tableHeader:vh,tableRow:vh}}}function F5(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function P5(e){this.exit(e),this.data.inTable=void 0}function H5(e){this.enter({type:"tableRow",children:[]},e)}function vh(e){this.exit(e)}function Nx(e){this.enter({type:"tableCell",children:[]},e)}function q5(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,$5));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function $5(e,n){return n==="|"?n:e}function G5(e){const n=e||{},r=n.tableCellPadding,a=n.tablePipeAlign,l=n.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
439
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:f,tableRow:d}};function u(v,_,k,w){return h(b(v,k,w),v.align)}function d(v,_,k,w){const C=y(v,k,w),j=h([C]);return j.slice(0,j.indexOf(`
440
- `))}function f(v,_,k,w){const C=k.enter("tableCell"),j=k.enter("phrasing"),R=k.containerPhrasing(v,{...w,before:o,after:o});return j(),C(),R}function h(v,_){return a5(v,{align:_,alignDelimiters:a,padding:r,stringLength:l})}function b(v,_,k){const w=v.children;let C=-1;const j=[],R=_.enter("table");for(;++C<w.length;)j[C]=y(w[C],_,k);return R(),j}function y(v,_,k){const w=v.children;let C=-1;const j=[],R=_.enter("tableRow");for(;++C<w.length;)j[C]=f(w[C],v,_,k);return R(),j}function x(v,_,k){let w=S_.inlineCode(v,_,k);return k.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function K5(){return{exit:{taskListCheckValueChecked:Cx,taskListCheckValueUnchecked:Cx,paragraph:Y5}}}function V5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Q5}}}function Cx(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Y5(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=n.children;let o=-1,u;for(;++o<l.length;){const d=l[o];if(d.type==="paragraph"){u=d;break}}u===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function Q5(e,n,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=r.createTracker(a);o&&d.move(u);let f=S_.listItem(e,n,r,{...a,...d.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(b){return b+u}}function X5(){return[T4(),Q4(),J4(),U5(),K5()]}function Z5(e){return{extensions:[z4(),X4(e),e5(),G5(e),V5()]}}const W5={tokenize:iL,partial:!0},N_={tokenize:aL,partial:!0},C_={tokenize:sL,partial:!0},T_={tokenize:lL,partial:!0},J5={tokenize:oL,partial:!0},z_={name:"wwwAutolink",tokenize:nL,previous:A_},R_={name:"protocolAutolink",tokenize:rL,previous:O_},Si={name:"emailAutolink",tokenize:tL,previous:M_},ei={};function eL(){return{text:ei}}let Ma=48;for(;Ma<123;)ei[Ma]=Si,Ma++,Ma===58?Ma=65:Ma===91&&(Ma=97);ei[43]=Si;ei[45]=Si;ei[46]=Si;ei[95]=Si;ei[72]=[Si,R_];ei[104]=[Si,R_];ei[87]=[Si,z_];ei[119]=[Si,z_];function tL(e,n,r){const a=this;let l,o;return u;function u(y){return!Wh(y)||!M_.call(a,a.previous)||Vm(a.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(y))}function d(y){return Wh(y)?(e.consume(y),d):y===64?(e.consume(y),f):r(y)}function f(y){return y===46?e.check(J5,b,h)(y):y===45||y===95||Un(y)?(o=!0,e.consume(y),f):b(y)}function h(y){return e.consume(y),l=!0,f}function b(y){return o&&l&&$n(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):r(y)}}function nL(e,n,r){const a=this;return l;function l(u){return u!==87&&u!==119||!A_.call(a,a.previous)||Vm(a.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(W5,e.attempt(N_,e.attempt(C_,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function rL(e,n,r){const a=this;let l="",o=!1;return u;function u(y){return(y===72||y===104)&&O_.call(a,a.previous)&&!Vm(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),d):r(y)}function d(y){if($n(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),d;if(y===58){const x=l.toLowerCase();if(x==="http"||x==="https")return e.consume(y),f}return r(y)}function f(y){return y===47?(e.consume(y),o?h:(o=!0,f)):r(y)}function h(y){return y===null||pu(y)||Ht(y)||Ba(y)||Ru(y)?r(y):e.attempt(N_,e.attempt(C_,b),r)(y)}function b(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function iL(e,n,r){let a=0;return l;function l(u){return(u===87||u===119)&&a<3?(a++,e.consume(u),l):u===46&&a===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):n(u)}}function aL(e,n,r){let a,l,o;return u;function u(h){return h===46||h===95?e.check(T_,f,d)(h):h===null||Ht(h)||Ba(h)||h!==45&&Ru(h)?f(h):(o=!0,e.consume(h),u)}function d(h){return h===95?a=!0:(l=a,a=void 0),e.consume(h),u}function f(h){return l||a||!o?r(h):n(h)}}function sL(e,n){let r=0,a=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&a<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(T_,n,o)(u):u===null||Ht(u)||Ba(u)?n(u):(e.consume(u),l)}function o(u){return u===41&&a++,e.consume(u),l}}function lL(e,n,r){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),l):d===60||d===null||Ht(d)||Ba(d)?n(d):r(d)}function l(d){return d===null||d===40||d===91||Ht(d)||Ba(d)?n(d):a(d)}function o(d){return $n(d)?u(d):r(d)}function u(d){return d===59?(e.consume(d),a):$n(d)?(e.consume(d),u):r(d)}}function oL(e,n,r){return a;function a(o){return e.consume(o),l}function l(o){return Un(o)?r(o):n(o)}}function A_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function O_(e){return!$n(e)}function M_(e){return!(e===47||Wh(e))}function Wh(e){return e===43||e===45||e===46||e===95||Un(e)}function Vm(e){let n=e.length,r=!1;for(;n--;){const a=e[n][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const cL={tokenize:bL,partial:!0};function uL(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mL,continuation:{tokenize:pL},exit:gL}},text:{91:{name:"gfmFootnoteCall",tokenize:hL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dL,resolveTo:fL}}}}function dL(e,n,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u;for(;l--;){const f=a.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!u||!u._balanced)return r(f);const h=Ur(a.sliceSerialize({start:u.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function fL(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[r+1],e[r+2],["enter",a,n],e[r+3],e[r+4],["enter",l,n],["exit",l,n],["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",a,n]];return e.splice(r,e.length-r+1,...d),e}function hL(e,n,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,u;return d;function d(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),f}function f(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(o>999||y===93&&!u||y===null||y===91||Ht(y))return r(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return l.includes(Ur(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(y)}return Ht(y)||(u=!0),o++,e.consume(y),y===92?b:h}function b(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}}function mL(e,n,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,u=0,d;return f;function f(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):r(_)}function b(_){if(u>999||_===93&&!d||_===null||_===91||Ht(_))return r(_);if(_===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=Ur(a.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ht(_)||(d=!0),u++,e.consume(_),_===92?y:b}function y(_){return _===91||_===92||_===93?(e.consume(_),u++,b):b(_)}function x(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),l.includes(o)||l.push(o),_t(e,v,"gfmFootnoteDefinitionWhitespace")):r(_)}function v(_){return n(_)}}function pL(e,n,r){return e.check(Eo,n,e.attempt(cL,n,r))}function gL(e){e.exit("gfmFootnoteDefinition")}function bL(e,n,r){const a=this;return _t(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(o):r(o)}}function yL(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(u,d){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let h=f;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[f][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[f][1].end)},y={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[f][1].start)},x=[["enter",b,d],["enter",u[h][1],d],["exit",u[h][1],d],["enter",y,d]],v=d.parser.constructs.insideSpan.null;v&&pr(x,x.length,0,Au(v,u.slice(h+1,f),d)),pr(x,x.length,0,[["exit",y,d],["enter",u[f][1],d],["exit",u[f][1],d],["exit",b,d]]),pr(u,h-1,f-h+3,x),f=h+x.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function o(u,d,f){const h=this.previous,b=this.events;let y=0;return x;function x(_){return h===126&&b[b.length-1][1].type!=="characterEscape"?f(_):(u.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const k=Bs(h);if(_===126)return y>1?f(_):(u.consume(_),y++,v);if(y<2&&!r)return f(_);const w=u.exit("strikethroughSequenceTemporary"),C=Bs(_);return w._open=!C||C===2&&!!k,w._close=!k||k===2&&!!C,d(_)}}}class xL{constructor(){this.map=[]}add(n,r,a){vL(this,n,r,a)}consume(n){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];a.push(n.slice()),n.length=0;let l=a.pop();for(;l;){for(const o of l)n.push(o);l=a.pop()}this.map.length=0}}function vL(e,n,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([n,r,a])}}function EL(e,n){let r=!1;const a=[];for(;n<e.length;){const l=e[n];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return a}function _L(){return{flow:{null:{name:"table",tokenize:kL,resolveAll:wL}}}}function kL(e,n,r){const a=this;let l=0,o=0,u;return d;function d(P){let J=a.events.length-1;for(;J>-1;){const le=a.events[J][1].type;if(le==="lineEnding"||le==="linePrefix")J--;else break}const ee=J>-1?a.events[J][1].type:null,ve=ee==="tableHead"||ee==="tableRow"?O:f;return ve===O&&a.parser.lazy[a.now().line]?r(P):ve(P)}function f(P){return e.enter("tableHead"),e.enter("tableRow"),h(P)}function h(P){return P===124||(u=!0,o+=1),b(P)}function b(P){return P===null?r(P):qe(P)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),v):r(P):dt(P)?_t(e,b,"whitespace")(P):(o+=1,u&&(u=!1,l+=1),P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),u=!0,b):(e.enter("data"),y(P)))}function y(P){return P===null||P===124||Ht(P)?(e.exit("data"),b(P)):(e.consume(P),P===92?x:y)}function x(P){return P===92||P===124?(e.consume(P),y):y(P)}function v(P){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(P):(e.enter("tableDelimiterRow"),u=!1,dt(P)?_t(e,_,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):_(P))}function _(P){return P===45||P===58?w(P):P===124?(u=!0,e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),k):$(P)}function k(P){return dt(P)?_t(e,w,"whitespace")(P):w(P)}function w(P){return P===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),C):P===45?(o+=1,C(P)):P===null||qe(P)?H(P):$(P)}function C(P){return P===45?(e.enter("tableDelimiterFiller"),j(P)):$(P)}function j(P){return P===45?(e.consume(P),j):P===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(P),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(P))}function R(P){return dt(P)?_t(e,H,"whitespace")(P):H(P)}function H(P){return P===124?_(P):P===null||qe(P)?!u||l!==o?$(P):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(P)):$(P)}function $(P){return r(P)}function O(P){return e.enter("tableRow"),Z(P)}function Z(P){return P===124?(e.enter("tableCellDivider"),e.consume(P),e.exit("tableCellDivider"),Z):P===null||qe(P)?(e.exit("tableRow"),n(P)):dt(P)?_t(e,Z,"whitespace")(P):(e.enter("data"),A(P))}function A(P){return P===null||P===124||Ht(P)?(e.exit("data"),Z(P)):(e.consume(P),P===92?ae:A)}function ae(P){return P===92||P===124?(e.consume(P),A):A(P)}}function wL(e,n){let r=-1,a=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],d=!1,f=0,h,b,y;const x=new xL;for(;++r<e.length;){const v=e[r],_=v[1];v[0]==="enter"?_.type==="tableHead"?(d=!1,f!==0&&(Tx(x,n,f,h,b),b=void 0,f=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},x.add(r,0,[["enter",h,n]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(a=!0,y=void 0,o=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,b={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},x.add(r,0,[["enter",b,n]])),l=_.type==="tableDelimiterRow"?2:b?3:1):l&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(a=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],y=Vc(x,n,o,l,void 0,y),o=[0,0,0,0]),u[2]=r)):_.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(u[0]=u[1],y=Vc(x,n,o,l,void 0,y)),o=u,u=[o[1],r,0,0])):_.type==="tableHead"?(d=!0,f=r):_.type==="tableRow"||_.type==="tableDelimiterRow"?(f=r,o[1]!==0?(u[0]=u[1],y=Vc(x,n,o,l,r,y)):u[1]!==0&&(y=Vc(x,n,u,l,r,y)),l=0):l&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=r)}for(f!==0&&Tx(x,n,f,h,b),x.consume(n.events),r=-1;++r<n.events.length;){const v=n.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=EL(n.events,r))}return e}function Vc(e,n,r,a,l,o){const u=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},zs(n.events,r[0])),e.add(r[0],0,[["exit",o,n]]));const f=zs(n.events,r[1]);if(o={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(r[1],0,[["enter",o,n]]),r[2]!==0){const h=zs(n.events,r[2]),b=zs(n.events,r[3]),y={type:d,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(r[2],0,[["enter",y,n]]),a!==2){const x=n.events[r[2]],v=n.events[r[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const _=r[2]+1,k=r[3]-r[2]-1;e.add(_,k,[])}}e.add(r[3]+1,0,[["exit",y,n]])}return l!==void 0&&(o.end=Object.assign({},zs(n.events,l)),e.add(l,0,[["exit",o,n]]),o=void 0),o}function Tx(e,n,r,a,l){const o=[],u=zs(n.events,r);l&&(l.end=Object.assign({},u),o.push(["exit",l,n])),a.end=Object.assign({},u),o.push(["exit",a,n]),e.add(r+1,0,o)}function zs(e,n){const r=e[n],a=r[0]==="enter"?"start":"end";return r[1][a]}const SL={name:"tasklistCheck",tokenize:CL};function NL(){return{text:{91:SL}}}function CL(e,n,r){const a=this;return l;function l(f){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Ht(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):r(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(f)}function d(f){return qe(f)?n(f):dt(f)?e.check({tokenize:TL},n,r)(f):r(f)}}function TL(e,n,r){return _t(e,a,"whitespace");function a(l){return l===null?r(l):n(l)}}function zL(e){return $E([eL(),uL(),yL(e),_L(),NL()])}const RL={};function AL(e){const n=this,r=e||RL,a=n.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),u=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(zL(r)),o.push(X5()),u.push(Z5(r))}const zx=(function(e,n,r){const a=_o(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof n=="number"){if(n<0||n===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(n=e.children.indexOf(n),n<0)throw new Error("Expected child node or index");for(;++n<e.children.length;)if(a(e.children[n],n,e))return e.children[n]}),Ga=(function(e){if(e==null)return DL;if(typeof e=="string")return ML(e);if(typeof e=="object")return OL(e);if(typeof e=="function")return Ym(e);throw new Error("Expected function, string, or array as `test`")});function OL(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=Ga(e[r]);return Ym(a);function a(...l){let o=-1;for(;++o<n.length;)if(n[o].apply(this,l))return!0;return!1}}function ML(e){return Ym(n);function n(r){return r.tagName===e}}function Ym(e){return n;function n(r,a,l){return!!(LL(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function DL(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function LL(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Rx=/\n/g,Ax=/[\t ]+/g,Jh=Ga("br"),Ox=Ga(qL),jL=Ga("p"),Mx=Ga("tr"),IL=Ga(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",HL,$L]),D_=Ga(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function BL(e,n){const r=n||{},a="children"in e?e.children:[],l=D_(e),o=I_(e,{whitespace:r.whitespace||"normal"}),u=[];(e.type==="text"||e.type==="comment")&&u.push(...j_(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)u.push(...L_(a[d],e,{whitespace:o,breakBefore:d?void 0:l,breakAfter:d<a.length-1?Jh(a[d+1]):l}));const f=[];let h;for(d=-1;++d<u.length;){const b=u[d];typeof b=="number"?h!==void 0&&b>h&&(h=b):b&&(h!==void 0&&h>-1&&f.push(`
441
- `.repeat(h)||" "),h=-1,f.push(b))}return f.join("")}function L_(e,n,r){return e.type==="element"?UL(e,n,r):e.type==="text"?r.whitespace==="normal"?j_(e,r):FL(e):[]}function UL(e,n,r){const a=I_(e,r),l=e.children||[];let o=-1,u=[];if(IL(e))return u;let d,f;for(Jh(e)||Mx(e)&&zx(n,e,Mx)?f=`
442
- `:jL(e)?(d=2,f=2):D_(e)&&(d=1,f=1);++o<l.length;)u=u.concat(L_(l[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<l.length-1?Jh(l[o+1]):f}));return Ox(e)&&zx(n,e,Ox)&&u.push(" "),d&&u.unshift(d),f&&u.push(f),u}function j_(e,n){const r=String(e.value),a=[],l=[];let o=0;for(;o<=r.length;){Rx.lastIndex=o;const f=Rx.exec(r),h=f&&"index"in f?f.index:r.length;a.push(PL(r.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?n.breakBefore:!0,h===r.length?n.breakAfter:!0)),o=h+1}let u=-1,d;for(;++u<a.length;)a[u].charCodeAt(a[u].length-1)===8203||u<a.length-1&&a[u+1].charCodeAt(0)===8203?(l.push(a[u]),d=void 0):a[u]?(typeof d=="number"&&l.push(d),l.push(a[u]),d=0):(u===0||u===a.length-1)&&l.push(0);return l}function FL(e){return[String(e.value)]}function PL(e,n,r){const a=[];let l=0,o;for(;l<e.length;){Ax.lastIndex=l;const u=Ax.exec(e);o=u?u.index:e.length,!l&&!o&&u&&!n&&a.push(""),l!==o&&a.push(e.slice(l,o)),l=u?o+u[0].length:o}return l!==o&&!r&&a.push(""),a.join(" ")}function I_(e,n){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}function HL(e){return!!(e.properties||{}).hidden}function qL(e){return e.tagName==="td"||e.tagName==="th"}function $L(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function GL(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="(?!struct)("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",_=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],k=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],H={type:k,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},$={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},O=[$,y,d,r,e.C_BLOCK_COMMENT_MODE,b,h],Z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:H,contains:O.concat([{begin:/\(/,end:/\)/,keywords:H,contains:O.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:H,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:H,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:H,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(Z,A,$,O,[y,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:H,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:H},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function KL(e){const n={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=GL(e),a=r.keywords;return a.type=[...a.type,...n.type],a.literal=[...a.literal,...n.literal],a.built_in=[...a.built_in,...n.built_in],a._hints=n._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function VL(e){const n=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),u={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(d);const f={match:/\\"/},h={className:"string",begin:/'/,end:/'/},b={match:/\\'/},y={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),_={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},k=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],C={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],H=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],$=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:k,literal:w,built_in:[...j,...R,"set","shopt",...H,...$]},contains:[v,e.SHEBANG(),_,y,o,u,C,d,f,h,b,r]}}function YL(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",w={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},C=[y,d,r,e.C_BLOCK_COMMENT_MODE,b,h],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:w,contains:C.concat([{begin:/\(/,end:/\)/,keywords:w,contains:C.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:w,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:w,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:w,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,y]};return{name:"C",aliases:["h"],keywords:w,disableAutodetect:!0,illegal:"</",contains:[].concat(j,R,C,[y,{begin:e.IDENT_RE+"::",keywords:w},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:y,strings:h,keywords:w}}}function QL(e){const n=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",u="(?!struct)("+a+"|"+n.optional(l)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(h,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:n.optional(l)+e.IDENT_RE,relevance:0},v=n.optional(l)+e.IDENT_RE+"\\s*\\(",_=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],k=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],w=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],C=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],H={type:k,keyword:_,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:w},$={className:"function.dispatch",relevance:0,keywords:{_hint:C},begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},O=[$,y,d,r,e.C_BLOCK_COMMENT_MODE,b,h],Z={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:H,contains:O.concat([{begin:/\(/,end:/\)/,keywords:H,contains:O.concat(["self"]),relevance:0}]),relevance:0},A={className:"function",begin:"("+u+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:H,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:H,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:H,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,r,e.C_BLOCK_COMMENT_MODE,y]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:H,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(Z,A,$,O,[y,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:H,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:H},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function XL(e){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],l=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],u={keyword:l.concat(o),built_in:n,literal:a},d=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),f={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},y=e.inherit(b,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:u},v=e.inherit(x,{illegal:/\n/}),_={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},k={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},w=e.inherit(k,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[k,_,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],v.contains=[w,_,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const C={variants:[h,k,_,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},R=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",H={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:u,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},C,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,j,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,j,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+R+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:u,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,relevance:0,contains:[C,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},H]}}const ZL=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),WL=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],JL=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],e3=[...WL,...JL],t3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),n3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),r3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),i3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function a3(e){const n=e.regex,r=ZL(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,a,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+u,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+n3.join("|")+")"},{begin:":(:)?("+r3.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+i3.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:t3.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+e3.join("|")+")\\b"}]}}function s3(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function l3(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function o3(e){const n=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(r,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function c3(e){const n=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},d={begin:/\[/,end:/\]/,contains:[a,o,l,u,r,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,b=/'[^']*'/,y=n.either(f,h,b),x=n.concat(y,"(\\s*\\.\\s*",y,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[a,d,o,l,u,r]}}]}}var Rs="[0-9](_*[0-9])*",Yc=`\\.(${Rs})`,Qc="[0-9a-fA-F](_*[0-9a-fA-F])*",Dx={className:"number",variants:[{begin:`(\\b(${Rs})((${Yc})|\\.)?|(${Yc}))[eE][+-]?(${Rs})[fFdD]?\\b`},{begin:`\\b(${Rs})((${Yc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Yc})[fFdD]?\\b`},{begin:`\\b(${Rs})[fFdD]\\b`},{begin:`\\b0[xX]((${Qc})\\.?|(${Qc})?\\.(${Qc}))[pP][+-]?(${Rs})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Qc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function B_(e,n,r){return r===-1?"":e.replace(n,a=>B_(e,n,r-1))}function u3(e){const n=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+B_("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),f={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},h={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[n.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Dx,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Dx,h]}}const Lx="[A-Za-z$_][0-9A-Za-z$_]*",d3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],f3=["true","false","null","undefined","NaN","Infinity"],U_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],F_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],P_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],h3=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],m3=[].concat(P_,U_,F_);function p3(e){const n=e.regex,r=(oe,{after:fe})=>{const T="</"+oe[0].slice(1);return oe.input.indexOf(T,fe)!==-1},a=Lx,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(oe,fe)=>{const T=oe[0].length+oe.index,M=oe.input[T];if(M==="<"||M===","){fe.ignoreMatch();return}M===">"&&(r(oe,{after:T})||fe.ignoreMatch());let G;const z=oe.input.substring(T);if(G=z.match(/^\s*=/)){fe.ignoreMatch();return}if((G=z.match(/^\s+extends\s+/))&&G.index===0){fe.ignoreMatch();return}}},d={$pattern:Lx,keyword:d3,literal:f3,built_in:m3,"variable.language":h3},f="[0-9](_?[0-9])*",h=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,k,w,{match:/\$\d+/},y];x.contains=R.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(R)});const H=[].concat(j,x.contains),$=H.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(H)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$},Z={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,n.concat(a,"(",n.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...U_,...F_]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},J={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(oe){return n.concat("(?!",oe.join("|"),")")}const ve={match:n.concat(/\b/,ee([...P_,"super","import"].map(oe=>`${oe}\\s*\\(`)),a,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:n.concat(/\./,n.lookahead(n.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},B="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",te={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(B)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,k,w,j,{match:/\$\d+/},y,A,{scope:"attr",match:a+n.lookahead(":"),relevance:0},te,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,e.REGEXP_MODE,{className:"function",begin:B,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},ve,J,Z,X,{match:/\$[(.]/}]}}function g3(e){const n={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],l={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[n,r,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var As="[0-9](_*[0-9])*",Xc=`\\.(${As})`,Zc="[0-9a-fA-F](_*[0-9a-fA-F])*",b3={className:"number",variants:[{begin:`(\\b(${As})((${Xc})|\\.)?|(${Xc}))[eE][+-]?(${As})[fFdD]?\\b`},{begin:`\\b(${As})((${Xc})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Xc})[fFdD]?\\b`},{begin:`\\b(${As})[fFdD]\\b`},{begin:`\\b0[xX]((${Zc})\\.?|(${Zc})?\\.(${Zc}))[pP][+-]?(${As})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Zc})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function y3(e){const n={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},u={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.contains.push(u);const d={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(u,{className:"string"}),"self"]}]},h=b3,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),y={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=y;return x.variants[1].contains=[y],y.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,r,a,d,f,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[y,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,d,f,u,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},d,f]},u,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
443
- `},h]}}const x3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),v3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],E3=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],_3=[...v3,...E3],k3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),H_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),q_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),w3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),S3=H_.concat(q_).sort().reverse();function N3(e){const n=x3(e),r=S3,a="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",u=[],d=[],f=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},h=function(R,H,$){return{className:R,begin:H,relevance:$}},b={$pattern:/[a-z-]+/,keyword:a,attribute:k3.join(" ")},y={begin:"\\(",end:"\\)",contains:d,keywords:b,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),n.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},n.HEXCOLOR,y,h("variable","@@?"+l,10),h("variable","@\\{"+l+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},n.IMPORTANT,{beginKeywords:"and not"},n.FUNCTION_DISPATCH);const x=d.concat({begin:/\{/,end:/\}/,contains:u}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},_={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+w3.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},k={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:d,relevance:0}},w={className:"variable",variants:[{begin:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:x}},C={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,h("keyword","all\\b"),h("variable","@\\{"+l+"\\}"),{begin:"\\b("+_3.join("|")+")\\b",className:"selector-tag"},n.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+H_.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+q_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},n.FUNCTION_DISPATCH]},j={begin:l+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[C]};return u.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,k,w,j,_,C,v,n.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:u}}function C3(e){const n="\\[=*\\[",r="\\]=*\\]",a={begin:n,end:r,contains:["self"]},l=[e.COMMENT("--(?!"+n+")","$"),e.COMMENT("--"+n,r,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:l.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:n,end:r,contains:[a],relevance:5}])}}function T3(e){const n={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,r]},l={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},u={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,n,r,a,l,o,u]}}function z3(e){const n=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},u={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},y=e.inherit(h,{contains:[]}),x=e.inherit(b,{contains:[]});h.contains.push(x),b.contains.push(y);let v=[r,f];return[h,b,y,x].forEach(C=>{C.contains=C.contains.concat(v)}),v=v.concat(h,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},r,o,h,b,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},l,a,f,u,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function R3(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,d={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},f={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:d,illegal:"</",contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function A3(e){const n=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:r.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},u={begin:/->\{/,end:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},f={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},h={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,o,f],y=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(k,w,C="\\1")=>{const j=C==="\\1"?C:n.concat(C,w);return n.concat(n.concat("(?:",k,")"),w,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,C,a)},v=(k,w,C)=>n.concat(n.concat("(?:",k,")"),w,/(?:\\.|[^\\\/])*?/,C,a),_=[f,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),u,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},h,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",n.either(...y,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",n.either(...y,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=_,u.contains=_,{name:"Perl",aliases:["pl","pm"],keywords:l,contains:_}}function O3(e){const n=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),l=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o=n.concat(/[A-Z]+/,r),u={scope:"variable",match:"\\$+"+a},d={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),y={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(le,X)=>{X.data._beginMatch=le[1]||le[2]},"on:end":(le,X)=>{X.data._beginMatch!==le[1]&&X.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
444
- ]`,_={scope:"string",variants:[b,h,y,x]},k={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],C=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],j=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],H={keyword:C,literal:(le=>{const X=[];return le.forEach(B=>{X.push(B),B.toLowerCase()===B?X.push(B.toUpperCase()):X.push(B.toLowerCase())}),X})(w),built_in:j},$=le=>le.map(X=>X.replace(/\|\d+$/,"")),O={variants:[{match:[/new/,n.concat(v,"+"),n.concat("(?!",$(j).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},Z=n.concat(a,"\\b(?!\\()"),A={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),Z],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,n.concat(/::/,n.lookahead(/(?!class\b)/)),Z],scope:{1:"title.class",3:"variable.constant"}},{match:[l,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},ae={scope:"attr",match:n.concat(a,n.lookahead(":"),n.lookahead(/(?!::)/))},P={relevance:0,begin:/\(/,end:/\)/,keywords:H,contains:[ae,u,A,e.C_BLOCK_COMMENT_MODE,_,k,O]},J={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",$(C).join("\\b|"),"|",$(j).join("\\b|"),"\\b)"),a,n.concat(v,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[P]};P.contains.push(J);const ee=[ae,A,e.C_BLOCK_COMMENT_MODE,_,k,O],ve={begin:n.concat(/#\[\s*\\?/,n.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...ee]},...ee,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:H,contains:[ve,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},d,{scope:"variable.language",match:/\$this\b/},u,J,A,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},O,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:H,contains:["self",ve,u,A,e.C_BLOCK_COMMENT_MODE,_,k]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},_,k]}}function M3(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function D3(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function L3(e){const n=e.regex,r=/[\p{XID_Start}_]\p{XID_Continue}*/u,a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],d={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},b={begin:/\{\{/,relevance:0},y={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,b,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,_=`\\b|${a.join("|")}`,k={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${_})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${_})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${_})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${_})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${_})`},{begin:`\\b(${x})[jJ](?=${_})`}]},w={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",f,k,y,e.HASH_COMMENT_MODE]}]};return h.contains=[y,k,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[f,k,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},y,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[C]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[k,C,y]}]}}function j3(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function I3(e){const n=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[l,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function B3(e){const n=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=n.concat(a,/(::\w+)*/),u={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},d={className:"doctag",begin:"@[A-Za-z]+"},f={begin:"#<",end:">"},h=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:u},y={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",_={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},k={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:u}]},O=[y,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:u},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:u},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[k]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[y,{begin:r}],relevance:0},_,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:u},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(f,h),relevance:0}].concat(f,h);b.contains=O,k.contains=O;const P=[{begin:/^\s*=>/,starts:{end:"$",contains:O}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:u,contains:O}}];return h.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:u,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(P).concat(h).concat(O)}}function U3(e){const n=e.regex,r=/(r#)?/,a=n.concat(r,e.UNDERSCORE_IDENT_RE),l=n.concat(r,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,n.lookahead(/\s*\(/))},u="([ui](8|16|32|64|128|size)|f(32|64))?",d=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],f=["true","false","Some","None","Ok","Err"],h=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:d,literal:f,built_in:h},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+u},{begin:"\\b0o([0-7_]+)"+u},{begin:"\\b0x([A-Fa-f0-9_]+)"+u},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+u}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:b}},{className:"punctuation",begin:"->"},o]}}const F3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),P3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],H3=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],q3=[...P3,...H3],$3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),G3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),K3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),V3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Y3(e){const n=F3(e),r=K3,a=G3,l="@[a-z-]+",o="and or not only",d={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+q3.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[n.CSS_NUMBER_MODE]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+V3.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[n.BLOCK_COMMENT,d,n.HEXCOLOR,n.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.IMPORTANT,n.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:$3.join(" ")},contains:[{begin:l,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,n.HEXCOLOR,n.CSS_NUMBER_MODE]},n.FUNCTION_DISPATCH]}}function Q3(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function X3(e){const n=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],u=["double precision","large object","with timezone","without timezone"],d=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],f=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],y=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=b,_=[...h,...f].filter($=>!b.includes($)),k={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},C={match:n.concat(/\b/,n.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function j($){return n.concat(/\b/,n.either(...$.map(O=>O.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:j(x),relevance:0};function H($,{exceptions:O,when:Z}={}){const A=Z;return O=O||[],$.map(ae=>ae.match(/\|\d+$/)||O.includes(ae)?ae:A(ae)?`${ae}|0`:ae)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:H(_,{when:$=>$.length<3}),literal:o,type:d,built_in:y},contains:[{scope:"type",match:j(u)},R,C,k,a,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,w]}}function $_(e){return e?typeof e=="string"?e:e.source:null}function Vl(e){return Ft("(?=",e,")")}function Ft(...e){return e.map(r=>$_(r)).join("")}function Z3(e){const n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function Hn(...e){return"("+(Z3(e).capture?"":"?:")+e.map(a=>$_(a)).join("|")+")"}const Qm=e=>Ft(/\b/,e,/\w$/.test(e)?/\b/:/\B/),W3=["Protocol","Type"].map(Qm),jx=["init","self"].map(Qm),J3=["Any","Self"],Eh=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Ix=["false","nil","true"],ej=["assignment","associativity","higherThan","left","lowerThan","none","right"],tj=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Bx=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],G_=Hn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),K_=Hn(G_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),_h=Ft(G_,K_,"*"),V_=Hn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),xu=Hn(V_,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Yr=Ft(V_,xu,"*"),Wc=Ft(/[A-Z]/,xu,"*"),nj=["attached","autoclosure",Ft(/convention\(/,Hn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ft(/objc\(/,Yr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],rj=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function ij(e){const n={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],l={match:[/\./,Hn(...W3,...jx)],className:{2:"keyword"}},o={match:Ft(/\./,Hn(...Eh)),relevance:0},u=Eh.filter(lt=>typeof lt=="string").concat(["_|0"]),d=Eh.filter(lt=>typeof lt!="string").concat(J3).map(Qm),f={variants:[{className:"keyword",match:Hn(...d,...jx)}]},h={$pattern:Hn(/\b\w+/,/#\w+/),keyword:u.concat(tj),literal:Ix},b=[l,o,f],y={match:Ft(/\./,Hn(...Bx)),relevance:0},x={className:"built_in",match:Ft(/\b/,Hn(...Bx),/(?=\()/)},v=[y,x],_={match:/->/,relevance:0},k={className:"operator",relevance:0,variants:[{match:_h},{match:`\\.(\\.|${K_})+`}]},w=[_,k],C="([0-9]_*)+",j="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${C})(\\.(${C}))?([eE][+-]?(${C}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${C}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},H=(lt="")=>({className:"subst",variants:[{match:Ft(/\\/,lt,/[0\\tnr"']/)},{match:Ft(/\\/,lt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(lt="")=>({className:"subst",match:Ft(/\\/,lt,/[\t ]*(?:[\r\n]|\r\n)/)}),O=(lt="")=>({className:"subst",label:"interpol",begin:Ft(/\\/,lt,/\(/),end:/\)/}),Z=(lt="")=>({begin:Ft(lt,/"""/),end:Ft(/"""/,lt),contains:[H(lt),$(lt),O(lt)]}),A=(lt="")=>({begin:Ft(lt,/"/),end:Ft(/"/,lt),contains:[H(lt),O(lt)]}),ae={className:"string",variants:[Z(),Z("#"),Z("##"),Z("###"),A(),A("#"),A("##"),A("###")]},P=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],J={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:P},ee=lt=>{const vn=Ft(lt,/\//),Kn=Ft(/\//,lt);return{begin:vn,end:Kn,contains:[...P,{scope:"comment",begin:`#(?!.*${Kn})`,end:/$/}]}},ve={scope:"regexp",variants:[ee("###"),ee("##"),ee("#"),J]},le={match:Ft(/`/,Yr,/`/)},X={className:"variable",match:/\$\d+/},B={className:"variable",match:`\\$${xu}+`},te=[le,X,B],oe={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:rj,contains:[...w,R,ae]}]}},fe={scope:"keyword",match:Ft(/@/,Hn(...nj),Vl(Hn(/\(/,/\s+/)))},T={scope:"meta",match:Ft(/@/,Yr)},M=[oe,fe,T],G={match:Vl(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ft(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,xu,"+")},{className:"type",match:Wc,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ft(/\s+&\s+/,Vl(Wc)),relevance:0}]},z={begin:/</,end:/>/,keywords:h,contains:[...a,...b,...M,_,G]};G.contains.push(z);const he={match:Ft(Yr,/\s*:/),keywords:"_|0",relevance:0},Ee={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...a,ve,...b,...v,...w,R,ae,...te,...M,G]},be={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,G]},He={begin:Hn(Vl(Ft(Yr,/\s*:/)),Vl(Ft(Yr,/\s+/,Yr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Yr}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[He,...a,...b,...w,R,ae,...M,G,Ee],endsParent:!0,illegal:/["']/},Be={match:[/(func|macro)/,/\s+/,Hn(le.match,Yr,_h)],className:{1:"keyword",3:"title.function"},contains:[be,st,n],illegal:[/\[/,/%/]},Zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[be,st,n],illegal:/\[|%/},un={match:[/operator/,/\s+/,_h],className:{1:"keyword",3:"title"}},Ln={begin:[/precedencegroup/,/\s+/,Wc],className:{1:"keyword",3:"title"},contains:[G],keywords:[...ej,...Ix],end:/}/},At={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Kt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},rr={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Yr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[be,...b,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:Wc},...b],relevance:0}]};for(const lt of ae.variants){const vn=lt.contains.find(gr=>gr.label==="interpol");vn.keywords=h;const Kn=[...b,...v,...w,R,ae,...te];vn.contains=[...Kn,{begin:/\(/,end:/\)/,contains:["self",...Kn]}]}return{name:"Swift",keywords:h,contains:[...a,Be,Zt,At,Kt,rr,un,Ln,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},ve,...b,...v,...w,R,ae,...te,...M,G,Ee]}}const vu="[A-Za-z$_][0-9A-Za-z$_]*",Y_=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Q_=["true","false","null","undefined","NaN","Infinity"],X_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Z_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],W_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],J_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],e1=[].concat(W_,X_,Z_);function aj(e){const n=e.regex,r=(oe,{after:fe})=>{const T="</"+oe[0].slice(1);return oe.input.indexOf(T,fe)!==-1},a=vu,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(oe,fe)=>{const T=oe[0].length+oe.index,M=oe.input[T];if(M==="<"||M===","){fe.ignoreMatch();return}M===">"&&(r(oe,{after:T})||fe.ignoreMatch());let G;const z=oe.input.substring(T);if(G=z.match(/^\s*=/)){fe.ignoreMatch();return}if((G=z.match(/^\s+extends\s+/))&&G.index===0){fe.ignoreMatch();return}}},d={$pattern:vu,keyword:Y_,literal:Q_,built_in:e1,"variable.language":J_},f="[0-9](_?[0-9])*",h=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},_={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},k={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},w={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},j={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,k,w,{match:/\$\d+/},y];x.contains=R.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(R)});const H=[].concat(j,x.contains),$=H.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(H)}]),O={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$},Z={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,n.concat(a,"(",n.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},A={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...X_,...Z_]}},ae={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},P={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[O],illegal:/%/},J={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(oe){return n.concat("(?!",oe.join("|"),")")}const ve={match:n.concat(/\b/,ee([...W_,"super","import"].map(oe=>`${oe}\\s*\\(`)),a,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},le={begin:n.concat(/\./,n.lookahead(n.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},X={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},O]},B="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",te={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(B)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[O]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:A},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ae,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,_,k,w,j,{match:/\$\d+/},y,A,{scope:"attr",match:a+n.lookahead(":"),relevance:0},te,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[j,e.REGEXP_MODE,{className:"function",begin:B,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},P,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[O,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},le,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[O]},ve,J,Z,X,{match:/\$[(.]/}]}}function sj(e){const n=e.regex,r=aj(e),a=vu,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},u={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:vu,keyword:Y_.concat(f),literal:Q_,built_in:e1.concat(l),"variable.language":J_},b={className:"meta",begin:"@"+a},y=(k,w,C)=>{const j=k.contains.findIndex(R=>R.label===w);if(j===-1)throw new Error("can not find mode to replace");k.contains.splice(j,1,C)};Object.assign(r.keywords,h),r.exports.PARAMS_CONTAINS.push(b);const x=r.contains.find(k=>k.scope==="attr"),v=Object.assign({},x,{match:n.concat(a,n.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,x,v]),r.contains=r.contains.concat([b,o,u,v]),y(r,"shebang",e.SHEBANG()),y(r,"use_strict",d);const _=r.contains.find(k=>k.label==="func.def");return _.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function lj(e){const n=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,u=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,d=/\d{1,2}(:\d{1,2}){1,2}/,f={className:"literal",variants:[{begin:n.concat(/# */,n.either(o,l),/ *#/)},{begin:n.concat(/# */,d,/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,n.either(o,l),/ +/,n.either(u,d),/ *#/)}]},h={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},y=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,a,f,h,b,y,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}function oj(e){e.regex;const n=e.COMMENT(/\(;/,/;\)/);n.contains.push("self");const r=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],l={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},u={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},d={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},f={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[r,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,u,l,e.QUOTE_STRING_MODE,f,h,d]}}function cj(e){const n=e.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=e.inherit(o,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,f,d,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,u,f,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:h}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function uj(e){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},u={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},d=e.inherit(u,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},_={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},k={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},_,k,o,u],C=[...w];return C.pop(),C.push(d),v.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}const dj={arduino:KL,bash:VL,c:YL,cpp:QL,csharp:XL,css:a3,diff:s3,go:l3,graphql:o3,ini:c3,java:u3,javascript:p3,json:g3,kotlin:y3,less:N3,lua:C3,makefile:T3,markdown:z3,objectivec:R3,perl:A3,php:O3,"php-template":M3,plaintext:D3,python:L3,"python-repl":j3,r:I3,ruby:B3,rust:U3,scss:Y3,shell:Q3,sql:X3,swift:ij,typescript:sj,vbnet:lj,wasm:oj,xml:cj,yaml:uj};var kh,Ux;function fj(){if(Ux)return kh;Ux=1;function e(I){return I instanceof Map?I.clear=I.delete=I.set=function(){throw new Error("map is read-only")}:I instanceof Set&&(I.add=I.clear=I.delete=function(){throw new Error("set is read-only")}),Object.freeze(I),Object.getOwnPropertyNames(I).forEach(ie=>{const _e=I[ie],Ke=typeof _e;(Ke==="object"||Ke==="function")&&!Object.isFrozen(_e)&&e(_e)}),I}class n{constructor(ie){ie.data===void 0&&(ie.data={}),this.data=ie.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(I){return I.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(I,...ie){const _e=Object.create(null);for(const Ke in I)_e[Ke]=I[Ke];return ie.forEach(function(Ke){for(const zt in Ke)_e[zt]=Ke[zt]}),_e}const l="</span>",o=I=>!!I.scope,u=(I,{prefix:ie})=>{if(I.startsWith("language:"))return I.replace("language:","language-");if(I.includes(".")){const _e=I.split(".");return[`${ie}${_e.shift()}`,..._e.map((Ke,zt)=>`${Ke}${"_".repeat(zt+1)}`)].join(" ")}return`${ie}${I}`};class d{constructor(ie,_e){this.buffer="",this.classPrefix=_e.classPrefix,ie.walk(this)}addText(ie){this.buffer+=r(ie)}openNode(ie){if(!o(ie))return;const _e=u(ie.scope,{prefix:this.classPrefix});this.span(_e)}closeNode(ie){o(ie)&&(this.buffer+=l)}value(){return this.buffer}span(ie){this.buffer+=`<span class="${ie}">`}}const f=(I={})=>{const ie={children:[]};return Object.assign(ie,I),ie};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ie){this.top.children.push(ie)}openNode(ie){const _e=f({scope:ie});this.add(_e),this.stack.push(_e)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ie){return this.constructor._walk(ie,this.rootNode)}static _walk(ie,_e){return typeof _e=="string"?ie.addText(_e):_e.children&&(ie.openNode(_e),_e.children.forEach(Ke=>this._walk(ie,Ke)),ie.closeNode(_e)),ie}static _collapse(ie){typeof ie!="string"&&ie.children&&(ie.children.every(_e=>typeof _e=="string")?ie.children=[ie.children.join("")]:ie.children.forEach(_e=>{h._collapse(_e)}))}}class b extends h{constructor(ie){super(),this.options=ie}addText(ie){ie!==""&&this.add(ie)}startScope(ie){this.openNode(ie)}endScope(){this.closeNode()}__addSublanguage(ie,_e){const Ke=ie.root;_e&&(Ke.scope=`language:${_e}`),this.add(Ke)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function y(I){return I?typeof I=="string"?I:I.source:null}function x(I){return k("(?=",I,")")}function v(I){return k("(?:",I,")*")}function _(I){return k("(?:",I,")?")}function k(...I){return I.map(_e=>y(_e)).join("")}function w(I){const ie=I[I.length-1];return typeof ie=="object"&&ie.constructor===Object?(I.splice(I.length-1,1),ie):{}}function C(...I){return"("+(w(I).capture?"":"?:")+I.map(Ke=>y(Ke)).join("|")+")"}function j(I){return new RegExp(I.toString()+"|").exec("").length-1}function R(I,ie){const _e=I&&I.exec(ie);return _e&&_e.index===0}const H=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(I,{joinWith:ie}){let _e=0;return I.map(Ke=>{_e+=1;const zt=_e;let wt=y(Ke),Te="";for(;wt.length>0;){const Se=H.exec(wt);if(!Se){Te+=wt;break}Te+=wt.substring(0,Se.index),wt=wt.substring(Se.index+Se[0].length),Se[0][0]==="\\"&&Se[1]?Te+="\\"+String(Number(Se[1])+zt):(Te+=Se[0],Se[0]==="("&&_e++)}return Te}).map(Ke=>`(${Ke})`).join(ie)}const O=/\b\B/,Z="[a-zA-Z]\\w*",A="[a-zA-Z_]\\w*",ae="\\b\\d+(\\.\\d+)?",P="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",J="\\b(0b[01]+)",ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ve=(I={})=>{const ie=/^#![ ]*\//;return I.binary&&(I.begin=k(ie,/.*\b/,I.binary,/\b.*/)),a({scope:"meta",begin:ie,end:/$/,relevance:0,"on:begin":(_e,Ke)=>{_e.index!==0&&Ke.ignoreMatch()}},I)},le={begin:"\\\\[\\s\\S]",relevance:0},X={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[le]},B={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[le]},te={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},oe=function(I,ie,_e={}){const Ke=a({scope:"comment",begin:I,end:ie,contains:[]},_e);Ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const zt=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ke.contains.push({begin:k(/[ ]+/,"(",zt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ke},fe=oe("//","$"),T=oe("/\\*","\\*/"),M=oe("#","$"),G={scope:"number",begin:ae,relevance:0},z={scope:"number",begin:P,relevance:0},he={scope:"number",begin:J,relevance:0},Ee={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[le,{begin:/\[/,end:/\]/,relevance:0,contains:[le]}]},be={scope:"title",begin:Z,relevance:0},He={scope:"title",begin:A,relevance:0},st={begin:"\\.\\s*"+A,relevance:0};var Zt=Object.freeze({__proto__:null,APOS_STRING_MODE:X,BACKSLASH_ESCAPE:le,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:J,COMMENT:oe,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:fe,C_NUMBER_MODE:z,C_NUMBER_RE:P,END_SAME_AS_BEGIN:function(I){return Object.assign(I,{"on:begin":(ie,_e)=>{_e.data._beginMatch=ie[1]},"on:end":(ie,_e)=>{_e.data._beginMatch!==ie[1]&&_e.ignoreMatch()}})},HASH_COMMENT_MODE:M,IDENT_RE:Z,MATCH_NOTHING_RE:O,METHOD_GUARD:st,NUMBER_MODE:G,NUMBER_RE:ae,PHRASAL_WORDS_MODE:te,QUOTE_STRING_MODE:B,REGEXP_MODE:Ee,RE_STARTERS_RE:ee,SHEBANG:ve,TITLE_MODE:be,UNDERSCORE_IDENT_RE:A,UNDERSCORE_TITLE_MODE:He});function un(I,ie){I.input[I.index-1]==="."&&ie.ignoreMatch()}function Ln(I,ie){I.className!==void 0&&(I.scope=I.className,delete I.className)}function At(I,ie){ie&&I.beginKeywords&&(I.begin="\\b("+I.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",I.__beforeBegin=un,I.keywords=I.keywords||I.beginKeywords,delete I.beginKeywords,I.relevance===void 0&&(I.relevance=0))}function Kt(I,ie){Array.isArray(I.illegal)&&(I.illegal=C(...I.illegal))}function rr(I,ie){if(I.match){if(I.begin||I.end)throw new Error("begin & end are not supported with match");I.begin=I.match,delete I.match}}function lt(I,ie){I.relevance===void 0&&(I.relevance=1)}const vn=(I,ie)=>{if(!I.beforeMatch)return;if(I.starts)throw new Error("beforeMatch cannot be used with starts");const _e=Object.assign({},I);Object.keys(I).forEach(Ke=>{delete I[Ke]}),I.keywords=_e.keywords,I.begin=k(_e.beforeMatch,x(_e.begin)),I.starts={relevance:0,contains:[Object.assign(_e,{endsParent:!0})]},I.relevance=0,delete _e.beforeMatch},Kn=["of","and","for","in","not","or","if","then","parent","list","value"],gr="keyword";function br(I,ie,_e=gr){const Ke=Object.create(null);return typeof I=="string"?zt(_e,I.split(" ")):Array.isArray(I)?zt(_e,I):Object.keys(I).forEach(function(wt){Object.assign(Ke,br(I[wt],ie,wt))}),Ke;function zt(wt,Te){ie&&(Te=Te.map(Se=>Se.toLowerCase())),Te.forEach(function(Se){const $e=Se.split("|");Ke[$e[0]]=[wt,ti($e[0],$e[1])]})}}function ti(I,ie){return ie?Number(ie):ha(I)?0:1}function ha(I){return Kn.includes(I.toLowerCase())}const Ni={},Vt=I=>{console.error(I)},Vn=(I,...ie)=>{console.log(`WARN: ${I}`,...ie)},ne=(I,ie)=>{Ni[`${I}/${ie}`]||(console.log(`Deprecated as of ${I}. ${ie}`),Ni[`${I}/${ie}`]=!0)},ge=new Error;function Fe(I,ie,{key:_e}){let Ke=0;const zt=I[_e],wt={},Te={};for(let Se=1;Se<=ie.length;Se++)Te[Se+Ke]=zt[Se],wt[Se+Ke]=!0,Ke+=j(ie[Se-1]);I[_e]=Te,I[_e]._emit=wt,I[_e]._multi=!0}function Qe(I){if(Array.isArray(I.begin)){if(I.skip||I.excludeBegin||I.returnBegin)throw Vt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ge;if(typeof I.beginScope!="object"||I.beginScope===null)throw Vt("beginScope must be object"),ge;Fe(I,I.begin,{key:"beginScope"}),I.begin=$(I.begin,{joinWith:""})}}function Je(I){if(Array.isArray(I.end)){if(I.skip||I.excludeEnd||I.returnEnd)throw Vt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ge;if(typeof I.endScope!="object"||I.endScope===null)throw Vt("endScope must be object"),ge;Fe(I,I.end,{key:"endScope"}),I.end=$(I.end,{joinWith:""})}}function wn(I){I.scope&&typeof I.scope=="object"&&I.scope!==null&&(I.beginScope=I.scope,delete I.scope)}function ir(I){wn(I),typeof I.beginScope=="string"&&(I.beginScope={_wrap:I.beginScope}),typeof I.endScope=="string"&&(I.endScope={_wrap:I.endScope}),Qe(I),Je(I)}function an(I){function ie(Te,Se){return new RegExp(y(Te),"m"+(I.case_insensitive?"i":"")+(I.unicodeRegex?"u":"")+(Se?"g":""))}class _e{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Se,$e){$e.position=this.position++,this.matchIndexes[this.matchAt]=$e,this.regexes.push([$e,Se]),this.matchAt+=j(Se)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Se=this.regexes.map($e=>$e[1]);this.matcherRe=ie($(Se,{joinWith:"|"}),!0),this.lastIndex=0}exec(Se){this.matcherRe.lastIndex=this.lastIndex;const $e=this.matcherRe.exec(Se);if(!$e)return null;const D=$e.findIndex((Y,ue)=>ue>0&&Y!==void 0),U=this.matchIndexes[D];return $e.splice(0,D),Object.assign($e,U)}}class Ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Se){if(this.multiRegexes[Se])return this.multiRegexes[Se];const $e=new _e;return this.rules.slice(Se).forEach(([D,U])=>$e.addRule(D,U)),$e.compile(),this.multiRegexes[Se]=$e,$e}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Se,$e){this.rules.push([Se,$e]),$e.type==="begin"&&this.count++}exec(Se){const $e=this.getMatcher(this.regexIndex);$e.lastIndex=this.lastIndex;let D=$e.exec(Se);if(this.resumingScanAtSamePosition()&&!(D&&D.index===this.lastIndex)){const U=this.getMatcher(0);U.lastIndex=this.lastIndex+1,D=U.exec(Se)}return D&&(this.regexIndex+=D.position+1,this.regexIndex===this.count&&this.considerAll()),D}}function zt(Te){const Se=new Ke;return Te.contains.forEach($e=>Se.addRule($e.begin,{rule:$e,type:"begin"})),Te.terminatorEnd&&Se.addRule(Te.terminatorEnd,{type:"end"}),Te.illegal&&Se.addRule(Te.illegal,{type:"illegal"}),Se}function wt(Te,Se){const $e=Te;if(Te.isCompiled)return $e;[Ln,rr,ir,vn].forEach(U=>U(Te,Se)),I.compilerExtensions.forEach(U=>U(Te,Se)),Te.__beforeBegin=null,[At,Kt,lt].forEach(U=>U(Te,Se)),Te.isCompiled=!0;let D=null;return typeof Te.keywords=="object"&&Te.keywords.$pattern&&(Te.keywords=Object.assign({},Te.keywords),D=Te.keywords.$pattern,delete Te.keywords.$pattern),D=D||/\w+/,Te.keywords&&(Te.keywords=br(Te.keywords,I.case_insensitive)),$e.keywordPatternRe=ie(D,!0),Se&&(Te.begin||(Te.begin=/\B|\b/),$e.beginRe=ie($e.begin),!Te.end&&!Te.endsWithParent&&(Te.end=/\B|\b/),Te.end&&($e.endRe=ie($e.end)),$e.terminatorEnd=y($e.end)||"",Te.endsWithParent&&Se.terminatorEnd&&($e.terminatorEnd+=(Te.end?"|":"")+Se.terminatorEnd)),Te.illegal&&($e.illegalRe=ie(Te.illegal)),Te.contains||(Te.contains=[]),Te.contains=[].concat(...Te.contains.map(function(U){return qt(U==="self"?Te:U)})),Te.contains.forEach(function(U){wt(U,$e)}),Te.starts&&wt(Te.starts,Se),$e.matcher=zt($e),$e}if(I.compilerExtensions||(I.compilerExtensions=[]),I.contains&&I.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return I.classNameAliases=a(I.classNameAliases||{}),wt(I)}function Wt(I){return I?I.endsWithParent||Wt(I.starts):!1}function qt(I){return I.variants&&!I.cachedVariants&&(I.cachedVariants=I.variants.map(function(ie){return a(I,{variants:null},ie)})),I.cachedVariants?I.cachedVariants:Wt(I)?a(I,{starts:I.starts?a(I.starts):null}):Object.isFrozen(I)?a(I):I}var kt="11.11.1";class ar extends Error{constructor(ie,_e){super(ie),this.name="HTMLInjectionError",this.html=_e}}const Sn=r,Ka=a,Pr=Symbol("nomatch"),Mr=7,Hr=function(I){const ie=Object.create(null),_e=Object.create(null),Ke=[];let zt=!0;const wt="Could not find the language '{}', did you forget to load/include a language module?",Te={disableAutodetect:!0,name:"Plain text",contains:[]};let Se={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function $e(de){return Se.noHighlightRe.test(de)}function D(de){let Me=de.className+" ";Me+=de.parentNode?de.parentNode.className:"";const Xe=Se.languageDetectRe.exec(Me);if(Xe){const vt=xt(Xe[1]);return vt||(Vn(wt.replace("{}",Xe[1])),Vn("Falling back to no-highlight mode for this block.",de)),vt?Xe[1]:"no-highlight"}return Me.split(/\s+/).find(vt=>$e(vt)||xt(vt))}function U(de,Me,Xe){let vt="",$t="";typeof Me=="object"?(vt=de,Xe=Me.ignoreIllegals,$t=Me.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
445
- https://github.com/highlightjs/highlight.js/issues/2277`),$t=de,vt=Me),Xe===void 0&&(Xe=!0);const Ve={code:vt,language:$t};jn("before:highlight",Ve);const Rt=Ve.result?Ve.result:Y(Ve.language,Ve.code,Xe);return Rt.code=Ve.code,jn("after:highlight",Rt),Rt}function Y(de,Me,Xe,vt){const $t=Object.create(null);function Ve(xe,Le){return xe.keywords[Le]}function Rt(){if(!Ye.keywords){fn.addText(Mt);return}let xe=0;Ye.keywordPatternRe.lastIndex=0;let Le=Ye.keywordPatternRe.exec(Mt),We="";for(;Le;){We+=Mt.substring(xe,Le.index);const ht=zn.case_insensitive?Le[0].toLowerCase():Le[0],en=Ve(Ye,ht);if(en){const[yr,Ys]=en;if(fn.addText(We),We="",$t[ht]=($t[ht]||0)+1,$t[ht]<=Mr&&(Ci+=Ys),yr.startsWith("_"))We+=Le[0];else{const No=zn.classNameAliases[yr]||yr;ft(Le[0],No)}}else We+=Le[0];xe=Ye.keywordPatternRe.lastIndex,Le=Ye.keywordPatternRe.exec(Mt)}We+=Mt.substring(xe),fn.addText(We)}function ln(){if(Mt==="")return;let xe=null;if(typeof Ye.subLanguage=="string"){if(!ie[Ye.subLanguage]){fn.addText(Mt);return}xe=Y(Ye.subLanguage,Mt,!0,So[Ye.subLanguage]),So[Ye.subLanguage]=xe._top}else xe=me(Mt,Ye.subLanguage.length?Ye.subLanguage:null);Ye.relevance>0&&(Ci+=xe.relevance),fn.__addSublanguage(xe._emitter,xe.language)}function Et(){Ye.subLanguage!=null?ln():Rt(),Mt=""}function ft(xe,Le){xe!==""&&(fn.startScope(Le),fn.addText(xe),fn.endScope())}function ni(xe,Le){let We=1;const ht=Le.length-1;for(;We<=ht;){if(!xe._emit[We]){We++;continue}const en=zn.classNameAliases[xe[We]]||xe[We],yr=Le[We];en?ft(yr,en):(Mt=yr,Rt(),Mt=""),We++}}function ri(xe,Le){return xe.scope&&typeof xe.scope=="string"&&fn.openNode(zn.classNameAliases[xe.scope]||xe.scope),xe.beginScope&&(xe.beginScope._wrap?(ft(Mt,zn.classNameAliases[xe.beginScope._wrap]||xe.beginScope._wrap),Mt=""):xe.beginScope._multi&&(ni(xe.beginScope,Le),Mt="")),Ye=Object.create(xe,{parent:{value:Ye}}),Ye}function ma(xe,Le,We){let ht=R(xe.endRe,We);if(ht){if(xe["on:end"]){const en=new n(xe);xe["on:end"](Le,en),en.isMatchIgnored&&(ht=!1)}if(ht){for(;xe.endsParent&&xe.parent;)xe=xe.parent;return xe}}if(xe.endsWithParent)return ma(xe.parent,Le,We)}function Va(xe){return Ye.matcher.regexIndex===0?(Mt+=xe[0],1):(Ti=!0,0)}function Lu(xe){const Le=xe[0],We=xe.rule,ht=new n(We),en=[We.__beforeBegin,We["on:begin"]];for(const yr of en)if(yr&&(yr(xe,ht),ht.isMatchIgnored))return Va(Le);return We.skip?Mt+=Le:(We.excludeBegin&&(Mt+=Le),Et(),!We.returnBegin&&!We.excludeBegin&&(Mt=Le)),ri(We,xe),We.returnBegin?0:Le.length}function Yn(xe){const Le=xe[0],We=Me.substring(xe.index),ht=ma(Ye,xe,We);if(!ht)return Pr;const en=Ye;Ye.endScope&&Ye.endScope._wrap?(Et(),ft(Le,Ye.endScope._wrap)):Ye.endScope&&Ye.endScope._multi?(Et(),ni(Ye.endScope,xe)):en.skip?Mt+=Le:(en.returnEnd||en.excludeEnd||(Mt+=Le),Et(),en.excludeEnd&&(Mt=Le));do Ye.scope&&fn.closeNode(),!Ye.skip&&!Ye.subLanguage&&(Ci+=Ye.relevance),Ye=Ye.parent;while(Ye!==ht.parent);return ht.starts&&ri(ht.starts,xe),en.returnEnd?0:Le.length}function Ks(){const xe=[];for(let Le=Ye;Le!==zn;Le=Le.parent)Le.scope&&xe.unshift(Le.scope);xe.forEach(Le=>fn.openNode(Le))}let pa={};function Ya(xe,Le){const We=Le&&Le[0];if(Mt+=xe,We==null)return Et(),0;if(pa.type==="begin"&&Le.type==="end"&&pa.index===Le.index&&We===""){if(Mt+=Me.slice(Le.index,Le.index+1),!zt){const ht=new Error(`0 width match regex (${de})`);throw ht.languageName=de,ht.badRule=pa.rule,ht}return 1}if(pa=Le,Le.type==="begin")return Lu(Le);if(Le.type==="illegal"&&!Xe){const ht=new Error('Illegal lexeme "'+We+'" for mode "'+(Ye.scope||"<unnamed>")+'"');throw ht.mode=Ye,ht}else if(Le.type==="end"){const ht=Yn(Le);if(ht!==Pr)return ht}if(Le.type==="illegal"&&We==="")return Mt+=`
446
- `,1;if(Vs>1e5&&Vs>Le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Mt+=We,We.length}const zn=xt(de);if(!zn)throw Vt(wt.replace("{}",de)),new Error('Unknown language: "'+de+'"');const wo=an(zn);let Qa="",Ye=vt||wo;const So={},fn=new Se.__emitter(Se);Ks();let Mt="",Ci=0,ii=0,Vs=0,Ti=!1;try{if(zn.__emitTokens)zn.__emitTokens(Me,fn);else{for(Ye.matcher.considerAll();;){Vs++,Ti?Ti=!1:Ye.matcher.considerAll(),Ye.matcher.lastIndex=ii;const xe=Ye.matcher.exec(Me);if(!xe)break;const Le=Me.substring(ii,xe.index),We=Ya(Le,xe);ii=xe.index+We}Ya(Me.substring(ii))}return fn.finalize(),Qa=fn.toHTML(),{language:de,value:Qa,relevance:Ci,illegal:!1,_emitter:fn,_top:Ye}}catch(xe){if(xe.message&&xe.message.includes("Illegal"))return{language:de,value:Sn(Me),illegal:!0,relevance:0,_illegalBy:{message:xe.message,index:ii,context:Me.slice(ii-100,ii+100),mode:xe.mode,resultSoFar:Qa},_emitter:fn};if(zt)return{language:de,value:Sn(Me),illegal:!1,relevance:0,errorRaised:xe,_emitter:fn,_top:Ye};throw xe}}function ue(de){const Me={value:Sn(de),illegal:!1,relevance:0,_top:Te,_emitter:new Se.__emitter(Se)};return Me._emitter.addText(de),Me}function me(de,Me){Me=Me||Se.languages||Object.keys(ie);const Xe=ue(de),vt=Me.filter(xt).filter(ot).map(Et=>Y(Et,de,!1));vt.unshift(Xe);const $t=vt.sort((Et,ft)=>{if(Et.relevance!==ft.relevance)return ft.relevance-Et.relevance;if(Et.language&&ft.language){if(xt(Et.language).supersetOf===ft.language)return 1;if(xt(ft.language).supersetOf===Et.language)return-1}return 0}),[Ve,Rt]=$t,ln=Ve;return ln.secondBest=Rt,ln}function Ce(de,Me,Xe){const vt=Me&&_e[Me]||Xe;de.classList.add("hljs"),de.classList.add(`language-${vt}`)}function ye(de){let Me=null;const Xe=D(de);if($e(Xe))return;if(jn("before:highlightElement",{el:de,language:Xe}),de.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",de);return}if(de.children.length>0&&(Se.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(de)),Se.throwUnescapedHTML))throw new ar("One of your code blocks includes unescaped HTML.",de.innerHTML);Me=de;const vt=Me.textContent,$t=Xe?U(vt,{language:Xe,ignoreIllegals:!0}):me(vt);de.innerHTML=$t.value,de.dataset.highlighted="yes",Ce(de,Xe,$t.language),de.result={language:$t.language,re:$t.relevance,relevance:$t.relevance},$t.secondBest&&(de.secondBest={language:$t.secondBest.language,relevance:$t.secondBest.relevance}),jn("after:highlightElement",{el:de,result:$t,text:vt})}function we(de){Se=Ka(Se,de)}const Ne=()=>{Oe(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ie(){Oe(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ue=!1;function Oe(){function de(){Oe()}if(document.readyState==="loading"){Ue||window.addEventListener("DOMContentLoaded",de,!1),Ue=!0;return}document.querySelectorAll(Se.cssSelector).forEach(ye)}function yt(de,Me){let Xe=null;try{Xe=Me(I)}catch(vt){if(Vt("Language definition for '{}' could not be registered.".replace("{}",de)),zt)Vt(vt);else throw vt;Xe=Te}Xe.name||(Xe.name=de),ie[de]=Xe,Xe.rawDefinition=Me.bind(null,I),Xe.aliases&&Yt(Xe.aliases,{languageName:de})}function rt(de){delete ie[de];for(const Me of Object.keys(_e))_e[Me]===de&&delete _e[Me]}function Ot(){return Object.keys(ie)}function xt(de){return de=(de||"").toLowerCase(),ie[de]||ie[_e[de]]}function Yt(de,{languageName:Me}){typeof de=="string"&&(de=[de]),de.forEach(Xe=>{_e[Xe.toLowerCase()]=Me})}function ot(de){const Me=xt(de);return Me&&!Me.disableAutodetect}function sn(de){de["before:highlightBlock"]&&!de["before:highlightElement"]&&(de["before:highlightElement"]=Me=>{de["before:highlightBlock"](Object.assign({block:Me.el},Me))}),de["after:highlightBlock"]&&!de["after:highlightElement"]&&(de["after:highlightElement"]=Me=>{de["after:highlightBlock"](Object.assign({block:Me.el},Me))})}function jt(de){sn(de),Ke.push(de)}function qr(de){const Me=Ke.indexOf(de);Me!==-1&&Ke.splice(Me,1)}function jn(de,Me){const Xe=de;Ke.forEach(function(vt){vt[Xe]&&vt[Xe](Me)})}function dn(de){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),ye(de)}Object.assign(I,{highlight:U,highlightAuto:me,highlightAll:Oe,highlightElement:ye,highlightBlock:dn,configure:we,initHighlighting:Ne,initHighlightingOnLoad:Ie,registerLanguage:yt,unregisterLanguage:rt,listLanguages:Ot,getLanguage:xt,registerAliases:Yt,autoDetection:ot,inherit:Ka,addPlugin:jt,removePlugin:qr}),I.debugMode=function(){zt=!1},I.safeMode=function(){zt=!0},I.versionString=kt,I.regex={concat:k,lookahead:x,either:C,optional:_,anyNumberOfTimes:v};for(const de in Zt)typeof Zt[de]=="object"&&e(Zt[de]);return Object.assign(I,Zt),I},Nn=Hr({});return Nn.newInstance=()=>Hr({}),kh=Nn,Nn.HighlightJS=Nn,Nn.default=Nn,kh}var hj=fj();const mj=Eu(hj),Fx={},pj="hljs-";function gj(e){const n=mj.newInstance();return e&&o(e),{highlight:r,highlightAuto:a,listLanguages:l,register:o,registerAlias:u,registered:d};function r(f,h,b){const y=b||Fx,x=typeof y.prefix=="string"?y.prefix:pj;if(!n.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");n.configure({__emitter:bj,classPrefix:x});const v=n.highlight(h,{ignoreIllegals:!0,language:f});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const _=v._emitter.root,k=_.data;return k.language=v.language,k.relevance=v.relevance,_}function a(f,h){const y=(h||Fx).subset||l();let x=-1,v=0,_;for(;++x<y.length;){const k=y[x];if(!n.getLanguage(k))continue;const w=r(k,f,h);w.data&&w.data.relevance!==void 0&&w.data.relevance>v&&(v=w.data.relevance,_=w)}return _||{type:"root",children:[],data:{language:void 0,relevance:v}}}function l(){return n.listLanguages()}function o(f,h){if(typeof f=="string")n.registerLanguage(f,h);else{let b;for(b in f)Object.hasOwn(f,b)&&n.registerLanguage(b,f[b])}}function u(f,h){if(typeof f=="string")n.registerAliases(typeof h=="string"?h:[...h],{languageName:f});else{let b;for(b in f)if(Object.hasOwn(f,b)){const y=f[b];n.registerAliases(typeof y=="string"?y:[...y],{languageName:b})}}}function d(f){return!!n.getLanguage(f)}}class bj{constructor(n){this.options=n,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(n){if(n==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=n:r.children.push({type:"text",value:n})}startScope(n){this.openNode(String(n))}endScope(){this.closeNode()}__addSublanguage(n,r){const a=this.stack[this.stack.length-1],l=n.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):a.children.push(...l)}openNode(n){const r=this,a=n.split(".").map(function(u,d){return d?u+"_".repeat(d):r.options.classPrefix+u}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const yj={};function xj(e){const n=e||yj,r=n.aliases,a=n.detect||!1,l=n.languages||dj,o=n.plainText,u=n.prefix,d=n.subset;let f="hljs";const h=gj(l);if(r&&h.registerAlias(r),u){const b=u.indexOf("-");f=b===-1?u:u.slice(0,b)}return function(b,y){Du(b,"element",function(x,v,_){if(x.tagName!=="code"||!_||_.type!=="element"||_.tagName!=="pre")return;const k=vj(x);if(k===!1||!k&&!a||k&&o&&o.includes(k))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(f)||x.properties.className.unshift(f);const w=BL(x,{whitespace:"pre"});let C;try{C=k?h.highlight(k,w,{prefix:u}):h.highlightAuto(w,{prefix:u,subset:d})}catch(j){const R=j;if(k&&/Unknown language/.test(R.message)){y.message("Cannot highlight as `"+k+"`, it’s not registered",{ancestors:[_,x],cause:R,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!k&&C.data&&C.data.language&&x.properties.className.push("language-"+C.data.language),C.children.length>0&&(x.children=C.children)})}}function vj(e){const n=e.properties.className;let r=-1;if(!Array.isArray(n))return;let a;for(;++r<n.length;){const l=String(n[r]);if(l==="no-highlight"||l==="nohighlight")return!1;!a&&l.slice(0,5)==="lang-"&&(a=l.slice(5)),!a&&l.slice(0,9)==="language-"&&(a=l.slice(9))}return a}const Ej={h1({node:e,className:n,...r}){return p.jsx("h1",{className:ke("mt-8 mb-4 text-2xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100 first:mt-0",n),...r})},h2({node:e,className:n,...r}){return p.jsx("h2",{className:ke("mt-8 mb-3 text-xl font-semibold tracking-tight text-zinc-900 dark:text-zinc-100",n),...r})},h3({node:e,className:n,...r}){return p.jsx("h3",{className:ke("mt-6 mb-2 text-lg font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},h4({node:e,className:n,...r}){return p.jsx("h4",{className:ke("mt-4 mb-2 text-base font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},p({node:e,className:n,...r}){return p.jsx("p",{className:ke("mb-4 leading-7 text-zinc-700 dark:text-zinc-300 last:mb-0",n),...r})},a({node:e,className:n,...r}){return p.jsx("a",{className:ke("font-medium text-blue-600 underline underline-offset-4 hover:text-blue-500 dark:text-blue-400 dark:hover:text-blue-300",n),target:"_blank",rel:"noopener noreferrer",...r})},ul({node:e,className:n,...r}){return p.jsx("ul",{className:ke("mb-4 ml-6 list-disc space-y-1 text-zinc-700 dark:text-zinc-300",n),...r})},ol({node:e,className:n,...r}){return p.jsx("ol",{className:ke("mb-4 ml-6 list-decimal space-y-1 text-zinc-700 dark:text-zinc-300",n),...r})},li({node:e,className:n,...r}){return p.jsx("li",{className:ke("leading-7",n),...r})},blockquote({node:e,className:n,...r}){return p.jsx("blockquote",{className:ke("mb-4 border-l-4 border-zinc-300 pl-4 italic text-zinc-600 dark:border-zinc-700 dark:text-zinc-400",n),...r})},hr({node:e,...n}){return p.jsx("hr",{className:"my-6 border-zinc-200 dark:border-zinc-800",...n})},strong({node:e,className:n,...r}){return p.jsx("strong",{className:ke("font-semibold text-zinc-900 dark:text-zinc-100",n),...r})},code({node:e,className:n,children:r,...a}){return n?.includes("hljs")?p.jsx("code",{className:ke("text-sm",n),...a,children:r}):p.jsx("code",{className:ke("rounded-md bg-zinc-100 px-1.5 py-0.5 text-sm font-mono text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200",n),...a,children:r})},pre({node:e,className:n,...r}){return p.jsx("pre",{className:ke("mb-4 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-4 text-sm dark:border-zinc-800 dark:bg-zinc-900",n),...r})},table({node:e,className:n,...r}){return p.jsx("div",{className:"mb-4 overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:p.jsx("table",{className:ke("w-full text-sm",n),...r})})},thead({node:e,className:n,...r}){return p.jsx("thead",{className:ke("bg-zinc-50 dark:bg-zinc-900",n),...r})},th({node:e,className:n,...r}){return p.jsx("th",{className:ke("border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",n),...r})},td({node:e,className:n,...r}){return p.jsx("td",{className:ke("border-b border-zinc-200 px-4 py-2 text-zinc-700 dark:border-zinc-800 dark:text-zinc-300",n),...r})},img({node:e,className:n,...r}){return p.jsx("img",{className:ke("mb-4 max-w-full rounded-lg",n),...r})}};function Wr({content:e,className:n}){return p.jsx("div",{className:ke("ocr-markdown",n),children:p.jsx(y4,{remarkPlugins:[AL],rehypePlugins:[xj],components:Ej,children:e})})}const _j={AGREE:{icon:dR,borderColor:"border-l-emerald-500",bgColor:"bg-emerald-500/5",label:"Agree"},CHALLENGE:{icon:XR,borderColor:"border-l-red-500",bgColor:"bg-red-500/5",label:"Challenge"},CONNECT:{icon:yR,borderColor:"border-l-blue-500",bgColor:"bg-blue-500/5",label:"Connect"},SURFACE:{icon:gR,borderColor:"border-l-amber-500",bgColor:"bg-amber-500/5",label:"Surface"}};function kj({type:e,content:n,reviewer:r,className:a}){const l=_j[e],o=l.icon;return p.jsxs("div",{className:ke("rounded-r-lg border-l-4 p-4",l.borderColor,l.bgColor,a),children:[p.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[p.jsx(o,{className:"h-4 w-4 text-zinc-600 dark:text-zinc-400"}),p.jsx("span",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:l.label}),r&&p.jsxs("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:["— ",r]})]}),p.jsx(Wr,{content:n})]})}function wj(e){const n=[],r=/^###?\s+(AGREE|CHALLENGE|CONNECT|SURFACE)(?:\s*[-—]\s*(.+))?$/gm;let a,l=0,o=null;for(;(a=r.exec(e))!==null;)o&&(o.content=e.slice(l,a.index).trim(),n.push(o)),o={type:a[1],reviewer:a[2]?.trim(),content:""},l=a.index+a[0].length;return o&&(o.content=e.slice(l).trim(),n.push(o)),n}const Sj={APPROVE:{icon:xE,bg:"bg-emerald-500/10",border:"border-emerald-500/30",text:"text-emerald-700 dark:text-emerald-400",label:"Approved"},"REQUEST CHANGES":{icon:vE,bg:"bg-red-500/10",border:"border-red-500/30",text:"text-red-700 dark:text-red-400",label:"Changes Requested"},"NEEDS DISCUSSION":{icon:_R,bg:"bg-amber-500/10",border:"border-amber-500/30",text:"text-amber-700 dark:text-amber-400",label:"Needs Discussion"}};function Nj({verdict:e,blockerCount:n,suggestionCount:r,shouldFixCount:a,className:l}){const o=Sj[e],u=o.icon;return p.jsxs("div",{className:ke("flex items-center justify-between rounded-lg border p-4",o.bg,o.border,l),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(u,{className:ke("h-6 w-6",o.text)}),p.jsx("span",{className:ke("text-lg font-semibold",o.text),children:o.label})]}),p.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[n!=null&&p.jsx(wh,{label:"Blockers",value:n,className:n>0?"text-red-600 dark:text-red-400":void 0}),a!=null&&p.jsx(wh,{label:"Should Fix",value:a,className:a>0?"text-amber-600 dark:text-amber-400":void 0}),r!=null&&p.jsx(wh,{label:"Suggestions",value:r})]})]})}function wh({label:e,value:n,className:r}){return p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:ke("font-semibold tabular-nums",r??"text-zinc-700 dark:text-zinc-300"),children:n}),p.jsx("span",{className:"text-zinc-500 dark:text-zinc-400",children:e})]})}function Cj(e,n){const r=Gn(),a=["sessions",e,"runs",n],l=Tn({queryKey:a,queryFn:()=>tn(`/api/sessions/${e}/runs/${n}`),enabled:!!e&&n>0});return Tt("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function Tj(e){return Tn({queryKey:["sessions",e,"artifacts","map"],queryFn:()=>tn(`/api/sessions/${e}/artifacts/map`),enabled:!!e})}function zj(e,n){const r=Gn(),a=["sessions",e,"runs",n];return Tu({mutationFn:async({fileId:l,isReviewed:o})=>tn(`/api/map-files/${l}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({is_reviewed:o})}),onMutate:async({fileId:l,isReviewed:o})=>{await r.cancelQueries({queryKey:a});const u=r.getQueryData(a);return u&&r.setQueryData(a,{...u,sections:u.sections.map(d=>({...d,reviewed_count:d.files.some(f=>f.id===l)?d.reviewed_count+(o?1:-1):d.reviewed_count,files:d.files.map(f=>f.id===l?{...f,is_reviewed:o,reviewed_at:o?new Date().toISOString():null}:f)}))}),{previous:u}},onError:(l,o,u)=>{u?.previous&&r.setQueryData(a,u.previous)},onSettled:()=>{r.invalidateQueries({queryKey:a})}})}function Rj(e,n){const r=Gn();return Tu({mutationFn:async a=>tn(`/api/map-runs/${a}/progress`,{method:"DELETE"}),onSuccess:()=>{r.invalidateQueries({queryKey:["sessions",e,"runs",n]})}})}function Aj({sessionId:e}){const[n,r]=N.useState(!1),{data:a,isLoading:l}=Tj(e),o=N.useRef(null),u=N.useCallback(()=>r(!1),[]);return N.useEffect(()=>{if(!n)return;const d=f=>{f.key==="Escape"&&u()};return document.addEventListener("keydown",d),o.current?.focus(),()=>document.removeEventListener("keydown",d)},[n,u]),p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-xs font-medium text-zinc-600 transition-colors hover:bg-zinc-100 hover:text-zinc-900 dark:border-zinc-700 dark:text-zinc-400 dark:hover:bg-zinc-800 dark:hover:text-zinc-100",children:[p.jsx(Wz,{className:"h-3.5 w-3.5"}),"View Raw Map"]}),n&&p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:u}),p.jsxs("div",{ref:o,role:"dialog","aria-modal":"true","aria-labelledby":"raw-map-title",tabIndex:-1,className:"relative z-10 flex max-h-[85vh] w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-lg dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[p.jsx("h3",{id:"raw-map-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Raw Map Output"}),p.jsx("button",{onClick:u,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close",children:p.jsx(qa,{className:"h-5 w-5"})})]}),p.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:l?p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map content..."}):a?.content?p.jsx(Wr,{content:a.content}):p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No map content available."})})]})]})]})}const Oj="modulepreload",Mj=function(e){return"/"+e},Px={},Dj=function(n,r,a){let l=Promise.resolve();if(r&&r.length>0){let u=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=d?.nonce||d?.getAttribute("nonce");l=u(r.map(h=>{if(h=Mj(h),h in Px)return;Px[h]=!0;const b=h.endsWith(".css"),y=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const x=document.createElement("link");if(x.rel=b?"stylesheet":Oj,b||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),b)return new Promise((v,_)=>{x.addEventListener("load",v),x.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return l.then(u=>{for(const d of u||[])d.status==="rejected"&&o(d.reason);return n().catch(o)})},Lj=N.lazy(()=>Dj(()=>import("./mermaid-renderer-DGUmIWXY.js").then(e=>e.bC),[]));function jj({sessionId:e,runNumber:n,sections:r,onSectionClick:a}){const{resolved:l}=Tv(),{data:o,isLoading:u}=Tn({queryKey:["sessions",e,"runs",n,"graph"],queryFn:async()=>{try{return await tn(`/api/sessions/${e}/runs/${n}/graph`)}catch(h){if(h instanceof Error&&h.message.startsWith("404:"))return null;throw h}},enabled:!!e&&n>0,retry:!1}),d=N.useMemo(()=>o?.dependencies?Ij(o.dependencies,r,l):null,[o?.dependencies,r,l]),f=N.useCallback(h=>{const b=r.find(y=>Jl(y.title)===h);b&&a&&a(b.id)},[r,a]);return u||!d?null:p.jsxs("div",{className:"overflow-hidden rounded-lg border border-zinc-200 dark:border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-2 border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx(Ps,{className:"h-4 w-4 text-zinc-500 dark:text-zinc-400"}),p.jsx("span",{className:"text-sm font-medium",children:"Section Dependencies"})]}),p.jsx("div",{className:"p-4",children:p.jsx(N.Suspense,{fallback:p.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-zinc-100 dark:bg-zinc-800"}),children:p.jsx(Lj,{definition:d,onNodeClick:f})})})]})}function Ij(e,n,r){if(n.length===0)return null;const a=r==="dark",l=["graph TD"];for(const o of n){const u=Jl(o.title),d=o.reviewed_count,f=o.file_count,h=`${o.title}<br/>${d}/${f} files`;l.push(` ${u}["${h}"]`)}for(const o of e){const u=Jl(o.fromTitle),d=Jl(o.toTitle),f=o.relationship.replace(/"/g,"'");l.push(` ${u} -->|"${f}"| ${d}`)}a?(l.push(""),l.push(" classDef notStarted fill:#27272a,stroke:#71717a,color:#d4d4d8"),l.push(" classDef inProgress fill:#422006,stroke:#f59e0b,color:#fef3c7"),l.push(" classDef complete fill:#052e16,stroke:#22c55e,color:#dcfce7")):(l.push(""),l.push(" classDef notStarted fill:#f4f4f5,stroke:#a1a1aa,color:#3f3f46"),l.push(" classDef inProgress fill:#fef9c3,stroke:#f59e0b,color:#78350f"),l.push(" classDef complete fill:#dcfce7,stroke:#22c55e,color:#166534"));for(const o of n){const u=Jl(o.title),d=o.file_count>0?o.reviewed_count/o.file_count:0;d>=1?l.push(` class ${u} complete`):d>0?l.push(` class ${u} inProgress`):l.push(` class ${u} notStarted`)}return l.join(`
447
- `)}function Jl(e){return e.replace(/[^a-zA-Z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}function Bj(e,n,r){const{socket:a}=Fa(),l=`chat-${e}-${n}-${r}`,[o,u]=N.useState([]),[d,f]=N.useState(!1),[h,b]=N.useState(""),[y,x]=N.useState(null),[v,_]=N.useState([]),[k,w]=N.useState(null),C=N.useRef("");N.useEffect(()=>{a&&a.emit("chat:history",{conversationId:l})},[a,l]),Tt("chat:history:result",N.useCallback(R=>{R.conversationId===l&&u(R.messages)},[l])),Tt("chat:token",N.useCallback(R=>{R.conversationId===l&&(C.current+=R.token,b(C.current))},[l])),Tt("chat:status",N.useCallback(R=>{if(R.conversationId!==l)return;const H={tool:R.tool,detail:R.detail,timestamp:Date.now()};x(H),_($=>[...$,H])},[l])),Tt("chat:done",N.useCallback(R=>{if(R.conversationId!==l)return;const H={id:Date.now(),conversation_id:l,role:"assistant",content:C.current,created_at:new Date().toISOString()};u($=>[...$,H]),f(!1),b(""),x(null),_([]),C.current=""},[l])),Tt("chat:error",N.useCallback(R=>{R.conversationId===l&&(w(R.error),f(!1),b(""),x(null),_([]),C.current="")},[l]));const j=N.useCallback(R=>{if(!a||!R.trim()||d)return;const H={id:Date.now(),conversation_id:l,role:"user",content:R.trim(),created_at:new Date().toISOString()};u($=>[...$,H]),f(!0),w(null),x(null),_([]),C.current="",a.emit("chat:send",{conversationId:l,sessionId:e,targetType:n,targetId:r,message:R.trim()})},[a,l,e,n,r,d]);return{messages:o,sendMessage:j,isStreaming:d,streamingContent:h,toolStatus:y,toolHistory:v,error:k}}const Hx=3;function qx({currentStatus:e,history:n}){const[r,a]=N.useState(!1),l=e?n.filter(f=>f.timestamp!==e.timestamp):n,o=l.length>Hx,u=r?l:l.slice(-Hx),d=l.length-u.length;return!e&&l.length===0?null:p.jsxs("div",{className:"space-y-1",children:[l.length>0&&p.jsxs("div",{className:"space-y-0.5",children:[o&&d>0&&p.jsxs("button",{type:"button",onClick:()=>a(f=>!f),className:"flex items-center gap-1 text-[11px] text-zinc-400 transition-colors hover:text-zinc-600 dark:text-zinc-500 dark:hover:text-zinc-400",children:[r?p.jsx(zu,{className:"h-3 w-3"}):p.jsx(xo,{className:"h-3 w-3"}),r?"Collapse":`${d} more step${d!==1?"s":""}`]}),u.map((f,h)=>p.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-zinc-400 dark:text-zinc-500",children:[p.jsx(Is,{className:"h-3 w-3 flex-shrink-0 text-emerald-500"}),p.jsx("span",{className:"truncate",children:f.detail})]},f.timestamp+h))]}),e&&p.jsxs("div",{className:ke("flex items-center gap-1.5 text-[11px] font-medium","text-indigo-600 dark:text-indigo-400"),children:[p.jsxs("span",{className:"relative flex h-2 w-2 flex-shrink-0",children:[p.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-indigo-400 opacity-75"}),p.jsx("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-indigo-500"})]}),p.jsx("span",{className:"truncate",children:e.detail})]})]})}function Uj({message:e}){const n=e.role==="user",r=Ha(e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return p.jsxs("div",{className:ke("flex flex-col",n?"items-end":"items-start"),children:[p.jsx("div",{className:ke("max-w-[85%] rounded-lg px-3 py-2 text-sm",n?"bg-indigo-600 text-white":"bg-zinc-100 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100"),children:n?p.jsx("p",{className:"whitespace-pre-wrap",children:e.content}):p.jsx(Wr,{content:e.content})}),p.jsx("span",{className:"mt-1 text-[10px] text-zinc-400 dark:text-zinc-500",children:r})]})}const $x=["Reading the code review artifacts...","Analyzing the changeset structure...","Examining file relationships...","Reviewing the findings...","Connecting the patterns...","Preparing a thoughtful response..."];function Fj({content:e,toolStatus:n,toolHistory:r}){const[a,l]=N.useState(0),o=n!==null||r.length>0;return N.useEffect(()=>{if(e||o)return;const u=setInterval(()=>{l(d=>(d+1)%$x.length)},2500);return()=>clearInterval(u)},[e,o]),p.jsx("div",{className:"flex flex-col items-start",children:p.jsxs("div",{className:"max-w-[85%] rounded-lg bg-zinc-100 px-3 py-2 text-sm text-zinc-900 dark:bg-zinc-800 dark:text-zinc-100",children:[e?p.jsxs(p.Fragment,{children:[p.jsx(Wr,{content:e}),p.jsx("span",{className:"ml-0.5 inline-block h-4 w-0.5 animate-pulse bg-zinc-400 dark:bg-zinc-500"})]}):o?p.jsx(qx,{currentStatus:n,history:r}):p.jsx(Pj,{phrase:$x[a]}),e&&o&&p.jsx("div",{className:"mt-2 border-t border-zinc-200 pt-2 dark:border-zinc-700",children:p.jsx(qx,{currentStatus:n,history:r})})]})})}function Pj({phrase:e}){return p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex gap-1",children:[p.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:0ms]"}),p.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:150ms]"}),p.jsx("span",{className:"h-1.5 w-1.5 animate-bounce rounded-full bg-indigo-400 [animation-delay:300ms]"})]}),p.jsx("span",{className:"animate-pulse text-xs text-zinc-400 dark:text-zinc-500",children:e})]})}const Hj={map_run:"Ask about this map...",review_round:"Ask about this review..."};function qj({onSend:e,isStreaming:n,disabled:r,targetType:a}){const[l,o]=N.useState(""),u=N.useRef(null),d=N.useCallback(()=>{const b=u.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,80)}px`)},[]),f=N.useCallback(()=>{!l.trim()||n||r||(e(l),o(""),u.current&&(u.current.style.height="auto"))},[l,n,e]),h=N.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),f())},[f]);return p.jsxs("div",{className:"flex items-end gap-2 border-t border-zinc-200 bg-white p-3 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("textarea",{ref:u,value:l,onChange:b=>{o(b.target.value),d()},onKeyDown:h,placeholder:Hj[a],rows:1,className:ke("flex-1 resize-none rounded-md border border-zinc-300 bg-white px-3 py-2 text-sm","placeholder:text-zinc-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500")}),p.jsx("button",{type:"button",onClick:f,disabled:n||!l.trim(),className:ke("flex-shrink-0 rounded-md p-2 transition-colors","bg-indigo-600 text-white hover:bg-indigo-700","disabled:cursor-not-allowed disabled:opacity-50"),children:p.jsx(UR,{className:"h-4 w-4"})})]})}function t1({sessionId:e,targetType:n,targetId:r,onClose:a}){const{isAvailable:l,isDisabledByConfig:o}=TE(),{messages:u,sendMessage:d,isStreaming:f,streamingContent:h,toolStatus:b,toolHistory:y,error:x}=Bj(e,n,r),v=N.useRef(null);return N.useEffect(()=>{function _(k){k.key==="Escape"&&a()}return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[a]),N.useEffect(()=>{const _=v.current;_&&(_.scrollTop=_.scrollHeight)},[u,h,b]),p.jsxs("div",{className:ke("fixed right-0 top-0 z-50 flex h-full w-[400px] flex-col","border-l border-zinc-200 bg-white shadow-xl","dark:border-zinc-800 dark:bg-zinc-950"),children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3 dark:border-zinc-800",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(hu,{className:"h-4 w-4 text-indigo-500"}),p.jsx("h2",{className:"text-sm font-semibold text-zinc-900 dark:text-zinc-100",children:"Ask the Team"})]}),p.jsx("button",{type:"button",onClick:a,className:"rounded-md p-1 text-zinc-400 transition-colors hover:bg-zinc-100 hover:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300",children:p.jsx(qa,{className:"h-4 w-4"})})]}),p.jsxs("div",{ref:v,className:"flex-1 space-y-4 overflow-y-auto p-4",children:[!l&&u.length===0&&p.jsxs("div",{className:"flex items-start gap-2.5 rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:[p.jsx(zm,{className:"mt-0.5 h-4 w-4 shrink-0 text-zinc-400"}),p.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:o?p.jsxs(p.Fragment,{children:["AI commands are turned off in your project config. Set ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"ai_cli"})," to ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"auto"}),", ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"claude"}),", or ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:"opencode"})," in ",p.jsx("code",{className:"rounded bg-zinc-200 px-1 py-0.5 text-[10px] dark:bg-zinc-800",children:".ocr/config.yaml"})," to enable Ask the Team."]}):"Install Claude Code or OpenCode to use Ask the Team."})]}),l&&u.length===0&&!f&&p.jsxs("p",{className:"text-center text-sm text-zinc-400 dark:text-zinc-500",children:["Ask a question about this ",n==="map_run"?"map":"review"," to get started."]}),u.map(_=>p.jsx(Uj,{message:_},_.id)),f&&p.jsx(Fj,{content:h,toolStatus:b,toolHistory:y}),x&&p.jsx("div",{className:"rounded-md bg-red-50 px-3 py-2 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400",children:x})]}),p.jsx(qj,{onSend:d,isStreaming:f,disabled:!l,targetType:n})]})}function $j(){const{id:e,run:n}=wu(),r=parseInt(n??"0",10),{data:a,isLoading:l}=Cj(e??"",r),o=zj(e??"",r),u=Rj(e??"",r),[d,f]=N.useState(!1),h=N.useCallback(x=>{document.getElementById(`section-${x}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[]);if(l)return p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading map run..."});if(!a)return p.jsxs("div",{children:[p.jsxs(Dn,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to session"]}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Map run not found."})]});const b=a.sections.reduce((x,v)=>x+v.file_count,0),y=a.sections.reduce((x,v)=>x+v.reviewed_count,0);return p.jsxs("div",{className:"space-y-6",children:[p.jsxs(Dn,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to session"]}),p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(ua,{className:"h-5 w-5 text-zinc-400"}),p.jsxs("h1",{className:"text-xl font-semibold text-zinc-900 dark:text-zinc-100",children:["Map Run ",a.run_number]})]}),p.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[y," / ",b," files reviewed"]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("button",{type:"button",onClick:()=>f(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[p.jsx(hu,{className:"h-3.5 w-3.5"}),"Ask the Team"]}),p.jsx(Aj,{sessionId:e??""}),p.jsx(l2,{onConfirm:()=>u.mutate(a.id),isPending:u.isPending})]})]}),p.jsx("div",{className:"mt-4",children:p.jsx(zE,{value:y,max:b,showLabel:!0})})]}),p.jsx(jj,{sessionId:e??"",runNumber:r,sections:a.sections,onSectionClick:h}),a.sections.length===0?p.jsx("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"No sections found in this map run."})}):p.jsx("div",{className:"space-y-3",children:a.sections.map(x=>p.jsx("div",{id:`section-${x.id}`,children:p.jsx(s2,{section:x,onToggleFile:(v,_)=>o.mutate({fileId:v,isReviewed:_})})},x.id))}),d&&p.jsx(t1,{sessionId:e??"",targetType:"map_run",targetId:a.run_number,onClose:()=>f(!1)})]})}function Gj(){const e=Gn();return Tt("artifact:created",()=>{e.invalidateQueries({queryKey:["reviews"]})}),Tt("artifact:updated",()=>{e.invalidateQueries({queryKey:["reviews"]})}),Tn({queryKey:["reviews"],queryFn:()=>tn("/api/reviews")})}function Kj(e,n){const r=Gn(),a=["sessions",e,"rounds",n],l=Tn({queryKey:a,queryFn:()=>tn(`/api/sessions/${e}/rounds/${n}`),enabled:!!e&&n>0});return Tt("artifact:created",()=>{r.invalidateQueries({queryKey:a})}),Tt("artifact:updated",()=>{r.invalidateQueries({queryKey:a})}),l}function Vj(e,n){return Tn({queryKey:["sessions",e,"rounds",n,"findings"],queryFn:()=>tn(`/api/sessions/${e}/rounds/${n}/findings`),enabled:!!e&&n>0})}function Yj(e,n,r){return Tn({queryKey:["sessions",e,"rounds",n,"reviewers",r],queryFn:()=>tn(`/api/sessions/${e}/rounds/${n}/reviewers/${r}`),enabled:!!e&&n>0&&r>0})}function Sh(e,n){return Tn({queryKey:["sessions",e,"artifacts",n],queryFn:()=>tn(`/api/sessions/${e}/artifacts/${n}`),enabled:!!e&&!!n,retry:!1})}function Qj(){const e=Gn();return Tu({mutationFn:({findingId:n,status:r})=>tn(`/api/findings/${n}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function n1(){const e=Gn();return Tu({mutationFn:({roundId:n,status:r})=>tn(`/api/rounds/${n}/progress`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),onSuccess:()=>{e.invalidateQueries({queryKey:["reviews"]}),e.invalidateQueries({queryKey:["sessions"]})}})}const r1={principal:Tm,quality:co,security:qR,testing:JR},Xj={principal:"text-violet-600 dark:text-violet-400 bg-violet-500/10 border-violet-500/25",quality:"text-blue-600 dark:text-blue-400 bg-blue-500/10 border-blue-500/25",security:"text-amber-600 dark:text-amber-400 bg-amber-500/10 border-amber-500/25",testing:"text-emerald-600 dark:text-emerald-400 bg-emerald-500/10 border-emerald-500/25"};function Zj({sessionId:e,roundNumber:n,reviewer:r}){const a=r1[r.reviewer_type]??co,l=Xj[r.reviewer_type]??"text-zinc-600 dark:text-zinc-400 bg-zinc-500/10 border-zinc-500/25";return p.jsx(Dn,{to:`/sessions/${e}/reviews/${n}/reviewers/${r.id}`,className:"group block rounded-lg border border-zinc-200 bg-white p-4 transition-colors hover:border-zinc-300 hover:bg-zinc-50 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700 dark:hover:bg-zinc-800/50",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg border ${l}`,children:p.jsx(a,{className:"h-5 w-5"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"text-sm font-medium capitalize text-zinc-900 dark:text-zinc-100",children:[r.reviewer_type,r.instance_number>1&&p.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",r.instance_number]})]}),p.jsxs("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:[r.finding_count," finding",r.finding_count!==1?"s":""]})]})]})})}const Wj=[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function Jj({finding:e,onTriageChange:n}){const[r,a]=N.useState(!1),{data:l}=Hs(),o=N.useCallback(()=>a(f=>!f),[]),u=N.useCallback(f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o())},[o]),d=e.line_start!=null?e.line_end!=null&&e.line_end!==e.line_start?`${e.line_start}-${e.line_end}`:String(e.line_start):"-";return p.jsxs(p.Fragment,{children:[p.jsxs("tr",{tabIndex:0,role:"row","aria-expanded":r,className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:o,onKeyDown:u,children:[p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(xo,{className:ke("h-3.5 w-3.5 shrink-0 text-zinc-400 transition-transform",r&&"rotate-90")}),p.jsx(qs,{variant:e.severity})]})}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:e.title}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 font-mono text-xs text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l?p.jsxs("a",{href:fu(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:f=>f.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",title:`Open in ${l.ide}`,children:[e.file_path,p.jsx(Nm,{className:"ml-1 inline h-3 w-3"})]}):e.file_path??"-"}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 tabular-nums text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:e.file_path&&l&&e.line_start!=null?p.jsx("a",{href:fu(l.ide,l.projectRoot,e.file_path,e.line_start),onClick:f=>f.stopPropagation(),className:"hover:text-zinc-900 hover:underline dark:hover:text-zinc-200",children:d}):d}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:e.is_blocker?p.jsx("span",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Yes"}):p.jsx("span",{className:"text-xs text-zinc-400",children:"No"})}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:f=>f.stopPropagation(),children:p.jsx("select",{value:e.progress?.status??"unread",onChange:f=>n(e.id,f.target.value),"aria-label":`Triage status for ${e.title}`,className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:Wj.map(f=>p.jsx("option",{value:f.value,children:f.label},f.value))})})]}),r&&e.summary&&p.jsx("tr",{children:p.jsx("td",{colSpan:6,className:"border-b border-zinc-200 bg-zinc-50 px-4 py-3 dark:border-zinc-800 dark:bg-zinc-900/50",children:p.jsx(Wr,{content:e.summary,className:"text-sm"})})})]})}function aa({label:e,field:n,activeField:r,direction:a,onSort:l}){return p.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left dark:border-zinc-800",children:p.jsxs("button",{onClick:()=>l(n),className:ke("flex items-center gap-1 text-sm font-medium transition-colors",r===n?"text-zinc-900 dark:text-zinc-100":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:[e,p.jsx(yE,{className:ke("h-3 w-3",r===n?"opacity-100":"opacity-40",r===n&&a==="desc"&&"rotate-180")})]})})}const Gx={critical:0,high:1,medium:2,low:3,info:4},eI=[{value:"all",label:"All"},{value:"critical",label:"Critical"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"},{value:"info",label:"Info"}],tI=[{value:"all",label:"All"},{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"acknowledged",label:"Acknowledged"},{value:"fixed",label:"Fixed"},{value:"wont_fix",label:"Won't Fix"}];function i1({findings:e}){const[n,r]=N.useState("severity"),[a,l]=N.useState("asc"),[o,u]=N.useState("all"),[d,f]=N.useState("all"),h=Qj();function b(_){n===_?l(k=>k==="asc"?"desc":"asc"):(r(_),l("asc"))}const y=N.useMemo(()=>{let _=e;return o!=="all"&&(_=_.filter(k=>k.severity===o)),d!=="all"&&(_=_.filter(k=>(k.progress?.status??"unread")===d)),_},[e,o,d]),x=N.useMemo(()=>{const _=a==="asc"?1:-1;return[...y].sort((k,w)=>n==="severity"?(Gx[k.severity]-Gx[w.severity])*_:n==="title"?k.title.localeCompare(w.title)*_:n==="file_path"?(k.file_path??"").localeCompare(w.file_path??"")*_:0)},[y,n,a]);function v(_,k){h.mutate({findingId:_,status:k})}return p.jsxs("div",{children:[p.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[p.jsx(kE,{className:"h-4 w-4 text-zinc-400"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Severity:"}),p.jsx("select",{value:o,onChange:_=>u(_.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:eI.map(_=>p.jsx("option",{value:_.value,children:_.label},_.value))})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),p.jsx("select",{value:d,onChange:_=>f(_.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:tI.map(_=>p.jsx("option",{value:_.value,children:_.label},_.value))})]}),p.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[x.length," of ",e.length," findings"]})]}),x.length===0?p.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No findings match your filters."}):p.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:p.jsxs("tr",{children:[p.jsx(aa,{label:"Severity",field:"severity",activeField:n,direction:a,onSort:b}),p.jsx(aa,{label:"Title",field:"title",activeField:n,direction:a,onSort:b}),p.jsx(aa,{label:"File",field:"file_path",activeField:n,direction:a,onSort:b}),p.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Lines"}),p.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Blocker"}),p.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Status"})]})}),p.jsx("tbody",{children:x.map(_=>p.jsx(Jj,{finding:_,onTriageChange:v},_.id))})]})})]})}function nI(){const{socket:e}=Fa(),[n,r]=N.useState("idle"),[a,l]=N.useState(null),[o,u]=N.useState(""),[d,f]=N.useState(""),[h,b]=N.useState(null),[y,x]=N.useState([]),[v,_]=N.useState(null),[k,w]=N.useState(null),C=N.useRef(""),[j,R]=N.useState(0),H=N.useRef(null);N.useEffect(()=>(n==="generating"?(R(0),H.current=setInterval(()=>R(J=>J+1),1e3)):H.current&&(clearInterval(H.current),H.current=null),()=>{H.current&&clearInterval(H.current)}),[n]),Tt("post:gh-result",N.useCallback(J=>{l(J),J.authenticated&&J.prNumber?r("ready"):(w(J.error??"GitHub check failed"),r("error"))},[])),Tt("post:token",N.useCallback(J=>{C.current+=J.token,u(C.current)},[])),Tt("post:clear-stream",N.useCallback(()=>{C.current="",u("")},[])),Tt("post:status",N.useCallback(J=>{const ee={tool:J.tool,detail:J.detail,timestamp:Date.now()};b(ee),x(ve=>[...ve,ee])},[])),Tt("post:done",N.useCallback(J=>{f(J.content),u(""),b(null),C.current="",r("preview")},[])),Tt("post:cancelled",N.useCallback(()=>{u(""),b(null),C.current="",r("ready")},[])),Tt("post:error",N.useCallback(J=>{w(J.error),u(""),b(null),C.current="",r("error")},[])),Tt("post:save-result",N.useCallback(J=>{J.success||w(J.error??"Failed to save draft")},[])),Tt("post:submit-result",N.useCallback(J=>{_(J),J.success?r("posted"):(w(J.error??"Failed to post to GitHub"),r("error"))},[]));const $=N.useCallback(J=>{e&&(r("checking"),w(null),l(null),e.emit("post:check-gh",{sessionId:J}))},[e]),O=N.useCallback((J,ee)=>{e&&(r("generating"),w(null),u(""),f(""),b(null),x([]),C.current="",e.emit("post:generate",{sessionId:J,roundNumber:ee}))},[e]),Z=N.useCallback((J,ee)=>{e&&e.emit("post:cancel",{sessionId:J,roundNumber:ee})},[e]),A=N.useCallback((J,ee,ve)=>{e&&e.emit("post:save",{sessionId:J,roundNumber:ee,content:ve})},[e]),ae=N.useCallback((J,ee)=>{e&&(r("posting"),w(null),e.emit("post:submit",{prNumber:J,content:ee}))},[e]),P=N.useCallback(()=>{r("idle"),l(null),u(""),f(""),b(null),x([]),_(null),w(null),C.current=""},[]);return{step:n,checkResult:a,streamingContent:o,generatedContent:d,toolStatus:h,activityLog:y,elapsedSeconds:j,postResult:v,error:k,checkGitHub:$,generate:O,cancelGeneration:Z,saveDraft:A,submitToGitHub:ae,reset:P,setStep:r}}function rI(e){const n=Math.floor(e/60),r=e%60;return`${n}:${String(r).padStart(2,"0")}`}function iI(e,n,r){return r==="Write"?"Rewriting as your voice":n?"Writing review":e?"Analyzing source material":"Starting up"}function aI({tool:e}){switch(e){case"Read":return p.jsx(Dz,{className:"h-3 w-3 shrink-0"});case"Glob":case"Grep":return p.jsx(NE,{className:"h-3 w-3 shrink-0"});case"thinking":return p.jsx(jz,{className:"h-3 w-3 shrink-0"});default:return p.jsx(aA,{className:"h-3 w-3 shrink-0"})}}function sI({sessionId:e,roundNumber:n,finalContent:r,savedHumanReview:a}){const[l,o]=N.useState(!1),[u,d]=N.useState(!1),[f,h]=N.useState(""),b=N.useRef(null),y=N.useRef(null),{step:x,checkResult:v,streamingContent:_,generatedContent:k,toolStatus:w,activityLog:C,elapsedSeconds:j,postResult:R,error:H,checkGitHub:$,generate:O,cancelGeneration:Z,saveDraft:A,submitToGitHub:ae,reset:P,setStep:J}=nI(),[ee,ve]=N.useState(!0),le=N.useRef(!1),[X,B]=N.useState(!1),te=N.useCallback(()=>{o(!1),d(!1),h(""),P()},[P]),oe=N.useCallback(()=>{o(!0),$(e)},[e,$]);N.useEffect(()=>{if(!l)return;const M=G=>{G.key==="Escape"&&x!=="generating"&&te()};return document.addEventListener("keydown",M),b.current?.focus(),()=>document.removeEventListener("keydown",M)},[l,te,x]),N.useEffect(()=>{x==="generating"&&_&&!le.current&&(le.current=!0,ve(!1))},[x,_]),N.useEffect(()=>{x==="generating"&&(le.current=!1,ve(!0))},[x]),N.useEffect(()=>{x==="generating"&&y.current?.scrollIntoView({behavior:"smooth"})},[_,x]);const fe=()=>u&&f?f:k||a||r,T=v?.prNumber??0;return p.jsxs(p.Fragment,{children:[p.jsxs("button",{type:"button",onClick:oe,className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[p.jsx(Iy,{className:"h-3.5 w-3.5"}),"Post to GitHub"]}),l&&p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:x!=="generating"?te:void 0}),p.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-labelledby":"post-review-title",tabIndex:-1,className:"relative z-10 flex w-full max-w-4xl flex-col rounded-lg border border-zinc-200 bg-white shadow-xl dark:border-zinc-800 dark:bg-zinc-900",style:{maxHeight:"85vh"},children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[p.jsx("h3",{id:"post-review-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:x==="posted"?"Review Posted":"Post Review to GitHub"}),p.jsx("button",{onClick:te,className:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:p.jsx(qa,{className:"h-5 w-5"})})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:[x==="checking"&&p.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[p.jsx(Ls,{className:"h-5 w-5 animate-spin text-zinc-500"}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Checking GitHub CLI..."})]}),x==="ready"&&v&&p.jsxs("div",{className:"space-y-4",children:[p.jsx("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800",children:p.jsxs("p",{className:"text-sm text-zinc-700 dark:text-zinc-300",children:[p.jsx(wE,{className:"mr-1.5 inline h-4 w-4"}),"PR #",v.prNumber," on branch"," ",p.jsx("code",{className:"rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700",children:v.branch})]})}),p.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[p.jsxs("button",{onClick:()=>ae(T,r),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-blue-300 hover:bg-blue-50/50 dark:border-zinc-700 dark:hover:border-blue-700 dark:hover:bg-blue-950/20",children:[p.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[p.jsx(Cm,{className:"h-5 w-5 text-zinc-500 group-hover:text-blue-600 dark:group-hover:text-blue-400"}),p.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Post Team Review"})]}),p.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Post the original multi-reviewer synthesis as-is."})]}),p.jsxs("button",{onClick:()=>O(e,n),className:"group rounded-lg border border-zinc-200 p-4 text-left transition-colors hover:border-emerald-300 hover:bg-emerald-50/50 dark:border-zinc-700 dark:hover:border-emerald-700 dark:hover:bg-emerald-950/20",children:[p.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[p.jsx(co,{className:"h-5 w-5 text-zinc-500 group-hover:text-emerald-600 dark:group-hover:text-emerald-400"}),p.jsx("span",{className:"font-medium text-zinc-900 dark:text-zinc-100",children:"Generate Human Review"})]}),p.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Rewrite as a single human voice — sounds like you wrote it."})]})]}),a&&p.jsxs("button",{onClick:()=>{h(a),J("preview")},className:"w-full rounded-lg border border-dashed border-zinc-300 p-3 text-left text-sm text-zinc-600 transition-colors hover:border-zinc-400 hover:text-zinc-800 dark:border-zinc-600 dark:text-zinc-400 dark:hover:border-zinc-500 dark:hover:text-zinc-300",children:[p.jsx(jy,{className:"mr-1.5 inline h-3.5 w-3.5"}),"Use previously saved human review"]})]}),x==="generating"&&p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-2.5",children:[p.jsxs("div",{className:"relative flex h-8 w-8 items-center justify-center",children:[p.jsx("div",{className:"absolute inset-0 animate-ping rounded-full bg-emerald-400/20"}),p.jsx(co,{className:"h-4 w-4 text-emerald-500 dark:text-emerald-400"})]}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:iI(C.length>0,!!_,w?.tool)}),p.jsx("p",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"All findings preserved — just the tone changes"})]})]}),p.jsx("span",{className:"tabular-nums text-xs font-medium text-zinc-400 dark:text-zinc-500",children:rI(j)})]}),p.jsxs("div",{className:"rounded-md border border-zinc-200 bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800",children:[p.jsxs("button",{type:"button",onClick:()=>ve(M=>!M),className:"flex w-full items-center gap-2 px-3 py-2 text-xs text-zinc-600 dark:text-zinc-400",children:[p.jsx(Ls,{className:"h-3 w-3 animate-spin shrink-0 text-emerald-500"}),p.jsx("span",{className:"flex-1 truncate text-left font-medium",children:w?.detail??"Reading review files..."}),C.length>0&&p.jsxs("span",{className:"flex items-center gap-1 text-zinc-400 dark:text-zinc-500",children:[p.jsx("span",{className:"tabular-nums",children:C.length}),ee?p.jsx(zu,{className:"h-3 w-3"}):p.jsx(xo,{className:"h-3 w-3"})]})]}),ee&&C.length>0&&p.jsx("div",{className:"border-t border-zinc-200 px-3 py-2 dark:border-zinc-700",children:p.jsx("div",{className:"max-h-32 space-y-1 overflow-y-auto",children:C.map((M,G)=>p.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-zinc-500 dark:text-zinc-500",children:[p.jsx(aI,{tool:M.tool}),p.jsx("span",{className:"truncate",children:M.detail})]},G))})})]}),_&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500 dark:text-zinc-400",children:[p.jsx(Ly,{className:"h-3 w-3"}),p.jsx("span",{className:"font-medium",children:"Generated Review"})]}),p.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:p.jsx(Wr,{content:_})})]}),p.jsx("div",{ref:y})]}),x==="preview"&&p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center gap-1 border-b border-zinc-200 dark:border-zinc-700",children:[p.jsxs("button",{onClick:()=>d(!1),className:ke("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",u?"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300":"border-blue-500 text-blue-600 dark:text-blue-400"),children:[p.jsx(Xz,{className:"h-3.5 w-3.5"}),"Preview"]}),p.jsxs("button",{onClick:()=>{d(!0),f||h(k||a||r)},className:ke("inline-flex items-center gap-1.5 border-b-2 px-3 py-2 text-xs font-medium transition-colors",u?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300"),children:[p.jsx(Ly,{className:"h-3.5 w-3.5"}),"Edit"]})]}),u?p.jsx("textarea",{value:f||k||a||r,onChange:M=>h(M.target.value),className:"h-96 w-full rounded-md border border-zinc-200 bg-zinc-50 p-3 font-mono text-sm text-zinc-900 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-100"}):p.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:p.jsx(Wr,{content:fe()})})]}),x==="posting"&&p.jsxs("div",{className:"flex items-center justify-center gap-3 py-12",children:[p.jsx(Ls,{className:"h-5 w-5 animate-spin text-zinc-500"}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Posting to GitHub..."})]}),x==="posted"&&p.jsxs("div",{className:"flex flex-col items-center gap-3 py-12",children:[p.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-emerald-100 dark:bg-emerald-900/30",children:p.jsx(Is,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"})}),p.jsx("p",{className:"text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Review posted to GitHub"}),R?.commentUrl&&p.jsxs("a",{href:R.commentUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-blue-600 hover:underline dark:text-blue-400",children:["View comment",p.jsx(Nm,{className:"h-3.5 w-3.5"})]})]}),x==="error"&&p.jsx("div",{className:"space-y-4 py-4",children:p.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-red-200 bg-red-50 p-4 dark:border-red-800 dark:bg-red-950/30",children:[p.jsx(Pz,{className:"mt-0.5 h-5 w-5 shrink-0 text-red-600 dark:text-red-400"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:H})]})})]}),p.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-zinc-200 px-6 py-4 dark:border-zinc-800",children:[x==="generating"&&p.jsx("button",{onClick:()=>Z(e,n),className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),x==="preview"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>O(e,n),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[p.jsx(mu,{className:"h-3.5 w-3.5"}),"Regenerate"]}),p.jsxs("button",{onClick:()=>{A(e,n,fe()),B(!0),setTimeout(()=>B(!1),2e3)},className:ke("inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm font-medium transition-colors",X?"border-emerald-300 text-emerald-700 dark:border-emerald-700 dark:text-emerald-400":"border-zinc-200 text-zinc-700 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800"),children:[X?p.jsx(Is,{className:"h-3.5 w-3.5"}):p.jsx(jy,{className:"h-3.5 w-3.5"}),X?"Saved!":"Save Draft"]}),p.jsxs("button",{onClick:()=>{const M=fe();A(e,n,M),ae(T,M)},className:"inline-flex items-center gap-1.5 rounded-md bg-blue-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-blue-700",children:[p.jsx(Iy,{className:"h-3.5 w-3.5"}),"Post to GitHub"]})]}),x==="error"&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>$(e),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:[p.jsx(mu,{className:"h-3.5 w-3.5"}),"Retry"]}),p.jsx("button",{onClick:te,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Close"})]}),x==="posted"&&p.jsx("button",{onClick:te,className:"rounded-md bg-zinc-900 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-zinc-800 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200",children:"Done"})]})]})]})]})}function lI(e,n){return`.ocr/sessions/${e}/rounds/round-${n}/final.md`}const Kx=e=>`Review the feedback in \`${e}\` and address it following these steps:
448
-
449
- 1. Read the review in its entirety and parse all feedback into discrete items
450
- 2. For each item, read the actual code at the referenced location to corroborate
451
- 3. Classify each as: Valid (will address) | Valid (alternative approach) | Invalid (decline with evidence) | Needs Clarification
452
- 4. Present a numbered summary of all items with classification before implementing
453
- 5. For valid items, implement changes — use sub-agents in parallel where items are independent
454
- 6. Report: total items, items addressed, items declined with reasoning
455
-
456
- GUARDRAILS: Do NOT blindly accept every piece of feedback. Corroborate against actual code first. If feedback is incorrect, decline with evidence. If the suggested fix is suboptimal, propose a better alternative.`;function oI({sessionId:e,roundNumber:n}){const[r,a]=N.useState(!1),l=N.useRef(null),{data:o}=Hs(),u=!!o?.aiCli?.active,d=N.useCallback(()=>a(!1),[]);N.useEffect(()=>{if(!r)return;const h=b=>{b.key==="Escape"&&d()};return document.addEventListener("keydown",h),l.current?.focus(),()=>document.removeEventListener("keydown",h)},[r,d]);const f=lI(e,n);return p.jsxs(p.Fragment,{children:[p.jsxs("button",{type:"button",onClick:()=>a(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[p.jsx(oo,{className:"h-3.5 w-3.5"}),"Address Feedback"]}),r&&p.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[p.jsx("div",{className:"fixed inset-0 bg-black/50",onClick:d}),p.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"address-feedback-title",tabIndex:-1,className:"relative z-10 mx-4 w-full max-w-md rounded-lg border border-zinc-200 bg-white shadow-lg sm:max-w-lg dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("button",{onClick:d,className:"absolute right-4 top-4 text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300","aria-label":"Close dialog",children:p.jsx(qa,{className:"h-4 w-4"})}),u?p.jsx(cI,{finalPath:f,onClose:d}):p.jsx(uI,{finalPath:f,onClose:d})]})]})]})}function cI({finalPath:e,onClose:n}){const[r,a]=N.useState(""),[l,o]=N.useState(!1),[u,d]=N.useState(!1),{socket:f}=Fa(),{isRunning:h}=Sm(),b=om();function y(){const k=["ocr address",e];return r.trim()&&k.push("--requirements",r.trim()),k.join(" ")}function x(){const k=["/ocr:address",e];return r.trim()&&k.push(`
457
-
458
- NOTES:`,r.trim()),k.join(" ")}function v(){const k=y();f?.emit("command:run",{command:k}),n(),b("/commands")}async function _(){await navigator.clipboard.writeText(x()),d(!0),setTimeout(()=>d(!1),2e3)}return p.jsxs("div",{children:[p.jsxs("div",{className:"p-6 pb-0",children:[p.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),p.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Run an AI agent to corroborate, validate, and implement changes from this review — in the dashboard or your own terminal."})]}),p.jsxs("div",{className:"mx-6 mt-4 flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-3 py-2.5 text-xs text-amber-800 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300",children:[p.jsx(CE,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),p.jsx("span",{children:"This runs an AI agent with full read/write and shell access to your project."})]}),p.jsxs("div",{className:"space-y-4 p-6",children:[p.jsxs("div",{children:[p.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review"}),p.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),p.jsxs("div",{children:[p.jsxs("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:["Additional notes ",p.jsx("span",{className:"font-normal text-zinc-400 dark:text-zinc-500",children:"(optional)"})]}),p.jsx("textarea",{value:r,onChange:k=>a(k.target.value),placeholder:"e.g. Focus on the blockers first, skip style nits...",rows:3,className:ke("mt-1 w-full rounded-md border px-3 py-2 text-sm","border-zinc-200 bg-zinc-50 placeholder:text-zinc-400","dark:border-zinc-700 dark:bg-zinc-800 dark:placeholder:text-zinc-500","focus:border-indigo-400 focus:outline-none focus:ring-1 focus:ring-indigo-400/50","resize-none")})]}),p.jsx("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md bg-zinc-100 px-2.5 py-1.5 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-400",children:x()}),p.jsxs("div",{className:"space-y-2 pt-2",children:[p.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row-reverse",children:[l?p.jsxs("button",{onClick:v,className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:[p.jsx(oo,{className:"h-3.5 w-3.5"}),"Confirm"]}):p.jsxs("button",{onClick:()=>o(!0),disabled:h,className:ke("flex flex-1 items-center justify-center gap-2 rounded-md bg-indigo-600 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-indigo-700",h&&"cursor-not-allowed opacity-50"),children:[p.jsx(oo,{className:"h-3.5 w-3.5"}),"Run in Dashboard"]}),p.jsx("button",{onClick:_,className:"flex flex-1 items-center justify-center gap-2 rounded-md border border-zinc-200 px-3 py-2 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:u?p.jsxs(p.Fragment,{children:[p.jsx(Is,{className:"h-3.5 w-3.5"}),"Copied!"]}):p.jsxs(p.Fragment,{children:[p.jsx(EE,{className:"h-3.5 w-3.5"}),"Copy to Terminal"]})})]}),p.jsx("button",{onClick:n,className:"w-full py-1 text-sm text-zinc-500 transition-colors hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-200",children:"Cancel"})]})]})]})}function uI({finalPath:e,onClose:n}){const[r,a]=N.useState(!0),[l,o]=N.useState(!1);async function u(){const d=r?Kx(e):e;await navigator.clipboard.writeText(d),o(!0),setTimeout(()=>o(!1),2e3)}return p.jsxs("div",{className:"p-6",children:[p.jsx("h3",{id:"address-feedback-title",className:"text-lg font-semibold text-zinc-900 dark:text-zinc-100",children:"Address Feedback"}),p.jsx("p",{className:"mt-2 text-sm text-zinc-500 dark:text-zinc-400",children:"Copy the review path and AI prompt to paste into any AI coding tool (Claude Code, Cursor, Windsurf, Copilot, etc.)."}),p.jsxs("div",{className:"mt-4",children:[p.jsx("label",{className:"text-xs font-medium text-zinc-500 dark:text-zinc-400",children:"Review path"}),p.jsx("code",{className:"mt-1 block w-full break-all rounded-md border border-zinc-200 bg-zinc-50 px-3 py-2 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300",children:e})]}),p.jsxs("label",{className:"mt-4 flex items-center gap-2 text-sm text-zinc-600 dark:text-zinc-400",children:[p.jsx("input",{type:"checkbox",checked:r,onChange:d=>a(d.target.checked),className:"h-3.5 w-3.5 rounded border-zinc-300 text-indigo-500 focus:ring-indigo-400 dark:border-zinc-600"}),"Include AI prompt"]}),r&&p.jsx("div",{className:"mt-3 max-h-40 overflow-y-auto rounded-md border border-zinc-200 bg-zinc-50 p-3 text-xs text-zinc-600 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-400",children:p.jsx("pre",{className:"whitespace-pre-wrap font-mono leading-relaxed",children:Kx(e)})}),p.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[p.jsx("button",{onClick:n,className:"rounded-md border border-zinc-200 px-3 py-1.5 text-sm font-medium text-zinc-700 transition-colors hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800",children:"Cancel"}),p.jsx("button",{onClick:u,className:"inline-flex items-center gap-1.5 rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-indigo-700",children:l?p.jsxs(p.Fragment,{children:[p.jsx(Is,{className:"h-3.5 w-3.5"}),"Copied!"]}):p.jsxs(p.Fragment,{children:[p.jsx(EE,{className:"h-3.5 w-3.5"}),"Copy"]})})]})]})}const dI=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}];function fI(){const{id:e,round:n}=wu(),r=parseInt(n??"0",10),{data:a,isLoading:l}=Kj(e??"",r),{data:o}=Vj(e??"",r),{data:u}=Sh(e??"","final"),{data:d}=Sh(e??"","final-human"),{data:f}=Sh(e??"","discourse"),h=n1(),[b,y]=N.useState(!1),[x,v]=N.useState(!1);if(l)return p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading round..."});if(!a)return p.jsxs("div",{children:[p.jsxs(Dn,{to:`/sessions/${e}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to session"]}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Round not found."})]});const _=f?wj(f.content):[];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs(Dn,{to:`/sessions/${e}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to session"]}),p.jsxs("div",{className:"flex items-start justify-between gap-4",children:[p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("h1",{className:"text-2xl font-semibold",children:["Round ",a.round_number]}),p.jsx("select",{value:a.progress?.status??"needs_review",onChange:k=>h.mutate({roundId:a.id,status:k.target.value}),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:dI.map(k=>p.jsx("option",{value:k.value,children:k.label},k.value))})]}),p.jsxs("p",{className:"mt-1 text-sm text-zinc-500 dark:text-zinc-400",children:[(a.reviewer_outputs??[]).length," reviewer",(a.reviewer_outputs??[]).length!==1?"s":""]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[u&&p.jsx(sI,{sessionId:e??"",roundNumber:r,finalContent:u.content,savedHumanReview:d?.content}),u&&p.jsx(oI,{sessionId:e??"",roundNumber:r}),p.jsxs("button",{type:"button",onClick:()=>v(!0),className:"inline-flex items-center gap-1.5 rounded-md border border-zinc-200 bg-white px-3 py-1.5 text-xs font-medium text-zinc-700 transition-colors hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300 dark:hover:bg-zinc-700",children:[p.jsx(hu,{className:"h-3.5 w-3.5"}),"Ask the Team"]})]})]}),a.verdict&&p.jsx(Nj,{verdict:a.verdict,blockerCount:a.blocker_count,suggestionCount:a.suggestion_count,shouldFixCount:a.should_fix_count}),p.jsxs("div",{children:[p.jsx("h2",{className:"mb-3 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewers"}),p.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",children:(a.reviewer_outputs??[]).map(k=>p.jsx(Zj,{sessionId:e??"",roundNumber:r,reviewer:k},k.id))})]}),o&&o.length>0&&p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.length,")"]}),p.jsx(i1,{findings:o})]}),f&&p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("button",{onClick:()=>y(k=>!k),className:"flex items-center gap-2 text-sm font-medium text-zinc-900 transition-colors hover:text-zinc-700 dark:text-zinc-100 dark:hover:text-zinc-300",children:[p.jsx(hu,{className:"h-4 w-4"}),b?"Hide Discourse":"View Discourse"]}),b&&p.jsx("div",{className:"mt-4 space-y-4",children:_.length>0?_.map((k,w)=>p.jsx(kj,{type:k.type,content:k.content,reviewer:k.reviewer},w)):p.jsx(Wr,{content:f.content})})]}),u&&p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Final Review"}),p.jsx(Wr,{content:u.content})]}),x&&a&&p.jsx(t1,{sessionId:e??"",targetType:"review_round",targetId:a.round_number,onClose:()=>v(!1)})]})}function hI(){const{id:e,round:n,reviewerId:r}=wu(),a=parseInt(n??"0",10),l=parseInt(r??"0",10),{data:o,isLoading:u}=Yj(e??"",a,l),d=Tn({queryKey:["reviewer-content",e,a,l],queryFn:async()=>{if(!o?.file_path)return"";try{return(await tn(`/api/sessions/${e}/rounds/${a}/reviewers/${l}/content`)).content??""}catch{return""}},enabled:!!o?.file_path});if(u)return p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviewer..."});if(!o)return p.jsxs("div",{children:[p.jsxs(Dn,{to:`/sessions/${e}/reviews/${a}`,className:"mb-4 inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to round"]}),p.jsx("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:"Reviewer not found."})]});const f=r1[o.reviewer_type]??co;return p.jsxs("div",{className:"space-y-6",children:[p.jsxs(Dn,{to:`/sessions/${e}/reviews/${a}`,className:"inline-flex items-center gap-1 text-sm text-zinc-500 hover:text-zinc-700 dark:text-zinc-400 dark:hover:text-zinc-300",children:[p.jsx(ca,{className:"h-4 w-4"}),"Back to round ",a]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(f,{className:"h-6 w-6 text-zinc-500"}),p.jsxs("div",{children:[p.jsxs("h1",{className:"text-2xl font-semibold capitalize",children:[o.reviewer_type,o.instance_number>1&&p.jsxs("span",{className:"ml-1 text-zinc-500 dark:text-zinc-400",children:["#",o.instance_number]})]}),p.jsxs("p",{className:"text-sm text-zinc-500 dark:text-zinc-400",children:[o.finding_count," finding",o.finding_count!==1?"s":""]})]})]}),d.data&&p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsx("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:"Reviewer Output"}),p.jsx(Wr,{content:d.data})]}),o.findings.length>0&&p.jsxs("div",{className:"rounded-lg border border-zinc-200 bg-white p-6 dark:border-zinc-800 dark:bg-zinc-900",children:[p.jsxs("h2",{className:"mb-4 text-sm font-medium text-zinc-900 dark:text-zinc-100",children:["Findings (",o.findings.length,")"]}),p.jsx(i1,{findings:o.findings})]})]})}const Vx={needs_review:0,in_progress:1,changes_made:2,acknowledged:3,dismissed:4},a1=[{value:"needs_review",label:"Needs Review"},{value:"in_progress",label:"In Progress"},{value:"changes_made",label:"Changes Made"},{value:"acknowledged",label:"Acknowledged"},{value:"dismissed",label:"Dismissed"}],mI=[{value:"all",label:"All Statuses"},...a1];function pI(){const{data:e,isLoading:n}=Gj(),r=n1(),a=om(),[l,o]=N.useState(!1),[u,d]=N.useState("all"),[f,h]=N.useState("all"),[b,y]=N.useState("status"),[x,v]=N.useState("asc"),_=N.useMemo(()=>{const R=new Set,H=[{value:"all",label:"All Verdicts"}];for(const $ of e??[])$.verdict&&!R.has($.verdict)&&(R.add($.verdict),H.push({value:$.verdict,label:$.verdict}));return H},[e]),k=N.useMemo(()=>{let R=e??[];return l||(R=R.filter(H=>{const $=H.progress?.status??"needs_review";return $==="needs_review"||$==="in_progress"})),u!=="all"&&(R=R.filter(H=>(H.progress?.status??"needs_review")===u)),f!=="all"&&(R=R.filter(H=>H.verdict===f)),R},[e,l,u,f]),w=N.useMemo(()=>{const R=x==="asc"?1:-1;return[...k].sort((H,$)=>{switch(b){case"session_id":return H.session_id.localeCompare($.session_id)*R;case"round_number":return(H.round_number-$.round_number)*R;case"verdict":return(H.verdict??"").localeCompare($.verdict??"")*R;case"blocker_count":return(H.blocker_count-$.blocker_count)*R;case"status":{const O=Vx[H.progress?.status??"needs_review"],Z=Vx[$.progress?.status??"needs_review"];return(O-Z)*R}default:return 0}})},[k,b,x]);function C(R){b===R?v(H=>H==="asc"?"desc":"asc"):(y(R),v("asc"))}function j(R,H){r.mutate({roundId:R,status:H})}return p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("h1",{className:"text-2xl font-semibold",children:"Reviews"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{onClick:()=>o(!1),className:ke("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100":"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900"),children:"Actionable"}),p.jsx("button",{onClick:()=>o(!0),className:ke("rounded-md px-3 py-1.5 text-xs font-medium transition-colors",l?"bg-zinc-900 text-white dark:bg-zinc-100 dark:text-zinc-900":"text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-zinc-100"),children:"All"})]})]}),n?p.jsx("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:"Loading reviews..."}):!e||e.length===0?p.jsxs("p",{className:"mt-6 text-sm text-zinc-500 dark:text-zinc-400",children:["No review rounds found. Run ",p.jsx("code",{className:"rounded bg-zinc-100 px-1.5 py-0.5 text-xs dark:bg-zinc-800",children:"ocr review"})," to create one."]}):p.jsxs("div",{className:"mt-6",children:[p.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-3",children:[p.jsx(kE,{className:"h-4 w-4 text-zinc-400"}),l&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Status:"}),p.jsx("select",{value:u,onChange:R=>d(R.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:mI.map(R=>p.jsx("option",{value:R.value,children:R.label},R.value))})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:"Verdict:"}),p.jsx("select",{value:f,onChange:R=>h(R.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:_.map(R=>p.jsx("option",{value:R.value,children:R.label},R.value))})]}),p.jsxs("span",{className:"text-xs text-zinc-400 dark:text-zinc-500",children:[w.length," of ",(e??[]).length," reviews"]})]}),w.length===0?p.jsx("p",{className:"py-8 text-center text-sm text-zinc-500 dark:text-zinc-400",children:"No reviews match your filters."}):p.jsx("div",{className:"overflow-x-auto rounded-lg border border-zinc-200 dark:border-zinc-800",children:p.jsxs("table",{className:"w-full text-sm",children:[p.jsx("thead",{className:"bg-zinc-50 dark:bg-zinc-900",children:p.jsxs("tr",{children:[p.jsx(aa,{label:"Branch",field:"session_id",activeField:b,direction:x,onSort:C}),p.jsx(aa,{label:"Round",field:"round_number",activeField:b,direction:x,onSort:C}),p.jsx(aa,{label:"Verdict",field:"verdict",activeField:b,direction:x,onSort:C}),p.jsx(aa,{label:"Blockers",field:"blocker_count",activeField:b,direction:x,onSort:C}),p.jsx("th",{className:"border-b border-zinc-200 px-4 py-2 text-left font-medium text-zinc-900 dark:border-zinc-800 dark:text-zinc-100",children:"Reviewers"}),p.jsx(aa,{label:"Status",field:"status",activeField:b,direction:x,onSort:C})]})}),p.jsx("tbody",{children:w.map(R=>{const H=R.session_id.replace(/^\d{4}-\d{2}-\d{2}-/,""),$=(R.reviewer_outputs??[]).length;return p.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-800/50",onClick:()=>a(`/sessions/${R.session_id}/reviews/${R.round_number}`),children:[p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Cm,{className:"h-4 w-4 shrink-0 text-zinc-400"}),p.jsx("span",{className:"truncate text-zinc-900 dark:text-zinc-100",title:R.session_id,children:H})]})}),p.jsxs("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:["Round ",R.round_number]}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:R.verdict?p.jsx(qs,{variant:R.verdict==="APPROVE"?"info":R.verdict==="REQUEST CHANGES"?"high":"medium",label:R.verdict}):p.jsx("span",{className:"text-xs text-zinc-400",children:"Pending"})}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",children:R.blocker_count>0?p.jsx("span",{className:"inline-flex items-center rounded-md border border-red-500/25 bg-red-500/15 px-2 py-0.5 text-xs font-medium text-red-700 dark:text-red-400",children:R.blocker_count}):p.jsx("span",{className:"text-xs text-zinc-400",children:"0"})}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 text-zinc-600 dark:border-zinc-800 dark:text-zinc-400",children:$}),p.jsx("td",{className:"border-b border-zinc-200 px-4 py-2 dark:border-zinc-800",onClick:O=>O.stopPropagation(),children:p.jsx("select",{value:R.progress?.status??"needs_review",onChange:O=>j(R.id,O.target.value),className:"rounded-md border border-zinc-300 bg-white px-2 py-1 text-xs dark:border-zinc-700 dark:bg-zinc-900",children:a1.map(O=>p.jsx("option",{value:O.value,children:O.label},O.value))})})]},`${R.session_id}-${R.round_number}`)})})]})})]})]})}function gI(){return p.jsx("div",{className:"flex min-h-[400px] items-center justify-center",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"text-4xl font-semibold text-zinc-900 dark:text-zinc-100",children:"404"}),p.jsx("p",{className:"mt-2 text-zinc-500 dark:text-zinc-400",children:"Page not found."})]})})}function na(e){return p.jsx(mA,{children:e})}const bI=MN([{element:p.jsx(hA,{}),errorElement:p.jsx(ea,{}),children:[{index:!0,element:na(p.jsx(kA,{}))},{path:"sessions",element:na(p.jsx(LA,{})),errorElement:p.jsx(ea,{})},{path:"sessions/:id",element:na(p.jsx(HA,{})),errorElement:p.jsx(ea,{})},{path:"sessions/:id/reviews/:round",element:na(p.jsx(fI,{})),errorElement:p.jsx(ea,{})},{path:"sessions/:id/reviews/:round/reviewers/:reviewerId",element:na(p.jsx(hI,{})),errorElement:p.jsx(ea,{})},{path:"sessions/:id/maps/:run",element:na(p.jsx($j,{})),errorElement:p.jsx(ea,{})},{path:"reviews",element:na(p.jsx(pI,{})),errorElement:p.jsx(ea,{})},{path:"commands",element:na(p.jsx(i2,{})),errorElement:p.jsx(ea,{})},{path:"*",element:p.jsx(gI,{})}]}]);function yI(){return p.jsx(QN,{children:p.jsx(NT,{children:p.jsx(qC,{children:p.jsx(bz,{children:p.jsx(KN,{router:bI})})})})})}qv().then(()=>{xw.createRoot(document.getElementById("root")).render(p.jsx(N.StrictMode,{children:p.jsx(yI,{})}))});export{Dj as _,xI as a,Eu as g,p as j,N as r,Tv as u};