@xbghc/warden 0.2.0 → 0.3.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.
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-OYdSNvt2.js","assets/css-DPfMkruS.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/vue-DVfSmUF7.js","assets/typescript-BPQ3VLAy.js","assets/json-Cp-IABpG.js","assets/svelte-DZMnMd3x.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/cpp-BRuaLJcg.js","assets/c-BIGW1oBm.js","assets/sql-BLtJtn59.js","assets/php-Dhbhpdrm.js","assets/ruby-BGX7qA9Y.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/shellscript-Yzrsuije.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/nginx-BpAMiNFr.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Gc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Iu={exports:{}},ds={},Nu={exports:{}},Le={};var cp;function gk(){if(cp)return Le;cp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=m&&O[m]||O["@@iterator"],typeof O=="function"?O:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function E(O,G,N){this.props=O,this.context=G,this.refs=b,this.updater=N||v}E.prototype.isReactComponent={},E.prototype.setState=function(O,G){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,G,"setState")},E.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function S(){}S.prototype=E.prototype;function I(O,G,N){this.props=O,this.context=G,this.refs=b,this.updater=N||v}var A=I.prototype=new S;A.constructor=I,k(A,E.prototype),A.isPureReactComponent=!0;var B=Array.isArray,P=Object.prototype.hasOwnProperty,L={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function se(O,G,N){var pe,Ee={},we=null,je=null;if(G!=null)for(pe in G.ref!==void 0&&(je=G.ref),G.key!==void 0&&(we=""+G.key),G)P.call(G,pe)&&!Q.hasOwnProperty(pe)&&(Ee[pe]=G[pe]);var Te=arguments.length-2;if(Te===1)Ee.children=N;else if(1<Te){for(var De=Array(Te),Ze=0;Ze<Te;Ze++)De[Ze]=arguments[Ze+2];Ee.children=De}if(O&&O.defaultProps)for(pe in Te=O.defaultProps,Te)Ee[pe]===void 0&&(Ee[pe]=Te[pe]);return{$$typeof:e,type:O,key:we,ref:je,props:Ee,_owner:L.current}}function ue(O,G){return{$$typeof:e,type:O.type,key:G,ref:O.ref,props:O.props,_owner:O._owner}}function D(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function te(O){var G={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(N){return G[N]})}var re=/\/+/g;function fe(O,G){return typeof O=="object"&&O!==null&&O.key!=null?te(""+O.key):G.toString(36)}function ne(O,G,N,pe,Ee){var we=typeof O;(we==="undefined"||we==="boolean")&&(O=null);var je=!1;if(O===null)je=!0;else switch(we){case"string":case"number":je=!0;break;case"object":switch(O.$$typeof){case e:case t:je=!0}}if(je)return je=O,Ee=Ee(je),O=pe===""?"."+fe(je,0):pe,B(Ee)?(N="",O!=null&&(N=O.replace(re,"$&/")+"/"),ne(Ee,G,N,"",function(Ze){return Ze})):Ee!=null&&(D(Ee)&&(Ee=ue(Ee,N+(!Ee.key||je&&je.key===Ee.key?"":(""+Ee.key).replace(re,"$&/")+"/")+O)),G.push(Ee)),1;if(je=0,pe=pe===""?".":pe+":",B(O))for(var Te=0;Te<O.length;Te++){we=O[Te];var De=pe+fe(we,Te);je+=ne(we,G,N,De,Ee)}else if(De=w(O),typeof De=="function")for(O=De.call(O),Te=0;!(we=O.next()).done;)we=we.value,De=pe+fe(we,Te++),je+=ne(we,G,N,De,Ee);else if(we==="object")throw G=String(O),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return je}function Y(O,G,N){if(O==null)return O;var pe=[],Ee=0;return ne(O,pe,"","",function(we){return G.call(N,we,Ee++)}),pe}function ge(O){if(O._status===-1){var G=O._result;G=G(),G.then(function(N){(O._status===0||O._status===-1)&&(O._status=1,O._result=N)},function(N){(O._status===0||O._status===-1)&&(O._status=2,O._result=N)}),O._status===-1&&(O._status=0,O._result=G)}if(O._status===1)return O._result.default;throw O._result}var me={current:null},z={transition:null},oe={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:z,ReactCurrentOwner:L};function _(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:Y,forEach:function(O,G,N){Y(O,function(){G.apply(this,arguments)},N)},count:function(O){var G=0;return Y(O,function(){G++}),G},toArray:function(O){return Y(O,function(G){return G})||[]},only:function(O){if(!D(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Le.Component=E,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=I,Le.StrictMode=i,Le.Suspense=f,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,Le.act=_,Le.cloneElement=function(O,G,N){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var pe=k({},O.props),Ee=O.key,we=O.ref,je=O._owner;if(G!=null){if(G.ref!==void 0&&(we=G.ref,je=L.current),G.key!==void 0&&(Ee=""+G.key),O.type&&O.type.defaultProps)var Te=O.type.defaultProps;for(De in G)P.call(G,De)&&!Q.hasOwnProperty(De)&&(pe[De]=G[De]===void 0&&Te!==void 0?Te[De]:G[De])}var De=arguments.length-2;if(De===1)pe.children=N;else if(1<De){Te=Array(De);for(var Ze=0;Ze<De;Ze++)Te[Ze]=arguments[Ze+2];pe.children=Te}return{$$typeof:e,type:O.type,key:Ee,ref:we,props:pe,_owner:je}},Le.createContext=function(O){return O={$$typeof:a,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:l,_context:O},O.Consumer=O},Le.createElement=se,Le.createFactory=function(O){var G=se.bind(null,O);return G.type=O,G},Le.createRef=function(){return{current:null}},Le.forwardRef=function(O){return{$$typeof:c,render:O}},Le.isValidElement=D,Le.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:ge}},Le.memo=function(O,G){return{$$typeof:h,type:O,compare:G===void 0?null:G}},Le.startTransition=function(O){var G=z.transition;z.transition={};try{O()}finally{z.transition=G}},Le.unstable_act=_,Le.useCallback=function(O,G){return me.current.useCallback(O,G)},Le.useContext=function(O){return me.current.useContext(O)},Le.useDebugValue=function(){},Le.useDeferredValue=function(O){return me.current.useDeferredValue(O)},Le.useEffect=function(O,G){return me.current.useEffect(O,G)},Le.useId=function(){return me.current.useId()},Le.useImperativeHandle=function(O,G,N){return me.current.useImperativeHandle(O,G,N)},Le.useInsertionEffect=function(O,G){return me.current.useInsertionEffect(O,G)},Le.useLayoutEffect=function(O,G){return me.current.useLayoutEffect(O,G)},Le.useMemo=function(O,G){return me.current.useMemo(O,G)},Le.useReducer=function(O,G,N){return me.current.useReducer(O,G,N)},Le.useRef=function(O){return me.current.useRef(O)},Le.useState=function(O){return me.current.useState(O)},Le.useSyncExternalStore=function(O,G,N){return me.current.useSyncExternalStore(O,G,N)},Le.useTransition=function(){return me.current.useTransition()},Le.version="18.3.1",Le}var fp;function Wc(){return fp||(fp=1,Nu.exports=gk()),Nu.exports}var dp;function yk(){if(dp)return ds;dp=1;var e=Wc(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var p,m={},w=null,v=null;h!==void 0&&(w=""+h),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(v=f.ref);for(p in f)i.call(f,p)&&!l.hasOwnProperty(p)&&(m[p]=f[p]);if(c&&c.defaultProps)for(p in f=c.defaultProps,f)m[p]===void 0&&(m[p]=f[p]);return{$$typeof:t,type:c,key:w,ref:v,props:m,_owner:o.current}}return ds.Fragment=n,ds.jsx=a,ds.jsxs=a,ds}var hp;function wk(){return hp||(hp=1,Iu.exports=yk()),Iu.exports}var C=wk(),ee=Wc();const vs=Gc(ee);var qo={},Tu={exports:{}},Ft={},Au={exports:{}},Pu={};var pp;function vk(){return pp||(pp=1,(function(e){function t(z,oe){var _=z.length;z.push(oe);e:for(;0<_;){var O=_-1>>>1,G=z[O];if(0<o(G,oe))z[O]=oe,z[_]=G,_=O;else break e}}function n(z){return z.length===0?null:z[0]}function i(z){if(z.length===0)return null;var oe=z[0],_=z.pop();if(_!==oe){z[0]=_;e:for(var O=0,G=z.length,N=G>>>1;O<N;){var pe=2*(O+1)-1,Ee=z[pe],we=pe+1,je=z[we];if(0>o(Ee,_))we<G&&0>o(je,Ee)?(z[O]=je,z[we]=_,O=we):(z[O]=Ee,z[pe]=_,O=pe);else if(we<G&&0>o(je,_))z[O]=je,z[we]=_,O=we;else break e}}return oe}function o(z,oe){var _=z.sortIndex-oe.sortIndex;return _!==0?_:z.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],p=1,m=null,w=3,v=!1,k=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(z){for(var oe=n(h);oe!==null;){if(oe.callback===null)i(h);else if(oe.startTime<=z)i(h),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=n(h)}}function B(z){if(b=!1,A(z),!k)if(n(f)!==null)k=!0,ge(P);else{var oe=n(h);oe!==null&&me(B,oe.startTime-z)}}function P(z,oe){k=!1,b&&(b=!1,S(se),se=-1),v=!0;var _=w;try{for(A(oe),m=n(f);m!==null&&(!(m.expirationTime>oe)||z&&!te());){var O=m.callback;if(typeof O=="function"){m.callback=null,w=m.priorityLevel;var G=O(m.expirationTime<=oe);oe=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(f)&&i(f),A(oe)}else i(f);m=n(f)}if(m!==null)var N=!0;else{var pe=n(h);pe!==null&&me(B,pe.startTime-oe),N=!1}return N}finally{m=null,w=_,v=!1}}var L=!1,Q=null,se=-1,ue=5,D=-1;function te(){return!(e.unstable_now()-D<ue)}function re(){if(Q!==null){var z=e.unstable_now();D=z;var oe=!0;try{oe=Q(!0,z)}finally{oe?fe():(L=!1,Q=null)}}else L=!1}var fe;if(typeof I=="function")fe=function(){I(re)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,Y=ne.port2;ne.port1.onmessage=re,fe=function(){Y.postMessage(null)}}else fe=function(){E(re,0)};function ge(z){Q=z,L||(L=!0,fe())}function me(z,oe){se=E(function(){z(e.unstable_now())},oe)}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(z){z.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,ge(P))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(z){switch(w){case 1:case 2:case 3:var oe=3;break;default:oe=w}var _=w;w=oe;try{return z()}finally{w=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,oe){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var _=w;w=z;try{return oe()}finally{w=_}},e.unstable_scheduleCallback=function(z,oe,_){var O=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?O+_:O):_=O,z){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=_+G,z={id:p++,callback:oe,priorityLevel:z,startTime:_,expirationTime:G,sortIndex:-1},_>O?(z.sortIndex=_,t(h,z),n(f)===null&&z===n(h)&&(b?(S(se),se=-1):b=!0,me(B,_-O))):(z.sortIndex=G,t(f,z),k||v||(k=!0,ge(P))),z},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(z){var oe=w;return function(){var _=w;w=oe;try{return z.apply(this,arguments)}finally{w=_}}}})(Pu)),Pu}var mp;function kk(){return mp||(mp=1,Au.exports=vk()),Au.exports}var gp;function xk(){if(gp)return Ft;gp=1;var e=Wc(),t=kk();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){a(r,s),a(r+"Capture",s)}function a(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function w(r){return f.call(m,r)?!0:f.call(p,r)?!1:h.test(r)?m[r]=!0:(p[r]=!0,!1)}function v(r,s,u,d){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,s,u,d){if(s===null||typeof s>"u"||v(r,s,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function b(r,s,u,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){E[r]=new b(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];E[s]=new b(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){E[r]=new b(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){E[r]=new b(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){E[r]=new b(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){E[r]=new b(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){E[r]=new b(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){E[r]=new b(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){E[r]=new b(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function I(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){E[r]=new b(r,1,!1,r.toLowerCase(),null,!1,!1)}),E.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){E[r]=new b(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,s,u,d){var g=E.hasOwnProperty(s)?E[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,u,g,d)&&(u=null),d||g===null?w(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(s=g.attributeName,d=g.attributeNamespace,u===null?r.removeAttribute(s):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,d?r.setAttributeNS(d,s,u):r.setAttribute(s,u))))}var B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),L=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),te=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),z=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=z&&r[z]||r["@@iterator"],typeof r=="function"?r:null)}var _=Object.assign,O;function G(r){if(O===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
|
|
3
|
-
`+O+r}var N=!1;function pe(r,s){if(!r||N)return"";N=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(
|
|
2
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Gc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Iu={exports:{}},ds={},Nu={exports:{}},Le={};var cp;function mk(){if(cp)return Le;cp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=m&&O[m]||O["@@iterator"],typeof O=="function"?O:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function E(O,G,N){this.props=O,this.context=G,this.refs=b,this.updater=N||v}E.prototype.isReactComponent={},E.prototype.setState=function(O,G){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,G,"setState")},E.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function S(){}S.prototype=E.prototype;function I(O,G,N){this.props=O,this.context=G,this.refs=b,this.updater=N||v}var A=I.prototype=new S;A.constructor=I,k(A,E.prototype),A.isPureReactComponent=!0;var $=Array.isArray,P=Object.prototype.hasOwnProperty,L={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function oe(O,G,N){var pe,Ce={},ye=null,je=null;if(G!=null)for(pe in G.ref!==void 0&&(je=G.ref),G.key!==void 0&&(ye=""+G.key),G)P.call(G,pe)&&!Q.hasOwnProperty(pe)&&(Ce[pe]=G[pe]);var Te=arguments.length-2;if(Te===1)Ce.children=N;else if(1<Te){for(var De=Array(Te),Ze=0;Ze<Te;Ze++)De[Ze]=arguments[Ze+2];Ce.children=De}if(O&&O.defaultProps)for(pe in Te=O.defaultProps,Te)Ce[pe]===void 0&&(Ce[pe]=Te[pe]);return{$$typeof:e,type:O,key:ye,ref:je,props:Ce,_owner:L.current}}function ue(O,G){return{$$typeof:e,type:O.type,key:G,ref:O.ref,props:O.props,_owner:O._owner}}function D(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ne(O){var G={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(N){return G[N]})}var re=/\/+/g;function fe(O,G){return typeof O=="object"&&O!==null&&O.key!=null?ne(""+O.key):G.toString(36)}function ie(O,G,N,pe,Ce){var ye=typeof O;(ye==="undefined"||ye==="boolean")&&(O=null);var je=!1;if(O===null)je=!0;else switch(ye){case"string":case"number":je=!0;break;case"object":switch(O.$$typeof){case e:case t:je=!0}}if(je)return je=O,Ce=Ce(je),O=pe===""?"."+fe(je,0):pe,$(Ce)?(N="",O!=null&&(N=O.replace(re,"$&/")+"/"),ie(Ce,G,N,"",function(Ze){return Ze})):Ce!=null&&(D(Ce)&&(Ce=ue(Ce,N+(!Ce.key||je&&je.key===Ce.key?"":(""+Ce.key).replace(re,"$&/")+"/")+O)),G.push(Ce)),1;if(je=0,pe=pe===""?".":pe+":",$(O))for(var Te=0;Te<O.length;Te++){ye=O[Te];var De=pe+fe(ye,Te);je+=ie(ye,G,N,De,Ce)}else if(De=w(O),typeof De=="function")for(O=De.call(O),Te=0;!(ye=O.next()).done;)ye=ye.value,De=pe+fe(ye,Te++),je+=ie(ye,G,N,De,Ce);else if(ye==="object")throw G=String(O),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return je}function Y(O,G,N){if(O==null)return O;var pe=[],Ce=0;return ie(O,pe,"","",function(ye){return G.call(N,ye,Ce++)}),pe}function ge(O){if(O._status===-1){var G=O._result;G=G(),G.then(function(N){(O._status===0||O._status===-1)&&(O._status=1,O._result=N)},function(N){(O._status===0||O._status===-1)&&(O._status=2,O._result=N)}),O._status===-1&&(O._status=0,O._result=G)}if(O._status===1)return O._result.default;throw O._result}var me={current:null},Z={transition:null},U={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:Z,ReactCurrentOwner:L};function _(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:Y,forEach:function(O,G,N){Y(O,function(){G.apply(this,arguments)},N)},count:function(O){var G=0;return Y(O,function(){G++}),G},toArray:function(O){return Y(O,function(G){return G})||[]},only:function(O){if(!D(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Le.Component=E,Le.Fragment=n,Le.Profiler=o,Le.PureComponent=I,Le.StrictMode=i,Le.Suspense=f,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,Le.act=_,Le.cloneElement=function(O,G,N){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var pe=k({},O.props),Ce=O.key,ye=O.ref,je=O._owner;if(G!=null){if(G.ref!==void 0&&(ye=G.ref,je=L.current),G.key!==void 0&&(Ce=""+G.key),O.type&&O.type.defaultProps)var Te=O.type.defaultProps;for(De in G)P.call(G,De)&&!Q.hasOwnProperty(De)&&(pe[De]=G[De]===void 0&&Te!==void 0?Te[De]:G[De])}var De=arguments.length-2;if(De===1)pe.children=N;else if(1<De){Te=Array(De);for(var Ze=0;Ze<De;Ze++)Te[Ze]=arguments[Ze+2];pe.children=Te}return{$$typeof:e,type:O.type,key:Ce,ref:ye,props:pe,_owner:je}},Le.createContext=function(O){return O={$$typeof:a,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:l,_context:O},O.Consumer=O},Le.createElement=oe,Le.createFactory=function(O){var G=oe.bind(null,O);return G.type=O,G},Le.createRef=function(){return{current:null}},Le.forwardRef=function(O){return{$$typeof:c,render:O}},Le.isValidElement=D,Le.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:ge}},Le.memo=function(O,G){return{$$typeof:h,type:O,compare:G===void 0?null:G}},Le.startTransition=function(O){var G=Z.transition;Z.transition={};try{O()}finally{Z.transition=G}},Le.unstable_act=_,Le.useCallback=function(O,G){return me.current.useCallback(O,G)},Le.useContext=function(O){return me.current.useContext(O)},Le.useDebugValue=function(){},Le.useDeferredValue=function(O){return me.current.useDeferredValue(O)},Le.useEffect=function(O,G){return me.current.useEffect(O,G)},Le.useId=function(){return me.current.useId()},Le.useImperativeHandle=function(O,G,N){return me.current.useImperativeHandle(O,G,N)},Le.useInsertionEffect=function(O,G){return me.current.useInsertionEffect(O,G)},Le.useLayoutEffect=function(O,G){return me.current.useLayoutEffect(O,G)},Le.useMemo=function(O,G){return me.current.useMemo(O,G)},Le.useReducer=function(O,G,N){return me.current.useReducer(O,G,N)},Le.useRef=function(O){return me.current.useRef(O)},Le.useState=function(O){return me.current.useState(O)},Le.useSyncExternalStore=function(O,G,N){return me.current.useSyncExternalStore(O,G,N)},Le.useTransition=function(){return me.current.useTransition()},Le.version="18.3.1",Le}var fp;function Wc(){return fp||(fp=1,Nu.exports=mk()),Nu.exports}var dp;function gk(){if(dp)return ds;dp=1;var e=Wc(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var p,m={},w=null,v=null;h!==void 0&&(w=""+h),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(v=f.ref);for(p in f)i.call(f,p)&&!l.hasOwnProperty(p)&&(m[p]=f[p]);if(c&&c.defaultProps)for(p in f=c.defaultProps,f)m[p]===void 0&&(m[p]=f[p]);return{$$typeof:t,type:c,key:w,ref:v,props:m,_owner:o.current}}return ds.Fragment=n,ds.jsx=a,ds.jsxs=a,ds}var hp;function yk(){return hp||(hp=1,Iu.exports=gk()),Iu.exports}var C=yk(),te=Wc();const vs=Gc(te);var qo={},Tu={exports:{}},Ft={},Au={exports:{}},Pu={};var pp;function wk(){return pp||(pp=1,(function(e){function t(Z,U){var _=Z.length;Z.push(U);e:for(;0<_;){var O=_-1>>>1,G=Z[O];if(0<o(G,U))Z[O]=U,Z[_]=G,_=O;else break e}}function n(Z){return Z.length===0?null:Z[0]}function i(Z){if(Z.length===0)return null;var U=Z[0],_=Z.pop();if(_!==U){Z[0]=_;e:for(var O=0,G=Z.length,N=G>>>1;O<N;){var pe=2*(O+1)-1,Ce=Z[pe],ye=pe+1,je=Z[ye];if(0>o(Ce,_))ye<G&&0>o(je,Ce)?(Z[O]=je,Z[ye]=_,O=ye):(Z[O]=Ce,Z[pe]=_,O=pe);else if(ye<G&&0>o(je,_))Z[O]=je,Z[ye]=_,O=ye;else break e}}return U}function o(Z,U){var _=Z.sortIndex-U.sortIndex;return _!==0?_:Z.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],p=1,m=null,w=3,v=!1,k=!1,b=!1,E=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(Z){for(var U=n(h);U!==null;){if(U.callback===null)i(h);else if(U.startTime<=Z)i(h),U.sortIndex=U.expirationTime,t(f,U);else break;U=n(h)}}function $(Z){if(b=!1,A(Z),!k)if(n(f)!==null)k=!0,ge(P);else{var U=n(h);U!==null&&me($,U.startTime-Z)}}function P(Z,U){k=!1,b&&(b=!1,S(oe),oe=-1),v=!0;var _=w;try{for(A(U),m=n(f);m!==null&&(!(m.expirationTime>U)||Z&&!ne());){var O=m.callback;if(typeof O=="function"){m.callback=null,w=m.priorityLevel;var G=O(m.expirationTime<=U);U=e.unstable_now(),typeof G=="function"?m.callback=G:m===n(f)&&i(f),A(U)}else i(f);m=n(f)}if(m!==null)var N=!0;else{var pe=n(h);pe!==null&&me($,pe.startTime-U),N=!1}return N}finally{m=null,w=_,v=!1}}var L=!1,Q=null,oe=-1,ue=5,D=-1;function ne(){return!(e.unstable_now()-D<ue)}function re(){if(Q!==null){var Z=e.unstable_now();D=Z;var U=!0;try{U=Q(!0,Z)}finally{U?fe():(L=!1,Q=null)}}else L=!1}var fe;if(typeof I=="function")fe=function(){I(re)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Y=ie.port2;ie.port1.onmessage=re,fe=function(){Y.postMessage(null)}}else fe=function(){E(re,0)};function ge(Z){Q=Z,L||(L=!0,fe())}function me(Z,U){oe=E(function(){Z(e.unstable_now())},U)}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(Z){Z.callback=null},e.unstable_continueExecution=function(){k||v||(k=!0,ge(P))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(Z){switch(w){case 1:case 2:case 3:var U=3;break;default:U=w}var _=w;w=U;try{return Z()}finally{w=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,U){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var _=w;w=Z;try{return U()}finally{w=_}},e.unstable_scheduleCallback=function(Z,U,_){var O=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?O+_:O):_=O,Z){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=_+G,Z={id:p++,callback:U,priorityLevel:Z,startTime:_,expirationTime:G,sortIndex:-1},_>O?(Z.sortIndex=_,t(h,Z),n(f)===null&&Z===n(h)&&(b?(S(oe),oe=-1):b=!0,me($,_-O))):(Z.sortIndex=G,t(f,Z),k||v||(k=!0,ge(P))),Z},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(Z){var U=w;return function(){var _=w;w=U;try{return Z.apply(this,arguments)}finally{w=_}}}})(Pu)),Pu}var mp;function vk(){return mp||(mp=1,Au.exports=wk()),Au.exports}var gp;function kk(){if(gp)return Ft;gp=1;var e=Wc(),t=vk();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(r,s){a(r,s),a(r+"Capture",s)}function a(r,s){for(o[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},m={};function w(r){return f.call(m,r)?!0:f.call(p,r)?!1:h.test(r)?m[r]=!0:(p[r]=!0,!1)}function v(r,s,u,d){if(u!==null&&u.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,s,u,d){if(s===null||typeof s>"u"||v(r,s,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function b(r,s,u,d,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){E[r]=new b(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];E[s]=new b(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){E[r]=new b(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){E[r]=new b(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){E[r]=new b(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){E[r]=new b(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){E[r]=new b(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){E[r]=new b(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){E[r]=new b(r,5,!1,r.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function I(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(S,I);E[s]=new b(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){E[r]=new b(r,1,!1,r.toLowerCase(),null,!1,!1)}),E.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){E[r]=new b(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,s,u,d){var g=E.hasOwnProperty(s)?E[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,u,g,d)&&(u=null),d||g===null?w(s)&&(u===null?r.removeAttribute(s):r.setAttribute(s,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(s=g.attributeName,d=g.attributeNamespace,u===null?r.removeAttribute(s):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,d?r.setAttributeNS(d,s,u):r.setAttribute(s,u))))}var $=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),L=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),ne=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),Z=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=Z&&r[Z]||r["@@iterator"],typeof r=="function"?r:null)}var _=Object.assign,O;function G(r){if(O===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);O=s&&s[1]||""}return`
|
|
3
|
+
`+O+r}var N=!1;function pe(r,s){if(!r||N)return"";N=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(z){var d=z}Reflect.construct(r,[],s)}else{try{s.call()}catch(z){d=z}r.call(s.prototype)}else{try{throw Error()}catch(z){d=z}r()}}catch(z){if(z&&d&&typeof z.stack=="string"){for(var g=z.stack.split(`
|
|
4
4
|
`),y=d.stack.split(`
|
|
5
5
|
`),x=g.length-1,T=y.length-1;1<=x&&0<=T&&g[x]!==y[T];)T--;for(;1<=x&&0<=T;x--,T--)if(g[x]!==y[T]){if(x!==1||T!==1)do if(x--,T--,0>T||g[x]!==y[T]){var R=`
|
|
6
|
-
`+g[x].replace(" at new "," at ");return r.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",r.displayName)),R}while(1<=x&&0<=T);break}}}finally{N=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function Ee(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function we(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Q:return"Fragment";case L:return"Portal";case ue:return"Profiler";case se:return"StrictMode";case fe:return"Suspense";case ne:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case te:return(r.displayName||"Context")+".Consumer";case D:return(r._context.displayName||"Context")+".Provider";case re:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return s=r.displayName||null,s!==null?s:we(r.type)||"Memo";case ge:s=r._payload,r=r._init;try{return we(r(s))}catch{}}return null}function je(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return we(s);case 8:return s===se?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Te(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function De(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ze(r){var s=De(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,y=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function qt(r){r._valueTracker||(r._valueTracker=Ze(r))}function Ur(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),d="";return r&&(d=De(r)?r.checked?"true":"false":r.value),r=d,r!==u?(s.setValue(r),!0):!1}function Bn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function U(r,s){var u=s.checked;return _({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function H(r,s){var u=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;u=Te(s.value!=null?s.value:u),r._wrapperState={initialChecked:d,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function ye(r,s){s=s.checked,s!=null&&A(r,"checked",s,!1)}function Se(r,s){ye(r,s);var u=Te(s.value),d=s.type;if(u!=null)d==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Ie(r,s.type,u):s.hasOwnProperty("defaultValue")&&Ie(r,s.type,Te(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Oe(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Ie(r,s,u){(s!=="number"||Bn(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Ke=Array.isArray;function st(r,s,u,d){if(r=r.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=s.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&d&&(r[u].defaultSelected=!0)}else{for(u=""+Te(u),s=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function et(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return _({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Un(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(Ke(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Te(u)}}function mr(r,s){var u=Te(s.value),d=Te(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),d!=null&&(r.defaultValue=""+d)}function zs(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function V(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ie(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?V(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ce,Pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,u,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function Fe(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bn=["Webkit","ms","Moz","O"];Object.keys(yt).forEach(function(r){bn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),yt[s]=yt[r]})});function Qt(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||yt.hasOwnProperty(r)&&yt[r]?(""+s).trim():s+"px"}function Vn(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var d=u.indexOf("--")===0,g=Qt(u,s[u],d);u==="float"&&(u="cssFloat"),d?r.setProperty(u,g):r[u]=g}}var gr=_({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(r,s){if(s){if(gr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function yn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bt=null;function Ul(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Vl=null,Vr=null,Gr=null;function If(r){if(r=Yi(r)){if(typeof Vl!="function")throw Error(n(280));var s=r.stateNode;s&&(s=ao(s),Vl(r.stateNode,r.type,s))}}function Nf(r){Vr?Gr?Gr.push(r):Gr=[r]:Vr=r}function Tf(){if(Vr){var r=Vr,s=Gr;if(Gr=Vr=null,If(r),s)for(r=0;r<s.length;r++)If(s[r])}}function Af(r,s){return r(s)}function Pf(){}var Gl=!1;function Lf(r,s,u){if(Gl)return r(s,u);Gl=!0;try{return Af(r,s,u)}finally{Gl=!1,(Vr!==null||Gr!==null)&&(Pf(),Tf())}}function Ai(r,s){var u=r.stateNode;if(u===null)return null;var d=ao(u);if(d===null)return null;u=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Wl=!1;if(c)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Wl=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Wl=!1}function Sw(r,s,u,d,g,y,x,T,R){var $=Array.prototype.slice.call(arguments,3);try{s.apply(u,$)}catch(q){this.onError(q)}}var Li=!1,$s=null,Bs=!1,Hl=null,Cw={onError:function(r){Li=!0,$s=r}};function _w(r,s,u,d,g,y,x,T,R){Li=!1,$s=null,Sw.apply(Cw,arguments)}function Ew(r,s,u,d,g,y,x,T,R){if(_w.apply(this,arguments),Li){if(Li){var $=$s;Li=!1,$s=null}else throw Error(n(198));Bs||(Bs=!0,Hl=$)}}function yr(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function Rf(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function jf(r){if(yr(r)!==r)throw Error(n(188))}function bw(r){var s=r.alternate;if(!s){if(s=yr(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,d=s;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return jf(g),r;if(y===d)return jf(g),s;y=y.sibling}throw Error(n(188))}if(u.return!==d.return)u=g,d=y;else{for(var x=!1,T=g.child;T;){if(T===u){x=!0,u=g,d=y;break}if(T===d){x=!0,d=g,u=y;break}T=T.sibling}if(!x){for(T=y.child;T;){if(T===u){x=!0,u=y,d=g;break}if(T===d){x=!0,d=y,u=g;break}T=T.sibling}if(!x)throw Error(n(189))}}if(u.alternate!==d)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function Of(r){return r=bw(r),r!==null?Mf(r):null}function Mf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=Mf(r);if(s!==null)return s;r=r.sibling}return null}var Df=t.unstable_scheduleCallback,Ff=t.unstable_cancelCallback,Iw=t.unstable_shouldYield,Nw=t.unstable_requestPaint,nt=t.unstable_now,Tw=t.unstable_getCurrentPriorityLevel,Kl=t.unstable_ImmediatePriority,zf=t.unstable_UserBlockingPriority,Us=t.unstable_NormalPriority,Aw=t.unstable_LowPriority,$f=t.unstable_IdlePriority,Vs=null,wn=null;function Pw(r){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(Vs,r,void 0,(r.current.flags&128)===128)}catch{}}var ln=Math.clz32?Math.clz32:jw,Lw=Math.log,Rw=Math.LN2;function jw(r){return r>>>=0,r===0?32:31-(Lw(r)/Rw|0)|0}var Gs=64,Ws=4194304;function Ri(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Hs(r,s){var u=r.pendingLanes;if(u===0)return 0;var d=0,g=r.suspendedLanes,y=r.pingedLanes,x=u&268435455;if(x!==0){var T=x&~g;T!==0?d=Ri(T):(y&=x,y!==0&&(d=Ri(y)))}else x=u&~g,x!==0?d=Ri(x):y!==0&&(d=Ri(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)u=31-ln(s),g=1<<u,d|=r[u],s&=~g;return d}function Ow(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mw(r,s){for(var u=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes;0<y;){var x=31-ln(y),T=1<<x,R=g[x];R===-1?((T&u)===0||(T&d)!==0)&&(g[x]=Ow(T,s)):R<=s&&(r.expiredLanes|=T),y&=~T}}function ql(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Bf(){var r=Gs;return Gs<<=1,(Gs&4194240)===0&&(Gs=64),r}function Ql(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function ji(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-ln(s),r[s]=u}function Dw(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-ln(u),y=1<<g;s[g]=0,d[g]=-1,r[g]=-1,u&=~y}}function Xl(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var d=31-ln(u),g=1<<d;g&s|r[d]&s&&(r[d]|=s),u&=~g}}var Ue=0;function Uf(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Vf,Yl,Gf,Wf,Hf,Jl=!1,Ks=[],Gn=null,Wn=null,Hn=null,Oi=new Map,Mi=new Map,Kn=[],Fw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kf(r,s){switch(r){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Oi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(s.pointerId)}}function Di(r,s,u,d,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:s,domEventName:u,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=Yi(s),s!==null&&Yl(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function zw(r,s,u,d,g){switch(s){case"focusin":return Gn=Di(Gn,r,s,u,d,g),!0;case"dragenter":return Wn=Di(Wn,r,s,u,d,g),!0;case"mouseover":return Hn=Di(Hn,r,s,u,d,g),!0;case"pointerover":var y=g.pointerId;return Oi.set(y,Di(Oi.get(y)||null,r,s,u,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Mi.set(y,Di(Mi.get(y)||null,r,s,u,d,g)),!0}return!1}function qf(r){var s=wr(r.target);if(s!==null){var u=yr(s);if(u!==null){if(s=u.tag,s===13){if(s=Rf(u),s!==null){r.blockedOn=s,Hf(r.priority,function(){Gf(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function qs(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=ea(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Bt=d,u.target.dispatchEvent(d),Bt=null}else return s=Yi(u),s!==null&&Yl(s),r.blockedOn=u,!1;s.shift()}return!0}function Qf(r,s,u){qs(r)&&u.delete(s)}function $w(){Jl=!1,Gn!==null&&qs(Gn)&&(Gn=null),Wn!==null&&qs(Wn)&&(Wn=null),Hn!==null&&qs(Hn)&&(Hn=null),Oi.forEach(Qf),Mi.forEach(Qf)}function Fi(r,s){r.blockedOn===s&&(r.blockedOn=null,Jl||(Jl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,$w)))}function zi(r){function s(g){return Fi(g,r)}if(0<Ks.length){Fi(Ks[0],r);for(var u=1;u<Ks.length;u++){var d=Ks[u];d.blockedOn===r&&(d.blockedOn=null)}}for(Gn!==null&&Fi(Gn,r),Wn!==null&&Fi(Wn,r),Hn!==null&&Fi(Hn,r),Oi.forEach(s),Mi.forEach(s),u=0;u<Kn.length;u++)d=Kn[u],d.blockedOn===r&&(d.blockedOn=null);for(;0<Kn.length&&(u=Kn[0],u.blockedOn===null);)qf(u),u.blockedOn===null&&Kn.shift()}var Wr=B.ReactCurrentBatchConfig,Qs=!0;function Bw(r,s,u,d){var g=Ue,y=Wr.transition;Wr.transition=null;try{Ue=1,Zl(r,s,u,d)}finally{Ue=g,Wr.transition=y}}function Uw(r,s,u,d){var g=Ue,y=Wr.transition;Wr.transition=null;try{Ue=4,Zl(r,s,u,d)}finally{Ue=g,Wr.transition=y}}function Zl(r,s,u,d){if(Qs){var g=ea(r,s,u,d);if(g===null)ya(r,s,d,Xs,u),Kf(r,d);else if(zw(g,r,s,u,d))d.stopPropagation();else if(Kf(r,d),s&4&&-1<Fw.indexOf(r)){for(;g!==null;){var y=Yi(g);if(y!==null&&Vf(y),y=ea(r,s,u,d),y===null&&ya(r,s,d,Xs,u),y===g)break;g=y}g!==null&&d.stopPropagation()}else ya(r,s,d,null,u)}}var Xs=null;function ea(r,s,u,d){if(Xs=null,r=Ul(d),r=wr(r),r!==null)if(s=yr(r),s===null)r=null;else if(u=s.tag,u===13){if(r=Rf(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Xs=r,null}function Xf(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Tw()){case Kl:return 1;case zf:return 4;case Us:case Aw:return 16;case $f:return 536870912;default:return 16}default:return 16}}var qn=null,ta=null,Ys=null;function Yf(){if(Ys)return Ys;var r,s=ta,u=s.length,d,g="value"in qn?qn.value:qn.textContent,y=g.length;for(r=0;r<u&&s[r]===g[r];r++);var x=u-r;for(d=1;d<=x&&s[u-d]===g[y-d];d++);return Ys=g.slice(r,1<d?1-d:void 0)}function Js(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Zs(){return!0}function Jf(){return!1}function Ut(r){function s(u,d,g,y,x){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var T in r)r.hasOwnProperty(T)&&(u=r[T],this[T]=u?u(y):y[T]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Zs:Jf,this.isPropagationStopped=Jf,this}return _(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Zs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Zs)},persist:function(){},isPersistent:Zs}),s}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},na=Ut(Hr),$i=_({},Hr,{view:0,detail:0}),Vw=Ut($i),ra,ia,Bi,eo=_({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oa,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Bi&&(Bi&&r.type==="mousemove"?(ra=r.screenX-Bi.screenX,ia=r.screenY-Bi.screenY):ia=ra=0,Bi=r),ra)},movementY:function(r){return"movementY"in r?r.movementY:ia}}),Zf=Ut(eo),Gw=_({},eo,{dataTransfer:0}),Ww=Ut(Gw),Hw=_({},$i,{relatedTarget:0}),sa=Ut(Hw),Kw=_({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0}),qw=Ut(Kw),Qw=_({},Hr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Xw=Ut(Qw),Yw=_({},Hr,{data:0}),ed=Ut(Yw),Jw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zw={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"},ev={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tv(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=ev[r])?!!s[r]:!1}function oa(){return tv}var nv=_({},$i,{key:function(r){if(r.key){var s=Jw[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Js(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Zw[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oa,charCode:function(r){return r.type==="keypress"?Js(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Js(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),rv=Ut(nv),iv=_({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),td=Ut(iv),sv=_({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oa}),ov=Ut(sv),lv=_({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),av=Ut(lv),uv=_({},eo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),cv=Ut(uv),fv=[9,13,27,32],la=c&&"CompositionEvent"in window,Ui=null;c&&"documentMode"in document&&(Ui=document.documentMode);var dv=c&&"TextEvent"in window&&!Ui,nd=c&&(!la||Ui&&8<Ui&&11>=Ui),rd=" ",id=!1;function sd(r,s){switch(r){case"keyup":return fv.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function od(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Kr=!1;function hv(r,s){switch(r){case"compositionend":return od(s);case"keypress":return s.which!==32?null:(id=!0,rd);case"textInput":return r=s.data,r===rd&&id?null:r;default:return null}}function pv(r,s){if(Kr)return r==="compositionend"||!la&&sd(r,s)?(r=Yf(),Ys=ta=qn=null,Kr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return nd&&s.locale!=="ko"?null:s.data;default:return null}}var mv={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 ld(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!mv[r.type]:s==="textarea"}function ad(r,s,u,d){Nf(d),s=so(s,"onChange"),0<s.length&&(u=new na("onChange","change",null,u,d),r.push({event:u,listeners:s}))}var Vi=null,Gi=null;function gv(r){bd(r,0)}function to(r){var s=Jr(r);if(Ur(s))return r}function yv(r,s){if(r==="change")return s}var ud=!1;if(c){var aa;if(c){var ua="oninput"in document;if(!ua){var cd=document.createElement("div");cd.setAttribute("oninput","return;"),ua=typeof cd.oninput=="function"}aa=ua}else aa=!1;ud=aa&&(!document.documentMode||9<document.documentMode)}function fd(){Vi&&(Vi.detachEvent("onpropertychange",dd),Gi=Vi=null)}function dd(r){if(r.propertyName==="value"&&to(Gi)){var s=[];ad(s,Gi,r,Ul(r)),Lf(gv,s)}}function wv(r,s,u){r==="focusin"?(fd(),Vi=s,Gi=u,Vi.attachEvent("onpropertychange",dd)):r==="focusout"&&fd()}function vv(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return to(Gi)}function kv(r,s){if(r==="click")return to(s)}function xv(r,s){if(r==="input"||r==="change")return to(s)}function Sv(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var an=typeof Object.is=="function"?Object.is:Sv;function Wi(r,s){if(an(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),d=Object.keys(s);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!f.call(s,g)||!an(r[g],s[g]))return!1}return!0}function hd(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function pd(r,s){var u=hd(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=s&&d>=s)return{node:u,offset:s-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hd(u)}}function md(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?md(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function gd(){for(var r=window,s=Bn();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Bn(r.document)}return s}function ca(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function Cv(r){var s=gd(),u=r.focusedElem,d=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&md(u.ownerDocument.documentElement,u)){if(d!==null&&ca(u)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!r.extend&&y>d&&(g=d,d=y,y=g),g=pd(u,y);var x=pd(u,d);g&&x&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),y>d?(r.addRange(s),r.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var _v=c&&"documentMode"in document&&11>=document.documentMode,qr=null,fa=null,Hi=null,da=!1;function yd(r,s,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;da||qr==null||qr!==Bn(d)||(d=qr,"selectionStart"in d&&ca(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Hi&&Wi(Hi,d)||(Hi=d,d=so(fa,"onSelect"),0<d.length&&(s=new na("onSelect","select",null,s,u),r.push({event:s,listeners:d}),s.target=qr)))}function no(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Qr={animationend:no("Animation","AnimationEnd"),animationiteration:no("Animation","AnimationIteration"),animationstart:no("Animation","AnimationStart"),transitionend:no("Transition","TransitionEnd")},ha={},wd={};c&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function ro(r){if(ha[r])return ha[r];if(!Qr[r])return r;var s=Qr[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in wd)return ha[r]=s[u];return r}var vd=ro("animationend"),kd=ro("animationiteration"),xd=ro("animationstart"),Sd=ro("transitionend"),Cd=new Map,_d="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qn(r,s){Cd.set(r,s),l(s,[r])}for(var pa=0;pa<_d.length;pa++){var ma=_d[pa],Ev=ma.toLowerCase(),bv=ma[0].toUpperCase()+ma.slice(1);Qn(Ev,"on"+bv)}Qn(vd,"onAnimationEnd"),Qn(kd,"onAnimationIteration"),Qn(xd,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(Sd,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ki="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(" "),Iv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ki));function Ed(r,s,u){var d=r.type||"unknown-event";r.currentTarget=u,Ew(d,s,void 0,r),r.currentTarget=null}function bd(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var T=d[x],R=T.instance,$=T.currentTarget;if(T=T.listener,R!==y&&g.isPropagationStopped())break e;Ed(g,T,$),y=R}else for(x=0;x<d.length;x++){if(T=d[x],R=T.instance,$=T.currentTarget,T=T.listener,R!==y&&g.isPropagationStopped())break e;Ed(g,T,$),y=R}}}if(Bs)throw r=Hl,Bs=!1,Hl=null,r}function qe(r,s){var u=s[Ca];u===void 0&&(u=s[Ca]=new Set);var d=r+"__bubble";u.has(d)||(Id(s,r,2,!1),u.add(d))}function ga(r,s,u){var d=0;s&&(d|=4),Id(u,r,d,s)}var io="_reactListening"+Math.random().toString(36).slice(2);function qi(r){if(!r[io]){r[io]=!0,i.forEach(function(u){u!=="selectionchange"&&(Iv.has(u)||ga(u,!1,r),ga(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[io]||(s[io]=!0,ga("selectionchange",!1,s))}}function Id(r,s,u,d){switch(Xf(s)){case 1:var g=Bw;break;case 4:g=Uw;break;default:g=Zl}u=g.bind(null,s,u,r),g=void 0,!Wl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,u,{capture:!0,passive:g}):r.addEventListener(s,u,!0):g!==void 0?r.addEventListener(s,u,{passive:g}):r.addEventListener(s,u,!1)}function ya(r,s,u,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var T=d.stateNode.containerInfo;if(T===g||T.nodeType===8&&T.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===g||R.nodeType===8&&R.parentNode===g))return;x=x.return}for(;T!==null;){if(x=wr(T),x===null)return;if(R=x.tag,R===5||R===6){d=y=x;continue e}T=T.parentNode}}d=d.return}Lf(function(){var $=y,q=Ul(u),X=[];e:{var K=Cd.get(r);if(K!==void 0){var le=na,ce=r;switch(r){case"keypress":if(Js(u)===0)break e;case"keydown":case"keyup":le=rv;break;case"focusin":ce="focus",le=sa;break;case"focusout":ce="blur",le=sa;break;case"beforeblur":case"afterblur":le=sa;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=Zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=Ww;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=ov;break;case vd:case kd:case xd:le=qw;break;case Sd:le=av;break;case"scroll":le=Vw;break;case"wheel":le=cv;break;case"copy":case"cut":case"paste":le=Xw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=td}var de=(s&4)!==0,rt=!de&&r==="scroll",M=de?K!==null?K+"Capture":null:K;de=[];for(var j=$,F;j!==null;){F=j;var Z=F.stateNode;if(F.tag===5&&Z!==null&&(F=Z,M!==null&&(Z=Ai(j,M),Z!=null&&de.push(Qi(j,Z,F)))),rt)break;j=j.return}0<de.length&&(K=new le(K,ce,null,u,q),X.push({event:K,listeners:de}))}}if((s&7)===0){e:{if(K=r==="mouseover"||r==="pointerover",le=r==="mouseout"||r==="pointerout",K&&u!==Bt&&(ce=u.relatedTarget||u.fromElement)&&(wr(ce)||ce[In]))break e;if((le||K)&&(K=q.window===q?q:(K=q.ownerDocument)?K.defaultView||K.parentWindow:window,le?(ce=u.relatedTarget||u.toElement,le=$,ce=ce?wr(ce):null,ce!==null&&(rt=yr(ce),ce!==rt||ce.tag!==5&&ce.tag!==6)&&(ce=null)):(le=null,ce=$),le!==ce)){if(de=Zf,Z="onMouseLeave",M="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(de=td,Z="onPointerLeave",M="onPointerEnter",j="pointer"),rt=le==null?K:Jr(le),F=ce==null?K:Jr(ce),K=new de(Z,j+"leave",le,u,q),K.target=rt,K.relatedTarget=F,Z=null,wr(q)===$&&(de=new de(M,j+"enter",ce,u,q),de.target=F,de.relatedTarget=rt,Z=de),rt=Z,le&&ce)t:{for(de=le,M=ce,j=0,F=de;F;F=Xr(F))j++;for(F=0,Z=M;Z;Z=Xr(Z))F++;for(;0<j-F;)de=Xr(de),j--;for(;0<F-j;)M=Xr(M),F--;for(;j--;){if(de===M||M!==null&&de===M.alternate)break t;de=Xr(de),M=Xr(M)}de=null}else de=null;le!==null&&Nd(X,K,le,de,!1),ce!==null&&rt!==null&&Nd(X,rt,ce,de,!0)}}e:{if(K=$?Jr($):window,le=K.nodeName&&K.nodeName.toLowerCase(),le==="select"||le==="input"&&K.type==="file")var he=yv;else if(ld(K))if(ud)he=xv;else{he=vv;var ve=wv}else(le=K.nodeName)&&le.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(he=kv);if(he&&(he=he(r,$))){ad(X,he,u,q);break e}ve&&ve(r,K,$),r==="focusout"&&(ve=K._wrapperState)&&ve.controlled&&K.type==="number"&&Ie(K,"number",K.value)}switch(ve=$?Jr($):window,r){case"focusin":(ld(ve)||ve.contentEditable==="true")&&(qr=ve,fa=$,Hi=null);break;case"focusout":Hi=fa=qr=null;break;case"mousedown":da=!0;break;case"contextmenu":case"mouseup":case"dragend":da=!1,yd(X,u,q);break;case"selectionchange":if(_v)break;case"keydown":case"keyup":yd(X,u,q)}var ke;if(la)e:{switch(r){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Kr?sd(r,u)&&(_e="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(_e="onCompositionStart");_e&&(nd&&u.locale!=="ko"&&(Kr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Kr&&(ke=Yf()):(qn=q,ta="value"in qn?qn.value:qn.textContent,Kr=!0)),ve=so($,_e),0<ve.length&&(_e=new ed(_e,r,null,u,q),X.push({event:_e,listeners:ve}),ke?_e.data=ke:(ke=od(u),ke!==null&&(_e.data=ke)))),(ke=dv?hv(r,u):pv(r,u))&&($=so($,"onBeforeInput"),0<$.length&&(q=new ed("onBeforeInput","beforeinput",null,u,q),X.push({event:q,listeners:$}),q.data=ke))}bd(X,s)})}function Qi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function so(r,s){for(var u=s+"Capture",d=[];r!==null;){var g=r,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ai(r,u),y!=null&&d.unshift(Qi(r,y,g)),y=Ai(r,s),y!=null&&d.push(Qi(r,y,g))),r=r.return}return d}function Xr(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Nd(r,s,u,d,g){for(var y=s._reactName,x=[];u!==null&&u!==d;){var T=u,R=T.alternate,$=T.stateNode;if(R!==null&&R===d)break;T.tag===5&&$!==null&&(T=$,g?(R=Ai(u,y),R!=null&&x.unshift(Qi(u,R,T))):g||(R=Ai(u,y),R!=null&&x.push(Qi(u,R,T)))),u=u.return}x.length!==0&&r.push({event:s,listeners:x})}var Nv=/\r\n?/g,Tv=/\u0000|\uFFFD/g;function Td(r){return(typeof r=="string"?r:""+r).replace(Nv,`
|
|
7
|
-
`).replace(Tv,"")}function oo(r,s,u){if(s=Td(s),Td(r)!==s&&u)throw Error(n(425))}function lo(){}var wa=null,va=null;function ka(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var xa=typeof setTimeout=="function"?setTimeout:void 0,Av=typeof clearTimeout=="function"?clearTimeout:void 0,Ad=typeof Promise=="function"?Promise:void 0,Pv=typeof queueMicrotask=="function"?queueMicrotask:typeof Ad<"u"?function(r){return Ad.resolve(null).then(r).catch(Lv)}:xa;function Lv(r){setTimeout(function(){throw r})}function Sa(r,s){var u=s,d=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(d===0){r.removeChild(g),zi(s);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=g}while(u);zi(s)}function Xn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Pd(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var Yr=Math.random().toString(36).slice(2),vn="__reactFiber$"+Yr,Xi="__reactProps$"+Yr,In="__reactContainer$"+Yr,Ca="__reactEvents$"+Yr,Rv="__reactListeners$"+Yr,jv="__reactHandles$"+Yr;function wr(r){var s=r[vn];if(s)return s;for(var u=r.parentNode;u;){if(s=u[In]||u[vn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=Pd(r);r!==null;){if(u=r[vn])return u;r=Pd(r)}return s}r=u,u=r.parentNode}return null}function Yi(r){return r=r[vn]||r[In],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Jr(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ao(r){return r[Xi]||null}var _a=[],Zr=-1;function Yn(r){return{current:r}}function Qe(r){0>Zr||(r.current=_a[Zr],_a[Zr]=null,Zr--)}function We(r,s){Zr++,_a[Zr]=r.current,r.current=s}var Jn={},St=Yn(Jn),Rt=Yn(!1),vr=Jn;function ei(r,s){var u=r.type.contextTypes;if(!u)return Jn;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in u)g[y]=s[y];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function jt(r){return r=r.childContextTypes,r!=null}function uo(){Qe(Rt),Qe(St)}function Ld(r,s,u){if(St.current!==Jn)throw Error(n(168));We(St,s),We(Rt,u)}function Rd(r,s,u){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,je(r)||"Unknown",g));return _({},u,d)}function co(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Jn,vr=St.current,We(St,r),We(Rt,Rt.current),!0}function jd(r,s,u){var d=r.stateNode;if(!d)throw Error(n(169));u?(r=Rd(r,s,vr),d.__reactInternalMemoizedMergedChildContext=r,Qe(Rt),Qe(St),We(St,r)):Qe(Rt),We(Rt,u)}var Nn=null,fo=!1,Ea=!1;function Od(r){Nn===null?Nn=[r]:Nn.push(r)}function Ov(r){fo=!0,Od(r)}function Zn(){if(!Ea&&Nn!==null){Ea=!0;var r=0,s=Ue;try{var u=Nn;for(Ue=1;r<u.length;r++){var d=u[r];do d=d(!0);while(d!==null)}Nn=null,fo=!1}catch(g){throw Nn!==null&&(Nn=Nn.slice(r+1)),Df(Kl,Zn),g}finally{Ue=s,Ea=!1}}return null}var ti=[],ni=0,ho=null,po=0,Xt=[],Yt=0,kr=null,Tn=1,An="";function xr(r,s){ti[ni++]=po,ti[ni++]=ho,ho=r,po=s}function Md(r,s,u){Xt[Yt++]=Tn,Xt[Yt++]=An,Xt[Yt++]=kr,kr=r;var d=Tn;r=An;var g=32-ln(d)-1;d&=~(1<<g),u+=1;var y=32-ln(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Tn=1<<32-ln(s)+g|u<<g|d,An=y+r}else Tn=1<<y|u<<g|d,An=r}function ba(r){r.return!==null&&(xr(r,1),Md(r,1,0))}function Ia(r){for(;r===ho;)ho=ti[--ni],ti[ni]=null,po=ti[--ni],ti[ni]=null;for(;r===kr;)kr=Xt[--Yt],Xt[Yt]=null,An=Xt[--Yt],Xt[Yt]=null,Tn=Xt[--Yt],Xt[Yt]=null}var Vt=null,Gt=null,Xe=!1,un=null;function Dd(r,s){var u=tn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function Fd(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Vt=r,Gt=Xn(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Vt=r,Gt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=kr!==null?{id:Tn,overflow:An}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=tn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,Vt=r,Gt=null,!0):!1;default:return!1}}function Na(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Ta(r){if(Xe){var s=Gt;if(s){var u=s;if(!Fd(r,s)){if(Na(r))throw Error(n(418));s=Xn(u.nextSibling);var d=Vt;s&&Fd(r,s)?Dd(d,u):(r.flags=r.flags&-4097|2,Xe=!1,Vt=r)}}else{if(Na(r))throw Error(n(418));r.flags=r.flags&-4097|2,Xe=!1,Vt=r}}}function zd(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Vt=r}function mo(r){if(r!==Vt)return!1;if(!Xe)return zd(r),Xe=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!ka(r.type,r.memoizedProps)),s&&(s=Gt)){if(Na(r))throw $d(),Error(n(418));for(;s;)Dd(r,s),s=Xn(s.nextSibling)}if(zd(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Gt=Xn(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Gt=null}}else Gt=Vt?Xn(r.stateNode.nextSibling):null;return!0}function $d(){for(var r=Gt;r;)r=Xn(r.nextSibling)}function ri(){Gt=Vt=null,Xe=!1}function Aa(r){un===null?un=[r]:un.push(r)}var Mv=B.ReactCurrentBatchConfig;function Ji(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var d=u.stateNode}if(!d)throw Error(n(147,r));var g=d,y=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var T=g.refs;x===null?delete T[y]:T[y]=x},s._stringRef=y,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function go(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Bd(r){var s=r._init;return s(r._payload)}function Ud(r){function s(M,j){if(r){var F=M.deletions;F===null?(M.deletions=[j],M.flags|=16):F.push(j)}}function u(M,j){if(!r)return null;for(;j!==null;)s(M,j),j=j.sibling;return null}function d(M,j){for(M=new Map;j!==null;)j.key!==null?M.set(j.key,j):M.set(j.index,j),j=j.sibling;return M}function g(M,j){return M=lr(M,j),M.index=0,M.sibling=null,M}function y(M,j,F){return M.index=F,r?(F=M.alternate,F!==null?(F=F.index,F<j?(M.flags|=2,j):F):(M.flags|=2,j)):(M.flags|=1048576,j)}function x(M){return r&&M.alternate===null&&(M.flags|=2),M}function T(M,j,F,Z){return j===null||j.tag!==6?(j=xu(F,M.mode,Z),j.return=M,j):(j=g(j,F),j.return=M,j)}function R(M,j,F,Z){var he=F.type;return he===Q?q(M,j,F.props.children,Z,F.key):j!==null&&(j.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ge&&Bd(he)===j.type)?(Z=g(j,F.props),Z.ref=Ji(M,j,F),Z.return=M,Z):(Z=$o(F.type,F.key,F.props,null,M.mode,Z),Z.ref=Ji(M,j,F),Z.return=M,Z)}function $(M,j,F,Z){return j===null||j.tag!==4||j.stateNode.containerInfo!==F.containerInfo||j.stateNode.implementation!==F.implementation?(j=Su(F,M.mode,Z),j.return=M,j):(j=g(j,F.children||[]),j.return=M,j)}function q(M,j,F,Z,he){return j===null||j.tag!==7?(j=Tr(F,M.mode,Z,he),j.return=M,j):(j=g(j,F),j.return=M,j)}function X(M,j,F){if(typeof j=="string"&&j!==""||typeof j=="number")return j=xu(""+j,M.mode,F),j.return=M,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case P:return F=$o(j.type,j.key,j.props,null,M.mode,F),F.ref=Ji(M,null,j),F.return=M,F;case L:return j=Su(j,M.mode,F),j.return=M,j;case ge:var Z=j._init;return X(M,Z(j._payload),F)}if(Ke(j)||oe(j))return j=Tr(j,M.mode,F,null),j.return=M,j;go(M,j)}return null}function K(M,j,F,Z){var he=j!==null?j.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return he!==null?null:T(M,j,""+F,Z);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case P:return F.key===he?R(M,j,F,Z):null;case L:return F.key===he?$(M,j,F,Z):null;case ge:return he=F._init,K(M,j,he(F._payload),Z)}if(Ke(F)||oe(F))return he!==null?null:q(M,j,F,Z,null);go(M,F)}return null}function le(M,j,F,Z,he){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return M=M.get(F)||null,T(j,M,""+Z,he);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case P:return M=M.get(Z.key===null?F:Z.key)||null,R(j,M,Z,he);case L:return M=M.get(Z.key===null?F:Z.key)||null,$(j,M,Z,he);case ge:var ve=Z._init;return le(M,j,F,ve(Z._payload),he)}if(Ke(Z)||oe(Z))return M=M.get(F)||null,q(j,M,Z,he,null);go(j,Z)}return null}function ce(M,j,F,Z){for(var he=null,ve=null,ke=j,_e=j=0,pt=null;ke!==null&&_e<F.length;_e++){ke.index>_e?(pt=ke,ke=null):pt=ke.sibling;var Be=K(M,ke,F[_e],Z);if(Be===null){ke===null&&(ke=pt);break}r&&ke&&Be.alternate===null&&s(M,ke),j=y(Be,j,_e),ve===null?he=Be:ve.sibling=Be,ve=Be,ke=pt}if(_e===F.length)return u(M,ke),Xe&&xr(M,_e),he;if(ke===null){for(;_e<F.length;_e++)ke=X(M,F[_e],Z),ke!==null&&(j=y(ke,j,_e),ve===null?he=ke:ve.sibling=ke,ve=ke);return Xe&&xr(M,_e),he}for(ke=d(M,ke);_e<F.length;_e++)pt=le(ke,M,_e,F[_e],Z),pt!==null&&(r&&pt.alternate!==null&&ke.delete(pt.key===null?_e:pt.key),j=y(pt,j,_e),ve===null?he=pt:ve.sibling=pt,ve=pt);return r&&ke.forEach(function(ar){return s(M,ar)}),Xe&&xr(M,_e),he}function de(M,j,F,Z){var he=oe(F);if(typeof he!="function")throw Error(n(150));if(F=he.call(F),F==null)throw Error(n(151));for(var ve=he=null,ke=j,_e=j=0,pt=null,Be=F.next();ke!==null&&!Be.done;_e++,Be=F.next()){ke.index>_e?(pt=ke,ke=null):pt=ke.sibling;var ar=K(M,ke,Be.value,Z);if(ar===null){ke===null&&(ke=pt);break}r&&ke&&ar.alternate===null&&s(M,ke),j=y(ar,j,_e),ve===null?he=ar:ve.sibling=ar,ve=ar,ke=pt}if(Be.done)return u(M,ke),Xe&&xr(M,_e),he;if(ke===null){for(;!Be.done;_e++,Be=F.next())Be=X(M,Be.value,Z),Be!==null&&(j=y(Be,j,_e),ve===null?he=Be:ve.sibling=Be,ve=Be);return Xe&&xr(M,_e),he}for(ke=d(M,ke);!Be.done;_e++,Be=F.next())Be=le(ke,M,_e,Be.value,Z),Be!==null&&(r&&Be.alternate!==null&&ke.delete(Be.key===null?_e:Be.key),j=y(Be,j,_e),ve===null?he=Be:ve.sibling=Be,ve=Be);return r&&ke.forEach(function(mk){return s(M,mk)}),Xe&&xr(M,_e),he}function rt(M,j,F,Z){if(typeof F=="object"&&F!==null&&F.type===Q&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case P:e:{for(var he=F.key,ve=j;ve!==null;){if(ve.key===he){if(he=F.type,he===Q){if(ve.tag===7){u(M,ve.sibling),j=g(ve,F.props.children),j.return=M,M=j;break e}}else if(ve.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ge&&Bd(he)===ve.type){u(M,ve.sibling),j=g(ve,F.props),j.ref=Ji(M,ve,F),j.return=M,M=j;break e}u(M,ve);break}else s(M,ve);ve=ve.sibling}F.type===Q?(j=Tr(F.props.children,M.mode,Z,F.key),j.return=M,M=j):(Z=$o(F.type,F.key,F.props,null,M.mode,Z),Z.ref=Ji(M,j,F),Z.return=M,M=Z)}return x(M);case L:e:{for(ve=F.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===F.containerInfo&&j.stateNode.implementation===F.implementation){u(M,j.sibling),j=g(j,F.children||[]),j.return=M,M=j;break e}else{u(M,j);break}else s(M,j);j=j.sibling}j=Su(F,M.mode,Z),j.return=M,M=j}return x(M);case ge:return ve=F._init,rt(M,j,ve(F._payload),Z)}if(Ke(F))return ce(M,j,F,Z);if(oe(F))return de(M,j,F,Z);go(M,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,j!==null&&j.tag===6?(u(M,j.sibling),j=g(j,F),j.return=M,M=j):(u(M,j),j=xu(F,M.mode,Z),j.return=M,M=j),x(M)):u(M,j)}return rt}var ii=Ud(!0),Vd=Ud(!1),yo=Yn(null),wo=null,si=null,Pa=null;function La(){Pa=si=wo=null}function Ra(r){var s=yo.current;Qe(yo),r._currentValue=s}function ja(r,s,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===u)break;r=r.return}}function oi(r,s){wo=r,Pa=si=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Ot=!0),r.firstContext=null)}function Jt(r){var s=r._currentValue;if(Pa!==r)if(r={context:r,memoizedValue:s,next:null},si===null){if(wo===null)throw Error(n(308));si=r,wo.dependencies={lanes:0,firstContext:r}}else si=si.next=r;return s}var Sr=null;function Oa(r){Sr===null?Sr=[r]:Sr.push(r)}function Gd(r,s,u,d){var g=s.interleaved;return g===null?(u.next=u,Oa(s)):(u.next=g.next,g.next=u),s.interleaved=u,Pn(r,d)}function Pn(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var er=!1;function Ma(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Ln(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function tr(r,s,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ze&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Pn(r,u)}return g=d.interleaved,g===null?(s.next=s,Oa(d)):(s.next=g.next,g.next=s),d.interleaved=s,Pn(r,u)}function vo(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Xl(r,u)}}function Hd(r,s){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var x={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};y===null?g=y=x:y=y.next=x,u=u.next}while(u!==null);y===null?g=y=s:y=y.next=s}else g=y=s;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function ko(r,s,u,d){var g=r.updateQueue;er=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,T=g.shared.pending;if(T!==null){g.shared.pending=null;var R=T,$=R.next;R.next=null,x===null?y=$:x.next=$,x=R;var q=r.alternate;q!==null&&(q=q.updateQueue,T=q.lastBaseUpdate,T!==x&&(T===null?q.firstBaseUpdate=$:T.next=$,q.lastBaseUpdate=R))}if(y!==null){var X=g.baseState;x=0,q=$=R=null,T=y;do{var K=T.lane,le=T.eventTime;if((d&K)===K){q!==null&&(q=q.next={eventTime:le,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ce=r,de=T;switch(K=s,le=u,de.tag){case 1:if(ce=de.payload,typeof ce=="function"){X=ce.call(le,X,K);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=de.payload,K=typeof ce=="function"?ce.call(le,X,K):ce,K==null)break e;X=_({},X,K);break e;case 2:er=!0}}T.callback!==null&&T.lane!==0&&(r.flags|=64,K=g.effects,K===null?g.effects=[T]:K.push(T))}else le={eventTime:le,lane:K,tag:T.tag,payload:T.payload,callback:T.callback,next:null},q===null?($=q=le,R=X):q=q.next=le,x|=K;if(T=T.next,T===null){if(T=g.shared.pending,T===null)break;K=T,T=K.next,K.next=null,g.lastBaseUpdate=K,g.shared.pending=null}}while(!0);if(q===null&&(R=X),g.baseState=R,g.firstBaseUpdate=$,g.lastBaseUpdate=q,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);Er|=x,r.lanes=x,r.memoizedState=X}}function Kd(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=u,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Zi={},kn=Yn(Zi),es=Yn(Zi),ts=Yn(Zi);function Cr(r){if(r===Zi)throw Error(n(174));return r}function Da(r,s){switch(We(ts,s),We(es,r),We(kn,Zi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ie(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ie(s,r)}Qe(kn),We(kn,s)}function li(){Qe(kn),Qe(es),Qe(ts)}function qd(r){Cr(ts.current);var s=Cr(kn.current),u=ie(s,r.type);s!==u&&(We(es,r),We(kn,u))}function Fa(r){es.current===r&&(Qe(kn),Qe(es))}var Ye=Yn(0);function xo(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var za=[];function $a(){for(var r=0;r<za.length;r++)za[r]._workInProgressVersionPrimary=null;za.length=0}var So=B.ReactCurrentDispatcher,Ba=B.ReactCurrentBatchConfig,_r=0,Je=null,at=null,dt=null,Co=!1,ns=!1,rs=0,Dv=0;function Ct(){throw Error(n(321))}function Ua(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!an(r[u],s[u]))return!1;return!0}function Va(r,s,u,d,g,y){if(_r=y,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,So.current=r===null||r.memoizedState===null?Bv:Uv,r=u(d,g),ns){y=0;do{if(ns=!1,rs=0,25<=y)throw Error(n(301));y+=1,dt=at=null,s.updateQueue=null,So.current=Vv,r=u(d,g)}while(ns)}if(So.current=bo,s=at!==null&&at.next!==null,_r=0,dt=at=Je=null,Co=!1,s)throw Error(n(300));return r}function Ga(){var r=rs!==0;return rs=0,r}function xn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Je.memoizedState=dt=r:dt=dt.next=r,dt}function Zt(){if(at===null){var r=Je.alternate;r=r!==null?r.memoizedState:null}else r=at.next;var s=dt===null?Je.memoizedState:dt.next;if(s!==null)dt=s,at=r;else{if(r===null)throw Error(n(310));at=r,r={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},dt===null?Je.memoizedState=dt=r:dt=dt.next=r}return dt}function is(r,s){return typeof s=="function"?s(r):s}function Wa(r){var s=Zt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=at,g=d.baseQueue,y=u.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,u.pending=null}if(g!==null){y=g.next,d=d.baseState;var T=x=null,R=null,$=y;do{var q=$.lane;if((_r&q)===q)R!==null&&(R=R.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),d=$.hasEagerState?$.eagerState:r(d,$.action);else{var X={lane:q,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};R===null?(T=R=X,x=d):R=R.next=X,Je.lanes|=q,Er|=q}$=$.next}while($!==null&&$!==y);R===null?x=d:R.next=T,an(d,s.memoizedState)||(Ot=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=R,u.lastRenderedState=d}if(r=u.interleaved,r!==null){g=r;do y=g.lane,Je.lanes|=y,Er|=y,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Ha(r){var s=Zt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=u.dispatch,g=u.pending,y=s.memoizedState;if(g!==null){u.pending=null;var x=g=g.next;do y=r(y,x.action),x=x.next;while(x!==g);an(y,s.memoizedState)||(Ot=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),u.lastRenderedState=y}return[y,d]}function Qd(){}function Xd(r,s){var u=Je,d=Zt(),g=s(),y=!an(d.memoizedState,g);if(y&&(d.memoizedState=g,Ot=!0),d=d.queue,Ka(Zd.bind(null,u,d,r),[r]),d.getSnapshot!==s||y||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,ss(9,Jd.bind(null,u,d,g,s),void 0,null),ht===null)throw Error(n(349));(_r&30)!==0||Yd(u,s,g)}return g}function Yd(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Jd(r,s,u,d){s.value=u,s.getSnapshot=d,eh(s)&&th(r)}function Zd(r,s,u){return u(function(){eh(s)&&th(r)})}function eh(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!an(r,u)}catch{return!0}}function th(r){var s=Pn(r,1);s!==null&&hn(s,r,1,-1)}function nh(r){var s=xn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:r},s.queue=r,r=r.dispatch=$v.bind(null,Je,r),[s.memoizedState,r]}function ss(r,s,u,d){return r={tag:r,create:s,destroy:u,deps:d,next:null},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,s.lastEffect=r)),r}function rh(){return Zt().memoizedState}function _o(r,s,u,d){var g=xn();Je.flags|=r,g.memoizedState=ss(1|s,u,void 0,d===void 0?null:d)}function Eo(r,s,u,d){var g=Zt();d=d===void 0?null:d;var y=void 0;if(at!==null){var x=at.memoizedState;if(y=x.destroy,d!==null&&Ua(d,x.deps)){g.memoizedState=ss(s,u,y,d);return}}Je.flags|=r,g.memoizedState=ss(1|s,u,y,d)}function ih(r,s){return _o(8390656,8,r,s)}function Ka(r,s){return Eo(2048,8,r,s)}function sh(r,s){return Eo(4,2,r,s)}function oh(r,s){return Eo(4,4,r,s)}function lh(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function ah(r,s,u){return u=u!=null?u.concat([r]):null,Eo(4,4,lh.bind(null,s,r),u)}function qa(){}function uh(r,s){var u=Zt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Ua(s,d[1])?d[0]:(u.memoizedState=[r,s],r)}function ch(r,s){var u=Zt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Ua(s,d[1])?d[0]:(r=r(),u.memoizedState=[r,s],r)}function fh(r,s,u){return(_r&21)===0?(r.baseState&&(r.baseState=!1,Ot=!0),r.memoizedState=u):(an(u,s)||(u=Bf(),Je.lanes|=u,Er|=u,r.baseState=!0),s)}function Fv(r,s){var u=Ue;Ue=u!==0&&4>u?u:4,r(!0);var d=Ba.transition;Ba.transition={};try{r(!1),s()}finally{Ue=u,Ba.transition=d}}function dh(){return Zt().memoizedState}function zv(r,s,u){var d=sr(r);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},hh(r))ph(s,u);else if(u=Gd(r,s,u,d),u!==null){var g=Pt();hn(u,r,d,g),mh(u,s,d)}}function $v(r,s,u){var d=sr(r),g={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(hh(r))ph(s,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,T=y(x,u);if(g.hasEagerState=!0,g.eagerState=T,an(T,x)){var R=s.interleaved;R===null?(g.next=g,Oa(s)):(g.next=R.next,R.next=g),s.interleaved=g;return}}catch{}u=Gd(r,s,g,d),u!==null&&(g=Pt(),hn(u,r,d,g),mh(u,s,d))}}function hh(r){var s=r.alternate;return r===Je||s!==null&&s===Je}function ph(r,s){ns=Co=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function mh(r,s,u){if((u&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Xl(r,u)}}var bo={readContext:Jt,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},Bv={readContext:Jt,useCallback:function(r,s){return xn().memoizedState=[r,s===void 0?null:s],r},useContext:Jt,useEffect:ih,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,_o(4194308,4,lh.bind(null,s,r),u)},useLayoutEffect:function(r,s){return _o(4194308,4,r,s)},useInsertionEffect:function(r,s){return _o(4,2,r,s)},useMemo:function(r,s){var u=xn();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var d=xn();return s=u!==void 0?u(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=zv.bind(null,Je,r),[d.memoizedState,r]},useRef:function(r){var s=xn();return r={current:r},s.memoizedState=r},useState:nh,useDebugValue:qa,useDeferredValue:function(r){return xn().memoizedState=r},useTransition:function(){var r=nh(!1),s=r[0];return r=Fv.bind(null,r[1]),xn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var d=Je,g=xn();if(Xe){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),ht===null)throw Error(n(349));(_r&30)!==0||Yd(d,s,u)}g.memoizedState=u;var y={value:u,getSnapshot:s};return g.queue=y,ih(Zd.bind(null,d,y,r),[r]),d.flags|=2048,ss(9,Jd.bind(null,d,y,u,s),void 0,null),u},useId:function(){var r=xn(),s=ht.identifierPrefix;if(Xe){var u=An,d=Tn;u=(d&~(1<<32-ln(d)-1)).toString(32)+u,s=":"+s+"R"+u,u=rs++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Dv++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Uv={readContext:Jt,useCallback:uh,useContext:Jt,useEffect:Ka,useImperativeHandle:ah,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:ch,useReducer:Wa,useRef:rh,useState:function(){return Wa(is)},useDebugValue:qa,useDeferredValue:function(r){var s=Zt();return fh(s,at.memoizedState,r)},useTransition:function(){var r=Wa(is)[0],s=Zt().memoizedState;return[r,s]},useMutableSource:Qd,useSyncExternalStore:Xd,useId:dh,unstable_isNewReconciler:!1},Vv={readContext:Jt,useCallback:uh,useContext:Jt,useEffect:Ka,useImperativeHandle:ah,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:ch,useReducer:Ha,useRef:rh,useState:function(){return Ha(is)},useDebugValue:qa,useDeferredValue:function(r){var s=Zt();return at===null?s.memoizedState=r:fh(s,at.memoizedState,r)},useTransition:function(){var r=Ha(is)[0],s=Zt().memoizedState;return[r,s]},useMutableSource:Qd,useSyncExternalStore:Xd,useId:dh,unstable_isNewReconciler:!1};function cn(r,s){if(r&&r.defaultProps){s=_({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Qa(r,s,u,d){s=r.memoizedState,u=u(d,s),u=u==null?s:_({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Io={isMounted:function(r){return(r=r._reactInternals)?yr(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var d=Pt(),g=sr(r),y=Ln(d,g);y.payload=s,u!=null&&(y.callback=u),s=tr(r,y,g),s!==null&&(hn(s,r,g,d),vo(s,r,g))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var d=Pt(),g=sr(r),y=Ln(d,g);y.tag=1,y.payload=s,u!=null&&(y.callback=u),s=tr(r,y,g),s!==null&&(hn(s,r,g,d),vo(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=Pt(),d=sr(r),g=Ln(u,d);g.tag=2,s!=null&&(g.callback=s),s=tr(r,g,d),s!==null&&(hn(s,r,d,u),vo(s,r,d))}};function gh(r,s,u,d,g,y,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!Wi(u,d)||!Wi(g,y):!0}function yh(r,s,u){var d=!1,g=Jn,y=s.contextType;return typeof y=="object"&&y!==null?y=Jt(y):(g=jt(s)?vr:St.current,d=s.contextTypes,y=(d=d!=null)?ei(r,g):Jn),s=new s(u,y),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Io,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=y),s}function wh(r,s,u,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==r&&Io.enqueueReplaceState(s,s.state,null)}function Xa(r,s,u,d){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},Ma(r);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Jt(y):(y=jt(s)?vr:St.current,g.context=ei(r,y)),g.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qa(r,s,y,u),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Io.enqueueReplaceState(g,g.state,null),ko(r,u,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function ai(r,s){try{var u="",d=s;do u+=Ee(d),d=d.return;while(d);var g=u}catch(y){g=`
|
|
6
|
+
`+g[x].replace(" at new "," at ");return r.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",r.displayName)),R}while(1<=x&&0<=T);break}}}finally{N=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function Ce(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=pe(r.type,!1),r;case 11:return r=pe(r.type.render,!1),r;case 1:return r=pe(r.type,!0),r;default:return""}}function ye(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Q:return"Fragment";case L:return"Portal";case ue:return"Profiler";case oe:return"StrictMode";case fe:return"Suspense";case ie:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ne:return(r.displayName||"Context")+".Consumer";case D:return(r._context.displayName||"Context")+".Provider";case re:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return s=r.displayName||null,s!==null?s:ye(r.type)||"Memo";case ge:s=r._payload,r=r._init;try{return ye(r(s))}catch{}}return null}function je(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(s);case 8:return s===oe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Te(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function De(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ze(r){var s=De(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,y=u.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){d=""+x,y.call(this,x)}}),Object.defineProperty(r,s,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(x){d=""+x},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function qt(r){r._valueTracker||(r._valueTracker=Ze(r))}function Ur(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var u=s.getValue(),d="";return r&&(d=De(r)?r.checked?"true":"false":r.value),r=d,r!==u?(s.setValue(r),!0):!1}function Bn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function B(r,s){var u=s.checked;return _({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function H(r,s){var u=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;u=Te(s.value!=null?s.value:u),r._wrapperState={initialChecked:d,initialValue:u,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function we(r,s){s=s.checked,s!=null&&A(r,"checked",s,!1)}function Se(r,s){we(r,s);var u=Te(s.value),d=s.type;if(u!=null)d==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Ie(r,s.type,u):s.hasOwnProperty("defaultValue")&&Ie(r,s.type,Te(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Oe(r,s,u){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,u||s===r.value||(r.value=s),r.defaultValue=s}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Ie(r,s,u){(s!=="number"||Bn(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Ke=Array.isArray;function st(r,s,u,d){if(r=r.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=s.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&d&&(r[u].defaultSelected=!0)}else{for(u=""+Te(u),s=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function et(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return _({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Un(r,s){var u=s.value;if(u==null){if(u=s.children,s=s.defaultValue,u!=null){if(s!=null)throw Error(n(92));if(Ke(u)){if(1<u.length)throw Error(n(93));u=u[0]}s=u}s==null&&(s=""),u=s}r._wrapperState={initialValue:Te(u)}}function mr(r,s){var u=Te(s.value),d=Te(s.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),s.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),d!=null&&(r.defaultValue=""+d)}function zs(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function V(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?V(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var _e,Pe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,u,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,u,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(_e=_e||document.createElement("div"),_e.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=_e.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function Fe(r,s){if(s){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=s;return}}r.textContent=s}var yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bn=["Webkit","ms","Moz","O"];Object.keys(yt).forEach(function(r){bn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),yt[s]=yt[r]})});function Qt(r,s,u){return s==null||typeof s=="boolean"||s===""?"":u||typeof s!="number"||s===0||yt.hasOwnProperty(r)&&yt[r]?(""+s).trim():s+"px"}function Vn(r,s){r=r.style;for(var u in s)if(s.hasOwnProperty(u)){var d=u.indexOf("--")===0,g=Qt(u,s[u],d);u==="float"&&(u="cssFloat"),d?r.setProperty(u,g):r[u]=g}}var gr=_({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wt(r,s){if(s){if(gr[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function yn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bt=null;function Ul(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Vl=null,Vr=null,Gr=null;function If(r){if(r=Yi(r)){if(typeof Vl!="function")throw Error(n(280));var s=r.stateNode;s&&(s=ao(s),Vl(r.stateNode,r.type,s))}}function Nf(r){Vr?Gr?Gr.push(r):Gr=[r]:Vr=r}function Tf(){if(Vr){var r=Vr,s=Gr;if(Gr=Vr=null,If(r),s)for(r=0;r<s.length;r++)If(s[r])}}function Af(r,s){return r(s)}function Pf(){}var Gl=!1;function Lf(r,s,u){if(Gl)return r(s,u);Gl=!0;try{return Af(r,s,u)}finally{Gl=!1,(Vr!==null||Gr!==null)&&(Pf(),Tf())}}function Ai(r,s){var u=r.stateNode;if(u===null)return null;var d=ao(u);if(d===null)return null;u=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var Wl=!1;if(c)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Wl=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Wl=!1}function xw(r,s,u,d,g,y,x,T,R){var z=Array.prototype.slice.call(arguments,3);try{s.apply(u,z)}catch(q){this.onError(q)}}var Li=!1,$s=null,Bs=!1,Hl=null,Sw={onError:function(r){Li=!0,$s=r}};function Cw(r,s,u,d,g,y,x,T,R){Li=!1,$s=null,xw.apply(Sw,arguments)}function _w(r,s,u,d,g,y,x,T,R){if(Cw.apply(this,arguments),Li){if(Li){var z=$s;Li=!1,$s=null}else throw Error(n(198));Bs||(Bs=!0,Hl=z)}}function yr(r){var s=r,u=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(u=s.return),r=s.return;while(r)}return s.tag===3?u:null}function Rf(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function jf(r){if(yr(r)!==r)throw Error(n(188))}function Ew(r){var s=r.alternate;if(!s){if(s=yr(r),s===null)throw Error(n(188));return s!==r?null:r}for(var u=r,d=s;;){var g=u.return;if(g===null)break;var y=g.alternate;if(y===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===u)return jf(g),r;if(y===d)return jf(g),s;y=y.sibling}throw Error(n(188))}if(u.return!==d.return)u=g,d=y;else{for(var x=!1,T=g.child;T;){if(T===u){x=!0,u=g,d=y;break}if(T===d){x=!0,d=g,u=y;break}T=T.sibling}if(!x){for(T=y.child;T;){if(T===u){x=!0,u=y,d=g;break}if(T===d){x=!0,d=y,u=g;break}T=T.sibling}if(!x)throw Error(n(189))}}if(u.alternate!==d)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:s}function Of(r){return r=Ew(r),r!==null?Mf(r):null}function Mf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=Mf(r);if(s!==null)return s;r=r.sibling}return null}var Df=t.unstable_scheduleCallback,Ff=t.unstable_cancelCallback,bw=t.unstable_shouldYield,Iw=t.unstable_requestPaint,nt=t.unstable_now,Nw=t.unstable_getCurrentPriorityLevel,Kl=t.unstable_ImmediatePriority,zf=t.unstable_UserBlockingPriority,Us=t.unstable_NormalPriority,Tw=t.unstable_LowPriority,$f=t.unstable_IdlePriority,Vs=null,wn=null;function Aw(r){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(Vs,r,void 0,(r.current.flags&128)===128)}catch{}}var ln=Math.clz32?Math.clz32:Rw,Pw=Math.log,Lw=Math.LN2;function Rw(r){return r>>>=0,r===0?32:31-(Pw(r)/Lw|0)|0}var Gs=64,Ws=4194304;function Ri(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Hs(r,s){var u=r.pendingLanes;if(u===0)return 0;var d=0,g=r.suspendedLanes,y=r.pingedLanes,x=u&268435455;if(x!==0){var T=x&~g;T!==0?d=Ri(T):(y&=x,y!==0&&(d=Ri(y)))}else x=u&~g,x!==0?d=Ri(x):y!==0&&(d=Ri(y));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((d&4)!==0&&(d|=u&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)u=31-ln(s),g=1<<u,d|=r[u],s&=~g;return d}function jw(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ow(r,s){for(var u=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,y=r.pendingLanes;0<y;){var x=31-ln(y),T=1<<x,R=g[x];R===-1?((T&u)===0||(T&d)!==0)&&(g[x]=jw(T,s)):R<=s&&(r.expiredLanes|=T),y&=~T}}function ql(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Bf(){var r=Gs;return Gs<<=1,(Gs&4194240)===0&&(Gs=64),r}function Ql(r){for(var s=[],u=0;31>u;u++)s.push(r);return s}function ji(r,s,u){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-ln(s),r[s]=u}function Mw(r,s){var u=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-ln(u),y=1<<g;s[g]=0,d[g]=-1,r[g]=-1,u&=~y}}function Xl(r,s){var u=r.entangledLanes|=s;for(r=r.entanglements;u;){var d=31-ln(u),g=1<<d;g&s|r[d]&s&&(r[d]|=s),u&=~g}}var Ue=0;function Uf(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Vf,Yl,Gf,Wf,Hf,Jl=!1,Ks=[],Gn=null,Wn=null,Hn=null,Oi=new Map,Mi=new Map,Kn=[],Dw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Kf(r,s){switch(r){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Oi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(s.pointerId)}}function Di(r,s,u,d,g,y){return r===null||r.nativeEvent!==y?(r={blockedOn:s,domEventName:u,eventSystemFlags:d,nativeEvent:y,targetContainers:[g]},s!==null&&(s=Yi(s),s!==null&&Yl(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function Fw(r,s,u,d,g){switch(s){case"focusin":return Gn=Di(Gn,r,s,u,d,g),!0;case"dragenter":return Wn=Di(Wn,r,s,u,d,g),!0;case"mouseover":return Hn=Di(Hn,r,s,u,d,g),!0;case"pointerover":var y=g.pointerId;return Oi.set(y,Di(Oi.get(y)||null,r,s,u,d,g)),!0;case"gotpointercapture":return y=g.pointerId,Mi.set(y,Di(Mi.get(y)||null,r,s,u,d,g)),!0}return!1}function qf(r){var s=wr(r.target);if(s!==null){var u=yr(s);if(u!==null){if(s=u.tag,s===13){if(s=Rf(u),s!==null){r.blockedOn=s,Hf(r.priority,function(){Gf(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function qs(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var u=ea(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Bt=d,u.target.dispatchEvent(d),Bt=null}else return s=Yi(u),s!==null&&Yl(s),r.blockedOn=u,!1;s.shift()}return!0}function Qf(r,s,u){qs(r)&&u.delete(s)}function zw(){Jl=!1,Gn!==null&&qs(Gn)&&(Gn=null),Wn!==null&&qs(Wn)&&(Wn=null),Hn!==null&&qs(Hn)&&(Hn=null),Oi.forEach(Qf),Mi.forEach(Qf)}function Fi(r,s){r.blockedOn===s&&(r.blockedOn=null,Jl||(Jl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zw)))}function zi(r){function s(g){return Fi(g,r)}if(0<Ks.length){Fi(Ks[0],r);for(var u=1;u<Ks.length;u++){var d=Ks[u];d.blockedOn===r&&(d.blockedOn=null)}}for(Gn!==null&&Fi(Gn,r),Wn!==null&&Fi(Wn,r),Hn!==null&&Fi(Hn,r),Oi.forEach(s),Mi.forEach(s),u=0;u<Kn.length;u++)d=Kn[u],d.blockedOn===r&&(d.blockedOn=null);for(;0<Kn.length&&(u=Kn[0],u.blockedOn===null);)qf(u),u.blockedOn===null&&Kn.shift()}var Wr=$.ReactCurrentBatchConfig,Qs=!0;function $w(r,s,u,d){var g=Ue,y=Wr.transition;Wr.transition=null;try{Ue=1,Zl(r,s,u,d)}finally{Ue=g,Wr.transition=y}}function Bw(r,s,u,d){var g=Ue,y=Wr.transition;Wr.transition=null;try{Ue=4,Zl(r,s,u,d)}finally{Ue=g,Wr.transition=y}}function Zl(r,s,u,d){if(Qs){var g=ea(r,s,u,d);if(g===null)ya(r,s,d,Xs,u),Kf(r,d);else if(Fw(g,r,s,u,d))d.stopPropagation();else if(Kf(r,d),s&4&&-1<Dw.indexOf(r)){for(;g!==null;){var y=Yi(g);if(y!==null&&Vf(y),y=ea(r,s,u,d),y===null&&ya(r,s,d,Xs,u),y===g)break;g=y}g!==null&&d.stopPropagation()}else ya(r,s,d,null,u)}}var Xs=null;function ea(r,s,u,d){if(Xs=null,r=Ul(d),r=wr(r),r!==null)if(s=yr(r),s===null)r=null;else if(u=s.tag,u===13){if(r=Rf(s),r!==null)return r;r=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return Xs=r,null}function Xf(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Nw()){case Kl:return 1;case zf:return 4;case Us:case Tw:return 16;case $f:return 536870912;default:return 16}default:return 16}}var qn=null,ta=null,Ys=null;function Yf(){if(Ys)return Ys;var r,s=ta,u=s.length,d,g="value"in qn?qn.value:qn.textContent,y=g.length;for(r=0;r<u&&s[r]===g[r];r++);var x=u-r;for(d=1;d<=x&&s[u-d]===g[y-d];d++);return Ys=g.slice(r,1<d?1-d:void 0)}function Js(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function Zs(){return!0}function Jf(){return!1}function Ut(r){function s(u,d,g,y,x){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var T in r)r.hasOwnProperty(T)&&(u=r[T],this[T]=u?u(y):y[T]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Zs:Jf,this.isPropagationStopped=Jf,this}return _(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Zs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Zs)},persist:function(){},isPersistent:Zs}),s}var Hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},na=Ut(Hr),$i=_({},Hr,{view:0,detail:0}),Uw=Ut($i),ra,ia,Bi,eo=_({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oa,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Bi&&(Bi&&r.type==="mousemove"?(ra=r.screenX-Bi.screenX,ia=r.screenY-Bi.screenY):ia=ra=0,Bi=r),ra)},movementY:function(r){return"movementY"in r?r.movementY:ia}}),Zf=Ut(eo),Vw=_({},eo,{dataTransfer:0}),Gw=Ut(Vw),Ww=_({},$i,{relatedTarget:0}),sa=Ut(Ww),Hw=_({},Hr,{animationName:0,elapsedTime:0,pseudoElement:0}),Kw=Ut(Hw),qw=_({},Hr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Qw=Ut(qw),Xw=_({},Hr,{data:0}),ed=Ut(Xw),Yw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jw={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"},Zw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ev(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=Zw[r])?!!s[r]:!1}function oa(){return ev}var tv=_({},$i,{key:function(r){if(r.key){var s=Yw[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Js(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Jw[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oa,charCode:function(r){return r.type==="keypress"?Js(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Js(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),nv=Ut(tv),rv=_({},eo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),td=Ut(rv),iv=_({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oa}),sv=Ut(iv),ov=_({},Hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),lv=Ut(ov),av=_({},eo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),uv=Ut(av),cv=[9,13,27,32],la=c&&"CompositionEvent"in window,Ui=null;c&&"documentMode"in document&&(Ui=document.documentMode);var fv=c&&"TextEvent"in window&&!Ui,nd=c&&(!la||Ui&&8<Ui&&11>=Ui),rd=" ",id=!1;function sd(r,s){switch(r){case"keyup":return cv.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function od(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Kr=!1;function dv(r,s){switch(r){case"compositionend":return od(s);case"keypress":return s.which!==32?null:(id=!0,rd);case"textInput":return r=s.data,r===rd&&id?null:r;default:return null}}function hv(r,s){if(Kr)return r==="compositionend"||!la&&sd(r,s)?(r=Yf(),Ys=ta=qn=null,Kr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return nd&&s.locale!=="ko"?null:s.data;default:return null}}var pv={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 ld(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!pv[r.type]:s==="textarea"}function ad(r,s,u,d){Nf(d),s=so(s,"onChange"),0<s.length&&(u=new na("onChange","change",null,u,d),r.push({event:u,listeners:s}))}var Vi=null,Gi=null;function mv(r){bd(r,0)}function to(r){var s=Jr(r);if(Ur(s))return r}function gv(r,s){if(r==="change")return s}var ud=!1;if(c){var aa;if(c){var ua="oninput"in document;if(!ua){var cd=document.createElement("div");cd.setAttribute("oninput","return;"),ua=typeof cd.oninput=="function"}aa=ua}else aa=!1;ud=aa&&(!document.documentMode||9<document.documentMode)}function fd(){Vi&&(Vi.detachEvent("onpropertychange",dd),Gi=Vi=null)}function dd(r){if(r.propertyName==="value"&&to(Gi)){var s=[];ad(s,Gi,r,Ul(r)),Lf(mv,s)}}function yv(r,s,u){r==="focusin"?(fd(),Vi=s,Gi=u,Vi.attachEvent("onpropertychange",dd)):r==="focusout"&&fd()}function wv(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return to(Gi)}function vv(r,s){if(r==="click")return to(s)}function kv(r,s){if(r==="input"||r==="change")return to(s)}function xv(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var an=typeof Object.is=="function"?Object.is:xv;function Wi(r,s){if(an(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var u=Object.keys(r),d=Object.keys(s);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!f.call(s,g)||!an(r[g],s[g]))return!1}return!0}function hd(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function pd(r,s){var u=hd(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=s&&d>=s)return{node:u,offset:s-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=hd(u)}}function md(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?md(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function gd(){for(var r=window,s=Bn();s instanceof r.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)r=s.contentWindow;else break;s=Bn(r.document)}return s}function ca(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function Sv(r){var s=gd(),u=r.focusedElem,d=r.selectionRange;if(s!==u&&u&&u.ownerDocument&&md(u.ownerDocument.documentElement,u)){if(d!==null&&ca(u)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in u)u.selectionStart=s,u.selectionEnd=Math.min(r,u.value.length);else if(r=(s=u.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,y=Math.min(d.start,g);d=d.end===void 0?y:Math.min(d.end,g),!r.extend&&y>d&&(g=d,d=y,y=g),g=pd(u,y);var x=pd(u,d);g&&x&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),y>d?(r.addRange(s),r.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),r.addRange(s)))}}for(s=[],r=u;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<s.length;u++)r=s[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var Cv=c&&"documentMode"in document&&11>=document.documentMode,qr=null,fa=null,Hi=null,da=!1;function yd(r,s,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;da||qr==null||qr!==Bn(d)||(d=qr,"selectionStart"in d&&ca(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Hi&&Wi(Hi,d)||(Hi=d,d=so(fa,"onSelect"),0<d.length&&(s=new na("onSelect","select",null,s,u),r.push({event:s,listeners:d}),s.target=qr)))}function no(r,s){var u={};return u[r.toLowerCase()]=s.toLowerCase(),u["Webkit"+r]="webkit"+s,u["Moz"+r]="moz"+s,u}var Qr={animationend:no("Animation","AnimationEnd"),animationiteration:no("Animation","AnimationIteration"),animationstart:no("Animation","AnimationStart"),transitionend:no("Transition","TransitionEnd")},ha={},wd={};c&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function ro(r){if(ha[r])return ha[r];if(!Qr[r])return r;var s=Qr[r],u;for(u in s)if(s.hasOwnProperty(u)&&u in wd)return ha[r]=s[u];return r}var vd=ro("animationend"),kd=ro("animationiteration"),xd=ro("animationstart"),Sd=ro("transitionend"),Cd=new Map,_d="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Qn(r,s){Cd.set(r,s),l(s,[r])}for(var pa=0;pa<_d.length;pa++){var ma=_d[pa],_v=ma.toLowerCase(),Ev=ma[0].toUpperCase()+ma.slice(1);Qn(_v,"on"+Ev)}Qn(vd,"onAnimationEnd"),Qn(kd,"onAnimationIteration"),Qn(xd,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(Sd,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ki="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(" "),bv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ki));function Ed(r,s,u){var d=r.type||"unknown-event";r.currentTarget=u,_w(d,s,void 0,r),r.currentTarget=null}function bd(r,s){s=(s&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],g=d.event;d=d.listeners;e:{var y=void 0;if(s)for(var x=d.length-1;0<=x;x--){var T=d[x],R=T.instance,z=T.currentTarget;if(T=T.listener,R!==y&&g.isPropagationStopped())break e;Ed(g,T,z),y=R}else for(x=0;x<d.length;x++){if(T=d[x],R=T.instance,z=T.currentTarget,T=T.listener,R!==y&&g.isPropagationStopped())break e;Ed(g,T,z),y=R}}}if(Bs)throw r=Hl,Bs=!1,Hl=null,r}function qe(r,s){var u=s[Ca];u===void 0&&(u=s[Ca]=new Set);var d=r+"__bubble";u.has(d)||(Id(s,r,2,!1),u.add(d))}function ga(r,s,u){var d=0;s&&(d|=4),Id(u,r,d,s)}var io="_reactListening"+Math.random().toString(36).slice(2);function qi(r){if(!r[io]){r[io]=!0,i.forEach(function(u){u!=="selectionchange"&&(bv.has(u)||ga(u,!1,r),ga(u,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[io]||(s[io]=!0,ga("selectionchange",!1,s))}}function Id(r,s,u,d){switch(Xf(s)){case 1:var g=$w;break;case 4:g=Bw;break;default:g=Zl}u=g.bind(null,s,u,r),g=void 0,!Wl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,u,{capture:!0,passive:g}):r.addEventListener(s,u,!0):g!==void 0?r.addEventListener(s,u,{passive:g}):r.addEventListener(s,u,!1)}function ya(r,s,u,d,g){var y=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var x=d.tag;if(x===3||x===4){var T=d.stateNode.containerInfo;if(T===g||T.nodeType===8&&T.parentNode===g)break;if(x===4)for(x=d.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===g||R.nodeType===8&&R.parentNode===g))return;x=x.return}for(;T!==null;){if(x=wr(T),x===null)return;if(R=x.tag,R===5||R===6){d=y=x;continue e}T=T.parentNode}}d=d.return}Lf(function(){var z=y,q=Ul(u),X=[];e:{var K=Cd.get(r);if(K!==void 0){var le=na,ce=r;switch(r){case"keypress":if(Js(u)===0)break e;case"keydown":case"keyup":le=nv;break;case"focusin":ce="focus",le=sa;break;case"focusout":ce="blur",le=sa;break;case"beforeblur":case"afterblur":le=sa;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=Zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=Gw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=sv;break;case vd:case kd:case xd:le=Kw;break;case Sd:le=lv;break;case"scroll":le=Uw;break;case"wheel":le=uv;break;case"copy":case"cut":case"paste":le=Qw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=td}var de=(s&4)!==0,rt=!de&&r==="scroll",M=de?K!==null?K+"Capture":null:K;de=[];for(var j=z,F;j!==null;){F=j;var ee=F.stateNode;if(F.tag===5&&ee!==null&&(F=ee,M!==null&&(ee=Ai(j,M),ee!=null&&de.push(Qi(j,ee,F)))),rt)break;j=j.return}0<de.length&&(K=new le(K,ce,null,u,q),X.push({event:K,listeners:de}))}}if((s&7)===0){e:{if(K=r==="mouseover"||r==="pointerover",le=r==="mouseout"||r==="pointerout",K&&u!==Bt&&(ce=u.relatedTarget||u.fromElement)&&(wr(ce)||ce[In]))break e;if((le||K)&&(K=q.window===q?q:(K=q.ownerDocument)?K.defaultView||K.parentWindow:window,le?(ce=u.relatedTarget||u.toElement,le=z,ce=ce?wr(ce):null,ce!==null&&(rt=yr(ce),ce!==rt||ce.tag!==5&&ce.tag!==6)&&(ce=null)):(le=null,ce=z),le!==ce)){if(de=Zf,ee="onMouseLeave",M="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(de=td,ee="onPointerLeave",M="onPointerEnter",j="pointer"),rt=le==null?K:Jr(le),F=ce==null?K:Jr(ce),K=new de(ee,j+"leave",le,u,q),K.target=rt,K.relatedTarget=F,ee=null,wr(q)===z&&(de=new de(M,j+"enter",ce,u,q),de.target=F,de.relatedTarget=rt,ee=de),rt=ee,le&&ce)t:{for(de=le,M=ce,j=0,F=de;F;F=Xr(F))j++;for(F=0,ee=M;ee;ee=Xr(ee))F++;for(;0<j-F;)de=Xr(de),j--;for(;0<F-j;)M=Xr(M),F--;for(;j--;){if(de===M||M!==null&&de===M.alternate)break t;de=Xr(de),M=Xr(M)}de=null}else de=null;le!==null&&Nd(X,K,le,de,!1),ce!==null&&rt!==null&&Nd(X,rt,ce,de,!0)}}e:{if(K=z?Jr(z):window,le=K.nodeName&&K.nodeName.toLowerCase(),le==="select"||le==="input"&&K.type==="file")var he=gv;else if(ld(K))if(ud)he=kv;else{he=wv;var ve=yv}else(le=K.nodeName)&&le.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(he=vv);if(he&&(he=he(r,z))){ad(X,he,u,q);break e}ve&&ve(r,K,z),r==="focusout"&&(ve=K._wrapperState)&&ve.controlled&&K.type==="number"&&Ie(K,"number",K.value)}switch(ve=z?Jr(z):window,r){case"focusin":(ld(ve)||ve.contentEditable==="true")&&(qr=ve,fa=z,Hi=null);break;case"focusout":Hi=fa=qr=null;break;case"mousedown":da=!0;break;case"contextmenu":case"mouseup":case"dragend":da=!1,yd(X,u,q);break;case"selectionchange":if(Cv)break;case"keydown":case"keyup":yd(X,u,q)}var ke;if(la)e:{switch(r){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else Kr?sd(r,u)&&(Ee="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ee="onCompositionStart");Ee&&(nd&&u.locale!=="ko"&&(Kr||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&Kr&&(ke=Yf()):(qn=q,ta="value"in qn?qn.value:qn.textContent,Kr=!0)),ve=so(z,Ee),0<ve.length&&(Ee=new ed(Ee,r,null,u,q),X.push({event:Ee,listeners:ve}),ke?Ee.data=ke:(ke=od(u),ke!==null&&(Ee.data=ke)))),(ke=fv?dv(r,u):hv(r,u))&&(z=so(z,"onBeforeInput"),0<z.length&&(q=new ed("onBeforeInput","beforeinput",null,u,q),X.push({event:q,listeners:z}),q.data=ke))}bd(X,s)})}function Qi(r,s,u){return{instance:r,listener:s,currentTarget:u}}function so(r,s){for(var u=s+"Capture",d=[];r!==null;){var g=r,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ai(r,u),y!=null&&d.unshift(Qi(r,y,g)),y=Ai(r,s),y!=null&&d.push(Qi(r,y,g))),r=r.return}return d}function Xr(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Nd(r,s,u,d,g){for(var y=s._reactName,x=[];u!==null&&u!==d;){var T=u,R=T.alternate,z=T.stateNode;if(R!==null&&R===d)break;T.tag===5&&z!==null&&(T=z,g?(R=Ai(u,y),R!=null&&x.unshift(Qi(u,R,T))):g||(R=Ai(u,y),R!=null&&x.push(Qi(u,R,T)))),u=u.return}x.length!==0&&r.push({event:s,listeners:x})}var Iv=/\r\n?/g,Nv=/\u0000|\uFFFD/g;function Td(r){return(typeof r=="string"?r:""+r).replace(Iv,`
|
|
7
|
+
`).replace(Nv,"")}function oo(r,s,u){if(s=Td(s),Td(r)!==s&&u)throw Error(n(425))}function lo(){}var wa=null,va=null;function ka(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var xa=typeof setTimeout=="function"?setTimeout:void 0,Tv=typeof clearTimeout=="function"?clearTimeout:void 0,Ad=typeof Promise=="function"?Promise:void 0,Av=typeof queueMicrotask=="function"?queueMicrotask:typeof Ad<"u"?function(r){return Ad.resolve(null).then(r).catch(Pv)}:xa;function Pv(r){setTimeout(function(){throw r})}function Sa(r,s){var u=s,d=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(d===0){r.removeChild(g),zi(s);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=g}while(u);zi(s)}function Xn(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function Pd(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(s===0)return r;s--}else u==="/$"&&s++}r=r.previousSibling}return null}var Yr=Math.random().toString(36).slice(2),vn="__reactFiber$"+Yr,Xi="__reactProps$"+Yr,In="__reactContainer$"+Yr,Ca="__reactEvents$"+Yr,Lv="__reactListeners$"+Yr,Rv="__reactHandles$"+Yr;function wr(r){var s=r[vn];if(s)return s;for(var u=r.parentNode;u;){if(s=u[In]||u[vn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(r=Pd(r);r!==null;){if(u=r[vn])return u;r=Pd(r)}return s}r=u,u=r.parentNode}return null}function Yi(r){return r=r[vn]||r[In],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Jr(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ao(r){return r[Xi]||null}var _a=[],Zr=-1;function Yn(r){return{current:r}}function Qe(r){0>Zr||(r.current=_a[Zr],_a[Zr]=null,Zr--)}function We(r,s){Zr++,_a[Zr]=r.current,r.current=s}var Jn={},St=Yn(Jn),Rt=Yn(!1),vr=Jn;function ei(r,s){var u=r.type.contextTypes;if(!u)return Jn;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in u)g[y]=s[y];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function jt(r){return r=r.childContextTypes,r!=null}function uo(){Qe(Rt),Qe(St)}function Ld(r,s,u){if(St.current!==Jn)throw Error(n(168));We(St,s),We(Rt,u)}function Rd(r,s,u){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,je(r)||"Unknown",g));return _({},u,d)}function co(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Jn,vr=St.current,We(St,r),We(Rt,Rt.current),!0}function jd(r,s,u){var d=r.stateNode;if(!d)throw Error(n(169));u?(r=Rd(r,s,vr),d.__reactInternalMemoizedMergedChildContext=r,Qe(Rt),Qe(St),We(St,r)):Qe(Rt),We(Rt,u)}var Nn=null,fo=!1,Ea=!1;function Od(r){Nn===null?Nn=[r]:Nn.push(r)}function jv(r){fo=!0,Od(r)}function Zn(){if(!Ea&&Nn!==null){Ea=!0;var r=0,s=Ue;try{var u=Nn;for(Ue=1;r<u.length;r++){var d=u[r];do d=d(!0);while(d!==null)}Nn=null,fo=!1}catch(g){throw Nn!==null&&(Nn=Nn.slice(r+1)),Df(Kl,Zn),g}finally{Ue=s,Ea=!1}}return null}var ti=[],ni=0,ho=null,po=0,Xt=[],Yt=0,kr=null,Tn=1,An="";function xr(r,s){ti[ni++]=po,ti[ni++]=ho,ho=r,po=s}function Md(r,s,u){Xt[Yt++]=Tn,Xt[Yt++]=An,Xt[Yt++]=kr,kr=r;var d=Tn;r=An;var g=32-ln(d)-1;d&=~(1<<g),u+=1;var y=32-ln(s)+g;if(30<y){var x=g-g%5;y=(d&(1<<x)-1).toString(32),d>>=x,g-=x,Tn=1<<32-ln(s)+g|u<<g|d,An=y+r}else Tn=1<<y|u<<g|d,An=r}function ba(r){r.return!==null&&(xr(r,1),Md(r,1,0))}function Ia(r){for(;r===ho;)ho=ti[--ni],ti[ni]=null,po=ti[--ni],ti[ni]=null;for(;r===kr;)kr=Xt[--Yt],Xt[Yt]=null,An=Xt[--Yt],Xt[Yt]=null,Tn=Xt[--Yt],Xt[Yt]=null}var Vt=null,Gt=null,Xe=!1,un=null;function Dd(r,s){var u=tn(5,null,null,0);u.elementType="DELETED",u.stateNode=s,u.return=r,s=r.deletions,s===null?(r.deletions=[u],r.flags|=16):s.push(u)}function Fd(r,s){switch(r.tag){case 5:var u=r.type;return s=s.nodeType!==1||u.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,Vt=r,Gt=Xn(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,Vt=r,Gt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(u=kr!==null?{id:Tn,overflow:An}:null,r.memoizedState={dehydrated:s,treeContext:u,retryLane:1073741824},u=tn(18,null,null,0),u.stateNode=s,u.return=r,r.child=u,Vt=r,Gt=null,!0):!1;default:return!1}}function Na(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Ta(r){if(Xe){var s=Gt;if(s){var u=s;if(!Fd(r,s)){if(Na(r))throw Error(n(418));s=Xn(u.nextSibling);var d=Vt;s&&Fd(r,s)?Dd(d,u):(r.flags=r.flags&-4097|2,Xe=!1,Vt=r)}}else{if(Na(r))throw Error(n(418));r.flags=r.flags&-4097|2,Xe=!1,Vt=r}}}function zd(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Vt=r}function mo(r){if(r!==Vt)return!1;if(!Xe)return zd(r),Xe=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!ka(r.type,r.memoizedProps)),s&&(s=Gt)){if(Na(r))throw $d(),Error(n(418));for(;s;)Dd(r,s),s=Xn(s.nextSibling)}if(zd(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(s===0){Gt=Xn(r.nextSibling);break e}s--}else u!=="$"&&u!=="$!"&&u!=="$?"||s++}r=r.nextSibling}Gt=null}}else Gt=Vt?Xn(r.stateNode.nextSibling):null;return!0}function $d(){for(var r=Gt;r;)r=Xn(r.nextSibling)}function ri(){Gt=Vt=null,Xe=!1}function Aa(r){un===null?un=[r]:un.push(r)}var Ov=$.ReactCurrentBatchConfig;function Ji(r,s,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var d=u.stateNode}if(!d)throw Error(n(147,r));var g=d,y=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var T=g.refs;x===null?delete T[y]:T[y]=x},s._stringRef=y,s)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function go(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Bd(r){var s=r._init;return s(r._payload)}function Ud(r){function s(M,j){if(r){var F=M.deletions;F===null?(M.deletions=[j],M.flags|=16):F.push(j)}}function u(M,j){if(!r)return null;for(;j!==null;)s(M,j),j=j.sibling;return null}function d(M,j){for(M=new Map;j!==null;)j.key!==null?M.set(j.key,j):M.set(j.index,j),j=j.sibling;return M}function g(M,j){return M=lr(M,j),M.index=0,M.sibling=null,M}function y(M,j,F){return M.index=F,r?(F=M.alternate,F!==null?(F=F.index,F<j?(M.flags|=2,j):F):(M.flags|=2,j)):(M.flags|=1048576,j)}function x(M){return r&&M.alternate===null&&(M.flags|=2),M}function T(M,j,F,ee){return j===null||j.tag!==6?(j=xu(F,M.mode,ee),j.return=M,j):(j=g(j,F),j.return=M,j)}function R(M,j,F,ee){var he=F.type;return he===Q?q(M,j,F.props.children,ee,F.key):j!==null&&(j.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ge&&Bd(he)===j.type)?(ee=g(j,F.props),ee.ref=Ji(M,j,F),ee.return=M,ee):(ee=$o(F.type,F.key,F.props,null,M.mode,ee),ee.ref=Ji(M,j,F),ee.return=M,ee)}function z(M,j,F,ee){return j===null||j.tag!==4||j.stateNode.containerInfo!==F.containerInfo||j.stateNode.implementation!==F.implementation?(j=Su(F,M.mode,ee),j.return=M,j):(j=g(j,F.children||[]),j.return=M,j)}function q(M,j,F,ee,he){return j===null||j.tag!==7?(j=Tr(F,M.mode,ee,he),j.return=M,j):(j=g(j,F),j.return=M,j)}function X(M,j,F){if(typeof j=="string"&&j!==""||typeof j=="number")return j=xu(""+j,M.mode,F),j.return=M,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case P:return F=$o(j.type,j.key,j.props,null,M.mode,F),F.ref=Ji(M,null,j),F.return=M,F;case L:return j=Su(j,M.mode,F),j.return=M,j;case ge:var ee=j._init;return X(M,ee(j._payload),F)}if(Ke(j)||U(j))return j=Tr(j,M.mode,F,null),j.return=M,j;go(M,j)}return null}function K(M,j,F,ee){var he=j!==null?j.key:null;if(typeof F=="string"&&F!==""||typeof F=="number")return he!==null?null:T(M,j,""+F,ee);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case P:return F.key===he?R(M,j,F,ee):null;case L:return F.key===he?z(M,j,F,ee):null;case ge:return he=F._init,K(M,j,he(F._payload),ee)}if(Ke(F)||U(F))return he!==null?null:q(M,j,F,ee,null);go(M,F)}return null}function le(M,j,F,ee,he){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return M=M.get(F)||null,T(j,M,""+ee,he);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case P:return M=M.get(ee.key===null?F:ee.key)||null,R(j,M,ee,he);case L:return M=M.get(ee.key===null?F:ee.key)||null,z(j,M,ee,he);case ge:var ve=ee._init;return le(M,j,F,ve(ee._payload),he)}if(Ke(ee)||U(ee))return M=M.get(F)||null,q(j,M,ee,he,null);go(j,ee)}return null}function ce(M,j,F,ee){for(var he=null,ve=null,ke=j,Ee=j=0,pt=null;ke!==null&&Ee<F.length;Ee++){ke.index>Ee?(pt=ke,ke=null):pt=ke.sibling;var Be=K(M,ke,F[Ee],ee);if(Be===null){ke===null&&(ke=pt);break}r&&ke&&Be.alternate===null&&s(M,ke),j=y(Be,j,Ee),ve===null?he=Be:ve.sibling=Be,ve=Be,ke=pt}if(Ee===F.length)return u(M,ke),Xe&&xr(M,Ee),he;if(ke===null){for(;Ee<F.length;Ee++)ke=X(M,F[Ee],ee),ke!==null&&(j=y(ke,j,Ee),ve===null?he=ke:ve.sibling=ke,ve=ke);return Xe&&xr(M,Ee),he}for(ke=d(M,ke);Ee<F.length;Ee++)pt=le(ke,M,Ee,F[Ee],ee),pt!==null&&(r&&pt.alternate!==null&&ke.delete(pt.key===null?Ee:pt.key),j=y(pt,j,Ee),ve===null?he=pt:ve.sibling=pt,ve=pt);return r&&ke.forEach(function(ar){return s(M,ar)}),Xe&&xr(M,Ee),he}function de(M,j,F,ee){var he=U(F);if(typeof he!="function")throw Error(n(150));if(F=he.call(F),F==null)throw Error(n(151));for(var ve=he=null,ke=j,Ee=j=0,pt=null,Be=F.next();ke!==null&&!Be.done;Ee++,Be=F.next()){ke.index>Ee?(pt=ke,ke=null):pt=ke.sibling;var ar=K(M,ke,Be.value,ee);if(ar===null){ke===null&&(ke=pt);break}r&&ke&&ar.alternate===null&&s(M,ke),j=y(ar,j,Ee),ve===null?he=ar:ve.sibling=ar,ve=ar,ke=pt}if(Be.done)return u(M,ke),Xe&&xr(M,Ee),he;if(ke===null){for(;!Be.done;Ee++,Be=F.next())Be=X(M,Be.value,ee),Be!==null&&(j=y(Be,j,Ee),ve===null?he=Be:ve.sibling=Be,ve=Be);return Xe&&xr(M,Ee),he}for(ke=d(M,ke);!Be.done;Ee++,Be=F.next())Be=le(ke,M,Ee,Be.value,ee),Be!==null&&(r&&Be.alternate!==null&&ke.delete(Be.key===null?Ee:Be.key),j=y(Be,j,Ee),ve===null?he=Be:ve.sibling=Be,ve=Be);return r&&ke.forEach(function(pk){return s(M,pk)}),Xe&&xr(M,Ee),he}function rt(M,j,F,ee){if(typeof F=="object"&&F!==null&&F.type===Q&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case P:e:{for(var he=F.key,ve=j;ve!==null;){if(ve.key===he){if(he=F.type,he===Q){if(ve.tag===7){u(M,ve.sibling),j=g(ve,F.props.children),j.return=M,M=j;break e}}else if(ve.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ge&&Bd(he)===ve.type){u(M,ve.sibling),j=g(ve,F.props),j.ref=Ji(M,ve,F),j.return=M,M=j;break e}u(M,ve);break}else s(M,ve);ve=ve.sibling}F.type===Q?(j=Tr(F.props.children,M.mode,ee,F.key),j.return=M,M=j):(ee=$o(F.type,F.key,F.props,null,M.mode,ee),ee.ref=Ji(M,j,F),ee.return=M,M=ee)}return x(M);case L:e:{for(ve=F.key;j!==null;){if(j.key===ve)if(j.tag===4&&j.stateNode.containerInfo===F.containerInfo&&j.stateNode.implementation===F.implementation){u(M,j.sibling),j=g(j,F.children||[]),j.return=M,M=j;break e}else{u(M,j);break}else s(M,j);j=j.sibling}j=Su(F,M.mode,ee),j.return=M,M=j}return x(M);case ge:return ve=F._init,rt(M,j,ve(F._payload),ee)}if(Ke(F))return ce(M,j,F,ee);if(U(F))return de(M,j,F,ee);go(M,F)}return typeof F=="string"&&F!==""||typeof F=="number"?(F=""+F,j!==null&&j.tag===6?(u(M,j.sibling),j=g(j,F),j.return=M,M=j):(u(M,j),j=xu(F,M.mode,ee),j.return=M,M=j),x(M)):u(M,j)}return rt}var ii=Ud(!0),Vd=Ud(!1),yo=Yn(null),wo=null,si=null,Pa=null;function La(){Pa=si=wo=null}function Ra(r){var s=yo.current;Qe(yo),r._currentValue=s}function ja(r,s,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===u)break;r=r.return}}function oi(r,s){wo=r,Pa=si=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(Ot=!0),r.firstContext=null)}function Jt(r){var s=r._currentValue;if(Pa!==r)if(r={context:r,memoizedValue:s,next:null},si===null){if(wo===null)throw Error(n(308));si=r,wo.dependencies={lanes:0,firstContext:r}}else si=si.next=r;return s}var Sr=null;function Oa(r){Sr===null?Sr=[r]:Sr.push(r)}function Gd(r,s,u,d){var g=s.interleaved;return g===null?(u.next=u,Oa(s)):(u.next=g.next,g.next=u),s.interleaved=u,Pn(r,d)}function Pn(r,s){r.lanes|=s;var u=r.alternate;for(u!==null&&(u.lanes|=s),u=r,r=r.return;r!==null;)r.childLanes|=s,u=r.alternate,u!==null&&(u.childLanes|=s),u=r,r=r.return;return u.tag===3?u.stateNode:null}var er=!1;function Ma(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wd(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Ln(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function tr(r,s,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(ze&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Pn(r,u)}return g=d.interleaved,g===null?(s.next=s,Oa(d)):(s.next=g.next,g.next=s),d.interleaved=s,Pn(r,u)}function vo(r,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Xl(r,u)}}function Hd(r,s){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var x={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};y===null?g=y=x:y=y.next=x,u=u.next}while(u!==null);y===null?g=y=s:y=y.next=s}else g=y=s;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:d.shared,effects:d.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=s:r.next=s,u.lastBaseUpdate=s}function ko(r,s,u,d){var g=r.updateQueue;er=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,T=g.shared.pending;if(T!==null){g.shared.pending=null;var R=T,z=R.next;R.next=null,x===null?y=z:x.next=z,x=R;var q=r.alternate;q!==null&&(q=q.updateQueue,T=q.lastBaseUpdate,T!==x&&(T===null?q.firstBaseUpdate=z:T.next=z,q.lastBaseUpdate=R))}if(y!==null){var X=g.baseState;x=0,q=z=R=null,T=y;do{var K=T.lane,le=T.eventTime;if((d&K)===K){q!==null&&(q=q.next={eventTime:le,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ce=r,de=T;switch(K=s,le=u,de.tag){case 1:if(ce=de.payload,typeof ce=="function"){X=ce.call(le,X,K);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=de.payload,K=typeof ce=="function"?ce.call(le,X,K):ce,K==null)break e;X=_({},X,K);break e;case 2:er=!0}}T.callback!==null&&T.lane!==0&&(r.flags|=64,K=g.effects,K===null?g.effects=[T]:K.push(T))}else le={eventTime:le,lane:K,tag:T.tag,payload:T.payload,callback:T.callback,next:null},q===null?(z=q=le,R=X):q=q.next=le,x|=K;if(T=T.next,T===null){if(T=g.shared.pending,T===null)break;K=T,T=K.next,K.next=null,g.lastBaseUpdate=K,g.shared.pending=null}}while(!0);if(q===null&&(R=X),g.baseState=R,g.firstBaseUpdate=z,g.lastBaseUpdate=q,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);Er|=x,r.lanes=x,r.memoizedState=X}}function Kd(r,s,u){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=u,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Zi={},kn=Yn(Zi),es=Yn(Zi),ts=Yn(Zi);function Cr(r){if(r===Zi)throw Error(n(174));return r}function Da(r,s){switch(We(ts,s),We(es,r),We(kn,Zi),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:se(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=se(s,r)}Qe(kn),We(kn,s)}function li(){Qe(kn),Qe(es),Qe(ts)}function qd(r){Cr(ts.current);var s=Cr(kn.current),u=se(s,r.type);s!==u&&(We(es,r),We(kn,u))}function Fa(r){es.current===r&&(Qe(kn),Qe(es))}var Ye=Yn(0);function xo(r){for(var s=r;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var za=[];function $a(){for(var r=0;r<za.length;r++)za[r]._workInProgressVersionPrimary=null;za.length=0}var So=$.ReactCurrentDispatcher,Ba=$.ReactCurrentBatchConfig,_r=0,Je=null,at=null,dt=null,Co=!1,ns=!1,rs=0,Mv=0;function Ct(){throw Error(n(321))}function Ua(r,s){if(s===null)return!1;for(var u=0;u<s.length&&u<r.length;u++)if(!an(r[u],s[u]))return!1;return!0}function Va(r,s,u,d,g,y){if(_r=y,Je=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,So.current=r===null||r.memoizedState===null?$v:Bv,r=u(d,g),ns){y=0;do{if(ns=!1,rs=0,25<=y)throw Error(n(301));y+=1,dt=at=null,s.updateQueue=null,So.current=Uv,r=u(d,g)}while(ns)}if(So.current=bo,s=at!==null&&at.next!==null,_r=0,dt=at=Je=null,Co=!1,s)throw Error(n(300));return r}function Ga(){var r=rs!==0;return rs=0,r}function xn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Je.memoizedState=dt=r:dt=dt.next=r,dt}function Zt(){if(at===null){var r=Je.alternate;r=r!==null?r.memoizedState:null}else r=at.next;var s=dt===null?Je.memoizedState:dt.next;if(s!==null)dt=s,at=r;else{if(r===null)throw Error(n(310));at=r,r={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},dt===null?Je.memoizedState=dt=r:dt=dt.next=r}return dt}function is(r,s){return typeof s=="function"?s(r):s}function Wa(r){var s=Zt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=at,g=d.baseQueue,y=u.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}d.baseQueue=g=y,u.pending=null}if(g!==null){y=g.next,d=d.baseState;var T=x=null,R=null,z=y;do{var q=z.lane;if((_r&q)===q)R!==null&&(R=R.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),d=z.hasEagerState?z.eagerState:r(d,z.action);else{var X={lane:q,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};R===null?(T=R=X,x=d):R=R.next=X,Je.lanes|=q,Er|=q}z=z.next}while(z!==null&&z!==y);R===null?x=d:R.next=T,an(d,s.memoizedState)||(Ot=!0),s.memoizedState=d,s.baseState=x,s.baseQueue=R,u.lastRenderedState=d}if(r=u.interleaved,r!==null){g=r;do y=g.lane,Je.lanes|=y,Er|=y,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[s.memoizedState,u.dispatch]}function Ha(r){var s=Zt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=u.dispatch,g=u.pending,y=s.memoizedState;if(g!==null){u.pending=null;var x=g=g.next;do y=r(y,x.action),x=x.next;while(x!==g);an(y,s.memoizedState)||(Ot=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),u.lastRenderedState=y}return[y,d]}function Qd(){}function Xd(r,s){var u=Je,d=Zt(),g=s(),y=!an(d.memoizedState,g);if(y&&(d.memoizedState=g,Ot=!0),d=d.queue,Ka(Zd.bind(null,u,d,r),[r]),d.getSnapshot!==s||y||dt!==null&&dt.memoizedState.tag&1){if(u.flags|=2048,ss(9,Jd.bind(null,u,d,g,s),void 0,null),ht===null)throw Error(n(349));(_r&30)!==0||Yd(u,s,g)}return g}function Yd(r,s,u){r.flags|=16384,r={getSnapshot:s,value:u},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.stores=[r]):(u=s.stores,u===null?s.stores=[r]:u.push(r))}function Jd(r,s,u,d){s.value=u,s.getSnapshot=d,eh(s)&&th(r)}function Zd(r,s,u){return u(function(){eh(s)&&th(r)})}function eh(r){var s=r.getSnapshot;r=r.value;try{var u=s();return!an(r,u)}catch{return!0}}function th(r){var s=Pn(r,1);s!==null&&hn(s,r,1,-1)}function nh(r){var s=xn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:r},s.queue=r,r=r.dispatch=zv.bind(null,Je,r),[s.memoizedState,r]}function ss(r,s,u,d){return r={tag:r,create:s,destroy:u,deps:d,next:null},s=Je.updateQueue,s===null?(s={lastEffect:null,stores:null},Je.updateQueue=s,s.lastEffect=r.next=r):(u=s.lastEffect,u===null?s.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,s.lastEffect=r)),r}function rh(){return Zt().memoizedState}function _o(r,s,u,d){var g=xn();Je.flags|=r,g.memoizedState=ss(1|s,u,void 0,d===void 0?null:d)}function Eo(r,s,u,d){var g=Zt();d=d===void 0?null:d;var y=void 0;if(at!==null){var x=at.memoizedState;if(y=x.destroy,d!==null&&Ua(d,x.deps)){g.memoizedState=ss(s,u,y,d);return}}Je.flags|=r,g.memoizedState=ss(1|s,u,y,d)}function ih(r,s){return _o(8390656,8,r,s)}function Ka(r,s){return Eo(2048,8,r,s)}function sh(r,s){return Eo(4,2,r,s)}function oh(r,s){return Eo(4,4,r,s)}function lh(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function ah(r,s,u){return u=u!=null?u.concat([r]):null,Eo(4,4,lh.bind(null,s,r),u)}function qa(){}function uh(r,s){var u=Zt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Ua(s,d[1])?d[0]:(u.memoizedState=[r,s],r)}function ch(r,s){var u=Zt();s=s===void 0?null:s;var d=u.memoizedState;return d!==null&&s!==null&&Ua(s,d[1])?d[0]:(r=r(),u.memoizedState=[r,s],r)}function fh(r,s,u){return(_r&21)===0?(r.baseState&&(r.baseState=!1,Ot=!0),r.memoizedState=u):(an(u,s)||(u=Bf(),Je.lanes|=u,Er|=u,r.baseState=!0),s)}function Dv(r,s){var u=Ue;Ue=u!==0&&4>u?u:4,r(!0);var d=Ba.transition;Ba.transition={};try{r(!1),s()}finally{Ue=u,Ba.transition=d}}function dh(){return Zt().memoizedState}function Fv(r,s,u){var d=sr(r);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},hh(r))ph(s,u);else if(u=Gd(r,s,u,d),u!==null){var g=Pt();hn(u,r,d,g),mh(u,s,d)}}function zv(r,s,u){var d=sr(r),g={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(hh(r))ph(s,g);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,T=y(x,u);if(g.hasEagerState=!0,g.eagerState=T,an(T,x)){var R=s.interleaved;R===null?(g.next=g,Oa(s)):(g.next=R.next,R.next=g),s.interleaved=g;return}}catch{}u=Gd(r,s,g,d),u!==null&&(g=Pt(),hn(u,r,d,g),mh(u,s,d))}}function hh(r){var s=r.alternate;return r===Je||s!==null&&s===Je}function ph(r,s){ns=Co=!0;var u=r.pending;u===null?s.next=s:(s.next=u.next,u.next=s),r.pending=s}function mh(r,s,u){if((u&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,u|=d,s.lanes=u,Xl(r,u)}}var bo={readContext:Jt,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useInsertionEffect:Ct,useLayoutEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useMutableSource:Ct,useSyncExternalStore:Ct,useId:Ct,unstable_isNewReconciler:!1},$v={readContext:Jt,useCallback:function(r,s){return xn().memoizedState=[r,s===void 0?null:s],r},useContext:Jt,useEffect:ih,useImperativeHandle:function(r,s,u){return u=u!=null?u.concat([r]):null,_o(4194308,4,lh.bind(null,s,r),u)},useLayoutEffect:function(r,s){return _o(4194308,4,r,s)},useInsertionEffect:function(r,s){return _o(4,2,r,s)},useMemo:function(r,s){var u=xn();return s=s===void 0?null:s,r=r(),u.memoizedState=[r,s],r},useReducer:function(r,s,u){var d=xn();return s=u!==void 0?u(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=Fv.bind(null,Je,r),[d.memoizedState,r]},useRef:function(r){var s=xn();return r={current:r},s.memoizedState=r},useState:nh,useDebugValue:qa,useDeferredValue:function(r){return xn().memoizedState=r},useTransition:function(){var r=nh(!1),s=r[0];return r=Dv.bind(null,r[1]),xn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,u){var d=Je,g=xn();if(Xe){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),ht===null)throw Error(n(349));(_r&30)!==0||Yd(d,s,u)}g.memoizedState=u;var y={value:u,getSnapshot:s};return g.queue=y,ih(Zd.bind(null,d,y,r),[r]),d.flags|=2048,ss(9,Jd.bind(null,d,y,u,s),void 0,null),u},useId:function(){var r=xn(),s=ht.identifierPrefix;if(Xe){var u=An,d=Tn;u=(d&~(1<<32-ln(d)-1)).toString(32)+u,s=":"+s+"R"+u,u=rs++,0<u&&(s+="H"+u.toString(32)),s+=":"}else u=Mv++,s=":"+s+"r"+u.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},Bv={readContext:Jt,useCallback:uh,useContext:Jt,useEffect:Ka,useImperativeHandle:ah,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:ch,useReducer:Wa,useRef:rh,useState:function(){return Wa(is)},useDebugValue:qa,useDeferredValue:function(r){var s=Zt();return fh(s,at.memoizedState,r)},useTransition:function(){var r=Wa(is)[0],s=Zt().memoizedState;return[r,s]},useMutableSource:Qd,useSyncExternalStore:Xd,useId:dh,unstable_isNewReconciler:!1},Uv={readContext:Jt,useCallback:uh,useContext:Jt,useEffect:Ka,useImperativeHandle:ah,useInsertionEffect:sh,useLayoutEffect:oh,useMemo:ch,useReducer:Ha,useRef:rh,useState:function(){return Ha(is)},useDebugValue:qa,useDeferredValue:function(r){var s=Zt();return at===null?s.memoizedState=r:fh(s,at.memoizedState,r)},useTransition:function(){var r=Ha(is)[0],s=Zt().memoizedState;return[r,s]},useMutableSource:Qd,useSyncExternalStore:Xd,useId:dh,unstable_isNewReconciler:!1};function cn(r,s){if(r&&r.defaultProps){s=_({},s),r=r.defaultProps;for(var u in r)s[u]===void 0&&(s[u]=r[u]);return s}return s}function Qa(r,s,u,d){s=r.memoizedState,u=u(d,s),u=u==null?s:_({},s,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Io={isMounted:function(r){return(r=r._reactInternals)?yr(r)===r:!1},enqueueSetState:function(r,s,u){r=r._reactInternals;var d=Pt(),g=sr(r),y=Ln(d,g);y.payload=s,u!=null&&(y.callback=u),s=tr(r,y,g),s!==null&&(hn(s,r,g,d),vo(s,r,g))},enqueueReplaceState:function(r,s,u){r=r._reactInternals;var d=Pt(),g=sr(r),y=Ln(d,g);y.tag=1,y.payload=s,u!=null&&(y.callback=u),s=tr(r,y,g),s!==null&&(hn(s,r,g,d),vo(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var u=Pt(),d=sr(r),g=Ln(u,d);g.tag=2,s!=null&&(g.callback=s),s=tr(r,g,d),s!==null&&(hn(s,r,d,u),vo(s,r,d))}};function gh(r,s,u,d,g,y,x){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,y,x):s.prototype&&s.prototype.isPureReactComponent?!Wi(u,d)||!Wi(g,y):!0}function yh(r,s,u){var d=!1,g=Jn,y=s.contextType;return typeof y=="object"&&y!==null?y=Jt(y):(g=jt(s)?vr:St.current,d=s.contextTypes,y=(d=d!=null)?ei(r,g):Jn),s=new s(u,y),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Io,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=y),s}function wh(r,s,u,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==r&&Io.enqueueReplaceState(s,s.state,null)}function Xa(r,s,u,d){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},Ma(r);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Jt(y):(y=jt(s)?vr:St.current,g.context=ei(r,y)),g.state=r.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(Qa(r,s,y,u),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Io.enqueueReplaceState(g,g.state,null),ko(r,u,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function ai(r,s){try{var u="",d=s;do u+=Ce(d),d=d.return;while(d);var g=u}catch(y){g=`
|
|
8
8
|
Error generating stack: `+y.message+`
|
|
9
|
-
`+y.stack}return{value:r,source:s,stack:g,digest:null}}function Ya(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Ja(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Gv=typeof WeakMap=="function"?WeakMap:Map;function vh(r,s,u){u=Ln(-1,u),u.tag=3,u.payload={element:null};var d=s.value;return u.callback=function(){jo||(jo=!0,hu=d),Ja(r,s)},u}function kh(r,s,u){u=Ln(-1,u),u.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;u.payload=function(){return d(g)},u.callback=function(){Ja(r,s)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){Ja(r,s),typeof d!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),u}function xh(r,s,u){var d=r.pingCache;if(d===null){d=r.pingCache=new Gv;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(u)||(g.add(u),r=ik.bind(null,r,s,u),s.then(r,r))}function Sh(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Ch(r,s,u,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=Ln(-1,1),s.tag=2,tr(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var Wv=B.ReactCurrentOwner,Ot=!1;function At(r,s,u,d){s.child=r===null?Vd(s,null,u,d):ii(s,r.child,u,d)}function _h(r,s,u,d,g){u=u.render;var y=s.ref;return oi(s,g),d=Va(r,s,u,d,y,g),u=Ga(),r!==null&&!Ot?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Rn(r,s,g)):(Xe&&u&&ba(s),s.flags|=1,At(r,s,d,g),s.child)}function Eh(r,s,u,d,g){if(r===null){var y=u.type;return typeof y=="function"&&!ku(y)&&y.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=y,bh(r,s,y,d,g)):(r=$o(u.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(y=r.child,(r.lanes&g)===0){var x=y.memoizedProps;if(u=u.compare,u=u!==null?u:Wi,u(x,d)&&r.ref===s.ref)return Rn(r,s,g)}return s.flags|=1,r=lr(y,d),r.ref=s.ref,r.return=s,s.child=r}function bh(r,s,u,d,g){if(r!==null){var y=r.memoizedProps;if(Wi(y,d)&&r.ref===s.ref)if(Ot=!1,s.pendingProps=d=y,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Ot=!0);else return s.lanes=r.lanes,Rn(r,s,g)}return Za(r,s,u,d,g)}function Ih(r,s,u){var d=s.pendingProps,g=d.children,y=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(ci,Wt),Wt|=u;else{if((u&1073741824)===0)return r=y!==null?y.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,We(ci,Wt),Wt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:u,We(ci,Wt),Wt|=d}else y!==null?(d=y.baseLanes|u,s.memoizedState=null):d=u,We(ci,Wt),Wt|=d;return At(r,s,g,u),s.child}function Nh(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function Za(r,s,u,d,g){var y=jt(u)?vr:St.current;return y=ei(s,y),oi(s,g),u=Va(r,s,u,d,y,g),d=Ga(),r!==null&&!Ot?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Rn(r,s,g)):(Xe&&d&&ba(s),s.flags|=1,At(r,s,u,g),s.child)}function Th(r,s,u,d,g){if(jt(u)){var y=!0;co(s)}else y=!1;if(oi(s,g),s.stateNode===null)To(r,s),yh(s,u,d),Xa(s,u,d,g),d=!0;else if(r===null){var x=s.stateNode,T=s.memoizedProps;x.props=T;var R=x.context,$=u.contextType;typeof $=="object"&&$!==null?$=Jt($):($=jt(u)?vr:St.current,$=ei(s,$));var q=u.getDerivedStateFromProps,X=typeof q=="function"||typeof x.getSnapshotBeforeUpdate=="function";X||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==d||R!==$)&&wh(s,x,d,$),er=!1;var K=s.memoizedState;x.state=K,ko(s,d,x,g),R=s.memoizedState,T!==d||K!==R||Rt.current||er?(typeof q=="function"&&(Qa(s,u,q,d),R=s.memoizedState),(T=er||gh(s,u,T,d,K,R,$))?(X||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=R),x.props=d,x.state=R,x.context=$,d=T):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,Wd(r,s),T=s.memoizedProps,$=s.type===s.elementType?T:cn(s.type,T),x.props=$,X=s.pendingProps,K=x.context,R=u.contextType,typeof R=="object"&&R!==null?R=Jt(R):(R=jt(u)?vr:St.current,R=ei(s,R));var le=u.getDerivedStateFromProps;(q=typeof le=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==X||K!==R)&&wh(s,x,d,R),er=!1,K=s.memoizedState,x.state=K,ko(s,d,x,g);var ce=s.memoizedState;T!==X||K!==ce||Rt.current||er?(typeof le=="function"&&(Qa(s,u,le,d),ce=s.memoizedState),($=er||gh(s,u,$,d,K,ce,R)||!1)?(q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ce,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ce,R)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ce),x.props=d,x.state=ce,x.context=R,d=$):(typeof x.componentDidUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=1024),d=!1)}return eu(r,s,u,d,y,g)}function eu(r,s,u,d,g,y){Nh(r,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&jd(s,u,!1),Rn(r,s,y);d=s.stateNode,Wv.current=s;var T=x&&typeof u.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&x?(s.child=ii(s,r.child,null,y),s.child=ii(s,null,T,y)):At(r,s,T,y),s.memoizedState=d.state,g&&jd(s,u,!0),s.child}function Ah(r){var s=r.stateNode;s.pendingContext?Ld(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Ld(r,s.context,!1),Da(r,s.containerInfo)}function Ph(r,s,u,d,g){return ri(),Aa(g),s.flags|=256,At(r,s,u,d),s.child}var tu={dehydrated:null,treeContext:null,retryLane:0};function nu(r){return{baseLanes:r,cachePool:null,transitions:null}}function Lh(r,s,u){var d=s.pendingProps,g=Ye.current,y=!1,x=(s.flags&128)!==0,T;if((T=x)||(T=r!==null&&r.memoizedState===null?!1:(g&2)!==0),T?(y=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),We(Ye,g&1),r===null)return Ta(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,r=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Bo(x,d,0,null),r=Tr(r,d,u,null),y.return=s,r.return=s,y.sibling=r,s.child=y,s.child.memoizedState=nu(u),s.memoizedState=tu,r):ru(s,x));if(g=r.memoizedState,g!==null&&(T=g.dehydrated,T!==null))return Hv(r,s,x,d,T,g,u);if(y){y=d.fallback,x=s.mode,g=r.child,T=g.sibling;var R={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=R,s.deletions=null):(d=lr(g,R),d.subtreeFlags=g.subtreeFlags&14680064),T!==null?y=lr(T,y):(y=Tr(y,x,u,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=r.child.memoizedState,x=x===null?nu(u):{baseLanes:x.baseLanes|u,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=r.childLanes&~u,s.memoizedState=tu,d}return y=r.child,r=y.sibling,d=lr(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=u),d.return=s,d.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=d,s.memoizedState=null,d}function ru(r,s){return s=Bo({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function No(r,s,u,d){return d!==null&&Aa(d),ii(s,r.child,null,u),r=ru(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Hv(r,s,u,d,g,y,x){if(u)return s.flags&256?(s.flags&=-257,d=Ya(Error(n(422))),No(r,s,x,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Bo({mode:"visible",children:d.children},g,0,null),y=Tr(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&ii(s,r.child,null,x),s.child.memoizedState=nu(x),s.memoizedState=tu,y);if((s.mode&1)===0)return No(r,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var T=d.dgst;return d=T,y=Error(n(419)),d=Ya(y,d,void 0),No(r,s,x,d)}if(T=(x&r.childLanes)!==0,Ot||T){if(d=ht,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Pn(r,g),hn(d,r,g,-1))}return vu(),d=Ya(Error(n(421))),No(r,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=sk.bind(null,r),g._reactRetry=s,null):(r=y.treeContext,Gt=Xn(g.nextSibling),Vt=s,Xe=!0,un=null,r!==null&&(Xt[Yt++]=Tn,Xt[Yt++]=An,Xt[Yt++]=kr,Tn=r.id,An=r.overflow,kr=s),s=ru(s,d.children),s.flags|=4096,s)}function Rh(r,s,u){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),ja(r.return,s,u)}function iu(r,s,u,d,g){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=u,y.tailMode=g)}function jh(r,s,u){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(At(r,s,d.children,u),d=Ye.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Rh(r,u,s);else if(r.tag===19)Rh(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(We(Ye,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(u=s.child,g=null;u!==null;)r=u.alternate,r!==null&&xo(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),iu(s,!1,g,u,y);break;case"backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&xo(r)===null){s.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}iu(s,!0,u,null,y);break;case"together":iu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function To(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Rn(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),Er|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=lr(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=lr(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function Kv(r,s,u){switch(s.tag){case 3:Ah(s),ri();break;case 5:qd(s);break;case 1:jt(s.type)&&co(s);break;case 4:Da(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;We(yo,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(We(Ye,Ye.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?Lh(r,s,u):(We(Ye,Ye.current&1),r=Rn(r,s,u),r!==null?r.sibling:null);We(Ye,Ye.current&1);break;case 19:if(d=(u&s.childLanes)!==0,(r.flags&128)!==0){if(d)return jh(r,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),We(Ye,Ye.current),d)break;return null;case 22:case 23:return s.lanes=0,Ih(r,s,u)}return Rn(r,s,u)}var Oh,su,Mh,Dh;Oh=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},su=function(){},Mh=function(r,s,u,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,Cr(kn.current);var y=null;switch(u){case"input":g=U(r,g),d=U(r,d),y=[];break;case"select":g=_({},g,{value:void 0}),d=_({},d,{value:void 0}),y=[];break;case"textarea":g=et(r,g),d=et(r,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=lo)}wt(u,d);var x;u=null;for($ in g)if(!d.hasOwnProperty($)&&g.hasOwnProperty($)&&g[$]!=null)if($==="style"){var T=g[$];for(x in T)T.hasOwnProperty(x)&&(u||(u={}),u[x]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(o.hasOwnProperty($)?y||(y=[]):(y=y||[]).push($,null));for($ in d){var R=d[$];if(T=g?.[$],d.hasOwnProperty($)&&R!==T&&(R!=null||T!=null))if($==="style")if(T){for(x in T)!T.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(u||(u={}),u[x]="");for(x in R)R.hasOwnProperty(x)&&T[x]!==R[x]&&(u||(u={}),u[x]=R[x])}else u||(y||(y=[]),y.push($,u)),u=R;else $==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(y=y||[]).push($,R)):$==="children"?typeof R!="string"&&typeof R!="number"||(y=y||[]).push($,""+R):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(o.hasOwnProperty($)?(R!=null&&$==="onScroll"&&qe("scroll",r),y||T===R||(y=[])):(y=y||[]).push($,R))}u&&(y=y||[]).push("style",u);var $=y;(s.updateQueue=$)&&(s.flags|=4)}},Dh=function(r,s,u,d){u!==d&&(s.flags|=4)};function os(r,s){if(!Xe)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function _t(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(s)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=u,s}function qv(r,s,u){var d=s.pendingProps;switch(Ia(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(s),null;case 1:return jt(s.type)&&uo(),_t(s),null;case 3:return d=s.stateNode,li(),Qe(Rt),Qe(St),$a(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(mo(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,un!==null&&(gu(un),un=null))),su(r,s),_t(s),null;case 5:Fa(s);var g=Cr(ts.current);if(u=s.type,r!==null&&s.stateNode!=null)Mh(r,s,u,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return _t(s),null}if(r=Cr(kn.current),mo(s)){d=s.stateNode,u=s.type;var y=s.memoizedProps;switch(d[vn]=s,d[Xi]=y,r=(s.mode&1)!==0,u){case"dialog":qe("cancel",d),qe("close",d);break;case"iframe":case"object":case"embed":qe("load",d);break;case"video":case"audio":for(g=0;g<Ki.length;g++)qe(Ki[g],d);break;case"source":qe("error",d);break;case"img":case"image":case"link":qe("error",d),qe("load",d);break;case"details":qe("toggle",d);break;case"input":H(d,y),qe("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},qe("invalid",d);break;case"textarea":Un(d,y),qe("invalid",d)}wt(u,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var T=y[x];x==="children"?typeof T=="string"?d.textContent!==T&&(y.suppressHydrationWarning!==!0&&oo(d.textContent,T,r),g=["children",T]):typeof T=="number"&&d.textContent!==""+T&&(y.suppressHydrationWarning!==!0&&oo(d.textContent,T,r),g=["children",""+T]):o.hasOwnProperty(x)&&T!=null&&x==="onScroll"&&qe("scroll",d)}switch(u){case"input":qt(d),Oe(d,y,!0);break;case"textarea":qt(d),zs(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=lo)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=V(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=x.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=x.createElement(u,{is:d.is}):(r=x.createElement(u),u==="select"&&(x=r,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):r=x.createElementNS(r,u),r[vn]=s,r[Xi]=d,Oh(r,s,!1,!1),s.stateNode=r;e:{switch(x=yn(u,d),u){case"dialog":qe("cancel",r),qe("close",r),g=d;break;case"iframe":case"object":case"embed":qe("load",r),g=d;break;case"video":case"audio":for(g=0;g<Ki.length;g++)qe(Ki[g],r);g=d;break;case"source":qe("error",r),g=d;break;case"img":case"image":case"link":qe("error",r),qe("load",r),g=d;break;case"details":qe("toggle",r),g=d;break;case"input":H(r,d),g=U(r,d),qe("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=_({},d,{value:void 0}),qe("invalid",r);break;case"textarea":Un(r,d),g=et(r,d),qe("invalid",r);break;default:g=d}wt(u,g),T=g;for(y in T)if(T.hasOwnProperty(y)){var R=T[y];y==="style"?Vn(r,R):y==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Pe(r,R)):y==="children"?typeof R=="string"?(u!=="textarea"||R!=="")&&Fe(r,R):typeof R=="number"&&Fe(r,""+R):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?R!=null&&y==="onScroll"&&qe("scroll",r):R!=null&&A(r,y,R,x))}switch(u){case"input":qt(r),Oe(r,d,!1);break;case"textarea":qt(r),zs(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Te(d.value));break;case"select":r.multiple=!!d.multiple,y=d.value,y!=null?st(r,!!d.multiple,y,!1):d.defaultValue!=null&&st(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=lo)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return _t(s),null;case 6:if(r&&s.stateNode!=null)Dh(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(u=Cr(ts.current),Cr(kn.current),mo(s)){if(d=s.stateNode,u=s.memoizedProps,d[vn]=s,(y=d.nodeValue!==u)&&(r=Vt,r!==null))switch(r.tag){case 3:oo(d.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&oo(d.nodeValue,u,(r.mode&1)!==0)}y&&(s.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[vn]=s,s.stateNode=d}return _t(s),null;case 13:if(Qe(Ye),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xe&&Gt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)$d(),ri(),s.flags|=98560,y=!1;else if(y=mo(s),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[vn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;_t(s),y=!1}else un!==null&&(gu(un),un=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(Ye.current&1)!==0?ut===0&&(ut=3):vu())),s.updateQueue!==null&&(s.flags|=4),_t(s),null);case 4:return li(),su(r,s),r===null&&qi(s.stateNode.containerInfo),_t(s),null;case 10:return Ra(s.type._context),_t(s),null;case 17:return jt(s.type)&&uo(),_t(s),null;case 19:if(Qe(Ye),y=s.memoizedState,y===null)return _t(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)os(y,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(x=xo(r),x!==null){for(s.flags|=128,os(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=u,u=s.child;u!==null;)y=u,r=d,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,r=x.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return We(Ye,Ye.current&1|2),s.child}r=r.sibling}y.tail!==null&&nt()>fi&&(s.flags|=128,d=!0,os(y,!1),s.lanes=4194304)}else{if(!d)if(r=xo(x),r!==null){if(s.flags|=128,d=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),os(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!Xe)return _t(s),null}else 2*nt()-y.renderingStartTime>fi&&u!==1073741824&&(s.flags|=128,d=!0,os(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(u=y.last,u!==null?u.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=nt(),s.sibling=null,u=Ye.current,We(Ye,d?u&1|2:u&1),s):(_t(s),null);case 22:case 23:return wu(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Wt&1073741824)!==0&&(_t(s),s.subtreeFlags&6&&(s.flags|=8192)):_t(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function Qv(r,s){switch(Ia(s),s.tag){case 1:return jt(s.type)&&uo(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return li(),Qe(Rt),Qe(St),$a(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Fa(s),null;case 13:if(Qe(Ye),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ri()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Qe(Ye),null;case 4:return li(),null;case 10:return Ra(s.type._context),null;case 22:case 23:return wu(),null;case 24:return null;default:return null}}var Ao=!1,Et=!1,Xv=typeof WeakSet=="function"?WeakSet:Set,ae=null;function ui(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){tt(r,s,d)}else u.current=null}function ou(r,s,u){try{u()}catch(d){tt(r,s,d)}}var Fh=!1;function Yv(r,s){if(wa=Qs,r=gd(),ca(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var x=0,T=-1,R=-1,$=0,q=0,X=r,K=null;t:for(;;){for(var le;X!==u||g!==0&&X.nodeType!==3||(T=x+g),X!==y||d!==0&&X.nodeType!==3||(R=x+d),X.nodeType===3&&(x+=X.nodeValue.length),(le=X.firstChild)!==null;)K=X,X=le;for(;;){if(X===r)break t;if(K===u&&++$===g&&(T=x),K===y&&++q===d&&(R=x),(le=X.nextSibling)!==null)break;X=K,K=X.parentNode}X=le}u=T===-1||R===-1?null:{start:T,end:R}}else u=null}u=u||{start:0,end:0}}else u=null;for(va={focusedElem:r,selectionRange:u},Qs=!1,ae=s;ae!==null;)if(s=ae,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ae=r;else for(;ae!==null;){s=ae;try{var ce=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ce!==null){var de=ce.memoizedProps,rt=ce.memoizedState,M=s.stateNode,j=M.getSnapshotBeforeUpdate(s.elementType===s.type?de:cn(s.type,de),rt);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var F=s.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Z){tt(s,s.return,Z)}if(r=s.sibling,r!==null){r.return=s.return,ae=r;break}ae=s.return}return ce=Fh,Fh=!1,ce}function ls(r,s,u){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var y=g.destroy;g.destroy=void 0,y!==void 0&&ou(s,u,y)}g=g.next}while(g!==d)}}function Po(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var d=u.create;u.destroy=d()}u=u.next}while(u!==s)}}function lu(r){var s=r.ref;if(s!==null){var u=r.stateNode;r.tag,r=u,typeof s=="function"?s(r):s.current=r}}function zh(r){var s=r.alternate;s!==null&&(r.alternate=null,zh(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[vn],delete s[Xi],delete s[Ca],delete s[Rv],delete s[jv])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function $h(r){return r.tag===5||r.tag===3||r.tag===4}function Bh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||$h(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function au(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=lo));else if(d!==4&&(r=r.child,r!==null))for(au(r,s,u),r=r.sibling;r!==null;)au(r,s,u),r=r.sibling}function uu(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(uu(r,s,u),r=r.sibling;r!==null;)uu(r,s,u),r=r.sibling}var vt=null,fn=!1;function nr(r,s,u){for(u=u.child;u!==null;)Uh(r,s,u),u=u.sibling}function Uh(r,s,u){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Vs,u)}catch{}switch(u.tag){case 5:Et||ui(u,s);case 6:var d=vt,g=fn;vt=null,nr(r,s,u),vt=d,fn=g,vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):vt.removeChild(u.stateNode));break;case 18:vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?Sa(r.parentNode,u):r.nodeType===1&&Sa(r,u),zi(r)):Sa(vt,u.stateNode));break;case 4:d=vt,g=fn,vt=u.stateNode.containerInfo,fn=!0,nr(r,s,u),vt=d,fn=g;break;case 0:case 11:case 14:case 15:if(!Et&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&ou(u,s,x),g=g.next}while(g!==d)}nr(r,s,u);break;case 1:if(!Et&&(ui(u,s),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(T){tt(u,s,T)}nr(r,s,u);break;case 21:nr(r,s,u);break;case 22:u.mode&1?(Et=(d=Et)||u.memoizedState!==null,nr(r,s,u),Et=d):nr(r,s,u);break;default:nr(r,s,u)}}function Vh(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Xv),s.forEach(function(d){var g=ok.bind(null,r,d);u.has(d)||(u.add(d),d.then(g,g))})}}function dn(r,s){var u=s.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{var y=r,x=s,T=x;e:for(;T!==null;){switch(T.tag){case 5:vt=T.stateNode,fn=!1;break e;case 3:vt=T.stateNode.containerInfo,fn=!0;break e;case 4:vt=T.stateNode.containerInfo,fn=!0;break e}T=T.return}if(vt===null)throw Error(n(160));Uh(y,x,g),vt=null,fn=!1;var R=g.alternate;R!==null&&(R.return=null),g.return=null}catch($){tt(g,s,$)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Gh(s,r),s=s.sibling}function Gh(r,s){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(dn(s,r),Sn(r),d&4){try{ls(3,r,r.return),Po(3,r)}catch(de){tt(r,r.return,de)}try{ls(5,r,r.return)}catch(de){tt(r,r.return,de)}}break;case 1:dn(s,r),Sn(r),d&512&&u!==null&&ui(u,u.return);break;case 5:if(dn(s,r),Sn(r),d&512&&u!==null&&ui(u,u.return),r.flags&32){var g=r.stateNode;try{Fe(g,"")}catch(de){tt(r,r.return,de)}}if(d&4&&(g=r.stateNode,g!=null)){var y=r.memoizedProps,x=u!==null?u.memoizedProps:y,T=r.type,R=r.updateQueue;if(r.updateQueue=null,R!==null)try{T==="input"&&y.type==="radio"&&y.name!=null&&ye(g,y),yn(T,x);var $=yn(T,y);for(x=0;x<R.length;x+=2){var q=R[x],X=R[x+1];q==="style"?Vn(g,X):q==="dangerouslySetInnerHTML"?Pe(g,X):q==="children"?Fe(g,X):A(g,q,X,$)}switch(T){case"input":Se(g,y);break;case"textarea":mr(g,y);break;case"select":var K=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var le=y.value;le!=null?st(g,!!y.multiple,le,!1):K!==!!y.multiple&&(y.defaultValue!=null?st(g,!!y.multiple,y.defaultValue,!0):st(g,!!y.multiple,y.multiple?[]:"",!1))}g[Xi]=y}catch(de){tt(r,r.return,de)}}break;case 6:if(dn(s,r),Sn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,y=r.memoizedProps;try{g.nodeValue=y}catch(de){tt(r,r.return,de)}}break;case 3:if(dn(s,r),Sn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{zi(s.containerInfo)}catch(de){tt(r,r.return,de)}break;case 4:dn(s,r),Sn(r);break;case 13:dn(s,r),Sn(r),g=r.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(du=nt())),d&4&&Vh(r);break;case 22:if(q=u!==null&&u.memoizedState!==null,r.mode&1?(Et=($=Et)||q,dn(s,r),Et=$):dn(s,r),Sn(r),d&8192){if($=r.memoizedState!==null,(r.stateNode.isHidden=$)&&!q&&(r.mode&1)!==0)for(ae=r,q=r.child;q!==null;){for(X=ae=q;ae!==null;){switch(K=ae,le=K.child,K.tag){case 0:case 11:case 14:case 15:ls(4,K,K.return);break;case 1:ui(K,K.return);var ce=K.stateNode;if(typeof ce.componentWillUnmount=="function"){d=K,u=K.return;try{s=d,ce.props=s.memoizedProps,ce.state=s.memoizedState,ce.componentWillUnmount()}catch(de){tt(d,u,de)}}break;case 5:ui(K,K.return);break;case 22:if(K.memoizedState!==null){Kh(X);continue}}le!==null?(le.return=K,ae=le):Kh(X)}q=q.sibling}e:for(q=null,X=r;;){if(X.tag===5){if(q===null){q=X;try{g=X.stateNode,$?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(T=X.stateNode,R=X.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,T.style.display=Qt("display",x))}catch(de){tt(r,r.return,de)}}}else if(X.tag===6){if(q===null)try{X.stateNode.nodeValue=$?"":X.memoizedProps}catch(de){tt(r,r.return,de)}}else if((X.tag!==22&&X.tag!==23||X.memoizedState===null||X===r)&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===r)break e;for(;X.sibling===null;){if(X.return===null||X.return===r)break e;q===X&&(q=null),X=X.return}q===X&&(q=null),X.sibling.return=X.return,X=X.sibling}}break;case 19:dn(s,r),Sn(r),d&4&&Vh(r);break;case 21:break;default:dn(s,r),Sn(r)}}function Sn(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if($h(u)){var d=u;break e}u=u.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Fe(g,""),d.flags&=-33);var y=Bh(r);uu(r,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,T=Bh(r);au(r,T,x);break;default:throw Error(n(161))}}catch(R){tt(r,r.return,R)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Jv(r,s,u){ae=r,Wh(r)}function Wh(r,s,u){for(var d=(r.mode&1)!==0;ae!==null;){var g=ae,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Ao;if(!x){var T=g.alternate,R=T!==null&&T.memoizedState!==null||Et;T=Ao;var $=Et;if(Ao=x,(Et=R)&&!$)for(ae=g;ae!==null;)x=ae,R=x.child,x.tag===22&&x.memoizedState!==null?qh(g):R!==null?(R.return=x,ae=R):qh(g);for(;y!==null;)ae=y,Wh(y),y=y.sibling;ae=g,Ao=T,Et=$}Hh(r)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,ae=y):Hh(r)}}function Hh(r){for(;ae!==null;){var s=ae;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Et||Po(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!Et)if(u===null)d.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:cn(s.type,u.memoizedProps);d.componentDidUpdate(g,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&Kd(s,y,d);break;case 3:var x=s.updateQueue;if(x!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}Kd(s,x,u)}break;case 5:var T=s.stateNode;if(u===null&&s.flags&4){u=T;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&u.focus();break;case"img":R.src&&(u.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var $=s.alternate;if($!==null){var q=$.memoizedState;if(q!==null){var X=q.dehydrated;X!==null&&zi(X)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Et||s.flags&512&&lu(s)}catch(K){tt(s,s.return,K)}}if(s===r){ae=null;break}if(u=s.sibling,u!==null){u.return=s.return,ae=u;break}ae=s.return}}function Kh(r){for(;ae!==null;){var s=ae;if(s===r){ae=null;break}var u=s.sibling;if(u!==null){u.return=s.return,ae=u;break}ae=s.return}}function qh(r){for(;ae!==null;){var s=ae;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Po(4,s)}catch(R){tt(s,u,R)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(R){tt(s,g,R)}}var y=s.return;try{lu(s)}catch(R){tt(s,y,R)}break;case 5:var x=s.return;try{lu(s)}catch(R){tt(s,x,R)}}}catch(R){tt(s,s.return,R)}if(s===r){ae=null;break}var T=s.sibling;if(T!==null){T.return=s.return,ae=T;break}ae=s.return}}var Zv=Math.ceil,Lo=B.ReactCurrentDispatcher,cu=B.ReactCurrentOwner,en=B.ReactCurrentBatchConfig,ze=0,ht=null,ot=null,kt=0,Wt=0,ci=Yn(0),ut=0,as=null,Er=0,Ro=0,fu=0,us=null,Mt=null,du=0,fi=1/0,jn=null,jo=!1,hu=null,rr=null,Oo=!1,ir=null,Mo=0,cs=0,pu=null,Do=-1,Fo=0;function Pt(){return(ze&6)!==0?nt():Do!==-1?Do:Do=nt()}function sr(r){return(r.mode&1)===0?1:(ze&2)!==0&&kt!==0?kt&-kt:Mv.transition!==null?(Fo===0&&(Fo=Bf()),Fo):(r=Ue,r!==0||(r=window.event,r=r===void 0?16:Xf(r.type)),r)}function hn(r,s,u,d){if(50<cs)throw cs=0,pu=null,Error(n(185));ji(r,u,d),((ze&2)===0||r!==ht)&&(r===ht&&((ze&2)===0&&(Ro|=u),ut===4&&or(r,kt)),Dt(r,d),u===1&&ze===0&&(s.mode&1)===0&&(fi=nt()+500,fo&&Zn()))}function Dt(r,s){var u=r.callbackNode;Mw(r,s);var d=Hs(r,r===ht?kt:0);if(d===0)u!==null&&Ff(u),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(u!=null&&Ff(u),s===1)r.tag===0?Ov(Xh.bind(null,r)):Od(Xh.bind(null,r)),Pv(function(){(ze&6)===0&&Zn()}),u=null;else{switch(Uf(d)){case 1:u=Kl;break;case 4:u=zf;break;case 16:u=Us;break;case 536870912:u=$f;break;default:u=Us}u=ip(u,Qh.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Qh(r,s){if(Do=-1,Fo=0,(ze&6)!==0)throw Error(n(327));var u=r.callbackNode;if(di()&&r.callbackNode!==u)return null;var d=Hs(r,r===ht?kt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=zo(r,d);else{s=d;var g=ze;ze|=2;var y=Jh();(ht!==r||kt!==s)&&(jn=null,fi=nt()+500,Ir(r,s));do try{nk();break}catch(T){Yh(r,T)}while(!0);La(),Lo.current=y,ze=g,ot!==null?s=0:(ht=null,kt=0,s=ut)}if(s!==0){if(s===2&&(g=ql(r),g!==0&&(d=g,s=mu(r,g))),s===1)throw u=as,Ir(r,0),or(r,d),Dt(r,nt()),u;if(s===6)or(r,d);else{if(g=r.current.alternate,(d&30)===0&&!ek(g)&&(s=zo(r,d),s===2&&(y=ql(r),y!==0&&(d=y,s=mu(r,y))),s===1))throw u=as,Ir(r,0),or(r,d),Dt(r,nt()),u;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Nr(r,Mt,jn);break;case 3:if(or(r,d),(d&130023424)===d&&(s=du+500-nt(),10<s)){if(Hs(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Pt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=xa(Nr.bind(null,r,Mt,jn),s);break}Nr(r,Mt,jn);break;case 4:if(or(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var x=31-ln(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=nt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Zv(d/1960))-d,10<d){r.timeoutHandle=xa(Nr.bind(null,r,Mt,jn),d);break}Nr(r,Mt,jn);break;case 5:Nr(r,Mt,jn);break;default:throw Error(n(329))}}}return Dt(r,nt()),r.callbackNode===u?Qh.bind(null,r):null}function mu(r,s){var u=us;return r.current.memoizedState.isDehydrated&&(Ir(r,s).flags|=256),r=zo(r,s),r!==2&&(s=Mt,Mt=u,s!==null&&gu(s)),r}function gu(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function ek(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var g=u[d],y=g.getSnapshot;g=g.value;try{if(!an(y(),g))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function or(r,s){for(s&=~fu,s&=~Ro,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-ln(s),d=1<<u;r[u]=-1,s&=~d}}function Xh(r){if((ze&6)!==0)throw Error(n(327));di();var s=Hs(r,0);if((s&1)===0)return Dt(r,nt()),null;var u=zo(r,s);if(r.tag!==0&&u===2){var d=ql(r);d!==0&&(s=d,u=mu(r,d))}if(u===1)throw u=as,Ir(r,0),or(r,s),Dt(r,nt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Nr(r,Mt,jn),Dt(r,nt()),null}function yu(r,s){var u=ze;ze|=1;try{return r(s)}finally{ze=u,ze===0&&(fi=nt()+500,fo&&Zn())}}function br(r){ir!==null&&ir.tag===0&&(ze&6)===0&&di();var s=ze;ze|=1;var u=en.transition,d=Ue;try{if(en.transition=null,Ue=1,r)return r()}finally{Ue=d,en.transition=u,ze=s,(ze&6)===0&&Zn()}}function wu(){Wt=ci.current,Qe(ci)}function Ir(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Av(u)),ot!==null)for(u=ot.return;u!==null;){var d=u;switch(Ia(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&uo();break;case 3:li(),Qe(Rt),Qe(St),$a();break;case 5:Fa(d);break;case 4:li();break;case 13:Qe(Ye);break;case 19:Qe(Ye);break;case 10:Ra(d.type._context);break;case 22:case 23:wu()}u=u.return}if(ht=r,ot=r=lr(r.current,null),kt=Wt=s,ut=0,as=null,fu=Ro=Er=0,Mt=us=null,Sr!==null){for(s=0;s<Sr.length;s++)if(u=Sr[s],d=u.interleaved,d!==null){u.interleaved=null;var g=d.next,y=u.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}u.pending=d}Sr=null}return r}function Yh(r,s){do{var u=ot;try{if(La(),So.current=bo,Co){for(var d=Je.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Co=!1}if(_r=0,dt=at=Je=null,ns=!1,rs=0,cu.current=null,u===null||u.return===null){ut=1,as=s,ot=null;break}e:{var y=r,x=u.return,T=u,R=s;if(s=kt,T.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var $=R,q=T,X=q.tag;if((q.mode&1)===0&&(X===0||X===11||X===15)){var K=q.alternate;K?(q.updateQueue=K.updateQueue,q.memoizedState=K.memoizedState,q.lanes=K.lanes):(q.updateQueue=null,q.memoizedState=null)}var le=Sh(x);if(le!==null){le.flags&=-257,Ch(le,x,T,y,s),le.mode&1&&xh(y,$,s),s=le,R=$;var ce=s.updateQueue;if(ce===null){var de=new Set;de.add(R),s.updateQueue=de}else ce.add(R);break e}else{if((s&1)===0){xh(y,$,s),vu();break e}R=Error(n(426))}}else if(Xe&&T.mode&1){var rt=Sh(x);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),Ch(rt,x,T,y,s),Aa(ai(R,T));break e}}y=R=ai(R,T),ut!==4&&(ut=2),us===null?us=[y]:us.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var M=vh(y,R,s);Hd(y,M);break e;case 1:T=R;var j=y.type,F=y.stateNode;if((y.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(rr===null||!rr.has(F)))){y.flags|=65536,s&=-s,y.lanes|=s;var Z=kh(y,T,s);Hd(y,Z);break e}}y=y.return}while(y!==null)}ep(u)}catch(he){s=he,ot===u&&u!==null&&(ot=u=u.return);continue}break}while(!0)}function Jh(){var r=Lo.current;return Lo.current=bo,r===null?bo:r}function vu(){(ut===0||ut===3||ut===2)&&(ut=4),ht===null||(Er&268435455)===0&&(Ro&268435455)===0||or(ht,kt)}function zo(r,s){var u=ze;ze|=2;var d=Jh();(ht!==r||kt!==s)&&(jn=null,Ir(r,s));do try{tk();break}catch(g){Yh(r,g)}while(!0);if(La(),ze=u,Lo.current=d,ot!==null)throw Error(n(261));return ht=null,kt=0,ut}function tk(){for(;ot!==null;)Zh(ot)}function nk(){for(;ot!==null&&!Iw();)Zh(ot)}function Zh(r){var s=rp(r.alternate,r,Wt);r.memoizedProps=r.pendingProps,s===null?ep(r):ot=s,cu.current=null}function ep(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=qv(u,s,Wt),u!==null){ot=u;return}}else{if(u=Qv(u,s),u!==null){u.flags&=32767,ot=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ut=6,ot=null;return}}if(s=s.sibling,s!==null){ot=s;return}ot=s=r}while(s!==null);ut===0&&(ut=5)}function Nr(r,s,u){var d=Ue,g=en.transition;try{en.transition=null,Ue=1,rk(r,s,u,d)}finally{en.transition=g,Ue=d}return null}function rk(r,s,u,d){do di();while(ir!==null);if((ze&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=u.lanes|u.childLanes;if(Dw(r,y),r===ht&&(ot=ht=null,kt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Oo||(Oo=!0,ip(Us,function(){return di(),null})),y=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||y){y=en.transition,en.transition=null;var x=Ue;Ue=1;var T=ze;ze|=4,cu.current=null,Yv(r,u),Gh(u,r),Cv(va),Qs=!!wa,va=wa=null,r.current=u,Jv(u),Nw(),ze=T,Ue=x,en.transition=y}else r.current=u;if(Oo&&(Oo=!1,ir=r,Mo=g),y=r.pendingLanes,y===0&&(rr=null),Pw(u.stateNode),Dt(r,nt()),s!==null)for(d=r.onRecoverableError,u=0;u<s.length;u++)g=s[u],d(g.value,{componentStack:g.stack,digest:g.digest});if(jo)throw jo=!1,r=hu,hu=null,r;return(Mo&1)!==0&&r.tag!==0&&di(),y=r.pendingLanes,(y&1)!==0?r===pu?cs++:(cs=0,pu=r):cs=0,Zn(),null}function di(){if(ir!==null){var r=Uf(Mo),s=en.transition,u=Ue;try{if(en.transition=null,Ue=16>r?16:r,ir===null)var d=!1;else{if(r=ir,ir=null,Mo=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=4,ae=r.current;ae!==null;){var y=ae,x=y.child;if((ae.flags&16)!==0){var T=y.deletions;if(T!==null){for(var R=0;R<T.length;R++){var $=T[R];for(ae=$;ae!==null;){var q=ae;switch(q.tag){case 0:case 11:case 15:ls(8,q,y)}var X=q.child;if(X!==null)X.return=q,ae=X;else for(;ae!==null;){q=ae;var K=q.sibling,le=q.return;if(zh(q),q===$){ae=null;break}if(K!==null){K.return=le,ae=K;break}ae=le}}}var ce=y.alternate;if(ce!==null){var de=ce.child;if(de!==null){ce.child=null;do{var rt=de.sibling;de.sibling=null,de=rt}while(de!==null)}}ae=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,ae=x;else e:for(;ae!==null;){if(y=ae,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ls(9,y,y.return)}var M=y.sibling;if(M!==null){M.return=y.return,ae=M;break e}ae=y.return}}var j=r.current;for(ae=j;ae!==null;){x=ae;var F=x.child;if((x.subtreeFlags&2064)!==0&&F!==null)F.return=x,ae=F;else e:for(x=j;ae!==null;){if(T=ae,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:Po(9,T)}}catch(he){tt(T,T.return,he)}if(T===x){ae=null;break e}var Z=T.sibling;if(Z!==null){Z.return=T.return,ae=Z;break e}ae=T.return}}if(ze=g,Zn(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(Vs,r)}catch{}d=!0}return d}finally{Ue=u,en.transition=s}}return!1}function tp(r,s,u){s=ai(u,s),s=vh(r,s,1),r=tr(r,s,1),s=Pt(),r!==null&&(ji(r,1,s),Dt(r,s))}function tt(r,s,u){if(r.tag===3)tp(r,r,u);else for(;s!==null;){if(s.tag===3){tp(s,r,u);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(rr===null||!rr.has(d))){r=ai(u,r),r=kh(s,r,1),s=tr(s,r,1),r=Pt(),s!==null&&(ji(s,1,r),Dt(s,r));break}}s=s.return}}function ik(r,s,u){var d=r.pingCache;d!==null&&d.delete(s),s=Pt(),r.pingedLanes|=r.suspendedLanes&u,ht===r&&(kt&u)===u&&(ut===4||ut===3&&(kt&130023424)===kt&&500>nt()-du?Ir(r,0):fu|=u),Dt(r,s)}function np(r,s){s===0&&((r.mode&1)===0?s=1:(s=Ws,Ws<<=1,(Ws&130023424)===0&&(Ws=4194304)));var u=Pt();r=Pn(r,s),r!==null&&(ji(r,s,u),Dt(r,u))}function sk(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),np(r,u)}function ok(r,s){var u=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),np(r,u)}var rp;rp=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||Rt.current)Ot=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return Ot=!1,Kv(r,s,u);Ot=(r.flags&131072)!==0}else Ot=!1,Xe&&(s.flags&1048576)!==0&&Md(s,po,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;To(r,s),r=s.pendingProps;var g=ei(s,St.current);oi(s,u),g=Va(null,s,d,r,g,u);var y=Ga();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jt(d)?(y=!0,co(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ma(s),g.updater=Io,s.stateNode=g,g._reactInternals=s,Xa(s,d,r,u),s=eu(null,s,d,!0,y,u)):(s.tag=0,Xe&&y&&ba(s),At(null,s,g,u),s=s.child),s;case 16:d=s.elementType;e:{switch(To(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=ak(d),r=cn(d,r),g){case 0:s=Za(null,s,d,r,u);break e;case 1:s=Th(null,s,d,r,u);break e;case 11:s=_h(null,s,d,r,u);break e;case 14:s=Eh(null,s,d,cn(d.type,r),u);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Za(r,s,d,g,u);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Th(r,s,d,g,u);case 3:e:{if(Ah(s),r===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,Wd(r,s),ko(s,d,null,u);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=ai(Error(n(423)),s),s=Ph(r,s,d,u,g);break e}else if(d!==g){g=ai(Error(n(424)),s),s=Ph(r,s,d,u,g);break e}else for(Gt=Xn(s.stateNode.containerInfo.firstChild),Vt=s,Xe=!0,un=null,u=Vd(s,null,d,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ri(),d===g){s=Rn(r,s,u);break e}At(r,s,d,u)}s=s.child}return s;case 5:return qd(s),r===null&&Ta(s),d=s.type,g=s.pendingProps,y=r!==null?r.memoizedProps:null,x=g.children,ka(d,g)?x=null:y!==null&&ka(d,y)&&(s.flags|=32),Nh(r,s),At(r,s,x,u),s.child;case 6:return r===null&&Ta(s),null;case 13:return Lh(r,s,u);case 4:return Da(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=ii(s,null,d,u):At(r,s,d,u),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),_h(r,s,d,g,u);case 7:return At(r,s,s.pendingProps,u),s.child;case 8:return At(r,s,s.pendingProps.children,u),s.child;case 12:return At(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,We(yo,d._currentValue),d._currentValue=x,y!==null)if(an(y.value,x)){if(y.children===g.children&&!Rt.current){s=Rn(r,s,u);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var T=y.dependencies;if(T!==null){x=y.child;for(var R=T.firstContext;R!==null;){if(R.context===d){if(y.tag===1){R=Ln(-1,u&-u),R.tag=2;var $=y.updateQueue;if($!==null){$=$.shared;var q=$.pending;q===null?R.next=R:(R.next=q.next,q.next=R),$.pending=R}}y.lanes|=u,R=y.alternate,R!==null&&(R.lanes|=u),ja(y.return,u,s),T.lanes|=u;break}R=R.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=u,T=x.alternate,T!==null&&(T.lanes|=u),ja(x,u,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}At(r,s,g.children,u),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,oi(s,u),g=Jt(g),d=d(g),s.flags|=1,At(r,s,d,u),s.child;case 14:return d=s.type,g=cn(d,s.pendingProps),g=cn(d.type,g),Eh(r,s,d,g,u);case 15:return bh(r,s,s.type,s.pendingProps,u);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),To(r,s),s.tag=1,jt(d)?(r=!0,co(s)):r=!1,oi(s,u),yh(s,d,g),Xa(s,d,g,u),eu(null,s,d,!0,r,u);case 19:return jh(r,s,u);case 22:return Ih(r,s,u)}throw Error(n(156,s.tag))};function ip(r,s){return Df(r,s)}function lk(r,s,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(r,s,u,d){return new lk(r,s,u,d)}function ku(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ak(r){if(typeof r=="function")return ku(r)?1:0;if(r!=null){if(r=r.$$typeof,r===re)return 11;if(r===Y)return 14}return 2}function lr(r,s){var u=r.alternate;return u===null?(u=tn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function $o(r,s,u,d,g,y){var x=2;if(d=r,typeof r=="function")ku(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case Q:return Tr(u.children,g,y,s);case se:x=8,g|=8;break;case ue:return r=tn(12,u,s,g|2),r.elementType=ue,r.lanes=y,r;case fe:return r=tn(13,u,s,g),r.elementType=fe,r.lanes=y,r;case ne:return r=tn(19,u,s,g),r.elementType=ne,r.lanes=y,r;case me:return Bo(u,g,y,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case D:x=10;break e;case te:x=9;break e;case re:x=11;break e;case Y:x=14;break e;case ge:x=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=tn(x,u,s,g),s.elementType=r,s.type=d,s.lanes=y,s}function Tr(r,s,u,d){return r=tn(7,r,d,s),r.lanes=u,r}function Bo(r,s,u,d){return r=tn(22,r,d,s),r.elementType=me,r.lanes=u,r.stateNode={isHidden:!1},r}function xu(r,s,u){return r=tn(6,r,null,s),r.lanes=u,r}function Su(r,s,u){return s=tn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function uk(r,s,u,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Cu(r,s,u,d,g,y,x,T,R){return r=new uk(r,s,u,T,R),s===1?(s=1,y===!0&&(s|=8)):s=0,y=tn(3,null,null,s),r.current=y,y.stateNode=r,y.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(y),r}function ck(r,s,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:d==null?null:""+d,children:r,containerInfo:s,implementation:u}}function sp(r){if(!r)return Jn;r=r._reactInternals;e:{if(yr(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(jt(u))return Rd(r,u,s)}return s}function op(r,s,u,d,g,y,x,T,R){return r=Cu(u,d,!0,r,g,y,x,T,R),r.context=sp(null),u=r.current,d=Pt(),g=sr(u),y=Ln(d,g),y.callback=s??null,tr(u,y,g),r.current.lanes=g,ji(r,g,d),Dt(r,d),r}function Uo(r,s,u,d){var g=s.current,y=Pt(),x=sr(g);return u=sp(u),s.context===null?s.context=u:s.pendingContext=u,s=Ln(y,x),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=tr(g,s,x),r!==null&&(hn(r,g,x,y),vo(r,g,x)),x}function Vo(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function lp(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function _u(r,s){lp(r,s),(r=r.alternate)&&lp(r,s)}function fk(){return null}var ap=typeof reportError=="function"?reportError:function(r){console.error(r)};function Eu(r){this._internalRoot=r}Go.prototype.render=Eu.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Uo(r,s,null,null)},Go.prototype.unmount=Eu.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;br(function(){Uo(null,r,null,null)}),s[In]=null}};function Go(r){this._internalRoot=r}Go.prototype.unstable_scheduleHydration=function(r){if(r){var s=Wf();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Kn.length&&s!==0&&s<Kn[u].priority;u++);Kn.splice(u,0,r),u===0&&qf(r)}};function bu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Wo(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function up(){}function dk(r,s,u,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var $=Vo(x);y.call($)}}var x=op(s,d,r,0,null,!1,!1,"",up);return r._reactRootContainer=x,r[In]=x.current,qi(r.nodeType===8?r.parentNode:r),br(),x}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var T=d;d=function(){var $=Vo(R);T.call($)}}var R=Cu(r,0,!1,null,null,!1,!1,"",up);return r._reactRootContainer=R,r[In]=R.current,qi(r.nodeType===8?r.parentNode:r),br(function(){Uo(s,R,u,d)}),R}function Ho(r,s,u,d,g){var y=u._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var T=g;g=function(){var R=Vo(x);T.call(R)}}Uo(s,x,r,g)}else x=dk(u,s,r,g,d);return Vo(x)}Vf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Ri(s.pendingLanes);u!==0&&(Xl(s,u|1),Dt(s,nt()),(ze&6)===0&&(fi=nt()+500,Zn()))}break;case 13:br(function(){var d=Pn(r,1);if(d!==null){var g=Pt();hn(d,r,1,g)}}),_u(r,1)}},Yl=function(r){if(r.tag===13){var s=Pn(r,134217728);if(s!==null){var u=Pt();hn(s,r,134217728,u)}_u(r,134217728)}},Gf=function(r){if(r.tag===13){var s=sr(r),u=Pn(r,s);if(u!==null){var d=Pt();hn(u,r,s,d)}_u(r,s)}},Wf=function(){return Ue},Hf=function(r,s){var u=Ue;try{return Ue=r,s()}finally{Ue=u}},Vl=function(r,s,u){switch(s){case"input":if(Se(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var d=u[s];if(d!==r&&d.form===r.form){var g=ao(d);if(!g)throw Error(n(90));Ur(d),Se(d,g)}}}break;case"textarea":mr(r,u);break;case"select":s=u.value,s!=null&&st(r,!!u.multiple,s,!1)}},Af=yu,Pf=br;var hk={usingClientEntryPoint:!1,Events:[Yi,Jr,ao,Nf,Tf,yu]},fs={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},pk={bundleType:fs.bundleType,version:fs.version,rendererPackageName:fs.rendererPackageName,rendererConfig:fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:B.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Of(r),r===null?null:r.stateNode},findFiberByHostInstance:fs.findFiberByHostInstance||fk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ko.isDisabled&&Ko.supportsFiber)try{Vs=Ko.inject(pk),wn=Ko}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hk,Ft.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bu(s))throw Error(n(200));return ck(r,s,null,u)},Ft.createRoot=function(r,s){if(!bu(r))throw Error(n(299));var u=!1,d="",g=ap;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Cu(r,1,!1,null,null,u,!1,d,g),r[In]=s.current,qi(r.nodeType===8?r.parentNode:r),new Eu(s)},Ft.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Of(s),r=r===null?null:r.stateNode,r},Ft.flushSync=function(r){return br(r)},Ft.hydrate=function(r,s,u){if(!Wo(s))throw Error(n(200));return Ho(null,r,s,!0,u)},Ft.hydrateRoot=function(r,s,u){if(!bu(r))throw Error(n(405));var d=u!=null&&u.hydratedSources||null,g=!1,y="",x=ap;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),s=op(s,null,r,1,u??null,g,!1,y,x),r[In]=s.current,qi(r),d)for(r=0;r<d.length;r++)u=d[r],g=u._getVersion,g=g(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,g]:s.mutableSourceEagerHydrationData.push(u,g);return new Go(s)},Ft.render=function(r,s,u){if(!Wo(s))throw Error(n(200));return Ho(null,r,s,!1,u)},Ft.unmountComponentAtNode=function(r){if(!Wo(r))throw Error(n(40));return r._reactRootContainer?(br(function(){Ho(null,null,r,!1,function(){r._reactRootContainer=null,r[In]=null})}),!0):!1},Ft.unstable_batchedUpdates=yu,Ft.unstable_renderSubtreeIntoContainer=function(r,s,u,d){if(!Wo(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Ho(r,s,u,!1,d)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var yp;function og(){if(yp)return Tu.exports;yp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Tu.exports=xk(),Tu.exports}var wp;function Sk(){if(wp)return qo;wp=1;var e=og();return qo.createRoot=e.createRoot,qo.hydrateRoot=e.hydrateRoot,qo}var Ck=Sk();class Or extends Error{constructor(t){super(t),this.name="TargetKeyError"}}function Lu(e){return!(!e||e.length>256||e.startsWith("-")||e.startsWith(".")||/[\s\0]/.test(e)||e.includes(".."))}function vp(e){if(e==="working"||e==="staged"||e==="all")return{kind:e};if(e.startsWith("commit:")){const t=e.slice(7);if(!Lu(t))throw new Or(`invalid commit ref: ${t}`);return{kind:"commit",sha:t}}if(e.startsWith("range:")){const t=e.slice(6),n=t.indexOf("..");if(n<=0)throw new Or(`invalid range: ${t}`);const i=t.slice(0,n),o=t.slice(n+2);if(!Lu(i)||!Lu(o))throw new Or(`invalid range refs: ${t}`);return{kind:"range",base:i,head:o}}throw new Or(`unknown target key: ${e}`)}function dl(e){if(typeof e!="string"||!e)throw new Or("empty target key");if(e.startsWith("worktree:")){const t=e.slice(9),n=/^(.+):(working|staged|all|commit:.+|range:.+)$/.exec(t);if(!n||!n[1]||!n[2])throw new Or(`invalid worktree target key: ${e}`);const i=n[1];if(!i.startsWith("/"))throw new Or(`worktree path must be absolute: ${i}`);return{...vp(n[2]),worktree:i}}return vp(e)}function zn(e){let t;switch(e.kind){case"working":case"staged":case"all":t=e.kind;break;case"commit":t=`commit:${e.sha}`;break;case"range":t=`range:${e.base}..${e.head}`;break}return e.worktree?`worktree:${e.worktree}:${t}`:t}function lg(e){let t;switch(e.kind){case"working":t="Working tree";break;case"staged":t="Staged";break;case"all":t="Working tree vs HEAD";break;case"commit":t=`Commit ${e.sha.length>12?e.sha.slice(0,8):e.sha}`;break;case"range":t=`${e.base}..${e.head}`;break}return e.worktree?`[${e.worktree.split("/").filter(Boolean).pop()??e.worktree}] ${t}`:t}function Dn(e){try{return dl(e)}catch{return}}function dr(e){return e.kind==="working"||e.kind==="staged"||e.kind==="all"}function yc(e){const t=Dn(e);return!t||!dr(t)?e:t.worktree?`worktree:${t.worktree}:local`:"local"}function _k(e){const t=Dn(e),n=t?.worktree?{worktree:t.worktree}:{};return[zn({kind:"working",...n}),zn({kind:"staged",...n}),zn({kind:"all",...n})]}const kp=e=>{let t;const n=new Set,i=(h,p)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const w=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,w))}},o=()=>t,c={setState:i,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(i,o,c);return c},Ek=(e=>e?kp(e):kp),bk=e=>e;function Ik(e,t=bk){const n=vs.useSyncExternalStore(e.subscribe,vs.useCallback(()=>t(e.getState()),[e,t]),vs.useCallback(()=>t(e.getInitialState()),[e,t]));return vs.useDebugValue(n),n}const xp=e=>{const t=Ek(e),n=i=>Ik(t,i);return Object.assign(n,t),n},Nk=(e=>e?xp(e):xp);class Hc extends Error{constructor(t,n,i){super(t),this.status=n,this.code=i,this.name="ApiError"}status;code}async function He(e,t,n){const i=await fetch(t,{method:e,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}),o=await i.text();let l=null;if(o)try{l=JSON.parse(o)}catch{l=null}if(!i.ok){const a=l??{};throw new Hc(a.error??`${i.status} ${i.statusText}`,i.status,a.code)}return l}const xt=encodeURIComponent,hi=e=>{const t=[];for(const[n,i]of Object.entries(e))i===void 0||i===""||i===!1||t.push(`${xt(n)}=${xt(i===!0?"1":String(i))}`);return t.length?`?${t.join("&")}`:""},$e={repo:()=>He("GET","/api/repo"),state:()=>He("GET","/api/state"),patchPrefs:e=>He("PATCH","/api/prefs",e),files:e=>He("GET",`/api/targets/${xt(e)}/files`),file:(e,t,n={})=>He("GET",`/api/targets/${xt(e)}/file${hi({path:t,old:n.oldPath,untracked:n.untracked})}`),fullFile:(e,t,n)=>He("GET",`/api/targets/${xt(e)}/file/full${hi({path:t,side:n})}`),setViewed:(e,t,n,i)=>He("PUT",`/api/targets/${xt(e)}/viewed`,{path:t,viewed:n,contentHash:i}),createComment:(e,t)=>He("POST",`/api/targets/${xt(e)}/comments`,t),updateComment:(e,t,n)=>He("PATCH",`/api/targets/${xt(e)}/comments/${xt(t)}`,n),deleteComment:(e,t)=>He("DELETE",`/api/targets/${xt(e)}/comments/${xt(t)}`),reanchor:(e,t)=>He("POST",`/api/targets/${xt(e)}/comments/reanchor`,{files:t}),exportComments:e=>He("POST","/api/comments/export",{commentIds:e}),issues:()=>He("GET","/api/issues"),createIssue:e=>He("POST","/api/issues",e),updateIssue:(e,t)=>He("PATCH",`/api/issues/${xt(e)}`,t),deleteIssue:e=>He("DELETE",`/api/issues/${xt(e)}`),exportIssue:e=>He("POST",`/api/issues/${xt(e)}/export`),todos:e=>He("GET",`/api/todos${hi({branch:e})}`),createTodo:e=>He("POST","/api/todos",e),updateTodo:(e,t)=>He("PATCH",`/api/todos/${xt(e)}`,t),deleteTodo:e=>He("DELETE",`/api/todos/${xt(e)}`),exportTodos:e=>He("POST","/api/todos/export",e),events:e=>new EventSource(`/api/events${hi({root:e})}`),commits:e=>He("GET",`/api/commits${hi(e)}`),nvimInstances:(e,t=!1)=>He("GET",`/api/nvim/instances${hi({root:e,rescan:t})}`),nvimSelect:(e,t)=>He("POST","/api/nvim/select",{root:e,socket:t}),nvimOpen:(e,t,n)=>He("POST","/api/nvim/open",{socket:e,absPath:t,line:n})};async function Ru(e){if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(e);return}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("copy command failed")}finally{document.body.removeChild(t)}}function Kc(e,t){return e?e.worktrees.find(n=>n.path===t)?.branch??e.branch:""}let Tk=0,ju=null;function Qo(e){return e instanceof Hc||e instanceof Error?e.message:String(e)}const W=Nk((e,t)=>{const n=a=>t().showToast(Qo(a),"error"),i=a=>{const c=t();if(a===c.targetKey)return c.files;const f=Dn(a);return!f||!dr(f)?[]:f.kind==="working"?c.unstaged:f.kind==="staged"?c.staged:c.allFiles},o=(a,c,f)=>{const h=Dn(a),p=h&&dr(h)?h.kind:null,m=w=>w.map(v=>v.path===c?{...v,...f}:v);e(w=>({...p==="working"?{unstaged:m(w.unstaged)}:{},...p==="staged"?{staged:m(w.staged)}:{},...p==="all"?{allFiles:m(w.allFiles)}:{},...a===w.targetKey?{files:m(w.files)}:{}}))},l=async a=>{const{targetKey:c,files:f}=t(),h=f.find(p=>p.path===a);e(p=>({diffs:{...p.diffs,[a]:{status:"loading"}}}));try{const p=await $e.file(c,a,{oldPath:h?.oldPath,untracked:h?.untracked});return t().targetKey!==c?void 0:(e(m=>({diffs:{...m.diffs,[a]:{status:"ok",diff:p}}})),p)}catch(p){if(t().targetKey!==c)return;e(m=>({diffs:{...m.diffs,[a]:{status:"error",message:Qo(p)}}}));return}};return{repo:null,initError:null,prefs:{viewMode:"unified",nvimSocketByRoot:{},autoRefresh:!0},targetKey:"working",root:"",files:[],unstaged:[],staged:[],allFiles:[],filesLoading:!1,filesError:null,activeFile:null,diffs:{},comments:[],issues:[],todos:[],allComments:[],nvim:null,nvimScanning:!1,panel:"diff",includeExported:!1,selectedCommentIds:[],jumpTo:null,toast:null,reattaching:null,refreshNonce:0,refreshing:!1,refreshPending:!1,lastRefreshAt:null,restoreScroll:!1,editor:null,focusedCommentId:null,railFilter:"file",async init(){try{const[a,c]=await Promise.all([$e.repo(),$e.state()]);e({repo:a,prefs:c.prefs,issues:c.issues,todos:c.todos,root:a.root}),await t().setTarget(a.defaultTarget||"working")}catch(a){e({initError:Qo(a)})}},async setTarget(a){e({targetKey:a,files:[],unstaged:[],staged:[],allFiles:[],diffs:{},activeFile:null,comments:[],filesError:null,selectedCommentIds:[],reattaching:null,panel:"diff",editor:null,focusedCommentId:null}),$e.patchPrefs({lastTarget:a}).catch(()=>{}),await t().loadFiles()},async switchView(a,c){const f=Dn(a);if(!f||!dr(f)){await t().setTarget(a);return}const{unstaged:h,staged:p,allFiles:m}=t(),w=c!==void 0?c:t().activeFile,v=f.kind==="working"?h:f.kind==="staged"?p:m;e({targetKey:a,files:v,diffs:{},filesError:null,activeFile:w}),$e.patchPrefs({lastTarget:a}).catch(()=>{}),f.kind==="all"&&await t().loadFiles(),w&&t().files.some(k=>k.path===w)&&await l(w)},async loadFiles(){const a=t().targetKey,c=Dn(a);e({filesLoading:!0,filesError:null});try{await $e.reanchor(a).catch(()=>{});const f=p=>t().activeFile&&p.some(m=>m.path===t().activeFile)?t().activeFile:null;if(c&&dr(c)){const[p,m]=_k(a),[w,v,k]=await Promise.all([$e.files(p),$e.files(m),c.kind==="all"?$e.files(a):Promise.resolve(null)]);if(t().targetKey!==a)return;const b=c.kind==="working"?w.files:c.kind==="staged"?v.files:k.files,E=k??w;e({unstaged:w.files,staged:v.files,allFiles:k?.files??[],files:b,root:E.root,comments:E.comments,filesLoading:!1,activeFile:f(b)}),E.root!==t().nvim?.root&&t().scanNvim();return}const h=await $e.files(a);if(t().targetKey!==a)return;e({files:h.files,unstaged:[],staged:[],allFiles:[],root:h.root,comments:h.comments,filesLoading:!1,activeFile:f(h.files)}),h.root!==t().nvim?.root&&t().scanNvim()}catch(f){if(t().targetKey!==a)return;e({filesLoading:!1,filesError:Qo(f),files:[]})}},async refresh(){if(t().refreshing){e({refreshPending:!0});return}const{activeFile:a}=t();e({refreshing:!0,restoreScroll:!0,diffs:{},refreshNonce:t().refreshNonce+1});try{await t().loadFiles(),a&&t().files.some(c=>c.path===a)&&await l(a),e({lastRefreshAt:new Date().toISOString()})}finally{e({refreshing:!1})}t().refreshPending&&(e({refreshPending:!1}),await t().refresh())},onRepoChanged(a){const c=t().root;e(f=>{if(!f.repo)return{};const h=f.repo.worktrees.map(m=>m.path===c?{...m,head:a.head,branch:a.branch}:m),p=c===f.repo.root;return{repo:{...f.repo,worktrees:h,...p?{head:a.head,branch:a.branch}:{}}}}),t().prefs.autoRefresh&&t().refresh()},setAutoRefresh(a){e(c=>({prefs:{...c.prefs,autoRefresh:a}})),$e.patchPrefs({autoRefresh:a}).catch(n)},consumeRestoreScroll(){return t().restoreScroll?(e({restoreScroll:!1}),!0):!1},async openFile(a,c=!1){e({activeFile:a,panel:"diff"});const f=t().diffs[a];!c&&f&&f.status!=="error"||await l(a)},setActiveFile(a){e({activeFile:a}),a&&t().openFile(a)},setViewMode(a){e(c=>({prefs:{...c.prefs,viewMode:a}})),$e.patchPrefs({viewMode:a}).catch(n)},async toggleViewed(a,c){const f=c??t().targetKey,h=i(f).find(m=>m.path===a);if(!h)return;const p=!h.viewed;o(f,a,{viewed:p,changed:!1});try{await $e.setViewed(f,a,p,h.contentHash)}catch(m){n(m),o(f,a,{viewed:!p})}},async createComment(a){try{const c=await $e.createComment(t().targetKey,a);return e(f=>({comments:[...f.comments,c],editor:null,focusedCommentId:c.id})),c}catch(c){n(c);return}},async updateComment(a,c){try{const f=await $e.updateComment(t().targetKey,a,c);return e(h=>({comments:h.comments.map(p=>p.id===a?f:p),reattaching:h.reattaching===a?null:h.reattaching})),f}catch(f){n(f);return}},async deleteComment(a){try{await $e.deleteComment(t().targetKey,a),e(c=>({comments:c.comments.filter(f=>f.id!==a),selectedCommentIds:c.selectedCommentIds.filter(f=>f!==a),focusedCommentId:c.focusedCommentId===a?null:c.focusedCommentId,issues:c.issues.map(f=>f.commentIds.includes(a)?{...f,commentIds:f.commentIds.filter(h=>h!==a)}:f)}))}catch(c){n(c)}},async exportComments(a){if(a.length===0){t().showToast("没有可复制的评论");return}try{const c=await $e.exportComments(a);await Ru(c.text);const f=new Date().toISOString();e(h=>({comments:h.comments.map(p=>c.commentIds.includes(p.id)?{...p,status:p.status==="active"?"exported":p.status,exportedAt:f}:p)})),t().showToast(`已复制 ${c.count} 条评论到剪贴板`)}catch(c){n(c)}},async copyAllComments(){const{comments:a,includeExported:c}=t(),f=a.filter(h=>h.status==="active"||c&&h.status==="exported").map(h=>h.id);await t().exportComments(f)},async loadIssues(){try{const a=await $e.state(),c=Object.values(a.targets).flatMap(f=>f.comments);e({issues:a.issues,allComments:c})}catch(a){n(a)}},async createIssue(a){try{const c=await $e.createIssue(a);return e(f=>({issues:[...f.issues,c],selectedCommentIds:[]})),t().showToast(`已创建 Issue「${c.title}」`),c}catch(c){n(c);return}},async updateIssue(a,c){try{const f=await $e.updateIssue(a,c);e(h=>({issues:h.issues.map(p=>p.id===a?f:p)}))}catch(f){n(f)}},async deleteIssue(a){try{await $e.deleteIssue(a),e(c=>({issues:c.issues.filter(f=>f.id!==a)}))}catch(c){n(c)}},async exportIssue(a){try{const c=await $e.exportIssue(a);await Ru(c.text);const f=new Date().toISOString();e(h=>({comments:h.comments.map(p=>c.commentIds.includes(p.id)?{...p,status:p.status==="active"?"exported":p.status,exportedAt:f}:p)})),t().showToast(`已复制 Issue(含 ${c.count} 条评论)到剪贴板`)}catch(c){n(c)}},async scanNvim(a=!1){const c=t().root||t().repo?.root;if(c){e({nvimScanning:!0});try{const f=await $e.nvimInstances(c,a);e({nvim:f,nvimScanning:!1})}catch(f){e({nvimScanning:!1}),n(f)}}},async selectNvim(a){const c=t().root;e(f=>f.nvim?{nvim:{...f.nvim,selected:a}}:{});try{await $e.nvimSelect(c,a)}catch(f){n(f)}},async openInNvim(a,c){const{nvim:f,root:h}=t(),p=f?.selected;if(!p){t().showToast(f&&f.instances.length>1?"请先在顶部选择一个 nvim 实例":"未发现在此仓库打开的 nvim","error");return}const m=`${h.replace(/\/+$/,"")}/${a}`;try{await $e.nvimOpen(p,m,c)}catch(w){n(w),w instanceof Hc&&w.code==="nvim_gone"&&t().scanNvim(!0)}},setPanel(a){e({panel:a}),a==="issues"&&t().loadIssues(),a==="todos"&&t().loadTodos()},setIncludeExported(a){e({includeExported:a})},toggleSelectComment(a){e(c=>({selectedCommentIds:c.selectedCommentIds.includes(a)?c.selectedCommentIds.filter(f=>f!==a):[...c.selectedCommentIds,a]}))},clearSelectedComments(){e({selectedCommentIds:[]})},async jumpToComment(a){a.targetKey!==t().targetKey&&await t().switchView(a.targetKey),e({panel:"diff"}),await t().openFile(a.filePath),e({jumpTo:{file:a.filePath,side:a.side,line:a.endLine,nonce:Date.now()}})},setReattaching(a){e({reattaching:a,editor:a?null:t().editor}),a&&t().showToast("在 diff 中点击或拖选行,将评论重新附着到该位置")},setEditor(a){e({editor:a,focusedCommentId:a?null:t().focusedCommentId})},async focusComment(a,c=!0){if(e({focusedCommentId:a}),!a||!c)return;const f=t().comments.find(h=>h.id===a)??t().allComments.find(h=>h.id===a);!f||f.status==="orphaned"||await t().jumpToComment(f)},setRailFilter(a){e({railFilter:a})},async loadTodos(){try{const a=await $e.todos();e({todos:a.todos})}catch(a){n(a)}},async createTodo(a){try{const c=await $e.createTodo({...a,root:a.root??t().root});return e(f=>({todos:[...f.todos,c]})),c}catch(c){n(c);return}},async updateTodo(a,c){try{const f=await $e.updateTodo(a,c);e(h=>({todos:h.todos.map(p=>p.id===a?f:p)}))}catch(f){n(f)}},async deleteTodo(a){try{await $e.deleteTodo(a),e(c=>({todos:c.todos.filter(f=>f.id!==a)}))}catch(c){n(c)}},async exportTodos(a){const c=Kc(t().repo,t().root);try{const f=await $e.exportTodos({branch:c,includeDone:a});if(f.count===0){t().showToast(`分支 ${c} 没有可导出的 Todo`);return}await Ru(f.text),t().showToast(`已复制 ${f.count} 条 Todo 到剪贴板`)}catch(f){n(f)}},showToast(a,c="info"){const f=++Tk;e({toast:{id:f,message:a,kind:c}}),ju&&clearTimeout(ju),ju=setTimeout(()=>{t().toast?.id===f&&e({toast:null})},c==="error"?6e3:3e3)}}});function Ak(){const e=W(a=>a.nvim),t=W(a=>a.nvimScanning),n=W(a=>a.scanNvim),i=W(a=>a.selectNvim),o=e?.instances??[];let l;if(!e)l=C.jsx("span",{className:"muted",children:"nvim: 未扫描"});else if(!e.nvimAvailable)l=C.jsx("span",{className:"muted",title:"PATH 中找不到 nvim 可执行文件",children:"nvim 不可用"});else if(o.length===0)l=C.jsx("span",{className:"muted",children:"未发现在此仓库打开的 nvim"});else if(o.length===1){const a=o[0];l=C.jsxs("span",{className:"nvim-one",title:`${a.socket}
|
|
10
|
-
cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",{value:e.selected??"",onChange:a=>{i(a.target.value)},title:"多个 nvim 实例,请选择跳转目标",children:[!e.selected&&C.jsx("option",{value:"",children:"选择 nvim…"}),o.map(a=>C.jsxs("option",{value:a.socket,children:["nvim",a.pid?` #${a.pid}`:""," — ",a.cwd]},a.socket))]});return C.jsxs("div",{className:"nvim",children:[l,C.jsx("button",{className:"icon",onClick:()=>{n(!0)},disabled:t,title:"重新扫描 nvim 实例",children:t?"…":"⟳"})]})}function Sp(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Pk(){const e=W(z=>z.repo),t=W(z=>z.targetKey),n=W(z=>z.setTarget),i=W(z=>z.switchView),o=W(z=>z.refresh),l=W(z=>z.filesLoading),a=W(z=>z.prefs.autoRefresh),c=W(z=>z.setAutoRefresh),f=W(z=>z.lastRefreshAt),h=W(z=>z.todos),p=W(z=>z.root),m=W(z=>z.prefs.viewMode),w=W(z=>z.setViewMode),v=W(z=>z.panel),k=W(z=>z.setPanel),b=W(z=>z.issues),E=ee.useMemo(()=>dl(t),[t]),[S,I]=ee.useState(E.kind),[A,B]=ee.useState(E.worktree??""),[P,L]=ee.useState(E.kind==="commit"?E.sha:""),[Q,se]=ee.useState(E.kind==="range"?E.base:"@"),[ue,D]=ee.useState(E.kind==="range"?E.head:""),[te,re]=ee.useState(t);te!==t&&(re(t),I(E.kind),B(E.worktree??""),E.kind==="commit"&&L(E.sha),E.kind==="range"&&(se(E.base),D(E.head)));const fe=(z={})=>{const oe=z.kind??S,_=z.worktree??A,O=_?{worktree:_}:{};let G;if(oe==="commit"){const pe=(z.sha??P).trim();if(!pe)return;G={kind:"commit",sha:pe,...O}}else if(oe==="range"){const pe=(z.base??Q).trim()||"@",Ee=(z.head??ue).trim();if(!Ee)return;G={kind:"range",base:pe,head:Ee,...O}}else G={kind:oe,...O};const N=zn(G);N!==t&&(dr(G)&&yc(N)===yc(t)?i(N):n(N))},ne=Kc(e,p),Y=b.filter(z=>z.status==="open").length,ge=h.filter(z=>z.branch===ne&&z.status==="open").length,me=e.worktrees.filter(z=>z.path!==e.root);return C.jsxs("header",{className:"topbar",children:[C.jsxs("div",{className:"brand",title:e.root,children:[C.jsx("span",{className:"logo",children:"warden"}),C.jsx("span",{className:"repo-name",children:e.root.split("/").filter(Boolean).pop()}),C.jsx("span",{className:"branch",children:e.branch})]}),C.jsxs("div",{className:"target-switcher",children:[me.length>0&&C.jsxs("select",{value:A,title:"Worktree",onChange:z=>{B(z.target.value),fe({worktree:z.target.value})},children:[C.jsxs("option",{value:"",children:["主仓库 (",e.branch,")"]}),me.map(z=>C.jsxs("option",{value:z.path,children:["worktree: ",z.path.split("/").filter(Boolean).pop()," (",z.branch??z.head.slice(0,7),")"]},z.path))]}),C.jsxs("select",{value:S,onChange:z=>{const oe=z.target.value;I(oe),(oe==="working"||oe==="staged"||oe==="all")&&fe({kind:oe})},children:[C.jsx("option",{value:"working",children:"工作区未提交"}),C.jsx("option",{value:"staged",children:"已 staged"}),C.jsx("option",{value:"all",children:"工作区全部 (vs HEAD)"}),C.jsx("option",{value:"commit",children:"单个 commit"}),C.jsx("option",{value:"range",children:"两个 ref 对比"})]}),S==="commit"&&C.jsxs("form",{className:"inline-form",onSubmit:z=>{z.preventDefault(),fe()},children:[C.jsx("input",{value:P,onChange:z=>L(z.target.value),placeholder:"sha / ref",spellCheck:!1}),C.jsx("button",{type:"submit",children:"查看"})]}),S==="range"&&C.jsxs("form",{className:"inline-form",onSubmit:z=>{z.preventDefault(),fe()},children:[C.jsx("input",{value:Q,onChange:z=>se(z.target.value),placeholder:"base (@ = HEAD)",spellCheck:!1}),C.jsx("span",{children:".."}),C.jsx("input",{value:ue,onChange:z=>D(z.target.value),placeholder:"head",spellCheck:!1}),C.jsx("button",{type:"submit",children:"对比"})]}),C.jsx("span",{className:"target-label",title:t,children:lg(E)})]}),C.jsx("div",{className:"spacer"}),C.jsxs("div",{className:"actions",children:[C.jsx("button",{className:v==="commits"?"active":"",onClick:()=>k(v==="commits"?"diff":"commits"),title:"历史 commit",children:"Commits"}),C.jsxs("button",{className:v==="issues"?"active":"",onClick:()=>k(v==="issues"?"diff":"issues"),title:"本地 Issue",children:["Issues",Y?` (${Y})`:""]}),C.jsxs("button",{className:v==="todos"?"active":"",onClick:()=>k(v==="todos"?"diff":"todos"),title:`${ne} 分支的 Todo`,children:["Todos",ge?` (${ge})`:""]}),C.jsxs("div",{className:"seg",children:[C.jsx("button",{className:m==="unified"?"active":"",onClick:()=>w("unified"),children:"Unified"}),C.jsx("button",{className:m==="split"?"active":"",onClick:()=>w("split"),children:"Split"})]}),C.jsx(Ak,{}),C.jsxs("label",{className:"check",title:"仓库发生变化时自动刷新",children:[C.jsx("input",{type:"checkbox",checked:a,onChange:z=>c(z.target.checked)}),"自动刷新"]}),C.jsx("button",{onClick:()=>{o()},disabled:l,title:f?`上次刷新 ${Sp(f)}(r)`:"刷新 (r)",children:l?"刷新中…":"刷新"}),f&&C.jsx("span",{className:"muted small last-refresh",children:Sp(f)})]})]})}function ag(e,t,n){const i=[];let o=0;const l=[...e.dirs.keys()].sort((a,c)=>a.localeCompare(c));for(const a of l){let c=ag(e.dirs.get(a),a,n?`${n}/${a}`:a);for(;c.children.length===1&&c.children[0].kind==="dir";){const f=c.children[0];c={...f,name:`${c.name}/${f.name}`}}o+=c.fileCount,i.push(c)}for(const a of[...e.files].sort((c,f)=>c.path.localeCompare(f.path)))i.push({kind:"file",name:a.path.split("/").pop()??a.path,path:a.path,entry:a}),o++;return{kind:"dir",name:t,path:n,children:i,fileCount:o}}function Lk(e){const t={dirs:new Map,files:[]};for(const n of e){const i=n.path.split("/");let o=t;for(let l=0;l<i.length-1;l++){const a=i[l];let c=o.dirs.get(a);c||(c={dirs:new Map,files:[]},o.dirs.set(a,c)),o=c}o.files.push(n)}return ag(t,"","")}function qc(e,t=[]){for(const n of e.children)n.kind==="dir"&&(t.push(n.path),qc(n,t));return t}const Rk={added:"A",modified:"M",deleted:"D",renamed:"R"};function ug({node:e,depth:t,view:n}){const i=W(m=>m.activeFile===e.path&&m.targetKey===n),o=W(m=>m.targetKey===n),l=W(m=>m.openFile),a=W(m=>m.switchView),c=W(m=>m.toggleViewed),f=W(m=>m.comments.filter(w=>w.filePath===e.path&&w.targetKey===n).length),h=e.entry,p=async()=>{o||await a(n,e.path),await l(e.path)};return C.jsxs("div",{className:`tree-row file ${i?"active":""} ${h.viewed?"viewed":""}`,style:{paddingLeft:8+t*14},onClick:()=>{p()},title:h.oldPath?`${h.oldPath} → ${h.path}`:h.path,children:[C.jsx("input",{type:"checkbox",className:"viewed-box",checked:h.viewed,onClick:m=>m.stopPropagation(),onChange:()=>{c(e.path,n)},title:"标记为已查看"}),C.jsx("span",{className:`status status-${h.status}`,children:Rk[h.status]}),C.jsx("span",{className:"name",children:e.name}),h.changed&&C.jsx("span",{className:"changed",title:"文件自上次标记已查看后发生变化",children:"已变化"}),f>0&&C.jsx("span",{className:"cc",title:"评论数",children:f}),C.jsx("span",{className:"counts",children:h.binary?C.jsx("span",{className:"muted",children:"bin"}):C.jsxs(C.Fragment,{children:[C.jsxs("span",{className:"add",children:["+",h.additions]}),C.jsxs("span",{className:"del",children:["-",h.deletions]})]})})]})}function cg({node:e,depth:t,view:n,open:i,toggle:o}){const l=i.has(e.path);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"tree-row dir",style:{paddingLeft:8+t*14},onClick:()=>o(e.path),children:[C.jsx("span",{className:`chev ${l?"open":""}`,children:"▸"}),C.jsx("span",{className:"name",children:e.name}),C.jsx("span",{className:"muted count",children:e.fileCount})]}),l&&e.children.map(a=>a.kind==="dir"?C.jsx(cg,{node:a,depth:t+1,view:n,open:i,toggle:o},a.path):C.jsx(ug,{node:a,depth:t+1,view:n},a.path))]})}function jk(e,t){const[n,i]=ee.useState(new Set),o=W(c=>c.activeFile),l=W(c=>c.targetKey===t);return ee.useEffect(()=>{!o||!l||i(c=>{const f=new Set(c);for(const h of qc(e))o.startsWith(h+"/")&&f.add(h);return f.size===c.size?c:f})},[o,l,e]),{open:n,setOpen:i,toggle:c=>i(f=>{const h=new Set(f);return h.has(c)?h.delete(c):h.add(c),h})}}function Ou({title:e,view:t,files:n,empty:i}){const o=ee.useMemo(()=>Lk(n),[n]),{open:l,setOpen:a,toggle:c}=jk(o,t),f=n.reduce((m,w)=>m+w.additions,0),h=n.reduce((m,w)=>m+w.deletions,0),p=n.filter(m=>m.viewed).length;return C.jsxs("section",{className:"tree-block",children:[C.jsxs("div",{className:"block-head",children:[C.jsx("span",{className:"block-title",children:e}),C.jsx("span",{className:"muted",children:n.length}),C.jsxs("span",{className:"add",children:["+",f]}),C.jsxs("span",{className:"del",children:["-",h]}),C.jsx("span",{className:"spacer"}),n.length>0&&C.jsxs("span",{className:"muted",children:[p,"/",n.length," viewed"]}),C.jsxs("span",{className:"tree-tools",children:[C.jsx("button",{className:"link",onClick:()=>a(new Set(qc(o))),title:"展开全部目录",children:"展开"}),C.jsx("button",{className:"link",onClick:()=>a(new Set),title:"折叠全部目录",children:"折叠"})]})]}),C.jsx("div",{className:"tree",children:n.length===0?C.jsx("div",{className:"muted empty",children:i}):o.children.map(m=>m.kind==="dir"?C.jsx(cg,{node:m,depth:0,view:t,open:l,toggle:c},m.path):C.jsx(ug,{node:m,depth:0,view:t},m.path))})]})}function Ok(){const e=W(p=>p.files),t=W(p=>p.unstaged),n=W(p=>p.staged),i=W(p=>p.filesLoading),o=W(p=>p.filesError),l=W(p=>p.targetKey),a=ee.useMemo(()=>Dn(l),[l]),c=!!a&&dr(a),f=a?.worktree?{worktree:a.worktree}:{},h=yc(l);return o?C.jsx("aside",{className:"sidebar",children:C.jsx("div",{className:"error-box",children:o})}):c?C.jsxs("aside",{className:"sidebar dual",children:[C.jsx(Ou,{title:"Unstaged",view:zn({kind:"working",...f}),files:t,empty:i?"加载中…":"没有未暂存的改动"},`${h}:unstaged`),C.jsx(Ou,{title:"Staged",view:zn({kind:"staged",...f}),files:n,empty:i?"加载中…":"暂存区为空"},`${h}:staged`)]}):C.jsx("aside",{className:"sidebar",children:C.jsx(Ou,{title:"改动",view:l,files:e,empty:i?"加载中…":"没有改动"},h)})}var Mk=og();function Dk(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,l,a){if(typeof l=="string"){const c=l.charCodeAt(0);if(c>=48&&c<=57){const f=+l;if(Number.isInteger(f)&&f>=0&&f<e){let h=o[f];if(!h){const p=t[f*2];h=o[f]={index:f,key:n(f),start:p,size:t[f*2+1],end:p+t[f*2+1],lane:0}}return h}}if(l==="length")return e}return Reflect.get(o,l,a)}})}function pi(e,t,n){let i=n.initialDeps??[],o,l=!0;function a(){const c=e();return(c.length!==i.length||c.some((h,p)=>i[p]!==h))&&(i=c,o=t(...c),n?.onChange&&!(l&&n.skipInitialOnChange)&&n.onChange(o),l=!1),o}return a.updateDeps=c=>{i=c},a}function Cp(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fk=(e,t)=>Math.abs(e-t)<1.01,zk=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let hs;const Mu=()=>{if(hs!==void 0)return hs;if(typeof navigator>"u")return hs=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return hs=!0;const e=navigator.maxTouchPoints;return hs=navigator.platform==="MacIntel"&&e!==void 0&&e>0},_p=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},$k=e=>e,Bk=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let l=0;l<i;l++)o[l]=t+l;return o},Uk=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=a=>{const{width:c,height:f}=a;t({width:Math.round(c),height:Math.round(f)})};if(o(_p(n)),!i.ResizeObserver)return()=>{};const l=new i.ResizeObserver(a=>{const c=()=>{const f=a[0];if(f?.borderBoxSize){const h=f.borderBoxSize[0];if(h){o({width:h.inlineSize,height:h.blockSize});return}}o(_p(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return l.observe(n,{box:"border-box"}),()=>{l.unobserve(n)}},hl={passive:!0},Vk=typeof window>"u"?!0:"onscrollend"in window,Gk=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const l=e.options.useScrollendEvent&&Vk;let a=0;const c=l?null:zk(o,()=>t(a,!1),e.options.isScrollingResetDelay),f=m=>()=>{a=n(i),c?.(),t(a,m)},h=f(!0),p=f(!1);return i.addEventListener("scroll",h,hl),l&&i.addEventListener("scrollend",p,hl),()=>{i.removeEventListener("scroll",h),l&&i.removeEventListener("scrollend",p),c?.cancel()}},Wk=(e,t)=>Gk(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),Hk=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),l=n.itemSizeCache.get(o);if(l!==void 0)return l}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Kk=(e,{adjustments:t=0,behavior:n},i)=>{var o,l;(l=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},qk=Kk;class Qk{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(l=>{const a=()=>{const c=l.target,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);for(const[h,p]of this.elementsCache)if(p===c){this.elementsCache.delete(h);break}return}this.isIndexInRange(f)&&this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(c,l,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var l;return(l=i())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=i())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const l={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$k,rangeExtractor:Bk,onChange:()=>{},measureElement:Hk,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const w in n){const v=n[w];v!==void 0&&(l[w]=v)}const a=this.options;let c=null,f=null,h=!1;if(a!==void 0&&a.enabled&&l.enabled&&l.anchorTo==="end"&&this.scrollElement!==null){const w=a.count,v=l.count,k=this.getMeasurements(),b=w>0?((i=k[0])==null?void 0:i.key)??a.getItemKey(0):null,E=w>0?((o=k[w-1])==null?void 0:o.key)??a.getItemKey(w-1):null;if(v!==w||w>0&&v>0&&(l.getItemKey(0)!==b||l.getItemKey(v-1)!==E)){h=!0;const A=w>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;A&&(c=[A.key,this.getScrollOffset()-A.start]);const B=l.followOnAppend===!0?"auto":l.followOnAppend||null;B&&v>w&&this.isAtEnd(a.scrollEndThreshold)&&(w===0||l.getItemKey(v-1)!==E)&&(f=B)}}this.options=l,h&&(this.pendingMin=0,this.itemSizeCacheVersion++);let p=!1,m=0;if(c&&this.scrollOffset!==null){const[w,v]=c,k=this.getMeasurements(),{count:b,getItemKey:E}=this.options;let S=0;for(;S<b&&E(S)!==w;)S++;if(S<b){const I=k[S];if(I){const A=Math.max(0,I.start+v);A!==this.scrollOffset&&(m=A-this.scrollOffset,this.scrollOffset=A,p=!0)}}}(p||f)&&(this.pendingScrollAnchor=[p?c[0]:null,p?c[1]:0,f,m])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=pi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,a)=>{if(a&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(l-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const c=this.getScrollOffset();this.scrollDirection=a?c===l?this.scrollDirection:c<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},c=()=>{this._iosTouching=!1,!(!Mu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",a,hl),l.addEventListener("touchend",c,hl),this.unsubs.push(()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchend",c),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[l,a,c,f]=o;l!==null&&!c&&(Mu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?f!==0&&(this._iosDeferredAdjustment+=f):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),c&&this.scrollToEnd({behavior:c})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:n,maxAtWrite:i}=this._clampedAdjustment,o=this.getMaxScrollOffset();o>i+.5&&(this._clampedAdjustment=n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(n,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=pi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,l,a,c,f,h)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=pi(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h},p)=>{const m=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const S of this.laneAssignments.keys())S>=n&&this.laneAssignments.delete(S);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(S=>{this.itemSizeCache.set(S.key,S.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),c===1){const S=n*2;let I=this._flatMeasurements;if(!I||I.length<S){const P=new Float64Array(S);I&&w>0&&P.set(I.subarray(0,w*2)),I=P,this._flatMeasurements=I}let A;if(w===0)A=i+o;else{const P=w-1;A=I[P*2]+I[P*2+1]+h}for(let P=w;P<n;P++){const L=l(P),Q=m.get(L),se=typeof Q=="number"?Q:this.options.estimateSize(P);I[P*2]=A,I[P*2+1]=se,A+=se+h}const B=Dk(n,I,l);return this.measurementsCache=B,B}const v=this.measurementsCache.slice(0,w),k=new Array(c).fill(void 0),b=new Float64Array(c);let E=0;for(let S=0;S<w;S++){const I=v[S];I&&(k[I.lane]===void 0&&E++,k[I.lane]=S,b[I.lane]=I.end)}for(let S=w;S<n;S++){const I=l(S),A=this.laneAssignments.get(S);let B,P;const L=f==="estimate"||m.has(I);if(A!==void 0&&this.options.lanes>1){B=A;const D=k[B],te=D!==void 0?v[D]:void 0;P=te?te.end+h:i+o}else if(E===c){let D=0,te=b[0],re=k[0];for(let fe=1;fe<c;fe++){const ne=b[fe];(ne<te||ne===te&&k[fe]<re)&&(D=fe,te=ne,re=k[fe])}B=D,P=te+h,L&&this.laneAssignments.set(S,B)}else B=S%this.options.lanes,P=i+o,L&&this.laneAssignments.set(S,B);const Q=m.get(I),se=typeof Q=="number"?Q:this.options.estimateSize(S),ue=P+se;v[S]={index:S,start:P,size:se,end:ue,key:I,lane:B},k[B]===void 0&&E++,k[B]=S,b[B]=ue}return this.measurementsCache=v,v},{key:!1,debug:()=>this.options.debug}),this.calculateRange=pi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,l)=>n.length===0||i===0?(this.range=null,null):(this.range=Yk(n,i,o,l,l===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=pi(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,l,a)=>l===null||a===null?[]:n({startIndex:l,endIndex:a,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const l=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,o-l),c=Math.min(this.options.count-1,o+l);return n>=a&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,c)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(c))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),l=this.elementsCache.get(o);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,l;if(!this.isIndexInRange(n))return;let a,c,f;const h=this._flatMeasurements;if(this.options.lanes===1&&h!==null)f=this.options.getItemKey(n),c=h[n*2],a=h[n*2+1];else{const w=this.measurementsCache[n];if(!w)return;f=w.key,c=w.start,a=w.size}const p=this.itemSizeCache.get(f)??a,m=i-p;if(m!==0){const w=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,v=w?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,E=!this.itemSizeCache.has(f)?c<k:c+p<=k&&this.scrollDirection!=="backward",S=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:f,start:c,size:a,end:c+a,lane:0},m,this):E);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(f,i),this.itemSizeCacheVersion++;let I=!1;w?I=this.applyScrollAdjustment(this.getTotalSize()-v):S&&(I=this.applyScrollAdjustment(m)),this.notify(I),this._retryClampedAdjustment()}},this.getVirtualItems=pi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let l=0,a=n.length;l<a;l++){const c=n[l],f=i[c];o.push(f)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,l=this.options.lanes===1&&o!=null,a=fg(0,i.length-1,l?c=>o[c*2]:c=>Cp(i[c]).start,n);return Cp(i[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),a=this.getScrollOffset();i==="auto"&&(i=n>=a+l?"end":"start"),i==="center"?n+=(o-l)/2:i==="end"&&(n-=l);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),l=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(i==="auto")if(a.end>=l+o-this.options.scrollPaddingEnd)i="end";else if(a.start<=l+this.options.scrollPaddingStart)i="start";else return[l,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const c=i==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,i,a.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const l=this.getOffsetForAlignment(n,i),a=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:a,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const l=this.getOffsetForIndex(n,i);if(!l)return;const[a,c]=l,f=this.now();this.scrollState={index:n,align:c,behavior:o,startedAt:f,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,l=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const l=i.length-1,a=this._flatMeasurements;a!=null?o=a[l*2]+a[l*2+1]:o=((n=i[l])==null?void 0:n.end)??0}else{const l=Array(this.options.lanes).fill(null);let a=i.length-1;for(;a>=0&&l.some(c=>c===null);){const c=i[a];l[c.lane]===null&&(l[c.lane]=c.end),a--}o=Math.max(...l.filter(c=>c!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){if(t===0)return!1;if(Mu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=t,!1;{const i=this.getScrollOffset()+this.scrollAdjustments+t,o=this.scrollElement,l=o!==null&&("scrollHeight"in o||"document"in o)?this.getMaxScrollOffset():null;return this._clampedAdjustment=l!==null&&i>l+.5?{target:i,maxAtWrite:l}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,l=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&Fk(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=l){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const c=this.getSize()||600,f=Math.abs(o-this.getScrollOffset()),h=this.scrollState.behavior==="smooth"&&f>c;this.scrollState.lastTargetOffset=o,h||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:h?"smooth":"auto"})}this.scheduleScrollReconcile()}}const fg=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,l=n(o);if(l<i)e=o+1;else if(l>i)t=o-1;else return o}return e>0?e-1:0};function Xk(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,l=e[o*2];if(l<n)i=o+1;else if(l>n)t=o-1;else return o}return i>0?i-1:0}function Yk(e,t,n,i,o){const l=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:l};if(i===1&&o!==null){const h=Xk(o,l,n);let p=h;const m=n+t;for(;p<l&&o[p*2]+o[p*2+1]<m;)p++;return{startIndex:h,endIndex:p}}let c=fg(0,l,h=>e[h].start,n),f=c;if(i===1)for(;f<l&&e[f].end<n+t;)f++;else if(i>1){const h=Array(i).fill(0);for(;f<l&&h.some(m=>m<n+t);){const m=e[f];h[m.lane]=m.end,f++}const p=Array(i).fill(n+t);for(;c>=0&&p.some(m=>m>=n);){const m=e[c];p[m.lane]=m.start,c--}c=Math.max(0,c-c%i),f=Math.min(l,f+(i-1-f%i))}return{startIndex:c,endIndex:f}}const Du=typeof document<"u"?ee.useLayoutEffect:ee.useEffect;function Jk({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...i}){const o=ee.useReducer(p=>p+1,0)[1],l=ee.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});l.current.enabled=t,l.current.mode=n;const a=p=>{const m=l.current;if(!m.enabled||!m.container)return;const w=p.getTotalSize();if(w!==m.lastSize){m.lastSize=w;const v=p.options.horizontal?"width":"height";m.container.style[v]=`${w}px`}},c=p=>{const m=l.current;if(!m.enabled||!m.container)return;a(p);const w=!!p.options.horizontal,v=m.mode==="transform",k=w?"left":"top",b=p.options.scrollMargin,E=p.getVirtualItems();for(const S of E){const I=S.start-b,A=p.elementsCache.get(S.key);A&&m.lastPositions.get(A)!==I&&(m.lastPositions.set(A,I),v?A.style.transform=w?`translate3d(${I}px, 0, 0)`:`translate3d(0, ${I}px, 0)`:A.style[k]=`${I}px`)}},f={...i,onChange:(p,m)=>{var w;const v=l.current;let k=!0;if(v.enabled){c(p);const b=p.range,E=v.prevRange;k=!E||E.isScrolling!==p.isScrolling||E.startIndex!==b?.startIndex||E.endIndex!==b?.endIndex,k&&(v.prevRange=b?{startIndex:b.startIndex,endIndex:b.endIndex,isScrolling:p.isScrolling}:null)}k&&(e&&m?Mk.flushSync(o):o()),(w=i.onChange)==null||w.call(i,p,m)}},[h]=ee.useState(()=>{const p=new Qk(f);return Object.assign(p,{containerRef:m=>{const w=l.current;if(w.container=m,w.lastSize=null,m&&w.enabled){const v=p.getTotalSize();w.lastSize=v;const k=p.options.horizontal?"width":"height";m.style[k]=`${v}px`}}})});return h.setOptions(f),Du(()=>h._didMount(),[]),Du(()=>(a(h),h._willUpdate())),Du(()=>{c(h)}),h}function Zk(e){return Jk({observeElementRect:Uk,observeElementOffset:Wk,scrollToFn:qk,...e})}function ex(e,t){const n=[],i=e.hunks;if(i.length===0)return n;const o=i[0];n.push({index:0,newFrom:1,newTo:o.newStart-1,oldFrom:1});for(let a=1;a<i.length;a++){const c=i[a-1],f=i[a];n.push({index:a,newFrom:c.newStart+c.newLines,newTo:f.newStart-1,oldFrom:c.oldStart+c.oldLines})}const l=i[i.length-1];return n.push({index:i.length,newFrom:l.newStart+l.newLines,newTo:t,oldFrom:l.oldStart+l.oldLines}),n}function Ep(e,t,n){const i={top:[],bottom:[],hidden:e.newTo===null?null:Math.max(0,e.newTo-e.newFrom+1)};if(!n||!t)return i;const o=e.newTo??n.length,l=Math.max(0,o-e.newFrom+1);if(l===0)return{top:[],bottom:[],hidden:0};let a=t.all?l:Math.min(l,t.top),c=t.all?0:Math.min(l-a,t.bottom);a+c>=l&&(a=l,c=0);const f=e.oldFrom-e.newFrom,h=w=>({type:"context",newLineNo:w,oldLineNo:w+f,content:n[w-1]??""}),p=[];for(let w=e.newFrom;w<e.newFrom+a;w++)p.push(h(w));const m=[];for(let w=o-c+1;w<=o;w++)m.push(h(w));return{top:p,bottom:m,hidden:l-a-c}}function tx(e){const t=[];let n=[],i=[];const o=()=>{const l=Math.max(n.length,i.length);for(let a=0;a<l;a++)t.push({left:n[a],right:i[a]});n=[],i=[]};for(const l of e)l.type==="del"?n.push(l):l.type==="add"?i.push(l):(o(),t.push({left:l,right:l}));return o(),t}function nx({diff:e,viewMode:t,expansions:n,fullLines:i}){const o=[],a=e.status!=="deleted"&&e.status!=="added"&&!e.binary?ex(e,i?i.length:null):[],c=(h,p,m)=>{if(t==="unified")for(const w of h)o.push({key:`l:${p}:${w.oldLineNo??"-"}:${w.newLineNo??"-"}`,kind:"line",line:w,hunkIndex:p,expanded:m});else for(const w of tx(h))o.push({key:`p:${p}:${w.left?.oldLineNo??"-"}:${w.right?.newLineNo??"-"}`,kind:"pair",left:w.left,right:w.right,hunkIndex:p,expanded:m})};e.hunks.forEach((h,p)=>{const m=a[p];if(m){const{top:w,bottom:v,hidden:k}=Ep(m,n[m.index],i);w.length&&c(w,p-1,!0),(k===null||k>0)&&o.push({key:`g:${m.index}`,kind:"gap",gap:m,hidden:k}),v.length&&c(v,p,!0)}o.push({key:`h:${p}`,kind:"hunk",hunkIndex:p,hunk:h}),c(h.lines,p,!1)});const f=a[e.hunks.length];if(f){const{top:h,hidden:p}=Ep(f,n[f.index],i);h.length&&c(h,e.hunks.length-1,!0),(p===null||p>0)&&o.push({key:`g:${f.index}`,kind:"gap",gap:f,hidden:p})}return o}function bp(e,t,n){return e.findIndex(i=>i.kind==="line"?t==="new"?i.line.newLineNo===n:i.line.oldLineNo===n:i.kind==="pair"?t==="new"?i.right?.newLineNo===n:i.left?.oldLineNo===n:!1)}function rx(e){const t=[];return e.forEach((n,i)=>{n.kind==="hunk"&&t.push(i)}),t}function ix(e){let t=0;for(const n of e.hunks)t+=n.lines.length;return t}const sx="modulepreload",ox=function(e){return"/"+e},Ip={},Ae=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};var a=h;document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=h(n.map(p=>{if(p=ox(p),p in Ip)return;Ip[p]=!0;const m=p.endsWith(".css"),w=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${w}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":sx,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((k,b)=>{v.addEventListener("load",k),v.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};let mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function lx(e){return Qc(e)}function Qc(e){return Array.isArray(e)?ax(e):e instanceof RegExp?e:typeof e=="object"?ux(e):e}function ax(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=Qc(e[n]);return t}function ux(e){let t={};for(let n in e)t[n]=Qc(e[n]);return t}function dg(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function hg(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?hg(e.substring(0,e.length-1)):e.substr(~t+1)}var Fu=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xo=class{static hasCaptures(e){return e===null?!1:(Fu.lastIndex=0,Fu.test(e))}static replaceCaptures(e,t,n){return e.replace(Fu,(i,o,l,a)=>{let c=n[parseInt(o||l,10)];if(c){let f=t.substring(c.start,c.end);for(;f[0]===".";)f=f.substring(1);switch(a){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return i})}};function pg(e,t){return e<t?-1:e>t?1:0}function mg(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let o=0;o<n;o++){let l=pg(e[o],t[o]);if(l!==0)return l}return 0}return n-i}function Np(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function gg(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var yg=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},pl=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(dx(e),t)}static createFromParsedTheme(e,t){return px(e,t)}_cachedMatchRoot=new yg(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(o=>cx(e.parent,o.parentScopes));return i?new wg(i.fontStyle,i.foreground,i.background):null}},zu=class al{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new al(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new al(n,t[i]);return n}push(t){return new al(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function cx(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],o=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],o=!0}for(;e&&!fx(e.scopeName,i);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function fx(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var wg=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function dx(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let o=0,l=t.length;o<l;o++){let a=t[o];if(!a.settings)continue;let c;if(typeof a.scope=="string"){let m=a.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(a.scope)?c=a.scope:c=[""];let f=-1;if(typeof a.settings.fontStyle=="string"){f=0;let m=a.settings.fontStyle.split(" ");for(let w=0,v=m.length;w<v;w++)switch(m[w]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof a.settings.foreground=="string"&&Np(a.settings.foreground)&&(h=a.settings.foreground);let p=null;typeof a.settings.background=="string"&&Np(a.settings.background)&&(p=a.settings.background);for(let m=0,w=c.length;m<w;m++){let k=c[m].trim().split(" "),b=k[k.length-1],E=null;k.length>1&&(E=k.slice(0,k.length-1),E.reverse()),n[i++]=new hx(b,E,o,f,h,p)}}return n}var hx=class{constructor(e,t,n,i,o,l){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=o,this.background=l}},It=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(It||{});function px(e,t){e.sort((f,h)=>{let p=pg(f.scope,h.scope);return p!==0||(p=mg(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,i="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(i=f.foreground),f.background!==null&&(o=f.background)}let l=new mx(t),a=new wg(n,l.getId(i),l.getId(o)),c=new yx(new wc(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];c.insert(0,p.scope,p.parentScopes,p.fontStyle,l.getId(p.foreground),l.getId(p.background))}return new pl(l,a,c)}var mx=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},gx=Object.freeze([]),wc=class vg{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,o,l){this.scopeDepth=t,this.parentScopes=n||gx,this.fontStyle=i,this.foreground=o,this.background=l}clone(){return new vg(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,o=t.length;i<o;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),o!==0&&(this.background=o)}},yx=class vc{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,o=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[o]===">"&&o++,!(i>=t.parentScopes.length||o>=n.parentScopes.length);){const l=n.parentScopes[o].length-t.parentScopes[i].length;if(l!==0)return l;i++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),o,l;if(i===-1?(o=t,l=""):(o=t.substring(0,i),l=t.substring(i+1)),this._children.hasOwnProperty(o))return this._children[o].match(l)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(vc._cmpBySpecificity),n}insert(t,n,i,o,l,a){if(n===""){this._doInsertHere(t,i,o,l,a);return}let c=n.indexOf("."),f,h;c===-1?(f=n,h=""):(f=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new vc(this._mainRule.clone(),wc.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,i,o,l,a)}_doInsertHere(t,n,i,o,l){if(n===null){this._mainRule.acceptOverwrite(t,i,o,l);return}for(let a=0,c=this._rulesWithParentScopes.length;a<c;a++){let f=this._rulesWithParentScopes[a];if(mg(f.parentScopes,n)===0){f.acceptOverwrite(t,i,o,l);return}}i===-1&&(i=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),l===0&&(l=this._mainRule.background),this._rulesWithParentScopes.push(new wc(t,n,i,o,l))}},Ci=class nn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=nn.getLanguageId(t),i=nn.getTokenType(t),o=nn.getFontStyle(t),l=nn.getForeground(t),a=nn.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:l,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,i,o,l,a,c){let f=nn.getLanguageId(t),h=nn.getTokenType(t),p=nn.containsBalancedBrackets(t)?1:0,m=nn.getFontStyle(t),w=nn.getForeground(t),v=nn.getBackground(t);return n!==0&&(f=n),i!==8&&(h=i),o!==null&&(p=o?1:0),l!==-1&&(m=l),a!==0&&(w=a),c!==0&&(v=c),(f<<0|h<<8|p<<10|m<<11|w<<15|v<<24)>>>0}};function ml(e,t){const n=[],i=wx(e);let o=i.next();for(;o!==null;){let f=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=i.next()}let h=a();if(n.push({matcher:h,priority:f}),o!==",")break;o=i.next()}return n;function l(){if(o==="-"){o=i.next();const f=l();return h=>!!f&&!f(h)}if(o==="("){o=i.next();const f=c();return o===")"&&(o=i.next()),f}if(Tp(o)){const f=[];do f.push(o),o=i.next();while(Tp(o));return h=>t(f,h)}return null}function a(){const f=[];let h=l();for(;h;)f.push(h),h=l();return p=>f.every(m=>m(p))}function c(){const f=[];let h=a();for(;h&&(f.push(h),o==="|"||o===",");){do o=i.next();while(o==="|"||o===",");h=a()}return p=>f.some(m=>m(p))}}function Tp(e){return!!e&&!!e.match(/[\w\.:]+/)}function wx(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function kg(e){typeof e.dispose=="function"&&e.dispose()}var bs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vx=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},kx=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xx=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new bs(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new kx;for(const n of e)Sx(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof bs){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sx(e,t,n,i){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const l=n.lookup(t);e instanceof bs?ul({baseGrammar:l,selfGrammar:o},i):kc(e.ruleName,{baseGrammar:l,selfGrammar:o,repository:o.repository},i);const a=n.injections(e.scopeName);if(a)for(const c of a)i.add(new bs(c))}function kc(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];gl([i],t,n)}}function ul(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&gl(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&gl(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function gl(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const o=i.repository?dg({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&gl(i.patterns,{...t,repository:o},n);const l=i.include;if(!l)continue;const a=xg(l);switch(a.kind){case 0:ul({...t,selfGrammar:t.baseGrammar},n);break;case 1:ul(t,n);break;case 2:kc(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const c=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const f={baseGrammar:t.baseGrammar,selfGrammar:c,repository:o};a.kind===4?kc(a.ruleName,f,n):ul(f,n)}else a.kind===4?n.add(new vx(a.scopeName,a.ruleName)):n.add(new bs(a.scopeName));break}}}var Cx=class{kind=0},_x=class{kind=1},Ex=class{constructor(e){this.ruleName=e}kind=2},bx=class{constructor(e){this.scopeName=e}kind=3},Ix=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function xg(e){if(e==="$base")return new Cx;if(e==="$self")return new _x;const t=e.indexOf("#");if(t===-1)return new bx(e);if(t===0)return new Ex(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new Ix(n,i)}}var Nx=/\\(\d+)/,Ap=/\\(\d+)/g,Tx=-1,Sg=-2;var Rs=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xo.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=Xo.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${hg(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Xo.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xo.replaceCaptures(this._contentName,e,t)}},Ax=class extends Rs{retokenizeCapturedWithRuleId;constructor(e,t,n,i,o){super(e,t,n,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Px=class extends Rs{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,null),this._match=new Is(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pp=class extends Rs{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,i),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},xc=class extends Rs{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o,l,a,c,f,h){super(e,t,n,i),this._begin=new Is(o,this.id),this.beginCaptures=l,this._end=new Is(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},yl=class extends Rs{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,o,l,a,c,f){super(e,t,n,i),this._begin=new Is(o,this.id),this.beginCaptures=l,this.whileCaptures=c,this._while=new Is(a,Sg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ns,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Cg=class bt{static createCaptureRule(t,n,i,o,l){return t.registerRule(a=>new Ax(n,a,i,o,l))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new Px(t.$vscodeTextmateLocation,t.id,t.name,t.match,bt._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=dg({},i,t.repository));let l=t.patterns;return typeof l>"u"&&t.include&&(l=[{include:t.include}]),new Pp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,bt._compilePatterns(l,n,i))}return t.while?new yl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,bt._compileCaptures(t.whileCaptures||t.captures,n,i),bt._compilePatterns(t.patterns,n,i)):new xc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,bt._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,bt._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let o=[];if(t){let l=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);c>l&&(l=c)}for(let a=0;a<=l;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);let f=0;t[a].patterns&&(f=bt.getCompiledRuleId(t[a],n,i)),o[c]=bt.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,f)}}return o}static _compilePatterns(t,n,i){let o=[];if(t)for(let l=0,a=t.length;l<a;l++){const c=t[l];let f=-1;if(c.include){const h=xg(c.include);switch(h.kind){case 0:case 1:f=bt.getCompiledRuleId(i[c.include],n,i);break;case 2:let p=i[h.ruleName];p&&(f=bt.getCompiledRuleId(p,n,i));break;case 3:case 4:const m=h.scopeName,w=h.kind===4?h.ruleName:null,v=n.getExternalGrammar(m,i);if(v)if(w){let k=v.repository[w];k&&(f=bt.getCompiledRuleId(k,n,v.repository))}else f=bt.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else f=bt.getCompiledRuleId(c,n,i);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof Pp||h instanceof xc||h instanceof yl)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;o.push(f)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Is=class _g{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let o=0,l=[],a=!1;for(let c=0;c<i;c++)if(t.charAt(c)==="\\"&&c+1<i){const h=t.charAt(c+1);h==="z"?(l.push(t.substring(o,c)),l.push("$(?!\\n)(?<!\\n)"),o=c+2):(h==="A"||h==="G")&&(a=!0),c++}this.hasAnchor=a,o===0?this.source=t:(l.push(t.substring(o,i)),this.source=l.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Nx.test(this.source):this.hasBackReferences=!1}clone(){return new _g(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(o=>t.substring(o.start,o.end));return Ap.lastIndex=0,this.source.replace(Ap,(o,l)=>gg(i[parseInt(l,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],o=[],l,a,c,f;for(l=0,a=this.source.length;l<a;l++)c=this.source.charAt(l),t[l]=c,n[l]=c,i[l]=c,o[l]=c,c==="\\"&&l+1<a&&(f=this.source.charAt(l+1),f==="A"?(t[l+1]="",n[l+1]="",i[l+1]="A",o[l+1]="A"):f==="G"?(t[l+1]="",n[l+1]="G",i[l+1]="",o[l+1]="G"):(t[l+1]=f,n[l+1]=f,i[l+1]=f,o[l+1]=f),l++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ns=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Lp(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let i=this._items.map(o=>o.resolveAnchors(t,n));return new Lp(e,i,this._items.map(o=>o.ruleId))}},Lp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
11
|
-
`)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},$u=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Lx=class Sc{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new $u(t,8),this._embeddedLanguagesMatcher=new Rx(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Sc._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new $u(0,0);_getBasicScopeAttributes=new
|
|
12
|
-
`;const l=this.createOnigString(e),a=l.content.length,c=new Gx(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=Eg(this,l,o,0,t,c,!0,i);return kg(l),{lineLength:a,lineTokens:c,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function Op(e,t){return e=lx(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var xs=class Cn{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,o=t?.scopePath??null;for(const l of n)o=zu.push(o,l.scopeNames),i=new Cn(i,o,l.encodedTokenAttributes);return i}static createRoot(t,n){return new Cn(null,new zu(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const o=i.getMetadataForScope(t),l=new zu(null,t),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(n,o,a);return new Cn(null,l,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Cn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,i){let o=-1,l=0,a=0;return i!==null&&(o=i.fontStyle,l=i.foregroundId,a=i.backgroundId),Ci.set(t,n.languageId,n.tokenType,null,o,l,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Cn._pushAttributed(this,t,n);const i=t.split(/ /g);let o=this;for(const l of i)o=Cn._pushAttributed(o,l,n);return o}static _pushAttributed(t,n,i){const o=i.getMetadataForScope(n),l=t.scopePath.push(n),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(t.tokenAttributes,o,a);return new Cn(t,l,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},Cc=class Lr{constructor(t,n,i,o,l,a,c,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=l,this.endRule=a,this.nameScopesList=c,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new Lr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Lr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?xs.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,o,l,a,c){return new Lr(this,t,n,i,o,l,a,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Lr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const i=xs.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Lr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,xs.fromExtension(i,n.contentNameScopesList))}},Vx=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ml(n,wl).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>ml(n,wl).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Gx=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(l)&&(i=Ci.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(i=Ci.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i<o;i++)n[i]=this._binaryTokens[i];return n}},Wx=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,o){if(!this._grammars.has(e)){let l=this._rawGrammars.get(e);if(!l)return null;this._grammars.set(e,$x(e,l,t,n,i,o,this,this._onigLib))}return this._grammars.get(e)}},Hx=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Wx(pl.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(pl.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new Vx(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,o,l){const a=new xx(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(c=>this._loadSingleGrammar(c.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,i,o,l)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,o)}_grammarForScopeName(t,n=0,i=null,o=null,l=null){return this._syncRegistry.grammarForScopeName(t,n,i,o,l)}},_c=Cc.NULL;const Kx=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class js{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}js.prototype.normal={};js.prototype.property={};js.prototype.space=void 0;function Ig(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new js(n,i,t)}function Ec(e){return e.toLowerCase()}class $t{constructor(t,n){this.attribute=n,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let qx=0;const be=Br(),lt=Br(),bc=Br(),J=Br(),Ve=Br(),Fr=Br(),Ht=Br();function Br(){return 2**++qx}const Ic=Object.freeze(Object.defineProperty({__proto__:null,boolean:be,booleanish:lt,commaOrSpaceSeparated:Ht,commaSeparated:Fr,number:J,overloadedBoolean:bc,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),Bu=Object.keys(Ic);class Xc extends $t{constructor(t,n,i,o){let l=-1;if(super(t,n),Mp(this,"space",o),typeof i=="number")for(;++l<Bu.length;){const a=Bu[l];Mp(this,Bu[l],(i&Ic[a])===Ic[a])}}}Xc.prototype.defined=!0;function Mp(e,t,n){n&&(e[t]=n)}function Ei(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const l=new Xc(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Ec(i)]=i,n[Ec(l.attribute)]=i}return new js(t,n,e.space)}const Ng=Ei({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ve,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:J,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ve,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:lt,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Tg(e,t){return t in e?e[t]:t}function Ag(e,t){return Tg(e,t.toLowerCase())}const Qx=Ei({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fr,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alpha:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Ve,autoFocus:be,autoPlay:be,blocking:Ve,capture:null,charSet:null,checked:be,cite:null,className:Ve,closedBy:null,colorSpace:null,cols:J,colSpan:J,command:null,commandFor:null,content:null,contentEditable:lt,controls:be,controlsList:Ve,coords:J|Fr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:bc,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Ve,height:J,hidden:bc,high:J,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:be,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:be,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,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:be,optimum:J,pattern:null,ping:Ve,placeholder:null,playsInline:be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Ve,required:be,reversed:be,rows:J,rowSpan:J,sandbox:Ve,scope:null,scoped:be,seamless:be,selected:be,shadowRootClonable:be,shadowRootCustomElementRegistry:be,shadowRootDelegatesFocus:be,shadowRootMode:null,shadowRootSerializable:be,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:lt,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:be,disablePictureInPicture:be,disableRemotePlayback:be,exportParts:Fr,part:Ve,prefix:null,property:null,results:J,security:null,unselectable:null},space:"html",transform:Ag}),Xx=Ei({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ht,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:Ve,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:be,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:Fr,g2:Fr,glyphName:Fr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Ht,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ht,rev:Ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ht,requiredFeatures:Ht,requiredFonts:Ht,requiredFormats:Ht,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Ht,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ht,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ht,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Tg}),Pg=Ei({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Lg=Ei({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ag}),Rg=Ei({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Yx={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"},Jx=/[A-Z]/g,Dp=/-[a-z]/g,Zx=/^data[-\w.:]+$/i;function jg(e,t){const n=Ec(t);let i=t,o=$t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zx.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Dp,t0);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Dp.test(l)){let a=l.replace(Jx,e0);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Xc}return new o(i,t)}function e0(e){return"-"+e.toLowerCase()}function t0(e){return e.charAt(1).toUpperCase()}const Og=Ig([Ng,Qx,Pg,Lg,Rg],"html"),Os=Ig([Ng,Xx,Pg,Lg,Rg],"svg"),Fp={}.hasOwnProperty;function n0(e,t){const n=t||{};function i(o,...l){let a=i.invalid;const c=i.handlers;if(o&&Fp.call(o,e)){const f=String(o[e]);a=Fp.call(c,f)?c[f]:i.unknown}if(a)return a.call(this,o,...l)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const r0=/["&'<>`]/g,i0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s0=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o0=/[|\\{}()[\]^$+*?.]/g,zp=new WeakMap;function l0(e,t){if(e=e.replace(t.subset?a0(t.subset):r0,i),t.subset||t.escapeOnly)return e;return e.replace(i0,n).replace(s0,i);function n(o,l,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(l+2),t)}function i(o,l,a){return t.format(o.charCodeAt(0),a.charCodeAt(l+1),t)}}function a0(e){let t=zp.get(e);return t||(t=u0(e),zp.set(e,t)),t}function u0(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(o0,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const c0=/[\dA-Fa-f]/;function f0(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!c0.test(String.fromCharCode(t))?i:i+";"}const d0=/\d/;function h0(e,t,n){const i="&#"+String(e);return n&&t&&!d0.test(String.fromCharCode(t))?i:i+";"}const p0=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Uu={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},m0=["cent","copy","divide","gt","lt","not","para","times"],Mg={}.hasOwnProperty,Nc={};let Yo;for(Yo in Uu)Mg.call(Uu,Yo)&&(Nc[Uu[Yo]]=Yo);const g0=/[^\dA-Za-z]/;function y0(e,t,n,i){const o=String.fromCharCode(e);if(Mg.call(Nc,o)){const l=Nc[o],a="&"+l;return n&&p0.includes(l)&&!m0.includes(l)&&(!i||t&&t!==61&&g0.test(String.fromCharCode(t)))?a:a+";"}return""}function w0(e,t,n){let i=f0(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=y0(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const l=h0(e,t,n.omitOptionalSemicolons);l.length<i.length&&(i=l)}return o&&(!n.useShortestReferences||o.length<i.length)?o:i}function Si(e,t){return l0(e,Object.assign({format:w0},t))}const v0=/^>|^->|<!--|-->|--!>|<!-$/g,k0=[">"],x0=["<",">"];function S0(e,t,n,i){return i.settings.bogusComments?"<?"+Si(e.value,Object.assign({},i.settings.characterReferences,{subset:k0}))+">":"<!--"+e.value.replace(v0,o)+"-->";function o(l){return Si(l,Object.assign({},i.settings.characterReferences,{subset:x0}))}}function C0(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function vl(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}function Dg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Fg(e){return e.join(" ").trim()}const _0=/[ \t\n\f\r]/g;function Al(e){return typeof e=="object"?e.type==="text"?$p(e.value):!1:$p(e)}function $p(e){return e.replace(_0,"")===""}const ft=$g(1),zg=$g(-1),E0=[];function $g(e){return t;function t(n,i,o){const l=n?n.children:E0;let a=(i||0)+e,c=l[a];if(!o)for(;c&&Al(c);)a+=e,c=l[a];return c}}const b0={}.hasOwnProperty;function Bg(e){return t;function t(n,i,o){return b0.call(e,n.tagName)&&e[n.tagName](n,i,o)}}const Yc=Bg({body:N0,caption:Vu,colgroup:Vu,dd:L0,dt:P0,head:Vu,html:I0,li:A0,optgroup:R0,option:j0,p:T0,rp:Bp,rt:Bp,tbody:M0,td:Up,tfoot:D0,th:Up,thead:O0,tr:F0});function Vu(e,t,n){const i=ft(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&Al(i.value.charAt(0)))}function I0(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function N0(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function T0(e,t,n){const i=ft(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function A0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="li"}function P0(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function L0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function Bp(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function R0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function j0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function O0(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function M0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function D0(e,t,n){return!ft(n,t)}function F0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function Up(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const z0=Bg({body:U0,colgroup:V0,head:B0,html:$0,tbody:G0});function $0(e){const t=ft(e,-1);return!t||t.type!=="comment"}function B0(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function U0(e){const t=ft(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Al(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function V0(e,t,n){const i=zg(n,t),o=ft(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&Yc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function G0(e,t,n){const i=zg(n,t),o=ft(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&Yc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Jo={name:[[`
|
|
9
|
+
`+y.stack}return{value:r,source:s,stack:g,digest:null}}function Ya(r,s,u){return{value:r,source:null,stack:u??null,digest:s??null}}function Ja(r,s){try{console.error(s.value)}catch(u){setTimeout(function(){throw u})}}var Vv=typeof WeakMap=="function"?WeakMap:Map;function vh(r,s,u){u=Ln(-1,u),u.tag=3,u.payload={element:null};var d=s.value;return u.callback=function(){jo||(jo=!0,hu=d),Ja(r,s)},u}function kh(r,s,u){u=Ln(-1,u),u.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;u.payload=function(){return d(g)},u.callback=function(){Ja(r,s)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){Ja(r,s),typeof d!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),u}function xh(r,s,u){var d=r.pingCache;if(d===null){d=r.pingCache=new Vv;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(u)||(g.add(u),r=rk.bind(null,r,s,u),s.then(r,r))}function Sh(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function Ch(r,s,u,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(s=Ln(-1,1),s.tag=2,tr(u,s,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var Gv=$.ReactCurrentOwner,Ot=!1;function At(r,s,u,d){s.child=r===null?Vd(s,null,u,d):ii(s,r.child,u,d)}function _h(r,s,u,d,g){u=u.render;var y=s.ref;return oi(s,g),d=Va(r,s,u,d,y,g),u=Ga(),r!==null&&!Ot?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Rn(r,s,g)):(Xe&&u&&ba(s),s.flags|=1,At(r,s,d,g),s.child)}function Eh(r,s,u,d,g){if(r===null){var y=u.type;return typeof y=="function"&&!ku(y)&&y.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(s.tag=15,s.type=y,bh(r,s,y,d,g)):(r=$o(u.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(y=r.child,(r.lanes&g)===0){var x=y.memoizedProps;if(u=u.compare,u=u!==null?u:Wi,u(x,d)&&r.ref===s.ref)return Rn(r,s,g)}return s.flags|=1,r=lr(y,d),r.ref=s.ref,r.return=s,s.child=r}function bh(r,s,u,d,g){if(r!==null){var y=r.memoizedProps;if(Wi(y,d)&&r.ref===s.ref)if(Ot=!1,s.pendingProps=d=y,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Ot=!0);else return s.lanes=r.lanes,Rn(r,s,g)}return Za(r,s,u,d,g)}function Ih(r,s,u){var d=s.pendingProps,g=d.children,y=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(ci,Wt),Wt|=u;else{if((u&1073741824)===0)return r=y!==null?y.baseLanes|u:u,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,We(ci,Wt),Wt|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=y!==null?y.baseLanes:u,We(ci,Wt),Wt|=d}else y!==null?(d=y.baseLanes|u,s.memoizedState=null):d=u,We(ci,Wt),Wt|=d;return At(r,s,g,u),s.child}function Nh(r,s){var u=s.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(s.flags|=512,s.flags|=2097152)}function Za(r,s,u,d,g){var y=jt(u)?vr:St.current;return y=ei(s,y),oi(s,g),u=Va(r,s,u,d,y,g),d=Ga(),r!==null&&!Ot?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,Rn(r,s,g)):(Xe&&d&&ba(s),s.flags|=1,At(r,s,u,g),s.child)}function Th(r,s,u,d,g){if(jt(u)){var y=!0;co(s)}else y=!1;if(oi(s,g),s.stateNode===null)To(r,s),yh(s,u,d),Xa(s,u,d,g),d=!0;else if(r===null){var x=s.stateNode,T=s.memoizedProps;x.props=T;var R=x.context,z=u.contextType;typeof z=="object"&&z!==null?z=Jt(z):(z=jt(u)?vr:St.current,z=ei(s,z));var q=u.getDerivedStateFromProps,X=typeof q=="function"||typeof x.getSnapshotBeforeUpdate=="function";X||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==d||R!==z)&&wh(s,x,d,z),er=!1;var K=s.memoizedState;x.state=K,ko(s,d,x,g),R=s.memoizedState,T!==d||K!==R||Rt.current||er?(typeof q=="function"&&(Qa(s,u,q,d),R=s.memoizedState),(T=er||gh(s,u,T,d,K,R,z))?(X||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=R),x.props=d,x.state=R,x.context=z,d=T):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{x=s.stateNode,Wd(r,s),T=s.memoizedProps,z=s.type===s.elementType?T:cn(s.type,T),x.props=z,X=s.pendingProps,K=x.context,R=u.contextType,typeof R=="object"&&R!==null?R=Jt(R):(R=jt(u)?vr:St.current,R=ei(s,R));var le=u.getDerivedStateFromProps;(q=typeof le=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(T!==X||K!==R)&&wh(s,x,d,R),er=!1,K=s.memoizedState,x.state=K,ko(s,d,x,g);var ce=s.memoizedState;T!==X||K!==ce||Rt.current||er?(typeof le=="function"&&(Qa(s,u,le,d),ce=s.memoizedState),(z=er||gh(s,u,z,d,K,ce,R)||!1)?(q||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,ce,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,ce,R)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ce),x.props=d,x.state=ce,x.context=R,d=z):(typeof x.componentDidUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&K===r.memoizedState||(s.flags|=1024),d=!1)}return eu(r,s,u,d,y,g)}function eu(r,s,u,d,g,y){Nh(r,s);var x=(s.flags&128)!==0;if(!d&&!x)return g&&jd(s,u,!1),Rn(r,s,y);d=s.stateNode,Gv.current=s;var T=x&&typeof u.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&x?(s.child=ii(s,r.child,null,y),s.child=ii(s,null,T,y)):At(r,s,T,y),s.memoizedState=d.state,g&&jd(s,u,!0),s.child}function Ah(r){var s=r.stateNode;s.pendingContext?Ld(r,s.pendingContext,s.pendingContext!==s.context):s.context&&Ld(r,s.context,!1),Da(r,s.containerInfo)}function Ph(r,s,u,d,g){return ri(),Aa(g),s.flags|=256,At(r,s,u,d),s.child}var tu={dehydrated:null,treeContext:null,retryLane:0};function nu(r){return{baseLanes:r,cachePool:null,transitions:null}}function Lh(r,s,u){var d=s.pendingProps,g=Ye.current,y=!1,x=(s.flags&128)!==0,T;if((T=x)||(T=r!==null&&r.memoizedState===null?!1:(g&2)!==0),T?(y=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),We(Ye,g&1),r===null)return Ta(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=d.children,r=d.fallback,y?(d=s.mode,y=s.child,x={mode:"hidden",children:x},(d&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Bo(x,d,0,null),r=Tr(r,d,u,null),y.return=s,r.return=s,y.sibling=r,s.child=y,s.child.memoizedState=nu(u),s.memoizedState=tu,r):ru(s,x));if(g=r.memoizedState,g!==null&&(T=g.dehydrated,T!==null))return Wv(r,s,x,d,T,g,u);if(y){y=d.fallback,x=s.mode,g=r.child,T=g.sibling;var R={mode:"hidden",children:d.children};return(x&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=R,s.deletions=null):(d=lr(g,R),d.subtreeFlags=g.subtreeFlags&14680064),T!==null?y=lr(T,y):(y=Tr(y,x,u,null),y.flags|=2),y.return=s,d.return=s,d.sibling=y,s.child=d,d=y,y=s.child,x=r.child.memoizedState,x=x===null?nu(u):{baseLanes:x.baseLanes|u,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=r.childLanes&~u,s.memoizedState=tu,d}return y=r.child,r=y.sibling,d=lr(y,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=u),d.return=s,d.sibling=null,r!==null&&(u=s.deletions,u===null?(s.deletions=[r],s.flags|=16):u.push(r)),s.child=d,s.memoizedState=null,d}function ru(r,s){return s=Bo({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function No(r,s,u,d){return d!==null&&Aa(d),ii(s,r.child,null,u),r=ru(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function Wv(r,s,u,d,g,y,x){if(u)return s.flags&256?(s.flags&=-257,d=Ya(Error(n(422))),No(r,s,x,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(y=d.fallback,g=s.mode,d=Bo({mode:"visible",children:d.children},g,0,null),y=Tr(y,g,x,null),y.flags|=2,d.return=s,y.return=s,d.sibling=y,s.child=d,(s.mode&1)!==0&&ii(s,r.child,null,x),s.child.memoizedState=nu(x),s.memoizedState=tu,y);if((s.mode&1)===0)return No(r,s,x,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var T=d.dgst;return d=T,y=Error(n(419)),d=Ya(y,d,void 0),No(r,s,x,d)}if(T=(x&r.childLanes)!==0,Ot||T){if(d=ht,d!==null){switch(x&-x){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,Pn(r,g),hn(d,r,g,-1))}return vu(),d=Ya(Error(n(421))),No(r,s,x,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=ik.bind(null,r),g._reactRetry=s,null):(r=y.treeContext,Gt=Xn(g.nextSibling),Vt=s,Xe=!0,un=null,r!==null&&(Xt[Yt++]=Tn,Xt[Yt++]=An,Xt[Yt++]=kr,Tn=r.id,An=r.overflow,kr=s),s=ru(s,d.children),s.flags|=4096,s)}function Rh(r,s,u){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),ja(r.return,s,u)}function iu(r,s,u,d,g){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=d,y.tail=u,y.tailMode=g)}function jh(r,s,u){var d=s.pendingProps,g=d.revealOrder,y=d.tail;if(At(r,s,d.children,u),d=Ye.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Rh(r,u,s);else if(r.tag===19)Rh(r,u,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(We(Ye,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(u=s.child,g=null;u!==null;)r=u.alternate,r!==null&&xo(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),iu(s,!1,g,u,y);break;case"backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&xo(r)===null){s.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}iu(s,!0,u,null,y);break;case"together":iu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function To(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function Rn(r,s,u){if(r!==null&&(s.dependencies=r.dependencies),Er|=s.lanes,(u&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,u=lr(r,r.pendingProps),s.child=u,u.return=s;r.sibling!==null;)r=r.sibling,u=u.sibling=lr(r,r.pendingProps),u.return=s;u.sibling=null}return s.child}function Hv(r,s,u){switch(s.tag){case 3:Ah(s),ri();break;case 5:qd(s);break;case 1:jt(s.type)&&co(s);break;case 4:Da(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;We(yo,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(We(Ye,Ye.current&1),s.flags|=128,null):(u&s.child.childLanes)!==0?Lh(r,s,u):(We(Ye,Ye.current&1),r=Rn(r,s,u),r!==null?r.sibling:null);We(Ye,Ye.current&1);break;case 19:if(d=(u&s.childLanes)!==0,(r.flags&128)!==0){if(d)return jh(r,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),We(Ye,Ye.current),d)break;return null;case 22:case 23:return s.lanes=0,Ih(r,s,u)}return Rn(r,s,u)}var Oh,su,Mh,Dh;Oh=function(r,s){for(var u=s.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},su=function(){},Mh=function(r,s,u,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,Cr(kn.current);var y=null;switch(u){case"input":g=B(r,g),d=B(r,d),y=[];break;case"select":g=_({},g,{value:void 0}),d=_({},d,{value:void 0}),y=[];break;case"textarea":g=et(r,g),d=et(r,d),y=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=lo)}wt(u,d);var x;u=null;for(z in g)if(!d.hasOwnProperty(z)&&g.hasOwnProperty(z)&&g[z]!=null)if(z==="style"){var T=g[z];for(x in T)T.hasOwnProperty(x)&&(u||(u={}),u[x]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(o.hasOwnProperty(z)?y||(y=[]):(y=y||[]).push(z,null));for(z in d){var R=d[z];if(T=g?.[z],d.hasOwnProperty(z)&&R!==T&&(R!=null||T!=null))if(z==="style")if(T){for(x in T)!T.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(u||(u={}),u[x]="");for(x in R)R.hasOwnProperty(x)&&T[x]!==R[x]&&(u||(u={}),u[x]=R[x])}else u||(y||(y=[]),y.push(z,u)),u=R;else z==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,T=T?T.__html:void 0,R!=null&&T!==R&&(y=y||[]).push(z,R)):z==="children"?typeof R!="string"&&typeof R!="number"||(y=y||[]).push(z,""+R):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(o.hasOwnProperty(z)?(R!=null&&z==="onScroll"&&qe("scroll",r),y||T===R||(y=[])):(y=y||[]).push(z,R))}u&&(y=y||[]).push("style",u);var z=y;(s.updateQueue=z)&&(s.flags|=4)}},Dh=function(r,s,u,d){u!==d&&(s.flags|=4)};function os(r,s){if(!Xe)switch(r.tailMode){case"hidden":s=r.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function _t(r){var s=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(s)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=u,s}function Kv(r,s,u){var d=s.pendingProps;switch(Ia(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(s),null;case 1:return jt(s.type)&&uo(),_t(s),null;case 3:return d=s.stateNode,li(),Qe(Rt),Qe(St),$a(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(mo(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,un!==null&&(gu(un),un=null))),su(r,s),_t(s),null;case 5:Fa(s);var g=Cr(ts.current);if(u=s.type,r!==null&&s.stateNode!=null)Mh(r,s,u,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return _t(s),null}if(r=Cr(kn.current),mo(s)){d=s.stateNode,u=s.type;var y=s.memoizedProps;switch(d[vn]=s,d[Xi]=y,r=(s.mode&1)!==0,u){case"dialog":qe("cancel",d),qe("close",d);break;case"iframe":case"object":case"embed":qe("load",d);break;case"video":case"audio":for(g=0;g<Ki.length;g++)qe(Ki[g],d);break;case"source":qe("error",d);break;case"img":case"image":case"link":qe("error",d),qe("load",d);break;case"details":qe("toggle",d);break;case"input":H(d,y),qe("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!y.multiple},qe("invalid",d);break;case"textarea":Un(d,y),qe("invalid",d)}wt(u,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var T=y[x];x==="children"?typeof T=="string"?d.textContent!==T&&(y.suppressHydrationWarning!==!0&&oo(d.textContent,T,r),g=["children",T]):typeof T=="number"&&d.textContent!==""+T&&(y.suppressHydrationWarning!==!0&&oo(d.textContent,T,r),g=["children",""+T]):o.hasOwnProperty(x)&&T!=null&&x==="onScroll"&&qe("scroll",d)}switch(u){case"input":qt(d),Oe(d,y,!0);break;case"textarea":qt(d),zs(d);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(d.onclick=lo)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=V(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=x.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=x.createElement(u,{is:d.is}):(r=x.createElement(u),u==="select"&&(x=r,d.multiple?x.multiple=!0:d.size&&(x.size=d.size))):r=x.createElementNS(r,u),r[vn]=s,r[Xi]=d,Oh(r,s,!1,!1),s.stateNode=r;e:{switch(x=yn(u,d),u){case"dialog":qe("cancel",r),qe("close",r),g=d;break;case"iframe":case"object":case"embed":qe("load",r),g=d;break;case"video":case"audio":for(g=0;g<Ki.length;g++)qe(Ki[g],r);g=d;break;case"source":qe("error",r),g=d;break;case"img":case"image":case"link":qe("error",r),qe("load",r),g=d;break;case"details":qe("toggle",r),g=d;break;case"input":H(r,d),g=B(r,d),qe("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=_({},d,{value:void 0}),qe("invalid",r);break;case"textarea":Un(r,d),g=et(r,d),qe("invalid",r);break;default:g=d}wt(u,g),T=g;for(y in T)if(T.hasOwnProperty(y)){var R=T[y];y==="style"?Vn(r,R):y==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Pe(r,R)):y==="children"?typeof R=="string"?(u!=="textarea"||R!=="")&&Fe(r,R):typeof R=="number"&&Fe(r,""+R):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?R!=null&&y==="onScroll"&&qe("scroll",r):R!=null&&A(r,y,R,x))}switch(u){case"input":qt(r),Oe(r,d,!1);break;case"textarea":qt(r),zs(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Te(d.value));break;case"select":r.multiple=!!d.multiple,y=d.value,y!=null?st(r,!!d.multiple,y,!1):d.defaultValue!=null&&st(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=lo)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return _t(s),null;case 6:if(r&&s.stateNode!=null)Dh(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(u=Cr(ts.current),Cr(kn.current),mo(s)){if(d=s.stateNode,u=s.memoizedProps,d[vn]=s,(y=d.nodeValue!==u)&&(r=Vt,r!==null))switch(r.tag){case 3:oo(d.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&oo(d.nodeValue,u,(r.mode&1)!==0)}y&&(s.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[vn]=s,s.stateNode=d}return _t(s),null;case 13:if(Qe(Ye),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xe&&Gt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)$d(),ri(),s.flags|=98560,y=!1;else if(y=mo(s),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[vn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;_t(s),y=!1}else un!==null&&(gu(un),un=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=u,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(Ye.current&1)!==0?ut===0&&(ut=3):vu())),s.updateQueue!==null&&(s.flags|=4),_t(s),null);case 4:return li(),su(r,s),r===null&&qi(s.stateNode.containerInfo),_t(s),null;case 10:return Ra(s.type._context),_t(s),null;case 17:return jt(s.type)&&uo(),_t(s),null;case 19:if(Qe(Ye),y=s.memoizedState,y===null)return _t(s),null;if(d=(s.flags&128)!==0,x=y.rendering,x===null)if(d)os(y,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(x=xo(r),x!==null){for(s.flags|=128,os(y,!1),d=x.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=u,u=s.child;u!==null;)y=u,r=d,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,r=x.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return We(Ye,Ye.current&1|2),s.child}r=r.sibling}y.tail!==null&&nt()>fi&&(s.flags|=128,d=!0,os(y,!1),s.lanes=4194304)}else{if(!d)if(r=xo(x),r!==null){if(s.flags|=128,d=!0,u=r.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),os(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!Xe)return _t(s),null}else 2*nt()-y.renderingStartTime>fi&&u!==1073741824&&(s.flags|=128,d=!0,os(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(u=y.last,u!==null?u.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=nt(),s.sibling=null,u=Ye.current,We(Ye,d?u&1|2:u&1),s):(_t(s),null);case 22:case 23:return wu(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(Wt&1073741824)!==0&&(_t(s),s.subtreeFlags&6&&(s.flags|=8192)):_t(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function qv(r,s){switch(Ia(s),s.tag){case 1:return jt(s.type)&&uo(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return li(),Qe(Rt),Qe(St),$a(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Fa(s),null;case 13:if(Qe(Ye),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ri()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return Qe(Ye),null;case 4:return li(),null;case 10:return Ra(s.type._context),null;case 22:case 23:return wu(),null;case 24:return null;default:return null}}var Ao=!1,Et=!1,Qv=typeof WeakSet=="function"?WeakSet:Set,ae=null;function ui(r,s){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){tt(r,s,d)}else u.current=null}function ou(r,s,u){try{u()}catch(d){tt(r,s,d)}}var Fh=!1;function Xv(r,s){if(wa=Qs,r=gd(),ca(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,y=d.focusNode;d=d.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var x=0,T=-1,R=-1,z=0,q=0,X=r,K=null;t:for(;;){for(var le;X!==u||g!==0&&X.nodeType!==3||(T=x+g),X!==y||d!==0&&X.nodeType!==3||(R=x+d),X.nodeType===3&&(x+=X.nodeValue.length),(le=X.firstChild)!==null;)K=X,X=le;for(;;){if(X===r)break t;if(K===u&&++z===g&&(T=x),K===y&&++q===d&&(R=x),(le=X.nextSibling)!==null)break;X=K,K=X.parentNode}X=le}u=T===-1||R===-1?null:{start:T,end:R}}else u=null}u=u||{start:0,end:0}}else u=null;for(va={focusedElem:r,selectionRange:u},Qs=!1,ae=s;ae!==null;)if(s=ae,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ae=r;else for(;ae!==null;){s=ae;try{var ce=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ce!==null){var de=ce.memoizedProps,rt=ce.memoizedState,M=s.stateNode,j=M.getSnapshotBeforeUpdate(s.elementType===s.type?de:cn(s.type,de),rt);M.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var F=s.stateNode.containerInfo;F.nodeType===1?F.textContent="":F.nodeType===9&&F.documentElement&&F.removeChild(F.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ee){tt(s,s.return,ee)}if(r=s.sibling,r!==null){r.return=s.return,ae=r;break}ae=s.return}return ce=Fh,Fh=!1,ce}function ls(r,s,u){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var y=g.destroy;g.destroy=void 0,y!==void 0&&ou(s,u,y)}g=g.next}while(g!==d)}}function Po(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var u=s=s.next;do{if((u.tag&r)===r){var d=u.create;u.destroy=d()}u=u.next}while(u!==s)}}function lu(r){var s=r.ref;if(s!==null){var u=r.stateNode;r.tag,r=u,typeof s=="function"?s(r):s.current=r}}function zh(r){var s=r.alternate;s!==null&&(r.alternate=null,zh(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[vn],delete s[Xi],delete s[Ca],delete s[Lv],delete s[Rv])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function $h(r){return r.tag===5||r.tag===3||r.tag===4}function Bh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||$h(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function au(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.nodeType===8?u.parentNode.insertBefore(r,s):u.insertBefore(r,s):(u.nodeType===8?(s=u.parentNode,s.insertBefore(r,u)):(s=u,s.appendChild(r)),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=lo));else if(d!==4&&(r=r.child,r!==null))for(au(r,s,u),r=r.sibling;r!==null;)au(r,s,u),r=r.sibling}function uu(r,s,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?u.insertBefore(r,s):u.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(uu(r,s,u),r=r.sibling;r!==null;)uu(r,s,u),r=r.sibling}var vt=null,fn=!1;function nr(r,s,u){for(u=u.child;u!==null;)Uh(r,s,u),u=u.sibling}function Uh(r,s,u){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Vs,u)}catch{}switch(u.tag){case 5:Et||ui(u,s);case 6:var d=vt,g=fn;vt=null,nr(r,s,u),vt=d,fn=g,vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):vt.removeChild(u.stateNode));break;case 18:vt!==null&&(fn?(r=vt,u=u.stateNode,r.nodeType===8?Sa(r.parentNode,u):r.nodeType===1&&Sa(r,u),zi(r)):Sa(vt,u.stateNode));break;case 4:d=vt,g=fn,vt=u.stateNode.containerInfo,fn=!0,nr(r,s,u),vt=d,fn=g;break;case 0:case 11:case 14:case 15:if(!Et&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&ou(u,s,x),g=g.next}while(g!==d)}nr(r,s,u);break;case 1:if(!Et&&(ui(u,s),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(T){tt(u,s,T)}nr(r,s,u);break;case 21:nr(r,s,u);break;case 22:u.mode&1?(Et=(d=Et)||u.memoizedState!==null,nr(r,s,u),Et=d):nr(r,s,u);break;default:nr(r,s,u)}}function Vh(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Qv),s.forEach(function(d){var g=sk.bind(null,r,d);u.has(d)||(u.add(d),d.then(g,g))})}}function dn(r,s){var u=s.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{var y=r,x=s,T=x;e:for(;T!==null;){switch(T.tag){case 5:vt=T.stateNode,fn=!1;break e;case 3:vt=T.stateNode.containerInfo,fn=!0;break e;case 4:vt=T.stateNode.containerInfo,fn=!0;break e}T=T.return}if(vt===null)throw Error(n(160));Uh(y,x,g),vt=null,fn=!1;var R=g.alternate;R!==null&&(R.return=null),g.return=null}catch(z){tt(g,s,z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Gh(s,r),s=s.sibling}function Gh(r,s){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(dn(s,r),Sn(r),d&4){try{ls(3,r,r.return),Po(3,r)}catch(de){tt(r,r.return,de)}try{ls(5,r,r.return)}catch(de){tt(r,r.return,de)}}break;case 1:dn(s,r),Sn(r),d&512&&u!==null&&ui(u,u.return);break;case 5:if(dn(s,r),Sn(r),d&512&&u!==null&&ui(u,u.return),r.flags&32){var g=r.stateNode;try{Fe(g,"")}catch(de){tt(r,r.return,de)}}if(d&4&&(g=r.stateNode,g!=null)){var y=r.memoizedProps,x=u!==null?u.memoizedProps:y,T=r.type,R=r.updateQueue;if(r.updateQueue=null,R!==null)try{T==="input"&&y.type==="radio"&&y.name!=null&&we(g,y),yn(T,x);var z=yn(T,y);for(x=0;x<R.length;x+=2){var q=R[x],X=R[x+1];q==="style"?Vn(g,X):q==="dangerouslySetInnerHTML"?Pe(g,X):q==="children"?Fe(g,X):A(g,q,X,z)}switch(T){case"input":Se(g,y);break;case"textarea":mr(g,y);break;case"select":var K=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var le=y.value;le!=null?st(g,!!y.multiple,le,!1):K!==!!y.multiple&&(y.defaultValue!=null?st(g,!!y.multiple,y.defaultValue,!0):st(g,!!y.multiple,y.multiple?[]:"",!1))}g[Xi]=y}catch(de){tt(r,r.return,de)}}break;case 6:if(dn(s,r),Sn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,y=r.memoizedProps;try{g.nodeValue=y}catch(de){tt(r,r.return,de)}}break;case 3:if(dn(s,r),Sn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{zi(s.containerInfo)}catch(de){tt(r,r.return,de)}break;case 4:dn(s,r),Sn(r);break;case 13:dn(s,r),Sn(r),g=r.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(du=nt())),d&4&&Vh(r);break;case 22:if(q=u!==null&&u.memoizedState!==null,r.mode&1?(Et=(z=Et)||q,dn(s,r),Et=z):dn(s,r),Sn(r),d&8192){if(z=r.memoizedState!==null,(r.stateNode.isHidden=z)&&!q&&(r.mode&1)!==0)for(ae=r,q=r.child;q!==null;){for(X=ae=q;ae!==null;){switch(K=ae,le=K.child,K.tag){case 0:case 11:case 14:case 15:ls(4,K,K.return);break;case 1:ui(K,K.return);var ce=K.stateNode;if(typeof ce.componentWillUnmount=="function"){d=K,u=K.return;try{s=d,ce.props=s.memoizedProps,ce.state=s.memoizedState,ce.componentWillUnmount()}catch(de){tt(d,u,de)}}break;case 5:ui(K,K.return);break;case 22:if(K.memoizedState!==null){Kh(X);continue}}le!==null?(le.return=K,ae=le):Kh(X)}q=q.sibling}e:for(q=null,X=r;;){if(X.tag===5){if(q===null){q=X;try{g=X.stateNode,z?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(T=X.stateNode,R=X.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,T.style.display=Qt("display",x))}catch(de){tt(r,r.return,de)}}}else if(X.tag===6){if(q===null)try{X.stateNode.nodeValue=z?"":X.memoizedProps}catch(de){tt(r,r.return,de)}}else if((X.tag!==22&&X.tag!==23||X.memoizedState===null||X===r)&&X.child!==null){X.child.return=X,X=X.child;continue}if(X===r)break e;for(;X.sibling===null;){if(X.return===null||X.return===r)break e;q===X&&(q=null),X=X.return}q===X&&(q=null),X.sibling.return=X.return,X=X.sibling}}break;case 19:dn(s,r),Sn(r),d&4&&Vh(r);break;case 21:break;default:dn(s,r),Sn(r)}}function Sn(r){var s=r.flags;if(s&2){try{e:{for(var u=r.return;u!==null;){if($h(u)){var d=u;break e}u=u.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(Fe(g,""),d.flags&=-33);var y=Bh(r);uu(r,y,g);break;case 3:case 4:var x=d.stateNode.containerInfo,T=Bh(r);au(r,T,x);break;default:throw Error(n(161))}}catch(R){tt(r,r.return,R)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function Yv(r,s,u){ae=r,Wh(r)}function Wh(r,s,u){for(var d=(r.mode&1)!==0;ae!==null;){var g=ae,y=g.child;if(g.tag===22&&d){var x=g.memoizedState!==null||Ao;if(!x){var T=g.alternate,R=T!==null&&T.memoizedState!==null||Et;T=Ao;var z=Et;if(Ao=x,(Et=R)&&!z)for(ae=g;ae!==null;)x=ae,R=x.child,x.tag===22&&x.memoizedState!==null?qh(g):R!==null?(R.return=x,ae=R):qh(g);for(;y!==null;)ae=y,Wh(y),y=y.sibling;ae=g,Ao=T,Et=z}Hh(r)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,ae=y):Hh(r)}}function Hh(r){for(;ae!==null;){var s=ae;if((s.flags&8772)!==0){var u=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Et||Po(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!Et)if(u===null)d.componentDidMount();else{var g=s.elementType===s.type?u.memoizedProps:cn(s.type,u.memoizedProps);d.componentDidUpdate(g,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&Kd(s,y,d);break;case 3:var x=s.updateQueue;if(x!==null){if(u=null,s.child!==null)switch(s.child.tag){case 5:u=s.child.stateNode;break;case 1:u=s.child.stateNode}Kd(s,x,u)}break;case 5:var T=s.stateNode;if(u===null&&s.flags&4){u=T;var R=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&u.focus();break;case"img":R.src&&(u.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var z=s.alternate;if(z!==null){var q=z.memoizedState;if(q!==null){var X=q.dehydrated;X!==null&&zi(X)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Et||s.flags&512&&lu(s)}catch(K){tt(s,s.return,K)}}if(s===r){ae=null;break}if(u=s.sibling,u!==null){u.return=s.return,ae=u;break}ae=s.return}}function Kh(r){for(;ae!==null;){var s=ae;if(s===r){ae=null;break}var u=s.sibling;if(u!==null){u.return=s.return,ae=u;break}ae=s.return}}function qh(r){for(;ae!==null;){var s=ae;try{switch(s.tag){case 0:case 11:case 15:var u=s.return;try{Po(4,s)}catch(R){tt(s,u,R)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(R){tt(s,g,R)}}var y=s.return;try{lu(s)}catch(R){tt(s,y,R)}break;case 5:var x=s.return;try{lu(s)}catch(R){tt(s,x,R)}}}catch(R){tt(s,s.return,R)}if(s===r){ae=null;break}var T=s.sibling;if(T!==null){T.return=s.return,ae=T;break}ae=s.return}}var Jv=Math.ceil,Lo=$.ReactCurrentDispatcher,cu=$.ReactCurrentOwner,en=$.ReactCurrentBatchConfig,ze=0,ht=null,ot=null,kt=0,Wt=0,ci=Yn(0),ut=0,as=null,Er=0,Ro=0,fu=0,us=null,Mt=null,du=0,fi=1/0,jn=null,jo=!1,hu=null,rr=null,Oo=!1,ir=null,Mo=0,cs=0,pu=null,Do=-1,Fo=0;function Pt(){return(ze&6)!==0?nt():Do!==-1?Do:Do=nt()}function sr(r){return(r.mode&1)===0?1:(ze&2)!==0&&kt!==0?kt&-kt:Ov.transition!==null?(Fo===0&&(Fo=Bf()),Fo):(r=Ue,r!==0||(r=window.event,r=r===void 0?16:Xf(r.type)),r)}function hn(r,s,u,d){if(50<cs)throw cs=0,pu=null,Error(n(185));ji(r,u,d),((ze&2)===0||r!==ht)&&(r===ht&&((ze&2)===0&&(Ro|=u),ut===4&&or(r,kt)),Dt(r,d),u===1&&ze===0&&(s.mode&1)===0&&(fi=nt()+500,fo&&Zn()))}function Dt(r,s){var u=r.callbackNode;Ow(r,s);var d=Hs(r,r===ht?kt:0);if(d===0)u!==null&&Ff(u),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(u!=null&&Ff(u),s===1)r.tag===0?jv(Xh.bind(null,r)):Od(Xh.bind(null,r)),Av(function(){(ze&6)===0&&Zn()}),u=null;else{switch(Uf(d)){case 1:u=Kl;break;case 4:u=zf;break;case 16:u=Us;break;case 536870912:u=$f;break;default:u=Us}u=ip(u,Qh.bind(null,r))}r.callbackPriority=s,r.callbackNode=u}}function Qh(r,s){if(Do=-1,Fo=0,(ze&6)!==0)throw Error(n(327));var u=r.callbackNode;if(di()&&r.callbackNode!==u)return null;var d=Hs(r,r===ht?kt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=zo(r,d);else{s=d;var g=ze;ze|=2;var y=Jh();(ht!==r||kt!==s)&&(jn=null,fi=nt()+500,Ir(r,s));do try{tk();break}catch(T){Yh(r,T)}while(!0);La(),Lo.current=y,ze=g,ot!==null?s=0:(ht=null,kt=0,s=ut)}if(s!==0){if(s===2&&(g=ql(r),g!==0&&(d=g,s=mu(r,g))),s===1)throw u=as,Ir(r,0),or(r,d),Dt(r,nt()),u;if(s===6)or(r,d);else{if(g=r.current.alternate,(d&30)===0&&!Zv(g)&&(s=zo(r,d),s===2&&(y=ql(r),y!==0&&(d=y,s=mu(r,y))),s===1))throw u=as,Ir(r,0),or(r,d),Dt(r,nt()),u;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Nr(r,Mt,jn);break;case 3:if(or(r,d),(d&130023424)===d&&(s=du+500-nt(),10<s)){if(Hs(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Pt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=xa(Nr.bind(null,r,Mt,jn),s);break}Nr(r,Mt,jn);break;case 4:if(or(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var x=31-ln(d);y=1<<x,x=s[x],x>g&&(g=x),d&=~y}if(d=g,d=nt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Jv(d/1960))-d,10<d){r.timeoutHandle=xa(Nr.bind(null,r,Mt,jn),d);break}Nr(r,Mt,jn);break;case 5:Nr(r,Mt,jn);break;default:throw Error(n(329))}}}return Dt(r,nt()),r.callbackNode===u?Qh.bind(null,r):null}function mu(r,s){var u=us;return r.current.memoizedState.isDehydrated&&(Ir(r,s).flags|=256),r=zo(r,s),r!==2&&(s=Mt,Mt=u,s!==null&&gu(s)),r}function gu(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function Zv(r){for(var s=r;;){if(s.flags&16384){var u=s.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var g=u[d],y=g.getSnapshot;g=g.value;try{if(!an(y(),g))return!1}catch{return!1}}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function or(r,s){for(s&=~fu,s&=~Ro,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var u=31-ln(s),d=1<<u;r[u]=-1,s&=~d}}function Xh(r){if((ze&6)!==0)throw Error(n(327));di();var s=Hs(r,0);if((s&1)===0)return Dt(r,nt()),null;var u=zo(r,s);if(r.tag!==0&&u===2){var d=ql(r);d!==0&&(s=d,u=mu(r,d))}if(u===1)throw u=as,Ir(r,0),or(r,s),Dt(r,nt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Nr(r,Mt,jn),Dt(r,nt()),null}function yu(r,s){var u=ze;ze|=1;try{return r(s)}finally{ze=u,ze===0&&(fi=nt()+500,fo&&Zn())}}function br(r){ir!==null&&ir.tag===0&&(ze&6)===0&&di();var s=ze;ze|=1;var u=en.transition,d=Ue;try{if(en.transition=null,Ue=1,r)return r()}finally{Ue=d,en.transition=u,ze=s,(ze&6)===0&&Zn()}}function wu(){Wt=ci.current,Qe(ci)}function Ir(r,s){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,Tv(u)),ot!==null)for(u=ot.return;u!==null;){var d=u;switch(Ia(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&uo();break;case 3:li(),Qe(Rt),Qe(St),$a();break;case 5:Fa(d);break;case 4:li();break;case 13:Qe(Ye);break;case 19:Qe(Ye);break;case 10:Ra(d.type._context);break;case 22:case 23:wu()}u=u.return}if(ht=r,ot=r=lr(r.current,null),kt=Wt=s,ut=0,as=null,fu=Ro=Er=0,Mt=us=null,Sr!==null){for(s=0;s<Sr.length;s++)if(u=Sr[s],d=u.interleaved,d!==null){u.interleaved=null;var g=d.next,y=u.pending;if(y!==null){var x=y.next;y.next=g,d.next=x}u.pending=d}Sr=null}return r}function Yh(r,s){do{var u=ot;try{if(La(),So.current=bo,Co){for(var d=Je.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}Co=!1}if(_r=0,dt=at=Je=null,ns=!1,rs=0,cu.current=null,u===null||u.return===null){ut=1,as=s,ot=null;break}e:{var y=r,x=u.return,T=u,R=s;if(s=kt,T.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var z=R,q=T,X=q.tag;if((q.mode&1)===0&&(X===0||X===11||X===15)){var K=q.alternate;K?(q.updateQueue=K.updateQueue,q.memoizedState=K.memoizedState,q.lanes=K.lanes):(q.updateQueue=null,q.memoizedState=null)}var le=Sh(x);if(le!==null){le.flags&=-257,Ch(le,x,T,y,s),le.mode&1&&xh(y,z,s),s=le,R=z;var ce=s.updateQueue;if(ce===null){var de=new Set;de.add(R),s.updateQueue=de}else ce.add(R);break e}else{if((s&1)===0){xh(y,z,s),vu();break e}R=Error(n(426))}}else if(Xe&&T.mode&1){var rt=Sh(x);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),Ch(rt,x,T,y,s),Aa(ai(R,T));break e}}y=R=ai(R,T),ut!==4&&(ut=2),us===null?us=[y]:us.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var M=vh(y,R,s);Hd(y,M);break e;case 1:T=R;var j=y.type,F=y.stateNode;if((y.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||F!==null&&typeof F.componentDidCatch=="function"&&(rr===null||!rr.has(F)))){y.flags|=65536,s&=-s,y.lanes|=s;var ee=kh(y,T,s);Hd(y,ee);break e}}y=y.return}while(y!==null)}ep(u)}catch(he){s=he,ot===u&&u!==null&&(ot=u=u.return);continue}break}while(!0)}function Jh(){var r=Lo.current;return Lo.current=bo,r===null?bo:r}function vu(){(ut===0||ut===3||ut===2)&&(ut=4),ht===null||(Er&268435455)===0&&(Ro&268435455)===0||or(ht,kt)}function zo(r,s){var u=ze;ze|=2;var d=Jh();(ht!==r||kt!==s)&&(jn=null,Ir(r,s));do try{ek();break}catch(g){Yh(r,g)}while(!0);if(La(),ze=u,Lo.current=d,ot!==null)throw Error(n(261));return ht=null,kt=0,ut}function ek(){for(;ot!==null;)Zh(ot)}function tk(){for(;ot!==null&&!bw();)Zh(ot)}function Zh(r){var s=rp(r.alternate,r,Wt);r.memoizedProps=r.pendingProps,s===null?ep(r):ot=s,cu.current=null}function ep(r){var s=r;do{var u=s.alternate;if(r=s.return,(s.flags&32768)===0){if(u=Kv(u,s,Wt),u!==null){ot=u;return}}else{if(u=qv(u,s),u!==null){u.flags&=32767,ot=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ut=6,ot=null;return}}if(s=s.sibling,s!==null){ot=s;return}ot=s=r}while(s!==null);ut===0&&(ut=5)}function Nr(r,s,u){var d=Ue,g=en.transition;try{en.transition=null,Ue=1,nk(r,s,u,d)}finally{en.transition=g,Ue=d}return null}function nk(r,s,u,d){do di();while(ir!==null);if((ze&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=u.lanes|u.childLanes;if(Mw(r,y),r===ht&&(ot=ht=null,kt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Oo||(Oo=!0,ip(Us,function(){return di(),null})),y=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||y){y=en.transition,en.transition=null;var x=Ue;Ue=1;var T=ze;ze|=4,cu.current=null,Xv(r,u),Gh(u,r),Sv(va),Qs=!!wa,va=wa=null,r.current=u,Yv(u),Iw(),ze=T,Ue=x,en.transition=y}else r.current=u;if(Oo&&(Oo=!1,ir=r,Mo=g),y=r.pendingLanes,y===0&&(rr=null),Aw(u.stateNode),Dt(r,nt()),s!==null)for(d=r.onRecoverableError,u=0;u<s.length;u++)g=s[u],d(g.value,{componentStack:g.stack,digest:g.digest});if(jo)throw jo=!1,r=hu,hu=null,r;return(Mo&1)!==0&&r.tag!==0&&di(),y=r.pendingLanes,(y&1)!==0?r===pu?cs++:(cs=0,pu=r):cs=0,Zn(),null}function di(){if(ir!==null){var r=Uf(Mo),s=en.transition,u=Ue;try{if(en.transition=null,Ue=16>r?16:r,ir===null)var d=!1;else{if(r=ir,ir=null,Mo=0,(ze&6)!==0)throw Error(n(331));var g=ze;for(ze|=4,ae=r.current;ae!==null;){var y=ae,x=y.child;if((ae.flags&16)!==0){var T=y.deletions;if(T!==null){for(var R=0;R<T.length;R++){var z=T[R];for(ae=z;ae!==null;){var q=ae;switch(q.tag){case 0:case 11:case 15:ls(8,q,y)}var X=q.child;if(X!==null)X.return=q,ae=X;else for(;ae!==null;){q=ae;var K=q.sibling,le=q.return;if(zh(q),q===z){ae=null;break}if(K!==null){K.return=le,ae=K;break}ae=le}}}var ce=y.alternate;if(ce!==null){var de=ce.child;if(de!==null){ce.child=null;do{var rt=de.sibling;de.sibling=null,de=rt}while(de!==null)}}ae=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,ae=x;else e:for(;ae!==null;){if(y=ae,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:ls(9,y,y.return)}var M=y.sibling;if(M!==null){M.return=y.return,ae=M;break e}ae=y.return}}var j=r.current;for(ae=j;ae!==null;){x=ae;var F=x.child;if((x.subtreeFlags&2064)!==0&&F!==null)F.return=x,ae=F;else e:for(x=j;ae!==null;){if(T=ae,(T.flags&2048)!==0)try{switch(T.tag){case 0:case 11:case 15:Po(9,T)}}catch(he){tt(T,T.return,he)}if(T===x){ae=null;break e}var ee=T.sibling;if(ee!==null){ee.return=T.return,ae=ee;break e}ae=T.return}}if(ze=g,Zn(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(Vs,r)}catch{}d=!0}return d}finally{Ue=u,en.transition=s}}return!1}function tp(r,s,u){s=ai(u,s),s=vh(r,s,1),r=tr(r,s,1),s=Pt(),r!==null&&(ji(r,1,s),Dt(r,s))}function tt(r,s,u){if(r.tag===3)tp(r,r,u);else for(;s!==null;){if(s.tag===3){tp(s,r,u);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(rr===null||!rr.has(d))){r=ai(u,r),r=kh(s,r,1),s=tr(s,r,1),r=Pt(),s!==null&&(ji(s,1,r),Dt(s,r));break}}s=s.return}}function rk(r,s,u){var d=r.pingCache;d!==null&&d.delete(s),s=Pt(),r.pingedLanes|=r.suspendedLanes&u,ht===r&&(kt&u)===u&&(ut===4||ut===3&&(kt&130023424)===kt&&500>nt()-du?Ir(r,0):fu|=u),Dt(r,s)}function np(r,s){s===0&&((r.mode&1)===0?s=1:(s=Ws,Ws<<=1,(Ws&130023424)===0&&(Ws=4194304)));var u=Pt();r=Pn(r,s),r!==null&&(ji(r,s,u),Dt(r,u))}function ik(r){var s=r.memoizedState,u=0;s!==null&&(u=s.retryLane),np(r,u)}function sk(r,s){var u=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),np(r,u)}var rp;rp=function(r,s,u){if(r!==null)if(r.memoizedProps!==s.pendingProps||Rt.current)Ot=!0;else{if((r.lanes&u)===0&&(s.flags&128)===0)return Ot=!1,Hv(r,s,u);Ot=(r.flags&131072)!==0}else Ot=!1,Xe&&(s.flags&1048576)!==0&&Md(s,po,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;To(r,s),r=s.pendingProps;var g=ei(s,St.current);oi(s,u),g=Va(null,s,d,r,g,u);var y=Ga();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jt(d)?(y=!0,co(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ma(s),g.updater=Io,s.stateNode=g,g._reactInternals=s,Xa(s,d,r,u),s=eu(null,s,d,!0,y,u)):(s.tag=0,Xe&&y&&ba(s),At(null,s,g,u),s=s.child),s;case 16:d=s.elementType;e:{switch(To(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=lk(d),r=cn(d,r),g){case 0:s=Za(null,s,d,r,u);break e;case 1:s=Th(null,s,d,r,u);break e;case 11:s=_h(null,s,d,r,u);break e;case 14:s=Eh(null,s,d,cn(d.type,r),u);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Za(r,s,d,g,u);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),Th(r,s,d,g,u);case 3:e:{if(Ah(s),r===null)throw Error(n(387));d=s.pendingProps,y=s.memoizedState,g=y.element,Wd(r,s),ko(s,d,null,u);var x=s.memoizedState;if(d=x.element,y.isDehydrated)if(y={element:d,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=ai(Error(n(423)),s),s=Ph(r,s,d,u,g);break e}else if(d!==g){g=ai(Error(n(424)),s),s=Ph(r,s,d,u,g);break e}else for(Gt=Xn(s.stateNode.containerInfo.firstChild),Vt=s,Xe=!0,un=null,u=Vd(s,null,d,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ri(),d===g){s=Rn(r,s,u);break e}At(r,s,d,u)}s=s.child}return s;case 5:return qd(s),r===null&&Ta(s),d=s.type,g=s.pendingProps,y=r!==null?r.memoizedProps:null,x=g.children,ka(d,g)?x=null:y!==null&&ka(d,y)&&(s.flags|=32),Nh(r,s),At(r,s,x,u),s.child;case 6:return r===null&&Ta(s),null;case 13:return Lh(r,s,u);case 4:return Da(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=ii(s,null,d,u):At(r,s,d,u),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),_h(r,s,d,g,u);case 7:return At(r,s,s.pendingProps,u),s.child;case 8:return At(r,s,s.pendingProps.children,u),s.child;case 12:return At(r,s,s.pendingProps.children,u),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,We(yo,d._currentValue),d._currentValue=x,y!==null)if(an(y.value,x)){if(y.children===g.children&&!Rt.current){s=Rn(r,s,u);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var T=y.dependencies;if(T!==null){x=y.child;for(var R=T.firstContext;R!==null;){if(R.context===d){if(y.tag===1){R=Ln(-1,u&-u),R.tag=2;var z=y.updateQueue;if(z!==null){z=z.shared;var q=z.pending;q===null?R.next=R:(R.next=q.next,q.next=R),z.pending=R}}y.lanes|=u,R=y.alternate,R!==null&&(R.lanes|=u),ja(y.return,u,s),T.lanes|=u;break}R=R.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=u,T=x.alternate,T!==null&&(T.lanes|=u),ja(x,u,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}At(r,s,g.children,u),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,oi(s,u),g=Jt(g),d=d(g),s.flags|=1,At(r,s,d,u),s.child;case 14:return d=s.type,g=cn(d,s.pendingProps),g=cn(d.type,g),Eh(r,s,d,g,u);case 15:return bh(r,s,s.type,s.pendingProps,u);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:cn(d,g),To(r,s),s.tag=1,jt(d)?(r=!0,co(s)):r=!1,oi(s,u),yh(s,d,g),Xa(s,d,g,u),eu(null,s,d,!0,r,u);case 19:return jh(r,s,u);case 22:return Ih(r,s,u)}throw Error(n(156,s.tag))};function ip(r,s){return Df(r,s)}function ok(r,s,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(r,s,u,d){return new ok(r,s,u,d)}function ku(r){return r=r.prototype,!(!r||!r.isReactComponent)}function lk(r){if(typeof r=="function")return ku(r)?1:0;if(r!=null){if(r=r.$$typeof,r===re)return 11;if(r===Y)return 14}return 2}function lr(r,s){var u=r.alternate;return u===null?(u=tn(r.tag,s,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=s,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,s=r.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function $o(r,s,u,d,g,y){var x=2;if(d=r,typeof r=="function")ku(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case Q:return Tr(u.children,g,y,s);case oe:x=8,g|=8;break;case ue:return r=tn(12,u,s,g|2),r.elementType=ue,r.lanes=y,r;case fe:return r=tn(13,u,s,g),r.elementType=fe,r.lanes=y,r;case ie:return r=tn(19,u,s,g),r.elementType=ie,r.lanes=y,r;case me:return Bo(u,g,y,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case D:x=10;break e;case ne:x=9;break e;case re:x=11;break e;case Y:x=14;break e;case ge:x=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=tn(x,u,s,g),s.elementType=r,s.type=d,s.lanes=y,s}function Tr(r,s,u,d){return r=tn(7,r,d,s),r.lanes=u,r}function Bo(r,s,u,d){return r=tn(22,r,d,s),r.elementType=me,r.lanes=u,r.stateNode={isHidden:!1},r}function xu(r,s,u){return r=tn(6,r,null,s),r.lanes=u,r}function Su(r,s,u){return s=tn(4,r.children!==null?r.children:[],r.key,s),s.lanes=u,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function ak(r,s,u,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Cu(r,s,u,d,g,y,x,T,R){return r=new ak(r,s,u,T,R),s===1?(s=1,y===!0&&(s|=8)):s=0,y=tn(3,null,null,s),r.current=y,y.stateNode=r,y.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(y),r}function uk(r,s,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:d==null?null:""+d,children:r,containerInfo:s,implementation:u}}function sp(r){if(!r)return Jn;r=r._reactInternals;e:{if(yr(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(jt(u))return Rd(r,u,s)}return s}function op(r,s,u,d,g,y,x,T,R){return r=Cu(u,d,!0,r,g,y,x,T,R),r.context=sp(null),u=r.current,d=Pt(),g=sr(u),y=Ln(d,g),y.callback=s??null,tr(u,y,g),r.current.lanes=g,ji(r,g,d),Dt(r,d),r}function Uo(r,s,u,d){var g=s.current,y=Pt(),x=sr(g);return u=sp(u),s.context===null?s.context=u:s.pendingContext=u,s=Ln(y,x),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=tr(g,s,x),r!==null&&(hn(r,g,x,y),vo(r,g,x)),x}function Vo(r){return r=r.current,r.child?(r.child.tag===5,r.child.stateNode):null}function lp(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<s?u:s}}function _u(r,s){lp(r,s),(r=r.alternate)&&lp(r,s)}function ck(){return null}var ap=typeof reportError=="function"?reportError:function(r){console.error(r)};function Eu(r){this._internalRoot=r}Go.prototype.render=Eu.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Uo(r,s,null,null)},Go.prototype.unmount=Eu.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;br(function(){Uo(null,r,null,null)}),s[In]=null}};function Go(r){this._internalRoot=r}Go.prototype.unstable_scheduleHydration=function(r){if(r){var s=Wf();r={blockedOn:null,target:r,priority:s};for(var u=0;u<Kn.length&&s!==0&&s<Kn[u].priority;u++);Kn.splice(u,0,r),u===0&&qf(r)}};function bu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Wo(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function up(){}function fk(r,s,u,d,g){if(g){if(typeof d=="function"){var y=d;d=function(){var z=Vo(x);y.call(z)}}var x=op(s,d,r,0,null,!1,!1,"",up);return r._reactRootContainer=x,r[In]=x.current,qi(r.nodeType===8?r.parentNode:r),br(),x}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var T=d;d=function(){var z=Vo(R);T.call(z)}}var R=Cu(r,0,!1,null,null,!1,!1,"",up);return r._reactRootContainer=R,r[In]=R.current,qi(r.nodeType===8?r.parentNode:r),br(function(){Uo(s,R,u,d)}),R}function Ho(r,s,u,d,g){var y=u._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var T=g;g=function(){var R=Vo(x);T.call(R)}}Uo(s,x,r,g)}else x=fk(u,s,r,g,d);return Vo(x)}Vf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var u=Ri(s.pendingLanes);u!==0&&(Xl(s,u|1),Dt(s,nt()),(ze&6)===0&&(fi=nt()+500,Zn()))}break;case 13:br(function(){var d=Pn(r,1);if(d!==null){var g=Pt();hn(d,r,1,g)}}),_u(r,1)}},Yl=function(r){if(r.tag===13){var s=Pn(r,134217728);if(s!==null){var u=Pt();hn(s,r,134217728,u)}_u(r,134217728)}},Gf=function(r){if(r.tag===13){var s=sr(r),u=Pn(r,s);if(u!==null){var d=Pt();hn(u,r,s,d)}_u(r,s)}},Wf=function(){return Ue},Hf=function(r,s){var u=Ue;try{return Ue=r,s()}finally{Ue=u}},Vl=function(r,s,u){switch(s){case"input":if(Se(r,u),s=u.name,u.type==="radio"&&s!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<u.length;s++){var d=u[s];if(d!==r&&d.form===r.form){var g=ao(d);if(!g)throw Error(n(90));Ur(d),Se(d,g)}}}break;case"textarea":mr(r,u);break;case"select":s=u.value,s!=null&&st(r,!!u.multiple,s,!1)}},Af=yu,Pf=br;var dk={usingClientEntryPoint:!1,Events:[Yi,Jr,ao,Nf,Tf,yu]},fs={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hk={bundleType:fs.bundleType,version:fs.version,rendererPackageName:fs.rendererPackageName,rendererConfig:fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:$.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Of(r),r===null?null:r.stateNode},findFiberByHostInstance:fs.findFiberByHostInstance||ck,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ko=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ko.isDisabled&&Ko.supportsFiber)try{Vs=Ko.inject(hk),wn=Ko}catch{}}return Ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dk,Ft.createPortal=function(r,s){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bu(s))throw Error(n(200));return uk(r,s,null,u)},Ft.createRoot=function(r,s){if(!bu(r))throw Error(n(299));var u=!1,d="",g=ap;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Cu(r,1,!1,null,null,u,!1,d,g),r[In]=s.current,qi(r.nodeType===8?r.parentNode:r),new Eu(s)},Ft.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Of(s),r=r===null?null:r.stateNode,r},Ft.flushSync=function(r){return br(r)},Ft.hydrate=function(r,s,u){if(!Wo(s))throw Error(n(200));return Ho(null,r,s,!0,u)},Ft.hydrateRoot=function(r,s,u){if(!bu(r))throw Error(n(405));var d=u!=null&&u.hydratedSources||null,g=!1,y="",x=ap;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(x=u.onRecoverableError)),s=op(s,null,r,1,u??null,g,!1,y,x),r[In]=s.current,qi(r),d)for(r=0;r<d.length;r++)u=d[r],g=u._getVersion,g=g(u._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[u,g]:s.mutableSourceEagerHydrationData.push(u,g);return new Go(s)},Ft.render=function(r,s,u){if(!Wo(s))throw Error(n(200));return Ho(null,r,s,!1,u)},Ft.unmountComponentAtNode=function(r){if(!Wo(r))throw Error(n(40));return r._reactRootContainer?(br(function(){Ho(null,null,r,!1,function(){r._reactRootContainer=null,r[In]=null})}),!0):!1},Ft.unstable_batchedUpdates=yu,Ft.unstable_renderSubtreeIntoContainer=function(r,s,u,d){if(!Wo(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Ho(r,s,u,!1,d)},Ft.version="18.3.1-next-f1338f8080-20240426",Ft}var yp;function sg(){if(yp)return Tu.exports;yp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Tu.exports=kk(),Tu.exports}var wp;function xk(){if(wp)return qo;wp=1;var e=sg();return qo.createRoot=e.createRoot,qo.hydrateRoot=e.hydrateRoot,qo}var Sk=xk();class Or extends Error{constructor(t){super(t),this.name="TargetKeyError"}}function Lu(e){return!(!e||e.length>256||e.startsWith("-")||e.startsWith(".")||/[\s\0]/.test(e)||e.includes(".."))}function vp(e){if(e==="working"||e==="staged"||e==="all")return{kind:e};if(e.startsWith("commit:")){const t=e.slice(7);if(!Lu(t))throw new Or(`invalid commit ref: ${t}`);return{kind:"commit",sha:t}}if(e.startsWith("range:")){const t=e.slice(6),n=t.indexOf("..");if(n<=0)throw new Or(`invalid range: ${t}`);const i=t.slice(0,n),o=t.slice(n+2);if(!Lu(i)||!Lu(o))throw new Or(`invalid range refs: ${t}`);return{kind:"range",base:i,head:o}}throw new Or(`unknown target key: ${e}`)}function dl(e){if(typeof e!="string"||!e)throw new Or("empty target key");if(e.startsWith("worktree:")){const t=e.slice(9),n=/^(.+):(working|staged|all|commit:.+|range:.+)$/.exec(t);if(!n||!n[1]||!n[2])throw new Or(`invalid worktree target key: ${e}`);const i=n[1];if(!i.startsWith("/"))throw new Or(`worktree path must be absolute: ${i}`);return{...vp(n[2]),worktree:i}}return vp(e)}function zn(e){let t;switch(e.kind){case"working":case"staged":case"all":t=e.kind;break;case"commit":t=`commit:${e.sha}`;break;case"range":t=`range:${e.base}..${e.head}`;break}return e.worktree?`worktree:${e.worktree}:${t}`:t}function og(e){let t;switch(e.kind){case"working":t="Working tree";break;case"staged":t="Staged";break;case"all":t="Working tree vs HEAD";break;case"commit":t=`Commit ${e.sha.length>12?e.sha.slice(0,8):e.sha}`;break;case"range":t=`${e.base}..${e.head}`;break}return e.worktree?`[${e.worktree.split("/").filter(Boolean).pop()??e.worktree}] ${t}`:t}function Dn(e){try{return dl(e)}catch{return}}function dr(e){return e.kind==="working"||e.kind==="staged"||e.kind==="all"}function yc(e){const t=Dn(e);return!t||!dr(t)?e:t.worktree?`worktree:${t.worktree}:local`:"local"}function Ck(e){const t=Dn(e),n=t?.worktree?{worktree:t.worktree}:{};return[zn({kind:"working",...n}),zn({kind:"staged",...n}),zn({kind:"all",...n})]}const kp=e=>{let t;const n=new Set,i=(h,p)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const w=t;t=p??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,w))}},o=()=>t,c={setState:i,getState:o,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(i,o,c);return c},_k=(e=>e?kp(e):kp),Ek=e=>e;function bk(e,t=Ek){const n=vs.useSyncExternalStore(e.subscribe,vs.useCallback(()=>t(e.getState()),[e,t]),vs.useCallback(()=>t(e.getInitialState()),[e,t]));return vs.useDebugValue(n),n}const xp=e=>{const t=_k(e),n=i=>bk(t,i);return Object.assign(n,t),n},Ik=(e=>e?xp(e):xp);class Hc extends Error{constructor(t,n,i){super(t),this.status=n,this.code=i,this.name="ApiError"}status;code}async function He(e,t,n){const i=await fetch(t,{method:e,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}),o=await i.text();let l=null;if(o)try{l=JSON.parse(o)}catch{l=null}if(!i.ok){const a=l??{};throw new Hc(a.error??`${i.status} ${i.statusText}`,i.status,a.code)}return l}const xt=encodeURIComponent,hi=e=>{const t=[];for(const[n,i]of Object.entries(e))i===void 0||i===""||i===!1||t.push(`${xt(n)}=${xt(i===!0?"1":String(i))}`);return t.length?`?${t.join("&")}`:""},$e={repo:()=>He("GET","/api/repo"),state:()=>He("GET","/api/state"),patchPrefs:e=>He("PATCH","/api/prefs",e),files:e=>He("GET",`/api/targets/${xt(e)}/files`),file:(e,t,n={})=>He("GET",`/api/targets/${xt(e)}/file${hi({path:t,old:n.oldPath,untracked:n.untracked})}`),fullFile:(e,t,n)=>He("GET",`/api/targets/${xt(e)}/file/full${hi({path:t,side:n})}`),setViewed:(e,t,n,i)=>He("PUT",`/api/targets/${xt(e)}/viewed`,{path:t,viewed:n,contentHash:i}),createComment:(e,t)=>He("POST",`/api/targets/${xt(e)}/comments`,t),updateComment:(e,t,n)=>He("PATCH",`/api/targets/${xt(e)}/comments/${xt(t)}`,n),deleteComment:(e,t)=>He("DELETE",`/api/targets/${xt(e)}/comments/${xt(t)}`),reanchor:(e,t)=>He("POST",`/api/targets/${xt(e)}/comments/reanchor`,{files:t}),exportComments:e=>He("POST","/api/comments/export",{commentIds:e}),issues:()=>He("GET","/api/issues"),createIssue:e=>He("POST","/api/issues",e),updateIssue:(e,t)=>He("PATCH",`/api/issues/${xt(e)}`,t),deleteIssue:e=>He("DELETE",`/api/issues/${xt(e)}`),exportIssue:e=>He("POST",`/api/issues/${xt(e)}/export`),todos:e=>He("GET",`/api/todos${hi({branch:e})}`),createTodo:e=>He("POST","/api/todos",e),updateTodo:(e,t)=>He("PATCH",`/api/todos/${xt(e)}`,t),deleteTodo:e=>He("DELETE",`/api/todos/${xt(e)}`),exportTodos:e=>He("POST","/api/todos/export",e),events:e=>new EventSource(`/api/events${hi({root:e})}`),commits:e=>He("GET",`/api/commits${hi(e)}`),nvimInstances:(e,t=!1)=>He("GET",`/api/nvim/instances${hi({root:e,rescan:t})}`),nvimSelect:(e,t)=>He("POST","/api/nvim/select",{root:e,socket:t}),nvimOpen:(e,t,n)=>He("POST","/api/nvim/open",{socket:e,absPath:t,line:n})};async function Ru(e){if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(e);return}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();try{if(!document.execCommand("copy"))throw new Error("copy command failed")}finally{document.body.removeChild(t)}}function Kc(e,t){return e?e.worktrees.find(n=>n.path===t)?.branch??e.branch:""}let Nk=0,ju=null;function Qo(e){return e instanceof Hc||e instanceof Error?e.message:String(e)}const W=Ik((e,t)=>{const n=a=>t().showToast(Qo(a),"error"),i=a=>{const c=t();if(a===c.targetKey)return c.files;const f=Dn(a);return!f||!dr(f)?[]:f.kind==="working"?c.unstaged:f.kind==="staged"?c.staged:c.allFiles},o=(a,c,f)=>{const h=Dn(a),p=h&&dr(h)?h.kind:null,m=w=>w.map(v=>v.path===c?{...v,...f}:v);e(w=>({...p==="working"?{unstaged:m(w.unstaged)}:{},...p==="staged"?{staged:m(w.staged)}:{},...p==="all"?{allFiles:m(w.allFiles)}:{},...a===w.targetKey?{files:m(w.files)}:{}}))},l=async a=>{const{targetKey:c,files:f}=t(),h=f.find(p=>p.path===a);e(p=>({diffs:{...p.diffs,[a]:{status:"loading"}}}));try{const p=await $e.file(c,a,{oldPath:h?.oldPath,untracked:h?.untracked});return t().targetKey!==c?void 0:(e(m=>({diffs:{...m.diffs,[a]:{status:"ok",diff:p}}})),p)}catch(p){if(t().targetKey!==c)return;e(m=>({diffs:{...m.diffs,[a]:{status:"error",message:Qo(p)}}}));return}};return{repo:null,initError:null,prefs:{viewMode:"unified",nvimSocketByRoot:{},autoRefresh:!0},targetKey:"working",root:"",files:[],unstaged:[],staged:[],allFiles:[],filesLoading:!1,filesError:null,activeFile:null,diffs:{},comments:[],issues:[],todos:[],allComments:[],nvim:null,nvimScanning:!1,panel:"diff",includeExported:!1,selectedCommentIds:[],jumpTo:null,toast:null,reattaching:null,refreshNonce:0,refreshing:!1,refreshPending:!1,lastRefreshAt:null,restoreScroll:!1,editor:null,focusedCommentId:null,railFilter:"file",async init(){try{const[a,c]=await Promise.all([$e.repo(),$e.state()]);e({repo:a,prefs:c.prefs,issues:c.issues,todos:c.todos,root:a.root}),await t().setTarget(a.defaultTarget||"working")}catch(a){e({initError:Qo(a)})}},async setTarget(a){e({targetKey:a,files:[],unstaged:[],staged:[],allFiles:[],diffs:{},activeFile:null,comments:[],filesError:null,selectedCommentIds:[],reattaching:null,panel:"diff",editor:null,focusedCommentId:null}),$e.patchPrefs({lastTarget:a}).catch(()=>{}),await t().loadFiles()},async switchView(a,c){const f=Dn(a);if(!f||!dr(f)){await t().setTarget(a);return}const{unstaged:h,staged:p,allFiles:m}=t(),w=c!==void 0?c:t().activeFile,v=f.kind==="working"?h:f.kind==="staged"?p:m;e({targetKey:a,files:v,diffs:{},filesError:null,activeFile:w}),$e.patchPrefs({lastTarget:a}).catch(()=>{}),f.kind==="all"&&await t().loadFiles(),w&&t().files.some(k=>k.path===w)&&await l(w)},async loadFiles(){const a=t().targetKey,c=Dn(a);e({filesLoading:!0,filesError:null});try{await $e.reanchor(a).catch(()=>{});const f=p=>t().activeFile&&p.some(m=>m.path===t().activeFile)?t().activeFile:null;if(c&&dr(c)){const[p,m]=Ck(a),[w,v,k]=await Promise.all([$e.files(p),$e.files(m),c.kind==="all"?$e.files(a):Promise.resolve(null)]);if(t().targetKey!==a)return;const b=c.kind==="working"?w.files:c.kind==="staged"?v.files:k.files,E=k??w;e({unstaged:w.files,staged:v.files,allFiles:k?.files??[],files:b,root:E.root,comments:E.comments,filesLoading:!1,activeFile:f(b)}),E.root!==t().nvim?.root&&t().scanNvim();return}const h=await $e.files(a);if(t().targetKey!==a)return;e({files:h.files,unstaged:[],staged:[],allFiles:[],root:h.root,comments:h.comments,filesLoading:!1,activeFile:f(h.files)}),h.root!==t().nvim?.root&&t().scanNvim()}catch(f){if(t().targetKey!==a)return;e({filesLoading:!1,filesError:Qo(f),files:[]})}},async refresh(){if(t().refreshing){e({refreshPending:!0});return}const{activeFile:a}=t();e({refreshing:!0,restoreScroll:!0,diffs:{},refreshNonce:t().refreshNonce+1});try{await t().loadFiles(),a&&t().files.some(c=>c.path===a)&&await l(a),e({lastRefreshAt:new Date().toISOString()})}finally{e({refreshing:!1})}t().refreshPending&&(e({refreshPending:!1}),await t().refresh())},onRepoChanged(a){const c=t().root;e(f=>{if(!f.repo)return{};const h=f.repo.worktrees.map(m=>m.path===c?{...m,head:a.head,branch:a.branch}:m),p=c===f.repo.root;return{repo:{...f.repo,worktrees:h,...p?{head:a.head,branch:a.branch}:{}}}}),t().prefs.autoRefresh&&t().refresh()},setAutoRefresh(a){e(c=>({prefs:{...c.prefs,autoRefresh:a}})),$e.patchPrefs({autoRefresh:a}).catch(n)},consumeRestoreScroll(){return t().restoreScroll?(e({restoreScroll:!1}),!0):!1},async openFile(a,c=!1){e({activeFile:a,panel:"diff"});const f=t().diffs[a];!c&&f&&f.status!=="error"||await l(a)},setActiveFile(a){e({activeFile:a}),a&&t().openFile(a)},setViewMode(a){e(c=>({prefs:{...c.prefs,viewMode:a}})),$e.patchPrefs({viewMode:a}).catch(n)},async toggleViewed(a,c){const f=c??t().targetKey,h=i(f).find(m=>m.path===a);if(!h)return;const p=!h.viewed;o(f,a,{viewed:p,changed:!1});try{await $e.setViewed(f,a,p,h.contentHash)}catch(m){n(m),o(f,a,{viewed:!p})}},async createComment(a){try{const c=await $e.createComment(t().targetKey,a);return e(f=>({comments:[...f.comments,c],editor:null,focusedCommentId:c.id})),c}catch(c){n(c);return}},async updateComment(a,c){try{const f=await $e.updateComment(t().targetKey,a,c);return e(h=>({comments:h.comments.map(p=>p.id===a?f:p),reattaching:h.reattaching===a?null:h.reattaching})),f}catch(f){n(f);return}},async deleteComment(a){try{await $e.deleteComment(t().targetKey,a),e(c=>({comments:c.comments.filter(f=>f.id!==a),selectedCommentIds:c.selectedCommentIds.filter(f=>f!==a),focusedCommentId:c.focusedCommentId===a?null:c.focusedCommentId,issues:c.issues.map(f=>f.commentIds.includes(a)?{...f,commentIds:f.commentIds.filter(h=>h!==a)}:f)}))}catch(c){n(c)}},async exportComments(a){if(a.length===0){t().showToast("没有可复制的评论");return}try{const c=await $e.exportComments(a);await Ru(c.text);const f=new Date().toISOString();e(h=>({comments:h.comments.map(p=>c.commentIds.includes(p.id)?{...p,status:p.status==="active"?"exported":p.status,exportedAt:f}:p)})),t().showToast(`已复制 ${c.count} 条评论到剪贴板`)}catch(c){n(c)}},async copyAllComments(){const{comments:a,includeExported:c}=t(),f=a.filter(h=>h.status==="active"||c&&h.status==="exported").map(h=>h.id);await t().exportComments(f)},async loadIssues(){try{const a=await $e.state(),c=Object.values(a.targets).flatMap(f=>f.comments);e({issues:a.issues,allComments:c})}catch(a){n(a)}},async createIssue(a){try{const c=await $e.createIssue(a);return e(f=>({issues:[...f.issues,c],selectedCommentIds:[]})),t().showToast(`已创建 Issue「${c.title}」`),c}catch(c){n(c);return}},async updateIssue(a,c){try{const f=await $e.updateIssue(a,c);e(h=>({issues:h.issues.map(p=>p.id===a?f:p)}))}catch(f){n(f)}},async deleteIssue(a){try{await $e.deleteIssue(a),e(c=>({issues:c.issues.filter(f=>f.id!==a)}))}catch(c){n(c)}},async exportIssue(a){try{const c=await $e.exportIssue(a);await Ru(c.text);const f=new Date().toISOString();e(h=>({comments:h.comments.map(p=>c.commentIds.includes(p.id)?{...p,status:p.status==="active"?"exported":p.status,exportedAt:f}:p)})),t().showToast(`已复制 Issue(含 ${c.count} 条评论)到剪贴板`)}catch(c){n(c)}},async scanNvim(a=!1){const c=t().root||t().repo?.root;if(c){e({nvimScanning:!0});try{const f=await $e.nvimInstances(c,a);e({nvim:f,nvimScanning:!1})}catch(f){e({nvimScanning:!1}),n(f)}}},async selectNvim(a){const c=t().root;e(f=>f.nvim?{nvim:{...f.nvim,selected:a}}:{});try{await $e.nvimSelect(c,a)}catch(f){n(f)}},async openInNvim(a,c){const{nvim:f,root:h}=t(),p=f?.selected;if(!p){t().showToast(f&&f.instances.length>1?"请先在顶部选择一个 nvim 实例":"未发现在此仓库打开的 nvim","error");return}const m=`${h.replace(/\/+$/,"")}/${a}`;try{await $e.nvimOpen(p,m,c)}catch(w){n(w),w instanceof Hc&&w.code==="nvim_gone"&&t().scanNvim(!0)}},setPanel(a){e({panel:a}),a==="issues"&&t().loadIssues(),a==="todos"&&t().loadTodos()},setIncludeExported(a){e({includeExported:a})},toggleSelectComment(a){e(c=>({selectedCommentIds:c.selectedCommentIds.includes(a)?c.selectedCommentIds.filter(f=>f!==a):[...c.selectedCommentIds,a]}))},clearSelectedComments(){e({selectedCommentIds:[]})},async jumpToComment(a){a.targetKey!==t().targetKey&&await t().switchView(a.targetKey),e({panel:"diff"}),await t().openFile(a.filePath),e({jumpTo:{file:a.filePath,side:a.side,line:a.endLine,nonce:Date.now()}})},setReattaching(a){e({reattaching:a,editor:a?null:t().editor}),a&&t().showToast("在 diff 中点击或拖选行,将评论重新附着到该位置")},setEditor(a){e({editor:a,focusedCommentId:a?null:t().focusedCommentId})},async focusComment(a,c=!0){if(e({focusedCommentId:a}),!a||!c)return;const f=t().comments.find(h=>h.id===a)??t().allComments.find(h=>h.id===a);!f||f.status==="orphaned"||await t().jumpToComment(f)},setRailFilter(a){e({railFilter:a})},async loadTodos(){try{const a=await $e.todos();e({todos:a.todos})}catch(a){n(a)}},async createTodo(a){try{const c=await $e.createTodo({...a,root:a.root??t().root});return e(f=>({todos:[...f.todos,c]})),c}catch(c){n(c);return}},async updateTodo(a,c){try{const f=await $e.updateTodo(a,c);e(h=>({todos:h.todos.map(p=>p.id===a?f:p)}))}catch(f){n(f)}},async deleteTodo(a){try{await $e.deleteTodo(a),e(c=>({todos:c.todos.filter(f=>f.id!==a)}))}catch(c){n(c)}},async exportTodos(a){const c=Kc(t().repo,t().root);try{const f=await $e.exportTodos({branch:c,includeDone:a});if(f.count===0){t().showToast(`分支 ${c} 没有可导出的 Todo`);return}await Ru(f.text),t().showToast(`已复制 ${f.count} 条 Todo 到剪贴板`)}catch(f){n(f)}},showToast(a,c="info"){const f=++Nk;e({toast:{id:f,message:a,kind:c}}),ju&&clearTimeout(ju),ju=setTimeout(()=>{t().toast?.id===f&&e({toast:null})},c==="error"?6e3:3e3)}}});function Tk(){const e=W(a=>a.nvim),t=W(a=>a.nvimScanning),n=W(a=>a.scanNvim),i=W(a=>a.selectNvim),o=e?.instances??[];let l;if(!e)l=C.jsx("span",{className:"muted",children:"nvim: 未扫描"});else if(!e.nvimAvailable)l=C.jsx("span",{className:"muted",title:"PATH 中找不到 nvim 可执行文件",children:"nvim 不可用"});else if(o.length===0)l=C.jsx("span",{className:"muted",children:"未发现在此仓库打开的 nvim"});else if(o.length===1){const a=o[0];l=C.jsxs("span",{className:"nvim-one",title:`${a.socket}
|
|
10
|
+
cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",{value:e.selected??"",onChange:a=>{i(a.target.value)},title:"多个 nvim 实例,请选择跳转目标",children:[!e.selected&&C.jsx("option",{value:"",children:"选择 nvim…"}),o.map(a=>C.jsxs("option",{value:a.socket,children:["nvim",a.pid?` #${a.pid}`:""," — ",a.cwd]},a.socket))]});return C.jsxs("div",{className:"nvim",children:[l,C.jsx("button",{className:"icon",onClick:()=>{n(!0)},disabled:t,title:"重新扫描 nvim 实例",children:t?"…":"⟳"})]})}function Ak(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Pk(){const e=W(U=>U.repo),t=W(U=>U.targetKey),n=W(U=>U.setTarget),i=W(U=>U.switchView),o=W(U=>U.refresh),l=W(U=>U.filesLoading),a=W(U=>U.prefs.autoRefresh),c=W(U=>U.setAutoRefresh),f=W(U=>U.lastRefreshAt),h=W(U=>U.todos),p=W(U=>U.root),m=W(U=>U.prefs.viewMode),w=W(U=>U.setViewMode),v=W(U=>U.panel),k=W(U=>U.setPanel),b=W(U=>U.issues),E=te.useMemo(()=>dl(t),[t]),[S,I]=te.useState(E.kind),[A,$]=te.useState(E.worktree??""),[P,L]=te.useState(E.kind==="commit"?E.sha:""),[Q,oe]=te.useState(E.kind==="range"?E.base:"@"),[ue,D]=te.useState(E.kind==="range"?E.head:""),[ne,re]=te.useState(t);ne!==t&&(re(t),I(E.kind),$(E.worktree??""),E.kind==="commit"&&L(E.sha),E.kind==="range"&&(oe(E.base),D(E.head)));const fe=(U={})=>{const _=U.kind??S,O=U.worktree??A,G=O?{worktree:O}:{};let N;if(_==="commit"){const Ce=(U.sha??P).trim();if(!Ce)return;N={kind:"commit",sha:Ce,...G}}else if(_==="range"){const Ce=(U.base??Q).trim()||"@",ye=(U.head??ue).trim();if(!ye)return;N={kind:"range",base:Ce,head:ye,...G}}else N={kind:_,...G};const pe=zn(N);pe!==t&&(dr(N)&&yc(pe)===yc(t)?i(pe):n(pe))},ie=E.kind==="commit"||E.kind==="range"||!!E.worktree,Y=Kc(e,p),ge=b.filter(U=>U.status==="open").length,me=h.filter(U=>U.branch===Y&&U.status==="open").length,Z=e.worktrees.filter(U=>U.path!==e.root);return C.jsxs("header",{className:"topbar",children:[C.jsxs("div",{className:"brand",title:e.root,children:[C.jsx("span",{className:"logo",children:"warden"}),C.jsx("span",{className:"repo-name",children:e.root.split("/").filter(Boolean).pop()}),C.jsx("span",{className:"branch",children:e.branch})]}),C.jsxs("div",{className:"target-switcher",children:[Z.length>0&&C.jsxs("select",{value:A,title:"Worktree",onChange:U=>{$(U.target.value),fe({worktree:U.target.value})},children:[C.jsxs("option",{value:"",children:["主仓库 (",e.branch,")"]}),Z.map(U=>C.jsxs("option",{value:U.path,children:["worktree: ",U.path.split("/").filter(Boolean).pop()," (",U.branch??U.head.slice(0,7),")"]},U.path))]}),C.jsxs("select",{value:S,title:t,onChange:U=>{const _=U.target.value;I(_),(_==="working"||_==="staged"||_==="all")&&fe({kind:_})},children:[C.jsx("option",{value:"working",children:"工作区未提交"}),C.jsx("option",{value:"staged",children:"已 staged"}),C.jsx("option",{value:"all",children:"工作区全部 (vs HEAD)"}),C.jsx("option",{value:"commit",children:"单个 commit"}),C.jsx("option",{value:"range",children:"两个 ref 对比"})]}),S==="commit"&&C.jsxs("form",{className:"inline-form",onSubmit:U=>{U.preventDefault(),fe()},children:[C.jsx("input",{value:P,onChange:U=>L(U.target.value),placeholder:"sha / ref",spellCheck:!1}),C.jsx("button",{type:"submit",children:"查看"})]}),S==="range"&&C.jsxs("form",{className:"inline-form",onSubmit:U=>{U.preventDefault(),fe()},children:[C.jsx("input",{value:Q,onChange:U=>oe(U.target.value),placeholder:"base (@ = HEAD)",spellCheck:!1}),C.jsx("span",{children:".."}),C.jsx("input",{value:ue,onChange:U=>D(U.target.value),placeholder:"head",spellCheck:!1}),C.jsx("button",{type:"submit",children:"对比"})]}),ie&&C.jsx("span",{className:"target-label",title:t,children:og(E)})]}),C.jsx("div",{className:"spacer"}),C.jsxs("div",{className:"actions",children:[C.jsxs("div",{className:"seg",children:[C.jsx("button",{className:v==="commits"?"active":"",onClick:()=>k(v==="commits"?"diff":"commits"),title:"历史 commit",children:"Commits"}),C.jsxs("button",{className:v==="issues"?"active":"",onClick:()=>k(v==="issues"?"diff":"issues"),title:"本地 Issue",children:["Issues",ge?` (${ge})`:""]}),C.jsxs("button",{className:v==="todos"?"active":"",onClick:()=>k(v==="todos"?"diff":"todos"),title:`${Y} 分支的 Todo`,children:["Todos",me?` (${me})`:""]})]}),C.jsxs("div",{className:"seg",children:[C.jsx("button",{className:m==="unified"?"active":"",onClick:()=>w("unified"),children:"Unified"}),C.jsx("button",{className:m==="split"?"active":"",onClick:()=>w("split"),children:"Split"})]}),C.jsx(Tk,{}),C.jsxs("div",{className:"seg",children:[C.jsx("button",{onClick:()=>{o()},disabled:l,title:f?`上次刷新 ${Ak(f)}(r)`:"刷新 (r)",children:l?"刷新中…":"刷新"}),C.jsx("button",{className:a?"active":"","aria-pressed":a,"aria-label":"自动刷新",onClick:()=>c(!a),title:`仓库发生变化时自动刷新(当前${a?"开启":"关闭"})`,children:"自动"})]})]})]})}function lg(e,t,n){const i=[];let o=0;const l=[...e.dirs.keys()].sort((a,c)=>a.localeCompare(c));for(const a of l){let c=lg(e.dirs.get(a),a,n?`${n}/${a}`:a);for(;c.children.length===1&&c.children[0].kind==="dir";){const f=c.children[0];c={...f,name:`${c.name}/${f.name}`}}o+=c.fileCount,i.push(c)}for(const a of[...e.files].sort((c,f)=>c.path.localeCompare(f.path)))i.push({kind:"file",name:a.path.split("/").pop()??a.path,path:a.path,entry:a}),o++;return{kind:"dir",name:t,path:n,children:i,fileCount:o}}function Lk(e){const t={dirs:new Map,files:[]};for(const n of e){const i=n.path.split("/");let o=t;for(let l=0;l<i.length-1;l++){const a=i[l];let c=o.dirs.get(a);c||(c={dirs:new Map,files:[]},o.dirs.set(a,c)),o=c}o.files.push(n)}return lg(t,"","")}function qc(e,t=[]){for(const n of e.children)n.kind==="dir"&&(t.push(n.path),qc(n,t));return t}const Rk={added:"A",modified:"M",deleted:"D",renamed:"R"};function ag({node:e,depth:t,view:n}){const i=W(m=>m.activeFile===e.path&&m.targetKey===n),o=W(m=>m.targetKey===n),l=W(m=>m.openFile),a=W(m=>m.switchView),c=W(m=>m.toggleViewed),f=W(m=>m.comments.filter(w=>w.filePath===e.path&&w.targetKey===n).length),h=e.entry,p=async()=>{o||await a(n,e.path),await l(e.path)};return C.jsxs("div",{className:`tree-row file ${i?"active":""} ${h.viewed?"viewed":""}`,style:{paddingLeft:8+t*14},onClick:()=>{p()},title:h.oldPath?`${h.oldPath} → ${h.path}`:h.path,children:[C.jsx("input",{type:"checkbox",className:"viewed-box",checked:h.viewed,onClick:m=>m.stopPropagation(),onChange:()=>{c(e.path,n)},title:"标记为已查看"}),C.jsx("span",{className:`status status-${h.status}`,children:Rk[h.status]}),C.jsx("span",{className:"name",children:e.name}),h.changed&&C.jsx("span",{className:"changed",title:"文件自上次标记已查看后发生变化",children:"已变化"}),f>0&&C.jsx("span",{className:"cc",title:"评论数",children:f}),C.jsx("span",{className:"counts",children:h.binary?C.jsx("span",{className:"muted",children:"bin"}):C.jsxs(C.Fragment,{children:[C.jsxs("span",{className:"add",children:["+",h.additions]}),C.jsxs("span",{className:"del",children:["-",h.deletions]})]})})]})}function ug({node:e,depth:t,view:n,open:i,toggle:o}){const l=i.has(e.path);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"tree-row dir",style:{paddingLeft:8+t*14},onClick:()=>o(e.path),children:[C.jsx("span",{className:`chev ${l?"open":""}`,children:"▸"}),C.jsx("span",{className:"name",children:e.name}),C.jsx("span",{className:"muted count",children:e.fileCount})]}),l&&e.children.map(a=>a.kind==="dir"?C.jsx(ug,{node:a,depth:t+1,view:n,open:i,toggle:o},a.path):C.jsx(ag,{node:a,depth:t+1,view:n},a.path))]})}function jk(e,t){const[n,i]=te.useState(new Set),o=W(c=>c.activeFile),l=W(c=>c.targetKey===t);return te.useEffect(()=>{!o||!l||i(c=>{const f=new Set(c);for(const h of qc(e))o.startsWith(h+"/")&&f.add(h);return f.size===c.size?c:f})},[o,l,e]),{open:n,setOpen:i,toggle:c=>i(f=>{const h=new Set(f);return h.has(c)?h.delete(c):h.add(c),h})}}function Ou({title:e,view:t,files:n,empty:i}){const o=te.useMemo(()=>Lk(n),[n]),{open:l,setOpen:a,toggle:c}=jk(o,t),f=n.reduce((m,w)=>m+w.additions,0),h=n.reduce((m,w)=>m+w.deletions,0),p=n.filter(m=>m.viewed).length;return C.jsxs("section",{className:"tree-block",children:[C.jsxs("div",{className:"block-head",children:[C.jsx("span",{className:"block-title",children:e}),C.jsx("span",{className:"muted",children:n.length}),C.jsxs("span",{className:"add",children:["+",f]}),C.jsxs("span",{className:"del",children:["-",h]}),C.jsx("span",{className:"spacer"}),n.length>0&&C.jsxs("span",{className:"muted",children:[p,"/",n.length," viewed"]}),C.jsxs("span",{className:"tree-tools",children:[C.jsx("button",{className:"link",onClick:()=>a(new Set(qc(o))),title:"展开全部目录",children:"展开"}),C.jsx("button",{className:"link",onClick:()=>a(new Set),title:"折叠全部目录",children:"折叠"})]})]}),C.jsx("div",{className:"tree",children:n.length===0?C.jsx("div",{className:"muted empty",children:i}):o.children.map(m=>m.kind==="dir"?C.jsx(ug,{node:m,depth:0,view:t,open:l,toggle:c},m.path):C.jsx(ag,{node:m,depth:0,view:t},m.path))})]})}function Ok(){const e=W(p=>p.files),t=W(p=>p.unstaged),n=W(p=>p.staged),i=W(p=>p.filesLoading),o=W(p=>p.filesError),l=W(p=>p.targetKey),a=te.useMemo(()=>Dn(l),[l]),c=!!a&&dr(a),f=a?.worktree?{worktree:a.worktree}:{},h=yc(l);return o?C.jsx("aside",{className:"sidebar",children:C.jsx("div",{className:"error-box",children:o})}):c?C.jsxs("aside",{className:"sidebar dual",children:[C.jsx(Ou,{title:"Unstaged",view:zn({kind:"working",...f}),files:t,empty:i?"加载中…":"没有未暂存的改动"},`${h}:unstaged`),C.jsx(Ou,{title:"Staged",view:zn({kind:"staged",...f}),files:n,empty:i?"加载中…":"暂存区为空"},`${h}:staged`)]}):C.jsx("aside",{className:"sidebar",children:C.jsx(Ou,{title:"改动",view:l,files:e,empty:i?"加载中…":"没有改动"},h)})}var Mk=sg();function Dk(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,l,a){if(typeof l=="string"){const c=l.charCodeAt(0);if(c>=48&&c<=57){const f=+l;if(Number.isInteger(f)&&f>=0&&f<e){let h=o[f];if(!h){const p=t[f*2];h=o[f]={index:f,key:n(f),start:p,size:t[f*2+1],end:p+t[f*2+1],lane:0}}return h}}if(l==="length")return e}return Reflect.get(o,l,a)}})}function pi(e,t,n){let i=n.initialDeps??[],o,l=!0;function a(){const c=e();return(c.length!==i.length||c.some((h,p)=>i[p]!==h))&&(i=c,o=t(...c),n?.onChange&&!(l&&n.skipInitialOnChange)&&n.onChange(o),l=!1),o}return a.updateDeps=c=>{i=c},a}function Sp(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fk=(e,t)=>Math.abs(e-t)<1.01,zk=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let hs;const Mu=()=>{if(hs!==void 0)return hs;if(typeof navigator>"u")return hs=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return hs=!0;const e=navigator.maxTouchPoints;return hs=navigator.platform==="MacIntel"&&e!==void 0&&e>0},Cp=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},$k=e=>e,Bk=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let l=0;l<i;l++)o[l]=t+l;return o},Uk=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=a=>{const{width:c,height:f}=a;t({width:Math.round(c),height:Math.round(f)})};if(o(Cp(n)),!i.ResizeObserver)return()=>{};const l=new i.ResizeObserver(a=>{const c=()=>{const f=a[0];if(f?.borderBoxSize){const h=f.borderBoxSize[0];if(h){o({width:h.inlineSize,height:h.blockSize});return}}o(Cp(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return l.observe(n,{box:"border-box"}),()=>{l.unobserve(n)}},hl={passive:!0},Vk=typeof window>"u"?!0:"onscrollend"in window,Gk=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const l=e.options.useScrollendEvent&&Vk;let a=0;const c=l?null:zk(o,()=>t(a,!1),e.options.isScrollingResetDelay),f=m=>()=>{a=n(i),c?.(),t(a,m)},h=f(!0),p=f(!1);return i.addEventListener("scroll",h,hl),l&&i.addEventListener("scrollend",p,hl),()=>{i.removeEventListener("scroll",h),l&&i.removeEventListener("scrollend",p),c?.cancel()}},Wk=(e,t)=>Gk(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),Hk=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t?.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),l=n.itemSizeCache.get(o);if(l!==void 0)return l}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Kk=(e,{adjustments:t=0,behavior:n},i)=>{var o,l;(l=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||l.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},qk=Kk;class Qk{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(l=>{const a=()=>{const c=l.target,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);for(const[h,p]of this.elementsCache)if(p===c){this.elementsCache.delete(h);break}return}this.isIndexInRange(f)&&this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(c,l,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var l;return(l=i())==null?void 0:l.observe(o,{box:"border-box"})},unobserve:o=>{var l;return(l=i())==null?void 0:l.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const l={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:$k,rangeExtractor:Bk,onChange:()=>{},measureElement:Hk,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const w in n){const v=n[w];v!==void 0&&(l[w]=v)}const a=this.options;let c=null,f=null,h=!1;if(a!==void 0&&a.enabled&&l.enabled&&l.anchorTo==="end"&&this.scrollElement!==null){const w=a.count,v=l.count,k=this.getMeasurements(),b=w>0?((i=k[0])==null?void 0:i.key)??a.getItemKey(0):null,E=w>0?((o=k[w-1])==null?void 0:o.key)??a.getItemKey(w-1):null;if(v!==w||w>0&&v>0&&(l.getItemKey(0)!==b||l.getItemKey(v-1)!==E)){h=!0;const A=w>0?this.getVirtualItemForOffset(this.getScrollOffset())??k[0]:null;A&&(c=[A.key,this.getScrollOffset()-A.start]);const $=l.followOnAppend===!0?"auto":l.followOnAppend||null;$&&v>w&&this.isAtEnd(a.scrollEndThreshold)&&(w===0||l.getItemKey(v-1)!==E)&&(f=$)}}this.options=l,h&&(this.pendingMin=0,this.itemSizeCacheVersion++);let p=!1,m=0;if(c&&this.scrollOffset!==null){const[w,v]=c,k=this.getMeasurements(),{count:b,getItemKey:E}=this.options;let S=0;for(;S<b&&E(S)!==w;)S++;if(S<b){const I=k[S];if(I){const A=Math.max(0,I.start+v);A!==this.scrollOffset&&(m=A-this.scrollOffset,this.scrollOffset=A,p=!0)}}}(p||f)&&(this.pendingScrollAnchor=[p?c[0]:null,p?c[1]:0,f,m])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=pi(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(l=>{this.observer.observe(l)}),this.unsubs.push(this.options.observeElementRect(this,l=>{this.scrollRect=l,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(l,a)=>{if(a&&this._intendedScrollOffset===null&&l===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(l-this._intendedScrollOffset)<1.5&&(l=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(l-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const c=this.getScrollOffset();this.scrollDirection=a?c===l?this.scrollDirection:c<l?"forward":"backward":null,this.scrollOffset=l,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const l=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},c=()=>{this._iosTouching=!1,!(!Mu()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};l.addEventListener("touchstart",a,hl),l.addEventListener("touchend",c,hl),this.unsubs.push(()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchend",c),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[l,a,c,f]=o;l!==null&&!c&&(Mu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?f!==0&&(this._iosDeferredAdjustment+=f):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),c&&this.scrollToEnd({behavior:c})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:n,maxAtWrite:i}=this._clampedAdjustment,o=this.getMaxScrollOffset();o>i+.5&&(this._clampedAdjustment=n>o+.5?{target:n,maxAtWrite:o}:null,this._scrollToOffset(n,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=pi(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,l,a,c,f,h)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=pi(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:l,enabled:a,lanes:c,laneAssignmentMode:f,gap:h},p)=>{const m=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const S of this.laneAssignments.keys())S>=n&&this.laneAssignments.delete(S);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(S=>{this.itemSizeCache.set(S.key,S.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),c===1){const S=n*2;let I=this._flatMeasurements;if(!I||I.length<S){const P=new Float64Array(S);I&&w>0&&P.set(I.subarray(0,w*2)),I=P,this._flatMeasurements=I}let A;if(w===0)A=i+o;else{const P=w-1;A=I[P*2]+I[P*2+1]+h}for(let P=w;P<n;P++){const L=l(P),Q=m.get(L),oe=typeof Q=="number"?Q:this.options.estimateSize(P);I[P*2]=A,I[P*2+1]=oe,A+=oe+h}const $=Dk(n,I,l);return this.measurementsCache=$,$}const v=this.measurementsCache.slice(0,w),k=new Array(c).fill(void 0),b=new Float64Array(c);let E=0;for(let S=0;S<w;S++){const I=v[S];I&&(k[I.lane]===void 0&&E++,k[I.lane]=S,b[I.lane]=I.end)}for(let S=w;S<n;S++){const I=l(S),A=this.laneAssignments.get(S);let $,P;const L=f==="estimate"||m.has(I);if(A!==void 0&&this.options.lanes>1){$=A;const D=k[$],ne=D!==void 0?v[D]:void 0;P=ne?ne.end+h:i+o}else if(E===c){let D=0,ne=b[0],re=k[0];for(let fe=1;fe<c;fe++){const ie=b[fe];(ie<ne||ie===ne&&k[fe]<re)&&(D=fe,ne=ie,re=k[fe])}$=D,P=ne+h,L&&this.laneAssignments.set(S,$)}else $=S%this.options.lanes,P=i+o,L&&this.laneAssignments.set(S,$);const Q=m.get(I),oe=typeof Q=="number"?Q:this.options.estimateSize(S),ue=P+oe;v[S]={index:S,start:P,size:oe,end:ue,key:I,lane:$},k[$]===void 0&&E++,k[$]=S,b[$]=ue}return this.measurementsCache=v,v},{key:!1,debug:()=>this.options.debug}),this.calculateRange=pi(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,l)=>n.length===0||i===0?(this.range=null,null):(this.range=Yk(n,i,o,l,l===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=pi(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,l,a)=>l===null||a===null?[]:n({startIndex:l,endIndex:a,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const l=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,o-l),c=Math.min(this.options.count-1,o+l);return n>=a&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,c)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(c))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),l=this.elementsCache.get(o);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,l;if(!this.isIndexInRange(n))return;let a,c,f;const h=this._flatMeasurements;if(this.options.lanes===1&&h!==null)f=this.options.getItemKey(n),c=h[n*2],a=h[n*2+1];else{const w=this.measurementsCache[n];if(!w)return;f=w.key,c=w.start,a=w.size}const p=this.itemSizeCache.get(f)??a,m=i-p;if(m!==0){const w=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,v=w?this.getTotalSize():0,k=this.getScrollOffset()+this.scrollAdjustments,E=!this.itemSizeCache.has(f)?c<k:c+p<=k&&this.scrollDirection!=="backward",S=((l=this.scrollState)==null?void 0:l.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:f,start:c,size:a,end:c+a,lane:0},m,this):E);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(f,i),this.itemSizeCacheVersion++;let I=!1;w?I=this.applyScrollAdjustment(this.getTotalSize()-v):S&&(I=this.applyScrollAdjustment(m)),this.notify(I),this._retryClampedAdjustment()}},this.getVirtualItems=pi(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let l=0,a=n.length;l<a;l++){const c=n[l],f=i[c];o.push(f)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,l=this.options.lanes===1&&o!=null,a=cg(0,i.length-1,l?c=>o[c*2]:c=>Sp(i[c]).start,n);return Sp(i[a])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const l=this.getSize(),a=this.getScrollOffset();i==="auto"&&(i=n>=a+l?"end":"start"),i==="center"?n+=(o-l)/2:i==="end"&&(n-=l);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),l=this.getScrollOffset(),a=this.measurementsCache[n];if(!a)return;if(i==="auto")if(a.end>=l+o-this.options.scrollPaddingEnd)i="end";else if(a.start<=l+this.options.scrollPaddingStart)i="start";else return[l,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const c=i==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,i,a.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const l=this.getOffsetForAlignment(n,i),a=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:a,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const l=this.getOffsetForIndex(n,i);if(!l)return;const[a,c]=l,f=this.now();this.scrollState={index:n,align:c,behavior:o,startedAt:f,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,l=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const l=i.length-1,a=this._flatMeasurements;a!=null?o=a[l*2]+a[l*2+1]:o=((n=i[l])==null?void 0:n.end)??0}else{const l=Array(this.options.lanes).fill(null);let a=i.length-1;for(;a>=0&&l.some(c=>c===null);){const c=i[a];l[c.lane]===null&&(l[c.lane]=c.end),a--}o=Math.max(...l.filter(c=>c!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){if(t===0)return!1;if(Mu()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=t,!1;{const i=this.getScrollOffset()+this.scrollAdjustments+t,o=this.scrollElement,l=o!==null&&("scrollHeight"in o||"document"in o)?this.getMaxScrollOffset():null;return this._clampedAdjustment=l!==null&&i>l+.5?{target:i,maxAtWrite:l}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,l=1,a=o!==this.scrollState.lastTargetOffset;if(!a&&Fk(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=l){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,a){const c=this.getSize()||600,f=Math.abs(o-this.getScrollOffset()),h=this.scrollState.behavior==="smooth"&&f>c;this.scrollState.lastTargetOffset=o,h||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:h?"smooth":"auto"})}this.scheduleScrollReconcile()}}const cg=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,l=n(o);if(l<i)e=o+1;else if(l>i)t=o-1;else return o}return e>0?e-1:0};function Xk(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,l=e[o*2];if(l<n)i=o+1;else if(l>n)t=o-1;else return o}return i>0?i-1:0}function Yk(e,t,n,i,o){const l=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:l};if(i===1&&o!==null){const h=Xk(o,l,n);let p=h;const m=n+t;for(;p<l&&o[p*2]+o[p*2+1]<m;)p++;return{startIndex:h,endIndex:p}}let c=cg(0,l,h=>e[h].start,n),f=c;if(i===1)for(;f<l&&e[f].end<n+t;)f++;else if(i>1){const h=Array(i).fill(0);for(;f<l&&h.some(m=>m<n+t);){const m=e[f];h[m.lane]=m.end,f++}const p=Array(i).fill(n+t);for(;c>=0&&p.some(m=>m>=n);){const m=e[c];p[m.lane]=m.start,c--}c=Math.max(0,c-c%i),f=Math.min(l,f+(i-1-f%i))}return{startIndex:c,endIndex:f}}const Du=typeof document<"u"?te.useLayoutEffect:te.useEffect;function Jk({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...i}){const o=te.useReducer(p=>p+1,0)[1],l=te.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});l.current.enabled=t,l.current.mode=n;const a=p=>{const m=l.current;if(!m.enabled||!m.container)return;const w=p.getTotalSize();if(w!==m.lastSize){m.lastSize=w;const v=p.options.horizontal?"width":"height";m.container.style[v]=`${w}px`}},c=p=>{const m=l.current;if(!m.enabled||!m.container)return;a(p);const w=!!p.options.horizontal,v=m.mode==="transform",k=w?"left":"top",b=p.options.scrollMargin,E=p.getVirtualItems();for(const S of E){const I=S.start-b,A=p.elementsCache.get(S.key);A&&m.lastPositions.get(A)!==I&&(m.lastPositions.set(A,I),v?A.style.transform=w?`translate3d(${I}px, 0, 0)`:`translate3d(0, ${I}px, 0)`:A.style[k]=`${I}px`)}},f={...i,onChange:(p,m)=>{var w;const v=l.current;let k=!0;if(v.enabled){c(p);const b=p.range,E=v.prevRange;k=!E||E.isScrolling!==p.isScrolling||E.startIndex!==b?.startIndex||E.endIndex!==b?.endIndex,k&&(v.prevRange=b?{startIndex:b.startIndex,endIndex:b.endIndex,isScrolling:p.isScrolling}:null)}k&&(e&&m?Mk.flushSync(o):o()),(w=i.onChange)==null||w.call(i,p,m)}},[h]=te.useState(()=>{const p=new Qk(f);return Object.assign(p,{containerRef:m=>{const w=l.current;if(w.container=m,w.lastSize=null,m&&w.enabled){const v=p.getTotalSize();w.lastSize=v;const k=p.options.horizontal?"width":"height";m.style[k]=`${v}px`}}})});return h.setOptions(f),Du(()=>h._didMount(),[]),Du(()=>(a(h),h._willUpdate())),Du(()=>{c(h)}),h}function Zk(e){return Jk({observeElementRect:Uk,observeElementOffset:Wk,scrollToFn:qk,...e})}function ex(e,t){const n=[],i=e.hunks;if(i.length===0)return n;const o=i[0];n.push({index:0,newFrom:1,newTo:o.newStart-1,oldFrom:1});for(let a=1;a<i.length;a++){const c=i[a-1],f=i[a];n.push({index:a,newFrom:c.newStart+c.newLines,newTo:f.newStart-1,oldFrom:c.oldStart+c.oldLines})}const l=i[i.length-1];return n.push({index:i.length,newFrom:l.newStart+l.newLines,newTo:t,oldFrom:l.oldStart+l.oldLines}),n}function _p(e,t,n){const i={top:[],bottom:[],hidden:e.newTo===null?null:Math.max(0,e.newTo-e.newFrom+1)};if(!n||!t)return i;const o=e.newTo??n.length,l=Math.max(0,o-e.newFrom+1);if(l===0)return{top:[],bottom:[],hidden:0};let a=t.all?l:Math.min(l,t.top),c=t.all?0:Math.min(l-a,t.bottom);a+c>=l&&(a=l,c=0);const f=e.oldFrom-e.newFrom,h=w=>({type:"context",newLineNo:w,oldLineNo:w+f,content:n[w-1]??""}),p=[];for(let w=e.newFrom;w<e.newFrom+a;w++)p.push(h(w));const m=[];for(let w=o-c+1;w<=o;w++)m.push(h(w));return{top:p,bottom:m,hidden:l-a-c}}function tx(e){const t=[];let n=[],i=[];const o=()=>{const l=Math.max(n.length,i.length);for(let a=0;a<l;a++)t.push({left:n[a],right:i[a]});n=[],i=[]};for(const l of e)l.type==="del"?n.push(l):l.type==="add"?i.push(l):(o(),t.push({left:l,right:l}));return o(),t}function nx({diff:e,viewMode:t,expansions:n,fullLines:i}){const o=[],a=e.status!=="deleted"&&e.status!=="added"&&!e.binary?ex(e,i?i.length:null):[],c=(h,p,m)=>{if(t==="unified")for(const w of h)o.push({key:`l:${p}:${w.oldLineNo??"-"}:${w.newLineNo??"-"}`,kind:"line",line:w,hunkIndex:p,expanded:m});else for(const w of tx(h))o.push({key:`p:${p}:${w.left?.oldLineNo??"-"}:${w.right?.newLineNo??"-"}`,kind:"pair",left:w.left,right:w.right,hunkIndex:p,expanded:m})};e.hunks.forEach((h,p)=>{const m=a[p];if(m){const{top:w,bottom:v,hidden:k}=_p(m,n[m.index],i);w.length&&c(w,p-1,!0),(k===null||k>0)&&o.push({key:`g:${m.index}`,kind:"gap",gap:m,hidden:k}),v.length&&c(v,p,!0)}o.push({key:`h:${p}`,kind:"hunk",hunkIndex:p,hunk:h}),c(h.lines,p,!1)});const f=a[e.hunks.length];if(f){const{top:h,hidden:p}=_p(f,n[f.index],i);h.length&&c(h,e.hunks.length-1,!0),(p===null||p>0)&&o.push({key:`g:${f.index}`,kind:"gap",gap:f,hidden:p})}return o}function Ep(e,t,n){return e.findIndex(i=>i.kind==="line"?t==="new"?i.line.newLineNo===n:i.line.oldLineNo===n:i.kind==="pair"?t==="new"?i.right?.newLineNo===n:i.left?.oldLineNo===n:!1)}function rx(e){const t=[];return e.forEach((n,i)=>{n.kind==="hunk"&&t.push(i)}),t}function ix(e){let t=0;for(const n of e.hunks)t+=n.lines.length;return t}const sx="modulepreload",ox=function(e){return"/"+e},bp={},Ae=function(t,n,i){let o=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};var a=h;document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=h(n.map(p=>{if(p=ox(p),p in bp)return;bp[p]=!0;const m=p.endsWith(".css"),w=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${w}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":sx,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((k,b)=>{v.addEventListener("load",k),v.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})};let mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function lx(e){return Qc(e)}function Qc(e){return Array.isArray(e)?ax(e):e instanceof RegExp?e:typeof e=="object"?ux(e):e}function ax(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=Qc(e[n]);return t}function ux(e){let t={};for(let n in e)t[n]=Qc(e[n]);return t}function fg(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function dg(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?dg(e.substring(0,e.length-1)):e.substr(~t+1)}var Fu=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xo=class{static hasCaptures(e){return e===null?!1:(Fu.lastIndex=0,Fu.test(e))}static replaceCaptures(e,t,n){return e.replace(Fu,(i,o,l,a)=>{let c=n[parseInt(o||l,10)];if(c){let f=t.substring(c.start,c.end);for(;f[0]===".";)f=f.substring(1);switch(a){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return i})}};function hg(e,t){return e<t?-1:e>t?1:0}function pg(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let o=0;o<n;o++){let l=hg(e[o],t[o]);if(l!==0)return l}return 0}return n-i}function Ip(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function mg(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var gg=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},pl=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(dx(e),t)}static createFromParsedTheme(e,t){return px(e,t)}_cachedMatchRoot=new gg(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(o=>cx(e.parent,o.parentScopes));return i?new yg(i.fontStyle,i.foreground,i.background):null}},zu=class al{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new al(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new al(n,t[i]);return n}push(t){return new al(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function cx(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],o=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],o=!0}for(;e&&!fx(e.scopeName,i);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function fx(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var yg=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function dx(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let o=0,l=t.length;o<l;o++){let a=t[o];if(!a.settings)continue;let c;if(typeof a.scope=="string"){let m=a.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(a.scope)?c=a.scope:c=[""];let f=-1;if(typeof a.settings.fontStyle=="string"){f=0;let m=a.settings.fontStyle.split(" ");for(let w=0,v=m.length;w<v;w++)switch(m[w]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof a.settings.foreground=="string"&&Ip(a.settings.foreground)&&(h=a.settings.foreground);let p=null;typeof a.settings.background=="string"&&Ip(a.settings.background)&&(p=a.settings.background);for(let m=0,w=c.length;m<w;m++){let k=c[m].trim().split(" "),b=k[k.length-1],E=null;k.length>1&&(E=k.slice(0,k.length-1),E.reverse()),n[i++]=new hx(b,E,o,f,h,p)}}return n}var hx=class{constructor(e,t,n,i,o,l){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=o,this.background=l}},It=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(It||{});function px(e,t){e.sort((f,h)=>{let p=hg(f.scope,h.scope);return p!==0||(p=pg(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,i="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(i=f.foreground),f.background!==null&&(o=f.background)}let l=new mx(t),a=new yg(n,l.getId(i),l.getId(o)),c=new yx(new wc(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];c.insert(0,p.scope,p.parentScopes,p.fontStyle,l.getId(p.foreground),l.getId(p.background))}return new pl(l,a,c)}var mx=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},gx=Object.freeze([]),wc=class wg{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,o,l){this.scopeDepth=t,this.parentScopes=n||gx,this.fontStyle=i,this.foreground=o,this.background=l}clone(){return new wg(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,o=t.length;i<o;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),o!==0&&(this.background=o)}},yx=class vc{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,o=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[o]===">"&&o++,!(i>=t.parentScopes.length||o>=n.parentScopes.length);){const l=n.parentScopes[o].length-t.parentScopes[i].length;if(l!==0)return l;i++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),o,l;if(i===-1?(o=t,l=""):(o=t.substring(0,i),l=t.substring(i+1)),this._children.hasOwnProperty(o))return this._children[o].match(l)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(vc._cmpBySpecificity),n}insert(t,n,i,o,l,a){if(n===""){this._doInsertHere(t,i,o,l,a);return}let c=n.indexOf("."),f,h;c===-1?(f=n,h=""):(f=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new vc(this._mainRule.clone(),wc.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,i,o,l,a)}_doInsertHere(t,n,i,o,l){if(n===null){this._mainRule.acceptOverwrite(t,i,o,l);return}for(let a=0,c=this._rulesWithParentScopes.length;a<c;a++){let f=this._rulesWithParentScopes[a];if(pg(f.parentScopes,n)===0){f.acceptOverwrite(t,i,o,l);return}}i===-1&&(i=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),l===0&&(l=this._mainRule.background),this._rulesWithParentScopes.push(new wc(t,n,i,o,l))}},Ci=class nn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=nn.getLanguageId(t),i=nn.getTokenType(t),o=nn.getFontStyle(t),l=nn.getForeground(t),a=nn.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:o,foreground:l,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,i,o,l,a,c){let f=nn.getLanguageId(t),h=nn.getTokenType(t),p=nn.containsBalancedBrackets(t)?1:0,m=nn.getFontStyle(t),w=nn.getForeground(t),v=nn.getBackground(t);return n!==0&&(f=n),i!==8&&(h=i),o!==null&&(p=o?1:0),l!==-1&&(m=l),a!==0&&(w=a),c!==0&&(v=c),(f<<0|h<<8|p<<10|m<<11|w<<15|v<<24)>>>0}};function ml(e,t){const n=[],i=wx(e);let o=i.next();for(;o!==null;){let f=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=i.next()}let h=a();if(n.push({matcher:h,priority:f}),o!==",")break;o=i.next()}return n;function l(){if(o==="-"){o=i.next();const f=l();return h=>!!f&&!f(h)}if(o==="("){o=i.next();const f=c();return o===")"&&(o=i.next()),f}if(Np(o)){const f=[];do f.push(o),o=i.next();while(Np(o));return h=>t(f,h)}return null}function a(){const f=[];let h=l();for(;h;)f.push(h),h=l();return p=>f.every(m=>m(p))}function c(){const f=[];let h=a();for(;h&&(f.push(h),o==="|"||o===",");){do o=i.next();while(o==="|"||o===",");h=a()}return p=>f.some(m=>m(p))}}function Np(e){return!!e&&!!e.match(/[\w\.:]+/)}function wx(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function vg(e){typeof e.dispose=="function"&&e.dispose()}var bs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vx=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},kx=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},xx=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new bs(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new kx;for(const n of e)Sx(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof bs){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Sx(e,t,n,i){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const l=n.lookup(t);e instanceof bs?ul({baseGrammar:l,selfGrammar:o},i):kc(e.ruleName,{baseGrammar:l,selfGrammar:o,repository:o.repository},i);const a=n.injections(e.scopeName);if(a)for(const c of a)i.add(new bs(c))}function kc(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];gl([i],t,n)}}function ul(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&gl(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&gl(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function gl(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const o=i.repository?fg({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&gl(i.patterns,{...t,repository:o},n);const l=i.include;if(!l)continue;const a=kg(l);switch(a.kind){case 0:ul({...t,selfGrammar:t.baseGrammar},n);break;case 1:ul(t,n);break;case 2:kc(a.ruleName,{...t,repository:o},n);break;case 3:case 4:const c=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const f={baseGrammar:t.baseGrammar,selfGrammar:c,repository:o};a.kind===4?kc(a.ruleName,f,n):ul(f,n)}else a.kind===4?n.add(new vx(a.scopeName,a.ruleName)):n.add(new bs(a.scopeName));break}}}var Cx=class{kind=0},_x=class{kind=1},Ex=class{constructor(e){this.ruleName=e}kind=2},bx=class{constructor(e){this.scopeName=e}kind=3},Ix=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function kg(e){if(e==="$base")return new Cx;if(e==="$self")return new _x;const t=e.indexOf("#");if(t===-1)return new bx(e);if(t===0)return new Ex(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new Ix(n,i)}}var Nx=/\\(\d+)/,Tp=/\\(\d+)/g,Tx=-1,xg=-2;var Rs=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xo.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=Xo.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${dg(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Xo.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xo.replaceCaptures(this._contentName,e,t)}},Ax=class extends Rs{retokenizeCapturedWithRuleId;constructor(e,t,n,i,o){super(e,t,n,i),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Px=class extends Rs{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,null),this._match=new Is(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ap=class extends Rs{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o){super(e,t,n,i),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ns,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},xc=class extends Rs{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,o,l,a,c,f,h){super(e,t,n,i),this._begin=new Is(o,this.id),this.beginCaptures=l,this._end=new Is(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},yl=class extends Rs{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,o,l,a,c,f){super(e,t,n,i),this._begin=new Is(o,this.id),this.beginCaptures=l,this.whileCaptures=c,this._while=new Is(a,xg),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ns;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ns,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},Sg=class bt{static createCaptureRule(t,n,i,o,l){return t.registerRule(a=>new Ax(n,a,i,o,l))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new Px(t.$vscodeTextmateLocation,t.id,t.name,t.match,bt._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=fg({},i,t.repository));let l=t.patterns;return typeof l>"u"&&t.include&&(l=[{include:t.include}]),new Ap(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,bt._compilePatterns(l,n,i))}return t.while?new yl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,bt._compileCaptures(t.whileCaptures||t.captures,n,i),bt._compilePatterns(t.patterns,n,i)):new xc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,bt._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,bt._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,bt._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let o=[];if(t){let l=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);c>l&&(l=c)}for(let a=0;a<=l;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const c=parseInt(a,10);let f=0;t[a].patterns&&(f=bt.getCompiledRuleId(t[a],n,i)),o[c]=bt.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,f)}}return o}static _compilePatterns(t,n,i){let o=[];if(t)for(let l=0,a=t.length;l<a;l++){const c=t[l];let f=-1;if(c.include){const h=kg(c.include);switch(h.kind){case 0:case 1:f=bt.getCompiledRuleId(i[c.include],n,i);break;case 2:let p=i[h.ruleName];p&&(f=bt.getCompiledRuleId(p,n,i));break;case 3:case 4:const m=h.scopeName,w=h.kind===4?h.ruleName:null,v=n.getExternalGrammar(m,i);if(v)if(w){let k=v.repository[w];k&&(f=bt.getCompiledRuleId(k,n,v.repository))}else f=bt.getCompiledRuleId(v.repository.$self,n,v.repository);break}}else f=bt.getCompiledRuleId(c,n,i);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof Ap||h instanceof xc||h instanceof yl)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;o.push(f)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Is=class Cg{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let o=0,l=[],a=!1;for(let c=0;c<i;c++)if(t.charAt(c)==="\\"&&c+1<i){const h=t.charAt(c+1);h==="z"?(l.push(t.substring(o,c)),l.push("$(?!\\n)(?<!\\n)"),o=c+2):(h==="A"||h==="G")&&(a=!0),c++}this.hasAnchor=a,o===0?this.source=t:(l.push(t.substring(o,i)),this.source=l.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Nx.test(this.source):this.hasBackReferences=!1}clone(){return new Cg(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(o=>t.substring(o.start,o.end));return Tp.lastIndex=0,this.source.replace(Tp,(o,l)=>mg(i[parseInt(l,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],o=[],l,a,c,f;for(l=0,a=this.source.length;l<a;l++)c=this.source.charAt(l),t[l]=c,n[l]=c,i[l]=c,o[l]=c,c==="\\"&&l+1<a&&(f=this.source.charAt(l+1),f==="A"?(t[l+1]="",n[l+1]="",i[l+1]="A",o[l+1]="A"):f==="G"?(t[l+1]="",n[l+1]="G",i[l+1]="",o[l+1]="G"):(t[l+1]=f,n[l+1]=f,i[l+1]=f,o[l+1]=f),l++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ns=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Pp(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let i=this._items.map(o=>o.resolveAnchors(t,n));return new Pp(e,i,this._items.map(o=>o.ruleId))}},Pp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
11
|
+
`)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},$u=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Lx=class Sc{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new $u(t,8),this._embeddedLanguagesMatcher=new Rx(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Sc._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new $u(0,0);_getBasicScopeAttributes=new gg(t=>{const n=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new $u(n,i)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Sc.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Rx=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,i])=>mg(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Lp=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function _g(e,t,n,i,o,l,a,c){const f=t.content.length;let h=!1,p=-1;if(a){const v=jx(e,t,n,i,o,l);o=v.stack,i=v.linePos,n=v.isFirstLine,p=v.anchorPosition}const m=Date.now();for(;!h;){if(c!==0&&Date.now()-m>c)return new Lp(o,!0);w()}return new Lp(o,!1);function w(){const v=Ox(e,t,n,i,o,p);if(!v){l.produce(o,f),h=!0;return}const k=v.captureIndices,b=v.matchedRuleId,E=k&&k.length>0?k[0].end>i:!1;if(b===Tx){const S=o.getRule(e);l.produce(o,k[0].start),o=o.withContentNameScopesList(o.nameScopesList),ks(e,t,n,o,l,S.endCaptures,k),l.produce(o,k[0].end);const I=o;if(o=o.parent,p=I.getAnchorPos(),!E&&I.getEnterPos()===i){o=I,l.produce(o,f),h=!0;return}}else{const S=e.getRule(b);l.produce(o,k[0].start);const I=o,A=S.getName(t.content,k),$=o.contentNameScopesList.pushAttributed(A,e);if(o=o.push(b,i,p,k[0].end===f,null,$,$),S instanceof xc){const P=S;ks(e,t,n,o,l,P.beginCaptures,k),l.produce(o,k[0].end),p=k[0].end;const L=P.getContentName(t.content,k),Q=$.pushAttributed(L,e);if(o=o.withContentNameScopesList(Q),P.endHasBackReferences&&(o=o.withEndRule(P.getEndWithResolvedBackReferences(t.content,k))),!E&&I.hasSameRuleAs(o)){o=o.pop(),l.produce(o,f),h=!0;return}}else if(S instanceof yl){const P=S;ks(e,t,n,o,l,P.beginCaptures,k),l.produce(o,k[0].end),p=k[0].end;const L=P.getContentName(t.content,k),Q=$.pushAttributed(L,e);if(o=o.withContentNameScopesList(Q),P.whileHasBackReferences&&(o=o.withEndRule(P.getWhileWithResolvedBackReferences(t.content,k))),!E&&I.hasSameRuleAs(o)){o=o.pop(),l.produce(o,f),h=!0;return}}else if(ks(e,t,n,o,l,S.captures,k),l.produce(o,k[0].end),o=o.pop(),!E){o=o.safePop(),l.produce(o,f),h=!0;return}}k[0].end>i&&(i=k[0].end,n=!1)}}function jx(e,t,n,i,o,l){let a=o.beginRuleCapturedEOL?0:-1;const c=[];for(let f=o;f;f=f.pop()){const h=f.getRule(e);h instanceof yl&&c.push({rule:h,stack:f})}for(let f=c.pop();f;f=c.pop()){const{ruleScanner:h,findOptions:p}=Fx(f.rule,e,f.stack.endRule,n,i===a),m=h.findNextMatchSync(t,i,p);if(m){if(m.ruleId!==xg){o=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(l.produce(f.stack,m.captureIndices[0].start),ks(e,t,n,f.stack,l,f.rule.whileCaptures,m.captureIndices),l.produce(f.stack,m.captureIndices[0].end),a=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{o=f.stack.pop();break}}return{stack:o,linePos:i,anchorPosition:a,isFirstLine:n}}function Ox(e,t,n,i,o,l){const a=Mx(e,t,n,i,o,l),c=e.getInjections();if(c.length===0)return a;const f=Dx(c,e,t,n,i,o,l);if(!f)return a;if(!a)return f;const h=a.captureIndices[0].start,p=f.captureIndices[0].start;return p<h||f.priorityMatch&&p===h?f:a}function Mx(e,t,n,i,o,l){const a=o.getRule(e),{ruleScanner:c,findOptions:f}=Eg(a,e,o.endRule,n,i===l),h=c.findNextMatchSync(t,i,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function Dx(e,t,n,i,o,l,a){let c=Number.MAX_VALUE,f=null,h,p=0;const m=l.contentNameScopesList.getScopeNames();for(let w=0,v=e.length;w<v;w++){const k=e[w];if(!k.matcher(m))continue;const b=t.getRule(k.ruleId),{ruleScanner:E,findOptions:S}=Eg(b,t,null,i,o===a),I=E.findNextMatchSync(n,o,S);if(!I)continue;const A=I.captureIndices[0].start;if(!(A>=c)&&(c=A,f=I.captureIndices,h=I.ruleId,p=k.priority,c===o))break}return f?{priorityMatch:p===-1,captureIndices:f,matchedRuleId:h}:null}function Eg(e,t,n,i,o){return{ruleScanner:e.compileAG(t,n,i,o),findOptions:0}}function Fx(e,t,n,i,o){return{ruleScanner:e.compileWhileAG(t,n,i,o),findOptions:0}}function ks(e,t,n,i,o,l,a){if(l.length===0)return;const c=t.content,f=Math.min(l.length,a.length),h=[],p=a[0].end;for(let m=0;m<f;m++){const w=l[m];if(w===null)continue;const v=a[m];if(v.length===0)continue;if(v.start>p)break;for(;h.length>0&&h[h.length-1].endPos<=v.start;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?o.produceFromScopes(h[h.length-1].scopes,v.start):o.produce(i,v.start),w.retokenizeCapturedWithRuleId){const b=w.getName(c,a),E=i.contentNameScopesList.pushAttributed(b,e),S=w.getContentName(c,a),I=E.pushAttributed(S,e),A=i.push(w.retokenizeCapturedWithRuleId,v.start,-1,!1,null,E,I),$=e.createOnigString(c.substring(0,v.end));_g(e,$,n&&v.start===0,v.start,A,o,!1,0),vg($);continue}const k=w.getName(c,a);if(k!==null){const E=(h.length>0?h[h.length-1].scopes:i.contentNameScopesList).pushAttributed(k,e);h.push(new zx(E,v.end))}}for(;h.length>0;)o.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var zx=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function $x(e,t,n,i,o,l,a,c){return new Ux(e,t,n,i,o,l,a,c)}function Rp(e,t,n,i,o){const l=ml(t,wl),a=Sg.getCompiledRuleId(n,i,o.repository);for(const c of l)e.push({debugSelector:t,matcher:c.matcher,ruleId:a,grammar:o,priority:c.priority})}function wl(e,t){if(t.length<e.length)return!1;let n=0;return e.every(i=>{for(let o=n;o<t.length;o++)if(Bx(t[o],i))return n=o+1,!0;return!1})}function Bx(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Ux=class{constructor(e,t,n,i,o,l,a,c){if(this._rootScopeName=e,this.balancedBracketSelectors=l,this._onigLib=c,this._basicScopeAttributesProvider=new Lx(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=jp(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const f of Object.keys(o)){const h=ml(f,wl);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:o[f]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,i=e.lookup(n);if(i){const o=i.injections;if(o)for(let a in o)Rp(t,a,o[a],this,i);const l=this._grammarRepository.injections(n);l&&l.forEach(a=>{const c=this.getExternalGrammar(a);if(c){const f=c.injectionSelector;f&&Rp(t,f,c,this,c)}})}return t.sort((o,l)=>o.priority-l.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=jp(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){const i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){this._rootId===-1&&(this._rootId=Sg.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Cc.NULL){o=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=Ci.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),w=this.getRule(this._rootId).getName(null,null);let v;w?v=xs.createRootAndLookUpScopeName(w,m,this):v=xs.createRoot("unknown",m),t=new Cc(null,this._rootId,-1,-1,!1,null,v,v)}else o=!1,t.reset();e=e+`
|
|
12
|
+
`;const l=this.createOnigString(e),a=l.content.length,c=new Gx(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=_g(this,l,o,0,t,c,!0,i);return vg(l),{lineLength:a,lineTokens:c,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function jp(e,t){return e=lx(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var xs=class Cn{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,o=t?.scopePath??null;for(const l of n)o=zu.push(o,l.scopeNames),i=new Cn(i,o,l.encodedTokenAttributes);return i}static createRoot(t,n){return new Cn(null,new zu(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const o=i.getMetadataForScope(t),l=new zu(null,t),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(n,o,a);return new Cn(null,l,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Cn.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,i){let o=-1,l=0,a=0;return i!==null&&(o=i.fontStyle,l=i.foregroundId,a=i.backgroundId),Ci.set(t,n.languageId,n.tokenType,null,o,l,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Cn._pushAttributed(this,t,n);const i=t.split(/ /g);let o=this;for(const l of i)o=Cn._pushAttributed(o,l,n);return o}static _pushAttributed(t,n,i){const o=i.getMetadataForScope(n),l=t.scopePath.push(n),a=i.themeProvider.themeMatch(l),c=Cn.mergeAttributes(t.tokenAttributes,o,a);return new Cn(t,l,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},Cc=class Lr{constructor(t,n,i,o,l,a,c,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=l,this.endRule=a,this.nameScopesList=c,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new Lr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Lr._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?xs.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Lr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,o,l,a,c){return new Lr(this,t,n,i,o,l,a,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Lr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const i=xs.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Lr(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,xs.fromExtension(i,n.contentNameScopesList))}},Vx=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ml(n,wl).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>ml(n,wl).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Gx=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const l=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(l)&&(i=Ci.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(l))}if(o&&(i=Ci.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let i=0,o=this._binaryTokens.length;i<o;i++)n[i]=this._binaryTokens[i];return n}},Wx=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,o){if(!this._grammars.has(e)){let l=this._rawGrammars.get(e);if(!l)return null;this._grammars.set(e,$x(e,l,t,n,i,o,this,this._onigLib))}return this._grammars.get(e)}},Hx=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Wx(pl.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(pl.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new Vx(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,o,l){const a=new xx(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(c=>this._loadSingleGrammar(c.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,i,o,l)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,o=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,o)}_grammarForScopeName(t,n=0,i=null,o=null,l=null){return this._syncRegistry.grammarForScopeName(t,n,i,o,l)}},_c=Cc.NULL;const Kx=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class js{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}js.prototype.normal={};js.prototype.property={};js.prototype.space=void 0;function bg(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new js(n,i,t)}function Ec(e){return e.toLowerCase()}class $t{constructor(t,n){this.attribute=n,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let qx=0;const be=Br(),lt=Br(),bc=Br(),J=Br(),Ve=Br(),Fr=Br(),Ht=Br();function Br(){return 2**++qx}const Ic=Object.freeze(Object.defineProperty({__proto__:null,boolean:be,booleanish:lt,commaOrSpaceSeparated:Ht,commaSeparated:Fr,number:J,overloadedBoolean:bc,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),Bu=Object.keys(Ic);class Xc extends $t{constructor(t,n,i,o){let l=-1;if(super(t,n),Op(this,"space",o),typeof i=="number")for(;++l<Bu.length;){const a=Bu[l];Op(this,Bu[l],(i&Ic[a])===Ic[a])}}}Xc.prototype.defined=!0;function Op(e,t,n){n&&(e[t]=n)}function Ei(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const l=new Xc(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Ec(i)]=i,n[Ec(l.attribute)]=i}return new js(t,n,e.space)}const Ig=Ei({properties:{ariaActiveDescendant:null,ariaAtomic:lt,ariaAutoComplete:null,ariaBusy:lt,ariaChecked:lt,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:lt,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:lt,ariaFlowTo:Ve,ariaGrabbed:lt,ariaHasPopup:null,ariaHidden:lt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:J,ariaLive:null,ariaModal:lt,ariaMultiLine:lt,ariaMultiSelectable:lt,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:lt,ariaReadOnly:lt,ariaRelevant:null,ariaRequired:lt,ariaRoleDescription:Ve,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:lt,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ng(e,t){return t in e?e[t]:t}function Tg(e,t){return Ng(e,t.toLowerCase())}const Qx=Ei({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fr,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alpha:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Ve,autoFocus:be,autoPlay:be,blocking:Ve,capture:null,charSet:null,checked:be,cite:null,className:Ve,closedBy:null,colorSpace:null,cols:J,colSpan:J,command:null,commandFor:null,content:null,contentEditable:lt,controls:be,controlsList:Ve,coords:J|Fr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:bc,draggable:lt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Ve,height:J,hidden:bc,high:J,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:be,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:be,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,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:be,optimum:J,pattern:null,ping:Ve,placeholder:null,playsInline:be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Ve,required:be,reversed:be,rows:J,rowSpan:J,sandbox:Ve,scope:null,scoped:be,seamless:be,selected:be,shadowRootClonable:be,shadowRootCustomElementRegistry:be,shadowRootDelegatesFocus:be,shadowRootMode:null,shadowRootSerializable:be,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:lt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:lt,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:lt,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:be,disablePictureInPicture:be,disableRemotePlayback:be,exportParts:Fr,part:Ve,prefix:null,property:null,results:J,security:null,unselectable:null},space:"html",transform:Tg}),Xx=Ei({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ht,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:Ve,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:be,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,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:Fr,g2:Fr,glyphName:Fr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:Ht,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,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:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ht,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ht,rev:Ht,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ht,requiredFeatures:Ht,requiredFonts:Ht,requiredFormats:Ht,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:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:Ht,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ht,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ht,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ng}),Ag=Ei({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pg=Ei({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tg}),Lg=Ei({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Yx={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"},Jx=/[A-Z]/g,Mp=/-[a-z]/g,Zx=/^data[-\w.:]+$/i;function Rg(e,t){const n=Ec(t);let i=t,o=$t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zx.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Mp,t0);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Mp.test(l)){let a=l.replace(Jx,e0);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Xc}return new o(i,t)}function e0(e){return"-"+e.toLowerCase()}function t0(e){return e.charAt(1).toUpperCase()}const jg=bg([Ig,Qx,Ag,Pg,Lg],"html"),Os=bg([Ig,Xx,Ag,Pg,Lg],"svg"),Dp={}.hasOwnProperty;function n0(e,t){const n=t||{};function i(o,...l){let a=i.invalid;const c=i.handlers;if(o&&Dp.call(o,e)){const f=String(o[e]);a=Dp.call(c,f)?c[f]:i.unknown}if(a)return a.call(this,o,...l)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const r0=/["&'<>`]/g,i0=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s0=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o0=/[|\\{}()[\]^$+*?.]/g,Fp=new WeakMap;function l0(e,t){if(e=e.replace(t.subset?a0(t.subset):r0,i),t.subset||t.escapeOnly)return e;return e.replace(i0,n).replace(s0,i);function n(o,l,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(l+2),t)}function i(o,l,a){return t.format(o.charCodeAt(0),a.charCodeAt(l+1),t)}}function a0(e){let t=Fp.get(e);return t||(t=u0(e),Fp.set(e,t)),t}function u0(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(o0,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const c0=/[\dA-Fa-f]/;function f0(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!c0.test(String.fromCharCode(t))?i:i+";"}const d0=/\d/;function h0(e,t,n){const i="&#"+String(e);return n&&t&&!d0.test(String.fromCharCode(t))?i:i+";"}const p0=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Uu={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},m0=["cent","copy","divide","gt","lt","not","para","times"],Og={}.hasOwnProperty,Nc={};let Yo;for(Yo in Uu)Og.call(Uu,Yo)&&(Nc[Uu[Yo]]=Yo);const g0=/[^\dA-Za-z]/;function y0(e,t,n,i){const o=String.fromCharCode(e);if(Og.call(Nc,o)){const l=Nc[o],a="&"+l;return n&&p0.includes(l)&&!m0.includes(l)&&(!i||t&&t!==61&&g0.test(String.fromCharCode(t)))?a:a+";"}return""}function w0(e,t,n){let i=f0(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=y0(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){const l=h0(e,t,n.omitOptionalSemicolons);l.length<i.length&&(i=l)}return o&&(!n.useShortestReferences||o.length<i.length)?o:i}function Si(e,t){return l0(e,Object.assign({format:w0},t))}const v0=/^>|^->|<!--|-->|--!>|<!-$/g,k0=[">"],x0=["<",">"];function S0(e,t,n,i){return i.settings.bogusComments?"<?"+Si(e.value,Object.assign({},i.settings.characterReferences,{subset:k0}))+">":"<!--"+e.value.replace(v0,o)+"-->";function o(l){return Si(l,Object.assign({},i.settings.characterReferences,{subset:x0}))}}function C0(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function vl(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(t);for(;o!==-1;)i++,o=n.indexOf(t,o+t.length);return i}function Mg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Dg(e){return e.join(" ").trim()}const _0=/[ \t\n\f\r]/g;function Al(e){return typeof e=="object"?e.type==="text"?zp(e.value):!1:zp(e)}function zp(e){return e.replace(_0,"")===""}const ft=zg(1),Fg=zg(-1),E0=[];function zg(e){return t;function t(n,i,o){const l=n?n.children:E0;let a=(i||0)+e,c=l[a];if(!o)for(;c&&Al(c);)a+=e,c=l[a];return c}}const b0={}.hasOwnProperty;function $g(e){return t;function t(n,i,o){return b0.call(e,n.tagName)&&e[n.tagName](n,i,o)}}const Yc=$g({body:N0,caption:Vu,colgroup:Vu,dd:L0,dt:P0,head:Vu,html:I0,li:A0,optgroup:R0,option:j0,p:T0,rp:$p,rt:$p,tbody:M0,td:Bp,tfoot:D0,th:Bp,thead:O0,tr:F0});function Vu(e,t,n){const i=ft(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&Al(i.value.charAt(0)))}function I0(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function N0(e,t,n){const i=ft(n,t);return!i||i.type!=="comment"}function T0(e,t,n){const i=ft(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function A0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="li"}function P0(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function L0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function $p(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function R0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function j0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function O0(e,t,n){const i=ft(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function M0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function D0(e,t,n){return!ft(n,t)}function F0(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function Bp(e,t,n){const i=ft(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const z0=$g({body:U0,colgroup:V0,head:B0,html:$0,tbody:G0});function $0(e){const t=ft(e,-1);return!t||t.type!=="comment"}function B0(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function U0(e){const t=ft(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Al(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function V0(e,t,n){const i=Fg(n,t),o=ft(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&Yc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function G0(e,t,n){const i=Fg(n,t),o=ft(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&Yc(i,n.children.indexOf(i),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const Jo={name:[[`
|
|
13
13
|
\f\r &/=>`.split(""),`
|
|
14
14
|
\f\r "&'/=>\``.split("")],[`\0
|
|
15
15
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -17,10 +17,10 @@ cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",
|
|
|
17
17
|
\f\r &>`.split(""),`\0
|
|
18
18
|
\f\r "&'<=>\``.split("")],[`\0
|
|
19
19
|
\f\r "&'<=>\``.split(""),`\0
|
|
20
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function W0(e,t,n,i){const o=i.schema,l=o.space==="svg"?!1:i.settings.omitOptionalTags;let a=o.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const c=[];let f;o.space==="html"&&e.tagName==="svg"&&(i.schema=Os);const h=H0(i,e.properties),p=i.all(o.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=o,p&&(a=!1),(h||!l||!z0(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),a&&(o.space==="svg"||i.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!i.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!a&&(!l||!Yc(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function H0(e,t){const n=[];let i=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const l=K0(e,o,t[o]);l&&n.push(l)}}for(;++i<n.length;){const l=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&l!=='"'&&l!=="'"&&(n[i]+=" ")}return n.join("")}function K0(e,t,n){const i=jg(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,l=e.settings.allowDangerousCharacters?0:1;let a=e.quote,c;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=Si(i.attribute,Object.assign({},e.settings.characterReferences,{subset:Jo.name[o][l]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?Dg:Fg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(c=Si(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Jo.unquoted[o][l]}))),c!==n&&(e.settings.quoteSmart&&vl(n,a)>vl(n,e.alternative)&&(a=e.alternative),c=a+Si(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Jo.single:Jo.double)[o][l],attribute:!0}))+a),f+(c&&"="+c))}const q0=["<","&"];function Ug(e,t,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Si(e.value,Object.assign({},i.settings.characterReferences,{subset:q0}))}function Q0(e,t,n,i){return i.settings.allowDangerousHtml?e.value:Ug(e,t,n,i)}function X0(e,t,n,i){return i.all(e)}const Y0=n0("type",{invalid:J0,unknown:Z0,handlers:{comment:S0,doctype:C0,element:W0,raw:Q0,root:X0,text:Ug}});function J0(e){throw new Error("Expected node, not `"+e+"`")}function Z0(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const e1={},t1={},n1=[];function r1(e,t){const n=t||e1,i=n.quote||'"',o=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:i1,all:s1,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Kx,characterReferences:n.characterReferences||t1,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Os:Og,quote:i,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function i1(e,t,n){return Y0(e,t,n,this)}function s1(e){const t=[],n=e&&e.children||n1;let i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}function kl(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[o,l]of Object.entries(t?.colorReplacements||{}))typeof l=="string"?n[o]=l:o===i&&Object.assign(n,l);return n}function hr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function o1(e){return Array.isArray(e)?e:[e]}async function Vg(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function l1(e){return e==="ansi"||Jc(e)}function Zc(e){return e==="none"}function a1(e){return Zc(e)}function Gg(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function Pl(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let i=0;const o=[];for(let l=0;l<n.length;l+=2){const a=t?n[l]+(n[l+1]||""):n[l];o.push([a,i]),i+=n[l].length,i+=n[l+1]?.length||0}return o}function u1(e){const t=Pl(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let l=o,a=0;for(const c of t){if(l<c.length)break;l-=c.length,a++}return{line:a,character:l}}function i(o,l){let a=0;for(let c=0;c<o;c++)a+=t[c].length;return a+=l,a}return{lines:t,indexToPos:n,posToIndex:i}}const ef="light-dark()",c1=["color","background-color"];function f1(e,t){let n=0;const i=[];for(const o of t)o>n&&i.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&i.push({...e,content:e.content.slice(n),offset:e.offset+n}),i}function d1(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((i,o)=>i-o);return n.length?e.map(i=>i.flatMap(o=>{const l=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,c)=>a-c);return l.length?f1(o,l):o})):e}function h1(e,t,n,i,o="css-vars"){const l={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(p=>xl(e.variants[p])),c=new Set(a.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const w=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":w)};return a.forEach((p,m)=>{for(const w of c){const v=p[w]||"inherit";if(m===0&&i&&c1.includes(w))if(i===ef&&a.length>1){const k=t.findIndex(I=>I==="light"),b=t.findIndex(I=>I==="dark");if(k===-1||b===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=a[k][w]||"inherit",S=a[b][w]||"inherit";f[w]=`light-dark(${E}, ${S})`,o==="css-vars"&&(f[h(m,w)]=v)}else f[w]=v;else o==="css-vars"&&(f[h(m,w)]=v)}}),l.htmlStyle=f,l}function xl(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&It.Italic&&(t["font-style"]="italic"),e.fontStyle&It.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&It.Underline&&n.push("underline"),e.fontStyle&It.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Tc(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Wg=new WeakMap;function Ll(e,t){Wg.set(e,t)}function Ts(e){return Wg.get(e)}class bi{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new bi(Object.fromEntries(o1(n).map(i=>[i,_c])),t)}constructor(...t){if(t.length===2){const[n,i]=t;this.lang=i,this._stacks=n}else{const[n,i,o]=t;this.lang=i,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return p1(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function p1(e){const t=[],n=new Set;function i(o){if(n.has(o))return;n.add(o);const l=o?.nameScopesList?.scopeName;l&&t.push(l),o.parent&&i(o.parent)}return i(e),t}function m1(e,t){if(!(e instanceof bi))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function g1(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new mt(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...o.indexToPos(a),offset:a}}else{const c=o.lines[a.line];if(c===void 0)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);let f=a.character;if(f<0&&(f=c.length+f),f<0||f>c.length)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${c.length}`);return{...a,character:f,offset:o.posToIndex(a.line,f)}}};const o=u1(n.source),l=(n.options.decorations||[]).map(a=>({...a,start:i(a.start),end:i(a.end)}));y1(l),e.set(n.meta,{decorations:l,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return d1(n,o)},code(n){if(!this.options.decorations?.length)return;const i=t(this),o=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new mt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function l(p,m,w,v){const k=o[p];let b="",E=-1,S=-1;if(m===0&&(E=0),w===0&&(S=0),w===Number.POSITIVE_INFINITY&&(S=k.children.length),E===-1||S===-1)for(let A=0;A<k.children.length;A++)b+=Hg(k.children[A]),E===-1&&b.length===m&&(E=A+1),S===-1&&b.length===w&&(S=A+1);if(E===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(S===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const I=k.children.slice(E,S);if(!v.alwaysWrap&&I.length===k.children.length)c(k,v,"line");else if(!v.alwaysWrap&&I.length===1&&I[0].type==="element")c(I[0],v,"token");else{const A={type:"element",tagName:"span",properties:{},children:I};c(A,v,"wrapper"),k.children.splice(E,I.length,A)}}function a(p,m){o[p]=c(o[p],m,"line")}function c(p,m,w){const v=m.properties||{},k=m.transform||(b=>b);return p.tagName=m.tagName||"span",p.properties={...p.properties,...v,class:p.properties.class},m.properties?.class&&Gg(p,m.properties.class),p=k(p,w)||p,p}const f=[],h=i.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:w}=p;if(m.line===w.line)l(m.line,m.character,w.character,p);else if(m.line<w.line){l(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let v=m.line+1;v<w.line;v++)f.unshift(()=>a(v,p));l(w.line,0,w.character,p)}}f.forEach(p=>p())}}}function y1(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new mt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){const o=e[i],l=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,c=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,f=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(l||a||c||f){if(l&&a||c&&f||c&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new mt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Hg(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Hg).join(""):""}const w1=[g1()];function Sl(e){const t=v1(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...w1]}function v1(e){const t=[],n=[],i=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:i.push(o)}return{pre:t,post:n,normal:i}}var Mr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Gu={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function k1(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const i=e.indexOf("m",n);if(i!==-1)return{sequence:e.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:e.length}}function Vp(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function x1(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Gu[i]&&t.push({type:"setDecoration",value:Gu[i]});else if(i<=29){const o=Gu[i-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Mr[i-30]}});else if(i===38){const o=Vp(e);o&&t.push({type:"setForegroundColor",value:o})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Mr[i-40]}});else if(i===48){const o=Vp(e);o&&t.push({type:"setBackgroundColor",value:o})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Mr[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Mr[i-100+8]}})}return t}function S1(){let e=null,t=null,n=new Set;return{parse(i){const o=[];let l=0;do{const a=k1(i,l),c=a.sequence?i.substring(l,a.startPosition):i.substring(l);if(c.length>0&&o.push({value:c,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const f=x1(a.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}l=a.position}while(l<i.length);return o}}}var C1={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _1(e=C1){function t(c){return e[c]}function n(c){return`#${c.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let i;function o(){if(i)return i;i=[];for(let h=0;h<Mr.length;h++)i.push(t(Mr[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)i.push(n([c[h],c[p],c[m]]));let f=8;for(let h=0;h<24;h++,f+=10)i.push(n([f,f,f]));return i}function l(c){return o()[c]}function a(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return l(c.index)}}return{value:a}}const E1={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function b1(e,t,n){const i=kl(e,n),o=Pl(t),l=Object.fromEntries(Mr.map(f=>{const h=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`,p=e.colors?.[h];return[f,p||E1[f]]})),a=_1(l),c=S1();return o.map(f=>c.parse(f[0]).map(h=>{let p,m;h.decorations.has("reverse")?(p=h.background?a.value(h.background):e.bg,m=h.foreground?a.value(h.foreground):e.fg):(p=h.foreground?a.value(h.foreground):e.fg,m=h.background?a.value(h.background):void 0),p=hr(p,i),m=hr(m,i),h.decorations.has("dim")&&(p=I1(p));let w=It.None;return h.decorations.has("bold")&&(w|=It.Bold),h.decorations.has("italic")&&(w|=It.Italic),h.decorations.has("underline")&&(w|=It.Underline),h.decorations.has("strikethrough")&&(w|=It.Strikethrough),{content:h.value,offset:f[1],color:p,bgColor:m,fontStyle:w}}))}function I1(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const i=t[1];if(i.length===8){const o=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${o}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const o=i[0],l=i[1],a=i[2],c=i[3],f=Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${l}${l}${a}${a}${f}`}else if(i.length===3){const o=i[0],l=i[1],a=i[2];return`#${o}${o}${l}${l}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function tf(e,t,n={}){const{theme:i=e.getLoadedThemes()[0]}=n,o=e.resolveLangAlias(n.lang||"text");if(Jc(o)||Zc(i))return Pl(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:l,colorMap:a}=e.setTheme(i);if(o==="ansi")return b1(l,t,n);const c=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==c.name)throw new mt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(l.name))throw new mt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return T1(t,c,l,a,n)}function N1(...e){if(e.length===2)return Ts(e[1]);const[t,n,i={}]=e,{lang:o="text",theme:l=t.getLoadedThemes()[0]}=i;if(Jc(o)||Zc(l))throw new mt("Plain language does not have grammar state");if(o==="ansi")throw new mt("ANSI language does not have grammar state");const{theme:a,colorMap:c}=t.setTheme(l),f=t.getLanguage(o);return new bi(nf(n,f,a,c,i).stateStack,f.name,a.name)}function T1(e,t,n,i,o){const l=nf(e,t,n,i,o),a=new bi(l.stateStack,t.name,n.name);return Ll(l.tokens,a),l.tokens}function nf(e,t,n,i,o){const l=kl(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,f=Pl(e);let h=o.grammarState?m1(o.grammarState,n.name)??_c:o.grammarContextCode!=null?nf(o.grammarContextCode,t,n,i,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:_c,p=[];const m=[];for(let w=0,v=f.length;w<v;w++){const[k,b]=f[w];if(k===""){p=[],m.push([]);continue}if(a>0&&k.length>=a){p=[],m.push([{content:k,offset:b,color:"",fontStyle:0}]);continue}let E,S,I;o.includeExplanation&&(E=t.tokenizeLine(k,h,c),S=E.tokens,I=0);const A=t.tokenizeLine2(k,h,c),B=A.tokens.length/2;for(let P=0;P<B;P++){const L=A.tokens[2*P],Q=P+1<B?A.tokens[2*P+2]:k.length;if(L===Q)continue;const se=A.tokens[2*P+1],ue=hr(i[Ci.getForeground(se)],l),D=Ci.getFontStyle(se),te={content:k.substring(L,Q),offset:b+L,color:ue,fontStyle:D};if(o.includeExplanation){const re=[];if(o.includeExplanation!=="scopeName")for(const ne of n.settings){let Y;switch(typeof ne.scope){case"string":Y=ne.scope.split(/,/).map(ge=>ge.trim());break;case"object":Y=ne.scope;break;default:continue}re.push({settings:ne,selectors:Y.map(ge=>ge.split(/ /))})}te.explanation=[];let fe=0;for(;L+fe<Q;){const ne=S[I],Y=k.substring(ne.startIndex,ne.endIndex);fe+=Y.length,te.explanation.push({content:Y,scopes:o.includeExplanation==="scopeName"?A1(ne.scopes):P1(re,ne.scopes)}),I+=1}}p.push(te)}m.push(p),p=[],h=A.ruleStack}return{tokens:m,stateStack:h}}function A1(e){return e.map(t=>({scopeName:t}))}function P1(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const l=t[i];n[i]={scopeName:l,themeMatches:R1(e,l,t.slice(0,i))}}return n}function Gp(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function L1(e,t,n){if(!Gp(e[e.length-1],t))return!1;let i=e.length-2,o=n.length-1;for(;i>=0&&o>=0;)Gp(e[i],n[o])&&(i-=1),o-=1;return i===-1}function R1(e,t,n){const i=[];for(const{selectors:o,settings:l}of e)for(const a of o)if(L1(a,t,n)){i.push(l);break}return i}function Kg(e,t,n){const i=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=i.map(f=>{const h=tf(e,t,{...n,theme:f.theme}),p=Ts(h),m=typeof f.theme=="string"?f.theme:f.theme.name;return{tokens:h,state:p,theme:m}}),l=j1(...o.map(f=>f.tokens)),a=l[0].map((f,h)=>f.map((p,m)=>{const w={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in n&&n.includeExplanation&&(w.explanation=p.explanation),l.forEach((v,k)=>{const{content:b,explanation:E,offset:S,...I}=v[h][m];w.variants[i[k].color]=I}),w})),c=o[0].state?new bi(Object.fromEntries(o.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),o[0].state.lang):void 0;return c&&Ll(a,c),a}function j1(...e){const t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){const o=e.map(f=>f[i]),l=t.map(()=>[]);t.forEach((f,h)=>f.push(l[h]));const a=o.map(()=>0),c=o.map(f=>f[0]);for(;c.every(f=>f);){const f=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===f?(l[h].push(p),a[h]+=1,c[h]=o[h][a[h]]):(l[h].push({...p,content:p.content.slice(0,f)}),c[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}function Cl(e,t,n){let i,o,l,a,c,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,w=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,I)=>S.color===h?-1:I.color===h?1:0);if(w.length===0)throw new mt("`themes` option must not be empty");const v=Kg(e,t,n);if(f=Ts(v),h&&ef!==h&&!w.find(S=>S.color===h))throw new mt(`\`themes\` option must contain the defaultColor key \`${h}\``);const k=w.map(S=>e.getTheme(S.theme)),b=w.map(S=>S.color);l=v.map(S=>S.map(I=>h1(I,b,p,h,m))),f&&Ll(l,f);const E=w.map(S=>kl(S.theme,n));o=Wp(w,k,E,p,h,"fg",m),i=Wp(w,k,E,p,h,"bg",m),a=`shiki-themes ${k.map(S=>S.name).join(" ")}`,c=h?void 0:[o,i].join(";")}else if("theme"in n){const h=kl(n.theme,n);l=tf(e,t,n);const p=e.getTheme(n.theme);i=hr(p.bg,h),o=hr(p.fg,h),a=p.name,f=Ts(l)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:l,fg:o,bg:i,themeName:a,rootStyle:c,grammarState:f}}function Wp(e,t,n,i,o,l,a){return e.map((c,f)=>{const h=hr(t[f][l],n[f])||"inherit",p=`${i+c.color}${l==="bg"?"-bg":""}:${h}`;if(f===0&&o){if(o===ef&&e.length>1){const m=e.findIndex(b=>b.color==="light"),w=e.findIndex(b=>b.color==="dark");if(m===-1||w===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=hr(t[m][l],n[m])||"inherit",k=hr(t[w][l],n[w])||"inherit";return`light-dark(${v}, ${k});${p}`}return h}return a==="css-vars"?p:null}).filter(c=>!!c).join(";")}function _l(e,t,n,i={meta:{},options:n,codeToHast:(o,l)=>_l(e,o,l),codeToTokens:(o,l)=>Cl(e,o,l)}){let o=t;for(const k of Sl(n))o=k.preprocess?.call(i,o,n)||o;let{tokens:l,fg:a,bg:c,themeName:f,rootStyle:h,grammarState:p}=Cl(e,o,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:w=!1}=n;m===!0?l=M1(l):m==="never"&&(l=D1(l)),w&&(l=F1(l));const v={...i,get source(){return o}};for(const k of Sl(n))l=k.tokens?.call(v,l)||l;return O1(l,{...n,fg:a,bg:c,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},v,p)}function O1(e,t,n,i=Ts(e)){const o=Sl(t),l=[],a={type:"root",children:[]},{structure:c="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[b,E]of Object.entries(t.meta||{}))b.startsWith("_")||(h[b]=E);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:l};const w=[],v={...n,structure:c,addClassToHast:Gg,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return p},get code(){return m},get lines(){return w}};if(e.forEach((b,E)=>{E&&(c==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&l.push({type:"text",value:`
|
|
21
|
-
`}));let S={type:"element",tagName:"span",properties:{class:"line"},children:[]},I=0;for(const A of b){let B={type:"element",tagName:"span",properties:{...A.htmlAttrs},children:[{type:"text",value:A.content}]};const P=Tc(A.htmlStyle||xl(A));P&&(B.properties.style=P);for(const L of o)B=L?.span?.call(v,B,E+1,I,S,A)||B;c==="inline"?a.children.push(B):c==="classic"&&S.children.push(B),I+=A.content.length}if(c==="classic"){for(const A of o)S=A?.line?.call(v,S,E+1)||S;w.push(S),l.push(S)}else c==="inline"&&w.push(S)}),c==="classic"){for(const b of o)m=b?.code?.call(v,m)||m;p.children.push(m);for(const b of o)p=b?.pre?.call(v,p)||p;a.children.push(p)}else if(c==="inline"){const b=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const A of a.children)A.type==="element"&&A.tagName==="br"?(b.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(A.type==="element"||A.type==="text")&&E.children.push(A);b.push(E);let I={type:"element",tagName:"code",properties:{},children:b};for(const A of o)I=A?.code?.call(v,I)||I;a.children=[];for(let A=0;A<I.children.length;A++){A>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const B=I.children[A];B.type==="element"&&a.children.push(...B.children)}}let k=a;for(const b of o)k=b?.root?.call(v,k)||k;return i&&Ll(k,i),k}function M1(e){return e.map(t=>{const n=[];let i="",o;return t.forEach((l,a)=>{const f=!(l.fontStyle&&(l.fontStyle&It.Underline||l.fontStyle&It.Strikethrough));f&&l.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=l.offset),i+=l.content):i?(f?n.push({...l,offset:o,content:i+l.content}):n.push({content:i,offset:o},l),o=void 0,i=""):n.push(l)}),n})}function D1(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const i=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!i)return n;const[,o,l,a]=i;if(!o&&!a)return n;const c=[{...n,offset:n.offset+o.length,content:l}];return o&&c.unshift({content:o,offset:n.offset}),a&&c.push({content:a,offset:n.offset+o.length+l.length}),c}))}function F1(e){return e.map(t=>{const n=[];for(const i of t){if(n.length===0){n.push({...i});continue}const o=n[n.length-1],l=Tc(o.htmlStyle||xl(o)),a=Tc(i.htmlStyle||xl(i)),c=o.fontStyle&&(o.fontStyle&It.Underline||o.fontStyle&It.Strikethrough),f=i.fontStyle&&(i.fontStyle&It.Underline||i.fontStyle&It.Strikethrough);!c&&!f&&l===a?o.content+=i.content:n.push({...i})}return n})}const z1=r1;function $1(e,t,n){const i={meta:{},options:n,codeToHast:(l,a)=>_l(e,l,a),codeToTokens:(l,a)=>Cl(e,l,a)};let o=z1(_l(e,t,n,i));for(const l of Sl(n))o=l.postprocess?.call(i,o,n)||o;return o}const Hp={light:"#333333",dark:"#bbbbbb"},Kp={light:"#fffffe",dark:"#1e1e1e"},qp="__shiki_resolved";function rf(e){if(e?.[qp])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:i}=t;if(!n||!i){const c=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;c?.settings?.foreground&&(i=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i=t.type==="light"?Hp.light:Hp.dark),n||(n=t.type==="light"?Kp.light:Kp.dark),t.fg=i,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const l=new Map;function a(c){if(l.has(c))return l.get(c);o+=1;const f=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?a(c):(l.set(c,f),f)}t.settings=t.settings.map(c=>{const f=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!f&&!h)return c;const p={...c,settings:{...c.settings}};if(f){const m=a(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=a(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const f=a(t.colors[c]);t.colorReplacements[f]=t.colors[c],t.colors[c]=f}return Object.defineProperty(t,qp,{enumerable:!1,writable:!1,value:!0}),t}async function qg(e){return Array.from(new Set((await Promise.all(e.filter(t=>!l1(t)).map(async t=>await Vg(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Qg(e){return(await Promise.all(e.map(async n=>a1(n)?null:rf(await Vg(n))))).filter(n=>!!n)}let B1=3;function U1(e,t=3){t>B1||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class xi extends Error{constructor(t){super(t),this.name="ShikiError"}}function Xg(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new xi(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class V1 extends Hx{constructor(t,n,i,o={}){super(t),this._resolver=t,this._themes=n,this._langs=i,this._alias=o,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=rf(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=pl.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Xg(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(l=>l.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const i={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,i);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(l=>{this._alias[l]=t.name}),this._loadedLanguagesCache=null,n.size)for(const l of n)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(l.scopeName),this._syncRegistry?._grammars?.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),i=n.filter(([o,l])=>!l);if(i.length){const o=n.filter(([l,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(f=>i.map(([h])=>h).includes(f)):!1).filter(l=>!i.includes(l));throw new xi(`Missing languages ${i.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of n)this._resolver.addLanguage(l);for(const[o,l]of n)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const i of n)this._langGraph.set(i,this._langMap.get(i))}}class G1{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:i=>t.createScanner(i),createOnigString:i=>t.createString(i)},n.forEach(i=>this.addLanguage(i))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let i=[];for(let o=1;o<=n.length;o++){const l=n.slice(0,o).join(".");i=[...i,...this._injections.get(l)||[]]}return i}}let ps=0;function W1(e){ps+=1,e.warnings!==!1&&ps>=10&&ps%10===0&&console.warn(`[Shiki] ${ps} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new xi("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(rf),o=new G1(e.engine,n),l=new V1(o,i,n,e.langAlias);let a;function c(A){return Xg(A,e.langAlias)}function f(A){S();const B=l.getGrammar(typeof A=="string"?A:A.name);if(!B)throw new xi(`Language \`${A}\` not found, you may need to load it first`);return B}function h(A){if(A==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const B=l.getTheme(A);if(!B)throw new xi(`Theme \`${A}\` not found, you may need to load it first`);return B}function p(A){S();const B=h(A);a!==A&&(l.setTheme(B),a=A);const P=l.getColorMap();return{theme:B,colorMap:P}}function m(){return S(),l.getLoadedThemes()}function w(){return S(),l.getLoadedLanguages()}function v(...A){S(),l.loadLanguages(A.flat(1))}async function k(...A){return v(await qg(A))}function b(...A){S();for(const B of A.flat(1))l.loadTheme(B)}async function E(...A){return S(),b(await Qg(A))}function S(){if(t)throw new xi("Shiki instance has been disposed")}function I(){t||(t=!0,l.dispose(),ps-=1)}return{setTheme:p,getTheme:h,getLanguage:f,getLoadedThemes:m,getLoadedLanguages:w,resolveLangAlias:c,loadLanguage:k,loadLanguageSync:v,loadTheme:E,loadThemeSync:b,dispose:I,[Symbol.dispose]:I}}async function H1(e){e.engine||U1("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,i]=await Promise.all([Qg(e.themes||[]),qg(e.langs||[]),e.engine]);return W1({...e,themes:t,langs:n,engine:i})}async function K1(e){const t=await H1(e);return{getLastGrammarState:(...n)=>N1(t,...n),codeToTokensBase:(n,i)=>tf(t,n,i),codeToTokensWithThemes:(n,i)=>Kg(t,n,i),codeToTokens:(n,i)=>Cl(t,n,i),codeToHast:(n,i)=>_l(t,n,i),codeToHtml:(n,i)=>$1(t,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ii(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function q1(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const sf=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),gt=String.raw;function Ni(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Yg=gt`\[\^?`,Jg=`c.? | C(?:-.?)?|${gt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${gt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${gt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${gt`o\{[^\}]*\}?`}|${gt`\d{1,3}`}`,of=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Zo=new RegExp(gt`
|
|
20
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function W0(e,t,n,i){const o=i.schema,l=o.space==="svg"?!1:i.settings.omitOptionalTags;let a=o.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const c=[];let f;o.space==="html"&&e.tagName==="svg"&&(i.schema=Os);const h=H0(i,e.properties),p=i.all(o.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=o,p&&(a=!1),(h||!l||!z0(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),a&&(o.space==="svg"||i.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!i.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!a&&(!l||!Yc(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function H0(e,t){const n=[];let i=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const l=K0(e,o,t[o]);l&&n.push(l)}}for(;++i<n.length;){const l=e.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&l!=='"'&&l!=="'"&&(n[i]+=" ")}return n.join("")}function K0(e,t,n){const i=Rg(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,l=e.settings.allowDangerousCharacters?0:1;let a=e.quote,c;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=Si(i.attribute,Object.assign({},e.settings.characterReferences,{subset:Jo.name[o][l]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?Mg:Dg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(c=Si(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Jo.unquoted[o][l]}))),c!==n&&(e.settings.quoteSmart&&vl(n,a)>vl(n,e.alternative)&&(a=e.alternative),c=a+Si(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Jo.single:Jo.double)[o][l],attribute:!0}))+a),f+(c&&"="+c))}const q0=["<","&"];function Bg(e,t,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Si(e.value,Object.assign({},i.settings.characterReferences,{subset:q0}))}function Q0(e,t,n,i){return i.settings.allowDangerousHtml?e.value:Bg(e,t,n,i)}function X0(e,t,n,i){return i.all(e)}const Y0=n0("type",{invalid:J0,unknown:Z0,handlers:{comment:S0,doctype:C0,element:W0,raw:Q0,root:X0,text:Bg}});function J0(e){throw new Error("Expected node, not `"+e+"`")}function Z0(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const e1={},t1={},n1=[];function r1(e,t){const n=t||e1,i=n.quote||'"',o=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:i1,all:s1,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Kx,characterReferences:n.characterReferences||t1,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Os:jg,quote:i,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function i1(e,t,n){return Y0(e,t,n,this)}function s1(e){const t=[],n=e&&e.children||n1;let i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}function kl(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[o,l]of Object.entries(t?.colorReplacements||{}))typeof l=="string"?n[o]=l:o===i&&Object.assign(n,l);return n}function hr(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function o1(e){return Array.isArray(e)?e:[e]}async function Ug(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Jc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function l1(e){return e==="ansi"||Jc(e)}function Zc(e){return e==="none"}function a1(e){return Zc(e)}function Vg(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function Pl(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let i=0;const o=[];for(let l=0;l<n.length;l+=2){const a=t?n[l]+(n[l+1]||""):n[l];o.push([a,i]),i+=n[l].length,i+=n[l+1]?.length||0}return o}function u1(e){const t=Pl(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let l=o,a=0;for(const c of t){if(l<c.length)break;l-=c.length,a++}return{line:a,character:l}}function i(o,l){let a=0;for(let c=0;c<o;c++)a+=t[c].length;return a+=l,a}return{lines:t,indexToPos:n,posToIndex:i}}const ef="light-dark()",c1=["color","background-color"];function f1(e,t){let n=0;const i=[];for(const o of t)o>n&&i.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&i.push({...e,content:e.content.slice(n),offset:e.offset+n}),i}function d1(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((i,o)=>i-o);return n.length?e.map(i=>i.flatMap(o=>{const l=n.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,c)=>a-c);return l.length?f1(o,l):o})):e}function h1(e,t,n,i,o="css-vars"){const l={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(p=>xl(e.variants[p])),c=new Set(a.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const w=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":w)};return a.forEach((p,m)=>{for(const w of c){const v=p[w]||"inherit";if(m===0&&i&&c1.includes(w))if(i===ef&&a.length>1){const k=t.findIndex(I=>I==="light"),b=t.findIndex(I=>I==="dark");if(k===-1||b===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const E=a[k][w]||"inherit",S=a[b][w]||"inherit";f[w]=`light-dark(${E}, ${S})`,o==="css-vars"&&(f[h(m,w)]=v)}else f[w]=v;else o==="css-vars"&&(f[h(m,w)]=v)}}),l.htmlStyle=f,l}function xl(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&It.Italic&&(t["font-style"]="italic"),e.fontStyle&It.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&It.Underline&&n.push("underline"),e.fontStyle&It.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Tc(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Gg=new WeakMap;function Ll(e,t){Gg.set(e,t)}function Ts(e){return Gg.get(e)}class bi{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new bi(Object.fromEntries(o1(n).map(i=>[i,_c])),t)}constructor(...t){if(t.length===2){const[n,i]=t;this.lang=i,this._stacks=n}else{const[n,i,o]=t;this.lang=i,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return p1(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function p1(e){const t=[],n=new Set;function i(o){if(n.has(o))return;n.add(o);const l=o?.nameScopesList?.scopeName;l&&t.push(l),o.parent&&i(o.parent)}return i(e),t}function m1(e,t){if(!(e instanceof bi))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function g1(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new mt(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...o.indexToPos(a),offset:a}}else{const c=o.lines[a.line];if(c===void 0)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);let f=a.character;if(f<0&&(f=c.length+f),f<0||f>c.length)throw new mt(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${c.length}`);return{...a,character:f,offset:o.posToIndex(a.line,f)}}};const o=u1(n.source),l=(n.options.decorations||[]).map(a=>({...a,start:i(a.start),end:i(a.end)}));y1(l),e.set(n.meta,{decorations:l,converter:o,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return d1(n,o)},code(n){if(!this.options.decorations?.length)return;const i=t(this),o=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(o.length!==i.converter.lines.length)throw new mt(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function l(p,m,w,v){const k=o[p];let b="",E=-1,S=-1;if(m===0&&(E=0),w===0&&(S=0),w===Number.POSITIVE_INFINITY&&(S=k.children.length),E===-1||S===-1)for(let A=0;A<k.children.length;A++)b+=Wg(k.children[A]),E===-1&&b.length===m&&(E=A+1),S===-1&&b.length===w&&(S=A+1);if(E===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(v.start)}`);if(S===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(v.end)}`);const I=k.children.slice(E,S);if(!v.alwaysWrap&&I.length===k.children.length)c(k,v,"line");else if(!v.alwaysWrap&&I.length===1&&I[0].type==="element")c(I[0],v,"token");else{const A={type:"element",tagName:"span",properties:{},children:I};c(A,v,"wrapper"),k.children.splice(E,I.length,A)}}function a(p,m){o[p]=c(o[p],m,"line")}function c(p,m,w){const v=m.properties||{},k=m.transform||(b=>b);return p.tagName=m.tagName||"span",p.properties={...p.properties,...v,class:p.properties.class},m.properties?.class&&Vg(p,m.properties.class),p=k(p,w)||p,p}const f=[],h=i.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:w}=p;if(m.line===w.line)l(m.line,m.character,w.character,p);else if(m.line<w.line){l(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let v=m.line+1;v<w.line;v++)f.unshift(()=>a(v,p));l(w.line,0,w.character,p)}}f.forEach(p=>p())}}}function y1(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new mt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){const o=e[i],l=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,a=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,c=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,f=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(l||a||c||f){if(l&&a||c&&f||c&&n.start.offset===n.end.offset||a&&o.start.offset===o.end.offset)continue;throw new mt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Wg(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Wg).join(""):""}const w1=[g1()];function Sl(e){const t=v1(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...w1]}function v1(e){const t=[],n=[],i=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:i.push(o)}return{pre:t,post:n,normal:i}}var Mr=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Gu={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function k1(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const i=e.indexOf("m",n);if(i!==-1)return{sequence:e.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:e.length}}function Up(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function x1(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)Gu[i]&&t.push({type:"setDecoration",value:Gu[i]});else if(i<=29){const o=Gu[i-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Mr[i-30]}});else if(i===38){const o=Up(e);o&&t.push({type:"setForegroundColor",value:o})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Mr[i-40]}});else if(i===48){const o=Up(e);o&&t.push({type:"setBackgroundColor",value:o})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Mr[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Mr[i-100+8]}})}return t}function S1(){let e=null,t=null,n=new Set;return{parse(i){const o=[];let l=0;do{const a=k1(i,l),c=a.sequence?i.substring(l,a.startPosition):i.substring(l);if(c.length>0&&o.push({value:c,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const f=x1(a.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}l=a.position}while(l<i.length);return o}}}var C1={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _1(e=C1){function t(c){return e[c]}function n(c){return`#${c.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let i;function o(){if(i)return i;i=[];for(let h=0;h<Mr.length;h++)i.push(t(Mr[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)i.push(n([c[h],c[p],c[m]]));let f=8;for(let h=0;h<24;h++,f+=10)i.push(n([f,f,f]));return i}function l(c){return o()[c]}function a(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return l(c.index)}}return{value:a}}const E1={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function b1(e,t,n){const i=kl(e,n),o=Pl(t),l=Object.fromEntries(Mr.map(f=>{const h=`terminal.ansi${f[0].toUpperCase()}${f.substring(1)}`,p=e.colors?.[h];return[f,p||E1[f]]})),a=_1(l),c=S1();return o.map(f=>c.parse(f[0]).map(h=>{let p,m;h.decorations.has("reverse")?(p=h.background?a.value(h.background):e.bg,m=h.foreground?a.value(h.foreground):e.fg):(p=h.foreground?a.value(h.foreground):e.fg,m=h.background?a.value(h.background):void 0),p=hr(p,i),m=hr(m,i),h.decorations.has("dim")&&(p=I1(p));let w=It.None;return h.decorations.has("bold")&&(w|=It.Bold),h.decorations.has("italic")&&(w|=It.Italic),h.decorations.has("underline")&&(w|=It.Underline),h.decorations.has("strikethrough")&&(w|=It.Strikethrough),{content:h.value,offset:f[1],color:p,bgColor:m,fontStyle:w}}))}function I1(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const i=t[1];if(i.length===8){const o=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${o}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const o=i[0],l=i[1],a=i[2],c=i[3],f=Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${l}${l}${a}${a}${f}`}else if(i.length===3){const o=i[0],l=i[1],a=i[2];return`#${o}${o}${l}${l}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function tf(e,t,n={}){const{theme:i=e.getLoadedThemes()[0]}=n,o=e.resolveLangAlias(n.lang||"text");if(Jc(o)||Zc(i))return Pl(t).map(f=>[{content:f[0],offset:f[1]}]);const{theme:l,colorMap:a}=e.setTheme(i);if(o==="ansi")return b1(l,t,n);const c=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==c.name)throw new mt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(l.name))throw new mt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return T1(t,c,l,a,n)}function N1(...e){if(e.length===2)return Ts(e[1]);const[t,n,i={}]=e,{lang:o="text",theme:l=t.getLoadedThemes()[0]}=i;if(Jc(o)||Zc(l))throw new mt("Plain language does not have grammar state");if(o==="ansi")throw new mt("ANSI language does not have grammar state");const{theme:a,colorMap:c}=t.setTheme(l),f=t.getLanguage(o);return new bi(nf(n,f,a,c,i).stateStack,f.name,a.name)}function T1(e,t,n,i,o){const l=nf(e,t,n,i,o),a=new bi(l.stateStack,t.name,n.name);return Ll(l.tokens,a),l.tokens}function nf(e,t,n,i,o){const l=kl(n,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,f=Pl(e);let h=o.grammarState?m1(o.grammarState,n.name)??_c:o.grammarContextCode!=null?nf(o.grammarContextCode,t,n,i,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:_c,p=[];const m=[];for(let w=0,v=f.length;w<v;w++){const[k,b]=f[w];if(k===""){p=[],m.push([]);continue}if(a>0&&k.length>=a){p=[],m.push([{content:k,offset:b,color:"",fontStyle:0}]);continue}let E,S,I;o.includeExplanation&&(E=t.tokenizeLine(k,h,c),S=E.tokens,I=0);const A=t.tokenizeLine2(k,h,c),$=A.tokens.length/2;for(let P=0;P<$;P++){const L=A.tokens[2*P],Q=P+1<$?A.tokens[2*P+2]:k.length;if(L===Q)continue;const oe=A.tokens[2*P+1],ue=hr(i[Ci.getForeground(oe)],l),D=Ci.getFontStyle(oe),ne={content:k.substring(L,Q),offset:b+L,color:ue,fontStyle:D};if(o.includeExplanation){const re=[];if(o.includeExplanation!=="scopeName")for(const ie of n.settings){let Y;switch(typeof ie.scope){case"string":Y=ie.scope.split(/,/).map(ge=>ge.trim());break;case"object":Y=ie.scope;break;default:continue}re.push({settings:ie,selectors:Y.map(ge=>ge.split(/ /))})}ne.explanation=[];let fe=0;for(;L+fe<Q;){const ie=S[I],Y=k.substring(ie.startIndex,ie.endIndex);fe+=Y.length,ne.explanation.push({content:Y,scopes:o.includeExplanation==="scopeName"?A1(ie.scopes):P1(re,ie.scopes)}),I+=1}}p.push(ne)}m.push(p),p=[],h=A.ruleStack}return{tokens:m,stateStack:h}}function A1(e){return e.map(t=>({scopeName:t}))}function P1(e,t){const n=[];for(let i=0,o=t.length;i<o;i++){const l=t[i];n[i]={scopeName:l,themeMatches:R1(e,l,t.slice(0,i))}}return n}function Vp(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function L1(e,t,n){if(!Vp(e[e.length-1],t))return!1;let i=e.length-2,o=n.length-1;for(;i>=0&&o>=0;)Vp(e[i],n[o])&&(i-=1),o-=1;return i===-1}function R1(e,t,n){const i=[];for(const{selectors:o,settings:l}of e)for(const a of o)if(L1(a,t,n)){i.push(l);break}return i}function Hg(e,t,n){const i=Object.entries(n.themes).filter(f=>f[1]).map(f=>({color:f[0],theme:f[1]})),o=i.map(f=>{const h=tf(e,t,{...n,theme:f.theme}),p=Ts(h),m=typeof f.theme=="string"?f.theme:f.theme.name;return{tokens:h,state:p,theme:m}}),l=j1(...o.map(f=>f.tokens)),a=l[0].map((f,h)=>f.map((p,m)=>{const w={content:p.content,variants:{},offset:p.offset};return"includeExplanation"in n&&n.includeExplanation&&(w.explanation=p.explanation),l.forEach((v,k)=>{const{content:b,explanation:E,offset:S,...I}=v[h][m];w.variants[i[k].color]=I}),w})),c=o[0].state?new bi(Object.fromEntries(o.map(f=>[f.theme,f.state?.getInternalStack(f.theme)])),o[0].state.lang):void 0;return c&&Ll(a,c),a}function j1(...e){const t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){const o=e.map(f=>f[i]),l=t.map(()=>[]);t.forEach((f,h)=>f.push(l[h]));const a=o.map(()=>0),c=o.map(f=>f[0]);for(;c.every(f=>f);){const f=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===f?(l[h].push(p),a[h]+=1,c[h]=o[h][a[h]]):(l[h].push({...p,content:p.content.slice(0,f)}),c[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}function Cl(e,t,n){let i,o,l,a,c,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,w=Object.entries(n.themes).filter(S=>S[1]).map(S=>({color:S[0],theme:S[1]})).sort((S,I)=>S.color===h?-1:I.color===h?1:0);if(w.length===0)throw new mt("`themes` option must not be empty");const v=Hg(e,t,n);if(f=Ts(v),h&&ef!==h&&!w.find(S=>S.color===h))throw new mt(`\`themes\` option must contain the defaultColor key \`${h}\``);const k=w.map(S=>e.getTheme(S.theme)),b=w.map(S=>S.color);l=v.map(S=>S.map(I=>h1(I,b,p,h,m))),f&&Ll(l,f);const E=w.map(S=>kl(S.theme,n));o=Gp(w,k,E,p,h,"fg",m),i=Gp(w,k,E,p,h,"bg",m),a=`shiki-themes ${k.map(S=>S.name).join(" ")}`,c=h?void 0:[o,i].join(";")}else if("theme"in n){const h=kl(n.theme,n);l=tf(e,t,n);const p=e.getTheme(n.theme);i=hr(p.bg,h),o=hr(p.fg,h),a=p.name,f=Ts(l)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:l,fg:o,bg:i,themeName:a,rootStyle:c,grammarState:f}}function Gp(e,t,n,i,o,l,a){return e.map((c,f)=>{const h=hr(t[f][l],n[f])||"inherit",p=`${i+c.color}${l==="bg"?"-bg":""}:${h}`;if(f===0&&o){if(o===ef&&e.length>1){const m=e.findIndex(b=>b.color==="light"),w=e.findIndex(b=>b.color==="dark");if(m===-1||w===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=hr(t[m][l],n[m])||"inherit",k=hr(t[w][l],n[w])||"inherit";return`light-dark(${v}, ${k});${p}`}return h}return a==="css-vars"?p:null}).filter(c=>!!c).join(";")}function _l(e,t,n,i={meta:{},options:n,codeToHast:(o,l)=>_l(e,o,l),codeToTokens:(o,l)=>Cl(e,o,l)}){let o=t;for(const k of Sl(n))o=k.preprocess?.call(i,o,n)||o;let{tokens:l,fg:a,bg:c,themeName:f,rootStyle:h,grammarState:p}=Cl(e,o,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:w=!1}=n;m===!0?l=M1(l):m==="never"&&(l=D1(l)),w&&(l=F1(l));const v={...i,get source(){return o}};for(const k of Sl(n))l=k.tokens?.call(v,l)||l;return O1(l,{...n,fg:a,bg:c,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},v,p)}function O1(e,t,n,i=Ts(e)){const o=Sl(t),l=[],a={type:"root",children:[]},{structure:c="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[b,E]of Object.entries(t.meta||{}))b.startsWith("_")||(h[b]=E);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:l};const w=[],v={...n,structure:c,addClassToHast:Vg,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return p},get code(){return m},get lines(){return w}};if(e.forEach((b,E)=>{E&&(c==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&l.push({type:"text",value:`
|
|
21
|
+
`}));let S={type:"element",tagName:"span",properties:{class:"line"},children:[]},I=0;for(const A of b){let $={type:"element",tagName:"span",properties:{...A.htmlAttrs},children:[{type:"text",value:A.content}]};const P=Tc(A.htmlStyle||xl(A));P&&($.properties.style=P);for(const L of o)$=L?.span?.call(v,$,E+1,I,S,A)||$;c==="inline"?a.children.push($):c==="classic"&&S.children.push($),I+=A.content.length}if(c==="classic"){for(const A of o)S=A?.line?.call(v,S,E+1)||S;w.push(S),l.push(S)}else c==="inline"&&w.push(S)}),c==="classic"){for(const b of o)m=b?.code?.call(v,m)||m;p.children.push(m);for(const b of o)p=b?.pre?.call(v,p)||p;a.children.push(p)}else if(c==="inline"){const b=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const A of a.children)A.type==="element"&&A.tagName==="br"?(b.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(A.type==="element"||A.type==="text")&&E.children.push(A);b.push(E);let I={type:"element",tagName:"code",properties:{},children:b};for(const A of o)I=A?.code?.call(v,I)||I;a.children=[];for(let A=0;A<I.children.length;A++){A>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=I.children[A];$.type==="element"&&a.children.push(...$.children)}}let k=a;for(const b of o)k=b?.root?.call(v,k)||k;return i&&Ll(k,i),k}function M1(e){return e.map(t=>{const n=[];let i="",o;return t.forEach((l,a)=>{const f=!(l.fontStyle&&(l.fontStyle&It.Underline||l.fontStyle&It.Strikethrough));f&&l.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=l.offset),i+=l.content):i?(f?n.push({...l,offset:o,content:i+l.content}):n.push({content:i,offset:o},l),o=void 0,i=""):n.push(l)}),n})}function D1(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const i=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!i)return n;const[,o,l,a]=i;if(!o&&!a)return n;const c=[{...n,offset:n.offset+o.length,content:l}];return o&&c.unshift({content:o,offset:n.offset}),a&&c.push({content:a,offset:n.offset+o.length+l.length}),c}))}function F1(e){return e.map(t=>{const n=[];for(const i of t){if(n.length===0){n.push({...i});continue}const o=n[n.length-1],l=Tc(o.htmlStyle||xl(o)),a=Tc(i.htmlStyle||xl(i)),c=o.fontStyle&&(o.fontStyle&It.Underline||o.fontStyle&It.Strikethrough),f=i.fontStyle&&(i.fontStyle&It.Underline||i.fontStyle&It.Strikethrough);!c&&!f&&l===a?o.content+=i.content:n.push({...i})}return n})}const z1=r1;function $1(e,t,n){const i={meta:{},options:n,codeToHast:(l,a)=>_l(e,l,a),codeToTokens:(l,a)=>Cl(e,l,a)};let o=z1(_l(e,t,n,i));for(const l of Sl(n))o=l.postprocess?.call(i,o,n)||o;return o}const Wp={light:"#333333",dark:"#bbbbbb"},Hp={light:"#fffffe",dark:"#1e1e1e"},Kp="__shiki_resolved";function rf(e){if(e?.[Kp])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:i}=t;if(!n||!i){const c=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;c?.settings?.foreground&&(i=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i=t.type==="light"?Wp.light:Wp.dark),n||(n=t.type==="light"?Hp.light:Hp.dark),t.fg=i,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const l=new Map;function a(c){if(l.has(c))return l.get(c);o+=1;const f=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?a(c):(l.set(c,f),f)}t.settings=t.settings.map(c=>{const f=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!f&&!h)return c;const p={...c,settings:{...c.settings}};if(f){const m=a(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=a(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const f=a(t.colors[c]);t.colorReplacements[f]=t.colors[c],t.colors[c]=f}return Object.defineProperty(t,Kp,{enumerable:!1,writable:!1,value:!0}),t}async function Kg(e){return Array.from(new Set((await Promise.all(e.filter(t=>!l1(t)).map(async t=>await Ug(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function qg(e){return(await Promise.all(e.map(async n=>a1(n)?null:rf(await Ug(n))))).filter(n=>!!n)}let B1=3;function U1(e,t=3){t>B1||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class xi extends Error{constructor(t){super(t),this.name="ShikiError"}}function Qg(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new xi(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class V1 extends Hx{constructor(t,n,i,o={}){super(t),this._resolver=t,this._themes=n,this._langs=i,this._alias=o,this._themes.map(l=>this.loadTheme(l)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=rf(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=pl.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Qg(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(l=>l.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const i={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,i);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(l=>{this._alias[l]=t.name}),this._loadedLanguagesCache=null,n.size)for(const l of n)this._resolvedGrammars.delete(l.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(l.scopeName),this._syncRegistry?._grammars?.delete(l.scopeName),this.loadLanguage(this._langMap.get(l.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const n=Array.from(this._langGraph.entries()),i=n.filter(([o,l])=>!l);if(i.length){const o=n.filter(([l,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(f=>i.map(([h])=>h).includes(f)):!1).filter(l=>!i.includes(l));throw new xi(`Missing languages ${i.map(([l])=>`\`${l}\``).join(", ")}, required by ${o.map(([l])=>`\`${l}\``).join(", ")}`)}for(const[o,l]of n)this._resolver.addLanguage(l);for(const[o,l]of n)this.loadLanguage(l)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const i of n)this._langGraph.set(i,this._langMap.get(i))}}class G1{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:i=>t.createScanner(i),createOnigString:i=>t.createString(i)},n.forEach(i=>this.addLanguage(i))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let i=[];for(let o=1;o<=n.length;o++){const l=n.slice(0,o).join(".");i=[...i,...this._injections.get(l)||[]]}return i}}let ps=0;function W1(e){ps+=1,e.warnings!==!1&&ps>=10&&ps%10===0&&console.warn(`[Shiki] ${ps} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new xi("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(rf),o=new G1(e.engine,n),l=new V1(o,i,n,e.langAlias);let a;function c(A){return Qg(A,e.langAlias)}function f(A){S();const $=l.getGrammar(typeof A=="string"?A:A.name);if(!$)throw new xi(`Language \`${A}\` not found, you may need to load it first`);return $}function h(A){if(A==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};S();const $=l.getTheme(A);if(!$)throw new xi(`Theme \`${A}\` not found, you may need to load it first`);return $}function p(A){S();const $=h(A);a!==A&&(l.setTheme($),a=A);const P=l.getColorMap();return{theme:$,colorMap:P}}function m(){return S(),l.getLoadedThemes()}function w(){return S(),l.getLoadedLanguages()}function v(...A){S(),l.loadLanguages(A.flat(1))}async function k(...A){return v(await Kg(A))}function b(...A){S();for(const $ of A.flat(1))l.loadTheme($)}async function E(...A){return S(),b(await qg(A))}function S(){if(t)throw new xi("Shiki instance has been disposed")}function I(){t||(t=!0,l.dispose(),ps-=1)}return{setTheme:p,getTheme:h,getLanguage:f,getLoadedThemes:m,getLoadedLanguages:w,resolveLangAlias:c,loadLanguage:k,loadLanguageSync:v,loadTheme:E,loadThemeSync:b,dispose:I,[Symbol.dispose]:I}}async function H1(e){e.engine||U1("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,i]=await Promise.all([qg(e.themes||[]),Kg(e.langs||[]),e.engine]);return W1({...e,themes:t,langs:n,engine:i})}async function K1(e){const t=await H1(e);return{getLastGrammarState:(...n)=>N1(t,...n),codeToTokensBase:(n,i)=>tf(t,n,i),codeToTokensWithThemes:(n,i)=>Hg(t,n,i),codeToTokens:(n,i)=>Cl(t,n,i),codeToHast:(n,i)=>_l(t,n,i),codeToHtml:(n,i)=>$1(t,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ii(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function q1(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const sf=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),gt=String.raw;function Ni(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Xg=gt`\[\^?`,Yg=`c.? | C(?:-.?)?|${gt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${gt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${gt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${gt`o\{[^\}]*\}?`}|${gt`\d{1,3}`}`,of=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Zo=new RegExp(gt`
|
|
22
22
|
\\ (?:
|
|
23
|
-
${
|
|
23
|
+
${Yg}
|
|
24
24
|
| [gk]<[^>]*>?
|
|
25
25
|
| [gk]'[^']*'?
|
|
26
26
|
| .
|
|
@@ -38,19 +38,19 @@ cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",
|
|
|
38
38
|
| \*[^\)]*\)?
|
|
39
39
|
)?
|
|
40
40
|
| (?:${of.source})+
|
|
41
|
-
| ${
|
|
41
|
+
| ${Xg}
|
|
42
42
|
| .
|
|
43
43
|
`.replace(/\s+/g,""),"gsu"),Wu=new RegExp(gt`
|
|
44
44
|
\\ (?:
|
|
45
|
-
${
|
|
45
|
+
${Yg}
|
|
46
46
|
| .
|
|
47
47
|
)
|
|
48
48
|
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
-
| ${
|
|
49
|
+
| ${Xg}
|
|
50
50
|
| &&
|
|
51
51
|
| .
|
|
52
|
-
`.replace(/\s+/g,""),"gsu");function Q1(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=pS(n.flags),o=[i.extended],l={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:n.rules.singleline};let a=[],c;for(Zo.lastIndex=0;c=Zo.exec(e);){const m=X1(l,e,c[0],Zo.lastIndex);m.tokens?a.push(...m.tokens):m.token&&a.push(m.token),m.lastIndex!==void 0&&(Zo.lastIndex=m.lastIndex)}const f=[];let h=0;a.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,w)=>{m.kind="capturing",m.number=w+1});const p=h||f.length;return{tokens:a.map(m=>m.type==="EscapedNumber"?gS(m,p):m).flat(),flags:i}}function X1(e,t,n,i){const[o,l]=n;if(n==="["||n==="[^"){const a=Y1(t,n,i);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(l))return{token:
|
|
53
|
-
`,i);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=i,{lastIndex:a.exec(t)?a.lastIndex:i}}}if(n===".")return{token:Dr("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":gt`\A`,$:gt`\Z`}[n]:n;return{token:Qp(a,n)}}return n==="|"?{token:Z1(n)}:of.test(n)?{tokens:yS(n)}:{token:Fn(Ii(n),n)}}function Y1(e,t,n){const i=[Xp(t[1]==="^",t)];let o=1,l;for(Wu.lastIndex=n;l=Wu.exec(e);){const a=l[0];if(a[0]==="["&&a[1]!==":")o++,i.push(Xp(a[1]==="^",a));else if(a==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(Fn(93,a));else if(o--,i.push(eS(a)),!o)break}else{const c=J1(a);Array.isArray(c)?i.push(...c):i.push(c)}}return{tokens:i,lastIndex:Wu.lastIndex||e.length}}function J1(e){if(e[0]==="\\")return Zg(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!sf.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Dr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?tS(e):e==="&&"?nS(e):Fn(Ii(e),e)}function Zg(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return uS(e);if("dDhHsSwW".includes(n))return dS(e);if(e.startsWith(gt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return hS(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),l=new TextEncoder;return[...o].map(a=>{const c=[...l.encode(a)].map(f=>`\\x${f.toString(16)}`).join("");return Fn(Ii(a),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Fn(mS(e),e);if(Yp.has(n))return Fn(Yp.get(n),e);if(/\d/.test(n))return rS(t,e);if(e==="\\")throw new Error(gt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Fn(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Z1(e){return{type:"Alternator",raw:e}}function Qp(e,t){return{type:"Assertion",kind:e,raw:t}}function ey(e){return{type:"Backreference",raw:e}}function Fn(e,t){return{type:"Character",value:e,raw:t}}function eS(e){return{type:"CharacterClassClose",raw:e}}function tS(e){return{type:"CharacterClassHyphen",raw:e}}function nS(e){return{type:"CharacterClassIntersector",raw:e}}function Xp(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Dr(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function ty(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ni(n.flags),raw:t}}function rS(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function iS(e){return{type:"GroupClose",raw:e}}function wi(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function sS(e,t,n,i){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:i}}function oS(e,t,n,i){return{type:"Quantifier",kind:e,min:t,max:n,raw:i}}function lS(e){return{type:"Subroutine",raw:e}}const aS=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Yp=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function uS(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Fn(Ii(t.toUpperCase())-64,e)}function cS(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";const o=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),l=Zp(n),a=Zp(i),c={};if(l&&(c.enable=l),a&&(c.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),ty("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,wi("group",e,{...(l||a)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function fS(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:i,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const l=o?o.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[a,c,f]=l,h=aS.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(l.length>0)throw new Error(`Named callout arguments not allowed "${l}"`);break;case"error":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!l.length||l.length>2)throw new Error(`Named callout must have one or two arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(l.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(l.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(l.length!==3)throw new Error(`Named callout must have three arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return sS(h,i??null,o?.split(",")??null,e)}function Jp(e){let t=null,n,i;if(e[0]==="{"){const{minStr:o,maxStr:l}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||l&&+l>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,i=l===void 0?+o:l===""?1/0:+l,n>i&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return oS(t,n,i,e)}function dS(e){const t=e[1].toLowerCase();return Dr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function hS(e){const{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Dr("property",e,{value:i,negate:t==="P"&&!n||t==="p"&&!!n})}function Zp(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function pS(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const i=e[n];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function mS(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function gS(e,t){const{raw:n,inCharClass:i}=e,o=n.slice(1);if(!i&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[ey(n)];const l=[],a=o.match(/^[0-7]+|\d/g);for(let c=0;c<a.length;c++){const f=a[c];let h;if(c===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(gt`Octal encoded byte above 177 unsupported "${n}"`)}else h=Ii(f);l.push(Fn(h,(c===0?"\\":"")+f))}return l}function yS(e){const t=[],n=new RegExp(of,"gy");let i;for(;i=n.exec(e);){const o=i[0];if(o[0]==="{"){const l=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(l){const{min:a,max:c}=l.groups;if(+a>+c&&o.endsWith("?")){n.lastIndex--,t.push(Jp(o.slice(0,-1)));continue}}}t.push(Jp(o))}return t}function ny(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(i=>t[i]===n[i])}function wS(e){return vS.has(e.type)}const vS=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function ry(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=Q1(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(w,v)=>{const k=i.tokens[l.nextIndex];switch(l.parent=w,l.nextIndex++,k.type){case"Alternator":return zr();case"Assertion":return kS(k);case"Backreference":return xS(k,l);case"Character":return Rl(k.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return SS(k,l,v);case"CharacterClassOpen":return CS(k,l,v);case"CharacterSet":return _S(k,l);case"Directive":return AS(k.kind,{flags:k.flags});case"GroupOpen":return ES(k,l,v);case"NamedCallout":return LS(k.kind,k.tag,k.arguments);case"Quantifier":return bS(k,l);case"Subroutine":return IS(k,l);default:throw new Error(`Unexpected token type "${k.type}"`)}},l={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},a=jS(PS(i.flags));let c=a.body[0];for(;l.nextIndex<i.tokens.length;){const w=o(c,{});w.type==="Alternative"?(a.body.push(w),c=w):c.body.push(w)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=l;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:w}of m)if(typeof w=="number"){if(w>f.length)throw new Error("Subroutine uses a group number that's not defined");w&&(f[w-1].isSubroutined=!0)}else if(p.has(w)){if(p.get(w).length>1)throw new Error(gt`Subroutine uses a duplicate group name "\g<${w}>"`);p.get(w)[0].isSubroutined=!0}else throw new Error(gt`Subroutine uses a group name that's not defined "\g<${w}>"`);return a}function kS({kind:e}){return Ac(Ni({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===gt`\B`||e===gt`\Y`})}function xS({raw:e},t){const n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),o=(l,a=!1)=>{const c=t.capturingGroups.length;let f=!1;if(l>c)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Pc(a?c+1-l:l,{orphan:f})};if(n){const l=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(l)return o(+l.groups.num,!!l.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return Pc(i)}return o(+i)}function SS(e,t,n){const{tokens:i,walk:o}=t,l=t.parent,a=l.body.at(-1),c=i[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const f=o(l,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&f.type==="Character")return l.body.pop(),TS(a,f);throw new Error("Invalid character class range")}return Rl(Ii("-"))}function CS({negate:e},t,n){const{tokens:i,walk:o}=t,l=[cl()],a=i[t.nextIndex];let c=nm(a);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")l.push(cl()),t.nextIndex++;else{const h=l.at(-1);h.body.push(o(h,n))}c=nm(i[t.nextIndex],a)}const f=cl({negate:e});return l.length===1?f.body=l[0].body:(f.kind="intersection",f.body=l.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function _S({kind:e,negate:t,value:n},i){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a}=i;if(e==="property"){const c=jl(n);if(sf.has(c)&&!a?.has(c))e="posix",n=c;else return vi(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a})}return e==="posix"?RS(n,{negate:t}):Lc(e,{negate:t})}function ES(e,t,n){const{tokens:i,capturingGroups:o,namedGroupsByName:l,skipLookbehindValidation:a,walk:c}=t,f=OS(e),h=f.type==="AbsenceFunction",p=tm(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(o.push(f),f.name&&q1(l,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let w=rm(i[t.nextIndex]);for(;w.type!=="GroupClose";){if(w.type==="Alternator")f.body.push(zr()),t.nextIndex++;else{const v=f.body.at(-1),k=c(v,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(v.body.push(k),(p||n.isInLookbehind)&&!a){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(em(k)||k.type==="CapturingGroup")throw new Error(b)}else if(em(k)||tm(k)&&k.negate)throw new Error(b)}}w=rm(i[t.nextIndex])}return t.nextIndex++,f}function bS({kind:e,min:t,max:n},i){const o=i.parent,l=o.body.at(-1);if(!l||!wS(l))throw new Error("Quantifier requires a repeatable token");const a=sy(e,t,n,l);return o.body.pop(),a}function IS({raw:e},t){const{capturingGroups:n,subroutines:i}=t;let o=e.slice(3,-1);const l=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(l){const c=+l.groups.num,f=n.length;if(t.hasNumberedRef=!0,o={"":c,"+":f+c,"-":f+1-c}[l.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const a=oy(o);return i.push(a),a}function NS(e,t){return{type:"AbsenceFunction",kind:e,body:Ms(t?.body)}}function zr(e){return{type:"Alternative",body:ly(e?.body)}}function Ac(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function Pc(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function iy(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!MS(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ms(t?.body)}}function Rl(e,t){const n={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function cl(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:ly(e?.body)}}function TS(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Lc(e,t){const n=!!t?.negate,i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(i.variableLength=!0),i}function AS(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ni(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function PS(e){return{type:"Flags",...e}}function pn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ms(e?.body)}}function jr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ms(e?.body)}}function LS(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function RS(e,t){const n=!!t?.negate;if(!sf.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function sy(e,t,n,i){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function jS(e,t){return{type:"Regex",body:Ms(t?.body),flags:e}}function oy(e){return{type:"Subroutine",ref:e}}function vi(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=n.unicodePropertyMap?.get(jl(e));if(!i){if(n.normalizeUnknownPropertyNames)i=DS(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(gt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function OS({flags:e,kind:t,name:n,negate:i,number:o}){switch(t){case"absence_repeater":return NS("repeater");case"atomic":return pn({atomic:!0});case"capturing":return iy(o,{name:n});case"group":return pn({flags:e});case"lookahead":case"lookbehind":return jr({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ms(e){if(e===void 0)e=[zr()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function ly(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function em(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function tm(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function MS(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function DS(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function jl(e){return e.replace(/[- _]+/g,"").toLowerCase()}function nm(e,t){const n=t;return Ni(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function rm(e){return Ni(e,"Unclosed group")}function Ss(e,t,n=null){function i(l,a){for(let c=0;c<l.length;c++){const f=o(l[c],a,c,l);c=Math.max(-1,c+f)}}function o(l,a=null,c=null,f=null){let h=0,p=!1;const m={node:l,parent:a,key:c,container:f,root:e,remove(){el(f).splice(Math.max(0,mi(c)+h),1),h--,p=!0},removeAllNextSiblings(){return el(f).splice(mi(c)+1)},removeAllPrevSiblings(){const S=mi(c)+h;return h-=S,el(f).splice(0,Math.max(0,S))},replaceWith(S,I={}){const A=!!I.traverse;f?f[Math.max(0,mi(c)+h)]=S:Ni(a,"Can't replace root node")[c]=S,A&&o(S,a,c,f),p=!0},replaceWithMultiple(S,I={}){const A=!!I.traverse;if(el(f).splice(Math.max(0,mi(c)+h),1,...S),h+=S.length-1,A){let B=0;for(let P=0;P<S.length;P++)B+=o(S[P],a,mi(c)+P+B,f)}p=!0},skip(){p=!0}},{type:w}=l,v=t["*"],k=t[w],b=typeof v=="function"?v:v?.enter,E=typeof k=="function"?k:k?.enter;if(b?.(m,n),E?.(m,n),!p)switch(w){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(l.body,l);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(l.min,l,"min"),o(l.max,l,"max");break;case"Quantifier":o(l.body,l,"body");break;case"Regex":i(l.body,l),o(l.flags,l,"flags");break;default:throw new Error(`Unexpected node type "${w}"`)}return k?.exit?.(m,n),v?.exit?.(m,n),h}return o(e),e}function el(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function mi(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const FS=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function zS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function $S(e,t,n,i){return e.slice(0,t)+i+e.slice(t+n.length)}const on=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function lf(e,t,n,i){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),l=[!1];let a=0,c="";for(const f of e.matchAll(o)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!i||i===on.DEFAULT==!a)){n instanceof Function?c+=n(f,{context:a?on.CHAR_CLASS:on.DEFAULT,negated:l[l.length-1]}):c+=n;continue}h[0]==="["?(a++,l.push(h[1]==="^")):h==="]"&&a&&(a--,l.pop()),c+=h}return c}function ay(e,t,n,i){lf(e,t,n,i)}function BS(e,t,n=0,i){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let l=0,a;for(;a=o.exec(e);){const{0:c,groups:{$skip:f}}=a;if(!f&&(!i||i===on.DEFAULT==!l))return a;c==="["?l++:c==="]"&&l&&l--,o.lastIndex==a.index&&o.lastIndex++}return null}function tl(e,t,n){return!!BS(e,t,0,n)}function US(e,t){const n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,l=1,a;for(;a=n.exec(e);){const[c]=a;if(c==="[")o++;else if(o)c==="]"&&o--;else if(c==="(")l++;else if(c===")"&&(l--,!l)){i=a.index;break}}return e.slice(t,i)}const im=new RegExp(String.raw`(?<noncapturingStart>${FS})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function VS(e,t){const n=t?.hiddenCaptures??[];let i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};const o="(?>",l="(?:(?=(",a=[0],c=[];let f=0,h=0,p=NaN,m;do{m=!1;let w=0,v=0,k=!1,b;for(im.lastIndex=Number.isNaN(p)?0:p+l.length;b=im.exec(e);){const{0:E,index:S,groups:{capturingStart:I,noncapturingStart:A}}=b;if(E==="[")w++;else if(w)E==="]"&&w--;else if(E===o&&!k)p=S,k=!0;else if(k&&A)v++;else if(I)k?v++:(f++,a.push(f+h));else if(E===")"&&k){if(!v){h++;const B=f+h;if(e=`${e.slice(0,p)}${l}${e.slice(p+o.length,S)}))<$$${B}>)${e.slice(S+1)}`,m=!0,c.push(B),zS(n,B),i.size){const P=new Map;i.forEach((L,Q)=>{P.set(Q>=B?Q+1:Q,L.map(se=>se>=B?se+1:se))}),i=P}break}v--}}}while(m);return n.push(...c),e=lf(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:w,groups:{backrefNum:v,wrappedBackrefNum:k}})=>{if(v){const b=+v;if(b>a.length-1)throw new Error(`Backref "${w}" greater than number of captures`);return`\\${a[b]}`}return`\\${k}`},on.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:n}}const uy=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Hu=new RegExp(String.raw`
|
|
52
|
+
`.replace(/\s+/g,""),"gsu");function Q1(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=pS(n.flags),o=[i.extended],l={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(m){o.push(m)},replaceCurrentModX(m){o[o.length-1]=m},singleline:n.rules.singleline};let a=[],c;for(Zo.lastIndex=0;c=Zo.exec(e);){const m=X1(l,e,c[0],Zo.lastIndex);m.tokens?a.push(...m.tokens):m.token&&a.push(m.token),m.lastIndex!==void 0&&(Zo.lastIndex=m.lastIndex)}const f=[];let h=0;a.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,w)=>{m.kind="capturing",m.number=w+1});const p=h||f.length;return{tokens:a.map(m=>m.type==="EscapedNumber"?gS(m,p):m).flat(),flags:i}}function X1(e,t,n,i){const[o,l]=n;if(n==="["||n==="[^"){const a=Y1(t,n,i);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(l))return{token:qp(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:lS(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Zg(n)}}if(l==="K")return{token:ey("keep",n)};if(l==="N"||l==="R")return{token:Dr("newline",n,{negate:l==="N"})};if(l==="O")return{token:Dr("any",n)};if(l==="X")return{token:Dr("text_segment",n)};const a=Jg(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(o==="("){if(l==="*")return{token:fS(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[i]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:cS(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:wi("group",n)};if(n==="(?>")return{token:wi("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:wi(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:wi("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:wi("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:iS(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
53
|
+
`,i);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=i,{lastIndex:a.exec(t)?a.lastIndex:i}}}if(n===".")return{token:Dr("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":gt`\A`,$:gt`\Z`}[n]:n;return{token:qp(a,n)}}return n==="|"?{token:Z1(n)}:of.test(n)?{tokens:yS(n)}:{token:Fn(Ii(n),n)}}function Y1(e,t,n){const i=[Qp(t[1]==="^",t)];let o=1,l;for(Wu.lastIndex=n;l=Wu.exec(e);){const a=l[0];if(a[0]==="["&&a[1]!==":")o++,i.push(Qp(a[1]==="^",a));else if(a==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(Fn(93,a));else if(o--,i.push(eS(a)),!o)break}else{const c=J1(a);Array.isArray(c)?i.push(...c):i.push(c)}}return{tokens:i,lastIndex:Wu.lastIndex||e.length}}function J1(e){if(e[0]==="\\")return Jg(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!sf.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Dr("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?tS(e):e==="&&"?nS(e):Fn(Ii(e),e)}function Jg(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return uS(e);if("dDhHsSwW".includes(n))return dS(e);if(e.startsWith(gt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return hS(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),l=new TextEncoder;return[...o].map(a=>{const c=[...l.encode(a)].map(f=>`\\x${f.toString(16)}`).join("");return Fn(Ii(a),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Fn(mS(e),e);if(Xp.has(n))return Fn(Xp.get(n),e);if(/\d/.test(n))return rS(t,e);if(e==="\\")throw new Error(gt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Fn(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Z1(e){return{type:"Alternator",raw:e}}function qp(e,t){return{type:"Assertion",kind:e,raw:t}}function Zg(e){return{type:"Backreference",raw:e}}function Fn(e,t){return{type:"Character",value:e,raw:t}}function eS(e){return{type:"CharacterClassClose",raw:e}}function tS(e){return{type:"CharacterClassHyphen",raw:e}}function nS(e){return{type:"CharacterClassIntersector",raw:e}}function Qp(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Dr(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function ey(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ni(n.flags),raw:t}}function rS(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function iS(e){return{type:"GroupClose",raw:e}}function wi(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function sS(e,t,n,i){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:i}}function oS(e,t,n,i){return{type:"Quantifier",kind:e,min:t,max:n,raw:i}}function lS(e){return{type:"Subroutine",raw:e}}const aS=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Xp=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function uS(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Fn(Ii(t.toUpperCase())-64,e)}function cS(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";const o=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),l=Jp(n),a=Jp(i),c={};if(l&&(c.enable=l),a&&(c.disable=a),e.endsWith(")"))return t.replaceCurrentModX(o),ey("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,wi("group",e,{...(l||a)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function fS(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:i,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const l=o?o.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[a,c,f]=l,h=aS.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(l.length>0)throw new Error(`Named callout arguments not allowed "${l}"`);break;case"error":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!l.length||l.length>2)throw new Error(`Named callout must have one or two arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(l.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(l.length>1)throw new Error(`Named callout allows only one argument "${l}"`);if(l.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(l.length!==3)throw new Error(`Named callout must have three arguments "${l}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return sS(h,i??null,o?.split(",")??null,e)}function Yp(e){let t=null,n,i;if(e[0]==="{"){const{minStr:o,maxStr:l}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+o>a||l&&+l>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,i=l===void 0?+o:l===""?1/0:+l,n>i&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return oS(t,n,i,e)}function dS(e){const t=e[1].toLowerCase();return Dr({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function hS(e){const{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Dr("property",e,{value:i,negate:t==="P"&&!n||t==="p"&&!!n})}function Jp(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function pS(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const i=e[n];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function mS(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function gS(e,t){const{raw:n,inCharClass:i}=e,o=n.slice(1);if(!i&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[Zg(n)];const l=[],a=o.match(/^[0-7]+|\d/g);for(let c=0;c<a.length;c++){const f=a[c];let h;if(c===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(gt`Octal encoded byte above 177 unsupported "${n}"`)}else h=Ii(f);l.push(Fn(h,(c===0?"\\":"")+f))}return l}function yS(e){const t=[],n=new RegExp(of,"gy");let i;for(;i=n.exec(e);){const o=i[0];if(o[0]==="{"){const l=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(l){const{min:a,max:c}=l.groups;if(+a>+c&&o.endsWith("?")){n.lastIndex--,t.push(Yp(o.slice(0,-1)));continue}}}t.push(Yp(o))}return t}function ty(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(i=>t[i]===n[i])}function wS(e){return vS.has(e.type)}const vS=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function ny(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=Q1(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(w,v)=>{const k=i.tokens[l.nextIndex];switch(l.parent=w,l.nextIndex++,k.type){case"Alternator":return zr();case"Assertion":return kS(k);case"Backreference":return xS(k,l);case"Character":return Rl(k.value,{useLastValid:!!v.isCheckingRangeEnd});case"CharacterClassHyphen":return SS(k,l,v);case"CharacterClassOpen":return CS(k,l,v);case"CharacterSet":return _S(k,l);case"Directive":return AS(k.kind,{flags:k.flags});case"GroupOpen":return ES(k,l,v);case"NamedCallout":return LS(k.kind,k.tag,k.arguments);case"Quantifier":return bS(k,l);case"Subroutine":return IS(k,l);default:throw new Error(`Unexpected token type "${k.type}"`)}},l={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},a=jS(PS(i.flags));let c=a.body[0];for(;l.nextIndex<i.tokens.length;){const w=o(c,{});w.type==="Alternative"?(a.body.push(w),c=w):c.body.push(w)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=l;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:w}of m)if(typeof w=="number"){if(w>f.length)throw new Error("Subroutine uses a group number that's not defined");w&&(f[w-1].isSubroutined=!0)}else if(p.has(w)){if(p.get(w).length>1)throw new Error(gt`Subroutine uses a duplicate group name "\g<${w}>"`);p.get(w)[0].isSubroutined=!0}else throw new Error(gt`Subroutine uses a group name that's not defined "\g<${w}>"`);return a}function kS({kind:e}){return Ac(Ni({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===gt`\B`||e===gt`\Y`})}function xS({raw:e},t){const n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),o=(l,a=!1)=>{const c=t.capturingGroups.length;let f=!1;if(l>c)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Pc(a?c+1-l:l,{orphan:f})};if(n){const l=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(l)return o(+l.groups.num,!!l.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return Pc(i)}return o(+i)}function SS(e,t,n){const{tokens:i,walk:o}=t,l=t.parent,a=l.body.at(-1),c=i[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const f=o(l,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&f.type==="Character")return l.body.pop(),TS(a,f);throw new Error("Invalid character class range")}return Rl(Ii("-"))}function CS({negate:e},t,n){const{tokens:i,walk:o}=t,l=[cl()],a=i[t.nextIndex];let c=tm(a);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")l.push(cl()),t.nextIndex++;else{const h=l.at(-1);h.body.push(o(h,n))}c=tm(i[t.nextIndex],a)}const f=cl({negate:e});return l.length===1?f.body=l[0].body:(f.kind="intersection",f.body=l.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function _S({kind:e,negate:t,value:n},i){const{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a}=i;if(e==="property"){const c=jl(n);if(sf.has(c)&&!a?.has(c))e="posix",n=c;else return vi(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:l,unicodePropertyMap:a})}return e==="posix"?RS(n,{negate:t}):Lc(e,{negate:t})}function ES(e,t,n){const{tokens:i,capturingGroups:o,namedGroupsByName:l,skipLookbehindValidation:a,walk:c}=t,f=OS(e),h=f.type==="AbsenceFunction",p=em(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(o.push(f),f.name&&q1(l,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let w=nm(i[t.nextIndex]);for(;w.type!=="GroupClose";){if(w.type==="Alternator")f.body.push(zr()),t.nextIndex++;else{const v=f.body.at(-1),k=c(v,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(v.body.push(k),(p||n.isInLookbehind)&&!a){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(Zp(k)||k.type==="CapturingGroup")throw new Error(b)}else if(Zp(k)||em(k)&&k.negate)throw new Error(b)}}w=nm(i[t.nextIndex])}return t.nextIndex++,f}function bS({kind:e,min:t,max:n},i){const o=i.parent,l=o.body.at(-1);if(!l||!wS(l))throw new Error("Quantifier requires a repeatable token");const a=iy(e,t,n,l);return o.body.pop(),a}function IS({raw:e},t){const{capturingGroups:n,subroutines:i}=t;let o=e.slice(3,-1);const l=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(l){const c=+l.groups.num,f=n.length;if(t.hasNumberedRef=!0,o={"":c,"+":f+c,"-":f+1-c}[l.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);const a=sy(o);return i.push(a),a}function NS(e,t){return{type:"AbsenceFunction",kind:e,body:Ms(t?.body)}}function zr(e){return{type:"Alternative",body:oy(e?.body)}}function Ac(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function Pc(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function ry(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!MS(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ms(t?.body)}}function Rl(e,t){const n={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function cl(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:oy(e?.body)}}function TS(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Lc(e,t){const n=!!t?.negate,i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(i.variableLength=!0),i}function AS(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ni(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function PS(e){return{type:"Flags",...e}}function pn(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ms(e?.body)}}function jr(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ms(e?.body)}}function LS(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function RS(e,t){const n=!!t?.negate;if(!sf.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function iy(e,t,n,i){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function jS(e,t){return{type:"Regex",body:Ms(t?.body),flags:e}}function sy(e){return{type:"Subroutine",ref:e}}function vi(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=n.unicodePropertyMap?.get(jl(e));if(!i){if(n.normalizeUnknownPropertyNames)i=DS(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(gt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function OS({flags:e,kind:t,name:n,negate:i,number:o}){switch(t){case"absence_repeater":return NS("repeater");case"atomic":return pn({atomic:!0});case"capturing":return ry(o,{name:n});case"group":return pn({flags:e});case"lookahead":case"lookbehind":return jr({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ms(e){if(e===void 0)e=[zr()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function oy(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function Zp(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function em(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function MS(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function DS(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function jl(e){return e.replace(/[- _]+/g,"").toLowerCase()}function tm(e,t){const n=t;return Ni(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function nm(e){return Ni(e,"Unclosed group")}function Ss(e,t,n=null){function i(l,a){for(let c=0;c<l.length;c++){const f=o(l[c],a,c,l);c=Math.max(-1,c+f)}}function o(l,a=null,c=null,f=null){let h=0,p=!1;const m={node:l,parent:a,key:c,container:f,root:e,remove(){el(f).splice(Math.max(0,mi(c)+h),1),h--,p=!0},removeAllNextSiblings(){return el(f).splice(mi(c)+1)},removeAllPrevSiblings(){const S=mi(c)+h;return h-=S,el(f).splice(0,Math.max(0,S))},replaceWith(S,I={}){const A=!!I.traverse;f?f[Math.max(0,mi(c)+h)]=S:Ni(a,"Can't replace root node")[c]=S,A&&o(S,a,c,f),p=!0},replaceWithMultiple(S,I={}){const A=!!I.traverse;if(el(f).splice(Math.max(0,mi(c)+h),1,...S),h+=S.length-1,A){let $=0;for(let P=0;P<S.length;P++)$+=o(S[P],a,mi(c)+P+$,f)}p=!0},skip(){p=!0}},{type:w}=l,v=t["*"],k=t[w],b=typeof v=="function"?v:v?.enter,E=typeof k=="function"?k:k?.enter;if(b?.(m,n),E?.(m,n),!p)switch(w){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(l.body,l);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(l.min,l,"min"),o(l.max,l,"max");break;case"Quantifier":o(l.body,l,"body");break;case"Regex":i(l.body,l),o(l.flags,l,"flags");break;default:throw new Error(`Unexpected node type "${w}"`)}return k?.exit?.(m,n),v?.exit?.(m,n),h}return o(e),e}function el(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function mi(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const FS=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function zS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function $S(e,t,n,i){return e.slice(0,t)+i+e.slice(t+n.length)}const on=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function lf(e,t,n,i){const o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),l=[!1];let a=0,c="";for(const f of e.matchAll(o)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!i||i===on.DEFAULT==!a)){n instanceof Function?c+=n(f,{context:a?on.CHAR_CLASS:on.DEFAULT,negated:l[l.length-1]}):c+=n;continue}h[0]==="["?(a++,l.push(h[1]==="^")):h==="]"&&a&&(a--,l.pop()),c+=h}return c}function ly(e,t,n,i){lf(e,t,n,i)}function BS(e,t,n=0,i){if(!new RegExp(t,"su").test(e))return null;const o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let l=0,a;for(;a=o.exec(e);){const{0:c,groups:{$skip:f}}=a;if(!f&&(!i||i===on.DEFAULT==!l))return a;c==="["?l++:c==="]"&&l&&l--,o.lastIndex==a.index&&o.lastIndex++}return null}function tl(e,t,n){return!!BS(e,t,0,n)}function US(e,t){const n=/\\?./gsu;n.lastIndex=t;let i=e.length,o=0,l=1,a;for(;a=n.exec(e);){const[c]=a;if(c==="[")o++;else if(o)c==="]"&&o--;else if(c==="(")l++;else if(c===")"&&(l--,!l)){i=a.index;break}}return e.slice(t,i)}const rm=new RegExp(String.raw`(?<noncapturingStart>${FS})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function VS(e,t){const n=t?.hiddenCaptures??[];let i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};const o="(?>",l="(?:(?=(",a=[0],c=[];let f=0,h=0,p=NaN,m;do{m=!1;let w=0,v=0,k=!1,b;for(rm.lastIndex=Number.isNaN(p)?0:p+l.length;b=rm.exec(e);){const{0:E,index:S,groups:{capturingStart:I,noncapturingStart:A}}=b;if(E==="[")w++;else if(w)E==="]"&&w--;else if(E===o&&!k)p=S,k=!0;else if(k&&A)v++;else if(I)k?v++:(f++,a.push(f+h));else if(E===")"&&k){if(!v){h++;const $=f+h;if(e=`${e.slice(0,p)}${l}${e.slice(p+o.length,S)}))<$$${$}>)${e.slice(S+1)}`,m=!0,c.push($),zS(n,$),i.size){const P=new Map;i.forEach((L,Q)=>{P.set(Q>=$?Q+1:Q,L.map(oe=>oe>=$?oe+1:oe))}),i=P}break}v--}}}while(m);return n.push(...c),e=lf(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:w,groups:{backrefNum:v,wrappedBackrefNum:k}})=>{if(v){const b=+v;if(b>a.length-1)throw new Error(`Backref "${w}" greater than number of captures`);return`\\${a[b]}`}return`\\${k}`},on.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:n}}const ay=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Hu=new RegExp(String.raw`
|
|
54
54
|
\\(?: \d+
|
|
55
55
|
| c[A-Za-z]
|
|
56
56
|
| [gk]<[^>]+>
|
|
@@ -63,9 +63,9 @@ cwd: ${a.cwd}`,children:["nvim",a.pid?` #${a.pid}`:""]})}else l=C.jsxs("select",
|
|
|
63
63
|
| [A-Za-z\-]+:
|
|
64
64
|
| \(DEFINE\)
|
|
65
65
|
))?
|
|
66
|
-
| (?<qBase>${
|
|
66
|
+
| (?<qBase>${ay})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
67
|
| \\?.
|
|
68
|
-
`.replace(/\s+/g,""),"gsu");function GS(e){if(!new RegExp(`${
|
|
68
|
+
`.replace(/\s+/g,""),"gsu");function GS(e){if(!new RegExp(`${ay}\\+`).test(e))return{pattern:e};const t=[];let n=null,i=null,o="",l=0,a;for(Hu.lastIndex=0;a=Hu.exec(e);){const{0:c,index:f,groups:{qBase:h,qMod:p,invalidQ:m}}=a;if(c==="[")l||(i=f),l++;else if(c==="]")l?l--:i=null;else if(!l)if(p==="+"&&o&&!o.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let w=-1;if(/^\{\d+\}$/.test(h))e=$S(e,f+h.length,p,"");else{if(o===")"||o==="]"){const v=o===")"?n:i;if(v===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,v)}(?>${e.slice(v,f)}${h})${e.slice(f+c.length)}`}else e=`${e.slice(0,f-o.length)}(?>${o}${h})${e.slice(f+c.length)}`;w+=4}Hu.lastIndex+=w}else c[0]==="("?t.push(f):c===")"&&(n=t.length?t.pop():null);o=c}return{pattern:e}}const sn=String.raw,WS=sn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Rc=sn`\(\?R=(?<rDepth>[^\)]+)\)|${WS}`,Ol=sn`\(\?<(?![=!])(?<captureName>[^>]+)>`,uy=sn`${Ol}|(?<unnamed>\()(?!\?)`,Ar=new RegExp(sn`${Ol}|${Rc}|\(\?|\\?.`,"gsu"),Ku="Cannot use multiple overlapping recursions";function HS(e,t){const{hiddenCaptures:n,mode:i}={hiddenCaptures:[],mode:"plugin",...t};let o=t?.captureTransfers??new Map;if(!new RegExp(Rc,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(i==="plugin"&&tl(e,sn`\(\?\(DEFINE\)`,on.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const l=[],a=tl(e,sn`\\[1-9]`,on.DEFAULT),c=new Map,f=[];let h=!1,p=0,m=0,w;for(Ar.lastIndex=0;w=Ar.exec(e);){const{0:v,groups:{captureName:k,rDepth:b,gRNameOrNum:E,gRDepth:S}}=w;if(v==="[")p++;else if(p)v==="]"&&p--;else if(b){if(im(b),h)throw new Error(Ku);if(a)throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const I=e.slice(0,w.index),A=e.slice(Ar.lastIndex);if(tl(A,Rc,on.DEFAULT))throw new Error(Ku);const $=+b-1;e=sm(I,A,$,!1,n,l,m),o=lm(o,I,$,l.length,0,m);break}else if(E){im(S);let I=!1;for(const re of f)if(re.name===E||re.num===+E){if(I=!0,re.hasRecursedWithin)throw new Error(Ku);break}if(!I)throw new Error(sn`Recursive \g cannot be used outside the referenced group "${i==="external"?E:sn`\g<${E}&R=${S}>`}"`);const A=c.get(E),$=US(e,A);if(a&&tl($,sn`${Ol}|\((?!\?)`,on.DEFAULT))throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const P=e.slice(A,w.index),L=$.slice(P.length+v.length),Q=l.length,oe=+S-1,ue=sm(P,L,oe,!0,n,l,m);o=lm(o,P,oe,l.length-Q,Q,m);const D=e.slice(0,A),ne=e.slice(A+$.length);e=`${D}${ue}${ne}`,Ar.lastIndex+=ue.length-v.length-P.length-L.length,f.forEach(re=>re.hasRecursedWithin=!0),h=!0}else if(k)m++,c.set(String(m),Ar.lastIndex),c.set(k,Ar.lastIndex),f.push({num:m,name:k});else if(v[0]==="("){const I=v==="(";I&&(m++,c.set(String(m),Ar.lastIndex)),f.push(I?{num:m}:{})}else v===")"&&f.pop()}return n.push(...l),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function im(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function sm(e,t,n,i,o,l,a){const c=new Set;i&&ly(e+t,Ol,({groups:{captureName:h}})=>{c.add(h)},on.DEFAULT);const f=[n,i?c:null,o,l,a];return`${e}${om(`(?:${e}`,"forward",...f)}(?:)${om(`${t})`,"backward",...f)}${t}`}function om(e,t,n,i,o,l,a){const f=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=f(p);h+=lf(e,sn`${uy}|\\k<(?<backref>[^>]+)>`,({0:w,groups:{captureName:v,unnamed:k,backref:b}})=>{if(b&&i&&!i.has(b))return w;const E=`_$${m}`;if(k||v){const S=a+l.length+1;return l.push(S),KS(o,S),k?w:`(?<${v}${E}>`}return sn`\k<${b}${E}>`},on.DEFAULT)}return h}function KS(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function lm(e,t,n,i,o,l){if(e.size&&i){let a=0;ly(t,uy,()=>a++,on.DEFAULT);const c=l-a+o,f=new Map;return e.forEach((h,p)=>{const m=(i-a*n)/n,w=a*n,v=p>c+a?p+i:p,k=[];for(const b of h)if(b<=c)k.push(b);else if(b>c+a+m)k.push(b+i);else if(b<=c+a)for(let E=0;E<=n;E++)k.push(b+a*E);else for(let E=0;E<=n;E++)k.push(b+w+m*E);f.set(v,k)}),f}return e}var ct=String.fromCodePoint,Ne=String.raw,mn={},Ml=globalThis.RegExp;mn.flagGroups=(()=>{try{new Ml("(?i:)")}catch{return!1}return!0})();mn.unicodeSets=(()=>{try{new Ml("[[]]","v")}catch{return!1}return!0})();mn.bugFlagVLiteralHyphenIsRange=mn.unicodeSets?(()=>{try{new Ml(Ne`[\d\-a]`,"v")}catch{return!0}return!1})():!1;mn.bugNestedClassIgnoresNegation=mn.unicodeSets&&new Ml("[[^a]]","v").test("a");function El(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function As(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function jc(e,t){return am[e]>=am[t]}function qS(e,t){if(e==null)throw new Error(t??"Value expected");return e}var am={ES2025:2025,ES2024:2024,ES2018:2018},QS={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function cy(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!QS[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=mn.flagGroups?"ES2025":mn.unicodeSets?"ES2024":"ES2018"),t}var XS="[ -\r ]",YS=new Set([ct(304),ct(305)]),On=Ne`[\p{L}\p{M}\p{N}\p{Pc}]`;function fy(e){if(YS.has(e))return[e];const t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),o=eC.get(n),l=JS.get(n),a=ZS.get(n);return[...i].length===1&&t.add(i),a&&t.add(a),o&&t.add(o),t.add(n),l&&t.add(l),[...t]}var af=new Map(`C Other
|
|
69
69
|
Cc Control cntrl
|
|
70
70
|
Cf Format
|
|
71
71
|
Cn Unassigned
|
|
@@ -155,38 +155,38 @@ Uppercase Upper
|
|
|
155
155
|
Variation_Selector VS
|
|
156
156
|
White_Space space
|
|
157
157
|
XID_Continue XIDC
|
|
158
|
-
XID_Start XIDS`.split(/\s/).map(e=>[jl(e),e])),JS=new Map([["s",ct(383)],[ct(383),"s"]]),ZS=new Map([[ct(223),ct(7838)],[ct(107),ct(8490)],[ct(229),ct(8491)],[ct(969),ct(8486)]]),eC=new Map([cr(453),cr(456),cr(459),cr(498),...qu(8072,8079),...qu(8088,8095),...qu(8104,8111),cr(8124),cr(8140),cr(8188)]),tC=new Map([["alnum",Ne`[\p{Alpha}\p{Nd}]`],["alpha",Ne`\p{Alpha}`],["ascii",Ne`\p{ASCII}`],["blank",Ne`[\p{Zs}\t]`],["cntrl",Ne`\p{Cc}`],["digit",Ne`\p{Nd}`],["graph",Ne`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ne`\p{Lower}`],["print",Ne`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ne`[\p{P}\p{S}]`],["space",Ne`\p{space}`],["upper",Ne`\p{Upper}`],["word",Ne`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ne`\p{AHex}`]]);function nC(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function cr(e){const t=ct(e);return[t.toLowerCase(),t]}function qu(e,t){return nC(e,t).map(n=>cr(n))}var
|
|
158
|
+
XID_Start XIDS`.split(/\s/).map(e=>[jl(e),e])),JS=new Map([["s",ct(383)],[ct(383),"s"]]),ZS=new Map([[ct(223),ct(7838)],[ct(107),ct(8490)],[ct(229),ct(8491)],[ct(969),ct(8486)]]),eC=new Map([cr(453),cr(456),cr(459),cr(498),...qu(8072,8079),...qu(8088,8095),...qu(8104,8111),cr(8124),cr(8140),cr(8188)]),tC=new Map([["alnum",Ne`[\p{Alpha}\p{Nd}]`],["alpha",Ne`\p{Alpha}`],["ascii",Ne`\p{ASCII}`],["blank",Ne`[\p{Zs}\t]`],["cntrl",Ne`\p{Cc}`],["digit",Ne`\p{Nd}`],["graph",Ne`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ne`\p{Lower}`],["print",Ne`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ne`[\p{P}\p{S}]`],["space",Ne`\p{space}`],["upper",Ne`\p{Upper}`],["word",Ne`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ne`\p{AHex}`]]);function nC(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function cr(e){const t=ct(e);return[t.toLowerCase(),t]}function qu(e,t){return nC(e,t).map(n=>cr(n))}var dy=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function rC(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};hy(e);const i={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:jc(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Ss(e,iC,i);const o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},l={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap};Ss(e,sC,l);const a={groupsByName:l.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:l.reffedNodesByReferencer};return Ss(e,oC,a),e._originMap=l.groupOriginByCopy,e._strategy=i.strategy,e}var iC={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:i,kind:o}=e;if(o==="repeater"){const l=pn();l.body[0].body.push(jr({negate:!0,body:i}),vi("Any"));const a=pn();a.body[0].body.push(iy("greedy",0,1/0,l)),n(it(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){const o=e.body.filter(l=>l.kind==="flags");for(let l=n+1;l<t.body.length;l++){const a=t.body[l];As(i,a,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=my(t.get(e));if(n){const i=pn({flags:n});i.body[0].body=e.body,e.body=[it(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:o,remove:l,replaceWith:a},c){const{kind:f,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:w,wordIsAscii:v}=c;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")a(it(jr({body:[zr({body:[Ac("string_end")]}),zr({body:[Rl(10)]})]}),t));else if(f==="line_start")a(it(Mn(Ne`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(w.has(e))o.flags.sticky=!0,l();else{const k=i[n-1];if(k&&dC(k))a(it(jr({negate:!0}),t));else{if(m)throw new Error(Ne`Uses "\G" in a way that requires a subclass`);a(fr(Ac("string_start"),t)),c.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")a(it(Mn(Ne`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!v&&!p){const k=`(?:(?<=${On})(?!${On})|(?<!${On})(?=${On}))`,b=`(?:(?<=${On})(?=${On})|(?<!${On})(?!${On}))`;a(it(Mn(h?b:k),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Xu(n)&&(n=Qu(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!Xu(i)&&(i=Qu(i,t),e.name=i),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const i=cl({body:[e]});n(it(i,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:o,digitIsAscii:l,spaceIsAscii:a,wordIsAscii:c}){const{kind:f,negate:h,value:p}=e;if(l&&(f==="digit"||p==="digit")){n(fr(Lc("digit",{negate:h}),t));return}if(a&&(f==="space"||p==="space")){n(it(Yu(Mn(XS),h),t));return}if(c&&(f==="word"||p==="word")){n(fr(Lc("word",{negate:h}),t));return}if(f==="any")n(fr(vi("Any"),t));else if(f==="digit")n(fr(vi("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(i==="strict")throw new Error(Ne`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",w=Ne`\p{RI}{2}|${m}(?:\u200D${m})*`;n(it(Mn(Ne`(?>\r\n|${o?Ne`\p{RGI_Emoji}`:w}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")n(fr(vi("AHex",{negate:h}),t));else if(f==="newline")n(it(Mn(h?`[^
|
|
159
159
|
]`:`(?>\r
|
|
160
160
|
?|[
|
|
161
|
-
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!o&&(p==="graph"||p==="print")){if(i==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${ct(m.codePointAt(0)-1)}${ct(m.codePointAt(2)+1)}-`),n(it(Mn(`[${m}]`),t))}else n(it(Yu(Mn(tC.get(p)),h),t));else if(f==="property")af.has(jl(p))||(e.key="sc");else if(f==="space")n(fr(vi("space",{negate:h}),t));else if(f==="word")n(it(Yu(Mn(On),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:o,removeAllPrevSiblings:l,removeAllNextSiblings:a}){const{kind:c,flags:f}=e;if(c==="flags")if(!f.enable&&!f.disable)i();else{const h=pn({flags:f});h.body[0].body=a(),o(it(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&ny(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Ne`Uses "\K" in a way that's unsupported`);const w=jr({behind:!0});w.body[0].body=l(),o(it(w,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:i}=e;if(i==="fail")n(it(jr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=pn();t.body[0].body.push(e.body),e.body=it(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let i=!1,o=!1;for(const l of e.body)if(l.body.length===1&&l.body[0].kind==="search_start")l.body.pop();else{const a=wy(l.body);a?(i=!0,Array.isArray(a)?n.push(...a):n.push(a)):o=!0}i&&!o&&n.forEach(l=>t.add(l))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if(t==="strict"&&n&&i)throw new Error(Ne`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Xu(n)&&(n=Qu(n,t),e.ref=n)}},sC={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:i,ref:o}=e;i||n.set(e,[...t.get(o).map(({node:l})=>l)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:o,groupsByName:l,multiplexCapturesToLeftByRef:a,openRefs:c,reffedNodesByReferencer:f}){const h=o.get(e);if(h&&c.has(e.number)){const m=fr(cm(e.number),t);f.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),a.set(e.number,[]),e.name&&As(a,e.name,[]);const p=a.get(e.name??e.number);for(let m=0;m<p.length;m++){const w=p[m];if(h===w.node||h&&h===w.origin||e===w.origin){p.splice(m,1);break}}if(a.get(e.number).push({node:e,origin:h}),e.name&&a.get(e.name).push({node:e,origin:h}),e.name){const m=As(l,e.name,new Map);let w=!1;if(h)w=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){w=!0;break}l.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:w})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=El(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){const{isRecursive:o,ref:l}=e;if(o){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===l||p.number===l)););i.reffedNodesByReferencer.set(e,p);return}const a=i.subroutineRefMap.get(l),c=l===0,f=c?cm(0):my(a,i.groupOriginByCopy,null);let h=f;if(!c){const p=gy(uC(a,w=>w.type==="Group"&&!!w.flags)),m=p?El(i.globalFlags,p):i.globalFlags;lC(m,i.currentFlags)||(h=pn({flags:cC(m)}),h.body[0].body.push(f))}n(it(h,t),{traverse:!c})}},oC={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const l=i.reffedNodesByReferencer.get(e).filter(a=>aC(a,e));if(!l.length)n(it(jr({negate:!0}),t));else if(l.length>1){const a=pn({atomic:!0,body:l.reverse().map(c=>zr({body:[Pc(c.number)]}))});n(it(a,t))}else e.ref=l[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<n;i++){const o=iy();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function py(e){Ss(e,{"*"({node:t,parent:n}){t.parent=n}})}function lC(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function aC(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const i=yy(n.parent);for(const o of i){if(o===n)break;if(o===e||vy(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function my(e,t,n,i){const o=Array.isArray(e)?[]:{};for(const[l,a]of Object.entries(e))l==="parent"?o.parent=Array.isArray(n)?i:n:a&&typeof a=="object"?o[l]=my(a,t,o,n):(l==="type"&&a==="CapturingGroup"&&t.set(o,t.get(e)??e),o[l]=a);return o}function cm(e){const t=oy(e);return t.isRecursive=!0,t}function uC(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Qu(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function gy(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(o=>{i.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),i.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function cC({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function yy(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function wy(e){const t=e.find(n=>n.kind==="search_start"||hC(n,{negate:!1})||!fC(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const i of t.body){const o=wy(i.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function vy(e,t){const n=yy(e)??[];for(const i of n)if(i===t||vy(i,t))return!0;return!1}function fC({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function dC(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function hC(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&ny(e.body[0],{type:"Assertion",kind:"search_start"})}function Xu(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Mn(e,t){const i=ry(e,{...t,unicodePropertyMap:af}).body;return i.length>1||i[0].body.length>1?pn({body:i}):i[0].body[0]}function Yu(e,t){return e.negate=t,e}function fr(e,t){return e.parent=t,e}function it(e,t){return py(e),e.parent=t,e}function pC(e,t){const n=fy(t),i=jc(n.target,"ES2024"),o=jc(n.target,"ES2025"),l=n.rules.recursionLimit;if(!Number.isInteger(l)||l<2||l>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,c=null;if(!o){const v=[e.flags.ignoreCase];Ss(e,mC,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(k){v.push(k)},setHasCasedChar(){v.at(-1)?a=!0:c=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:l,useAppliedIgnoreCase:!!(!o&&a&&c),useFlagMods:o,useFlagV:i,verbose:n.verbose};function m(v){return p.lastNode=h,h=v,qS(gC[v.type],`Unexpected node type "${v.type}"`)(v,p,m)}const w={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return i||(delete w.options.force.v,w.options.disable.v=!0,w.options.unicodeSetsPlugin=null),w._captureTransfers=new Map,w._hiddenCaptures=[],p.captureMap.forEach((v,k)=>{v.hidden&&w._hiddenCaptures.push(k),v.transferTo&&As(w._captureTransfers,v.transferTo,[]).push(k)}),w}var mC={"*":{enter({node:e},t){if(dm(e)){const n=t.getCurrentModI();t.pushModI(e.flags?El({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){dm(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){uf(ct(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),ky(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&hy.has(e.value)&&t.setHasCasedChar()}},gC={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ne`\B`:Ne`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:i,name:o,number:l}=e,a={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(a.hidden=!0,l>c.number&&(a.transferTo=c.number)),t.captureMap.set(l,a),`(${o?`?<${o}>`:""}${i.map(n).join("|")})`},Character({value:e},t){const n=ct(e),i=gi(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&uf(n)){const o=dy(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:i,negate:o,parent:l}=e;let{body:a}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(hm)&&(a=[Rl(45),...a.filter(h=>!hm(h))]);const c=()=>`[${o?"^":""}${a.map(n).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||mn.bugNestedClassIgnoresNegation)&&!o){const p=a.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=pn(),w=m.body[0];return m.parent=l,w.parent=m,a=a.filter(v=>!p.includes(v)),e.body=a,a.length?(e.parent=w,w.body.push(e)):m.body.pop(),p.forEach(v=>{const k=zr({body:[v]});v.parent=k,k.parent=m,m.body.push(k)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const f=a[0];if(i==="union"&&!o&&f&&((!t.useFlagV||!t.verbose)&&l.kind==="union"&&!(mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&l.kind==="intersection"&&a.length===1&&f.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&l.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,i=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},l=gi(n,o),a=gi(i,o),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=ky(e);xC(f).forEach(p=>{c.add(Array.isArray(p)?`${gi(p[0],o)}-${gi(p[1],o)}`:gi(p,o))})}return`${l}-${a}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ne`[^\n]`;if(e==="digit")return t?Ne`\D`:Ne`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&hy.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ne`\P`:Ne`\p`}{${i?`${i}=`:""}${n}}`}if(e==="word")return t?Ne`\W`:Ne`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:i},o,l){const a=o.currentFlags;n&&(o.currentFlags=El(a,n));const c=t.map(l).join("|"),f=!o.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?c:`(?${SC(e,n,o.useFlagMods)}${c})`;return o.currentFlags=a,f},LookaroundAssertion({body:e,kind:t,negate:n},i,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+CC(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=n.recursionLimit;return t===0?`(?R=${i})`:Ne`\g<${t}&R=${i}>`}},yC=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),wC=new Set(["-","\\","]","^","["]),vC=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),fm=new Map([[9,Ne`\t`],[10,Ne`\n`],[11,Ne`\v`],[12,Ne`\f`],[13,Ne`\r`],[8232,Ne`\u2028`],[8233,Ne`\u2029`],[65279,Ne`\uFEFF`]]),kC=new RegExp("^\\p{Cased}$","u");function uf(e){return kC.test(e)}function ky(e,t){const n=!!t?.firstOnly,i=e.min.value,o=e.max.value,l=[];if(i<65&&(o===65535||o>=131071)||i===65536&&o>=131071)return l;for(let a=i;a<=o;a++){const c=ct(a);if(!uf(c))continue;const f=dy(c).filter(h=>{const p=h.codePointAt(0);return p<i||p>o});if(f.length&&(l.push(...f),n))break}return l}function gi(e,{escDigit:t,inCharClass:n,useFlagV:i}){if(fm.has(e))return fm.get(e);if(e<32||e>126&&e<160||e>262143||t&&_C(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?i?vC:wC:yC,l=ct(e);return(o.has(l)?"\\":"")+l}function xC(e){const t=e.map(o=>o.codePointAt(0)).sort((o,l)=>o-l),n=[];let i=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?i??=t[o]:i===null?n.push(t[o]):(n.push([i,t[o]]),i=null);return n}function SC(e,t,n){if(e)return">";let i="";if(t&&n){const{enable:o,disable:l}=t;i=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(l?"-":"")+(l?.ignoreCase?"i":"")+(l?.dotAll?"s":"")}return`${i}:`}function CC({kind:e,max:t,min:n}){let i;return!n&&t===1?i="?":!n&&t===1/0?i="*":n===1&&t===1/0?i="+":n===t?i=`{${n}}`:i=`{${n},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function dm({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function _C(e){return e>47&&e<58}function hm({type:e,value:t}){return e==="Character"&&t===45}var EC=class Oc extends RegExp{#t=new Map;#e=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,i){const o=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const l=t;super(l,n),this.#r=l.source,l instanceof Oc&&(this.#t=l.#t,this.#n=l.#n,this.#i=l.#i,this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...i};super(o?"":t,n),this.#r=t,this.#t=IC(l.hiddenCaptures,l.transfers),this.#i=l.strategy,this.rawOptions=i??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...l}=this.rawOptions;this.#e=new Oc(this.#r,this.flags,l)}const n=this.global||this.sticky,i=this.lastIndex;if(this.#i==="clip_search"&&n&&i){this.lastIndex=0;const o=this.#s(t.slice(i));return o&&(bC(o,i,t,this.hasIndices),this.lastIndex+=i),o}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const i=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const l=[0];for(let a=1;a<i.length;a++){const{hidden:c,transferTo:f}=this.#t.get(a)??{};if(c?l.push(null):(l.push(n.length),n.push(i[a]),this.hasIndices&&n.indices.push(o[a])),f&&i[a]!==void 0){const h=l[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=i[a],this.hasIndices&&(n.indices[h]=o[a]),n.groups){this.#n||(this.#n=NC(this.source));const p=this.#n.get(f);p&&(n.groups[p]=i[a],this.hasIndices&&(n.indices.groups[p]=o[a]))}}}return n}};function bC(e,t,n,i){if(e.index+=t,e.input=n,i){const o=e.indices;for(let a=0;a<o.length;a++){const c=o[a];c&&(o[a]=[c[0]+t,c[1]+t])}const l=o.groups;l&&Object.keys(l).forEach(a=>{const c=l[a];c&&(l[a]=[c[0]+t,c[1]+t])})}}function IC(e,t){const n=new Map;for(const i of e)n.set(i,{hidden:!0});for(const[i,o]of t)for(const l of o)As(n,l,{}).transferTo=i;return n}function NC(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let i=0,o=0,l;for(;l=t.exec(e);){const{0:a,groups:{capture:c,name:f}}=l;a==="["?i++:i?a==="]"&&i--:c&&(o++,f&&n.set(o,f))}return n}function TC(e,t){const n=AC(e,t);return n.options?new EC(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function AC(e,t){const n=fy(t),i=ry(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:af}),o=rC(i,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),l=pC(o,n),a=HS(l.pattern,{captureTransfers:l._captureTransfers,hiddenCaptures:l._hiddenCaptures,mode:"external"}),c=GS(a.pattern),f=VS(c.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${l.flags}${l.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((k,b)=>k-b),m=Array.from(f.captureTransfers),w=o._strategy,v=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||w||v)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...w&&{strategy:w},...v&&{lazyCompile:v}})}return h}const pm=4294967295;class PC{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:i=!1,cache:o,regexConstructor:l}=n;if(!l)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const c=o?.get(a);if(c){if(c instanceof RegExp)return c;if(i)return null;throw c}try{const f=l(a);return o?.set(a,f),f}catch(f){if(o?.set(a,f),i)return null;throw f}})}regexps;findNextMatchSync(t,n,i){const o=typeof t=="string"?t:t.content,l=[];function a(c,f,h=0){return{index:c,captureIndices:f.indices.map(p=>p==null?{start:pm,end:pm,length:0}:{start:p[0]+h,end:p[1]+h,length:p[1]-p[0]})}}for(let c=0;c<this.regexps.length;c++){const f=this.regexps[c];if(f)try{f.lastIndex=n;const h=f.exec(o);if(!h)continue;if(h.index===n)return a(c,h,0);l.push([c,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(l.length){const c=Math.min(...l.map(f=>f[1].index));for(const[f,h,p]of l)if(h.index===c)return a(f,h,p)}return null}}function LC(e,t){return TC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function RC(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>LC(n,{target:t.target}),{createScanner(n){return new PC(n,t)},createString(n){return{content:n}}}}const jC="github-light",xy={typescript:()=>Ae(()=>import("./typescript-BPQ3VLAy.js"),[]),tsx:()=>Ae(()=>import("./tsx-COt5Ahok.js"),[]),javascript:()=>Ae(()=>import("./javascript-wDzz0qaB.js"),[]),jsx:()=>Ae(()=>import("./jsx-g9-lgVsj.js"),[]),json:()=>Ae(()=>import("./json-Cp-IABpG.js"),[]),jsonc:()=>Ae(()=>import("./jsonc-Des-eS-w.js"),[]),json5:()=>Ae(()=>import("./json5-C9tS-k6U.js"),[]),css:()=>Ae(()=>import("./css-DPfMkruS.js"),[]),scss:()=>Ae(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([0,1])),less:()=>Ae(()=>import("./less-B1dDrJ26.js"),[]),html:()=>Ae(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([2,3,1])),vue:()=>Ae(()=>import("./vue-DVfSmUF7.js"),__vite__mapDeps([4,1,3,5,6,2])),svelte:()=>Ae(()=>import("./svelte-DZMnMd3x.js"),__vite__mapDeps([7,3,5,1])),markdown:()=>Ae(()=>import("./markdown-Cvjx9yec.js"),[]),mdx:()=>Ae(()=>import("./mdx-Cmh6b_Ma.js"),[]),yaml:()=>Ae(()=>import("./yaml-Buea-lGh.js"),[]),toml:()=>Ae(()=>import("./toml-vGWfd6FD.js"),[]),ini:()=>Ae(()=>import("./ini-BEwlwnbL.js"),[]),xml:()=>Ae(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([8,9])),shellscript:()=>Ae(()=>import("./shellscript-Yzrsuije.js"),[]),python:()=>Ae(()=>import("./python-B6aJPvgy.js"),[]),go:()=>Ae(()=>import("./go-CxLEBnE3.js"),[]),rust:()=>Ae(()=>import("./rust-B1yitclQ.js"),[]),java:()=>Ae(()=>import("./java-CylS5w8V.js"),[]),kotlin:()=>Ae(()=>import("./kotlin-BdnUsdx6.js"),[]),c:()=>Ae(()=>import("./c-BIGW1oBm.js"),[]),cpp:()=>Ae(()=>import("./cpp-BRuaLJcg.js"),__vite__mapDeps([10,11,12])),csharp:()=>Ae(()=>import("./csharp-COcwbKMJ.js"),[]),php:()=>Ae(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([13,2,3,1,8,9,12,6])),ruby:()=>Ae(()=>import("./ruby-BGX7qA9Y.js"),__vite__mapDeps([14,2,3,1,8,9,12,15,5,16,17,10,11,18,19,20])),sql:()=>Ae(()=>import("./sql-BLtJtn59.js"),[]),graphql:()=>Ae(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([15,3,5,16,17])),dockerfile:()=>Ae(()=>import("./dockerfile-BcOcwvcX.js"),[]),makefile:()=>Ae(()=>import("./makefile-CHLpvVh8.js"),[]),lua:()=>Ae(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([19,11])),swift:()=>Ae(()=>import("./swift-D82vCrfD.js"),[]),dart:()=>Ae(()=>import("./dart-CF10PKvl.js"),[]),diff:()=>Ae(()=>import("./diff-D97Zzqfu.js"),[]),dotenv:()=>Ae(()=>import("./dotenv-Da5cRb03.js"),[]),prisma:()=>Ae(()=>import("./prisma-Dd19v3D-.js"),[]),nginx:()=>Ae(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([21,19,11]))},OC={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",json:"json",jsonc:"jsonc",json5:"json5",css:"css",scss:"scss",less:"less",html:"html",htm:"html",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",mdx:"mdx",yml:"yaml",yaml:"yaml",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",xml:"xml",svg:"xml",plist:"xml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",py:"python",go:"go",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",c:"c",h:"c",cc:"cpp",cpp:"cpp",cxx:"cpp",hpp:"cpp",hh:"cpp",cs:"csharp",php:"php",rb:"ruby",sql:"sql",graphql:"graphql",gql:"graphql",lua:"lua",swift:"swift",dart:"dart",diff:"diff",patch:"diff",env:"dotenv",prisma:"prisma"},MC={dockerfile:"dockerfile",makefile:"makefile",gnumakefile:"makefile",".env":"dotenv","nginx.conf":"nginx",".bashrc":"shellscript",".zshrc":"shellscript",".prettierrc":"json",".eslintrc":"json",".babelrc":"json","tsconfig.json":"jsonc","jsconfig.json":"jsonc"};function DC(e){const t=(e.split("/").pop()??"").toLowerCase(),n=MC[t];if(n)return n;if(t.startsWith(".env."))return"dotenv";if(t.startsWith("dockerfile."))return"dockerfile";const i=t.lastIndexOf(".");if(i<0)return null;const o=OC[t.slice(i+1)];return o&&xy[o]?o:null}let Ju=null;function FC(){return Ju||(Ju=K1({themes:[Ae(()=>import("./github-light-DAi9KRSo.js"),[])],langs:[],engine:RC({forgiving:!0})})),Ju}const mm=new Set,Zu=new Map;async function zC(e,t){if(mm.has(t))return!0;let n=Zu.get(t);if(!n){const i=xy[t];if(!i)return!1;n=i().then(async o=>(await e.loadLanguage(...o.default),mm.add(t),!0)).catch(()=>!1).finally(()=>Zu.delete(t)),Zu.set(t,n)}return n}async function $C(e,t){if(t.length===0)return[];const n=await FC();if(!await zC(n,e))return null;const i=t.join(`
|
|
162
|
-
`),l=n.codeToTokensBase(i,{lang:e,theme:jC,includeExplanation:!1}).map(a=>a.map(c=>({content:c.content,color:c.color})));for(;l.length<t.length;)l.push([{content:t[l.length]??""}]);return l.slice(0,t.length)}const nl=20,
|
|
163
|
-
`);return H.length&&H[H.length-1]===""&&H.pop(),S(H),H}).catch(
|
|
164
|
-
`,h="/",p="*",m="",w="comment",v="declaration";function k(E,S){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];S=S||{};var I=1,A=1;function B(ne){var Y=ne.match(t);Y&&(I+=Y.length);var ge=ne.lastIndexOf(f);A=~ge?ne.length-ge:A+ne.length}function P(){var ne={line:I,column:A};return function(Y){return Y.position=new L(ne),ue(),Y}}function L(ne){this.start=ne,this.end={line:I,column:A},this.source=S.source}L.prototype.content=E;function Q(ne){var Y=new Error(S.source+":"+I+":"+A+": "+ne);if(Y.reason=ne,Y.filename=S.source,Y.line=I,Y.column=A,Y.source=E,!S.silent)throw Y}function se(ne){var Y=ne.exec(E);if(Y){var ge=Y[0];return B(ge),E=E.slice(ge.length),Y}}function ue(){se(n)}function D(ne){var Y;for(ne=ne||[];Y=te();)Y!==!1&&ne.push(Y);return ne}function te(){var ne=P();if(!(h!=E.charAt(0)||p!=E.charAt(1))){for(var Y=2;m!=E.charAt(Y)&&(p!=E.charAt(Y)||h!=E.charAt(Y+1));)++Y;if(Y+=2,m===E.charAt(Y-1))return Q("End of comment missing");var ge=E.slice(2,Y-2);return A+=2,B(ge),E=E.slice(Y),A+=2,ne({type:w,comment:ge})}}function re(){var ne=P(),Y=se(i);if(Y){if(te(),!se(o))return Q("property missing ':'");var ge=se(l),me=ne({type:v,property:b(Y[0].replace(e,m)),value:ge?b(ge[0].replace(e,m)):m});return se(a),me}}function fe(){var ne=[];D(ne);for(var Y;Y=re();)Y!==!1&&(ne.push(Y),D(ne));return ne}return ue(),fe()}function b(E){return E?E.replace(c,m):m}return ec=k,ec}var km;function e_(){if(km)return yi;km=1;var e=yi&&yi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=n;const t=e(ZC());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof o=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?o(h,p,f):p&&(l=l||{},l[h]=p)}),l}return yi}var ms={},xm;function t_(){if(xm)return ms;xm=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),l(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(i,c),h.replace(t,a))};return ms.camelCase=f,ms}var gs,Sm;function n_(){if(Sm)return gs;Sm=1;var e=gs&&gs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(e_()),n=t_();function i(o,l){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return i.default=i,gs=i,gs}var r_=n_();const i_=Gc(r_),Sy=Cy("end"),cf=Cy("start");function Cy(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function s_(e){const t=cf(e),n=Sy(e);if(t&&n)return{start:t,end:n}}function Cs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Cm(e.position):"start"in e||"end"in e?Cm(e):"line"in e||"column"in e?Mc(e):""}function Mc(e){return _m(e&&e.line)+":"+_m(e&&e.column)}function Cm(e){return Mc(e&&e.start)+"-"+Mc(e&&e.end)}function _m(e){return e&&typeof e=="number"?e:1}class Tt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(a=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?l.ruleId=i:(l.source=i.slice(0,f),l.ruleId=i.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=Cs(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Tt.prototype.file="";Tt.prototype.name="";Tt.prototype.reason="";Tt.prototype.message="";Tt.prototype.stack="";Tt.prototype.column=void 0;Tt.prototype.line=void 0;Tt.prototype.ancestors=void 0;Tt.prototype.cause=void 0;Tt.prototype.fatal=void 0;Tt.prototype.place=void 0;Tt.prototype.ruleId=void 0;Tt.prototype.source=void 0;const ff={}.hasOwnProperty,o_=new Map,l_=/[A-Z]/g,a_=new Set(["table","tbody","thead","tfoot","tr"]),u_=new Set(["td","th"]),_y="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function c_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=w_(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=y_(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Os:Og,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Ey(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function Ey(e,t,n){if(t.type==="element")return f_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return d_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return p_(e,t,n);if(t.type==="mdxjsEsm")return h_(e,t);if(t.type==="root")return m_(e,t,n);if(t.type==="text")return g_(e,t)}function f_(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Os,e.schema=o),e.ancestors.push(t);const l=Iy(e,t.tagName,!1),a=v_(e,t);let c=hf(e,t);return a_.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Al(f):!0})),by(e,a,l,t),df(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function d_(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ps(e,t.position)}function h_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ps(e,t.position)}function p_(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=Os,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:Iy(e,t.name,!0),a=k_(e,t),c=hf(e,t);return by(e,a,l,t),df(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function m_(e,t,n){const i={};return df(i,hf(e,t)),e.create(t,e.Fragment,i,n)}function g_(e,t){return t.value}function by(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function df(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function y_(e,t,n){return i;function i(o,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function w_(e,t){return n;function n(i,o,l,a){const c=Array.isArray(l.children),f=cf(i);return t(o,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function v_(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&ff.call(t.properties,o)){const l=x_(e,o,t.properties[o]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&u_.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function k_(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ps(e,t.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ps(e,t.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function hf(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:o_;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=Ey(e,l,a);c!==void 0&&n.push(c)}return n}function x_(e,t,n){const i=jg(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Dg(n):Fg(n)),i.property==="style"){let o=typeof n=="object"?n:S_(e,String(n));return e.stylePropertyNameCase==="css"&&(o=C_(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?Yx[i.property]||i.property:i.attribute,n]}}function S_(e,t){try{return i_(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new Tt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=_y+"#cannot-parse-style-attribute",o}}function Iy(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,a;for(;++l<o.length;){const c=wm(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=wm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return ff.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ps(e)}function Ps(e,t){const n=new Tt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=_y+"#cannot-handle-mdx-estrees-without-createevaluater",n}function C_(e){const t={};let n;for(n in e)ff.call(e,n)&&(t[__(n)]=e[n]);return t}function __(e){let t=e.replace(l_,E_);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function E_(e){return"-"+e.toLowerCase()}const tc={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"]},b_={};function pf(e,t){const n=b_,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ny(e,i,o)}function Ny(e,t,n){if(I_(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Em(e.children,t,n)}return Array.isArray(e)?Em(e,t,n):""}function Em(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Ny(e[o],t,n);return i.join("")}function I_(e){return!!(e&&typeof e=="object")}const bm=document.createElement("i");function mf(e){const t="&"+e+";";bm.innerHTML=t;const n=bm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Kt(e,t,n,i){const o=e.length;let l=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Kt(e,e.length,0,t),e):t}const Im={}.hasOwnProperty;function Ty(e){const t={};let n=-1;for(;++n<e.length;)N_(t,e[n]);return t}function N_(e,t){let n;for(n in t){const o=(Im.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Im.call(o,a)||(o[a]=[]);const c=l[a];T_(o[a],Array.isArray(c)?c:c?[c]:[])}}}function T_(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Kt(e,0,0,i)}function Ay(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=pr(/[A-Za-z]/),Nt=pr(/[\dA-Za-z]/),A_=pr(/[#-'*+\--9=?A-Z^-~]/);function bl(e){return e!==null&&(e<32||e===127)}const Dc=pr(/\d/),P_=pr(/[\dA-Fa-f]/),L_=pr(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Re(e){return e===-2||e===-1||e===32}const Dl=pr(new RegExp("\\p{P}|\\p{S}","u")),$r=pr(/\s/);function pr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ti(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&Nt(e.charCodeAt(n+1))&&Nt(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),o=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Me(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return Re(f)?(e.enter(n),c(f)):t(f)}function c(f){return Re(f)&&l++<o?(e.consume(f),c):(e.exit(n),t(f))}}const R_={tokenize:j_};function j_(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Me(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return xe(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const O_={tokenize:M_},Nm={tokenize:D_};function M_(e){const t=this,n=[];let i=0,o,l,a;return c;function c(A){if(i<n.length){const B=n[i];return t.containerState=B[1],e.attempt(B[0].continuation,f,h)(A)}return h(A)}function f(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&I();const B=t.events.length;let P=B,L;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){L=t.events[P][1].end;break}S(i);let Q=B;for(;Q<t.events.length;)t.events[Q][1].end={...L},Q++;return Kt(t.events,P+1,0,t.events.slice(B)),t.events.length=Q,h(A)}return c(A)}function h(A){if(i===n.length){if(!o)return w(A);if(o.currentConstruct&&o.currentConstruct.concrete)return k(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Nm,p,m)(A)}function p(A){return o&&I(),S(i),w(A)}function m(A){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,k(A)}function w(A){return t.containerState={},e.attempt(Nm,v,k)(A)}function v(A){return i++,n.push([t.currentConstruct,t.containerState]),w(A)}function k(A){if(A===null){o&&I(),S(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),b(A)}function b(A){if(A===null){E(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return xe(A)?(e.consume(A),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),b)}function E(A,B){const P=t.sliceStream(A);if(B&&P.push(null),A.previous=l,l&&(l.next=A),l=A,o.defineSkip(A.start),o.write(P),t.parser.lazy[A.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<a&&(!o.events[L][1].end||o.events[L][1].end.offset>a))return;const Q=t.events.length;let se=Q,ue,D;for(;se--;)if(t.events[se][0]==="exit"&&t.events[se][1].type==="chunkFlow"){if(ue){D=t.events[se][1].end;break}ue=!0}for(S(i),L=Q;L<t.events.length;)t.events[L][1].end={...D},L++;Kt(t.events,se+1,0,t.events.slice(Q)),t.events.length=L}}function S(A){let B=n.length;for(;B-- >A;){const P=n[B];t.containerState=P[1],P[0].exit.call(t,e)}n.length=A}function I(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function D_(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _i(e){if(e===null||Ge(e)||$r(e))return 1;if(Dl(e))return 2}function Fl(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Fc={name:"attention",resolveAll:F_,tokenize:z_};function F_(e,t){let n=-1,i,o,l,a,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},w={...e[n][1].start};Tm(m,-f),Tm(w,f),a={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:w},l={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=rn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=rn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=rn(h,Fl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=rn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Kt(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z_(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=_i(i);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const h=e.exit("attentionSequence"),p=_i(f),m=!p||p===2&&o||n.includes(f),w=!o||o===2&&p||n.includes(i);return h._open=!!(l===42?m:m&&(o||!w)),h._close=!!(l===42?w:w&&(p||!m)),t(f)}}function Tm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $_={name:"autolink",tokenize:B_};function B_(e,t,n){let i=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return Lt(v)?(e.consume(v),a):v===64?n(v):h(v)}function a(v){return v===43||v===45||v===46||Nt(v)?(i=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),i=0,f):(v===43||v===45||v===46||Nt(v))&&i++<32?(e.consume(v),c):(i=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||bl(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),p):A_(v)?(e.consume(v),h):n(v)}function p(v){return Nt(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):w(v)}function w(v){if((v===45||Nt(v))&&i++<63){const k=v===45?w:m;return e.consume(v),k}return n(v)}}const Ds={partial:!0,tokenize:U_};function U_(e,t,n){return i;function i(l){return Re(l)?Me(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||xe(l)?t(l):n(l)}}const Py={continuation:{tokenize:G_},exit:W_,name:"blockQuote",tokenize:V_};function V_(e,t,n){const i=this;return o;function o(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function G_(e,t,n){const i=this;return o;function o(a){return Re(a)?Me(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Py,t,n)(a)}}function W_(e){e.exit("blockQuote")}const Ly={name:"characterEscape",tokenize:H_};function H_(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return L_(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ry={name:"characterReference",tokenize:K_};function K_(e,t,n){const i=this;let o=0,l,a;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=Nt,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=P_,p):(e.enter("characterReferenceValue"),l=7,a=Dc,p(m))}function p(m){if(m===59&&o){const w=e.exit("characterReferenceValue");return a===Nt&&!mf(i.sliceSerialize(w))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(m)&&o++<l?(e.consume(m),p):n(m)}}const Am={partial:!0,tokenize:Q_},Pm={concrete:!0,name:"codeFenced",tokenize:q_};function q_(e,t,n){const i=this,o={partial:!0,tokenize:P};let l=0,a=0,c;return f;function f(L){return h(L)}function h(L){const Q=i.events[i.events.length-1];return l=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(a++,e.consume(L),p):a<3?n(L):(e.exit("codeFencedFenceSequence"),Re(L)?Me(e,m,"whitespace")(L):m(L))}function m(L){return L===null||xe(L)?(e.exit("codeFencedFence"),i.interrupt?t(L):e.check(Am,b,B)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Re(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,v,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),w)}function v(L){return L===null||xe(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(L))}function k(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),k)}function b(L){return e.attempt(o,B,E)(L)}function E(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),S}function S(L){return l>0&&Re(L)?Me(e,I,"linePrefix",l+1)(L):I(L)}function I(L){return L===null||xe(L)?e.check(Am,b,B)(L):(e.enter("codeFlowValue"),A(L))}function A(L){return L===null||xe(L)?(e.exit("codeFlowValue"),I(L)):(e.consume(L),A)}function B(L){return e.exit("codeFenced"),t(L)}function P(L,Q,se){let ue=0;return D;function D(Y){return L.enter("lineEnding"),L.consume(Y),L.exit("lineEnding"),te}function te(Y){return L.enter("codeFencedFence"),Re(Y)?Me(L,re,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):re(Y)}function re(Y){return Y===c?(L.enter("codeFencedFenceSequence"),fe(Y)):se(Y)}function fe(Y){return Y===c?(ue++,L.consume(Y),fe):ue>=a?(L.exit("codeFencedFenceSequence"),Re(Y)?Me(L,ne,"whitespace")(Y):ne(Y)):se(Y)}function ne(Y){return Y===null||xe(Y)?(L.exit("codeFencedFence"),Q(Y)):se(Y)}}}function Q_(e,t,n){const i=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const nc={name:"codeIndented",tokenize:Y_},X_={partial:!0,tokenize:J_};function Y_(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),Me(e,l,"linePrefix",5)(h)}function l(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):xe(h)?e.attempt(X_,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||xe(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function J_(e,t,n){const i=this;return o;function o(a){return i.parser.lazy[i.now().line]?n(a):xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Me(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):xe(a)?o(a):n(a)}}const Z_={name:"codeText",previous:tE,resolve:eE,tokenize:nE};function eE(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function tE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nE(e,t,n){let i=0,o,l;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(l=e.enter("codeTextSequence"),o=0,p(m)):xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||xe(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(l.type="codeTextData",h(m))}}class rE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&ys(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ys(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ys(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ys(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ys(this.left,n.reverse())}}}function ys(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function jy(e){const t={};let n=-1,i,o,l,a,c,f,h;const p=new rE(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,iE(p,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(a=p.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return Kt(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function iE(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let p,m,w=-1,v=n,k=0,b=0;const E=[b];for(;v;){for(;e.get(++o)[1]!==v;);l.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(p),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++w<c.length;)c[w][0]==="exit"&&c[w-1][0]==="enter"&&c[w][1].type===c[w-1][1].type&&c[w][1].start.line!==c[w][1].end.line&&(b=w+1,E.push(b),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),w=E.length;w--;){const S=c.slice(E[w],E[w+1]),I=l.pop();f.push([I,I+S.length-1]),e.splice(I,2,S)}for(f.reverse(),w=-1;++w<f.length;)h[k+f[w][0]]=k+f[w][1],k+=f[w][1]-f[w][0]-1;return h}const sE={resolve:lE,tokenize:aE},oE={partial:!0,tokenize:uE};function lE(e){return jy(e),e}function aE(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?l(c):xe(c)?e.check(oE,a,l)(c):(e.consume(c),o)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function uE(e,t,n){const i=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Me(e,l,"linePrefix")}function l(a){if(a===null||xe(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function Oy(e,t,n,i,o,l,a,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(i),e.enter(o),e.enter(l),e.consume(S),e.exit(l),w):S===null||S===32||S===41||bl(S)?n(S):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),b(S))}function w(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===62?(e.exit("chunkString"),e.exit(c),w(S)):S===null||S===60||xe(S)?n(S):(e.consume(S),S===92?k:v)}function k(S){return S===60||S===62||S===92?(e.consume(S),v):v(S)}function b(S){return!p&&(S===null||S===41||Ge(S))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(S)):p<h&&S===40?(e.consume(S),p++,b):S===41?(e.consume(S),p--,b):S===null||S===32||S===40||bl(S)?n(S):(e.consume(S),S===92?E:b)}function E(S){return S===40||S===41||S===92?(e.consume(S),b):b(S)}}function My(e,t,n,i,o,l){const a=this;let c=0,f;return h;function h(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(l),p}function p(v){return c>999||v===null||v===91||v===93&&!f||v===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(v):v===93?(e.exit(l),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||xe(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),f||(f=!Re(v)),v===92?w:m)}function w(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function Dy(e,t,n,i,o,l){let a;return c;function c(w){return w===34||w===39||w===40?(e.enter(i),e.enter(o),e.consume(w),e.exit(o),a=w===40?41:w,f):n(w)}function f(w){return w===a?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),t):(e.enter(l),h(w))}function h(w){return w===a?(e.exit(l),f(a)):w===null?n(w):xe(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Me(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===a||w===null||xe(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?m:p)}function m(w){return w===a||w===92?(e.consume(w),p):p(w)}}function _s(e,t){let n;return i;function i(o){return xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Re(o)?Me(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const cE={name:"definition",tokenize:dE},fE={partial:!0,tokenize:hE};function dE(e,t,n){const i=this;let o;return l;function l(v){return e.enter("definition"),a(v)}function a(v){return My.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return Ge(v)?_s(e,h)(v):h(v)}function h(v){return Oy(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(fE,m,m)(v)}function m(v){return Re(v)?Me(e,w,"whitespace")(v):w(v)}function w(v){return v===null||xe(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function hE(e,t,n){return i;function i(c){return Ge(c)?_s(e,o)(c):n(c)}function o(c){return Dy(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Re(c)?Me(e,a,"whitespace")(c):a(c)}function a(c){return c===null||xe(c)?t(c):n(c)}}const pE={name:"hardBreakEscape",tokenize:mE};function mE(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return xe(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const gE={name:"headingAtx",resolve:yE,tokenize:wE};function yE(e,t){let n=e.length-2,i=3,o,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Kt(e,i,n-i+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function wE(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),a(p)}function a(p){return p===35&&i++<6?(e.consume(p),a):p===null||Ge(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||xe(p)?(e.exit("atxHeading"),t(p)):Re(p)?Me(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Ge(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const vE=["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"],Lm=["pre","script","style","textarea"],kE={concrete:!0,name:"htmlFlow",resolveTo:CE,tokenize:_E},xE={partial:!0,tokenize:bE},SE={partial:!0,tokenize:EE};function CE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _E(e,t,n){const i=this;let o,l,a,c,f;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),w):N===47?(e.consume(N),l=!0,b):N===63?(e.consume(N),o=3,i.interrupt?t:_):Lt(N)?(e.consume(N),a=String.fromCharCode(N),E):n(N)}function w(N){return N===45?(e.consume(N),o=2,v):N===91?(e.consume(N),o=5,c=0,k):Lt(N)?(e.consume(N),o=4,i.interrupt?t:_):n(N)}function v(N){return N===45?(e.consume(N),i.interrupt?t:_):n(N)}function k(N){const pe="CDATA[";return N===pe.charCodeAt(c++)?(e.consume(N),c===pe.length?i.interrupt?t:re:k):n(N)}function b(N){return Lt(N)?(e.consume(N),a=String.fromCharCode(N),E):n(N)}function E(N){if(N===null||N===47||N===62||Ge(N)){const pe=N===47,Ee=a.toLowerCase();return!pe&&!l&&Lm.includes(Ee)?(o=1,i.interrupt?t(N):re(N)):vE.includes(a.toLowerCase())?(o=6,pe?(e.consume(N),S):i.interrupt?t(N):re(N)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(N):l?I(N):A(N))}return N===45||Nt(N)?(e.consume(N),a+=String.fromCharCode(N),E):n(N)}function S(N){return N===62?(e.consume(N),i.interrupt?t:re):n(N)}function I(N){return Re(N)?(e.consume(N),I):D(N)}function A(N){return N===47?(e.consume(N),D):N===58||N===95||Lt(N)?(e.consume(N),B):Re(N)?(e.consume(N),A):D(N)}function B(N){return N===45||N===46||N===58||N===95||Nt(N)?(e.consume(N),B):P(N)}function P(N){return N===61?(e.consume(N),L):Re(N)?(e.consume(N),P):A(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,Q):Re(N)?(e.consume(N),L):se(N)}function Q(N){return N===f?(e.consume(N),f=null,ue):N===null||xe(N)?n(N):(e.consume(N),Q)}function se(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ge(N)?P(N):(e.consume(N),se)}function ue(N){return N===47||N===62||Re(N)?A(N):n(N)}function D(N){return N===62?(e.consume(N),te):n(N)}function te(N){return N===null||xe(N)?re(N):Re(N)?(e.consume(N),te):n(N)}function re(N){return N===45&&o===2?(e.consume(N),ge):N===60&&o===1?(e.consume(N),me):N===62&&o===4?(e.consume(N),O):N===63&&o===3?(e.consume(N),_):N===93&&o===5?(e.consume(N),oe):xe(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(xE,G,fe)(N)):N===null||xe(N)?(e.exit("htmlFlowData"),fe(N)):(e.consume(N),re)}function fe(N){return e.check(SE,ne,G)(N)}function ne(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Y}function Y(N){return N===null||xe(N)?fe(N):(e.enter("htmlFlowData"),re(N))}function ge(N){return N===45?(e.consume(N),_):re(N)}function me(N){return N===47?(e.consume(N),a="",z):re(N)}function z(N){if(N===62){const pe=a.toLowerCase();return Lm.includes(pe)?(e.consume(N),O):re(N)}return Lt(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),z):re(N)}function oe(N){return N===93?(e.consume(N),_):re(N)}function _(N){return N===62?(e.consume(N),O):N===45&&o===2?(e.consume(N),_):re(N)}function O(N){return N===null||xe(N)?(e.exit("htmlFlowData"),G(N)):(e.consume(N),O)}function G(N){return e.exit("htmlFlow"),t(N)}}function EE(e,t,n){const i=this;return o;function o(a){return xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function bE(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ds,t,n)}}const IE={name:"htmlText",tokenize:NE};function NE(e,t,n){const i=this;let o,l,a;return c;function c(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),P):_===63?(e.consume(_),A):Lt(_)?(e.consume(_),se):n(_)}function h(_){return _===45?(e.consume(_),p):_===91?(e.consume(_),l=0,k):Lt(_)?(e.consume(_),I):n(_)}function p(_){return _===45?(e.consume(_),v):n(_)}function m(_){return _===null?n(_):_===45?(e.consume(_),w):xe(_)?(a=m,me(_)):(e.consume(_),m)}function w(_){return _===45?(e.consume(_),v):m(_)}function v(_){return _===62?ge(_):_===45?w(_):m(_)}function k(_){const O="CDATA[";return _===O.charCodeAt(l++)?(e.consume(_),l===O.length?b:k):n(_)}function b(_){return _===null?n(_):_===93?(e.consume(_),E):xe(_)?(a=b,me(_)):(e.consume(_),b)}function E(_){return _===93?(e.consume(_),S):b(_)}function S(_){return _===62?ge(_):_===93?(e.consume(_),S):b(_)}function I(_){return _===null||_===62?ge(_):xe(_)?(a=I,me(_)):(e.consume(_),I)}function A(_){return _===null?n(_):_===63?(e.consume(_),B):xe(_)?(a=A,me(_)):(e.consume(_),A)}function B(_){return _===62?ge(_):A(_)}function P(_){return Lt(_)?(e.consume(_),L):n(_)}function L(_){return _===45||Nt(_)?(e.consume(_),L):Q(_)}function Q(_){return xe(_)?(a=Q,me(_)):Re(_)?(e.consume(_),Q):ge(_)}function se(_){return _===45||Nt(_)?(e.consume(_),se):_===47||_===62||Ge(_)?ue(_):n(_)}function ue(_){return _===47?(e.consume(_),ge):_===58||_===95||Lt(_)?(e.consume(_),D):xe(_)?(a=ue,me(_)):Re(_)?(e.consume(_),ue):ge(_)}function D(_){return _===45||_===46||_===58||_===95||Nt(_)?(e.consume(_),D):te(_)}function te(_){return _===61?(e.consume(_),re):xe(_)?(a=te,me(_)):Re(_)?(e.consume(_),te):ue(_)}function re(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,fe):xe(_)?(a=re,me(_)):Re(_)?(e.consume(_),re):(e.consume(_),ne)}function fe(_){return _===o?(e.consume(_),o=void 0,Y):_===null?n(_):xe(_)?(a=fe,me(_)):(e.consume(_),fe)}function ne(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Ge(_)?ue(_):(e.consume(_),ne)}function Y(_){return _===47||_===62||Ge(_)?ue(_):n(_)}function ge(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function me(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),z}function z(_){return Re(_)?Me(e,oe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):oe(_)}function oe(_){return e.enter("htmlTextData"),a(_)}}const gf={name:"labelEnd",resolveAll:LE,resolveTo:RE,tokenize:jE},TE={tokenize:OE},AE={tokenize:ME},PE={tokenize:DE};function LE(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Kt(e,0,e.length,n),e}function RE(e,t){let n=e.length,i=0,o,l,a,c;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},p={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=rn(c,e.slice(l+1,l+i+3)),c=rn(c,[["enter",p,t]]),c=rn(c,Fl(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=rn(c,[["exit",p,t],e[a-2],e[a-1],["exit",h,t]]),c=rn(c,e.slice(a+1)),c=rn(c,[["exit",f,t]]),Kt(e,l,e.length,c),e}function jE(e,t,n){const i=this;let o=i.events.length,l,a;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return c;function c(w){return l?l._inactive?m(w):(a=i.parser.defined.includes(gn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),f):n(w)}function f(w){return w===40?e.attempt(TE,p,a?p:m)(w):w===91?e.attempt(AE,p,a?h:m)(w):a?p(w):m(w)}function h(w){return e.attempt(PE,p,m)(w)}function p(w){return t(w)}function m(w){return l._balanced=!0,n(w)}}function OE(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return Ge(m)?_s(e,l)(m):l(m)}function l(m){return m===41?p(m):Oy(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function a(m){return Ge(m)?_s(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?Dy(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Ge(m)?_s(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function ME(e,t,n){const i=this;return o;function o(c){return My.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function DE(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const FE={name:"labelStartImage",resolveAll:gf.resolveAll,tokenize:zE};function zE(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const $E={name:"labelStartLink",resolveAll:gf.resolveAll,tokenize:BE};function BE(e,t,n){const i=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const rc={name:"lineEnding",tokenize:UE};function UE(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const fl={name:"thematicBreak",tokenize:VE};function VE(e,t,n){let i=0,o;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||xe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),Re(h)?Me(e,c,"whitespace")(h):c(h))}}const zt={continuation:{tokenize:KE},exit:QE,name:"list",tokenize:HE},GE={partial:!0,tokenize:XE},WE={partial:!0,tokenize:qE};function HE(e,t,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return c;function c(v){const k=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:Dc(v)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(fl,n,h)(v):h(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Dc(v)&&++a<10?(e.consume(v),f):(!i.interrupt||a<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Ds,i.interrupt?n:p,e.attempt(GE,w,m))}function p(v){return i.containerState.initialBlankLine=!0,l++,w(v)}function m(v){return Re(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),w):n(v)}function w(v){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function KE(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ds,o,l);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Me(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Re(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(WE,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Me(e,e.attempt(zt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function qE(e,t,n){const i=this;return Me(e,o,"listItemIndent",i.containerState.size+1);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function QE(e){e.exit(this.containerState.type)}function XE(e,t,n){const i=this;return Me(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const a=i.events[i.events.length-1];return!Re(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Rm={name:"setextUnderline",resolveTo:YE,tokenize:JE};function YE(e,t){let n=e.length,i,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function JE(e,t,n){const i=this;let o;return l;function l(h){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Re(h)?Me(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||xe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZE={tokenize:eb};function eb(e){const t=this,n=e.attempt(Ds,i,e.attempt(this.parser.constructs.flowInitial,o,Me(e,e.attempt(this.parser.constructs.flow,o,e.attempt(sE,o)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tb={resolveAll:zy()},nb=Fy("string"),rb=Fy("text");function Fy(e){return{resolveAll:zy(e==="text"?ib:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],l=n.attempt(o,a,c);return a;function a(p){return h(p)?l(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),l(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=o[p];let w=-1;if(m)for(;++w<m.length;){const v=m[w];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function zy(e){return t;function t(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,i):n}}function ib(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let l=o.length,a=-1,c=0,f;for(;l--;){const h=o[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const sb={42:zt,43:zt,45:zt,48:zt,49:zt,50:zt,51:zt,52:zt,53:zt,54:zt,55:zt,56:zt,57:zt,62:Py},ob={91:cE},lb={[-2]:nc,[-1]:nc,32:nc},ab={35:gE,42:fl,45:[Rm,fl],60:kE,61:Rm,95:fl,96:Pm,126:Pm},ub={38:Ry,92:Ly},cb={[-5]:rc,[-4]:rc,[-3]:rc,33:FE,38:Ry,42:Fc,60:[$_,IE],91:$E,92:[pE,Ly],93:gf,95:Fc,96:Z_},fb={null:[Fc,tb]},db={null:[42,95]},hb={null:[]},pb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:db,contentInitial:ob,disable:hb,document:sb,flow:ab,flowInitial:lb,insideSpan:fb,string:ub,text:cb},Symbol.toStringTag,{value:"Module"}));function mb(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let a=[],c=[];const f={attempt:Q(P),check:Q(L),consume:I,enter:A,exit:B,interrupt:Q(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:b,events:[],now:k,parser:e,previous:null,sliceSerialize:w,sliceStream:v,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function m(te){return a=rn(a,te),E(),a[a.length-1]!==null?[]:(se(t,0),h.events=Fl(l,h.events,h),h.events)}function w(te,re){return yb(v(te),re)}function v(te){return gb(a,te)}function k(){const{_bufferIndex:te,_index:re,line:fe,column:ne,offset:Y}=i;return{_bufferIndex:te,_index:re,line:fe,column:ne,offset:Y}}function b(te){o[te.line]=te.column,D()}function E(){let te;for(;i._index<a.length;){const re=a[i._index];if(typeof re=="string")for(te=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===te&&i._bufferIndex<re.length;)S(re.charCodeAt(i._bufferIndex));else S(re)}}function S(te){p=p(te)}function I(te){xe(te)?(i.line++,i.column=1,i.offset+=te===-3?2:1,D()):te!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=te}function A(te,re){const fe=re||{};return fe.type=te,fe.start=k(),h.events.push(["enter",fe,h]),c.push(fe),fe}function B(te){const re=c.pop();return re.end=k(),h.events.push(["exit",re,h]),re}function P(te,re){se(te,re.from)}function L(te,re){re.restore()}function Q(te,re){return fe;function fe(ne,Y,ge){let me,z,oe,_;return Array.isArray(ne)?G(ne):"tokenize"in ne?G([ne]):O(ne);function O(we){return je;function je(Te){const De=Te!==null&&we[Te],Ze=Te!==null&&we.null,qt=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Ze)?Ze:Ze?[Ze]:[]];return G(qt)(Te)}}function G(we){return me=we,z=0,we.length===0?ge:N(we[z])}function N(we){return je;function je(Te){return _=ue(),oe=we,we.partial||(h.currentConstruct=we),we.name&&h.parser.constructs.disable.null.includes(we.name)?Ee():we.tokenize.call(re?Object.assign(Object.create(h),re):h,f,pe,Ee)(Te)}}function pe(we){return te(oe,_),Y}function Ee(we){return _.restore(),++z<me.length?N(me[z]):ge}}}function se(te,re){te.resolveAll&&!l.includes(te)&&l.push(te),te.resolve&&Kt(h.events,re,h.events.length-re,te.resolve(h.events.slice(re),h)),te.resolveTo&&(h.events=te.resolveTo(h.events,h))}function ue(){const te=k(),re=h.previous,fe=h.currentConstruct,ne=h.events.length,Y=Array.from(c);return{from:ne,restore:ge};function ge(){i=te,h.previous=re,h.currentConstruct=fe,h.events.length=ne,c=Y,D()}}function D(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function gb(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(i,l)];else{if(a=e.slice(n,o),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[o].slice(0,l))}return a}function yb(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
161
|
+
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!o&&(p==="graph"||p==="print")){if(i==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${ct(m.codePointAt(0)-1)}${ct(m.codePointAt(2)+1)}-`),n(it(Mn(`[${m}]`),t))}else n(it(Yu(Mn(tC.get(p)),h),t));else if(f==="property")af.has(jl(p))||(e.key="sc");else if(f==="space")n(fr(vi("space",{negate:h}),t));else if(f==="word")n(it(Yu(Mn(On),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:o,removeAllPrevSiblings:l,removeAllNextSiblings:a}){const{kind:c,flags:f}=e;if(c==="flags")if(!f.enable&&!f.disable)i();else{const h=pn({flags:f});h.body[0].body=a(),o(it(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&ty(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Ne`Uses "\K" in a way that's unsupported`);const w=jr({behind:!0});w.body[0].body=l(),o(it(w,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:i}=e;if(i==="fail")n(it(jr({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=pn();t.body[0].body.push(e.body),e.body=it(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let i=!1,o=!1;for(const l of e.body)if(l.body.length===1&&l.body[0].kind==="search_start")l.body.pop();else{const a=yy(l.body);a?(i=!0,Array.isArray(a)?n.push(...a):n.push(a)):o=!0}i&&!o&&n.forEach(l=>t.add(l))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if(t==="strict"&&n&&i)throw new Error(Ne`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Xu(n)&&(n=Qu(n,t),e.ref=n)}},sC={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:i,ref:o}=e;i||n.set(e,[...t.get(o).map(({node:l})=>l)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:o,groupsByName:l,multiplexCapturesToLeftByRef:a,openRefs:c,reffedNodesByReferencer:f}){const h=o.get(e);if(h&&c.has(e.number)){const m=fr(um(e.number),t);f.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),a.set(e.number,[]),e.name&&As(a,e.name,[]);const p=a.get(e.name??e.number);for(let m=0;m<p.length;m++){const w=p[m];if(h===w.node||h&&h===w.origin||e===w.origin){p.splice(m,1);break}}if(a.get(e.number).push({node:e,origin:h}),e.name&&a.get(e.name).push({node:e,origin:h}),e.name){const m=As(l,e.name,new Map);let w=!1;if(h)w=!0;else for(const v of m.values())if(!v.hasDuplicateNameToRemove){w=!0;break}l.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:w})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=El(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){const{isRecursive:o,ref:l}=e;if(o){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===l||p.number===l)););i.reffedNodesByReferencer.set(e,p);return}const a=i.subroutineRefMap.get(l),c=l===0,f=c?um(0):py(a,i.groupOriginByCopy,null);let h=f;if(!c){const p=my(uC(a,w=>w.type==="Group"&&!!w.flags)),m=p?El(i.globalFlags,p):i.globalFlags;lC(m,i.currentFlags)||(h=pn({flags:cC(m)}),h.body[0].body.push(f))}n(it(h,t),{traverse:!c})}},oC={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const l=i.reffedNodesByReferencer.get(e).filter(a=>aC(a,e));if(!l.length)n(it(jr({negate:!0}),t));else if(l.length>1){const a=pn({atomic:!0,body:l.reverse().map(c=>zr({body:[Pc(c.number)]}))});n(it(a,t))}else e.ref=l[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<n;i++){const o=ry();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function hy(e){Ss(e,{"*"({node:t,parent:n}){t.parent=n}})}function lC(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function aC(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const i=gy(n.parent);for(const o of i){if(o===n)break;if(o===e||wy(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function py(e,t,n,i){const o=Array.isArray(e)?[]:{};for(const[l,a]of Object.entries(e))l==="parent"?o.parent=Array.isArray(n)?i:n:a&&typeof a=="object"?o[l]=py(a,t,o,n):(l==="type"&&a==="CapturingGroup"&&t.set(o,t.get(e)??e),o[l]=a);return o}function um(e){const t=sy(e);return t.isRecursive=!0,t}function uC(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Qu(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function my(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(o=>{i.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),i.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function cC({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function gy(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function yy(e){const t=e.find(n=>n.kind==="search_start"||hC(n,{negate:!1})||!fC(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const i of t.body){const o=yy(i.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function wy(e,t){const n=gy(e)??[];for(const i of n)if(i===t||wy(i,t))return!0;return!1}function fC({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function dC(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function hC(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&ty(e.body[0],{type:"Assertion",kind:"search_start"})}function Xu(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Mn(e,t){const i=ny(e,{...t,unicodePropertyMap:af}).body;return i.length>1||i[0].body.length>1?pn({body:i}):i[0].body[0]}function Yu(e,t){return e.negate=t,e}function fr(e,t){return e.parent=t,e}function it(e,t){return hy(e),e.parent=t,e}function pC(e,t){const n=cy(t),i=jc(n.target,"ES2024"),o=jc(n.target,"ES2025"),l=n.rules.recursionLimit;if(!Number.isInteger(l)||l<2||l>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,c=null;if(!o){const v=[e.flags.ignoreCase];Ss(e,mC,{getCurrentModI:()=>v.at(-1),popModI(){v.pop()},pushModI(k){v.push(k)},setHasCasedChar(){v.at(-1)?a=!0:c=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:l,useAppliedIgnoreCase:!!(!o&&a&&c),useFlagMods:o,useFlagV:i,verbose:n.verbose};function m(v){return p.lastNode=h,h=v,qS(gC[v.type],`Unexpected node type "${v.type}"`)(v,p,m)}const w={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return i||(delete w.options.force.v,w.options.disable.v=!0,w.options.unicodeSetsPlugin=null),w._captureTransfers=new Map,w._hiddenCaptures=[],p.captureMap.forEach((v,k)=>{v.hidden&&w._hiddenCaptures.push(k),v.transferTo&&As(w._captureTransfers,v.transferTo,[]).push(k)}),w}var mC={"*":{enter({node:e},t){if(fm(e)){const n=t.getCurrentModI();t.pushModI(e.flags?El({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){fm(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){uf(ct(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),vy(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&dy.has(e.value)&&t.setHasCasedChar()}},gC={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ne`\B`:Ne`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:i,name:o,number:l}=e,a={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(a.hidden=!0,l>c.number&&(a.transferTo=c.number)),t.captureMap.set(l,a),`(${o?`?<${o}>`:""}${i.map(n).join("|")})`},Character({value:e},t){const n=ct(e),i=gi(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&uf(n)){const o=fy(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){const{kind:i,negate:o,parent:l}=e;let{body:a}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(dm)&&(a=[Rl(45),...a.filter(h=>!dm(h))]);const c=()=>`[${o?"^":""}${a.map(n).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||mn.bugNestedClassIgnoresNegation)&&!o){const p=a.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=pn(),w=m.body[0];return m.parent=l,w.parent=m,a=a.filter(v=>!p.includes(v)),e.body=a,a.length?(e.parent=w,w.body.push(e)):m.body.pop(),p.forEach(v=>{const k=zr({body:[v]});v.parent=k,k.parent=m,m.body.push(k)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const f=a[0];if(i==="union"&&!o&&f&&((!t.useFlagV||!t.verbose)&&l.kind==="union"&&!(mn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&l.kind==="intersection"&&a.length===1&&f.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&l.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,i=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},l=gi(n,o),a=gi(i,o),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=vy(e);xC(f).forEach(p=>{c.add(Array.isArray(p)?`${gi(p[0],o)}-${gi(p[1],o)}`:gi(p,o))})}return`${l}-${a}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":Ne`[^\n]`;if(e==="digit")return t?Ne`\D`:Ne`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&dy.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ne`\P`:Ne`\p`}{${i?`${i}=`:""}${n}}`}if(e==="word")return t?Ne`\W`:Ne`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:i},o,l){const a=o.currentFlags;n&&(o.currentFlags=El(a,n));const c=t.map(l).join("|"),f=!o.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?c:`(?${SC(e,n,o.useFlagMods)}${c})`;return o.currentFlags=a,f},LookaroundAssertion({body:e,kind:t,negate:n},i,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+CC(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=n.recursionLimit;return t===0?`(?R=${i})`:Ne`\g<${t}&R=${i}>`}},yC=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),wC=new Set(["-","\\","]","^","["]),vC=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cm=new Map([[9,Ne`\t`],[10,Ne`\n`],[11,Ne`\v`],[12,Ne`\f`],[13,Ne`\r`],[8232,Ne`\u2028`],[8233,Ne`\u2029`],[65279,Ne`\uFEFF`]]),kC=new RegExp("^\\p{Cased}$","u");function uf(e){return kC.test(e)}function vy(e,t){const n=!!t?.firstOnly,i=e.min.value,o=e.max.value,l=[];if(i<65&&(o===65535||o>=131071)||i===65536&&o>=131071)return l;for(let a=i;a<=o;a++){const c=ct(a);if(!uf(c))continue;const f=fy(c).filter(h=>{const p=h.codePointAt(0);return p<i||p>o});if(f.length&&(l.push(...f),n))break}return l}function gi(e,{escDigit:t,inCharClass:n,useFlagV:i}){if(cm.has(e))return cm.get(e);if(e<32||e>126&&e<160||e>262143||t&&_C(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const o=n?i?vC:wC:yC,l=ct(e);return(o.has(l)?"\\":"")+l}function xC(e){const t=e.map(o=>o.codePointAt(0)).sort((o,l)=>o-l),n=[];let i=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?i??=t[o]:i===null?n.push(t[o]):(n.push([i,t[o]]),i=null);return n}function SC(e,t,n){if(e)return">";let i="";if(t&&n){const{enable:o,disable:l}=t;i=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(l?"-":"")+(l?.ignoreCase?"i":"")+(l?.dotAll?"s":"")}return`${i}:`}function CC({kind:e,max:t,min:n}){let i;return!n&&t===1?i="?":!n&&t===1/0?i="*":n===1&&t===1/0?i="+":n===t?i=`{${n}}`:i=`{${n},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function fm({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function _C(e){return e>47&&e<58}function dm({type:e,value:t}){return e==="Character"&&t===45}var EC=class Oc extends RegExp{#t=new Map;#e=null;#r;#n=null;#i=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,i){const o=!!i?.lazyCompile;if(t instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const l=t;super(l,n),this.#r=l.source,l instanceof Oc&&(this.#t=l.#t,this.#n=l.#n,this.#i=l.#i,this.rawOptions=l.rawOptions)}else{const l={hiddenCaptures:[],strategy:null,transfers:[],...i};super(o?"":t,n),this.#r=t,this.#t=IC(l.hiddenCaptures,l.transfers),this.#i=l.strategy,this.rawOptions=i??{}}o||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:o,...l}=this.rawOptions;this.#e=new Oc(this.#r,this.flags,l)}const n=this.global||this.sticky,i=this.lastIndex;if(this.#i==="clip_search"&&n&&i){this.lastIndex=0;const o=this.#s(t.slice(i));return o&&(bC(o,i,t,this.hasIndices),this.lastIndex+=i),o}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const i=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const l=[0];for(let a=1;a<i.length;a++){const{hidden:c,transferTo:f}=this.#t.get(a)??{};if(c?l.push(null):(l.push(n.length),n.push(i[a]),this.hasIndices&&n.indices.push(o[a])),f&&i[a]!==void 0){const h=l[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=i[a],this.hasIndices&&(n.indices[h]=o[a]),n.groups){this.#n||(this.#n=NC(this.source));const p=this.#n.get(f);p&&(n.groups[p]=i[a],this.hasIndices&&(n.indices.groups[p]=o[a]))}}}return n}};function bC(e,t,n,i){if(e.index+=t,e.input=n,i){const o=e.indices;for(let a=0;a<o.length;a++){const c=o[a];c&&(o[a]=[c[0]+t,c[1]+t])}const l=o.groups;l&&Object.keys(l).forEach(a=>{const c=l[a];c&&(l[a]=[c[0]+t,c[1]+t])})}}function IC(e,t){const n=new Map;for(const i of e)n.set(i,{hidden:!0});for(const[i,o]of t)for(const l of o)As(n,l,{}).transferTo=i;return n}function NC(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let i=0,o=0,l;for(;l=t.exec(e);){const{0:a,groups:{capture:c,name:f}}=l;a==="["?i++:i?a==="]"&&i--:c&&(o++,f&&n.set(o,f))}return n}function TC(e,t){const n=AC(e,t);return n.options?new EC(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function AC(e,t){const n=cy(t),i=ny(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:af}),o=rC(i,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),l=pC(o,n),a=HS(l.pattern,{captureTransfers:l._captureTransfers,hiddenCaptures:l._hiddenCaptures,mode:"external"}),c=GS(a.pattern),f=VS(c.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${l.flags}${l.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((k,b)=>k-b),m=Array.from(f.captureTransfers),w=o._strategy,v=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||w||v)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...w&&{strategy:w},...v&&{lazyCompile:v}})}return h}const hm=4294967295;class PC{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:i=!1,cache:o,regexConstructor:l}=n;if(!l)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const c=o?.get(a);if(c){if(c instanceof RegExp)return c;if(i)return null;throw c}try{const f=l(a);return o?.set(a,f),f}catch(f){if(o?.set(a,f),i)return null;throw f}})}regexps;findNextMatchSync(t,n,i){const o=typeof t=="string"?t:t.content,l=[];function a(c,f,h=0){return{index:c,captureIndices:f.indices.map(p=>p==null?{start:hm,end:hm,length:0}:{start:p[0]+h,end:p[1]+h,length:p[1]-p[0]})}}for(let c=0;c<this.regexps.length;c++){const f=this.regexps[c];if(f)try{f.lastIndex=n;const h=f.exec(o);if(!h)continue;if(h.index===n)return a(c,h,0);l.push([c,h,0])}catch(h){if(this.options.forgiving)continue;throw h}}if(l.length){const c=Math.min(...l.map(f=>f[1].index));for(const[f,h,p]of l)if(h.index===c)return a(f,h,p)}return null}}function LC(e,t){return TC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function RC(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>LC(n,{target:t.target}),{createScanner(n){return new PC(n,t)},createString(n){return{content:n}}}}const jC="github-light",ky={typescript:()=>Ae(()=>import("./typescript-BPQ3VLAy.js"),[]),tsx:()=>Ae(()=>import("./tsx-COt5Ahok.js"),[]),javascript:()=>Ae(()=>import("./javascript-wDzz0qaB.js"),[]),jsx:()=>Ae(()=>import("./jsx-g9-lgVsj.js"),[]),json:()=>Ae(()=>import("./json-Cp-IABpG.js"),[]),jsonc:()=>Ae(()=>import("./jsonc-Des-eS-w.js"),[]),json5:()=>Ae(()=>import("./json5-C9tS-k6U.js"),[]),css:()=>Ae(()=>import("./css-DPfMkruS.js"),[]),scss:()=>Ae(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([0,1])),less:()=>Ae(()=>import("./less-B1dDrJ26.js"),[]),html:()=>Ae(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([2,3,1])),vue:()=>Ae(()=>import("./vue-DVfSmUF7.js"),__vite__mapDeps([4,1,3,5,6,2])),svelte:()=>Ae(()=>import("./svelte-DZMnMd3x.js"),__vite__mapDeps([7,3,5,1])),markdown:()=>Ae(()=>import("./markdown-Cvjx9yec.js"),[]),mdx:()=>Ae(()=>import("./mdx-Cmh6b_Ma.js"),[]),yaml:()=>Ae(()=>import("./yaml-Buea-lGh.js"),[]),toml:()=>Ae(()=>import("./toml-vGWfd6FD.js"),[]),ini:()=>Ae(()=>import("./ini-BEwlwnbL.js"),[]),xml:()=>Ae(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([8,9])),shellscript:()=>Ae(()=>import("./shellscript-Yzrsuije.js"),[]),python:()=>Ae(()=>import("./python-B6aJPvgy.js"),[]),go:()=>Ae(()=>import("./go-CxLEBnE3.js"),[]),rust:()=>Ae(()=>import("./rust-B1yitclQ.js"),[]),java:()=>Ae(()=>import("./java-CylS5w8V.js"),[]),kotlin:()=>Ae(()=>import("./kotlin-BdnUsdx6.js"),[]),c:()=>Ae(()=>import("./c-BIGW1oBm.js"),[]),cpp:()=>Ae(()=>import("./cpp-BRuaLJcg.js"),__vite__mapDeps([10,11,12])),csharp:()=>Ae(()=>import("./csharp-COcwbKMJ.js"),[]),php:()=>Ae(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([13,2,3,1,8,9,12,6])),ruby:()=>Ae(()=>import("./ruby-BGX7qA9Y.js"),__vite__mapDeps([14,2,3,1,8,9,12,15,5,16,17,10,11,18,19,20])),sql:()=>Ae(()=>import("./sql-BLtJtn59.js"),[]),graphql:()=>Ae(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([15,3,5,16,17])),dockerfile:()=>Ae(()=>import("./dockerfile-BcOcwvcX.js"),[]),makefile:()=>Ae(()=>import("./makefile-CHLpvVh8.js"),[]),lua:()=>Ae(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([19,11])),swift:()=>Ae(()=>import("./swift-D82vCrfD.js"),[]),dart:()=>Ae(()=>import("./dart-CF10PKvl.js"),[]),diff:()=>Ae(()=>import("./diff-D97Zzqfu.js"),[]),dotenv:()=>Ae(()=>import("./dotenv-Da5cRb03.js"),[]),prisma:()=>Ae(()=>import("./prisma-Dd19v3D-.js"),[]),nginx:()=>Ae(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([21,19,11]))},OC={ts:"typescript",mts:"typescript",cts:"typescript",tsx:"tsx",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"jsx",json:"json",jsonc:"jsonc",json5:"json5",css:"css",scss:"scss",less:"less",html:"html",htm:"html",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",mdx:"mdx",yml:"yaml",yaml:"yaml",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",xml:"xml",svg:"xml",plist:"xml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",py:"python",go:"go",rs:"rust",java:"java",kt:"kotlin",kts:"kotlin",c:"c",h:"c",cc:"cpp",cpp:"cpp",cxx:"cpp",hpp:"cpp",hh:"cpp",cs:"csharp",php:"php",rb:"ruby",sql:"sql",graphql:"graphql",gql:"graphql",lua:"lua",swift:"swift",dart:"dart",diff:"diff",patch:"diff",env:"dotenv",prisma:"prisma"},MC={dockerfile:"dockerfile",makefile:"makefile",gnumakefile:"makefile",".env":"dotenv","nginx.conf":"nginx",".bashrc":"shellscript",".zshrc":"shellscript",".prettierrc":"json",".eslintrc":"json",".babelrc":"json","tsconfig.json":"jsonc","jsconfig.json":"jsonc"};function DC(e){const t=(e.split("/").pop()??"").toLowerCase(),n=MC[t];if(n)return n;if(t.startsWith(".env."))return"dotenv";if(t.startsWith("dockerfile."))return"dockerfile";const i=t.lastIndexOf(".");if(i<0)return null;const o=OC[t.slice(i+1)];return o&&ky[o]?o:null}let Ju=null;function FC(){return Ju||(Ju=K1({themes:[Ae(()=>import("./github-light-DAi9KRSo.js"),[])],langs:[],engine:RC({forgiving:!0})})),Ju}const pm=new Set,Zu=new Map;async function zC(e,t){if(pm.has(t))return!0;let n=Zu.get(t);if(!n){const i=ky[t];if(!i)return!1;n=i().then(async o=>(await e.loadLanguage(...o.default),pm.add(t),!0)).catch(()=>!1).finally(()=>Zu.delete(t)),Zu.set(t,n)}return n}async function $C(e,t){if(t.length===0)return[];const n=await FC();if(!await zC(n,e))return null;const i=t.join(`
|
|
162
|
+
`),l=n.codeToTokensBase(i,{lang:e,theme:jC,includeExplanation:!1}).map(a=>a.map(c=>({content:c.content,color:c.color})));for(;l.length<t.length;)l.push([{content:t[l.length]??""}]);return l.slice(0,t.length)}const nl=20,mm=new Map;function BC(e){const t=(n,i)=>{const o=i==="old"?n.oldLineNo:n.newLineNo;return o===void 0?void 0:{side:i,line:o}};if(e.kind==="line")return t(e.line,e.line.type==="del"?"old":"new");if(e.kind==="pair")return(e.right&&t(e.right,"new"))??(e.left&&t(e.left,"old"))}function rl(e,t){return e.type==="context"||t==="new"?`new:${e.newLineNo??e.oldLineNo}`:`old:${e.oldLineNo}`}function gm({content:e,tokens:t}){return t?C.jsxs("span",{className:"code-text",children:[t.map((n,i)=>C.jsx("span",{style:n.color?{color:n.color}:void 0,children:n.content},i)),e===""&&""]}):C.jsx("span",{className:"code-text",children:e||""})}function UC(e,t){if(e.newLineNo!==void 0)return e.newLineNo;if(!t)return e.oldLineNo??1;const n=t.lines.indexOf(e);for(let i=n+1;i<t.lines.length;i++){const o=t.lines[i].newLineNo;if(o!==void 0)return o}for(let i=n-1;i>=0;i--){const o=t.lines[i].newLineNo;if(o!==void 0)return o}return t.newStart}function VC(e){switch(e.kind){case"hunk":case"gap":return 26;default:return 22}}function GC({diff:e}){const t=W(B=>B.prefs.viewMode),n=W(B=>B.targetKey),i=W(B=>B.comments),o=te.useMemo(()=>i.filter(B=>B.filePath===e.path&&B.targetKey===n),[i,e.path,n]),l=W(B=>B.updateComment),a=W(B=>B.setEditor),c=W(B=>B.focusComment),f=W(B=>B.editor),h=W(B=>B.focusedCommentId),p=W(B=>B.openInNvim),m=W(B=>B.showToast),w=W(B=>B.reattaching),v=W(B=>B.jumpTo),[k,b]=te.useState({}),[E,S]=te.useState(null),I=te.useRef(null),[A,$]=te.useState(null),P=te.useRef(null),L=te.useCallback(B=>{P.current=B,$(B)},[]),[Q,oe]=te.useState(null),ue=te.useMemo(()=>nx({diff:e,viewMode:t,expansions:k,fullLines:E}),[e,t,k,E]),D=te.useMemo(()=>{const B=new Map;for(const H of o){if(H.status==="orphaned")continue;const we=`${H.side}:${H.endLine}`,Se=B.get(we)??{count:0,active:!1,ids:[]};Se.count++,Se.ids.push(H.id),H.status==="active"&&(Se.active=!0),B.set(we,Se)}return B},[o]),ne=te.useMemo(()=>o.find(B=>B.id===h&&B.status!=="orphaned")??null,[o,h]),re=f&&f.filePath===e.path?f:null,fe=te.useMemo(()=>DC(e.path),[e.path]),ie=te.useRef(new Map),[,Y]=te.useState(0);te.useEffect(()=>{if(!fe)return;const B=ie.current,H=new Map,we=(Ie,Ke,st)=>{if(B.has(Ke))return;let et=H.get(Ie);et||(et={keys:[],lines:[]},H.set(Ie,et)),!et.keys.includes(Ke)&&(et.keys.push(Ke),et.lines.push(st))},Se=(Ie,Ke)=>{Ie.type==="del"?we(`${Ke}:old`,rl(Ie,"old"),Ie.content):we(`${Ke}:new`,rl(Ie,"new"),Ie.content)};for(const Ie of ue)Ie.kind==="line"?Se(Ie.line,Ie.hunkIndex):Ie.kind==="pair"&&(Ie.left&&Se(Ie.left,Ie.hunkIndex),Ie.right&&Ie.right!==Ie.left&&Se(Ie.right,Ie.hunkIndex));if(H.size===0)return;let Oe=!1;return(async()=>{let Ie=!1;for(const Ke of H.values()){const st=await $C(fe,Ke.lines);if(Oe||!st)return;Ke.keys.forEach((et,Un)=>{const mr=st[Un];mr&&B.set(et,mr)}),Ie=!0}Ie&&Y(Ke=>Ke+1)})().catch(()=>{}),()=>{Oe=!0}},[ue,fe]);const ge=te.useRef(null),me=Zk({count:ue.length,getScrollElement:()=>ge.current,estimateSize:B=>VC(ue[B]),overscan:12,getItemKey:B=>ue[B].key});te.useEffect(()=>{const B=ge.current;if(!B)return;let H=0;const we=()=>{H=0;const Oe=me.getVirtualItems()[0],Ie=Oe?BC(ue[Oe.index]):void 0;Ie&&mm.set(e.path,Ie)},Se=()=>{H||(H=requestAnimationFrame(we))};return B.addEventListener("scroll",Se,{passive:!0}),()=>{B.removeEventListener("scroll",Se),H&&cancelAnimationFrame(H)}},[ue,me,e.path]);const Z=te.useRef(!1);te.useEffect(()=>{if(Z.current||(Z.current=!0,!W.getState().consumeRestoreScroll()))return;const B=mm.get(e.path);if(!B)return;const H=Ep(ue,B.side,B.line);H>=0&&me.scrollToIndex(H,{align:"start"})},[]),te.useEffect(()=>{if(!v||v.file!==e.path)return;const B=Ep(ue,v.side,v.line);if(B<0)return;me.scrollToIndex(B,{align:"center"}),oe({side:v.side,line:v.line});const H=setTimeout(()=>oe(null),1600);return()=>clearTimeout(H)},[v]),te.useEffect(()=>{const B=H=>{if(H.ctrlKey||H.metaKey||H.altKey)return;const we=H.target;if(we&&(we.tagName==="INPUT"&&we.type!=="checkbox"||we.tagName==="TEXTAREA"||we.tagName==="SELECT"||we.isContentEditable)||H.key!=="n"&&H.key!=="p")return;const Se=rx(ue);if(!Se.length)return;const Oe=ge.current,Ie=Oe?Oe.scrollTop:0,Ke=Se.map(et=>me.getOffsetForIndex(et,"start")?.[0]??0);let st;if(H.key==="n")st=Se.find((et,Un)=>Ke[Un]>Ie+4);else for(let et=Se.length-1;et>=0;et--)if(Ke[et]<Ie-4){st=Se[et];break}st!==void 0&&(H.preventDefault(),me.scrollToIndex(st,{align:"start"}))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[ue,me]),te.useEffect(()=>{const B=()=>{const H=P.current;if(!H)return;L(null);const we=Math.min(H.anchor,H.head),Se=Math.max(H.anchor,H.head),Oe=W.getState().reattaching;Oe?l(Oe,{side:H.side,startLine:we,endLine:Se}):a({filePath:e.path,side:H.side,startLine:we,endLine:Se})};return window.addEventListener("mouseup",B),()=>window.removeEventListener("mouseup",B)},[L,l,a,e.path]);const U=(B,H,we,Se)=>{B.button===0&&(B.preventDefault(),B.stopPropagation(),L({side:H,hunkIndex:we,anchor:Se,head:Se}))},_=(B,H,we)=>{const Se=P.current;!Se||Se.side!==B||Se.hunkIndex!==H||Se.head===we||L({...Se,head:we})},O=(B,H)=>!A||H===void 0||A.side!==B?!1:H>=Math.min(A.anchor,A.head)&&H<=Math.max(A.anchor,A.head),G=(B,H)=>!!Q&&Q.side===B&&Q.line===H,N=(B,H,we)=>!!B&&we!==void 0&&B.side===H&&we>=B.startLine&&we<=B.endLine,pe=(B,H)=>[O(B,H)||N(re,B,H)?"selected":"",N(ne,B,H)?"focused":"",G(B,H)?"flash":""].join(" "),Ce=(B,H)=>{if(H===void 0)return null;const we=D.get(`${B}:${H}`);return we?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:`pill ${we.active?"":"muted"}`,title:"查看评论",onClick:()=>{c(we.ids[0]??null,!1)},children:we.count}),C.jsx("span",{className:`pin ${we.active?"":"muted"}`})]}):null},ye=te.useCallback(async()=>E||(I.current||(I.current=$e.fullFile(n,e.path,"new").then(B=>{if(B.content===null)return null;const H=B.content.split(`
|
|
163
|
+
`);return H.length&&H[H.length-1]===""&&H.pop(),S(H),H}).catch(B=>(m(B instanceof Error?B.message:String(B),"error"),null)).finally(()=>{I.current=null})),I.current),[E,n,e.path,m]),je=async(B,H)=>{if(!await ye()){m("无法读取完整文件内容","error");return}b(Se=>{const Oe=Se[B.index]??{top:0,bottom:0,all:!1},Ie=H==="all"?{...Oe,all:!0}:H==="top"?{...Oe,top:Oe.top+nl}:{...Oe,bottom:Oe.bottom+nl};return{...Se,[B.index]:Ie}})},Te=(B,H)=>{const we=e.hunks[H];p(e.path,UC(B,we))},De=B=>{const{gap:H,hidden:we}=B,Se=H.index===0,Oe=H.index===e.hunks.length;return C.jsxs("div",{className:"row gap-row",children:[!Se&&C.jsxs("button",{className:"link",onClick:()=>{je(H,"top")},title:"展开紧接上一个 hunk 之后的 20 行",children:["↑ 展开上方 ",nl," 行"]}),C.jsxs("button",{className:"link",onClick:()=>{je(H,"all")},children:["展开全部",we!==null?` (${we} 行)`:""]}),!Oe&&C.jsxs("button",{className:"link",onClick:()=>{je(H,"bottom")},title:"展开紧接下一个 hunk 之前的 20 行",children:["↓ 展开下方 ",nl," 行"]})]})},Ze=B=>{const H=B.line,we=H.type==="del"?"old":"new",Se=we==="old"?H.oldLineNo:H.newLineNo,Oe=ie.current.get(rl(H,we));return C.jsxs("div",{className:`row line ${H.type} ${pe(we,Se)} ${B.expanded?"expanded":""}`,onMouseEnter:()=>Se!==void 0&&_(we,B.hunkIndex,Se),children:[C.jsx("span",{className:"gut",onClick:()=>Te(H,B.hunkIndex),title:"在 nvim 中打开此行",children:H.oldLineNo??""}),C.jsx("span",{className:"gut",onClick:()=>Te(H,B.hunkIndex),title:"在 nvim 中打开此行",children:H.newLineNo??""}),C.jsx("span",{className:"addc",children:!B.expanded&&Se!==void 0&&C.jsx("button",{className:"add-btn",onMouseDown:Ie=>U(Ie,we,B.hunkIndex,Se),title:"添加评论(可拖选多行)",children:"+"})}),C.jsx("span",{className:"marker",children:H.type==="add"?"+":H.type==="del"?"-":" "}),C.jsxs("span",{className:"code",children:[C.jsx(gm,{content:H.content,tokens:Oe}),H.noNewline&&C.jsx("span",{className:"nonl",title:"No newline at end of file",children:"⏎"})]}),Ce(we,Se)]})},qt=(B,H,we,Se)=>{if(!B)return C.jsx("span",{className:"cell empty"});const Oe=H==="old"?B.oldLineNo:B.newLineNo,Ie=B.type==="context"?"context":H==="old"?"del":"add",Ke=ie.current.get(rl(B,H));return C.jsxs("span",{className:`cell ${Ie} ${pe(H,Oe)}`,onMouseEnter:()=>Oe!==void 0&&_(H,we,Oe),children:[C.jsx("span",{className:"gut",onClick:()=>Te(B,we),title:"在 nvim 中打开此行",children:Oe??""}),C.jsx("span",{className:"addc",children:!Se&&Oe!==void 0&&C.jsx("button",{className:"add-btn",onMouseDown:st=>U(st,H,we,Oe),title:"添加评论(可拖选多行)",children:"+"})}),C.jsx("span",{className:"code",children:C.jsx(gm,{content:B.content,tokens:Ke})}),Ce(H,Oe)]})},Ur=B=>{switch(B.kind){case"gap":return De(B);case"hunk":return C.jsxs("div",{className:"row hunk-head",children:["@@ -",B.hunk.oldStart,",",B.hunk.oldLines," +",B.hunk.newStart,",",B.hunk.newLines," @@ ",C.jsx("span",{className:"muted",children:B.hunk.header})]});case"line":return Ze(B);case"pair":return C.jsxs("div",{className:`row pair ${B.expanded?"expanded":""}`,children:[qt(B.left,"old",B.hunkIndex,B.expanded),qt(B.right,"new",B.hunkIndex,B.expanded)]})}},Bn=me.getVirtualItems();return C.jsx("div",{ref:ge,className:`diff-scroll ${A?"selecting":""} ${w?"reattaching":""}`,children:C.jsx("div",{className:`diff-list ${t}`,style:{height:me.getTotalSize(),position:"relative"},children:Bn.map(B=>C.jsx("div",{"data-index":B.index,ref:me.measureElement,className:"vrow",style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${B.start}px)`},children:Ur(ue[B.index])},B.key))})})}const WC=5e3;function HC({entry:e}){const t=W(o=>o.toggleViewed),n=W(o=>o.openInNvim),i=W(o=>!!o.nvim?.selected);return C.jsxs("div",{className:"file-head",children:[C.jsx("span",{className:`status status-${e.status}`,children:e.status}),C.jsx("span",{className:"path mono",children:e.oldPath?C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"muted",children:e.oldPath})," → ",e.path]}):e.path}),e.oldMode&&e.newMode&&C.jsxs("span",{className:"muted mono",children:["mode ",e.oldMode," → ",e.newMode]}),C.jsxs("span",{className:"counts",children:[C.jsxs("span",{className:"add",children:["+",e.additions]})," ",C.jsxs("span",{className:"del",children:["-",e.deletions]})]}),e.changed&&C.jsx("span",{className:"changed",children:"文件已变化,viewed 已取消"}),C.jsx("span",{className:"spacer"}),C.jsx("button",{className:"link",disabled:!i,onClick:()=>{n(e.path,1)},title:"在 nvim 中打开",children:"在 nvim 中打开"}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:e.viewed,onChange:()=>{t(e.path)}}),"Viewed"]})]})}function KC(){const e=W(p=>p.activeFile),t=W(p=>p.files.find(m=>m.path===p.activeFile)),n=W(p=>p.activeFile?p.diffs[p.activeFile]:void 0),i=W(p=>p.filesLoading),o=W(p=>p.files),l=W(p=>p.openFile),[a,c]=te.useState(null),f=te.useMemo(()=>n?.status==="ok"?ix(n.diff):0,[n]);if(!e||!t)return C.jsx("div",{className:"placeholder",children:i&&o.length===0?C.jsx("p",{children:"加载文件列表…"}):o.length===0?C.jsx("p",{children:"当前 Target 没有改动。"}):C.jsxs(C.Fragment,{children:[C.jsx("p",{children:"在左侧选择一个文件查看 diff。"}),C.jsxs("p",{className:"muted",children:["快捷键:",C.jsx("kbd",{children:"j"}),"/",C.jsx("kbd",{children:"k"})," 切换文件,",C.jsx("kbd",{children:"n"}),"/",C.jsx("kbd",{children:"p"})," 切换 hunk,",C.jsx("kbd",{children:"r"})," 刷新"]})]})});let h;return!n||n.status==="loading"?h=C.jsx("div",{className:"placeholder",children:"加载 diff…"}):n.status==="error"?h=C.jsxs("div",{className:"placeholder error-box",children:[n.message," ",C.jsx("button",{className:"link",onClick:()=>{l(e,!0)},children:"重试"})]}):n.diff.binary?h=C.jsx("div",{className:"placeholder",children:"二进制文件,不展示 diff"}):n.diff.hunks.length===0?h=C.jsx("div",{className:"placeholder",children:t.oldMode&&t.newMode?`仅文件模式变更:${t.oldMode} → ${t.newMode}`:t.status==="renamed"?"仅重命名,内容无变化":"空文件 / 无内容变化"}):f>WC&&a!==e?h=C.jsxs("div",{className:"placeholder",children:[C.jsxs("p",{children:["该文件 diff 有 ",f," 行,默认不渲染。"]}),C.jsx("button",{className:"primary",onClick:()=>c(e),children:"仍然渲染"})]}):h=C.jsx(GC,{diff:n.diff},e+":"+n.diff.contentHash),C.jsxs("div",{className:"diff-panel",children:[C.jsx(HC,{entry:t}),h]})}const qC=200;function QC(){const e=W(L=>L.root),t=W(L=>L.targetKey),n=W(L=>L.setTarget),i=W(L=>L.showToast),[o,l]=te.useState([]),[a,c]=te.useState(!1),[f,h]=te.useState(!1),[p,m]=te.useState(""),[w,v]=te.useState(""),[k,b]=te.useState(""),E=te.useRef(null),S=te.useMemo(()=>dl(t).worktree,[t]),I=te.useMemo(()=>{const L=dl(t);return L.kind==="commit"?L.sha:null},[t]),A=te.useCallback(async L=>{h(!0);try{const Q=await $e.commits({root:e,path:k||void 0,before:L,limit:qC});l(oe=>L?[...oe,...Q.commits]:Q.commits),c(Q.hasMore)}catch(Q){i(Q instanceof Error?Q.message:String(Q),"error")}finally{h(!1)}},[e,k,i]);te.useEffect(()=>{l([]),A()},[A]);const $=()=>{const L=E.current;if(!(!L||f||!a)&&L.scrollTop+L.clientHeight>=L.scrollHeight-200){const Q=o[o.length-1];Q&&A(Q.sha)}},P=te.useMemo(()=>{const L=p.trim().toLowerCase();return L?o.filter(Q=>Q.subject.toLowerCase().includes(L)||Q.author.toLowerCase().includes(L)||Q.sha.startsWith(L)):o},[o,p]);return C.jsxs("div",{className:"commits-panel",children:[C.jsxs("div",{className:"commits-tools",children:[C.jsx("input",{value:p,onChange:L=>m(L.target.value),placeholder:"按 message / 作者过滤(已加载的)"}),C.jsxs("form",{className:"inline-form",onSubmit:L=>{L.preventDefault(),b(w.trim())},children:[C.jsx("input",{value:w,onChange:L=>v(L.target.value),placeholder:"按路径过滤 (git log -- path)",spellCheck:!1}),C.jsx("button",{type:"submit",children:"应用"}),k&&C.jsx("button",{type:"button",onClick:()=>{v(""),b("")},children:"清除"})]}),C.jsxs("span",{className:"muted",children:[P.length,"/",o.length," 条",a?",滚动加载更多":""]})]}),C.jsxs("div",{className:"commits-list",ref:E,onScroll:$,children:[P.map(L=>C.jsxs("div",{className:`commit-row ${I&&(L.sha===I||L.sha.startsWith(I))?"active":""}`,onClick:()=>{n(zn({kind:"commit",sha:L.sha,...S?{worktree:S}:{}}))},title:L.sha,children:[C.jsx("span",{className:"mono sha",children:L.shortSha}),C.jsx("span",{className:"subject",children:L.subject}),L.parents.length>1&&C.jsx("span",{className:"badge",children:"merge"}),C.jsx("span",{className:"muted author",children:L.author}),C.jsx("span",{className:"muted date",children:new Date(L.date).toLocaleString()})]},L.sha)),f&&C.jsx("div",{className:"muted empty",children:"加载中…"}),!f&&o.length===0&&C.jsx("div",{className:"muted empty",children:"没有 commit"})]})]})}const XC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JC={};function ym(e,t){return(JC.jsx?YC:XC).test(e)}var yi={},ec,wm;function ZC(){if(wm)return ec;wm=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
164
|
+
`,h="/",p="*",m="",w="comment",v="declaration";function k(E,S){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];S=S||{};var I=1,A=1;function $(ie){var Y=ie.match(t);Y&&(I+=Y.length);var ge=ie.lastIndexOf(f);A=~ge?ie.length-ge:A+ie.length}function P(){var ie={line:I,column:A};return function(Y){return Y.position=new L(ie),ue(),Y}}function L(ie){this.start=ie,this.end={line:I,column:A},this.source=S.source}L.prototype.content=E;function Q(ie){var Y=new Error(S.source+":"+I+":"+A+": "+ie);if(Y.reason=ie,Y.filename=S.source,Y.line=I,Y.column=A,Y.source=E,!S.silent)throw Y}function oe(ie){var Y=ie.exec(E);if(Y){var ge=Y[0];return $(ge),E=E.slice(ge.length),Y}}function ue(){oe(n)}function D(ie){var Y;for(ie=ie||[];Y=ne();)Y!==!1&&ie.push(Y);return ie}function ne(){var ie=P();if(!(h!=E.charAt(0)||p!=E.charAt(1))){for(var Y=2;m!=E.charAt(Y)&&(p!=E.charAt(Y)||h!=E.charAt(Y+1));)++Y;if(Y+=2,m===E.charAt(Y-1))return Q("End of comment missing");var ge=E.slice(2,Y-2);return A+=2,$(ge),E=E.slice(Y),A+=2,ie({type:w,comment:ge})}}function re(){var ie=P(),Y=oe(i);if(Y){if(ne(),!oe(o))return Q("property missing ':'");var ge=oe(l),me=ie({type:v,property:b(Y[0].replace(e,m)),value:ge?b(ge[0].replace(e,m)):m});return oe(a),me}}function fe(){var ie=[];D(ie);for(var Y;Y=re();)Y!==!1&&(ie.push(Y),D(ie));return ie}return ue(),fe()}function b(E){return E?E.replace(c,m):m}return ec=k,ec}var vm;function e_(){if(vm)return yi;vm=1;var e=yi&&yi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=n;const t=e(ZC());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof o=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?o(h,p,f):p&&(l=l||{},l[h]=p)}),l}return yi}var ms={},km;function t_(){if(km)return ms;km=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),l(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(i,c),h.replace(t,a))};return ms.camelCase=f,ms}var gs,xm;function n_(){if(xm)return gs;xm=1;var e=gs&&gs.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(e_()),n=t_();function i(o,l){var a={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return i.default=i,gs=i,gs}var r_=n_();const i_=Gc(r_),xy=Sy("end"),cf=Sy("start");function Sy(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function s_(e){const t=cf(e),n=xy(e);if(t&&n)return{start:t,end:n}}function Cs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Sm(e.position):"start"in e||"end"in e?Sm(e):"line"in e||"column"in e?Mc(e):""}function Mc(e){return Cm(e&&e.line)+":"+Cm(e&&e.column)}function Sm(e){return Mc(e&&e.start)+"-"+Mc(e&&e.end)}function Cm(e){return e&&typeof e=="number"?e:1}class Tt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?o=t:!l.cause&&t&&(a=!0,o=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?l.ruleId=i:(l.source=i.slice(0,f),l.ruleId=i.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=Cs(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Tt.prototype.file="";Tt.prototype.name="";Tt.prototype.reason="";Tt.prototype.message="";Tt.prototype.stack="";Tt.prototype.column=void 0;Tt.prototype.line=void 0;Tt.prototype.ancestors=void 0;Tt.prototype.cause=void 0;Tt.prototype.fatal=void 0;Tt.prototype.place=void 0;Tt.prototype.ruleId=void 0;Tt.prototype.source=void 0;const ff={}.hasOwnProperty,o_=new Map,l_=/[A-Z]/g,a_=new Set(["table","tbody","thead","tfoot","tr"]),u_=new Set(["td","th"]),Cy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function c_(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=w_(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=y_(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Os:jg,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=_y(o,e,void 0);return l&&typeof l!="string"?l:o.create(e,o.Fragment,{children:l||void 0},void 0)}function _y(e,t,n){if(t.type==="element")return f_(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return d_(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return p_(e,t,n);if(t.type==="mdxjsEsm")return h_(e,t);if(t.type==="root")return m_(e,t,n);if(t.type==="text")return g_(e,t)}function f_(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Os,e.schema=o),e.ancestors.push(t);const l=by(e,t.tagName,!1),a=v_(e,t);let c=hf(e,t);return a_.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Al(f):!0})),Ey(e,a,l,t),df(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function d_(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ps(e,t.position)}function h_(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ps(e,t.position)}function p_(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=Os,e.schema=o),e.ancestors.push(t);const l=t.name===null?e.Fragment:by(e,t.name,!0),a=k_(e,t),c=hf(e,t);return Ey(e,a,l,t),df(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function m_(e,t,n){const i={};return df(i,hf(e,t)),e.create(t,e.Fragment,i,n)}function g_(e,t){return t.value}function Ey(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function df(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function y_(e,t,n){return i;function i(o,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function w_(e,t){return n;function n(i,o,l,a){const c=Array.isArray(l.children),f=cf(i);return t(o,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function v_(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&ff.call(t.properties,o)){const l=x_(e,o,t.properties[o]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&u_.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function k_(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Ps(e,t.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else Ps(e,t.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function hf(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:o_;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=o.get(f)||0;a=f+"-"+h,o.set(f,h+1)}}const c=_y(e,l,a);c!==void 0&&n.push(c)}return n}function x_(e,t,n){const i=Rg(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Mg(n):Dg(n)),i.property==="style"){let o=typeof n=="object"?n:S_(e,String(n));return e.stylePropertyNameCase==="css"&&(o=C_(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?Yx[i.property]||i.property:i.attribute,n]}}function S_(e,t){try{return i_(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new Tt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Cy+"#cannot-parse-style-attribute",o}}function by(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let l=-1,a;for(;++l<o.length;){const c=ym(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=ym(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return ff.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ps(e)}function Ps(e,t){const n=new Tt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Cy+"#cannot-handle-mdx-estrees-without-createevaluater",n}function C_(e){const t={};let n;for(n in e)ff.call(e,n)&&(t[__(n)]=e[n]);return t}function __(e){let t=e.replace(l_,E_);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function E_(e){return"-"+e.toLowerCase()}const tc={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"]},b_={};function pf(e,t){const n=b_,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Iy(e,i,o)}function Iy(e,t,n){if(I_(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _m(e.children,t,n)}return Array.isArray(e)?_m(e,t,n):""}function _m(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=Iy(e[o],t,n);return i.join("")}function I_(e){return!!(e&&typeof e=="object")}const Em=document.createElement("i");function mf(e){const t="&"+e+";";Em.innerHTML=t;const n=Em.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Kt(e,t,n,i){const o=e.length;let l=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Kt(e,e.length,0,t),e):t}const bm={}.hasOwnProperty;function Ny(e){const t={};let n=-1;for(;++n<e.length;)N_(t,e[n]);return t}function N_(e,t){let n;for(n in t){const o=(bm.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){bm.call(o,a)||(o[a]=[]);const c=l[a];T_(o[a],Array.isArray(c)?c:c?[c]:[])}}}function T_(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Kt(e,0,0,i)}function Ty(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=pr(/[A-Za-z]/),Nt=pr(/[\dA-Za-z]/),A_=pr(/[#-'*+\--9=?A-Z^-~]/);function bl(e){return e!==null&&(e<32||e===127)}const Dc=pr(/\d/),P_=pr(/[\dA-Fa-f]/),L_=pr(/[!-/:-@[-`{-~]/);function xe(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Re(e){return e===-2||e===-1||e===32}const Dl=pr(new RegExp("\\p{P}|\\p{S}","u")),$r=pr(/\s/);function pr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ti(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&Nt(e.charCodeAt(n+1))&&Nt(e.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),o=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Me(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return Re(f)?(e.enter(n),c(f)):t(f)}function c(f){return Re(f)&&l++<o?(e.consume(f),c):(e.exit(n),t(f))}}const R_={tokenize:j_};function j_(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Me(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return xe(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const O_={tokenize:M_},Im={tokenize:D_};function M_(e){const t=this,n=[];let i=0,o,l,a;return c;function c(A){if(i<n.length){const $=n[i];return t.containerState=$[1],e.attempt($[0].continuation,f,h)(A)}return h(A)}function f(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&I();const $=t.events.length;let P=$,L;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){L=t.events[P][1].end;break}S(i);let Q=$;for(;Q<t.events.length;)t.events[Q][1].end={...L},Q++;return Kt(t.events,P+1,0,t.events.slice($)),t.events.length=Q,h(A)}return c(A)}function h(A){if(i===n.length){if(!o)return w(A);if(o.currentConstruct&&o.currentConstruct.concrete)return k(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Im,p,m)(A)}function p(A){return o&&I(),S(i),w(A)}function m(A){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,k(A)}function w(A){return t.containerState={},e.attempt(Im,v,k)(A)}function v(A){return i++,n.push([t.currentConstruct,t.containerState]),w(A)}function k(A){if(A===null){o&&I(),S(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),b(A)}function b(A){if(A===null){E(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return xe(A)?(e.consume(A),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),b)}function E(A,$){const P=t.sliceStream(A);if($&&P.push(null),A.previous=l,l&&(l.next=A),l=A,o.defineSkip(A.start),o.write(P),t.parser.lazy[A.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<a&&(!o.events[L][1].end||o.events[L][1].end.offset>a))return;const Q=t.events.length;let oe=Q,ue,D;for(;oe--;)if(t.events[oe][0]==="exit"&&t.events[oe][1].type==="chunkFlow"){if(ue){D=t.events[oe][1].end;break}ue=!0}for(S(i),L=Q;L<t.events.length;)t.events[L][1].end={...D},L++;Kt(t.events,oe+1,0,t.events.slice(Q)),t.events.length=L}}function S(A){let $=n.length;for(;$-- >A;){const P=n[$];t.containerState=P[1],P[0].exit.call(t,e)}n.length=A}function I(){o.write([null]),l=void 0,o=void 0,t.containerState._closeFlow=void 0}}function D_(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _i(e){if(e===null||Ge(e)||$r(e))return 1;if(Dl(e))return 2}function Fl(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const l=e[o].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Fc={name:"attention",resolveAll:F_,tokenize:z_};function F_(e,t){let n=-1,i,o,l,a,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},w={...e[n][1].start};Nm(m,-f),Nm(w,f),a={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:w},l={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=rn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=rn(h,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=rn(h,Fl(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=rn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Kt(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z_(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=_i(i);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const h=e.exit("attentionSequence"),p=_i(f),m=!p||p===2&&o||n.includes(f),w=!o||o===2&&p||n.includes(i);return h._open=!!(l===42?m:m&&(o||!w)),h._close=!!(l===42?w:w&&(p||!m)),t(f)}}function Nm(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const $_={name:"autolink",tokenize:B_};function B_(e,t,n){let i=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return Lt(v)?(e.consume(v),a):v===64?n(v):h(v)}function a(v){return v===43||v===45||v===46||Nt(v)?(i=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),i=0,f):(v===43||v===45||v===46||Nt(v))&&i++<32?(e.consume(v),c):(i=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||bl(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),p):A_(v)?(e.consume(v),h):n(v)}function p(v){return Nt(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):w(v)}function w(v){if((v===45||Nt(v))&&i++<63){const k=v===45?w:m;return e.consume(v),k}return n(v)}}const Ds={partial:!0,tokenize:U_};function U_(e,t,n){return i;function i(l){return Re(l)?Me(e,o,"linePrefix")(l):o(l)}function o(l){return l===null||xe(l)?t(l):n(l)}}const Ay={continuation:{tokenize:G_},exit:W_,name:"blockQuote",tokenize:V_};function V_(e,t,n){const i=this;return o;function o(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Re(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function G_(e,t,n){const i=this;return o;function o(a){return Re(a)?Me(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(Ay,t,n)(a)}}function W_(e){e.exit("blockQuote")}const Py={name:"characterEscape",tokenize:H_};function H_(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),o}function o(l){return L_(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Ly={name:"characterReference",tokenize:K_};function K_(e,t,n){const i=this;let o=0,l,a;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=Nt,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=P_,p):(e.enter("characterReferenceValue"),l=7,a=Dc,p(m))}function p(m){if(m===59&&o){const w=e.exit("characterReferenceValue");return a===Nt&&!mf(i.sliceSerialize(w))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(m)&&o++<l?(e.consume(m),p):n(m)}}const Tm={partial:!0,tokenize:Q_},Am={concrete:!0,name:"codeFenced",tokenize:q_};function q_(e,t,n){const i=this,o={partial:!0,tokenize:P};let l=0,a=0,c;return f;function f(L){return h(L)}function h(L){const Q=i.events[i.events.length-1];return l=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(a++,e.consume(L),p):a<3?n(L):(e.exit("codeFencedFenceSequence"),Re(L)?Me(e,m,"whitespace")(L):m(L))}function m(L){return L===null||xe(L)?(e.exit("codeFencedFence"),i.interrupt?t(L):e.check(Tm,b,$)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Re(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,v,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),w)}function v(L){return L===null||xe(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(L))}function k(L){return L===null||xe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),k)}function b(L){return e.attempt(o,$,E)(L)}function E(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),S}function S(L){return l>0&&Re(L)?Me(e,I,"linePrefix",l+1)(L):I(L)}function I(L){return L===null||xe(L)?e.check(Tm,b,$)(L):(e.enter("codeFlowValue"),A(L))}function A(L){return L===null||xe(L)?(e.exit("codeFlowValue"),I(L)):(e.consume(L),A)}function $(L){return e.exit("codeFenced"),t(L)}function P(L,Q,oe){let ue=0;return D;function D(Y){return L.enter("lineEnding"),L.consume(Y),L.exit("lineEnding"),ne}function ne(Y){return L.enter("codeFencedFence"),Re(Y)?Me(L,re,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):re(Y)}function re(Y){return Y===c?(L.enter("codeFencedFenceSequence"),fe(Y)):oe(Y)}function fe(Y){return Y===c?(ue++,L.consume(Y),fe):ue>=a?(L.exit("codeFencedFenceSequence"),Re(Y)?Me(L,ie,"whitespace")(Y):ie(Y)):oe(Y)}function ie(Y){return Y===null||xe(Y)?(L.exit("codeFencedFence"),Q(Y)):oe(Y)}}}function Q_(e,t,n){const i=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const nc={name:"codeIndented",tokenize:Y_},X_={partial:!0,tokenize:J_};function Y_(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),Me(e,l,"linePrefix",5)(h)}function l(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):xe(h)?e.attempt(X_,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||xe(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function J_(e,t,n){const i=this;return o;function o(a){return i.parser.lazy[i.now().line]?n(a):xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Me(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):xe(a)?o(a):n(a)}}const Z_={name:"codeText",previous:tE,resolve:eE,tokenize:nE};function eE(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function tE(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nE(e,t,n){let i=0,o,l;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(l=e.enter("codeTextSequence"),o=0,p(m)):xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||xe(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(l.type="codeTextData",h(m))}}class rE{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&ys(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ys(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ys(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ys(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ys(this.left,n.reverse())}}}function ys(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ry(e){const t={};let n=-1,i,o,l,a,c,f,h;const p=new rE(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,iE(p,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(a=p.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return Kt(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function iE(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let p,m,w=-1,v=n,k=0,b=0;const E=[b];for(;v;){for(;e.get(++o)[1]!==v;);l.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&a.defineSkip(v.start),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(p),v._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++w<c.length;)c[w][0]==="exit"&&c[w-1][0]==="enter"&&c[w][1].type===c[w-1][1].type&&c[w][1].start.line!==c[w][1].end.line&&(b=w+1,E.push(b),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(a.events=[],v?(v._tokenizer=void 0,v.previous=void 0):E.pop(),w=E.length;w--;){const S=c.slice(E[w],E[w+1]),I=l.pop();f.push([I,I+S.length-1]),e.splice(I,2,S)}for(f.reverse(),w=-1;++w<f.length;)h[k+f[w][0]]=k+f[w][1],k+=f[w][1]-f[w][0]-1;return h}const sE={resolve:lE,tokenize:aE},oE={partial:!0,tokenize:uE};function lE(e){return Ry(e),e}function aE(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?l(c):xe(c)?e.check(oE,a,l)(c):(e.consume(c),o)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function uE(e,t,n){const i=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Me(e,l,"linePrefix")}function l(a){if(a===null||xe(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function jy(e,t,n,i,o,l,a,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(S){return S===60?(e.enter(i),e.enter(o),e.enter(l),e.consume(S),e.exit(l),w):S===null||S===32||S===41||bl(S)?n(S):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),b(S))}function w(S){return S===62?(e.enter(l),e.consume(S),e.exit(l),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(S))}function v(S){return S===62?(e.exit("chunkString"),e.exit(c),w(S)):S===null||S===60||xe(S)?n(S):(e.consume(S),S===92?k:v)}function k(S){return S===60||S===62||S===92?(e.consume(S),v):v(S)}function b(S){return!p&&(S===null||S===41||Ge(S))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(S)):p<h&&S===40?(e.consume(S),p++,b):S===41?(e.consume(S),p--,b):S===null||S===32||S===40||bl(S)?n(S):(e.consume(S),S===92?E:b)}function E(S){return S===40||S===41||S===92?(e.consume(S),b):b(S)}}function Oy(e,t,n,i,o,l){const a=this;let c=0,f;return h;function h(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(l),p}function p(v){return c>999||v===null||v===91||v===93&&!f||v===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(v):v===93?(e.exit(l),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||xe(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),f||(f=!Re(v)),v===92?w:m)}function w(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function My(e,t,n,i,o,l){let a;return c;function c(w){return w===34||w===39||w===40?(e.enter(i),e.enter(o),e.consume(w),e.exit(o),a=w===40?41:w,f):n(w)}function f(w){return w===a?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),t):(e.enter(l),h(w))}function h(w){return w===a?(e.exit(l),f(a)):w===null?n(w):xe(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Me(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===a||w===null||xe(w)?(e.exit("chunkString"),h(w)):(e.consume(w),w===92?m:p)}function m(w){return w===a||w===92?(e.consume(w),p):p(w)}}function _s(e,t){let n;return i;function i(o){return xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):Re(o)?Me(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const cE={name:"definition",tokenize:dE},fE={partial:!0,tokenize:hE};function dE(e,t,n){const i=this;let o;return l;function l(v){return e.enter("definition"),a(v)}function a(v){return Oy.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return Ge(v)?_s(e,h)(v):h(v)}function h(v){return jy(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(fE,m,m)(v)}function m(v){return Re(v)?Me(e,w,"whitespace")(v):w(v)}function w(v){return v===null||xe(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function hE(e,t,n){return i;function i(c){return Ge(c)?_s(e,o)(c):n(c)}function o(c){return My(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Re(c)?Me(e,a,"whitespace")(c):a(c)}function a(c){return c===null||xe(c)?t(c):n(c)}}const pE={name:"hardBreakEscape",tokenize:mE};function mE(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),o}function o(l){return xe(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const gE={name:"headingAtx",resolve:yE,tokenize:wE};function yE(e,t){let n=e.length-2,i=3,o,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Kt(e,i,n-i+1,[["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t]])),e}function wE(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),a(p)}function a(p){return p===35&&i++<6?(e.consume(p),a):p===null||Ge(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||xe(p)?(e.exit("atxHeading"),t(p)):Re(p)?Me(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Ge(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const vE=["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"],Pm=["pre","script","style","textarea"],kE={concrete:!0,name:"htmlFlow",resolveTo:CE,tokenize:_E},xE={partial:!0,tokenize:bE},SE={partial:!0,tokenize:EE};function CE(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function _E(e,t,n){const i=this;let o,l,a,c,f;return h;function h(N){return p(N)}function p(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),m}function m(N){return N===33?(e.consume(N),w):N===47?(e.consume(N),l=!0,b):N===63?(e.consume(N),o=3,i.interrupt?t:_):Lt(N)?(e.consume(N),a=String.fromCharCode(N),E):n(N)}function w(N){return N===45?(e.consume(N),o=2,v):N===91?(e.consume(N),o=5,c=0,k):Lt(N)?(e.consume(N),o=4,i.interrupt?t:_):n(N)}function v(N){return N===45?(e.consume(N),i.interrupt?t:_):n(N)}function k(N){const pe="CDATA[";return N===pe.charCodeAt(c++)?(e.consume(N),c===pe.length?i.interrupt?t:re:k):n(N)}function b(N){return Lt(N)?(e.consume(N),a=String.fromCharCode(N),E):n(N)}function E(N){if(N===null||N===47||N===62||Ge(N)){const pe=N===47,Ce=a.toLowerCase();return!pe&&!l&&Pm.includes(Ce)?(o=1,i.interrupt?t(N):re(N)):vE.includes(a.toLowerCase())?(o=6,pe?(e.consume(N),S):i.interrupt?t(N):re(N)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(N):l?I(N):A(N))}return N===45||Nt(N)?(e.consume(N),a+=String.fromCharCode(N),E):n(N)}function S(N){return N===62?(e.consume(N),i.interrupt?t:re):n(N)}function I(N){return Re(N)?(e.consume(N),I):D(N)}function A(N){return N===47?(e.consume(N),D):N===58||N===95||Lt(N)?(e.consume(N),$):Re(N)?(e.consume(N),A):D(N)}function $(N){return N===45||N===46||N===58||N===95||Nt(N)?(e.consume(N),$):P(N)}function P(N){return N===61?(e.consume(N),L):Re(N)?(e.consume(N),P):A(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),f=N,Q):Re(N)?(e.consume(N),L):oe(N)}function Q(N){return N===f?(e.consume(N),f=null,ue):N===null||xe(N)?n(N):(e.consume(N),Q)}function oe(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ge(N)?P(N):(e.consume(N),oe)}function ue(N){return N===47||N===62||Re(N)?A(N):n(N)}function D(N){return N===62?(e.consume(N),ne):n(N)}function ne(N){return N===null||xe(N)?re(N):Re(N)?(e.consume(N),ne):n(N)}function re(N){return N===45&&o===2?(e.consume(N),ge):N===60&&o===1?(e.consume(N),me):N===62&&o===4?(e.consume(N),O):N===63&&o===3?(e.consume(N),_):N===93&&o===5?(e.consume(N),U):xe(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(xE,G,fe)(N)):N===null||xe(N)?(e.exit("htmlFlowData"),fe(N)):(e.consume(N),re)}function fe(N){return e.check(SE,ie,G)(N)}function ie(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Y}function Y(N){return N===null||xe(N)?fe(N):(e.enter("htmlFlowData"),re(N))}function ge(N){return N===45?(e.consume(N),_):re(N)}function me(N){return N===47?(e.consume(N),a="",Z):re(N)}function Z(N){if(N===62){const pe=a.toLowerCase();return Pm.includes(pe)?(e.consume(N),O):re(N)}return Lt(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),Z):re(N)}function U(N){return N===93?(e.consume(N),_):re(N)}function _(N){return N===62?(e.consume(N),O):N===45&&o===2?(e.consume(N),_):re(N)}function O(N){return N===null||xe(N)?(e.exit("htmlFlowData"),G(N)):(e.consume(N),O)}function G(N){return e.exit("htmlFlow"),t(N)}}function EE(e,t,n){const i=this;return o;function o(a){return xe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function bE(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ds,t,n)}}const IE={name:"htmlText",tokenize:NE};function NE(e,t,n){const i=this;let o,l,a;return c;function c(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),f}function f(_){return _===33?(e.consume(_),h):_===47?(e.consume(_),P):_===63?(e.consume(_),A):Lt(_)?(e.consume(_),oe):n(_)}function h(_){return _===45?(e.consume(_),p):_===91?(e.consume(_),l=0,k):Lt(_)?(e.consume(_),I):n(_)}function p(_){return _===45?(e.consume(_),v):n(_)}function m(_){return _===null?n(_):_===45?(e.consume(_),w):xe(_)?(a=m,me(_)):(e.consume(_),m)}function w(_){return _===45?(e.consume(_),v):m(_)}function v(_){return _===62?ge(_):_===45?w(_):m(_)}function k(_){const O="CDATA[";return _===O.charCodeAt(l++)?(e.consume(_),l===O.length?b:k):n(_)}function b(_){return _===null?n(_):_===93?(e.consume(_),E):xe(_)?(a=b,me(_)):(e.consume(_),b)}function E(_){return _===93?(e.consume(_),S):b(_)}function S(_){return _===62?ge(_):_===93?(e.consume(_),S):b(_)}function I(_){return _===null||_===62?ge(_):xe(_)?(a=I,me(_)):(e.consume(_),I)}function A(_){return _===null?n(_):_===63?(e.consume(_),$):xe(_)?(a=A,me(_)):(e.consume(_),A)}function $(_){return _===62?ge(_):A(_)}function P(_){return Lt(_)?(e.consume(_),L):n(_)}function L(_){return _===45||Nt(_)?(e.consume(_),L):Q(_)}function Q(_){return xe(_)?(a=Q,me(_)):Re(_)?(e.consume(_),Q):ge(_)}function oe(_){return _===45||Nt(_)?(e.consume(_),oe):_===47||_===62||Ge(_)?ue(_):n(_)}function ue(_){return _===47?(e.consume(_),ge):_===58||_===95||Lt(_)?(e.consume(_),D):xe(_)?(a=ue,me(_)):Re(_)?(e.consume(_),ue):ge(_)}function D(_){return _===45||_===46||_===58||_===95||Nt(_)?(e.consume(_),D):ne(_)}function ne(_){return _===61?(e.consume(_),re):xe(_)?(a=ne,me(_)):Re(_)?(e.consume(_),ne):ue(_)}function re(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),o=_,fe):xe(_)?(a=re,me(_)):Re(_)?(e.consume(_),re):(e.consume(_),ie)}function fe(_){return _===o?(e.consume(_),o=void 0,Y):_===null?n(_):xe(_)?(a=fe,me(_)):(e.consume(_),fe)}function ie(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Ge(_)?ue(_):(e.consume(_),ie)}function Y(_){return _===47||_===62||Ge(_)?ue(_):n(_)}function ge(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function me(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),Z}function Z(_){return Re(_)?Me(e,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):U(_)}function U(_){return e.enter("htmlTextData"),a(_)}}const gf={name:"labelEnd",resolveAll:LE,resolveTo:RE,tokenize:jE},TE={tokenize:OE},AE={tokenize:ME},PE={tokenize:DE};function LE(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Kt(e,0,e.length,n),e}function RE(e,t){let n=e.length,i=0,o,l,a,c;for(;n--;)if(o=e[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},p={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=rn(c,e.slice(l+1,l+i+3)),c=rn(c,[["enter",p,t]]),c=rn(c,Fl(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=rn(c,[["exit",p,t],e[a-2],e[a-1],["exit",h,t]]),c=rn(c,e.slice(a+1)),c=rn(c,[["exit",f,t]]),Kt(e,l,e.length,c),e}function jE(e,t,n){const i=this;let o=i.events.length,l,a;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return c;function c(w){return l?l._inactive?m(w):(a=i.parser.defined.includes(gn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(w),e.exit("labelMarker"),e.exit("labelEnd"),f):n(w)}function f(w){return w===40?e.attempt(TE,p,a?p:m)(w):w===91?e.attempt(AE,p,a?h:m)(w):a?p(w):m(w)}function h(w){return e.attempt(PE,p,m)(w)}function p(w){return t(w)}function m(w){return l._balanced=!0,n(w)}}function OE(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return Ge(m)?_s(e,l)(m):l(m)}function l(m){return m===41?p(m):jy(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function a(m){return Ge(m)?_s(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?My(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Ge(m)?_s(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function ME(e,t,n){const i=this;return o;function o(c){return Oy.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(gn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function DE(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),o}function o(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const FE={name:"labelStartImage",resolveAll:gf.resolveAll,tokenize:zE};function zE(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const $E={name:"labelStartLink",resolveAll:gf.resolveAll,tokenize:BE};function BE(e,t,n){const i=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const rc={name:"lineEnding",tokenize:UE};function UE(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const fl={name:"thematicBreak",tokenize:VE};function VE(e,t,n){let i=0,o;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||xe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),Re(h)?Me(e,c,"whitespace")(h):c(h))}}const zt={continuation:{tokenize:KE},exit:QE,name:"list",tokenize:HE},GE={partial:!0,tokenize:XE},WE={partial:!0,tokenize:qE};function HE(e,t,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return c;function c(v){const k=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:Dc(v)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(fl,n,h)(v):h(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return Dc(v)&&++a<10?(e.consume(v),f):(!i.interrupt||a<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(Ds,i.interrupt?n:p,e.attempt(GE,w,m))}function p(v){return i.containerState.initialBlankLine=!0,l++,w(v)}function m(v){return Re(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),w):n(v)}function w(v){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function KE(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ds,o,l);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Me(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Re(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(WE,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Me(e,e.attempt(zt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function qE(e,t,n){const i=this;return Me(e,o,"listItemIndent",i.containerState.size+1);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function QE(e){e.exit(this.containerState.type)}function XE(e,t,n){const i=this;return Me(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const a=i.events[i.events.length-1];return!Re(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Lm={name:"setextUnderline",resolveTo:YE,tokenize:JE};function YE(e,t){let n=e.length,i,o,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(e.splice(o,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function JE(e,t,n){const i=this;let o;return l;function l(h){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Re(h)?Me(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||xe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZE={tokenize:eb};function eb(e){const t=this,n=e.attempt(Ds,i,e.attempt(this.parser.constructs.flowInitial,o,Me(e,e.attempt(this.parser.constructs.flow,o,e.attempt(sE,o)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tb={resolveAll:Fy()},nb=Dy("string"),rb=Dy("text");function Dy(e){return{resolveAll:Fy(e==="text"?ib:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],l=n.attempt(o,a,c);return a;function a(p){return h(p)?l(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),l(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=o[p];let w=-1;if(m)for(;++w<m.length;){const v=m[w];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function Fy(e){return t;function t(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return e?e(n,i):n}}function ib(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],o=t.sliceStream(i);let l=o.length,a=-1,c=0,f;for(;l--;){const h=o[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const sb={42:zt,43:zt,45:zt,48:zt,49:zt,50:zt,51:zt,52:zt,53:zt,54:zt,55:zt,56:zt,57:zt,62:Ay},ob={91:cE},lb={[-2]:nc,[-1]:nc,32:nc},ab={35:gE,42:fl,45:[Lm,fl],60:kE,61:Lm,95:fl,96:Am,126:Am},ub={38:Ly,92:Py},cb={[-5]:rc,[-4]:rc,[-3]:rc,33:FE,38:Ly,42:Fc,60:[$_,IE],91:$E,92:[pE,Py],93:gf,95:Fc,96:Z_},fb={null:[Fc,tb]},db={null:[42,95]},hb={null:[]},pb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:db,contentInitial:ob,disable:hb,document:sb,flow:ab,flowInitial:lb,insideSpan:fb,string:ub,text:cb},Symbol.toStringTag,{value:"Module"}));function mb(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let a=[],c=[];const f={attempt:Q(P),check:Q(L),consume:I,enter:A,exit:$,interrupt:Q(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:b,events:[],now:k,parser:e,previous:null,sliceSerialize:w,sliceStream:v,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function m(ne){return a=rn(a,ne),E(),a[a.length-1]!==null?[]:(oe(t,0),h.events=Fl(l,h.events,h),h.events)}function w(ne,re){return yb(v(ne),re)}function v(ne){return gb(a,ne)}function k(){const{_bufferIndex:ne,_index:re,line:fe,column:ie,offset:Y}=i;return{_bufferIndex:ne,_index:re,line:fe,column:ie,offset:Y}}function b(ne){o[ne.line]=ne.column,D()}function E(){let ne;for(;i._index<a.length;){const re=a[i._index];if(typeof re=="string")for(ne=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ne&&i._bufferIndex<re.length;)S(re.charCodeAt(i._bufferIndex));else S(re)}}function S(ne){p=p(ne)}function I(ne){xe(ne)?(i.line++,i.column=1,i.offset+=ne===-3?2:1,D()):ne!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=ne}function A(ne,re){const fe=re||{};return fe.type=ne,fe.start=k(),h.events.push(["enter",fe,h]),c.push(fe),fe}function $(ne){const re=c.pop();return re.end=k(),h.events.push(["exit",re,h]),re}function P(ne,re){oe(ne,re.from)}function L(ne,re){re.restore()}function Q(ne,re){return fe;function fe(ie,Y,ge){let me,Z,U,_;return Array.isArray(ie)?G(ie):"tokenize"in ie?G([ie]):O(ie);function O(ye){return je;function je(Te){const De=Te!==null&&ye[Te],Ze=Te!==null&&ye.null,qt=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Ze)?Ze:Ze?[Ze]:[]];return G(qt)(Te)}}function G(ye){return me=ye,Z=0,ye.length===0?ge:N(ye[Z])}function N(ye){return je;function je(Te){return _=ue(),U=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?Ce():ye.tokenize.call(re?Object.assign(Object.create(h),re):h,f,pe,Ce)(Te)}}function pe(ye){return ne(U,_),Y}function Ce(ye){return _.restore(),++Z<me.length?N(me[Z]):ge}}}function oe(ne,re){ne.resolveAll&&!l.includes(ne)&&l.push(ne),ne.resolve&&Kt(h.events,re,h.events.length-re,ne.resolve(h.events.slice(re),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function ue(){const ne=k(),re=h.previous,fe=h.currentConstruct,ie=h.events.length,Y=Array.from(c);return{from:ie,restore:ge};function ge(){i=ne,h.previous=re,h.currentConstruct=fe,h.events.length=ie,c=Y,D()}}function D(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function gb(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,l=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(i,l)];else{if(a=e.slice(n,o),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[o].slice(0,l))}return a}function yb(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
165
165
|
`;break}case-3:{a=`\r
|
|
166
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(l)}o=l===-2,i.push(a)}return i.join("")}function wb(e){const i={constructs:Ty([pb,...(e||{}).extensions||[]]),content:o(R_),defined:[],document:o(O_),flow:o(ZE),lazy:{},string:o(nb),text:o(rb)};return i;function o(l){return a;function a(c){return mb(i,l,c)}}}function vb(e){for(;!jy(e););return e}const jm=/[\0\t\n\r]/g;function kb(){let e=1,t="",n=!0,i;return o;function o(l,a,c){const f=[];let h,p,m,w,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),m=0,t="",n&&(l.charCodeAt(0)===65279&&m++,n=void 0);m<l.length;){if(jm.lastIndex=m,h=jm.exec(l),w=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(w),!h){t=l.slice(m);break}if(v===10&&m===w&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<w&&(f.push(l.slice(m,w)),e+=w-m),v){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=w+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const xb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sb(e){return e.replace(xb,Cb)}function Cb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return Ay(n.slice(l?2:1),l?16:10)}return mf(n)||e}const $y={}.hasOwnProperty;function _b(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Eb(n)(vb(wb(n).document().write(kb()(e,t,!0))))}function Eb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ie),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:l(H),blockQuote:l(Ze),characterEscape:ue,characterReference:ue,codeFenced:l(qt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(qt,a),codeText:l(Ur,a),codeTextData:ue,data:ue,codeFlowValue:ue,definition:l(Bn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(U),hardBreakEscape:l(ye),hardBreakTrailing:l(ye),htmlFlow:l(Se,a),htmlFlowData:ue,htmlText:l(Se,a),htmlTextData:ue,image:l(Oe),label:a,link:l(Ie),listItem:l(st),listItemValue:w,listOrdered:l(Ke,m),listUnordered:l(Ke),paragraph:l(et),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(H),strong:l(Un),thematicBreak:l(zs)},exit:{atxHeading:f(),atxHeadingSequence:P,autolink:f(),autolinkEmail:De,autolinkProtocol:Te,blockQuote:f(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:we,characterReference:je,codeFenced:f(E),codeFencedFence:b,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:D,codeIndented:f(S),codeText:f(Y),codeTextData:D,data:D,definition:f(),definitionDestinationString:B,definitionLabelString:I,definitionTitleString:A,emphasis:f(),hardBreakEscape:f(re),hardBreakTrailing:f(re),htmlFlow:f(fe),htmlFlowData:D,htmlText:f(ne),htmlTextData:D,image:f(me),label:oe,labelText:z,lineEnding:te,link:f(ge),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:pe,resourceDestinationString:_,resourceTitleString:O,resource:G,setextHeading:f(se),setextHeadingLineSequence:Q,setextHeadingText:L,strong:f(),thematicBreak:f()}};By(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(V){let ie={type:"root",children:[]};const Ce={stack:[ie],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:p,data:n},Pe=[];let Fe=-1;for(;++Fe<V.length;)if(V[Fe][1].type==="listOrdered"||V[Fe][1].type==="listUnordered")if(V[Fe][0]==="enter")Pe.push(Fe);else{const yt=Pe.pop();Fe=o(V,yt,Fe)}for(Fe=-1;++Fe<V.length;){const yt=t[V[Fe][0]];$y.call(yt,V[Fe][1].type)&&yt[V[Fe][1].type].call(Object.assign({sliceSerialize:V[Fe][2].sliceSerialize},Ce),V[Fe][1])}if(Ce.tokenStack.length>0){const yt=Ce.tokenStack[Ce.tokenStack.length-1];(yt[1]||Om).call(Ce,void 0,yt[0])}for(ie.position={start:ur(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:ur(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)ie=t.transforms[Fe](ie)||ie;return ie}function o(V,ie,Ce){let Pe=ie-1,Fe=-1,yt=!1,bn,Qt,Vn,gr;for(;++Pe<=Ce;){const wt=V[Pe];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?Fe++:Fe--,gr=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(bn&&!gr&&!Fe&&!Vn&&(Vn=Pe),gr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gr=void 0}if(!Fe&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||Fe===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(bn){let yn=Pe;for(Qt=void 0;yn--;){const Bt=V[yn];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;Qt&&(V[Qt][1].type="lineEndingBlank",yt=!0),Bt[1].type="lineEnding",Qt=yn}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}Vn&&(!Qt||Vn<Qt)&&(bn._spread=!0),bn.end=Object.assign({},Qt?V[Qt][1].start:wt[1].end),V.splice(Qt||Pe,0,["exit",bn,wt[2]]),Pe++,Ce++}if(wt[1].type==="listItemPrefix"){const yn={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};bn=yn,V.splice(Pe,0,["enter",yn,wt[2]]),Pe++,Ce++,Vn=void 0,gr=!0}}}return V[ie][1]._spread=yt,Ce}function l(V,ie){return Ce;function Ce(Pe){c.call(this,V(Pe),Pe),ie&&ie.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(V,ie,Ce){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([ie,Ce||void 0]),V.position={start:ur(ie.start),end:void 0}}function f(V){return ie;function ie(Ce){V&&V.call(this,Ce),h.call(this,Ce)}}function h(V,ie){const Ce=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==V.type&&(ie?ie.call(this,V,Pe[0]):(Pe[1]||Om).call(this,V,Pe[0]));else throw new Error("Cannot close `"+V.type+"` ("+Cs({start:V.start,end:V.end})+"): it’s not open");Ce.position.end=ur(V.end)}function p(){return pf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function w(V){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function v(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=V}function k(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=V}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V.replace(/(\r?\n|\r)$/g,"")}function I(V){const ie=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ie,Ce.identifier=gn(this.sliceSerialize(V)).toLowerCase()}function A(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function B(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function P(V){const ie=this.stack[this.stack.length-1];if(!ie.depth){const Ce=this.sliceSerialize(V).length;ie.depth=Ce}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Q(V){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(V){const Ce=this.stack[this.stack.length-1].children;let Pe=Ce[Ce.length-1];(!Pe||Pe.type!=="text")&&(Pe=mr(),Pe.position={start:ur(V.start),end:void 0},Ce.push(Pe)),this.stack.push(Pe)}function D(V){const ie=this.stack.pop();ie.value+=this.sliceSerialize(V),ie.position.end=ur(V.end)}function te(V){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ie.children[ie.children.length-1];Ce.position.end=ur(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ie.type)&&(ue.call(this,V),D.call(this,V))}function re(){this.data.atHardBreak=!0}function fe(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function ne(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function Y(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.value=V}function ge(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function me(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=ie,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function z(V){const ie=this.sliceSerialize(V),Ce=this.stack[this.stack.length-2];Ce.label=Sb(ie),Ce.identifier=gn(ie).toLowerCase()}function oe(){const V=this.stack[this.stack.length-1],ie=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Pe=V.children;Ce.children=Pe}else Ce.alt=ie}function _(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.url=V}function O(){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.title=V}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function pe(V){const ie=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ie,Ce.identifier=gn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function Ee(V){this.data.characterReferenceType=V.type}function we(V){const ie=this.sliceSerialize(V),Ce=this.data.characterReferenceType;let Pe;Ce?(Pe=Ay(ie,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=mf(ie);const Fe=this.stack[this.stack.length-1];Fe.value+=Pe}function je(V){const ie=this.stack.pop();ie.position.end=ur(V.end)}function Te(V){D.call(this,V);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(V)}function De(V){D.call(this,V);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(V)}function Ze(){return{type:"blockquote",children:[]}}function qt(){return{type:"code",lang:null,meta:null,value:""}}function Ur(){return{type:"inlineCode",value:""}}function Bn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function U(){return{type:"emphasis",children:[]}}function H(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Ke(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function st(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function et(){return{type:"paragraph",children:[]}}function Un(){return{type:"strong",children:[]}}function mr(){return{type:"text",value:""}}function zs(){return{type:"thematicBreak"}}}function ur(e){return{line:e.line,column:e.column,offset:e.offset}}function By(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?By(e,i):bb(e,i)}}function bb(e,t){let n;for(n in t)if($y.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Om(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cs({start:t.start,end:t.end})+") is still open")}function Ib(e){const t=this;t.parser=n;function n(i){return _b(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Nb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Tb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
166
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(l)}o=l===-2,i.push(a)}return i.join("")}function wb(e){const i={constructs:Ny([pb,...(e||{}).extensions||[]]),content:o(R_),defined:[],document:o(O_),flow:o(ZE),lazy:{},string:o(nb),text:o(rb)};return i;function o(l){return a;function a(c){return mb(i,l,c)}}}function vb(e){for(;!Ry(e););return e}const Rm=/[\0\t\n\r]/g;function kb(){let e=1,t="",n=!0,i;return o;function o(l,a,c){const f=[];let h,p,m,w,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),m=0,t="",n&&(l.charCodeAt(0)===65279&&m++,n=void 0);m<l.length;){if(Rm.lastIndex=m,h=Rm.exec(l),w=h&&h.index!==void 0?h.index:l.length,v=l.charCodeAt(w),!h){t=l.slice(m);break}if(v===10&&m===w&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<w&&(f.push(l.slice(m,w)),e+=w-m),v){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=w+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const xb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Sb(e){return e.replace(xb,Cb)}function Cb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return Ty(n.slice(l?2:1),l?16:10)}return mf(n)||e}const zy={}.hasOwnProperty;function _b(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Eb(n)(vb(wb(n).document().write(kb()(e,t,!0))))}function Eb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Ie),autolinkProtocol:ue,autolinkEmail:ue,atxHeading:l(H),blockQuote:l(Ze),characterEscape:ue,characterReference:ue,codeFenced:l(qt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(qt,a),codeText:l(Ur,a),codeTextData:ue,data:ue,codeFlowValue:ue,definition:l(Bn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(B),hardBreakEscape:l(we),hardBreakTrailing:l(we),htmlFlow:l(Se,a),htmlFlowData:ue,htmlText:l(Se,a),htmlTextData:ue,image:l(Oe),label:a,link:l(Ie),listItem:l(st),listItemValue:w,listOrdered:l(Ke,m),listUnordered:l(Ke),paragraph:l(et),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(H),strong:l(Un),thematicBreak:l(zs)},exit:{atxHeading:f(),atxHeadingSequence:P,autolink:f(),autolinkEmail:De,autolinkProtocol:Te,blockQuote:f(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:ye,characterReference:je,codeFenced:f(E),codeFencedFence:b,codeFencedFenceInfo:v,codeFencedFenceMeta:k,codeFlowValue:D,codeIndented:f(S),codeText:f(Y),codeTextData:D,data:D,definition:f(),definitionDestinationString:$,definitionLabelString:I,definitionTitleString:A,emphasis:f(),hardBreakEscape:f(re),hardBreakTrailing:f(re),htmlFlow:f(fe),htmlFlowData:D,htmlText:f(ie),htmlTextData:D,image:f(me),label:U,labelText:Z,lineEnding:ne,link:f(ge),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:pe,resourceDestinationString:_,resourceTitleString:O,resource:G,setextHeading:f(oe),setextHeadingLineSequence:Q,setextHeadingText:L,strong:f(),thematicBreak:f()}};$y(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(V){let se={type:"root",children:[]};const _e={stack:[se],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:p,data:n},Pe=[];let Fe=-1;for(;++Fe<V.length;)if(V[Fe][1].type==="listOrdered"||V[Fe][1].type==="listUnordered")if(V[Fe][0]==="enter")Pe.push(Fe);else{const yt=Pe.pop();Fe=o(V,yt,Fe)}for(Fe=-1;++Fe<V.length;){const yt=t[V[Fe][0]];zy.call(yt,V[Fe][1].type)&&yt[V[Fe][1].type].call(Object.assign({sliceSerialize:V[Fe][2].sliceSerialize},_e),V[Fe][1])}if(_e.tokenStack.length>0){const yt=_e.tokenStack[_e.tokenStack.length-1];(yt[1]||jm).call(_e,void 0,yt[0])}for(se.position={start:ur(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:ur(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Fe=-1;++Fe<t.transforms.length;)se=t.transforms[Fe](se)||se;return se}function o(V,se,_e){let Pe=se-1,Fe=-1,yt=!1,bn,Qt,Vn,gr;for(;++Pe<=_e;){const wt=V[Pe];switch(wt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{wt[0]==="enter"?Fe++:Fe--,gr=void 0;break}case"lineEndingBlank":{wt[0]==="enter"&&(bn&&!gr&&!Fe&&!Vn&&(Vn=Pe),gr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gr=void 0}if(!Fe&&wt[0]==="enter"&&wt[1].type==="listItemPrefix"||Fe===-1&&wt[0]==="exit"&&(wt[1].type==="listUnordered"||wt[1].type==="listOrdered")){if(bn){let yn=Pe;for(Qt=void 0;yn--;){const Bt=V[yn];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;Qt&&(V[Qt][1].type="lineEndingBlank",yt=!0),Bt[1].type="lineEnding",Qt=yn}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}Vn&&(!Qt||Vn<Qt)&&(bn._spread=!0),bn.end=Object.assign({},Qt?V[Qt][1].start:wt[1].end),V.splice(Qt||Pe,0,["exit",bn,wt[2]]),Pe++,_e++}if(wt[1].type==="listItemPrefix"){const yn={type:"listItem",_spread:!1,start:Object.assign({},wt[1].start),end:void 0};bn=yn,V.splice(Pe,0,["enter",yn,wt[2]]),Pe++,_e++,Vn=void 0,gr=!0}}}return V[se][1]._spread=yt,_e}function l(V,se){return _e;function _e(Pe){c.call(this,V(Pe),Pe),se&&se.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(V,se,_e){this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([se,_e||void 0]),V.position={start:ur(se.start),end:void 0}}function f(V){return se;function se(_e){V&&V.call(this,_e),h.call(this,_e)}}function h(V,se){const _e=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==V.type&&(se?se.call(this,V,Pe[0]):(Pe[1]||jm).call(this,V,Pe[0]));else throw new Error("Cannot close `"+V.type+"` ("+Cs({start:V.start,end:V.end})+"): it’s not open");_e.position.end=ur(V.end)}function p(){return pf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function w(V){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(V),10),this.data.expectingFirstListItemValue=void 0}}function v(){const V=this.resume(),se=this.stack[this.stack.length-1];se.lang=V}function k(){const V=this.resume(),se=this.stack[this.stack.length-1];se.meta=V}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const V=this.resume(),se=this.stack[this.stack.length-1];se.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const V=this.resume(),se=this.stack[this.stack.length-1];se.value=V.replace(/(\r?\n|\r)$/g,"")}function I(V){const se=this.resume(),_e=this.stack[this.stack.length-1];_e.label=se,_e.identifier=gn(this.sliceSerialize(V)).toLowerCase()}function A(){const V=this.resume(),se=this.stack[this.stack.length-1];se.title=V}function $(){const V=this.resume(),se=this.stack[this.stack.length-1];se.url=V}function P(V){const se=this.stack[this.stack.length-1];if(!se.depth){const _e=this.sliceSerialize(V).length;se.depth=_e}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Q(V){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(V).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function ue(V){const _e=this.stack[this.stack.length-1].children;let Pe=_e[_e.length-1];(!Pe||Pe.type!=="text")&&(Pe=mr(),Pe.position={start:ur(V.start),end:void 0},_e.push(Pe)),this.stack.push(Pe)}function D(V){const se=this.stack.pop();se.value+=this.sliceSerialize(V),se.position.end=ur(V.end)}function ne(V){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=se.children[se.children.length-1];_e.position.end=ur(V.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(ue.call(this,V),D.call(this,V))}function re(){this.data.atHardBreak=!0}function fe(){const V=this.resume(),se=this.stack[this.stack.length-1];se.value=V}function ie(){const V=this.resume(),se=this.stack[this.stack.length-1];se.value=V}function Y(){const V=this.resume(),se=this.stack[this.stack.length-1];se.value=V}function ge(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=se,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function me(){const V=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";V.type+="Reference",V.referenceType=se,delete V.url,delete V.title}else delete V.identifier,delete V.label;this.data.referenceType=void 0}function Z(V){const se=this.sliceSerialize(V),_e=this.stack[this.stack.length-2];_e.label=Sb(se),_e.identifier=gn(se).toLowerCase()}function U(){const V=this.stack[this.stack.length-1],se=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Pe=V.children;_e.children=Pe}else _e.alt=se}function _(){const V=this.resume(),se=this.stack[this.stack.length-1];se.url=V}function O(){const V=this.resume(),se=this.stack[this.stack.length-1];se.title=V}function G(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function pe(V){const se=this.resume(),_e=this.stack[this.stack.length-1];_e.label=se,_e.identifier=gn(this.sliceSerialize(V)).toLowerCase(),this.data.referenceType="full"}function Ce(V){this.data.characterReferenceType=V.type}function ye(V){const se=this.sliceSerialize(V),_e=this.data.characterReferenceType;let Pe;_e?(Pe=Ty(se,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=mf(se);const Fe=this.stack[this.stack.length-1];Fe.value+=Pe}function je(V){const se=this.stack.pop();se.position.end=ur(V.end)}function Te(V){D.call(this,V);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(V)}function De(V){D.call(this,V);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(V)}function Ze(){return{type:"blockquote",children:[]}}function qt(){return{type:"code",lang:null,meta:null,value:""}}function Ur(){return{type:"inlineCode",value:""}}function Bn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function B(){return{type:"emphasis",children:[]}}function H(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function Ie(){return{type:"link",title:null,url:"",children:[]}}function Ke(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function st(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function et(){return{type:"paragraph",children:[]}}function Un(){return{type:"strong",children:[]}}function mr(){return{type:"text",value:""}}function zs(){return{type:"thematicBreak"}}}function ur(e){return{line:e.line,column:e.column,offset:e.offset}}function $y(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?$y(e,i):bb(e,i)}}function bb(e,t){let n;for(n in t)if(zy.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function jm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cs({start:t.start,end:t.end})+") is still open")}function Ib(e){const t=this;t.parser=n;function n(i){return _b(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Nb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Tb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
167
167
|
`}]}function Ab(e,t){const n=t.value?t.value+`
|
|
168
|
-
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Pb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Ti(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function jb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ob(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function
|
|
168
|
+
`:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function Pb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=Ti(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function jb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ob(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function By(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=i:o.push({type:"text",value:i}),o}function Mb(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return By(e,t);const o={src:Ti(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,l),e.applyData(t,l)}function Db(e,t){const n={src:Ti(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function Fb(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function zb(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return By(e,t);const o={href:Ti(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function $b(e,t){const n={href:Ti(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Bb(e,t,n){const i=e.all(t),o=n?Ub(n):Uy(t),l={},a=[];if(typeof t.checked=="boolean"){const p=i[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const p=i[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&a.push({type:"text",value:`
|
|
169
169
|
`}),p.type==="element"&&p.tagName==="p"&&!o?a.push(...p.children):a.push(p)}const f=i[i.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
170
|
-
`});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function Ub(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=
|
|
170
|
+
`});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function Ub(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Uy(n[i])}return t}function Uy(e){const t=e.spread;return t??e.children.length>1}function Vb(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const a=i[o];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function Gb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wb(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Hb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kb(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=cf(t.children[1]),f=xy(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),o.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,l),e.applyData(t,l)}function qb(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const m=t.children[f],w={},v=a?a[f]:void 0;v&&(w.align=v);let k={type:"element",tagName:l,properties:w,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),h.push(k)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function Qb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Om=9,Mm=32;function Xb(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const l=[];for(;i;)l.push(Dm(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return l.push(Dm(t.slice(o),o>0,!1)),l.join("")}function Dm(e,t,n){let i=0,o=e.length;if(t){let l=e.codePointAt(i);for(;l===Om||l===Mm;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(o-1);for(;l===Om||l===Mm;)o--,l=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function Yb(e,t){const n={type:"text",value:Xb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Jb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Zb={blockquote:Nb,break:Tb,code:Ab,delete:Pb,emphasis:Lb,footnoteReference:Rb,heading:jb,html:Ob,imageReference:Mb,image:Db,inlineCode:Fb,linkReference:zb,link:$b,listItem:Bb,list:Vb,paragraph:Gb,root:Wb,strong:Hb,table:Kb,tableCell:Qb,tableRow:qb,text:Yb,thematicBreak:Jb,toml:il,yaml:il,definition:il,footnoteDefinition:il};function il(){}const Vy=-1,zl=0,Es=1,Il=2,yf=3,wf=4,vf=5,kf=6,Gy=7,Wy=8,{defineProperty:eI}=Object,Hy=typeof self=="object"?self:globalThis,Fm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Hy[e](t)},tI=(e,t)=>{const n=(o,l)=>(e.set(l,o),o),i=o=>{if(e.has(o))return e.get(o);const[l,a]=t[o];switch(l){case zl:case Vy:return n(a,o);case Es:{const c=n([],o);for(const f of a)c.push(i(f));return c}case Il:{const c=n({},o);for(const[f,h]of a){const p=i(f),m=i(h);p==="__proto__"?eI(c,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[p]=m}return c}case yf:return n(new Date(a),o);case wf:{const{source:c,flags:f}=a;return n(new RegExp(c,f),o)}case vf:{const c=n(new Map,o);for(const[f,h]of a)c.set(i(f),i(h));return c}case kf:{const c=n(new Set,o);for(const f of a)c.add(i(f));return c}case Gy:{const{name:c,message:f}=a;return n(typeof Hy[c]=="function"?Fm(c,f):new Error(f),o)}case Wy:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}case"-0":return-0}return n(Fm(l,a),o)};return i},zm=e=>tI(new Map,e)(0),Rr="",{toString:nI}={},{keys:rI,is:iI}=Object,ws=e=>{const t=typeof e;if(t!=="object"||!e)return[zl,t];const n=nI.call(e).slice(8,-1);switch(n){case"Array":return[Es,Rr];case"Object":return[Il,Rr];case"Date":return[yf,Rr];case"RegExp":return[wf,Rr];case"Map":return[vf,Rr];case"Set":return[kf,Rr];case"DataView":return[Es,n]}return n.includes("Array")?[Es,n]:e instanceof Error?[Gy,e.name||"Error"]:[Il,n]},sl=([e,t])=>e===zl&&(t==="function"||t==="symbol"),sI=(e,t,n,i)=>{const o=(a,c)=>{const f=i.push(a)-1;return n.set(c,f),f},l=a=>{if(n.has(a))return n.get(a);let[c,f]=ws(a);switch(c){case zl:{let p=a;switch(f){case"bigint":c=Wy,p=a.toString();break;case"number":if(!a&&iI(a,-0))return i.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return o([Vy],a)}return o([c,p],a)}case Es:{if(f){let w=a;return f==="DataView"?w=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(w=new Uint8Array(a)),o([f,[...w]],a)}const p=[],m=o([c,p],a);for(const w of a)p.push(l(w));return m}case Il:{if(f)switch(f){case"BigInt":return o([f,a.toString()],a);case"Boolean":case"Number":case"String":return o([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const p=[],m=o([c,p],a);for(const w of rI(a))(e||!sl(ws(a[w])))&&p.push([l(w),l(a[w])]);return m}case yf:return o([c,isNaN(a.getTime())?Rr:a.toISOString()],a);case wf:{const{source:p,flags:m}=a;return o([c,{source:p,flags:m}],a)}case vf:{const p=[],m=o([c,p],a);for(const[w,v]of a)(e||!(sl(ws(w))||sl(ws(v))))&&p.push([l(w),l(v)]);return m}case kf:{const p=[],m=o([c,p],a);for(const w of a)(e||!sl(ws(w)))&&p.push(l(w));return m}}const{message:h}=a;return o([c,{name:f,message:h}],a)};return l},$m=(e,{json:t,lossy:n}={})=>{const i=[];return sI(!(t||n),!!t,new Map,i)(e),i},Nl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?zm($m(e,t)):structuredClone(e):(e,t)=>zm($m(e,t));function oI(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function lI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function aI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||oI,i=e.options.footnoteBackLabel||lI,o=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),w=Ti(m.toLowerCase());let v=0;const k=[],b=e.footnoteCounts.get(m);for(;b!==void 0&&++v<=b;){k.length>0&&k.push({type:"text",value:" "});let I=typeof n=="string"?n:n(f,v);typeof I=="string"&&(I={type:"text",value:I}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+w+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const E=p[p.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const I=E.children[E.children.length-1];I&&I.type==="text"?I.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...k)}else p.push(...k);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+w},children:e.wrap(p,!0)};e.patch(h,S),c.push(S)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Nl(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
171
171
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
172
|
-
`}]}}const $l=(function(e){if(e==null)return dI;if(typeof e=="function")return Bl(e);if(typeof e=="object")return Array.isArray(e)?uI(e):cI(e);if(typeof e=="string")return fI(e);throw new Error("Expected function, string, or object as test")});function uI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$l(e[n]);return Bl(i);function i(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function cI(e){const t=e;return Bl(n);function n(i){const o=i;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function fI(e){return Bl(t);function t(n){return n&&n.type===e}}function Bl(e){return t;function t(n,i,o){return!!(hI(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function dI(){return!0}function hI(e){return e!==null&&typeof e=="object"&&"type"in e}const
|
|
172
|
+
`}]}}const $l=(function(e){if(e==null)return dI;if(typeof e=="function")return Bl(e);if(typeof e=="object")return Array.isArray(e)?uI(e):cI(e);if(typeof e=="string")return fI(e);throw new Error("Expected function, string, or object as test")});function uI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$l(e[n]);return Bl(i);function i(...o){let l=-1;for(;++l<t.length;)if(t[l].apply(this,o))return!0;return!1}}function cI(e){const t=e;return Bl(n);function n(i){const o=i;let l;for(l in e)if(o[l]!==t[l])return!1;return!0}}function fI(e){return Bl(t);function t(n){return n&&n.type===e}}function Bl(e){return t;function t(n,i,o){return!!(hI(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function dI(){return!0}function hI(e){return e!==null&&typeof e=="object"&&"type"in e}const Ky=[],pI=!0,zc=!1,mI="skip";function qy(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const l=$l(o),a=i?-1:1;c(e,void 0,[])();function c(f,h,p){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return w;function w(){let v=Ky,k,b,E;if((!t||l(f,h,p[p.length-1]||void 0))&&(v=gI(n(f,p)),v[0]===zc))return v;if("children"in f&&f.children){const S=f;if(S.children&&v[0]!==mI)for(b=(i?S.children.length:-1)+a,E=p.concat(S);b>-1&&b<S.children.length;){const I=S.children[b];if(k=c(I,b,E)(),k[0]===zc)return k;b=typeof k[1]=="number"?k[1]:b+a}}return v}}}function gI(e){return Array.isArray(e)?e:typeof e=="number"?[pI,e]:e==null?Ky:[e]}function xf(e,t,n,i){let o,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,o=n):(l=t,a=n,o=i),qy(e,l,c,o);function c(f,h){const p=h[h.length-1],m=p?p.children.indexOf(f):void 0;return a(f,m,p)}}const $c={}.hasOwnProperty,yI={};function wI(e,t){const n=t||yI,i=new Map,o=new Map,l=new Map,a={...Zb,...n.handlers},c={all:h,applyData:kI,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:n,patch:vI,wrap:SI};return xf(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?i:o,w=String(p.identifier).toUpperCase();m.has(w)||m.set(w,p)}}),c;function f(p,m){const w=p.type,v=c.handlers[w];if($c.call(c.handlers,w)&&v)return v(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(w)){if("children"in p){const{children:b,...E}=p,S=Nl(E);return S.children=c.all(p),S}return Nl(p)}return(c.options.unknownHandler||xI)(c,p,m)}function h(p){const m=[];if("children"in p){const w=p.children;let v=-1;for(;++v<w.length;){const k=c.one(w[v],p);if(k){if(v&&w[v-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Bm(k.value)),!Array.isArray(k)&&k.type==="element")){const b=k.children[0];b&&b.type==="text"&&(b.value=Bm(b.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function vI(e,t){e.position&&(t.position=s_(e))}function kI(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Nl(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function xI(e,t){const n=t.data||{},i="value"in t&&!($c.call(n,"hProperties")||$c.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function SI(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
173
173
|
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
174
174
|
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
175
|
-
`}),n}function
|
|
176
|
-
`},o),l}function CI(e,t){return e&&"run"in e?async function(n,i){const o=Vm(n,{file:i,...t});await e.run(o,i)}:function(n,i){return Vm(n,{file:i,...e||t})}}function Gm(e){if(e)throw e}var ic,Wm;function _I(){if(Wm)return ic;Wm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},a=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return ic=function f(){var h,p,m,w,v,k,b=arguments[0],E=1,S=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},E=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});E<S;++E)if(h=arguments[E],h!=null)for(p in h)m=c(b,p),w=c(h,p),b!==w&&(I&&w&&(l(w)||(v=o(w)))?(v?(v=!1,k=m&&o(m)?m:[]):k=m&&l(m)?m:{},a(b,{name:p,newValue:f(I,k,w)})):typeof w<"u"&&a(b,{name:p,newValue:w}));return b},ic}var EI=_I();const sc=Gc(EI);function Bc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bI(){const e=[],t={run:n,use:i};return t;function n(...o){let l=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const p=e[++l];let m=-1;if(f){a(f);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?II(p,c)(...h):a(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function II(e,t){let n;return i;function i(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,o):f instanceof Error?o(f):l(f))}function o(a,...c){n||(n=!0,t(a,...c))}function l(a){o(null,a)}}const _n={basename:NI,dirname:TI,extname:AI,join:PI,sep:"/"};function NI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fs(e);let n=0,i=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else a<0&&(l=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function TI(e){if(Fs(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function AI(e){Fs(e);let t=e.length,n=-1,i=0,o=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function PI(...e){let t=-1,n;for(;++t<e.length;)Fs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LI(n)}function LI(e){Fs(e);const t=e.codePointAt(0)===47;let n=RI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function RI(e,t){let n="",i=0,o=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||l===1))if(o!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),o=a,l=0;continue}}else if(n.length>0){n="",i=0,o=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Fs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jI={cwd:OI};function OI(){return"/"}function Uc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MI(e){if(typeof e=="string")e=new URL(e);else if(!Uc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return DI(e)}function DI(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const oc=["history","path","basename","stem","extname","dirname"];class Xy{constructor(t){let n;t?Uc(t)?n={path:t}:typeof t=="string"||FI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<oc.length;){const l=oc[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)oc.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?_n.basename(this.path):void 0}set basename(t){ac(t,"basename"),lc(t,"basename"),this.path=_n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_n.dirname(this.path):void 0}set dirname(t){Hm(this.basename,"dirname"),this.path=_n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_n.extname(this.path):void 0}set extname(t){if(lc(t,"extname"),Hm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uc(t)&&(t=MI(t)),ac(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_n.basename(this.path,this.extname):void 0}set stem(t){ac(t,"stem"),lc(t,"stem"),this.path=_n.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new Tt(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function lc(e,t){if(e&&e.includes(_n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_n.sep+"`")}function ac(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function FI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zI=(function(e){const i=this.constructor.prototype,o=i[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),$I={}.hasOwnProperty;class Sf extends zI{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=bI()}copy(){const t=new Sf;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(sc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fc("data",this.frozen),this.namespace[t]=n,this):$I.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ol(t),i=this.parser||this.Parser;return uc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),uc("process",this.parser||this.Parser),cc("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,a){const c=ol(t),f=i.parse(c);i.run(f,c,function(p,m,w){if(p||!m||!w)return h(p);const v=m,k=i.stringify(v,w);VI(k)?w.value=k:w.result=k,h(p,w)});function h(p,m){p||!m?a(p):l?l(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),uc("processSync",this.parser||this.Parser),cc("processSync",this.compiler||this.Compiler),this.process(t,o),qm("processSync","process",n),i;function o(l,a){n=!0,Gm(l),i=a}}run(t,n,i){Km(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const f=ol(n);o.run(t,f,h);function h(p,m,w){const v=m||t;p?c(p):a?a(v):i(void 0,v,w)}}}runSync(t,n){let i=!1,o;return this.run(t,n,l),qm("runSync","run",i),o;function l(a,c){Gm(a),o=c,i=!0}}stringify(t,n){this.freeze();const i=ol(n),o=this.compiler||this.Compiler;return cc("stringify",o),Km(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(fc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(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");c(h.plugins),h.settings&&(o.settings=sc(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];l(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,w=-1;for(;++m<i.length;)if(i[m][0]===h){w=m;break}if(w===-1)i.push([h,...p]);else if(p.length>0){let[v,...k]=p;const b=i[w][1];Bc(b)&&Bc(v)&&(v=sc(!0,b,v)),i[w]=[h,v,...k]}}}}const BI=new Sf().freeze();function uc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Km(e){if(!Bc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return UI(e)?e:new Xy(e)}function UI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VI(e){return typeof e=="string"||GI(e)}function GI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qm=[],Xm={allowDangerousHtml:!0},HI=/^(https?|ircs?|mailto|xmpp)$/i,KI=[{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:"className",id:"remove-classname"},{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 qI(e){const t=QI(e),n=XI(e);return YI(t.runSync(t.parse(n),n),e)}function QI(e){const t=e.rehypePlugins||Qm,n=e.remarkPlugins||Qm,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Xm}:Xm;return BI().use(Ib).use(n).use(CI,i).use(t)}function XI(e){const t=e.children||"",n=new Xy;return typeof t=="string"&&(n.value=t),n}function YI(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||JI;for(const p of KI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+WI+p.id,void 0);return xf(e,h),c_(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function h(p,m,w){if(p.type==="raw"&&w&&typeof m=="number")return a?w.children.splice(m,1):w.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in tc)if(Object.hasOwn(tc,v)&&Object.hasOwn(p.properties,v)){const k=p.properties[v],b=tc[v];(b===null||b.includes(p.tagName))&&(p.properties[v]=f(String(k||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,w)),v&&w&&typeof m=="number")return c&&p.children?w.children.splice(m,1,...p.children):w.children.splice(m,1),m}}}function JI(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||HI.test(e.slice(0,t))?e:""}function ZI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eN(e,t,n){const o=$l((n||{}).ignore||[]),l=tN(t);let a=-1;for(;++a<l.length;)Qy(e,"text",c);function c(h,p){let m=-1,w;for(;++m<p.length;){const v=p[m],k=w?w.children:void 0;if(o(v,k?k.indexOf(v):void 0,w))return;w=v}if(w)return f(h,p)}function f(h,p){const m=p[p.length-1],w=l[a][0],v=l[a][1];let k=0;const E=m.children.indexOf(h);let S=!1,I=[];w.lastIndex=0;let A=w.exec(h.value);for(;A;){const B=A.index,P={index:A.index,input:A.input,stack:[...p,h]};let L=v(...A,P);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?w.lastIndex=B+1:(k!==B&&I.push({type:"text",value:h.value.slice(k,B)}),Array.isArray(L)?I.push(...L):L&&I.push(L),k=B+A[0].length,S=!0),!w.global)break;A=w.exec(h.value)}return S?(k<h.value.length&&I.push({type:"text",value:h.value.slice(k)}),m.children.splice(E,1,...I)):I=[h],E+I.length}}function tN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const o=n[i];t.push([nN(o[0]),rN(o[1])])}return t}function nN(e){return typeof e=="string"?new RegExp(ZI(e),"g"):e}function rN(e){return typeof e=="function"?e:function(){return e}}const dc="phrasing",hc=["autolink","link","image","label"];function iN(){return{transforms:[fN],enter:{literalAutolink:oN,literalAutolinkEmail:pc,literalAutolinkHttp:pc,literalAutolinkWww:pc},exit:{literalAutolink:cN,literalAutolinkEmail:uN,literalAutolinkHttp:lN,literalAutolinkWww:aN}}}function sN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:hc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:hc},{character:":",before:"[ps]",after:"\\/",inConstruct:dc,notInConstruct:hc}]}}function oN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function pc(e){this.config.enter.autolinkProtocol.call(this,e)}function lN(e){this.config.exit.autolinkProtocol.call(this,e)}function aN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uN(e){this.config.exit.autolinkEmail.call(this,e)}function cN(e){this.exit(e)}function fN(e){eN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hN]],{ignore:["link","linkReference"]})}function dN(e,t,n,i,o){let l="";if(!Yy(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!pN(n)))return!1;const a=mN(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function hN(e,t,n,i){return!Yy(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const o=vl(e,"(");let l=vl(e,")");for(;i!==-1&&o>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function Yy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$r(n)||Dl(n))&&(!t||n!==47)}Jy.peek=_N;function gN(){this.buffer()}function yN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wN(){this.buffer()}function vN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xN(e){this.exit(e)}function SN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CN(e){this.exit(e)}function _N(){return"["}function Jy(e,t,n,i){const o=n.createTracker(i);let l=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=o.move("]"),l}function EN(){return{enter:{gfmFootnoteCallString:gN,gfmFootnoteCall:yN,gfmFootnoteDefinitionLabelString:wN,gfmFootnoteDefinition:vN},exit:{gfmFootnoteCallString:kN,gfmFootnoteCall:xN,gfmFootnoteDefinitionLabelString:SN,gfmFootnoteDefinition:CN}}}function bN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,a){const c=l.createTracker(a);let f=c.move("[^");const h=l.enter("footnoteDefinition"),p=l.enter("label");return f+=c.move(l.safe(l.associationId(i),{before:f,after:"]"})),p(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
177
|
-
`:" ")+l.indentLines(l.containerFlow(i,c.current()),t?
|
|
178
|
-
`)}function MN(e){return e==null?"":String(e)}function
|
|
175
|
+
`}),n}function Bm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Um(e,t){const n=wI(e,t),i=n.one(e,void 0),o=aI(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
|
|
176
|
+
`},o),l}function CI(e,t){return e&&"run"in e?async function(n,i){const o=Um(n,{file:i,...t});await e.run(o,i)}:function(n,i){return Um(n,{file:i,...e||t})}}function Vm(e){if(e)throw e}var ic,Gm;function _I(){if(Gm)return ic;Gm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var w;for(w in h);return typeof w>"u"||e.call(h,w)},a=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return ic=function f(){var h,p,m,w,v,k,b=arguments[0],E=1,S=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},E=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});E<S;++E)if(h=arguments[E],h!=null)for(p in h)m=c(b,p),w=c(h,p),b!==w&&(I&&w&&(l(w)||(v=o(w)))?(v?(v=!1,k=m&&o(m)?m:[]):k=m&&l(m)?m:{},a(b,{name:p,newValue:f(I,k,w)})):typeof w<"u"&&a(b,{name:p,newValue:w}));return b},ic}var EI=_I();const sc=Gc(EI);function Bc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bI(){const e=[],t={run:n,use:i};return t;function n(...o){let l=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...o);function c(f,...h){const p=e[++l];let m=-1;if(f){a(f);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?II(p,c)(...h):a(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function II(e,t){let n;return i;function i(...a){const c=e.length>a.length;let f;c&&a.push(o);try{f=e.apply(this,a)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,o):f instanceof Error?o(f):l(f))}function o(a,...c){n||(n=!0,t(a,...c))}function l(a){o(null,a)}}const _n={basename:NI,dirname:TI,extname:AI,join:PI,sep:"/"};function NI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fs(e);let n=0,i=-1,o=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(l){n=o+1;break}}else a<0&&(l=!0,a=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function TI(e){if(Fs(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function AI(e){Fs(e);let t=e.length,n=-1,i=0,o=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?o<0?o=t:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function PI(...e){let t=-1,n;for(;++t<e.length;)Fs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LI(n)}function LI(e){Fs(e);const t=e.codePointAt(0)===47;let n=RI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function RI(e,t){let n="",i=0,o=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(o===a-1||l===1))if(o!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),o=a,l=0;continue}}else if(n.length>0){n="",i=0,o=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),i=a-o-1;o=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Fs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jI={cwd:OI};function OI(){return"/"}function Uc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function MI(e){if(typeof e=="string")e=new URL(e);else if(!Uc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return DI(e)}function DI(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const oc=["history","path","basename","stem","extname","dirname"];class Qy{constructor(t){let n;t?Uc(t)?n={path:t}:typeof t=="string"||FI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<oc.length;){const l=oc[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)oc.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?_n.basename(this.path):void 0}set basename(t){ac(t,"basename"),lc(t,"basename"),this.path=_n.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?_n.dirname(this.path):void 0}set dirname(t){Wm(this.basename,"dirname"),this.path=_n.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?_n.extname(this.path):void 0}set extname(t){if(lc(t,"extname"),Wm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_n.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uc(t)&&(t=MI(t)),ac(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?_n.basename(this.path,this.extname):void 0}set stem(t){ac(t,"stem"),lc(t,"stem"),this.path=_n.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new Tt(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function lc(e,t){if(e&&e.includes(_n.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_n.sep+"`")}function ac(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Wm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function FI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zI=(function(e){const i=this.constructor.prototype,o=i[e],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),$I={}.hasOwnProperty;class Sf extends zI{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=bI()}copy(){const t=new Sf;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(sc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fc("data",this.frozen),this.namespace[t]=n,this):$I.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ol(t),i=this.parser||this.Parser;return uc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),uc("process",this.parser||this.Parser),cc("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,a){const c=ol(t),f=i.parse(c);i.run(f,c,function(p,m,w){if(p||!m||!w)return h(p);const v=m,k=i.stringify(v,w);VI(k)?w.value=k:w.result=k,h(p,w)});function h(p,m){p||!m?a(p):l?l(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),uc("processSync",this.parser||this.Parser),cc("processSync",this.compiler||this.Compiler),this.process(t,o),Km("processSync","process",n),i;function o(l,a){n=!0,Vm(l),i=a}}run(t,n,i){Hm(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const f=ol(n);o.run(t,f,h);function h(p,m,w){const v=m||t;p?c(p):a?a(v):i(void 0,v,w)}}}runSync(t,n){let i=!1,o;return this.run(t,n,l),Km("runSync","run",i),o;function l(a,c){Vm(a),o=c,i=!0}}stringify(t,n){this.freeze();const i=ol(n),o=this.compiler||this.Compiler;return cc("stringify",o),Hm(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(fc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(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");c(h.plugins),h.settings&&(o.settings=sc(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];l(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,w=-1;for(;++m<i.length;)if(i[m][0]===h){w=m;break}if(w===-1)i.push([h,...p]);else if(p.length>0){let[v,...k]=p;const b=i[w][1];Bc(b)&&Bc(v)&&(v=sc(!0,b,v)),i[w]=[h,v,...k]}}}}const BI=new Sf().freeze();function uc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hm(e){if(!Bc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Km(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ol(e){return UI(e)?e:new Qy(e)}function UI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VI(e){return typeof e=="string"||GI(e)}function GI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qm=[],Qm={allowDangerousHtml:!0},HI=/^(https?|ircs?|mailto|xmpp)$/i,KI=[{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:"className",id:"remove-classname"},{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 qI(e){const t=QI(e),n=XI(e);return YI(t.runSync(t.parse(n),n),e)}function QI(e){const t=e.rehypePlugins||qm,n=e.remarkPlugins||qm,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qm}:Qm;return BI().use(Ib).use(n).use(CI,i).use(t)}function XI(e){const t=e.children||"",n=new Qy;return typeof t=="string"&&(n.value=t),n}function YI(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||JI;for(const p of KI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+WI+p.id,void 0);return xf(e,h),c_(e,{Fragment:C.Fragment,components:o,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function h(p,m,w){if(p.type==="raw"&&w&&typeof m=="number")return a?w.children.splice(m,1):w.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in tc)if(Object.hasOwn(tc,v)&&Object.hasOwn(p.properties,v)){const k=p.properties[v],b=tc[v];(b===null||b.includes(p.tagName))&&(p.properties[v]=f(String(k||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,w)),v&&w&&typeof m=="number")return c&&p.children?w.children.splice(m,1,...p.children):w.children.splice(m,1),m}}}function JI(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||HI.test(e.slice(0,t))?e:""}function ZI(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eN(e,t,n){const o=$l((n||{}).ignore||[]),l=tN(t);let a=-1;for(;++a<l.length;)qy(e,"text",c);function c(h,p){let m=-1,w;for(;++m<p.length;){const v=p[m],k=w?w.children:void 0;if(o(v,k?k.indexOf(v):void 0,w))return;w=v}if(w)return f(h,p)}function f(h,p){const m=p[p.length-1],w=l[a][0],v=l[a][1];let k=0;const E=m.children.indexOf(h);let S=!1,I=[];w.lastIndex=0;let A=w.exec(h.value);for(;A;){const $=A.index,P={index:A.index,input:A.input,stack:[...p,h]};let L=v(...A,P);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?w.lastIndex=$+1:(k!==$&&I.push({type:"text",value:h.value.slice(k,$)}),Array.isArray(L)?I.push(...L):L&&I.push(L),k=$+A[0].length,S=!0),!w.global)break;A=w.exec(h.value)}return S?(k<h.value.length&&I.push({type:"text",value:h.value.slice(k)}),m.children.splice(E,1,...I)):I=[h],E+I.length}}function tN(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const o=n[i];t.push([nN(o[0]),rN(o[1])])}return t}function nN(e){return typeof e=="string"?new RegExp(ZI(e),"g"):e}function rN(e){return typeof e=="function"?e:function(){return e}}const dc="phrasing",hc=["autolink","link","image","label"];function iN(){return{transforms:[fN],enter:{literalAutolink:oN,literalAutolinkEmail:pc,literalAutolinkHttp:pc,literalAutolinkWww:pc},exit:{literalAutolink:cN,literalAutolinkEmail:uN,literalAutolinkHttp:lN,literalAutolinkWww:aN}}}function sN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:hc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:dc,notInConstruct:hc},{character:":",before:"[ps]",after:"\\/",inConstruct:dc,notInConstruct:hc}]}}function oN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function pc(e){this.config.enter.autolinkProtocol.call(this,e)}function lN(e){this.config.exit.autolinkProtocol.call(this,e)}function aN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uN(e){this.config.exit.autolinkEmail.call(this,e)}function cN(e){this.exit(e)}function fN(e){eN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,dN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hN]],{ignore:["link","linkReference"]})}function dN(e,t,n,i,o){let l="";if(!Xy(o)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!pN(n)))return!1;const a=mN(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function hN(e,t,n,i){return!Xy(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pN(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mN(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const o=vl(e,"(");let l=vl(e,")");for(;i!==-1&&o>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function Xy(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||$r(n)||Dl(n))&&(!t||n!==47)}Yy.peek=_N;function gN(){this.buffer()}function yN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function wN(){this.buffer()}function vN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function kN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xN(e){this.exit(e)}function SN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CN(e){this.exit(e)}function _N(){return"["}function Yy(e,t,n,i){const o=n.createTracker(i);let l=o.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=o.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=o.move("]"),l}function EN(){return{enter:{gfmFootnoteCallString:gN,gfmFootnoteCall:yN,gfmFootnoteDefinitionLabelString:wN,gfmFootnoteDefinition:vN},exit:{gfmFootnoteCallString:kN,gfmFootnoteCall:xN,gfmFootnoteDefinitionLabelString:SN,gfmFootnoteDefinition:CN}}}function bN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Yy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,a){const c=l.createTracker(a);let f=c.move("[^");const h=l.enter("footnoteDefinition"),p=l.enter("label");return f+=c.move(l.safe(l.associationId(i),{before:f,after:"]"})),p(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
177
|
+
`:" ")+l.indentLines(l.containerFlow(i,c.current()),t?Jy:IN))),h(),f}}function IN(e,t,n){return t===0?e:Jy(e,t,n)}function Jy(e,t,n){return(n?"":" ")+e}const NN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zy.peek=RN;function TN(){return{canContainEols:["delete"],enter:{strikethrough:PN},exit:{strikethrough:LN}}}function AN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:NN}],handlers:{delete:Zy}}}function PN(e){this.enter({type:"delete",children:[]},e)}function LN(e){this.exit(e)}function Zy(e,t,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),l(),a}function RN(){return"~"}function jN(e){return e.length}function ON(e,t){const n=t||{},i=(n.align||[]).concat(),o=n.stringLength||jN,l=[],a=[],c=[],f=[];let h=0,p=-1;for(;++p<e.length;){const b=[],E=[];let S=-1;for(e[p].length>h&&(h=e[p].length);++S<e[p].length;){const I=MN(e[p][S]);if(n.alignDelimiters!==!1){const A=o(I);E[S]=A,(f[S]===void 0||A>f[S])&&(f[S]=A)}b.push(I)}a[p]=b,c[p]=E}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<h;)l[m]=Xm(i[m]);else{const b=Xm(i);for(;++m<h;)l[m]=b}m=-1;const w=[],v=[];for(;++m<h;){const b=l[m];let E="",S="";b===99?(E=":",S=":"):b===108?E=":":b===114&&(S=":");let I=n.alignDelimiters===!1?1:Math.max(1,f[m]-E.length-S.length);const A=E+"-".repeat(I)+S;n.alignDelimiters!==!1&&(I=E.length+I+S.length,I>f[m]&&(f[m]=I),v[m]=I),w[m]=A}a.splice(1,0,w),c.splice(1,0,v),p=-1;const k=[];for(;++p<a.length;){const b=a[p],E=c[p];m=-1;const S=[];for(;++m<h;){const I=b[m]||"";let A="",$="";if(n.alignDelimiters!==!1){const P=f[m]-(E[m]||0),L=l[m];L===114?A=" ".repeat(P):L===99?P%2?(A=" ".repeat(P/2+.5),$=" ".repeat(P/2-.5)):(A=" ".repeat(P/2),$=A):$=" ".repeat(P)}n.delimiterStart!==!1&&!m&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||m)&&S.push(" "),n.alignDelimiters!==!1&&S.push(A),S.push(I),n.alignDelimiters!==!1&&S.push($),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&S.push("|")}k.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
|
|
178
|
+
`)}function MN(e){return e==null?"":String(e)}function Xm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function DN(e,t,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),FN);return o(),a}function FN(e,t,n){return">"+(n?"":" ")+e}function zN(e,t){return Ym(e,t.inConstruct,!0)&&!Ym(e,t.notInConstruct,!1)}function Ym(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Jm(e,t,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
179
179
|
`&&zN(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
180
180
|
`}function $N(e,t){const n=String(e);let i=n.indexOf(t),o=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>a&&(a=l):l=1,o=i+t.length,i=n.indexOf(t,o);return a}function BN(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function UN(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function VN(e,t,n,i){const o=UN(n),l=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(BN(e,n)){const m=n.enter("codeIndented"),w=n.indentLines(l,GN);return m(),w}const c=n.createTracker(i),f=o.repeat(Math.max($N(l,o)+1,3)),h=n.enter("codeFenced");let p=c.move(f);if(e.lang){const m=n.enter(`codeFencedLang${a}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${a}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
|
|
181
181
|
`,encode:["`"],...c.current()})),m()}return p+=c.move(`
|
|
182
182
|
`),l&&(p+=c.move(l+`
|
|
183
183
|
`)),p+=c.move(f),h(),p}function GN(e,t,n){return(n?"":" ")+e}function Cf(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function WN(e,t,n,i){const o=Cf(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
184
|
-
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,{before:h,after:o,...f.current()})),h+=f.move(o),c()),a(),h}function HN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ls(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tl(e,t,n){const i=_i(e),o=_i(t);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}
|
|
184
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,{before:h,after:o,...f.current()})),h+=f.move(o),c()),a(),h}function HN(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ls(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tl(e,t,n){const i=_i(e),o=_i(t);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ew.peek=KN;function ew(e,t,n,i){const o=HN(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(o);let f=a.move(n.containerPhrasing(e,{after:o,before:c,...a.current()}));const h=f.charCodeAt(0),p=Tl(i.before.charCodeAt(i.before.length-1),h,o);p.inside&&(f=Ls(h)+f.slice(1));const m=f.charCodeAt(f.length-1),w=Tl(i.after.charCodeAt(0),m,o);w.inside&&(f=f.slice(0,-1)+Ls(m));const v=a.move(o);return l(),n.attentionEncodeSurroundingInfo={after:w.outside,before:p.outside},c+f+v}function KN(e,t,n){return n.options.emphasis||"*"}function qN(e,t){let n=!1;return xf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,zc}),!!((!e.depth||e.depth<3)&&pf(e)&&(t.options.setext||n))}function QN(e,t,n,i){const o=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(qN(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),w=n.containerPhrasing(e,{...l.current(),before:`
|
|
185
185
|
`,after:`
|
|
186
186
|
`});return m(),p(),w+`
|
|
187
187
|
`+(o===1?"=":"-").repeat(w.length-(Math.max(w.lastIndexOf("\r"),w.lastIndexOf(`
|
|
188
188
|
`))+1))}const a="#".repeat(o),c=n.enter("headingAtx"),f=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
189
|
-
`,...l.current()});return/^[\t ]/.test(h)&&(h=Ls(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}
|
|
189
|
+
`,...l.current()});return/^[\t ]/.test(h)&&(h=Ls(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}tw.peek=XN;function tw(e){return e.value||""}function XN(){return"<"}nw.peek=YN;function nw(e,t,n,i){const o=Cf(n),l=o==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+o),h+=f.move(n.safe(e.title,{before:h,after:o,...f.current()})),h+=f.move(o),c()),h+=f.move(")"),a(),h}function YN(){return"!"}rw.peek=JN;function rw(e,t,n,i){const o=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=p,l(),o==="full"||!h||h!==m?f+=c.move(m+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function JN(){return"!"}iw.peek=ZN;function iw(e,t,n){let i=e.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let f;if(a.atBreak)for(;f=c.exec(i);){let h=f.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(f.index+1)}}return o+i+o}function ZN(){return"`"}function sw(e,t){const n=pf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ow.peek=eT;function ow(e,t,n,i){const o=Cf(n),l=o==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,f;if(sw(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=a.move("<");return m+=a.move(n.containerPhrasing(e,{before:m,after:">",...a.current()})),m+=a.move(">"),c(),n.stack=p,m}c=n.enter("link"),f=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(f=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=a.move(" "+o),h+=a.move(n.safe(e.title,{before:h,after:o,...a.current()})),h+=a.move(o),f()),h+=a.move(")"),c(),h}function eT(e,t,n){return sw(e,n)?"<":"["}lw.peek=tT;function lw(e,t,n,i){const o=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const p=n.stack;n.stack=[],a=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=p,l(),o==="full"||!h||h!==m?f+=c.move(m+"]"):o==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function tT(){return"["}function _f(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nT(e){const t=_f(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function aw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iT(e,t,n,i){const o=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?rT(n):_f(n);const c=e.ordered?a==="."?")":".":nT(n);let f=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),aw(n)===a&&p){let m=-1;for(;++m<e.children.length;){const w=e.children[m];if(w&&w.type==="listItem"&&w.children&&w.children[0]&&w.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,o(),h}function sT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function oT(e,t,n,i){const o=sT(n);let l=n.bulletCurrent||_f(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return f(),h;function p(m,w,v){return w?(v?"":" ".repeat(a))+m:(v?l:l+" ".repeat(a-l.length))+m}}function lT(e,t,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),o(),a}const aT=$l(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uT(e,t,n,i){return(e.children.some(function(a){return aT(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function cT(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}uw.peek=fT;function uw(e,t,n,i){const o=cT(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(o+o);let f=a.move(n.containerPhrasing(e,{after:o,before:c,...a.current()}));const h=f.charCodeAt(0),p=Tl(i.before.charCodeAt(i.before.length-1),h,o);p.inside&&(f=Ls(h)+f.slice(1));const m=f.charCodeAt(f.length-1),w=Tl(i.after.charCodeAt(0),m,o);w.inside&&(f=f.slice(0,-1)+Ls(m));const v=a.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:w.outside,before:p.outside},c+f+v}function fT(e,t,n){return n.options.strong||"*"}function dT(e,t,n,i){return n.safe(e.value,i)}function hT(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function pT(e,t,n){const i=(aw(n)+(n.options.ruleSpaces?" ":"")).repeat(hT(n));return n.options.ruleSpaces?i.slice(0,-1):i}const cw={blockquote:DN,break:Jm,code:VN,definition:WN,emphasis:ew,hardBreak:Jm,heading:QN,html:tw,image:nw,imageReference:rw,inlineCode:iw,link:ow,linkReference:lw,list:iT,listItem:oT,paragraph:lT,root:uT,strong:uw,text:dT,thematicBreak:pT};function mT(){return{enter:{table:gT,tableData:Zm,tableHeader:Zm,tableRow:wT},exit:{codeText:vT,table:yT,tableData:mc,tableHeader:mc,tableRow:mc}}}function gT(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function yT(e){this.exit(e),this.data.inTable=void 0}function wT(e){this.enter({type:"tableRow",children:[]},e)}function mc(e){this.exit(e)}function Zm(e){this.enter({type:"tableCell",children:[]},e)}function vT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,kT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function kT(e,t){return t==="|"?t:e}function xT(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,o=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
190
190
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:w,table:a,tableCell:f,tableRow:c}};function a(v,k,b,E){return h(p(v,b,E),v.align)}function c(v,k,b,E){const S=m(v,b,E),I=h([S]);return I.slice(0,I.indexOf(`
|
|
191
|
-
`))}function f(v,k,b,E){const S=b.enter("tableCell"),I=b.enter("phrasing"),A=b.containerPhrasing(v,{...E,before:l,after:l});return I(),S(),A}function h(v,k){return ON(v,{align:k,alignDelimiters:i,padding:n,stringLength:o})}function p(v,k,b){const E=v.children;let S=-1;const I=[],A=k.enter("table");for(;++S<E.length;)I[S]=m(E[S],k,b);return A(),I}function m(v,k,b){const E=v.children;let S=-1;const I=[],A=k.enter("tableRow");for(;++S<E.length;)I[S]=f(E[S],v,k,b);return A(),I}function w(v,k,b){let E=fw.inlineCode(v,k,b);return b.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function ST(){return{exit:{taskListCheckValueChecked:tg,taskListCheckValueUnchecked:tg,paragraph:_T}}}function CT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ET}}}function tg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function _T(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=t.children;let l=-1,a;for(;++l<o.length;){const c=o[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function ET(e,t,n,i){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let f=fw.listItem(e,t,n,{...i,...c.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(p){return p+a}}function bT(){return[iN(),EN(),TN(),mT(),ST()]}function IT(e){return{extensions:[sN(),bN(e),AN(),xT(e),CT()]}}const NT={tokenize:jT,partial:!0},dw={tokenize:OT,partial:!0},hw={tokenize:MT,partial:!0},pw={tokenize:DT,partial:!0},TT={tokenize:FT,partial:!0},mw={name:"wwwAutolink",tokenize:LT,previous:yw},gw={name:"protocolAutolink",tokenize:RT,previous:ww},$n={name:"emailAutolink",tokenize:PT,previous:vw},En={};function AT(){return{text:En}}let Pr=48;for(;Pr<123;)En[Pr]=$n,Pr++,Pr===58?Pr=65:Pr===91&&(Pr=97);En[43]=$n;En[45]=$n;En[46]=$n;En[95]=$n;En[72]=[$n,gw];En[104]=[$n,gw];En[87]=[$n,mw];En[119]=[$n,mw];function PT(e,t,n){const i=this;let o,l;return a;function a(m){return!Vc(m)||!vw.call(i,i.previous)||Ef(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Vc(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(TT,p,h)(m):m===45||m===95||Nt(m)?(l=!0,e.consume(m),f):p(m)}function h(m){return e.consume(m),o=!0,f}function p(m){return l&&o&&Lt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LT(e,t,n){const i=this;return o;function o(a){return a!==87&&a!==119||!yw.call(i,i.previous)||Ef(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(NT,e.attempt(dw,e.attempt(hw,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function RT(e,t,n){const i=this;let o="",l=!1;return a;function a(m){return(m===72||m===104)&&ww.call(i,i.previous)&&!Ef(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Lt(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const w=o.toLowerCase();if(w==="http"||w==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),l?h:(l=!0,f)):n(m)}function h(m){return m===null||bl(m)||Ge(m)||$r(m)||Dl(m)?n(m):e.attempt(dw,e.attempt(hw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function jT(e,t,n){let i=0;return o;function o(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),o):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function OT(e,t,n){let i,o,l;return a;function a(h){return h===46||h===95?e.check(pw,f,c)(h):h===null||Ge(h)||$r(h)||h!==45&&Dl(h)?f(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(o=i,i=void 0),e.consume(h),a}function f(h){return o||i||!l?n(h):t(h)}}function MT(e,t){let n=0,i=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(pw,t,l)(a):a===null||Ge(a)||$r(a)?t(a):(e.consume(a),o)}function l(a){return a===41&&i++,e.consume(a),o}}function DT(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),o):c===60||c===null||Ge(c)||$r(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||Ge(c)||$r(c)?t(c):i(c)}function l(c){return Lt(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Lt(c)?(e.consume(c),a):n(c)}}function FT(e,t,n){return i;function i(l){return e.consume(l),o}function o(l){return Nt(l)?n(l):t(l)}}function yw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function ww(e){return!Lt(e)}function vw(e){return!(e===47||Vc(e))}function Vc(e){return e===43||e===45||e===46||e===95||Nt(e)}function Ef(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zT={tokenize:KT,partial:!0};function $T(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GT,continuation:{tokenize:WT},exit:HT}},text:{91:{name:"gfmFootnoteCall",tokenize:VT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BT,resolveTo:UT}}}}function BT(e,t,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;o--;){const f=i.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=gn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function UT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function VT(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(l>999||m===93&&!a||m===null||m===91||Ge(m))return n(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return o.includes(gn(i.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Ge(m)||(a=!0),l++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function GT(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(k)}function p(k){if(a>999||k===93&&!c||k===null||k===91||Ge(k))return n(k);if(k===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return l=gn(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return Ge(k)||(c=!0),a++,e.consume(k),k===92?m:p}function m(k){return k===91||k===92||k===93?(e.consume(k),a++,p):p(k)}function w(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(l)||o.push(l),Me(e,v,"gfmFootnoteDefinitionWhitespace")):n(k)}function v(k){return t(k)}}function WT(e,t,n){return e.check(Ds,t,e.attempt(zT,t,n))}function HT(e){e.exit("gfmFootnoteDefinition")}function KT(e,t,n){const i=this;return Me(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function qT(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},m={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},w=[["enter",p,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",m,c]],v=c.parser.constructs.insideSpan.null;v&&Kt(w,w.length,0,Fl(v,a.slice(h+1,f),c)),Kt(w,w.length,0,[["exit",m,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",p,c]]),Kt(a,h-1,f-h+3,w),f=h+w.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function l(a,c,f){const h=this.previous,p=this.events;let m=0;return w;function w(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?f(k):(a.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const b=_i(h);if(k===126)return m>1?f(k):(a.consume(k),m++,v);if(m<2&&!n)return f(k);const E=a.exit("strikethroughSequenceTemporary"),S=_i(k);return E._open=!S||S===2&&!!b,E._close=!b||b===2&&!!S,c(k)}}}class QT{constructor(){this.map=[]}add(t,n,i){XT(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let o=i.pop();for(;o;){for(const l of o)t.push(l);o=i.pop()}this.map.length=0}}function XT(e,t,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...i);return}o+=1}e.map.push([t,n,i])}}function YT(e,t){let n=!1;const i=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function JT(){return{flow:{null:{name:"table",tokenize:ZT,resolveAll:eA}}}}function ZT(e,t,n){const i=this;let o=0,l=0,a;return c;function c(D){let te=i.events.length-1;for(;te>-1;){const ne=i.events[te][1].type;if(ne==="lineEnding"||ne==="linePrefix")te--;else break}const re=te>-1?i.events[te][1].type:null,fe=re==="tableHead"||re==="tableRow"?L:f;return fe===L&&i.parser.lazy[i.now().line]?n(D):fe(D)}function f(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(a=!0,l+=1),p(D)}function p(D){return D===null?n(D):xe(D)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v):n(D):Re(D)?Me(e,p,"whitespace")(D):(l+=1,a&&(a=!1,o+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||Ge(D)?(e.exit("data"),p(D)):(e.consume(D),D===92?w:m)}function w(D){return D===92||D===124?(e.consume(D),m):m(D)}function v(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(D):(e.enter("tableDelimiterRow"),a=!1,Re(D)?Me(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D))}function k(D){return D===45||D===58?E(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),b):P(D)}function b(D){return Re(D)?Me(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),S):D===45?(l+=1,S(D)):D===null||xe(D)?B(D):P(D)}function S(D){return D===45?(e.enter("tableDelimiterFiller"),I(D)):P(D)}function I(D){return D===45?(e.consume(D),I):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(D))}function A(D){return Re(D)?Me(e,B,"whitespace")(D):B(D)}function B(D){return D===124?k(D):D===null||xe(D)?!a||o!==l?P(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):P(D)}function P(D){return n(D)}function L(D){return e.enter("tableRow"),Q(D)}function Q(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),Q):D===null||xe(D)?(e.exit("tableRow"),t(D)):Re(D)?Me(e,Q,"whitespace")(D):(e.enter("data"),se(D))}function se(D){return D===null||D===124||Ge(D)?(e.exit("data"),Q(D)):(e.consume(D),D===92?ue:se)}function ue(D){return D===92||D===124?(e.consume(D),se):se(D)}}function eA(e,t){let n=-1,i=!0,o=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,p,m;const w=new QT;for(;++n<e.length;){const v=e[n],k=v[1];v[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(ng(w,t,f,h,p),p=void 0,f=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",p,t]])),o=k.type==="tableDelimiterRow"?2:p?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],m=ll(w,t,l,o,void 0,m),l=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],m=ll(w,t,l,o,void 0,m)),l=a,a=[l[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,l[1]!==0?(a[0]=a[1],m=ll(w,t,l,o,n,m)):a[1]!==0&&(m=ll(w,t,a,o,n,m)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&ng(w,t,f,h,p),w.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=YT(t.events,n))}return e}function ll(e,t,n,i,o,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},ki(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=ki(t.events,n[1]);if(l={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=ki(t.events,n[2]),p=ki(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),i!==2){const w=t.events[n[2]],v=t.events[n[3]];if(w[1].end=Object.assign({},v[1].end),w[1].type="chunkText",w[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,b=n[3]-n[2]-1;e.add(k,b,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(l.end=Object.assign({},ki(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function ng(e,t,n,i,o){const l=[],a=ki(t.events,n);o&&(o.end=Object.assign({},a),l.push(["exit",o,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function ki(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const tA={name:"tasklistCheck",tokenize:rA};function nA(){return{text:{91:tA}}}function rA(e,t,n){const i=this;return o;function o(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return Ge(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return xe(f)?t(f):Re(f)?e.check({tokenize:iA},t,n)(f):n(f)}}function iA(e,t,n){return Me(e,i,"whitespace");function i(o){return o===null?n(o):t(o)}}function sA(e){return Ty([AT(),$T(),qT(e),JT(),nA()])}const oA={};function lA(e){const t=this,n=e||oA,i=t.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(sA(n)),l.push(bT()),a.push(IT(n))}function bf({text:e}){return C.jsx("div",{className:"md",children:C.jsx(qI,{remarkPlugins:[lA],children:e})})}function aA({comment:e,onUnlink:t}){const n=W(o=>o.jumpToComment),i=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`;return C.jsxs("div",{className:`linked-comment status-${e.status}`,children:[C.jsxs("div",{className:"linked-head",children:[C.jsxs("span",{className:"mono",children:[e.filePath,":",i," (",e.side,")"]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),C.jsx("span",{className:"muted mono small",title:e.targetKey,children:e.targetKey.length>28?e.targetKey.slice(0,28)+"…":e.targetKey}),C.jsx("span",{className:"spacer"}),e.status!=="orphaned"&&C.jsx("button",{className:"link",onClick:()=>{n(e)},children:"跳转"}),C.jsx("button",{className:"link danger",onClick:t,children:"解除关联"})]}),C.jsx("div",{className:"linked-body",children:e.body})]})}function uA({issue:e,onBack:t}){const n=W(S=>S.allComments),i=W(S=>S.comments),o=W(S=>S.updateIssue),l=W(S=>S.deleteIssue),a=W(S=>S.exportIssue),c=W(S=>S.selectedCommentIds),f=W(S=>S.clearSelectedComments),[h,p]=ee.useState(!1),[m,w]=ee.useState(e.title),[v,k]=ee.useState(e.body),b=ee.useMemo(()=>{const S=new Map;for(const I of n)S.set(I.id,I);for(const I of i)S.set(I.id,I);return S},[n,i]),E=c.filter(S=>!e.commentIds.includes(S));return C.jsxs("div",{className:"issue-detail",children:[C.jsxs("div",{className:"issue-detail-head",children:[C.jsx("button",{className:"link",onClick:t,children:"← 返回列表"}),C.jsx("span",{className:"spacer"}),C.jsx("button",{className:"link",onClick:()=>{a(e.id)},children:"复制 Issue"}),C.jsx("button",{className:"link",onClick:()=>{o(e.id,{status:e.status==="open"?"closed":"open"})},children:e.status==="open"?"关闭":"重新打开"}),C.jsx("button",{className:"link danger",onClick:()=>{window.confirm(`删除 Issue「${e.title}」?`)&&(l(e.id),t())},children:"删除"})]}),h?C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:m,onChange:S=>w(S.target.value),placeholder:"标题"}),C.jsx("textarea",{value:v,onChange:S=>k(S.target.value),rows:6,placeholder:"描述(Markdown)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!m.trim(),onClick:async()=>{await o(e.id,{title:m,body:v}),p(!1)},children:"保存"}),C.jsx("button",{onClick:()=>p(!1),children:"取消"})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("h3",{children:[C.jsx("span",{className:`badge badge-${e.status}`,children:e.status})," ",e.title,C.jsx("button",{className:"link",onClick:()=>p(!0),children:"编辑"})]}),e.body?C.jsx(bf,{text:e.body}):C.jsx("p",{className:"muted",children:"(无描述)"})]}),C.jsxs("div",{className:"issue-comments",children:[C.jsxs("div",{className:"section-title",children:["关联评论 (",e.commentIds.length,")",E.length>0&&C.jsxs("button",{className:"link",onClick:async()=>{await o(e.id,{commentIds:[...e.commentIds,...E]}),f()},children:["+ 添加选中的 ",E.length," 条评论"]})]}),e.commentIds.map(S=>{const I=b.get(S),A=()=>{o(e.id,{commentIds:e.commentIds.filter(B=>B!==S)})};return I?C.jsx(aA,{comment:I,onUnlink:A},S):C.jsxs("div",{className:"linked-comment muted",children:["评论 ",S.slice(0,8)," 已不存在"," ",C.jsx("button",{className:"link",onClick:A,children:"移除"})]},S)})]})]})}function cA(){const e=W(I=>I.issues),t=W(I=>I.loadIssues),n=W(I=>I.createIssue),i=W(I=>I.selectedCommentIds),o=W(I=>I.clearSelectedComments),l=W(I=>I.setPanel),[a,c]=ee.useState("open"),[f,h]=ee.useState(null),[p,m]=ee.useState(!1),[w,v]=ee.useState(""),[k,b]=ee.useState("");ee.useEffect(()=>{t()},[t]),ee.useEffect(()=>{i.length>0&&!f&&m(!0)},[i.length,f]);const E=e.filter(I=>a==="all"||I.status===a),S=f?e.find(I=>I.id===f):void 0;return C.jsxs("aside",{className:"issues-drawer",children:[C.jsxs("div",{className:"drawer-head",children:[C.jsx("strong",{children:"Issues"}),C.jsx("div",{className:"seg",children:["open","closed","all"].map(I=>C.jsx("button",{className:a===I?"active":"",onClick:()=>c(I),children:I},I))}),C.jsx("span",{className:"spacer"}),C.jsx("button",{onClick:()=>m(!0),children:"新建"}),C.jsx("button",{className:"icon",onClick:()=>l("diff"),title:"关闭 (Esc)",children:"✕"})]}),S?C.jsx(uA,{issue:S,onBack:()=>h(null)}):C.jsxs(C.Fragment,{children:[p&&C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:w,onChange:I=>v(I.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:k,onChange:I=>b(I.target.value),rows:4,placeholder:"描述(Markdown,可选)"}),i.length>0&&C.jsxs("div",{className:"muted",children:["将关联 ",i.length," 条选中的评论"]}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!w.trim(),onClick:async()=>{const I=await n({title:w,body:k,commentIds:i});I&&(v(""),b(""),m(!1),h(I.id))},children:"创建 Issue"}),C.jsx("button",{onClick:()=>{m(!1),o()},children:"取消"})]})]}),C.jsxs("div",{className:"issue-list",children:[E.length===0&&C.jsxs("div",{className:"muted empty",children:["没有 ",a==="all"?"":a," Issue"]}),E.map(I=>C.jsxs("div",{className:"issue-row",onClick:()=>h(I.id),children:[C.jsx("span",{className:`badge badge-${I.status}`,children:I.status}),C.jsx("span",{className:"title",children:I.title}),C.jsxs("span",{className:"muted",children:[I.commentIds.length," 评论"]})]},I.id))]})]})]})}function fA(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toDateString()===new Date().toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString()}function dA({todo:e,showBranch:t}){const n=W(v=>v.updateTodo),i=W(v=>v.deleteTodo),[o,l]=ee.useState(!1),[a,c]=ee.useState(!1),[f,h]=ee.useState(e.title),[p,m]=ee.useState(e.body),w=()=>{h(e.title),m(e.body),c(!0),l(!0)};return C.jsxs("div",{className:`todo-row status-${e.status}`,children:[C.jsxs("div",{className:"todo-head",onClick:()=>l(v=>!v),children:[C.jsx("input",{type:"checkbox",checked:e.status==="done",onClick:v=>v.stopPropagation(),onChange:()=>{n(e.id,{status:e.status==="done"?"open":"done"})},title:e.status==="done"?"标记为未完成":"标记为完成"}),C.jsx("span",{className:"title",children:e.title}),t&&C.jsx("span",{className:"badge",children:e.branch}),C.jsx("span",{className:"spacer"}),C.jsx("span",{className:"muted small",title:e.updatedAt,children:fA(e.updatedAt)})]}),o&&(a?C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:f,onChange:v=>h(v.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:p,onChange:v=>m(v.target.value),rows:5,placeholder:"描述(Markdown,可选)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!f.trim(),onClick:async()=>{await n(e.id,{title:f,body:p}),c(!1)},children:"保存"}),C.jsx("button",{onClick:()=>c(!1),children:"取消"})]})]}):C.jsxs("div",{className:"todo-body",children:[e.body?C.jsx(bf,{text:e.body}):C.jsx("p",{className:"muted",children:"(无描述)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"link",onClick:w,children:"编辑"}),C.jsx("button",{className:"link danger",onClick:()=>{window.confirm(`删除 Todo「${e.title}」?`)&&i(e.id)},children:"删除"})]})]}))]})}function hA(){const e=W(P=>P.todos),t=W(P=>P.loadTodos),n=W(P=>P.createTodo),i=W(P=>P.exportTodos),o=W(P=>P.setPanel),l=W(P=>P.repo),a=W(P=>P.root),c=Kc(l,a),[f,h]=ee.useState("open"),[p,m]=ee.useState(!1),[w,v]=ee.useState(!1),[k,b]=ee.useState(!1),[E,S]=ee.useState(""),[I,A]=ee.useState("");ee.useEffect(()=>{t()},[t]);const B=ee.useMemo(()=>e.filter(P=>(p||P.branch===c)&&(f==="all"||P.status===f)).slice().sort((P,L)=>P.createdAt<L.createdAt?-1:P.createdAt>L.createdAt?1:0),[e,p,c,f]);return C.jsxs("aside",{className:"issues-drawer",children:[C.jsxs("div",{className:"drawer-head",children:[C.jsx("strong",{children:"Todos"}),C.jsx("span",{className:"branch",title:"当前分支",children:c||"-"}),C.jsx("div",{className:"seg",children:["open","done","all"].map(P=>C.jsx("button",{className:f===P?"active":"",onClick:()=>h(P),children:P},P))}),C.jsx("span",{className:"spacer"}),C.jsx("button",{onClick:()=>v(!0),children:"新建"}),C.jsx("button",{className:"icon",onClick:()=>o("diff"),title:"关闭 (Esc)",children:"✕"})]}),C.jsxs("div",{className:"drawer-tools",children:[C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:p,onChange:P=>m(P.target.checked)}),"所有分支"]}),C.jsx("span",{className:"spacer"}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:k,onChange:P=>b(P.target.checked)}),"含已完成"]}),C.jsx("button",{className:"link",onClick:()=>{i(k)},title:`复制 ${c} 的 Todo`,children:"复制 Todo"})]}),w&&C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:E,onChange:P=>S(P.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:I,onChange:P=>A(P.target.value),rows:4,placeholder:"描述(Markdown,可选)"}),C.jsxs("div",{className:"muted",children:["将创建在分支 ",c]}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!E.trim(),onClick:async()=>{await n({title:E,body:I})&&(S(""),A(""),v(!1))},children:"创建 Todo"}),C.jsx("button",{onClick:()=>{v(!1),S(""),A("")},children:"取消"})]})]}),C.jsxs("div",{className:"todo-list",children:[B.length===0&&C.jsx("div",{className:"muted empty",children:p?"还没有 Todo":`分支 ${c} 上没有 ${f==="all"?"":f} Todo`}),B.map(P=>C.jsx(dA,{todo:P,showBranch:p},P.id))]})]})}function kw({title:e,initial:t="",submitLabel:n="保存评论",onSave:i,onCancel:o}){const[l,a]=ee.useState(t),[c,f]=ee.useState(!1),h=ee.useRef(null);ee.useEffect(()=>{h.current?.focus()},[]);const p=async()=>{if(!(!l.trim()||c)){f(!0);try{await i(l)}finally{f(!1)}}};return C.jsxs("div",{className:"comment-editor",onMouseDown:m=>m.stopPropagation(),children:[C.jsx("div",{className:"comment-editor-head",children:e}),C.jsx("textarea",{ref:h,value:l,onChange:m=>a(m.target.value),placeholder:"写评论,支持 Markdown。Ctrl+Enter 保存,Esc 取消。",rows:4,onKeyDown:m=>{(m.ctrlKey||m.metaKey)&&m.key==="Enter"?(m.preventDefault(),p()):m.key==="Escape"&&(m.preventDefault(),o()),m.stopPropagation()}}),C.jsxs("div",{className:"comment-editor-actions",children:[C.jsx("button",{className:"primary",onClick:()=>{p()},disabled:!l.trim()||c,children:n}),C.jsx("button",{onClick:o,children:"取消"})]})]})}function rg(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function pA(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"numeric",day:"numeric"})}function mA(e){const t=Dn(e);return t?t.kind==="working"?"Unstaged":t.kind==="staged"?"Staged":t.kind==="all"?"All":lg(t):e}function ig({comment:e,showSnippet:t=!1,showFile:n=!1}){const i=W(S=>S.updateComment),o=W(S=>S.deleteComment),l=W(S=>S.exportComments),a=W(S=>S.selectedCommentIds.includes(e.id)),c=W(S=>S.toggleSelectComment),f=W(S=>S.setReattaching),h=W(S=>S.reattaching===e.id),p=W(S=>S.focusedCommentId===e.id),m=W(S=>S.focusComment),w=W(S=>S.targetKey),[v,k]=ee.useState(!1),b=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`,E=e.status!=="orphaned"&&e.targetKey!==w?mA(e.targetKey):null;return C.jsxs("div",{className:`comment-card status-${e.status} ${a?"selected":""} ${p?"focused":""}`,onClick:()=>{p||m(e.id)},children:[C.jsxs("div",{className:"comment-head",children:[n&&C.jsx("span",{className:"mono file",title:e.filePath,children:e.filePath.split("/").pop()}),C.jsx("label",{className:"check",title:"选中以创建 / 关联 Issue",onClick:S=>S.stopPropagation(),children:C.jsx("input",{type:"checkbox",checked:a,onChange:()=>c(e.id)})}),C.jsxs("span",{className:"mono",children:[e.side," ",b]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),E&&C.jsx("span",{className:"badge",title:`这条评论现在位于 ${e.targetKey},点击卡片可跳转`,children:E}),C.jsx("span",{className:"muted time",title:`created ${rg(e.createdAt)}${e.exportedAt?`
|
|
192
|
-
exported ${
|
|
191
|
+
`))}function f(v,k,b,E){const S=b.enter("tableCell"),I=b.enter("phrasing"),A=b.containerPhrasing(v,{...E,before:l,after:l});return I(),S(),A}function h(v,k){return ON(v,{align:k,alignDelimiters:i,padding:n,stringLength:o})}function p(v,k,b){const E=v.children;let S=-1;const I=[],A=k.enter("table");for(;++S<E.length;)I[S]=m(E[S],k,b);return A(),I}function m(v,k,b){const E=v.children;let S=-1;const I=[],A=k.enter("tableRow");for(;++S<E.length;)I[S]=f(E[S],v,k,b);return A(),I}function w(v,k,b){let E=cw.inlineCode(v,k,b);return b.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function ST(){return{exit:{taskListCheckValueChecked:eg,taskListCheckValueUnchecked:eg,paragraph:_T}}}function CT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ET}}}function eg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function _T(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=t.children;let l=-1,a;for(;++l<o.length;){const c=o[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function ET(e,t,n,i){const o=e.children[0],l=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let f=cw.listItem(e,t,n,{...i,...c.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(p){return p+a}}function bT(){return[iN(),EN(),TN(),mT(),ST()]}function IT(e){return{extensions:[sN(),bN(e),AN(),xT(e),CT()]}}const NT={tokenize:jT,partial:!0},fw={tokenize:OT,partial:!0},dw={tokenize:MT,partial:!0},hw={tokenize:DT,partial:!0},TT={tokenize:FT,partial:!0},pw={name:"wwwAutolink",tokenize:LT,previous:gw},mw={name:"protocolAutolink",tokenize:RT,previous:yw},$n={name:"emailAutolink",tokenize:PT,previous:ww},En={};function AT(){return{text:En}}let Pr=48;for(;Pr<123;)En[Pr]=$n,Pr++,Pr===58?Pr=65:Pr===91&&(Pr=97);En[43]=$n;En[45]=$n;En[46]=$n;En[95]=$n;En[72]=[$n,mw];En[104]=[$n,mw];En[87]=[$n,pw];En[119]=[$n,pw];function PT(e,t,n){const i=this;let o,l;return a;function a(m){return!Vc(m)||!ww.call(i,i.previous)||Ef(i.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Vc(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(TT,p,h)(m):m===45||m===95||Nt(m)?(l=!0,e.consume(m),f):p(m)}function h(m){return e.consume(m),o=!0,f}function p(m){return l&&o&&Lt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function LT(e,t,n){const i=this;return o;function o(a){return a!==87&&a!==119||!gw.call(i,i.previous)||Ef(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(NT,e.attempt(fw,e.attempt(dw,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function RT(e,t,n){const i=this;let o="",l=!1;return a;function a(m){return(m===72||m===104)&&yw.call(i,i.previous)&&!Ef(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Lt(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const w=o.toLowerCase();if(w==="http"||w==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),l?h:(l=!0,f)):n(m)}function h(m){return m===null||bl(m)||Ge(m)||$r(m)||Dl(m)?n(m):e.attempt(fw,e.attempt(dw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function jT(e,t,n){let i=0;return o;function o(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),o):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function OT(e,t,n){let i,o,l;return a;function a(h){return h===46||h===95?e.check(hw,f,c)(h):h===null||Ge(h)||$r(h)||h!==45&&Dl(h)?f(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(o=i,i=void 0),e.consume(h),a}function f(h){return o||i||!l?n(h):t(h)}}function MT(e,t){let n=0,i=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(hw,t,l)(a):a===null||Ge(a)||$r(a)?t(a):(e.consume(a),o)}function l(a){return a===41&&i++,e.consume(a),o}}function DT(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),o):c===60||c===null||Ge(c)||$r(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||Ge(c)||$r(c)?t(c):i(c)}function l(c){return Lt(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Lt(c)?(e.consume(c),a):n(c)}}function FT(e,t,n){return i;function i(l){return e.consume(l),o}function o(l){return Nt(l)?n(l):t(l)}}function gw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function yw(e){return!Lt(e)}function ww(e){return!(e===47||Vc(e))}function Vc(e){return e===43||e===45||e===46||e===95||Nt(e)}function Ef(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const zT={tokenize:KT,partial:!0};function $T(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GT,continuation:{tokenize:WT},exit:HT}},text:{91:{name:"gfmFootnoteCall",tokenize:VT},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:BT,resolveTo:UT}}}}function BT(e,t,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;o--;){const f=i.events[o][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=gn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function UT(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function VT(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(l>999||m===93&&!a||m===null||m===91||Ge(m))return n(m);if(m===93){e.exit("chunkString");const w=e.exit("gfmFootnoteCallString");return o.includes(gn(i.sliceSerialize(w)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Ge(m)||(a=!0),l++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function GT(e,t,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(k)}function p(k){if(a>999||k===93&&!c||k===null||k===91||Ge(k))return n(k);if(k===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return l=gn(i.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),w}return Ge(k)||(c=!0),a++,e.consume(k),k===92?m:p}function m(k){return k===91||k===92||k===93?(e.consume(k),a++,p):p(k)}function w(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(l)||o.push(l),Me(e,v,"gfmFootnoteDefinitionWhitespace")):n(k)}function v(k){return t(k)}}function WT(e,t,n){return e.check(Ds,t,e.attempt(zT,t,n))}function HT(e){e.exit("gfmFootnoteDefinition")}function KT(e,t,n){const i=this;return Me(e,o,"gfmFootnoteDefinitionIndent",5);function o(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function qT(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},m={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},w=[["enter",p,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",m,c]],v=c.parser.constructs.insideSpan.null;v&&Kt(w,w.length,0,Fl(v,a.slice(h+1,f),c)),Kt(w,w.length,0,[["exit",m,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",p,c]]),Kt(a,h-1,f-h+3,w),f=h+w.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function l(a,c,f){const h=this.previous,p=this.events;let m=0;return w;function w(k){return h===126&&p[p.length-1][1].type!=="characterEscape"?f(k):(a.enter("strikethroughSequenceTemporary"),v(k))}function v(k){const b=_i(h);if(k===126)return m>1?f(k):(a.consume(k),m++,v);if(m<2&&!n)return f(k);const E=a.exit("strikethroughSequenceTemporary"),S=_i(k);return E._open=!S||S===2&&!!b,E._close=!b||b===2&&!!S,c(k)}}}class QT{constructor(){this.map=[]}add(t,n,i){XT(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let o=i.pop();for(;o;){for(const l of o)t.push(l);o=i.pop()}this.map.length=0}}function XT(e,t,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...i);return}o+=1}e.map.push([t,n,i])}}function YT(e,t){let n=!1;const i=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function JT(){return{flow:{null:{name:"table",tokenize:ZT,resolveAll:eA}}}}function ZT(e,t,n){const i=this;let o=0,l=0,a;return c;function c(D){let ne=i.events.length-1;for(;ne>-1;){const ie=i.events[ne][1].type;if(ie==="lineEnding"||ie==="linePrefix")ne--;else break}const re=ne>-1?i.events[ne][1].type:null,fe=re==="tableHead"||re==="tableRow"?L:f;return fe===L&&i.parser.lazy[i.now().line]?n(D):fe(D)}function f(D){return e.enter("tableHead"),e.enter("tableRow"),h(D)}function h(D){return D===124||(a=!0,l+=1),p(D)}function p(D){return D===null?n(D):xe(D)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v):n(D):Re(D)?Me(e,p,"whitespace")(D):(l+=1,a&&(a=!1,o+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,p):(e.enter("data"),m(D)))}function m(D){return D===null||D===124||Ge(D)?(e.exit("data"),p(D)):(e.consume(D),D===92?w:m)}function w(D){return D===92||D===124?(e.consume(D),m):m(D)}function v(D){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(D):(e.enter("tableDelimiterRow"),a=!1,Re(D)?Me(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D))}function k(D){return D===45||D===58?E(D):D===124?(a=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),b):P(D)}function b(D){return Re(D)?Me(e,E,"whitespace")(D):E(D)}function E(D){return D===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),S):D===45?(l+=1,S(D)):D===null||xe(D)?$(D):P(D)}function S(D){return D===45?(e.enter("tableDelimiterFiller"),I(D)):P(D)}function I(D){return D===45?(e.consume(D),I):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(D))}function A(D){return Re(D)?Me(e,$,"whitespace")(D):$(D)}function $(D){return D===124?k(D):D===null||xe(D)?!a||o!==l?P(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):P(D)}function P(D){return n(D)}function L(D){return e.enter("tableRow"),Q(D)}function Q(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),Q):D===null||xe(D)?(e.exit("tableRow"),t(D)):Re(D)?Me(e,Q,"whitespace")(D):(e.enter("data"),oe(D))}function oe(D){return D===null||D===124||Ge(D)?(e.exit("data"),Q(D)):(e.consume(D),D===92?ue:oe)}function ue(D){return D===92||D===124?(e.consume(D),oe):oe(D)}}function eA(e,t){let n=-1,i=!0,o=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,p,m;const w=new QT;for(;++n<e.length;){const v=e[n],k=v[1];v[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(tg(w,t,f,h,p),p=void 0,f=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},w.add(n,0,[["enter",p,t]])),o=k.type==="tableDelimiterRow"?2:p?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],m=ll(w,t,l,o,void 0,m),l=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],m=ll(w,t,l,o,void 0,m)),l=a,a=[l[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,l[1]!==0?(a[0]=a[1],m=ll(w,t,l,o,n,m)):a[1]!==0&&(m=ll(w,t,a,o,n,m)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&tg(w,t,f,h,p),w.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=YT(t.events,n))}return e}function ll(e,t,n,i,o,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},ki(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=ki(t.events,n[1]);if(l={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=ki(t.events,n[2]),p=ki(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),i!==2){const w=t.events[n[2]],v=t.events[n[3]];if(w[1].end=Object.assign({},v[1].end),w[1].type="chunkText",w[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,b=n[3]-n[2]-1;e.add(k,b,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(l.end=Object.assign({},ki(t.events,o)),e.add(o,0,[["exit",l,t]]),l=void 0),l}function tg(e,t,n,i,o){const l=[],a=ki(t.events,n);o&&(o.end=Object.assign({},a),l.push(["exit",o,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function ki(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const tA={name:"tasklistCheck",tokenize:rA};function nA(){return{text:{91:tA}}}function rA(e,t,n){const i=this;return o;function o(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return Ge(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return xe(f)?t(f):Re(f)?e.check({tokenize:iA},t,n)(f):n(f)}}function iA(e,t,n){return Me(e,i,"whitespace");function i(o){return o===null?n(o):t(o)}}function sA(e){return Ny([AT(),$T(),qT(e),JT(),nA()])}const oA={};function lA(e){const t=this,n=e||oA,i=t.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(sA(n)),l.push(bT()),a.push(IT(n))}function bf({text:e}){return C.jsx("div",{className:"md",children:C.jsx(qI,{remarkPlugins:[lA],children:e})})}function aA({comment:e,onUnlink:t}){const n=W(o=>o.jumpToComment),i=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`;return C.jsxs("div",{className:`linked-comment status-${e.status}`,children:[C.jsxs("div",{className:"linked-head",children:[C.jsxs("span",{className:"mono",children:[e.filePath,":",i," (",e.side,")"]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),C.jsx("span",{className:"muted mono small",title:e.targetKey,children:e.targetKey.length>28?e.targetKey.slice(0,28)+"…":e.targetKey}),C.jsx("span",{className:"spacer"}),e.status!=="orphaned"&&C.jsx("button",{className:"link",onClick:()=>{n(e)},children:"跳转"}),C.jsx("button",{className:"link danger",onClick:t,children:"解除关联"})]}),C.jsx("div",{className:"linked-body",children:e.body})]})}function uA({issue:e,onBack:t}){const n=W(S=>S.allComments),i=W(S=>S.comments),o=W(S=>S.updateIssue),l=W(S=>S.deleteIssue),a=W(S=>S.exportIssue),c=W(S=>S.selectedCommentIds),f=W(S=>S.clearSelectedComments),[h,p]=te.useState(!1),[m,w]=te.useState(e.title),[v,k]=te.useState(e.body),b=te.useMemo(()=>{const S=new Map;for(const I of n)S.set(I.id,I);for(const I of i)S.set(I.id,I);return S},[n,i]),E=c.filter(S=>!e.commentIds.includes(S));return C.jsxs("div",{className:"issue-detail",children:[C.jsxs("div",{className:"issue-detail-head",children:[C.jsx("button",{className:"link",onClick:t,children:"← 返回列表"}),C.jsx("span",{className:"spacer"}),C.jsx("button",{className:"link",onClick:()=>{a(e.id)},children:"复制 Issue"}),C.jsx("button",{className:"link",onClick:()=>{o(e.id,{status:e.status==="open"?"closed":"open"})},children:e.status==="open"?"关闭":"重新打开"}),C.jsx("button",{className:"link danger",onClick:()=>{window.confirm(`删除 Issue「${e.title}」?`)&&(l(e.id),t())},children:"删除"})]}),h?C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:m,onChange:S=>w(S.target.value),placeholder:"标题"}),C.jsx("textarea",{value:v,onChange:S=>k(S.target.value),rows:6,placeholder:"描述(Markdown)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!m.trim(),onClick:async()=>{await o(e.id,{title:m,body:v}),p(!1)},children:"保存"}),C.jsx("button",{onClick:()=>p(!1),children:"取消"})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs("h3",{children:[C.jsx("span",{className:`badge badge-${e.status}`,children:e.status})," ",e.title,C.jsx("button",{className:"link",onClick:()=>p(!0),children:"编辑"})]}),e.body?C.jsx(bf,{text:e.body}):C.jsx("p",{className:"muted",children:"(无描述)"})]}),C.jsxs("div",{className:"issue-comments",children:[C.jsxs("div",{className:"section-title",children:["关联评论 (",e.commentIds.length,")",E.length>0&&C.jsxs("button",{className:"link",onClick:async()=>{await o(e.id,{commentIds:[...e.commentIds,...E]}),f()},children:["+ 添加选中的 ",E.length," 条评论"]})]}),e.commentIds.map(S=>{const I=b.get(S),A=()=>{o(e.id,{commentIds:e.commentIds.filter($=>$!==S)})};return I?C.jsx(aA,{comment:I,onUnlink:A},S):C.jsxs("div",{className:"linked-comment muted",children:["评论 ",S.slice(0,8)," 已不存在"," ",C.jsx("button",{className:"link",onClick:A,children:"移除"})]},S)})]})]})}function cA(){const e=W(I=>I.issues),t=W(I=>I.loadIssues),n=W(I=>I.createIssue),i=W(I=>I.selectedCommentIds),o=W(I=>I.clearSelectedComments),l=W(I=>I.setPanel),[a,c]=te.useState("open"),[f,h]=te.useState(null),[p,m]=te.useState(!1),[w,v]=te.useState(""),[k,b]=te.useState("");te.useEffect(()=>{t()},[t]),te.useEffect(()=>{i.length>0&&!f&&m(!0)},[i.length,f]);const E=e.filter(I=>a==="all"||I.status===a),S=f?e.find(I=>I.id===f):void 0;return C.jsxs("aside",{className:"issues-drawer",children:[C.jsxs("div",{className:"drawer-head",children:[C.jsx("strong",{children:"Issues"}),C.jsx("div",{className:"seg",children:["open","closed","all"].map(I=>C.jsx("button",{className:a===I?"active":"",onClick:()=>c(I),children:I},I))}),C.jsx("span",{className:"spacer"}),C.jsx("button",{onClick:()=>m(!0),children:"新建"}),C.jsx("button",{className:"icon",onClick:()=>l("diff"),title:"关闭 (Esc)",children:"✕"})]}),S?C.jsx(uA,{issue:S,onBack:()=>h(null)}):C.jsxs(C.Fragment,{children:[p&&C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:w,onChange:I=>v(I.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:k,onChange:I=>b(I.target.value),rows:4,placeholder:"描述(Markdown,可选)"}),i.length>0&&C.jsxs("div",{className:"muted",children:["将关联 ",i.length," 条选中的评论"]}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!w.trim(),onClick:async()=>{const I=await n({title:w,body:k,commentIds:i});I&&(v(""),b(""),m(!1),h(I.id))},children:"创建 Issue"}),C.jsx("button",{onClick:()=>{m(!1),o()},children:"取消"})]})]}),C.jsxs("div",{className:"issue-list",children:[E.length===0&&C.jsxs("div",{className:"muted empty",children:["没有 ",a==="all"?"":a," Issue"]}),E.map(I=>C.jsxs("div",{className:"issue-row",onClick:()=>h(I.id),children:[C.jsx("span",{className:`badge badge-${I.status}`,children:I.status}),C.jsx("span",{className:"title",children:I.title}),C.jsxs("span",{className:"muted",children:[I.commentIds.length," 评论"]})]},I.id))]})]})]})}function fA(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toDateString()===new Date().toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString()}function dA({todo:e,showBranch:t}){const n=W(v=>v.updateTodo),i=W(v=>v.deleteTodo),[o,l]=te.useState(!1),[a,c]=te.useState(!1),[f,h]=te.useState(e.title),[p,m]=te.useState(e.body),w=()=>{h(e.title),m(e.body),c(!0),l(!0)};return C.jsxs("div",{className:`todo-row status-${e.status}`,children:[C.jsxs("div",{className:"todo-head",onClick:()=>l(v=>!v),children:[C.jsx("input",{type:"checkbox",checked:e.status==="done",onClick:v=>v.stopPropagation(),onChange:()=>{n(e.id,{status:e.status==="done"?"open":"done"})},title:e.status==="done"?"标记为未完成":"标记为完成"}),C.jsx("span",{className:"title",children:e.title}),t&&C.jsx("span",{className:"badge",children:e.branch}),C.jsx("span",{className:"spacer"}),C.jsx("span",{className:"muted small",title:e.updatedAt,children:fA(e.updatedAt)})]}),o&&(a?C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:f,onChange:v=>h(v.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:p,onChange:v=>m(v.target.value),rows:5,placeholder:"描述(Markdown,可选)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!f.trim(),onClick:async()=>{await n(e.id,{title:f,body:p}),c(!1)},children:"保存"}),C.jsx("button",{onClick:()=>c(!1),children:"取消"})]})]}):C.jsxs("div",{className:"todo-body",children:[e.body?C.jsx(bf,{text:e.body}):C.jsx("p",{className:"muted",children:"(无描述)"}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"link",onClick:w,children:"编辑"}),C.jsx("button",{className:"link danger",onClick:()=>{window.confirm(`删除 Todo「${e.title}」?`)&&i(e.id)},children:"删除"})]})]}))]})}function hA(){const e=W(P=>P.todos),t=W(P=>P.loadTodos),n=W(P=>P.createTodo),i=W(P=>P.exportTodos),o=W(P=>P.setPanel),l=W(P=>P.repo),a=W(P=>P.root),c=Kc(l,a),[f,h]=te.useState("open"),[p,m]=te.useState(!1),[w,v]=te.useState(!1),[k,b]=te.useState(!1),[E,S]=te.useState(""),[I,A]=te.useState("");te.useEffect(()=>{t()},[t]);const $=te.useMemo(()=>e.filter(P=>(p||P.branch===c)&&(f==="all"||P.status===f)).slice().sort((P,L)=>P.createdAt<L.createdAt?-1:P.createdAt>L.createdAt?1:0),[e,p,c,f]);return C.jsxs("aside",{className:"issues-drawer",children:[C.jsxs("div",{className:"drawer-head",children:[C.jsx("strong",{children:"Todos"}),C.jsx("span",{className:"branch",title:"当前分支",children:c||"-"}),C.jsx("div",{className:"seg",children:["open","done","all"].map(P=>C.jsx("button",{className:f===P?"active":"",onClick:()=>h(P),children:P},P))}),C.jsx("span",{className:"spacer"}),C.jsx("button",{onClick:()=>v(!0),children:"新建"}),C.jsx("button",{className:"icon",onClick:()=>o("diff"),title:"关闭 (Esc)",children:"✕"})]}),C.jsxs("div",{className:"drawer-tools",children:[C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:p,onChange:P=>m(P.target.checked)}),"所有分支"]}),C.jsx("span",{className:"spacer"}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:k,onChange:P=>b(P.target.checked)}),"含已完成"]}),C.jsx("button",{className:"link",onClick:()=>{i(k)},title:`复制 ${c} 的 Todo`,children:"复制 Todo"})]}),w&&C.jsxs("div",{className:"issue-form",children:[C.jsx("input",{value:E,onChange:P=>S(P.target.value),placeholder:"标题",autoFocus:!0}),C.jsx("textarea",{value:I,onChange:P=>A(P.target.value),rows:4,placeholder:"描述(Markdown,可选)"}),C.jsxs("div",{className:"muted",children:["将创建在分支 ",c]}),C.jsxs("div",{className:"row-actions",children:[C.jsx("button",{className:"primary",disabled:!E.trim(),onClick:async()=>{await n({title:E,body:I})&&(S(""),A(""),v(!1))},children:"创建 Todo"}),C.jsx("button",{onClick:()=>{v(!1),S(""),A("")},children:"取消"})]})]}),C.jsxs("div",{className:"todo-list",children:[$.length===0&&C.jsx("div",{className:"muted empty",children:p?"还没有 Todo":`分支 ${c} 上没有 ${f==="all"?"":f} Todo`}),$.map(P=>C.jsx(dA,{todo:P,showBranch:p},P.id))]})]})}function vw({title:e,initial:t="",submitLabel:n="保存评论",onSave:i,onCancel:o}){const[l,a]=te.useState(t),[c,f]=te.useState(!1),h=te.useRef(null);te.useEffect(()=>{h.current?.focus()},[]);const p=async()=>{if(!(!l.trim()||c)){f(!0);try{await i(l)}finally{f(!1)}}};return C.jsxs("div",{className:"comment-editor",onMouseDown:m=>m.stopPropagation(),children:[C.jsx("div",{className:"comment-editor-head",children:e}),C.jsx("textarea",{ref:h,value:l,onChange:m=>a(m.target.value),placeholder:"写评论,支持 Markdown。Ctrl+Enter 保存,Esc 取消。",rows:4,onKeyDown:m=>{(m.ctrlKey||m.metaKey)&&m.key==="Enter"?(m.preventDefault(),p()):m.key==="Escape"&&(m.preventDefault(),o()),m.stopPropagation()}}),C.jsxs("div",{className:"comment-editor-actions",children:[C.jsx("button",{className:"primary",onClick:()=>{p()},disabled:!l.trim()||c,children:n}),C.jsx("button",{onClick:o,children:"取消"})]})]})}function ng(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function pA(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"numeric",day:"numeric"})}function mA(e){const t=Dn(e);return t?t.kind==="working"?"Unstaged":t.kind==="staged"?"Staged":t.kind==="all"?"All":og(t):e}function rg({comment:e,showSnippet:t=!1,showFile:n=!1}){const i=W(S=>S.updateComment),o=W(S=>S.deleteComment),l=W(S=>S.exportComments),a=W(S=>S.selectedCommentIds.includes(e.id)),c=W(S=>S.toggleSelectComment),f=W(S=>S.setReattaching),h=W(S=>S.reattaching===e.id),p=W(S=>S.focusedCommentId===e.id),m=W(S=>S.focusComment),w=W(S=>S.targetKey),[v,k]=te.useState(!1),b=e.startLine===e.endLine?`${e.startLine}`:`${e.startLine}-${e.endLine}`,E=e.status!=="orphaned"&&e.targetKey!==w?mA(e.targetKey):null;return C.jsxs("div",{className:`comment-card status-${e.status} ${a?"selected":""} ${p?"focused":""} ${h?"reattaching":""}`,onClick:()=>{p||m(e.id)},children:[C.jsxs("div",{className:"comment-head",children:[n&&C.jsx("span",{className:"mono file",title:e.filePath,children:e.filePath.split("/").pop()}),C.jsx("label",{className:"check",title:"选中以创建 / 关联 Issue",onClick:S=>S.stopPropagation(),children:C.jsx("input",{type:"checkbox",checked:a,onChange:()=>c(e.id)})}),C.jsxs("span",{className:"mono",children:[e.side," ",b]}),C.jsx("span",{className:`badge badge-${e.status}`,children:e.status}),E&&C.jsx("span",{className:"badge",title:`这条评论现在位于 ${e.targetKey},点击卡片可跳转`,children:E}),C.jsx("span",{className:"muted time",title:`created ${ng(e.createdAt)}${e.exportedAt?`
|
|
192
|
+
exported ${ng(e.exportedAt)}`:""}`,children:pA(e.updatedAt)}),C.jsxs("span",{className:"card-actions",children:[e.status==="orphaned"&&C.jsx("button",{className:`link ${h?"active":""}`,onClick:S=>{S.stopPropagation(),f(h?null:e.id)},children:h?"取消重附着":"重新附着"}),C.jsx("button",{className:"link",onClick:S=>{S.stopPropagation(),l([e.id])},title:"复制此条评论",children:"复制"}),C.jsx("button",{className:"link",onClick:S=>{S.stopPropagation(),k(!0)},children:"编辑"}),C.jsx("button",{className:"link danger",onClick:S=>{S.stopPropagation(),window.confirm("删除这条评论?")&&o(e.id)},children:"删除"})]})]}),(t||e.status==="orphaned")&&e.codeSnippet.length>0&&C.jsx("pre",{className:"snippet",children:e.codeSnippet.map((S,I)=>C.jsxs("div",{children:[C.jsx("span",{className:"ln",children:e.startLine+I}),S]},I))}),v?C.jsx(vw,{title:"编辑评论",initial:e.body,onSave:async S=>{await i(e.id,{body:S}),k(!1)},onCancel:()=>k(!1)}):C.jsx(bf,{text:e.body})]})}function ig(e){return[e.filePath,e.side==="old"?0:1,e.endLine]}function gc(e,t){const[n,i,o]=ig(e),[l,a,c]=ig(t);return n!==l?n<l?-1:1:o!==c?o-c:i-a}function gA(){const e=W(P=>P.comments),t=W(P=>P.activeFile),n=W(P=>P.railFilter),i=W(P=>P.setRailFilter),o=W(P=>P.editor),l=W(P=>P.setEditor),a=W(P=>P.createComment),c=W(P=>P.copyAllComments),f=W(P=>P.includeExported),h=W(P=>P.setIncludeExported),p=W(P=>P.selectedCommentIds),m=W(P=>P.setPanel),w=W(P=>P.reattaching),v=W(P=>P.setReattaching),k=te.useMemo(()=>({file:e.filter(P=>P.filePath===t).length,all:e.length,unexported:e.filter(P=>P.status==="active").length,orphaned:e.filter(P=>P.status==="orphaned").length}),[e,t]),b=te.useMemo(()=>{let P=e;n==="file"?P=P.filter(oe=>oe.filePath===t):n==="unexported"&&(P=P.filter(oe=>oe.status==="active"));const L=P.filter(oe=>oe.status==="orphaned").sort(gc),Q=P.filter(oe=>oe.status!=="orphaned").sort(gc);return{orphaned:L,attached:Q}},[e,n,t]),E=te.useMemo(()=>{if(!o||n==="file"&&o.filePath!==t)return-1;const P={filePath:o.filePath,side:o.side,endLine:o.endLine};let L=0;for(;L<b.attached.length&&gc(b.attached[L],P)<=0;)L++;return L},[o,b.attached,n,t]),S=k.unexported+(f?e.filter(P=>P.status==="exported").length:0),I=n!=="file",A=[["file","此文件",k.file],["all","全部",k.all],["unexported","未导出",k.unexported]],$=o&&C.jsx(vw,{title:`新评论 · ${o.filePath.split("/").pop()} ${o.side} ${o.startLine===o.endLine?o.startLine:`${o.startLine}-${o.endLine}`}`,onSave:async P=>{await a({filePath:o.filePath,side:o.side,startLine:o.startLine,endLine:o.endLine,body:P})},onCancel:()=>l(null)},`${o.filePath}:${o.side}:${o.startLine}:${o.endLine}`);return C.jsxs("aside",{className:"rail",children:[C.jsxs("div",{className:"rail-head",children:[C.jsxs("strong",{children:["评论 ",k.all]}),C.jsx("div",{className:"seg small",children:A.map(([P,L,Q])=>C.jsxs("button",{className:n===P?"active":"",onClick:()=>i(P),children:[L," ",Q]},P))}),C.jsx("span",{className:"spacer"}),k.orphaned>0&&C.jsxs("span",{className:"badge badge-orphaned",children:[k.orphaned," orphaned"]})]}),w&&C.jsxs("div",{className:"rail-notice",children:["在 diff 中点击或拖选行,把评论附着到该位置。",C.jsx("button",{className:"link",onClick:()=>v(null),children:"取消"})]}),C.jsxs("div",{className:"rail-list",children:[b.orphaned.map(P=>C.jsx(rg,{comment:P,showFile:I},P.id)),b.attached.map((P,L)=>C.jsxs("div",{className:"rail-slot",children:[E===L&&$,C.jsx(rg,{comment:P,showFile:I})]},P.id)),o&&E===b.attached.length&&$,o&&E===-1&&$,k.all===0&&!o&&C.jsxs("div",{className:"muted empty",children:["还没有评论。在 diff 行旁点击 ",C.jsx("span",{className:"add-btn static",children:"+"})," 或拖选多行开始。"]}),k.all>0&&b.orphaned.length+b.attached.length===0&&!o&&C.jsx("div",{className:"muted empty",children:"没有符合筛选的评论"})]}),C.jsxs("div",{className:"rail-foot",children:[C.jsxs("div",{className:"rail-foot-row",children:[C.jsxs("button",{className:"primary",onClick:()=>{c()},disabled:S===0,children:["复制评论",k.unexported>0?` (${k.unexported} 未导出)`:""]}),C.jsxs("label",{className:"check",children:[C.jsx("input",{type:"checkbox",checked:f,onChange:P=>h(P.target.checked)}),"含已导出"]})]}),p.length>0&&C.jsxs("button",{className:"accent",onClick:()=>m("issues"),children:["从 ",p.length," 条选中评论创建 Issue"]})]})]})}function yA(){const e=W(t=>t.toast);return e?C.jsx("div",{className:`toast toast-${e.kind}`,role:"status",children:e.message}):null}function wA(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"?e.type!=="checkbox":t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function vA(e){const t=Dn(e.targetKey);if(!t||!dr(t))return e.files.map(l=>({view:e.targetKey,path:l.path}));const n=t.worktree?{worktree:t.worktree}:{},i=zn({kind:"working",...n}),o=zn({kind:"staged",...n});return[...e.unstaged.map(l=>({view:i,path:l.path})),...e.staged.map(l=>({view:o,path:l.path}))]}function kA(){const e=W(l=>l.init),t=W(l=>l.initError),n=W(l=>l.repo),i=W(l=>l.panel),o=W(l=>l.root);return te.useEffect(()=>{e()},[e]),te.useEffect(()=>{if(!o)return;const l=$e.events(o);let a=!1;const c=f=>{try{W.getState().onRepoChanged(JSON.parse(f.data))}catch{}};return l.addEventListener("changed",c),l.onopen=()=>{a&&(a=!1,W.getState().refresh())},l.onerror=()=>{a=!0},()=>{l.removeEventListener("changed",c),l.close()}},[o]),te.useEffect(()=>{const l=a=>{if(a.ctrlKey||a.metaKey||a.altKey||wA(a.target))return;const c=W.getState();if(a.key==="r")a.preventDefault(),c.refresh();else if(a.key==="j"||a.key==="k"){if(c.panel!=="diff")return;const f=vA(c);if(f.length===0)return;a.preventDefault();let h=f.findIndex(w=>w.path===c.activeFile&&w.view===c.targetKey);h<0&&(h=f.findIndex(w=>w.path===c.activeFile));const p=a.key==="j"?Math.min(f.length-1,h+1):Math.max(0,h-1),m=f[p];if(!m)return;(async()=>(m.view!==c.targetKey&&await c.switchView(m.view,m.path),await c.openFile(m.path)))()}else a.key==="Escape"&&(c.reattaching?c.setReattaching(null):c.editor?c.setEditor(null):c.focusedCommentId?c.focusComment(null):c.panel!=="diff"&&c.setPanel("diff"))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[]),t?C.jsxs("div",{className:"fatal",children:[C.jsx("h1",{children:"warden"}),C.jsxs("p",{children:["无法连接服务端:",t]}),C.jsx("button",{onClick:()=>{e()},children:"重试"})]}):n?C.jsxs("div",{className:"app",children:[C.jsx(Pk,{}),C.jsxs("div",{className:"body",children:[C.jsx(Ok,{}),C.jsx("main",{className:"main",children:i==="commits"?C.jsx(QC,{}):C.jsx(KC,{})}),i==="issues"?C.jsx(cA,{}):i==="todos"?C.jsx(hA,{}):i==="diff"?C.jsx(gA,{}):null]}),C.jsx(yA,{})]}):C.jsx("div",{className:"loading-screen",children:"加载中…"})}const kw=document.getElementById("root");if(!kw)throw new Error("#root missing");Sk.createRoot(kw).render(C.jsx(vs.StrictMode,{children:C.jsx(kA,{})}));
|