@sleep2agi/agent-network 2.3.0-preview.75 → 2.3.0-preview.76
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.
- package/dist/bin/cli.js +2 -2
- package/dist/src/cli-version-display.d.ts +16 -0
- package/dist/src/client.js +1 -1
- package/dist/src/daemon-runtime-staleness.d.ts +13 -0
- package/dist/src/display-width.d.ts +27 -0
- package/dist/src/doctor-node-count.d.ts +28 -0
- package/dist/src/grok-build-drift.d.ts +15 -0
- package/dist/src/hub-time-display.d.ts +20 -0
- package/dist/src/hub-version-skew.d.ts +19 -0
- package/dist/src/im/feishu/worker.js +1 -1
- package/dist/src/local-process-state.d.ts +12 -0
- package/dist/src/ls-columns.d.ts +15 -0
- package/dist/src/node-not-found.d.ts +1 -0
- package/dist/src/node-server.js +7 -7
- package/dist/src/offline-age.d.ts +29 -0
- package/dist/src/one-line-cell.d.ts +20 -0
- package/dist/src/opencode-agent-node-pair.d.ts +6 -6
- package/dist/src/session-status-class.d.ts +30 -0
- package/dist/src/subcommand-redirect.d.ts +26 -0
- package/dist/src/windows-codex-copresence.d.ts +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1645 —— `anet doctor` 原先对三个 runtime CLI **只检查「在不在」**:
|
|
3
|
+
*
|
|
4
|
+
* try { execSync("codex --version", …); check("Codex CLI", true); } catch { … }
|
|
5
|
+
*
|
|
6
|
+
* 于是一个**装着、但太旧**的 CLI 会拿到一个 ✅。实测过一次:`codex-cli 0.149.1`
|
|
7
|
+
* 解不动上游 models 响应(`unknown variant \`max\``,它只认到 `xhigh`),
|
|
8
|
+
* rmcp worker 致命退出,用户看到的是 300s 超时 —— 而 doctor 说一切正常。
|
|
9
|
+
*
|
|
10
|
+
* 🔴 **这里只把版本摆出来,不做最低版本判定。**
|
|
11
|
+
* 「多少版本才够」由上游返回什么决定,不是我们能钉死的常量;猜一个下限,
|
|
12
|
+
* 会在别人升级 CLI、上游又改动之后变成误报。而一个会误报的检查,
|
|
13
|
+
* 第一周就会被人关掉。摆出实际版本,让读的人自己对得上号,是这一格
|
|
14
|
+
* 现在能诚实做到的全部。
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatCliVersion(raw: unknown): string;
|
package/dist/src/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a0_0x12b9ba=a0_0x5346;(function(_0x2defa4,_0x471f48){const _0x682c1d=a0_0x5346,_0x797fa0=_0x2defa4();while(!![]){try{const _0x14734a=parseInt(_0x682c1d(0x115))/0x1*(-parseInt(_0x682c1d(0xcb))/0x2)+-parseInt(_0x682c1d(0x119))/0x3*(parseInt(_0x682c1d(0xc1))/0x4)+parseInt(_0x682c1d(0xbe))/0x5*(parseInt(_0x682c1d(0xc9))/0x6)+-parseInt(_0x682c1d(0xa4))/0x7+parseInt(_0x682c1d(0xc0))/0x8*(parseInt(_0x682c1d(0xd6))/0x9)+-parseInt(_0x682c1d(0xfd))/0xa*(-parseInt(_0x682c1d(0xf4))/0xb)+-parseInt(_0x682c1d(0x11e))/0xc*(-parseInt(_0x682c1d(0xf1))/0xd);if(_0x14734a===_0x471f48)break;else _0x797fa0['push'](_0x797fa0['shift']());}catch(_0x1fa61d){_0x797fa0['push'](_0x797fa0['shift']());}}}(a0_0x4802,0xb2042));import{EventEmitter as a0_0x2f78a4}from'events';import{hostname as a0_0x434e4e}from'os';var K=/(?:atok|ntok|utok|ghp|github_pat)_[A-Za-z0-9_-]+|Bearer\s+\S+/gi,L=(_0x16f11d,_0x494088)=>(_0x16f11d??_0x494088)[a0_0x12b9ba(0x116)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[a0_0x12b9ba(0x109)](0x0,0xf0);function a0_0x5346(_0x5f2c77,_0xb38c9c){_0x5f2c77=_0x5f2c77-0xa3;const _0x48025e=a0_0x4802();let _0x53461c=_0x48025e[_0x5f2c77];return _0x53461c;}function N(_0x302df6){const _0x32b1b6=a0_0x12b9ba;return(_0x302df6 instanceof Error?_0x302df6[_0x32b1b6(0xea)]:String(_0x302df6??_0x32b1b6(0x10f)))[_0x32b1b6(0x116)](K,_0x32b1b6(0xe4))['replace'](/[\r\n\x00-\x1f\x7f]/g,'\x20')[_0x32b1b6(0x109)](0x0,0xf0);}function O(_0x5ce31b,_0x4b250e=process.env.ANET_TASK_TRACE_FORMAT===a0_0x12b9ba(0xce)){const _0x4802cf=a0_0x12b9ba;if(_0x4b250e)return JSON[_0x4802cf(0xa3)](_0x5ce31b);let _0x11f626=L(_0x5ce31b['parent_task_id'],'<missing>'),_0x5e4b23=L(_0x5ce31b['task_id'],_0x4802cf(0xa5)),_0x50c13a=_0x5ce31b['error_code']?_0x4802cf(0xb6)+_0x5ce31b[_0x4802cf(0x10d)]+':'+(_0x5ce31b[_0x4802cf(0xed)]??''):'';return'[commhub:task]\x20'+_0x5ce31b['status']+'\x20from='+L(_0x5ce31b[_0x4802cf(0x10b)],_0x4802cf(0x10c))+_0x4802cf(0x105)+L(_0x5ce31b[_0x4802cf(0xb8)],_0x4802cf(0x10c))+_0x4802cf(0x125)+_0x5e4b23+_0x4802cf(0xb4)+_0x11f626+_0x4802cf(0x11f)+L(_0x5ce31b[_0x4802cf(0xc5)],_0x4802cf(0x10c))+_0x4802cf(0xe0)+_0x5ce31b['transport']+_0x4802cf(0x123)+_0x5ce31b[_0x4802cf(0x112)]+_0x4802cf(0xe7)+_0x5ce31b[_0x4802cf(0xfe)]+_0x50c13a;}function U(_0x247692){const _0x397bb1=a0_0x12b9ba;return{'event':{'sending':_0x397bb1(0xe8),'delivered':_0x397bb1(0xfa),'failed':_0x397bb1(0xb1),'acked':_0x397bb1(0xe1),'started':_0x397bb1(0x12a),'replied':_0x397bb1(0x127),'expired':_0x397bb1(0xeb)}[_0x247692['status']],..._0x247692};}function j(_0x1901f7){const _0x2e638f=a0_0x12b9ba;let _0x3374d3=_0x1901f7?.[_0x2e638f(0xee)]||_0x1901f7?.[_0x2e638f(0x100)]||_0x1901f7?.['id'];if(_0x3374d3)return String(_0x3374d3);let _0x4e80e8=_0x1901f7?.[_0x2e638f(0xf7)]?.[0x0]?.[_0x2e638f(0x114)];if(typeof _0x4e80e8!==_0x2e638f(0x113))return null;try{let _0x1f4e33=JSON[_0x2e638f(0xc4)](_0x4e80e8);return _0x1f4e33?.[_0x2e638f(0xee)]||_0x1f4e33?.[_0x2e638f(0x100)]||_0x1f4e33?.['id']||null;}catch{return null;}}function a0_0x4802(){const _0x2262bc=['get_inbox','SSE\x20reconnecting\x20in\x20','token','resumeId','/mcp','sdk','tools/call','signal','server','task.send.failed','sseAbort','min','\x20parent_task_id=','text/event-stream','\x20error=','reconnectDelay','to_alias','broadcast','lifecycleTracking','normal','url','toString','5346475rrMrUM','autoConnect','1854768yfhgCm','52qoKWCe','CommHub\x20response\x20omitted\x20task_id','log','parse','network_id','getReader','report_status','sleep','6DejKRm','CommHub\x20rejected\x20task','700822qXFMCh','messages','status','json','catch','error','match','heartbeatInterval','body','startsWith','pop','36NkbWZs','new_task','2.0','heartbeat\x20failed:\x20','networkId','send_rejected','send','Authorization','failed','send_task','\x20transport=','task.ack',']\x20[commhub:','from_session','[REDACTED]','transport','disconnect','\x20lifecycle=','task.send.start','connectSSE','message','task.expired','s...','error_message','task_id','parentTaskId','result','91nIdPgs','send_failed','sdk-','827233dBECIL','task','send_message','content','registered','decode','task.send.delivered','fromAlias','application/json','130xwVPAs','lifecycle_tracking','cwd','message_id','connect','get_all_status','heartbeatTimer','emit','\x20to=','alias','sending','abort','slice','ack_inbox','from_alias','<unknown>','error_code','type','unknown\x20error','Bearer\x20','missing_task_id','duration_ms','string','text','4RSkNIa','replace','now','disconnected','77793ZAwjbt','mcp_http','not_tracked','send_reply','agent','674484zsezYs','\x20network_id=','completed','application/json,\x20text/event-stream','SSE\x20failed:\x20','\x20duration_ms=','running','\x20task_id=','split','task.replied','reply','processInbox','task.started','stringify','6299062XQmOmJ','<pending>','delivered','call'];a0_0x4802=function(){return _0x2262bc;};return a0_0x4802();}async function X(_0x1b75e0,_0x30c7df){const _0xe5af24=a0_0x12b9ba;let _0x54348d=_0x30c7df[_0xe5af24(0x117)]??Date['now'],_0x31bb3d=_0x54348d(),_0x21774b=(_0x88cddd,_0x114e9e,_0x417a4c,_0x4bfa68)=>{const _0x2d630a=_0xe5af24;_0x30c7df[_0x2d630a(0xc3)](O(U({'from_alias':_0x1b75e0[_0x2d630a(0xfb)],'to_alias':_0x1b75e0['toAlias'],'task_id':_0x114e9e,'parent_task_id':_0x1b75e0[_0x2d630a(0xef)],'network_id':_0x1b75e0['networkId'],'transport':_0x1b75e0[_0x2d630a(0xe5)],'status':_0x88cddd,'duration_ms':_0x54348d()-_0x31bb3d,'lifecycle_tracking':_0x1b75e0[_0x2d630a(0xba)],..._0x417a4c!==void 0x0?{'error_code':_0x4bfa68||'send_failed','error_message':N(_0x417a4c)}:{}})));};_0x21774b(_0xe5af24(0x107),null);try{let _0x59c065=await _0x30c7df[_0xe5af24(0xdc)](),_0x176d9c=j(_0x59c065);if(_0x176d9c)_0x21774b(_0xe5af24(0xa6),_0x176d9c);else{if(_0x59c065?.['ok']===!0x1||_0x59c065?.[_0xe5af24(0xd0)])_0x21774b(_0xe5af24(0xde),_0x176d9c,_0x59c065?.[_0xe5af24(0xd0)]||_0xe5af24(0xca),_0xe5af24(0xdb));else _0x21774b(_0xe5af24(0xde),null,_0xe5af24(0xc2),_0xe5af24(0x111));}return _0x59c065;}catch(_0x12a316){throw _0x21774b(_0xe5af24(0xde),null,_0x12a316,_0xe5af24(0xf2)),_0x12a316;}}async function Y(_0x5aef81,_0x1284d3){const _0x3535b8=a0_0x12b9ba;return X({'fromAlias':_0x5aef81[_0x3535b8(0xfb)],'toAlias':_0x5aef81['alias'],'parentTaskId':_0x5aef81[_0x3535b8(0xef)]||null,'networkId':_0x5aef81[_0x3535b8(0xda)]||null,'transport':_0x3535b8(0x11a),'lifecycleTracking':_0x3535b8(0x11b)},_0x1284d3);}class $ extends a0_0x2f78a4{[a0_0x12b9ba(0xbc)];['alias'];['token'];[a0_0x12b9ba(0x11d)];[a0_0x12b9ba(0xab)];[a0_0x12b9ba(0xd2)];[a0_0x12b9ba(0xb7)];[a0_0x12b9ba(0x103)];[a0_0x12b9ba(0xb2)];['running']=!0x1;constructor(_0x1c2ff0){const _0x4f8077=a0_0x12b9ba;super();if(this['url']=_0x1c2ff0['url']['replace'](/\/$/,''),this[_0x4f8077(0x106)]=_0x1c2ff0['alias'],this[_0x4f8077(0xaa)]=_0x1c2ff0[_0x4f8077(0xaa)],this[_0x4f8077(0x11d)]=_0x1c2ff0[_0x4f8077(0x11d)]||_0x4f8077(0xad),this[_0x4f8077(0xab)]=_0x4f8077(0xf3)+_0x1c2ff0[_0x4f8077(0x106)]+'-'+Date['now']()[_0x4f8077(0xbd)](0x24),this[_0x4f8077(0xd2)]=_0x1c2ff0[_0x4f8077(0xd2)]??0x2bf20,this[_0x4f8077(0xb7)]=_0x1c2ff0[_0x4f8077(0xb7)]??0xbb8,_0x1c2ff0[_0x4f8077(0xbf)]!==!0x1)this[_0x4f8077(0x101)]();}[a0_0x12b9ba(0xc3)](_0x5ef8c7){const _0x23ee5c=a0_0x12b9ba;console[_0x23ee5c(0xc3)]('['+new Date()['toTimeString']()['slice'](0x0,0x8)+_0x23ee5c(0xe2)+this[_0x23ee5c(0x106)]+']\x20'+_0x5ef8c7);}async[a0_0x12b9ba(0xa7)](_0x4ce778,_0x2fde74){const _0x186667=a0_0x12b9ba;let _0x49f5ca={'Content-Type':_0x186667(0xfc),'Accept':_0x186667(0x121)};if(this[_0x186667(0xaa)])_0x49f5ca[_0x186667(0xdd)]=_0x186667(0x110)+this[_0x186667(0xaa)];let _0x54d4c5=await(await fetch(this['url']+_0x186667(0xac),{'method':'POST','headers':_0x49f5ca,'body':JSON[_0x186667(0xa3)]({'jsonrpc':_0x186667(0xd8),'id':Date['now'](),'method':_0x186667(0xae),'params':{'name':_0x4ce778,'arguments':_0x2fde74}})}))[_0x186667(0x114)](),_0x280613=_0x54d4c5[_0x186667(0xd1)](/data: (.+)/),_0x3a5414=_0x280613?JSON['parse'](_0x280613[0x1]):JSON[_0x186667(0xc4)](_0x54d4c5),_0x24e917=_0x3a5414?.[_0x186667(0xf0)]?.['content']?.[0x0]?.[_0x186667(0x114)];return _0x24e917?JSON[_0x186667(0xc4)](_0x24e917):_0x3a5414;}async[a0_0x12b9ba(0x101)](){const _0x4ad070=a0_0x12b9ba;if(this['running'])return;this[_0x4ad070(0x124)]=!0x0,await this[_0x4ad070(0xcd)]('idle'),this[_0x4ad070(0xc3)](_0x4ad070(0xf8)),this[_0x4ad070(0x103)]=setInterval(()=>{const _0x5a9243=_0x4ad070;this[_0x5a9243(0xcd)]('idle')[_0x5a9243(0xcf)](_0x4b8a3c=>this[_0x5a9243(0xc3)](_0x5a9243(0xd9)+_0x4b8a3c['message']));},this[_0x4ad070(0xd2)]),this['connectSSE']();}async[a0_0x12b9ba(0xe6)](){const _0x299cfd=a0_0x12b9ba;if(this['running']=!0x1,this[_0x299cfd(0xb2)]?.[_0x299cfd(0x108)](),this[_0x299cfd(0x103)])clearInterval(this[_0x299cfd(0x103)]);await this[_0x299cfd(0xcd)]('offline')[_0x299cfd(0xcf)](()=>{}),this['log'](_0x299cfd(0x118));}async[a0_0x12b9ba(0xdc)](_0x166022,_0x250652,_0x3b991e=a0_0x12b9ba(0xbb)){const _0x5e4ff1=a0_0x12b9ba;return Y({'alias':_0x166022,'fromAlias':this[_0x5e4ff1(0x106)]},{'log':_0x235b7f=>console[_0x5e4ff1(0xc3)](_0x235b7f),'send':()=>this[_0x5e4ff1(0xa7)](_0x5e4ff1(0xdf),{'alias':_0x166022,'task':_0x250652,'priority':_0x3b991e,'from_session':this[_0x5e4ff1(0x106)]})});}async['message'](_0x5b84c9,_0xcc8f67){const _0x126a27=a0_0x12b9ba;return this[_0x126a27(0xa7)](_0x126a27(0xf6),{'alias':_0x5b84c9,'message':_0xcc8f67,'from_session':this[_0x126a27(0x106)]});}async[a0_0x12b9ba(0x128)](_0x4e6286,_0x1bec3a,_0x2951ac=a0_0x12b9ba(0x120)){const _0x23b8f5=a0_0x12b9ba;return this[_0x23b8f5(0xa7)](_0x23b8f5(0x11c),{'in_reply_to':_0x4e6286,'text':_0x1bec3a,'status':_0x2951ac});}async[a0_0x12b9ba(0xcd)](_0x523fdb,_0x16e303){const _0x1b0e3f=a0_0x12b9ba;return this[_0x1b0e3f(0xa7)](_0x1b0e3f(0xc7),{'resume_id':this[_0x1b0e3f(0xab)],'alias':this[_0x1b0e3f(0x106)],'status':_0x523fdb,'server':a0_0x434e4e(),'hostname':a0_0x434e4e(),'agent':this[_0x1b0e3f(0x11d)],'project_dir':process[_0x1b0e3f(0xff)](),..._0x16e303});}async['getAllStatus'](){const _0x8c3b91=a0_0x12b9ba;return this[_0x8c3b91(0xa7)](_0x8c3b91(0x102),{});}async[a0_0x12b9ba(0xb9)](_0x47106d,_0x1de764){const _0x255653=a0_0x12b9ba;return this[_0x255653(0xa7)](_0x255653(0xb9),{'message':_0x47106d,'filter_server':_0x1de764?.[_0x255653(0xb0)],'filter_status':_0x1de764?.[_0x255653(0xcd)]});}async[a0_0x12b9ba(0xe9)](){const _0x15a02f=a0_0x12b9ba;let _0x569b14=encodeURIComponent(this['alias']),_0x4cbedd=this['url']+'/events/'+_0x569b14,_0x516b34=this[_0x15a02f(0xb7)];while(this[_0x15a02f(0x124)]){try{this[_0x15a02f(0xb2)]=new AbortController();let _0x5cdab1={'Accept':_0x15a02f(0xb5)};if(this[_0x15a02f(0xaa)])_0x5cdab1[_0x15a02f(0xdd)]=_0x15a02f(0x110)+this[_0x15a02f(0xaa)];let _0x357397=await fetch(_0x4cbedd,{'headers':_0x5cdab1,'signal':this[_0x15a02f(0xb2)][_0x15a02f(0xaf)]});if(!_0x357397['ok']||!_0x357397[_0x15a02f(0xd3)]){this[_0x15a02f(0xc3)](_0x15a02f(0x122)+_0x357397['status']),await this[_0x15a02f(0xc8)](_0x516b34),_0x516b34=Math[_0x15a02f(0xb3)](_0x516b34*1.5,0xea60);continue;}_0x516b34=this[_0x15a02f(0xb7)];let _0x3fd4cd=_0x357397[_0x15a02f(0xd3)][_0x15a02f(0xc6)](),_0x563931=new TextDecoder(),_0x1b72b7='';while(this[_0x15a02f(0x124)]){let {done:_0x1ab70a,value:_0x439e7e}=await _0x3fd4cd['read']();if(_0x1ab70a)break;_0x1b72b7+=_0x563931[_0x15a02f(0xf9)](_0x439e7e,{'stream':!0x0});let _0x4cf973=_0x1b72b7[_0x15a02f(0x126)]('\x0a');_0x1b72b7=_0x4cf973[_0x15a02f(0xd5)]()||'';for(let _0x4af73c of _0x4cf973){if(!_0x4af73c[_0x15a02f(0xd4)]('data:\x20'))continue;try{let _0x1a1371=JSON[_0x15a02f(0xc4)](_0x4af73c[_0x15a02f(0x109)](0x6));if(_0x1a1371['type']==='connected'){this[_0x15a02f(0xc3)]('SSE\x20connected'),this[_0x15a02f(0x104)]('connected');continue;}if(_0x1a1371[_0x15a02f(0x10e)]===_0x15a02f(0xd7)||_0x1a1371[_0x15a02f(0x10e)]==='new_message'||_0x1a1371[_0x15a02f(0x10e)]==='broadcast')await this[_0x15a02f(0x129)]();}catch{}}}}catch(_0x354292){if(_0x354292['name']==='AbortError')break;this['emit'](_0x15a02f(0xd0),_0x354292),this[_0x15a02f(0xc3)]('SSE\x20error:\x20'+_0x354292[_0x15a02f(0xea)]);}if(this['running'])this['emit'](_0x15a02f(0x118)),this[_0x15a02f(0xc3)](_0x15a02f(0xa9)+_0x516b34/0x3e8+_0x15a02f(0xec)),await this['sleep'](_0x516b34),_0x516b34=Math['min'](_0x516b34*1.5,0xea60);}}async['processInbox'](){const _0x1801fd=a0_0x12b9ba;try{let _0x4d0fce=(await this[_0x1801fd(0xa7)](_0x1801fd(0xa8),{'alias':this[_0x1801fd(0x106)],'limit':0xa}))?.[_0x1801fd(0xcc)]||[];for(let _0x8cdb1e of _0x4d0fce)await this[_0x1801fd(0xa7)](_0x1801fd(0x10a),{'alias':this['alias'],'message_id':_0x8cdb1e['id']}),this[_0x1801fd(0xc3)]('←\x20'+_0x8cdb1e[_0x1801fd(0xe3)]+':\x20'+_0x8cdb1e[_0x1801fd(0xf7)][_0x1801fd(0x109)](0x0,0x3c)),this[_0x1801fd(0x104)](_0x1801fd(0xf5),_0x8cdb1e),this[_0x1801fd(0x104)](_0x1801fd(0xea),_0x8cdb1e);}catch(_0x3cde1c){this[_0x1801fd(0xc3)]('inbox\x20error:\x20'+_0x3cde1c[_0x1801fd(0xea)]);}}[a0_0x12b9ba(0xc8)](_0x3f3844){return new Promise(_0x4d3e86=>setTimeout(_0x4d3e86,_0x3f3844));}}var F=$;export{F as default,$ as CommHub};
|
|
1
|
+
const a0_0x5b5018=a0_0x1f56;(function(_0x4c94d9,_0x200b90){const _0x552650=a0_0x1f56,_0x3855a5=_0x4c94d9();while(!![]){try{const _0x4ceeeb=parseInt(_0x552650(0x1e7))/0x1+parseInt(_0x552650(0x1a9))/0x2*(parseInt(_0x552650(0x191))/0x3)+parseInt(_0x552650(0x1d3))/0x4+-parseInt(_0x552650(0x1ec))/0x5*(-parseInt(_0x552650(0x1b5))/0x6)+-parseInt(_0x552650(0x1fe))/0x7*(-parseInt(_0x552650(0x1c1))/0x8)+-parseInt(_0x552650(0x1d1))/0x9*(parseInt(_0x552650(0x1a1))/0xa)+-parseInt(_0x552650(0x1da))/0xb;if(_0x4ceeeb===_0x200b90)break;else _0x3855a5['push'](_0x3855a5['shift']());}catch(_0x10381c){_0x3855a5['push'](_0x3855a5['shift']());}}}(a0_0x1d78,0x4102e));import{EventEmitter as a0_0x3a5e97}from'events';import{hostname as a0_0x346293}from'os';var K=/(?:atok|ntok|utok|ghp|github_pat)_[A-Za-z0-9_-]+|Bearer\s+\S+/gi,L=(_0x179c3f,_0x4b399e)=>(_0x179c3f??_0x4b399e)[a0_0x5b5018(0x192)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[a0_0x5b5018(0x1ef)](0x0,0xf0);function N(_0x181808){const _0x26ad3a=a0_0x5b5018;return(_0x181808 instanceof Error?_0x181808[_0x26ad3a(0x1cf)]:String(_0x181808??_0x26ad3a(0x1fb)))['replace'](K,'[REDACTED]')[_0x26ad3a(0x192)](/[\r\n\x00-\x1f\x7f]/g,'\x20')[_0x26ad3a(0x1ef)](0x0,0xf0);}function O(_0x538dc5,_0x32b550=process.env.ANET_TASK_TRACE_FORMAT===a0_0x5b5018(0x1be)){const _0xbda320=a0_0x5b5018;if(_0x32b550)return JSON[_0xbda320(0x1ad)](_0x538dc5);let _0x56bf12=L(_0x538dc5[_0xbda320(0x208)],_0xbda320(0x1f1)),_0x56d14f=L(_0x538dc5[_0xbda320(0x1d4)],_0xbda320(0x1c9)),_0x97629d=_0x538dc5[_0xbda320(0x1d2)]?_0xbda320(0x1f2)+_0x538dc5[_0xbda320(0x1d2)]+':'+(_0x538dc5['error_message']??''):'';return _0xbda320(0x1ae)+_0x538dc5[_0xbda320(0x196)]+_0xbda320(0x1a4)+L(_0x538dc5[_0xbda320(0x1eb)],_0xbda320(0x18e))+_0xbda320(0x1a0)+L(_0x538dc5['to_alias'],_0xbda320(0x18e))+'\x20task_id='+_0x56d14f+_0xbda320(0x204)+_0x56bf12+'\x20network_id='+L(_0x538dc5[_0xbda320(0x1f5)],'<unknown>')+_0xbda320(0x1d8)+_0x538dc5[_0xbda320(0x200)]+_0xbda320(0x19d)+_0x538dc5['duration_ms']+_0xbda320(0x199)+_0x538dc5[_0xbda320(0x1cc)]+_0x97629d;}function a0_0x1f56(_0x44d478,_0x3b5d0e){_0x44d478=_0x44d478-0x18d;const _0x1d7851=a0_0x1d78();let _0x1f5687=_0x1d7851[_0x44d478];return _0x1f5687;}function U(_0x49b3c5){const _0x11e7cd=a0_0x5b5018;return{'event':{'sending':'task.send.start','delivered':_0x11e7cd(0x1fc),'failed':_0x11e7cd(0x1ee),'acked':_0x11e7cd(0x1ac),'started':_0x11e7cd(0x1ca),'replied':_0x11e7cd(0x1bd),'expired':_0x11e7cd(0x1e3)}[_0x49b3c5[_0x11e7cd(0x196)]],..._0x49b3c5};}function j(_0x24376d){const _0x2beb78=a0_0x5b5018;let _0x21012f=_0x24376d?.[_0x2beb78(0x1d4)]||_0x24376d?.[_0x2beb78(0x1b6)]||_0x24376d?.['id'];if(_0x21012f)return String(_0x21012f);let _0x578288=_0x24376d?.[_0x2beb78(0x1de)]?.[0x0]?.['text'];if(typeof _0x578288!=='string')return null;try{let _0x50658c=JSON[_0x2beb78(0x198)](_0x578288);return _0x50658c?.[_0x2beb78(0x1d4)]||_0x50658c?.['message_id']||_0x50658c?.['id']||null;}catch{return null;}}async function X(_0x315ef5,_0x58898c){const _0x586d64=a0_0x5b5018;let _0x3d1249=_0x58898c[_0x586d64(0x19a)]??Date['now'],_0xf8018e=_0x3d1249(),_0x2b58a9=(_0x1e023a,_0x3a5cf7,_0x418615,_0x5cdbc8)=>{const _0x5be2c1=_0x586d64;_0x58898c[_0x5be2c1(0x1f8)](O(U({'from_alias':_0x315ef5['fromAlias'],'to_alias':_0x315ef5[_0x5be2c1(0x1d5)],'task_id':_0x3a5cf7,'parent_task_id':_0x315ef5[_0x5be2c1(0x1e8)],'network_id':_0x315ef5[_0x5be2c1(0x1c0)],'transport':_0x315ef5['transport'],'status':_0x1e023a,'duration_ms':_0x3d1249()-_0xf8018e,'lifecycle_tracking':_0x315ef5[_0x5be2c1(0x1f0)],..._0x418615!==void 0x0?{'error_code':_0x5cdbc8||_0x5be2c1(0x1e0),'error_message':N(_0x418615)}:{}})));};_0x2b58a9(_0x586d64(0x1e2),null);try{let _0x51a3e6=await _0x58898c[_0x586d64(0x1dd)](),_0x16dd66=j(_0x51a3e6);if(_0x16dd66)_0x2b58a9(_0x586d64(0x1ff),_0x16dd66);else{if(_0x51a3e6?.['ok']===!0x1||_0x51a3e6?.[_0x586d64(0x1c2)])_0x2b58a9('failed',_0x16dd66,_0x51a3e6?.['error']||_0x586d64(0x19e),'send_rejected');else _0x2b58a9(_0x586d64(0x206),null,_0x586d64(0x1d7),'missing_task_id');}return _0x51a3e6;}catch(_0x304de1){throw _0x2b58a9(_0x586d64(0x206),null,_0x304de1,_0x586d64(0x1e0)),_0x304de1;}}async function Y(_0x53c697,_0x400d02){const _0x139447=a0_0x5b5018;return X({'fromAlias':_0x53c697['fromAlias'],'toAlias':_0x53c697[_0x139447(0x1e4)],'parentTaskId':_0x53c697[_0x139447(0x1e8)]||null,'networkId':_0x53c697['networkId']||null,'transport':_0x139447(0x190),'lifecycleTracking':_0x139447(0x1fd)},_0x400d02);}class $ extends a0_0x3a5e97{[a0_0x5b5018(0x194)];[a0_0x5b5018(0x1e4)];[a0_0x5b5018(0x207)];[a0_0x5b5018(0x19c)];[a0_0x5b5018(0x1aa)];[a0_0x5b5018(0x1ea)];['reconnectDelay'];['heartbeatTimer'];['sseAbort'];[a0_0x5b5018(0x1b3)]=!0x1;constructor(_0x2977dc){const _0x50f77a=a0_0x5b5018;super();if(this[_0x50f77a(0x194)]=_0x2977dc['url']['replace'](/\/$/,''),this['alias']=_0x2977dc[_0x50f77a(0x1e4)],this['token']=_0x2977dc['token'],this[_0x50f77a(0x19c)]=_0x2977dc[_0x50f77a(0x19c)]||'sdk',this[_0x50f77a(0x1aa)]=_0x50f77a(0x1f6)+_0x2977dc[_0x50f77a(0x1e4)]+'-'+Date['now']()['toString'](0x24),this['heartbeatInterval']=_0x2977dc[_0x50f77a(0x1ea)]??0x2bf20,this[_0x50f77a(0x1f7)]=_0x2977dc[_0x50f77a(0x1f7)]??0xbb8,_0x2977dc[_0x50f77a(0x1f4)]!==!0x1)this[_0x50f77a(0x1c7)]();}[a0_0x5b5018(0x1f8)](_0x428c1c){const _0x1ecf95=a0_0x5b5018;console[_0x1ecf95(0x1f8)]('['+new Date()[_0x1ecf95(0x1d0)]()[_0x1ecf95(0x1ef)](0x0,0x8)+_0x1ecf95(0x1dc)+this[_0x1ecf95(0x1e4)]+']\x20'+_0x428c1c);}async['call'](_0x3d5f9f,_0x8a3e62){const _0x114ed5=a0_0x5b5018;let _0x38ea3c={'Content-Type':'application/json','Accept':'application/json,\x20text/event-stream'};if(this[_0x114ed5(0x207)])_0x38ea3c[_0x114ed5(0x1ab)]=_0x114ed5(0x1c6)+this[_0x114ed5(0x207)];let _0x464b63=await(await fetch(this[_0x114ed5(0x194)]+_0x114ed5(0x18f),{'method':_0x114ed5(0x1b9),'headers':_0x38ea3c,'body':JSON[_0x114ed5(0x1ad)]({'jsonrpc':_0x114ed5(0x1e9),'id':Date['now'](),'method':_0x114ed5(0x1bb),'params':{'name':_0x3d5f9f,'arguments':_0x8a3e62}})}))[_0x114ed5(0x1b0)](),_0x165fe6=_0x464b63[_0x114ed5(0x1cb)](/data: (.+)/),_0x44c99e=_0x165fe6?JSON[_0x114ed5(0x198)](_0x165fe6[0x1]):JSON[_0x114ed5(0x198)](_0x464b63),_0x37b851=_0x44c99e?.[_0x114ed5(0x1c5)]?.[_0x114ed5(0x1de)]?.[0x0]?.[_0x114ed5(0x1b0)];return _0x37b851?JSON[_0x114ed5(0x198)](_0x37b851):_0x44c99e;}async[a0_0x5b5018(0x1c7)](){const _0x44cb1f=a0_0x5b5018;if(this['running'])return;this[_0x44cb1f(0x1b3)]=!0x0,await this[_0x44cb1f(0x196)](_0x44cb1f(0x1d6)),this['log'](_0x44cb1f(0x1bc)),this[_0x44cb1f(0x20a)]=setInterval(()=>{const _0x95180b=_0x44cb1f;this[_0x95180b(0x196)](_0x95180b(0x1d6))[_0x95180b(0x20b)](_0x35e053=>this['log']('heartbeat\x20failed:\x20'+_0x35e053[_0x95180b(0x1cf)]));},this[_0x44cb1f(0x1ea)]),this['connectSSE']();}async['disconnect'](){const _0x4e6cca=a0_0x5b5018;if(this[_0x4e6cca(0x1b3)]=!0x1,this[_0x4e6cca(0x1b4)]?.[_0x4e6cca(0x209)](),this[_0x4e6cca(0x20a)])clearInterval(this['heartbeatTimer']);await this[_0x4e6cca(0x196)](_0x4e6cca(0x1e6))[_0x4e6cca(0x20b)](()=>{}),this[_0x4e6cca(0x1f8)](_0x4e6cca(0x1c4));}async[a0_0x5b5018(0x1dd)](_0x15442e,_0x53a282,_0x4acf7d=a0_0x5b5018(0x1b8)){const _0x4217be=a0_0x5b5018;return Y({'alias':_0x15442e,'fromAlias':this[_0x4217be(0x1e4)]},{'log':_0x5cf6cf=>console[_0x4217be(0x1f8)](_0x5cf6cf),'send':()=>this[_0x4217be(0x1a6)](_0x4217be(0x1ce),{'alias':_0x15442e,'task':_0x53a282,'priority':_0x4acf7d,'from_session':this['alias']})});}async[a0_0x5b5018(0x1cf)](_0x559f15,_0x575fae){return this['call']('send_message',{'alias':_0x559f15,'message':_0x575fae,'from_session':this['alias']});}async[a0_0x5b5018(0x201)](_0x2336e6,_0x26a985,_0x42cf6f='completed'){const _0x1b970e=a0_0x5b5018;return this[_0x1b970e(0x1a6)]('send_reply',{'in_reply_to':_0x2336e6,'text':_0x26a985,'status':_0x42cf6f});}async[a0_0x5b5018(0x196)](_0x164945,_0x5b2cbe){const _0x45a25a=a0_0x5b5018;return this[_0x45a25a(0x1a6)](_0x45a25a(0x197),{'resume_id':this[_0x45a25a(0x1aa)],'alias':this[_0x45a25a(0x1e4)],'status':_0x164945,'server':a0_0x346293(),'hostname':a0_0x346293(),'agent':this['agent'],'project_dir':process[_0x45a25a(0x1cd)](),..._0x5b2cbe});}async[a0_0x5b5018(0x203)](){const _0x31c2f9=a0_0x5b5018;return this[_0x31c2f9(0x1a6)]('get_all_status',{});}async[a0_0x5b5018(0x195)](_0x754ff3,_0x1219fd){const _0x131c38=a0_0x5b5018;return this[_0x131c38(0x1a6)]('broadcast',{'message':_0x754ff3,'filter_server':_0x1219fd?.[_0x131c38(0x193)],'filter_status':_0x1219fd?.[_0x131c38(0x196)]});}async['connectSSE'](){const _0x370ce5=a0_0x5b5018;let _0x1e0768=encodeURIComponent(this[_0x370ce5(0x1e4)]),_0x301dc0=this['url']+_0x370ce5(0x1db)+_0x1e0768,_0x52966f=this['reconnectDelay'];while(this[_0x370ce5(0x1b3)]){try{this[_0x370ce5(0x1b4)]=new AbortController();let _0x2a31cf={'Accept':_0x370ce5(0x19b)};if(this[_0x370ce5(0x207)])_0x2a31cf[_0x370ce5(0x1ab)]='Bearer\x20'+this[_0x370ce5(0x207)];let _0x100cf0=await fetch(_0x301dc0,{'headers':_0x2a31cf,'signal':this[_0x370ce5(0x1b4)][_0x370ce5(0x1a3)]});if(!_0x100cf0['ok']||!_0x100cf0[_0x370ce5(0x18d)]){this['log']('SSE\x20failed:\x20'+_0x100cf0['status']),await this[_0x370ce5(0x1ba)](_0x52966f),_0x52966f=Math[_0x370ce5(0x1c3)](_0x52966f*1.5,0xea60);continue;}_0x52966f=this[_0x370ce5(0x1f7)];let _0x40986f=_0x100cf0[_0x370ce5(0x18d)][_0x370ce5(0x1d9)](),_0x5c8bb4=new TextDecoder(),_0x4154d5='';while(this['running']){let {done:_0x5b54ee,value:_0x6eb12}=await _0x40986f[_0x370ce5(0x1af)]();if(_0x5b54ee)break;_0x4154d5+=_0x5c8bb4[_0x370ce5(0x1e5)](_0x6eb12,{'stream':!0x0});let _0x2afc7a=_0x4154d5[_0x370ce5(0x19f)]('\x0a');_0x4154d5=_0x2afc7a['pop']()||'';for(let _0x409383 of _0x2afc7a){if(!_0x409383[_0x370ce5(0x1df)](_0x370ce5(0x1f9)))continue;try{let _0x143c34=JSON[_0x370ce5(0x198)](_0x409383[_0x370ce5(0x1ef)](0x6));if(_0x143c34['type']===_0x370ce5(0x1b2)){this['log'](_0x370ce5(0x205)),this[_0x370ce5(0x1c8)](_0x370ce5(0x1b2));continue;}if(_0x143c34[_0x370ce5(0x1b7)]===_0x370ce5(0x202)||_0x143c34[_0x370ce5(0x1b7)]===_0x370ce5(0x1e1)||_0x143c34['type']===_0x370ce5(0x195))await this['processInbox']();}catch{}}}}catch(_0x5e8540){if(_0x5e8540[_0x370ce5(0x1a7)]===_0x370ce5(0x1f3))break;this[_0x370ce5(0x1c8)](_0x370ce5(0x1c2),_0x5e8540),this['log'](_0x370ce5(0x1ed)+_0x5e8540[_0x370ce5(0x1cf)]);}if(this[_0x370ce5(0x1b3)])this[_0x370ce5(0x1c8)](_0x370ce5(0x1c4)),this[_0x370ce5(0x1f8)](_0x370ce5(0x1fa)+_0x52966f/0x3e8+_0x370ce5(0x1a5)),await this[_0x370ce5(0x1ba)](_0x52966f),_0x52966f=Math['min'](_0x52966f*1.5,0xea60);}}async['processInbox'](){const _0x1b5ebf=a0_0x5b5018;try{let _0x47f11f=(await this['call'](_0x1b5ebf(0x1a8),{'alias':this['alias'],'limit':0xa}))?.['messages']||[];for(let _0x5ac474 of _0x47f11f)await this[_0x1b5ebf(0x1a6)](_0x1b5ebf(0x1a2),{'alias':this[_0x1b5ebf(0x1e4)],'message_id':_0x5ac474['id']}),this[_0x1b5ebf(0x1f8)]('←\x20'+_0x5ac474[_0x1b5ebf(0x1b1)]+':\x20'+_0x5ac474[_0x1b5ebf(0x1de)][_0x1b5ebf(0x1ef)](0x0,0x3c)),this['emit']('task',_0x5ac474),this[_0x1b5ebf(0x1c8)]('message',_0x5ac474);}catch(_0x5de156){this[_0x1b5ebf(0x1f8)](_0x1b5ebf(0x1bf)+_0x5de156[_0x1b5ebf(0x1cf)]);}}[a0_0x5b5018(0x1ba)](_0x5d0f11){return new Promise(_0x7f22fb=>setTimeout(_0x7f22fb,_0x5d0f11));}}var F=$;function a0_0x1d78(){const _0x4e54fd=['message','toTimeString','9ZnluEq','error_code','1709132SvjIGX','task_id','toAlias','idle','CommHub\x20response\x20omitted\x20task_id','\x20transport=','getReader','11192346JtglbB','/events/',']\x20[commhub:','send','content','startsWith','send_failed','new_message','sending','task.expired','alias','decode','offline','349508qehWZG','parentTaskId','2.0','heartbeatInterval','from_alias','1115UfTLfj','SSE\x20error:\x20','task.send.failed','slice','lifecycleTracking','<missing>','\x20error=','AbortError','autoConnect','network_id','sdk-','reconnectDelay','log','data:\x20','SSE\x20reconnecting\x20in\x20','unknown\x20error','task.send.delivered','not_tracked','1551697zREaAy','delivered','transport','reply','new_task','getAllStatus','\x20parent_task_id=','SSE\x20connected','failed','token','parent_task_id','abort','heartbeatTimer','catch','body','<unknown>','/mcp','mcp_http','12CGMwFq','replace','server','url','broadcast','status','report_status','parse','\x20lifecycle=','now','text/event-stream','agent','\x20duration_ms=','CommHub\x20rejected\x20task','split','\x20to=','4143180REWfyp','ack_inbox','signal','\x20from=','s...','call','name','get_inbox','215122CzZqYF','resumeId','Authorization','task.ack','stringify','[commhub:task]\x20','read','text','from_session','connected','running','sseAbort','7248LFCLKH','message_id','type','normal','POST','sleep','tools/call','registered','task.replied','json','inbox\x20error:\x20','networkId','8hKiFXr','error','min','disconnected','result','Bearer\x20','connect','emit','<pending>','task.started','match','lifecycle_tracking','cwd','send_task'];a0_0x1d78=function(){return _0x4e54fd;};return a0_0x1d78();}export{F as default,$ as CommHub};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* daemon 的 `runtimes_supported` 是**写配置那一刻**的支持集快照,之后不会自愈。
|
|
3
|
+
*
|
|
4
|
+
* 🔴 这不是假想的:#1298 (2026-08-28) 把新建 daemon 的默认清单从 3 个放开到
|
|
5
|
+
* `SUPPORTED_RUNTIME_NAMES` 全体,但**它只改了写入路径**。在那之前 init 过的
|
|
6
|
+
* daemon,配置里仍然只有那 3 个,而且没有任何东西会说出这件事 ——
|
|
7
|
+
* 用户在客户端「选服务器」里看到某台机器少几个 runtime,
|
|
8
|
+
* 既不知道为什么,也不知道该做什么。
|
|
9
|
+
*
|
|
10
|
+
* 判据从**分发处**取(`SUPPORTED_RUNTIME_NAMES`),不在这里手写一份清单:
|
|
11
|
+
* 抄一份就意味着它会再漂一次(同 #1728 的教训)。
|
|
12
|
+
*/
|
|
13
|
+
export declare function describeStaleRuntimeSupport(declared: readonly string[] | undefined | null, supported: readonly string[], nameHint?: string): string | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 终端里的**显示列宽** —— CJK 字符占 2 列,而 `String.length` / `padEnd` 只数码元。
|
|
3
|
+
*
|
|
4
|
+
* 🔴 这份知识仓里本来就有,但它只活在**一个测试文件**里
|
|
5
|
+
* (`daemon-capability-display.test.ts` 的 `displayWidth`,2026-08-30 由 macOS 真机
|
|
6
|
+
* 上「合成首行约 99 列、80 列终端折行且折点落在句子中间」催生)。
|
|
7
|
+
* 生产代码没有它,于是所有用 `padEnd` 对齐的表在中文别名下都是歪的。
|
|
8
|
+
*
|
|
9
|
+
* 实测(2026-08-31,`anet node ls` 对着一支全中文别名的军团):
|
|
10
|
+
*
|
|
11
|
+
* NAME RUNTIME STATUS
|
|
12
|
+
* ──────────────────── ────────────── ────────
|
|
13
|
+
* 通信工程马 claude-code-cli idle ← RUNTIME 列起点
|
|
14
|
+
* 通信IM马 claude-code-cli idle ← 不一样
|
|
15
|
+
* 通信SDK牛 codex-sdk idle ← 又不一样
|
|
16
|
+
*
|
|
17
|
+
* `通信工程马`.length 是 5,`padEnd(20)` 补 15 个空格 —— 但它渲染出来是 10 列,
|
|
18
|
+
* 于是这一行实际占 25 列而不是 20。**别名里 CJK 越多,歪得越远。**
|
|
19
|
+
*/
|
|
20
|
+
export declare function displayWidth(s: unknown): number;
|
|
21
|
+
/**
|
|
22
|
+
* 按**显示列**右补空格。已经不短于目标宽度时原样返回(与 `padEnd` 一致,不截断)。
|
|
23
|
+
*
|
|
24
|
+
* 🔴 不截断是有意的:截断会引出「截到一半的宽字符」这个新问题,
|
|
25
|
+
* 而调用方要的只是对齐。**一个修对齐的改动不该顺手引入截断语义。**
|
|
26
|
+
*/
|
|
27
|
+
export declare function padDisplayEnd(s: unknown, width: number): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `anet doctor` 原先对「本机配置了几个节点」的判定是:
|
|
3
|
+
*
|
|
4
|
+
* check("Nodes configured", ids.length > 0, `${ids.length} node(s)`);
|
|
5
|
+
*
|
|
6
|
+
* 于是 **0 个节点 → ❌**。而一个刚装好、还没建节点的人跑 `anet doctor`,
|
|
7
|
+
* 看到的是:
|
|
8
|
+
*
|
|
9
|
+
* ❌ Nodes configured — 0 node(s)
|
|
10
|
+
* Result: 9 ok, 3 warnings, 2 errors
|
|
11
|
+
*
|
|
12
|
+
* 🔴 「还没有节点」是**全新安装的预期状态**,不是故障。把它报成 error,
|
|
13
|
+
* 等于在新用户的第一次诊断里制造一个假警报 —— 而这条命令存在的意义
|
|
14
|
+
* 正是告诉他「你这台机器现在好不好」。
|
|
15
|
+
*
|
|
16
|
+
* 🔴 但也不能反过来直接判成「一切正常」:同一个 0 对一个**本来有节点**的人
|
|
17
|
+
* 意味着配置目录不见了。doctor 手上只有一个数字,**分不出这两种现实**。
|
|
18
|
+
* 所以这里既不报错也不报好 —— 把两种都说出来,让读的人自己对号,
|
|
19
|
+
* 并给出各自的下一步。
|
|
20
|
+
*/
|
|
21
|
+
export type NodeCountLine = {
|
|
22
|
+
ok: true;
|
|
23
|
+
detail: string;
|
|
24
|
+
} | {
|
|
25
|
+
ok: false;
|
|
26
|
+
info: string;
|
|
27
|
+
};
|
|
28
|
+
export declare function nodeCountLine(count: number): NodeCountLine;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 从一段日志文本里取出**最后一次**出现的 grok 版本串。
|
|
2
|
+
* 🔴 取最后一次,不是第一次:日志按时间追加,最后一次才是这个进程最近一次
|
|
3
|
+
* 启动时用的那个。取第一次会在日志轮转/多次重启后指向历史。 */
|
|
4
|
+
export declare function parseGrokBuildFromLog(text: string): string | undefined;
|
|
5
|
+
/** 从 `grok --version` 的输出里取版本串(同一形状)。 */
|
|
6
|
+
export declare function parseGrokBuildFromVersionOutput(out: string): string | undefined;
|
|
7
|
+
export type GrokBuildDriftKind = "match" | "drift" | "unknown-current" | "unknown-started";
|
|
8
|
+
export interface GrokBuildDrift {
|
|
9
|
+
readonly kind: GrokBuildDriftKind;
|
|
10
|
+
readonly started?: string;
|
|
11
|
+
readonly current?: string;
|
|
12
|
+
/** 一句人读的话。四种 kind 四句不同的话 —— 含糊化等于把这一格的功能删掉。 */
|
|
13
|
+
readonly line: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function describeGrokBuildDrift(started: string | undefined, current: string | undefined): GrokBuildDrift;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 把 hub 的 TEXT 时间戳显示给人看。
|
|
3
|
+
*
|
|
4
|
+
* 🔴 原先是**原样打印**:
|
|
5
|
+
*
|
|
6
|
+
* updated: 2026-08-31 00:20:11
|
|
7
|
+
*
|
|
8
|
+
* 那是 UTC,**没有任何时区标记**。同一时刻本地是 `08:22:41 CST` ——
|
|
9
|
+
* 于是一个 **2 分钟前**刚心跳过的节点,在 UTC+8 的用户眼里像是 **8 小时前**的。
|
|
10
|
+
*
|
|
11
|
+
* 这不是假想:2026-08-31 我自己就这么读错过一次,据此差点报出「舰队心跳陈旧
|
|
12
|
+
* 8.3 小时」。**CLI 在主动制造这个误读。**
|
|
13
|
+
*
|
|
14
|
+
* 所以显示两样东西:
|
|
15
|
+
* - **相对时长**(人真正想知道的那个)
|
|
16
|
+
* - 绝对值,并**显式标 UTC**(便于和日志、issue 里的时间对齐)
|
|
17
|
+
*/
|
|
18
|
+
export declare function formatHubTime(raw: unknown, nowMs?: number): string;
|
|
19
|
+
/** 人读的时长。负数(时钟偏差/未来时间)如实说,不折成 0。 */
|
|
20
|
+
export declare function formatAgo(deltaMs: number): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* #1595 —— `anet doctor` 原先只印 hub 自报的版本:
|
|
3
|
+
*
|
|
4
|
+
* ✅ CommHub reachable (http://127.0.0.1:9200 v0.9.0-preview.38)
|
|
5
|
+
*
|
|
6
|
+
* 读的人**看不到自己这台 CLI 钉的是哪个**。实测(2026-08-31):生产 hub 在
|
|
7
|
+
* `.38`,而 `anet hub start` 的 `PINNED_SERVER_VERSION` 是 `.44` —— 两个数
|
|
8
|
+
* 差 6 个版本,而屏幕上只有一个。今天有一整条排查(agent→用户消息为什么
|
|
9
|
+
* 验不了端到端)就卡在这个差上:`.44` 之前 `send_desktop_message` 是
|
|
10
|
+
* fire-and-forget 且仍返回 `ok:true`,所以在 `.38` 上拿到的 `ok:true`
|
|
11
|
+
* 不是「用户看到了」的证据。
|
|
12
|
+
*
|
|
13
|
+
* 🔴 **只并排摆出两个数,不判断谁对、不给阈值、不发警告。**
|
|
14
|
+
* hub 比 CLI 的 pin 老或新都可能完全合理 —— 连的是别人运维的 hub、
|
|
15
|
+
* 本机 hub 还没重启、或者故意钉在旧版。给一个猜出来的「应该一致」
|
|
16
|
+
* 判据,会在这些正常情况下变成误报,而一个会误报的检查第一周就会被关掉。
|
|
17
|
+
* 让读的人自己看见差在哪,是这一格能诚实做到的全部。
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatHubVersionDetail(hubUrl: string, hubVersion: unknown, pinnedVersion: string): string;
|
|
@@ -227,7 +227,7 @@ For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides
|
|
|
227
227
|
`:">",Q};GZ.prototype.renderInline=function($,Z,J){let X="",Y=this.rules;for(let Q=0,G=$.length;Q<G;Q++){let K=$[Q].type;if(typeof Y[K]<"u")X+=Y[K]($,Q,Z,J,this);else X+=this.renderToken($,Q,Z)}return X};GZ.prototype.renderInlineAsText=function($,Z,J){let X="";for(let Y=0,Q=$.length;Y<Q;Y++)switch($[Y].type){case"text":X+=$[Y].content;break;case"image":X+=this.renderInlineAsText($[Y].children,Z,J);break;case"html_inline":case"html_block":X+=$[Y].content;break;case"softbreak":case"hardbreak":X+=`
|
|
228
228
|
`;break;default:}return X};GZ.prototype.render=function($,Z,J){let X="",Y=this.rules;for(let Q=0,G=$.length;Q<G;Q++){let K=$[Q].type;if(K==="inline")X+=this.renderInline($[Q].children,Z,J);else if(typeof Y[K]<"u")X+=Y[K]($,Q,Z,J,this);else X+=this.renderToken($,Q,Z,J)}return X};var vB=GZ;function G9(){this.__rules__=[],this.__cache__=null}G9.prototype.__find__=function($){for(let Z=0;Z<this.__rules__.length;Z++)if(this.__rules__[Z].name===$)return Z;return-1};G9.prototype.__compile__=function(){let $=this,Z=[""];$.__rules__.forEach(function(J){if(!J.enabled)return;J.alt.forEach(function(X){if(Z.indexOf(X)<0)Z.push(X)})}),$.__cache__={},Z.forEach(function(J){$.__cache__[J]=[],$.__rules__.forEach(function(X){if(!X.enabled)return;if(J&&X.alt.indexOf(J)<0)return;$.__cache__[J].push(X.fn)})})};G9.prototype.at=function($,Z,J){let X=this.__find__($),Y=J||{};if(X===-1)throw Error("Parser rule not found: "+$);this.__rules__[X].fn=Z,this.__rules__[X].alt=Y.alt||[],this.__cache__=null};G9.prototype.before=function($,Z,J,X){let Y=this.__find__($),Q=X||{};if(Y===-1)throw Error("Parser rule not found: "+$);this.__rules__.splice(Y,0,{name:Z,enabled:!0,fn:J,alt:Q.alt||[]}),this.__cache__=null};G9.prototype.after=function($,Z,J,X){let Y=this.__find__($),Q=X||{};if(Y===-1)throw Error("Parser rule not found: "+$);this.__rules__.splice(Y+1,0,{name:Z,enabled:!0,fn:J,alt:Q.alt||[]}),this.__cache__=null};G9.prototype.push=function($,Z,J){let X=J||{};this.__rules__.push({name:$,enabled:!0,fn:Z,alt:X.alt||[]}),this.__cache__=null};G9.prototype.enable=function($,Z){if(!Array.isArray($))$=[$];let J=[];return $.forEach(function(X){let Y=this.__find__(X);if(Y<0){if(Z)return;throw Error("Rules manager: invalid rule name "+X)}this.__rules__[Y].enabled=!0,J.push(X)},this),this.__cache__=null,J};G9.prototype.enableOnly=function($,Z){if(!Array.isArray($))$=[$];this.__rules__.forEach(function(J){J.enabled=!1}),this.enable($,Z)};G9.prototype.disable=function($,Z){if(!Array.isArray($))$=[$];let J=[];return $.forEach(function(X){let Y=this.__find__(X);if(Y<0){if(Z)return;throw Error("Rules manager: invalid rule name "+X)}this.__rules__[Y].enabled=!1,J.push(X)},this),this.__cache__=null,J};G9.prototype.getRules=function($){if(this.__cache__===null)this.__compile__();return this.__cache__[$]||[]};var p$=G9;function KZ($,Z,J){this.type=$,this.tag=Z,this.attrs=null,this.map=null,this.nesting=J,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}KZ.prototype.attrIndex=function(Z){if(!this.attrs)return-1;let J=this.attrs;for(let X=0,Y=J.length;X<Y;X++)if(J[X][0]===Z)return X;return-1};KZ.prototype.attrPush=function(Z){if(this.attrs)this.attrs.push(Z);else this.attrs=[Z]};KZ.prototype.attrSet=function(Z,J){let X=this.attrIndex(Z),Y=[Z,J];if(X<0)this.attrPush(Y);else this.attrs[X]=Y};KZ.prototype.attrGet=function(Z){let J=this.attrIndex(Z),X=null;if(J>=0)X=this.attrs[J][1];return X};KZ.prototype.attrJoin=function(Z,J){let X=this.attrIndex(Z);if(X<0)this.attrPush([Z,J]);else this.attrs[X][1]=this.attrs[X][1]+" "+J};var t9=KZ;function bB($,Z,J){this.src=$,this.env=J,this.tokens=[],this.inlineMode=!1,this.md=Z}bB.prototype.Token=t9;var fB=bB;var wc=/\r\n?|\n/g,Sc=/\0/g;function TV($){let Z;Z=$.src.replace(wc,`
|
|
229
229
|
`),Z=Z.replace(Sc,"�"),$.src=Z}function jV($){let Z;if($.inlineMode)Z=new $.Token("inline","",0),Z.content=$.src,Z.map=[0,1],Z.children=[],$.tokens.push(Z);else $.md.block.parse($.src,$.md,$.env,$.tokens)}function PV($){let Z=$.tokens;for(let J=0,X=Z.length;J<X;J++){let Y=Z[J];if(Y.type==="inline")$.md.inline.parse(Y.content,$.md,$.env,Y.children)}}function _c($){return/^<a[>\s]/i.test($)}function yc($){return/^<\/a\s*>/i.test($)}function IV($){let Z=$.tokens;if(!$.md.options.linkify)return;for(let J=0,X=Z.length;J<X;J++){if(Z[J].type!=="inline"||!$.md.linkify.pretest(Z[J].content))continue;let Y=Z[J].children,Q=0;for(let G=Y.length-1;G>=0;G--){let K=Y[G];if(K.type==="link_close"){G--;while(Y[G].level!==K.level&&Y[G].type!=="link_open")G--;continue}if(K.type==="html_inline"){if(_c(K.content)&&Q>0)Q--;if(yc(K.content))Q++}if(Q>0)continue;if(K.type==="text"&&$.md.linkify.test(K.content)){let W=K.content,H=$.md.linkify.match(W),z=[],V=K.level,U=0;if(H.length>0&&H[0].index===0&&G>0&&Y[G-1].type==="text_special")H=H.slice(1);for(let F=0;F<H.length;F++){let q=H[F].url,D=$.md.normalizeLink(q);if(!$.md.validateLink(D))continue;let O=H[F].text;if(!H[F].schema)O=$.md.normalizeLinkText("http://"+O).replace(/^http:\/\//,"");else if(H[F].schema==="mailto:"&&!/^mailto:/i.test(O))O=$.md.normalizeLinkText("mailto:"+O).replace(/^mailto:/,"");else O=$.md.normalizeLinkText(O);let B=H[F].index;if(B>U){let E=new $.Token("text","",0);E.content=W.slice(U,B),E.level=V,z.push(E)}let A=new $.Token("link_open","a",1);A.attrs=[["href",D]],A.level=V++,A.markup="linkify",A.info="auto",z.push(A);let L=new $.Token("text","",0);L.content=O,L.level=V,z.push(L);let M=new $.Token("link_close","a",-1);M.level=--V,M.markup="linkify",M.info="auto",z.push(M),U=H[F].lastIndex}if(U<W.length){let F=new $.Token("text","",0);F.content=W.slice(U),F.level=V,z.push(F)}Z[J].children=Y=NV(Y,G,z)}}}}var gB=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,xc=/\((c|tm|r)\)/i,kc=/\((c|tm|r)\)/ig,hc={c:"©",r:"®",tm:"™"};function vc($,Z){return hc[Z.toLowerCase()]}function bc($){let Z=0;for(let J=$.length-1;J>=0;J--){let X=$[J];if(X.type==="text"&&!Z)X.content=X.content.replace(kc,vc);if(X.type==="link_open"&&X.info==="auto")Z--;if(X.type==="link_close"&&X.info==="auto")Z++}}function fc($){let Z=0;for(let J=$.length-1;J>=0;J--){let X=$[J];if(X.type==="text"&&!Z){if(gB.test(X.content))X.content=X.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")}if(X.type==="link_open"&&X.info==="auto")Z--;if(X.type==="link_close"&&X.info==="auto")Z++}}function CV($){let Z;if(!$.md.options.typographer)return;for(Z=$.tokens.length-1;Z>=0;Z--){if($.tokens[Z].type!=="inline")continue;if(xc.test($.tokens[Z].content))bc($.tokens[Z].children);if(gB.test($.tokens[Z].content))fc($.tokens[Z].children)}}var gc=/['"]/,uB=/['"]/g,mB="’";function OQ($,Z,J,X){if(!$[Z])$[Z]=[];$[Z].push({pos:J,ch:X})}function uc($,Z){let J="",X=0;Z.sort((Y,Q)=>Y.pos-Q.pos);for(let Y=0;Y<Z.length;Y++){let Q=Z[Y];J+=$.slice(X,Q.pos)+Q.ch,X=Q.pos+1}return J+$.slice(X)}function mc($,Z){let J,X=[],Y={};for(let Q=0;Q<$.length;Q++){let G=$[Q],K=$[Q].level;for(J=X.length-1;J>=0;J--)if(X[J].level<=K)break;if(X.length=J+1,G.type!=="text")continue;let W=G.content,H=0,z=W.length;$:while(H<z){uB.lastIndex=H;let V=uB.exec(W);if(!V)break;let U=!0,F=!0;H=V.index+1;let q=V[0]==="'",D=32;if(V.index-1>=0)D=W.charCodeAt(V.index-1);else for(J=Q-1;J>=0;J--){if($[J].type==="softbreak"||$[J].type==="hardbreak")break;if(!$[J].content)continue;D=$[J].content.charCodeAt($[J].content.length-1);break}let O=32;if(H<z)O=W.charCodeAt(H);else for(J=Q+1;J<$.length;J++){if($[J].type==="softbreak"||$[J].type==="hardbreak")break;if(!$[J].content)continue;O=$[J].content.charCodeAt(0);break}let B=m$(D)||u$(D),A=m$(O)||u$(O),L=g$(D),M=g$(O);if(M)U=!1;else if(A){if(!(L||B))U=!1}if(L)F=!1;else if(B){if(!(M||A))F=!1}if(O===34&&V[0]==='"'){if(D>=48&&D<=57)F=U=!1}if(U&&F)U=B,F=A;if(!U&&!F){if(q)OQ(Y,Q,V.index,mB);continue}if(F)for(J=X.length-1;J>=0;J--){let E=X[J];if(X[J].level<K)break;if(E.single===q&&X[J].level===K){E=X[J];let y,C;if(q)y=Z.md.options.quotes[2],C=Z.md.options.quotes[3];else y=Z.md.options.quotes[0],C=Z.md.options.quotes[1];OQ(Y,Q,V.index,C),OQ(Y,E.token,E.pos,y),X.length=J;continue $}}if(U)X.push({token:Q,pos:V.index,single:q,level:K});else if(F&&q)OQ(Y,Q,V.index,mB)}}Object.keys(Y).forEach(function(Q){$[Q].content=uc($[Q].content,Y[Q])})}function wV($){if(!$.md.options.typographer)return;for(let Z=$.tokens.length-1;Z>=0;Z--){if($.tokens[Z].type!=="inline"||!gc.test($.tokens[Z].content))continue;mc($.tokens[Z].children,$)}}function SV($){let Z,J,X=$.tokens,Y=X.length;for(let Q=0;Q<Y;Q++){if(X[Q].type!=="inline")continue;let G=X[Q].children,K=G.length;for(Z=0;Z<K;Z++)if(G[Z].type==="text_special")G[Z].type="text";for(Z=J=0;Z<K;Z++)if(G[Z].type==="text"&&Z+1<K&&G[Z+1].type==="text")G[Z+1].content=G[Z].content+G[Z+1].content;else{if(Z!==J)G[J]=G[Z];J++}if(Z!==J)G.length=J}}var _V=[["normalize",TV],["block",jV],["inline",PV],["linkify",IV],["replacements",CV],["smartquotes",wV],["text_join",SV]];function yV(){this.ruler=new p$;for(let $=0;$<_V.length;$++)this.ruler.push(_V[$][0],_V[$][1])}yV.prototype.process=function($){let Z=this.ruler.getRules("");for(let J=0,X=Z.length;J<X;J++)Z[J]($)};yV.prototype.State=fB;var cB=yV;function I9($,Z,J,X){this.src=$,this.md=Z,this.env=J,this.tokens=X,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;let Y=this.src;for(let Q=0,G=0,K=0,W=0,H=Y.length,z=!1;G<H;G++){let V=Y.charCodeAt(G);if(!z)if(Q1(V)){if(K++,V===9)W+=4-W%4;else W++;continue}else z=!0;if(V===10||G===H-1){if(V!==10)G++;this.bMarks.push(Q),this.eMarks.push(G),this.tShift.push(K),this.sCount.push(W),this.bsCount.push(0),z=!1,K=0,W=0,Q=G+1}}this.bMarks.push(Y.length),this.eMarks.push(Y.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}I9.prototype.push=function($,Z,J){let X=new t9($,Z,J);if(X.block=!0,J<0)this.level--;if(X.level=this.level,J>0)this.level++;return this.tokens.push(X),X};I9.prototype.isEmpty=function(Z){return this.bMarks[Z]+this.tShift[Z]>=this.eMarks[Z]};I9.prototype.skipEmptyLines=function(Z){for(let J=this.lineMax;Z<J;Z++)if(this.bMarks[Z]+this.tShift[Z]<this.eMarks[Z])break;return Z};I9.prototype.skipSpaces=function(Z){for(let J=this.src.length;Z<J;Z++){let X=this.src.charCodeAt(Z);if(!Q1(X))break}return Z};I9.prototype.skipSpacesBack=function(Z,J){if(Z<=J)return Z;while(Z>J)if(!Q1(this.src.charCodeAt(--Z)))return Z+1;return Z};I9.prototype.skipChars=function(Z,J){for(let X=this.src.length;Z<X;Z++)if(this.src.charCodeAt(Z)!==J)break;return Z};I9.prototype.skipCharsBack=function(Z,J,X){if(Z<=X)return Z;while(Z>X)if(J!==this.src.charCodeAt(--Z))return Z+1;return Z};I9.prototype.getLines=function(Z,J,X,Y){if(Z>=J)return"";let Q=Array(J-Z);for(let G=0,K=Z;K<J;K++,G++){let W=0,H=this.bMarks[K],z=H,V;if(K+1<J||Y)V=this.eMarks[K]+1;else V=this.eMarks[K];while(z<V&&W<X){let U=this.src.charCodeAt(z);if(Q1(U))if(U===9)W+=4-(W+this.bsCount[K])%4;else W++;else if(z-H<this.tShift[K])W++;else break;z++}if(W>X)Q[G]=Array(W-X+1).join(" ")+this.src.slice(z,V);else Q[G]=this.src.slice(z,V)}return Q.join("")};I9.prototype.Token=t9;var dB=I9;var cc=65536;function xV($,Z){let J=$.bMarks[Z]+$.tShift[Z],X=$.eMarks[Z];return $.src.slice(J,X)}function pB($){let Z=[],J=$.length,X=0,Y=$.charCodeAt(X),Q=!1,G=0,K="";while(X<J){if(Y===124)if(!Q)Z.push(K+$.substring(G,X)),K="",G=X+1;else K+=$.substring(G,X-1),G=X;Q=Y===92,X++,Y=$.charCodeAt(X)}return Z.push(K+$.substring(G)),Z}function kV($,Z,J,X){if(Z+2>J)return!1;let Y=Z+1;if($.sCount[Y]<$.blkIndent)return!1;if($.sCount[Y]-$.blkIndent>=4)return!1;let Q=$.bMarks[Y]+$.tShift[Y];if(Q>=$.eMarks[Y])return!1;let G=$.src.charCodeAt(Q++);if(G!==124&&G!==45&&G!==58)return!1;if(Q>=$.eMarks[Y])return!1;let K=$.src.charCodeAt(Q++);if(K!==124&&K!==45&&K!==58&&!Q1(K))return!1;if(G===45&&Q1(K))return!1;while(Q<$.eMarks[Y]){let M=$.src.charCodeAt(Q);if(M!==124&&M!==45&&M!==58&&!Q1(M))return!1;Q++}let W=xV($,Z+1),H=W.split("|"),z=[];for(let M=0;M<H.length;M++){let E=H[M].trim();if(!E)if(M===0||M===H.length-1)continue;else return!1;if(!/^:?-+:?$/.test(E))return!1;if(E.charCodeAt(E.length-1)===58)z.push(E.charCodeAt(0)===58?"center":"right");else if(E.charCodeAt(0)===58)z.push("left");else z.push("")}if(W=xV($,Z).trim(),W.indexOf("|")===-1)return!1;if($.sCount[Z]-$.blkIndent>=4)return!1;if(H=pB(W),H.length&&H[0]==="")H.shift();if(H.length&&H[H.length-1]==="")H.pop();let V=H.length;if(V===0||V!==z.length)return!1;if(X)return!0;let U=$.parentType;$.parentType="table";let F=$.md.block.ruler.getRules("blockquote"),q=$.push("table_open","table",1),D=[Z,0];q.map=D;let O=$.push("thead_open","thead",1);O.map=[Z,Z+1];let B=$.push("tr_open","tr",1);B.map=[Z,Z+1];for(let M=0;M<H.length;M++){let E=$.push("th_open","th",1);if(z[M])E.attrs=[["style","text-align:"+z[M]]];let y=$.push("inline","",0);y.content=H[M].trim(),y.children=[],$.push("th_close","th",-1)}$.push("tr_close","tr",-1),$.push("thead_close","thead",-1);let A,L=0;for(Y=Z+2;Y<J;Y++){if($.sCount[Y]<$.blkIndent)break;let M=!1;for(let y=0,C=F.length;y<C;y++)if(F[y]($,Y,J,!0)){M=!0;break}if(M)break;if(W=xV($,Y).trim(),!W)break;if($.sCount[Y]-$.blkIndent>=4)break;if(H=pB(W),H.length&&H[0]==="")H.shift();if(H.length&&H[H.length-1]==="")H.pop();if(L+=V-H.length,L>cc)break;if(Y===Z+2){let y=$.push("tbody_open","tbody",1);y.map=A=[Z+2,0]}let E=$.push("tr_open","tr",1);E.map=[Y,Y+1];for(let y=0;y<V;y++){let C=$.push("td_open","td",1);if(z[y])C.attrs=[["style","text-align:"+z[y]]];let T=$.push("inline","",0);T.content=H[y]?H[y].trim():"",T.children=[],$.push("td_close","td",-1)}$.push("tr_close","tr",-1)}if(A)$.push("tbody_close","tbody",-1),A[1]=Y;return $.push("table_close","table",-1),D[1]=Y,$.parentType=U,$.line=Y,!0}function hV($,Z,J){if($.sCount[Z]-$.blkIndent<4)return!1;let X=Z+1,Y=X;while(X<J){if($.isEmpty(X)){X++;continue}if($.sCount[X]-$.blkIndent>=4){X++,Y=X;continue}break}$.line=Y;let Q=$.push("code_block","code",0);return Q.content=$.getLines(Z,Y,4+$.blkIndent,!1)+`
|
|
230
|
-
`,Q.map=[Z,$.line],!0}function vV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;if(Y+3>Q)return!1;let G=$.src.charCodeAt(Y);if(G!==126&&G!==96)return!1;let K=Y;Y=$.skipChars(Y,G);let W=Y-K;if(W<3)return!1;let H=$.src.slice(K,Y),z=$.src.slice(Y,Q);if(G===96){if(z.indexOf(String.fromCharCode(G))>=0)return!1}if(X)return!0;let V=Z,U=!1;for(;;){if(V++,V>=J)break;if(Y=K=$.bMarks[V]+$.tShift[V],Q=$.eMarks[V],Y<Q&&$.sCount[V]<$.blkIndent)break;if($.src.charCodeAt(Y)!==G)continue;if($.sCount[V]-$.blkIndent>=4)continue;if(Y=$.skipChars(Y,G),Y-K<W)continue;if(Y=$.skipSpaces(Y),Y<Q)continue;U=!0;break}W=$.sCount[Z],$.line=V+(U?1:0);let F=$.push("fence","code",0);return F.info=z,F.content=$.getLines(Z+1,V,W,!0),F.markup=H,F.map=[Z,$.line],!0}function bV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z],G=$.lineMax;if($.sCount[Z]-$.blkIndent>=4)return!1;if($.src.charCodeAt(Y)!==62)return!1;if(X)return!0;let K=[],W=[],H=[],z=[],V=$.md.block.ruler.getRules("blockquote"),U=$.parentType;$.parentType="blockquote";let F=!1,q;for(q=Z;q<J;q++){let L=$.sCount[q]<$.blkIndent;if(Y=$.bMarks[q]+$.tShift[q],Q=$.eMarks[q],Y>=Q)break;if($.src.charCodeAt(Y++)===62&&!L){let E=$.sCount[q]+1,y,C;if($.src.charCodeAt(Y)===32)Y++,E++,C=!1,y=!0;else if($.src.charCodeAt(Y)===9)if(y=!0,($.bsCount[q]+E)%4===3)Y++,E++,C=!1;else C=!0;else y=!1;let T=E;K.push($.bMarks[q]),$.bMarks[q]=Y;while(Y<Q){let w=$.src.charCodeAt(Y);if(Q1(w))if(w===9)T+=4-(T+$.bsCount[q]+(C?1:0))%4;else T++;else break;Y++}F=Y>=Q,W.push($.bsCount[q]),$.bsCount[q]=$.sCount[q]+1+(y?1:0),H.push($.sCount[q]),$.sCount[q]=T-E,z.push($.tShift[q]),$.tShift[q]=Y-$.bMarks[q];continue}if(F)break;let M=!1;for(let E=0,y=V.length;E<y;E++)if(V[E]($,q,J,!0)){M=!0;break}if(M){if($.lineMax=q,$.blkIndent!==0)K.push($.bMarks[q]),W.push($.bsCount[q]),z.push($.tShift[q]),H.push($.sCount[q]),$.sCount[q]-=$.blkIndent;break}K.push($.bMarks[q]),W.push($.bsCount[q]),z.push($.tShift[q]),H.push($.sCount[q]),$.sCount[q]=-1}let D=$.blkIndent;$.blkIndent=0;let O=$.push("blockquote_open","blockquote",1);O.markup=">";let B=[Z,0];O.map=B,$.md.block.tokenize($,Z,q);let A=$.push("blockquote_close","blockquote",-1);A.markup=">",$.lineMax=G,$.parentType=U,B[1]=$.line;for(let L=0;L<z.length;L++)$.bMarks[L+Z]=K[L],$.tShift[L+Z]=z[L],$.sCount[L+Z]=H[L],$.bsCount[L+Z]=W[L];return $.blkIndent=D,!0}function fV($,Z,J,X){let Y=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;let Q=$.bMarks[Z]+$.tShift[Z],G=$.src.charCodeAt(Q++);if(G!==42&&G!==45&&G!==95)return!1;let K=1;while(Q<Y){let H=$.src.charCodeAt(Q++);if(H!==G&&!Q1(H))return!1;if(H===G)K++}if(K<3)return!1;if(X)return!0;$.line=Z+1;let W=$.push("hr","hr",0);return W.map=[Z,$.line],W.markup=Array(K+1).join(String.fromCharCode(G)),!0}function lB($,Z){let J=$.eMarks[Z],X=$.bMarks[Z]+$.tShift[Z],Y=$.src.charCodeAt(X++);if(Y!==42&&Y!==45&&Y!==43)return-1;if(X<J){let Q=$.src.charCodeAt(X);if(!Q1(Q))return-1}return X}function iB($,Z){let J=$.bMarks[Z]+$.tShift[Z],X=$.eMarks[Z],Y=J;if(Y+1>=X)return-1;let Q=$.src.charCodeAt(Y++);if(Q<48||Q>57)return-1;for(;;){if(Y>=X)return-1;if(Q=$.src.charCodeAt(Y++),Q>=48&&Q<=57){if(Y-J>=10)return-1;continue}if(Q===41||Q===46)break;return-1}if(Y<X){if(Q=$.src.charCodeAt(Y),!Q1(Q))return-1}return Y}function dc($,Z){let J=$.level+2;for(let X=Z+2,Y=$.tokens.length-2;X<Y;X++)if($.tokens[X].level===J&&$.tokens[X].type==="paragraph_open")$.tokens[X+2].hidden=!0,$.tokens[X].hidden=!0,X+=2}function gV($,Z,J,X){let Y,Q,G,K,W=Z,H=!0;if($.sCount[W]-$.blkIndent>=4)return!1;if($.listIndent>=0&&$.sCount[W]-$.listIndent>=4&&$.sCount[W]<$.blkIndent)return!1;let z=!1;if(X&&$.parentType==="paragraph"){if($.sCount[W]>=$.blkIndent)z=!0}let V,U,F;if((F=iB($,W))>=0){if(V=!0,G=$.bMarks[W]+$.tShift[W],U=Number($.src.slice(G,F-1)),z&&U!==1)return!1}else if((F=lB($,W))>=0)V=!1;else return!1;if(z){if($.skipSpaces(F)>=$.eMarks[W])return!1}if(X)return!0;let q=$.src.charCodeAt(F-1),D=$.tokens.length;if(V){if(K=$.push("ordered_list_open","ol",1),U!==1)K.attrs=[["start",U]]}else K=$.push("bullet_list_open","ul",1);let O=[W,0];K.map=O,K.markup=String.fromCharCode(q);let B=!1,A=$.md.block.ruler.getRules("list"),L=$.parentType;$.parentType="list";while(W<J){Q=F,Y=$.eMarks[W];let M=$.sCount[W]+F-($.bMarks[W]+$.tShift[W]),E=M;while(Q<Y){let H0=$.src.charCodeAt(Q);if(H0===9)E+=4-(E+$.bsCount[W])%4;else if(H0===32)E++;else break;Q++}let y=Q,C;if(y>=Y)C=1;else C=E-M;if(C>4)C=1;let T=M+C;K=$.push("list_item_open","li",1),K.markup=String.fromCharCode(q);let w=[W,0];if(K.map=w,V)K.info=$.src.slice(G,F-1);let u=$.tight,f=$.tShift[W],m=$.sCount[W],e=$.listIndent;if($.listIndent=$.blkIndent,$.blkIndent=T,$.tight=!0,$.tShift[W]=y-$.bMarks[W],$.sCount[W]=E,y>=Y&&$.isEmpty(W+1))$.line=Math.min($.line+2,J);else $.md.block.tokenize($,W,J,!0);if(!$.tight||B)H=!1;if(B=$.line-W>1&&$.isEmpty($.line-1),$.blkIndent=$.listIndent,$.listIndent=e,$.tShift[W]=f,$.sCount[W]=m,$.tight=u,K=$.push("list_item_close","li",-1),K.markup=String.fromCharCode(q),W=$.line,w[1]=W,W>=J)break;if($.sCount[W]<$.blkIndent)break;if($.sCount[W]-$.blkIndent>=4)break;let V0=!1;for(let H0=0,v=A.length;H0<v;H0++)if(A[H0]($,W,J,!0)){V0=!0;break}if(V0)break;if(V){if(F=iB($,W),F<0)break;G=$.bMarks[W]+$.tShift[W]}else if(F=lB($,W),F<0)break;if(q!==$.src.charCodeAt(F-1))break}if(V)K=$.push("ordered_list_close","ol",-1);else K=$.push("bullet_list_close","ul",-1);if(K.markup=String.fromCharCode(q),O[1]=W,$.line=W,$.parentType=L,H)dc($,D);return!0}function uV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z],G=Z+1;if($.sCount[Z]-$.blkIndent>=4)return!1;if($.src.charCodeAt(Y)!==91)return!1;function K(A){let L=$.lineMax;if(A>=L||$.isEmpty(A))return null;let M=!1;if($.sCount[A]-$.blkIndent>3)M=!0;if($.sCount[A]<0)M=!0;if(!M){let C=$.md.block.ruler.getRules("reference"),T=$.parentType;$.parentType="reference";let w=!1;for(let u=0,f=C.length;u<f;u++)if(C[u]($,A,L,!0)){w=!0;break}if($.parentType=T,w)return null}let E=$.bMarks[A]+$.tShift[A],y=$.eMarks[A];return $.src.slice(E,y+1)}let W=$.src.slice(Y,Q+1);Q=W.length;let H=-1;for(Y=1;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===91)return!1;else if(A===93){H=Y;break}else if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(A===92){if(Y++,Y<Q&&W.charCodeAt(Y)===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}}}if(H<0||W.charCodeAt(H+1)!==58)return!1;for(Y=H+2;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(Q1(A));else break}let z=$.md.helpers.parseLinkDestination(W,Y,Q);if(!z.ok)return!1;let V=$.md.normalizeLink(z.str);if(!$.md.validateLink(V))return!1;Y=z.pos;let U=Y,F=G,q=Y;for(;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(Q1(A));else break}let D=$.md.helpers.parseLinkTitle(W,Y,Q);while(D.can_continue){let A=K(G);if(A===null)break;W+=A,Y=Q,Q=W.length,G++,D=$.md.helpers.parseLinkTitle(W,Y,Q,D)}let O;if(Y<Q&&q!==Y&&D.ok)O=D.str,Y=D.pos;else O="",Y=U,G=F;while(Y<Q){let A=W.charCodeAt(Y);if(!Q1(A))break;Y++}if(Y<Q&&W.charCodeAt(Y)!==10){if(O){O="",Y=U,G=F;while(Y<Q){let A=W.charCodeAt(Y);if(!Q1(A))break;Y++}}}if(Y<Q&&W.charCodeAt(Y)!==10)return!1;let B=c$(W.slice(1,H));if(!B)return!1;if(X)return!0;if(typeof $.env.references>"u")$.env.references={};if(typeof $.env.references[B]>"u")$.env.references[B]={title:O,href:V};return $.line=G,!0}var nB=["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"];var pc=`(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*")`,lc="(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*"+pc+")?)",oB="<[A-Za-z][A-Za-z0-9\\-]*"+lc+"*\\s*\\/?>";var aB=new RegExp("^(?:"+oB+"|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),sB=new RegExp("^(?:"+oB+"|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)");var l$=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+nB.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(sB.source+"\\s*$"),/^$/,!1]];function mV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;if(!$.md.options.html)return!1;if($.src.charCodeAt(Y)!==60)return!1;let G=$.src.slice(Y,Q),K=0;for(;K<l$.length;K++)if(l$[K][0].test(G))break;if(K===l$.length)return!1;if(X)return l$[K][2];let W=Z+1,H=l$[K][1].test("");if(!l$[K][1].test(G))for(;W<J;W++){if($.sCount[W]<$.blkIndent){if(H||!$.isEmpty(W))break}if(Y=$.bMarks[W]+$.tShift[W],Q=$.eMarks[W],G=$.src.slice(Y,Q),l$[K][1].test(G)){if(G.length!==0)W++;break}}$.line=W;let z=$.push("html_block","",0);return z.map=[Z,W],z.content=$.getLines(Z,W,$.blkIndent,!0),!0}function cV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;let G=$.src.charCodeAt(Y);if(G!==35||Y>=Q)return!1;let K=1;G=$.src.charCodeAt(++Y);while(G===35&&Y<Q&&K<=6)K++,G=$.src.charCodeAt(++Y);if(K>6||Y<Q&&!Q1(G))return!1;if(X)return!0;Q=$.skipSpacesBack(Q,Y);let W=$.skipCharsBack(Q,35,Y);if(W>Y&&Q1($.src.charCodeAt(W-1)))Q=W;$.line=Z+1;let H=$.push("heading_open","h"+String(K),1);H.markup="########".slice(0,K),H.map=[Z,$.line];let z=$.push("inline","",0);z.content=d$($.src.slice(Y,Q)),z.map=[Z,$.line],z.children=[];let V=$.push("heading_close","h"+String(K),-1);return V.markup="########".slice(0,K),!0}function dV($,Z,J){let X=$.md.block.ruler.getRules("paragraph");if($.sCount[Z]-$.blkIndent>=4)return!1;let Y=$.parentType;$.parentType="paragraph";let Q=0,G,K=Z+1;for(;K<J&&!$.isEmpty(K);K++){if($.sCount[K]-$.blkIndent>3)continue;if($.sCount[K]>=$.blkIndent){let F=$.bMarks[K]+$.tShift[K],q=$.eMarks[K];if(F<q){if(G=$.src.charCodeAt(F),G===45||G===61){if(F=$.skipChars(F,G),F=$.skipSpaces(F),F>=q){Q=G===61?1:2;break}}}}if($.sCount[K]<0)continue;let U=!1;for(let F=0,q=X.length;F<q;F++)if(X[F]($,K,J,!0)){U=!0;break}if(U)break}if(!Q)return $.parentType=Y,!1;let W=d$($.getLines(Z,K,$.blkIndent,!1));$.line=K+1;let H=$.push("heading_open","h"+String(Q),1);H.markup=String.fromCharCode(G),H.map=[Z,$.line];let z=$.push("inline","",0);z.content=W,z.map=[Z,$.line-1],z.children=[];let V=$.push("heading_close","h"+String(Q),-1);return V.markup=String.fromCharCode(G),$.parentType=Y,!0}function pV($,Z,J){let X=$.md.block.ruler.getRules("paragraph"),Y=$.parentType,Q=Z+1;$.parentType="paragraph";for(;Q<J&&!$.isEmpty(Q);Q++){if($.sCount[Q]-$.blkIndent>3)continue;if($.sCount[Q]<0)continue;let H=!1;for(let z=0,V=X.length;z<V;z++)if(X[z]($,Q,J,!0)){H=!0;break}if(H)break}let G=d$($.getLines(Z,Q,$.blkIndent,!1));$.line=Q;let K=$.push("paragraph_open","p",1);K.map=[Z,$.line];let W=$.push("inline","",0);return W.content=G,W.map=[Z,$.line],W.children=[],$.push("paragraph_close","p",-1),$.parentType=Y,!0}var BQ=[["table",kV,["paragraph","reference"]],["code",hV],["fence",vV,["paragraph","reference","blockquote","list"]],["blockquote",bV,["paragraph","reference","blockquote","list"]],["hr",fV,["paragraph","reference","blockquote","list"]],["list",gV,["paragraph","reference","blockquote"]],["reference",uV],["html_block",mV,["paragraph","reference","blockquote"]],["heading",cV,["paragraph","reference","blockquote"]],["lheading",dV],["paragraph",pV]];function NQ(){this.ruler=new p$;for(let $=0;$<BQ.length;$++)this.ruler.push(BQ[$][0],BQ[$][1],{alt:(BQ[$][2]||[]).slice()})}NQ.prototype.tokenize=function($,Z,J){let X=this.ruler.getRules(""),Y=X.length,Q=$.md.options.maxNesting,G=Z,K=!1;while(G<J){if($.line=G=$.skipEmptyLines(G),G>=J)break;if($.sCount[G]<$.blkIndent)break;if($.level>=Q){$.line=J;break}let W=$.line,H=!1;for(let z=0;z<Y;z++)if(H=X[z]($,G,J,!1),H){if(W>=$.line)throw Error("block rule didn't increment state.line");break}if(!H)throw Error("none of the block rules matched");if($.tight=!K,$.isEmpty($.line-1))K=!0;if(G=$.line,G<J&&$.isEmpty(G))K=!0,G++,$.line=G}};NQ.prototype.parse=function($,Z,J,X){if(!$)return;let Y=new this.State($,Z,J,X);this.tokenize(Y,Y.line,Y.lineMax)};NQ.prototype.State=dB;var rB=NQ;function vJ($,Z,J,X){this.src=$,this.env=J,this.md=Z,this.tokens=X,this.tokens_meta=Array(X.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}vJ.prototype.pushPending=function(){let $=new t9("text","",0);return $.content=this.pending,$.level=this.pendingLevel,this.tokens.push($),this.pending="",$};vJ.prototype.push=function($,Z,J){if(this.pending)this.pushPending();let X=new t9($,Z,J),Y=null;if(J<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(X.level=this.level,J>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],Y={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(X),this.tokens_meta.push(Y),X};vJ.prototype.scanDelims=function($,Z){let J=this.posMax,X=this.src.charCodeAt($),Y;if($===0)Y=32;else if($===1){if(Y=this.src.charCodeAt(0),(Y&63488)===55296)Y=65533}else if(Y=this.src.charCodeAt($-1),(Y&64512)===56320){let O=this.src.charCodeAt($-2);Y=(O&64512)===55296?65536+(O-55296<<10)+(Y-56320):65533}else if((Y&64512)===55296)Y=65533;let Q=$;while(Q<J&&this.src.charCodeAt(Q)===X)Q++;let G=Q-$,K=Q<J?this.src.charCodeAt(Q):32;if((K&64512)===55296){let O=this.src.charCodeAt(Q+1);K=(O&64512)===56320?65536+(K-55296<<10)+(O-56320):65533}else if((K&64512)===56320)K=65533;let W=m$(Y)||u$(Y),H=m$(K)||u$(K),z=g$(Y),V=g$(K),U=!V&&(!H||z||W),F=!z&&(!W||V||H);return{can_open:U&&(Z||!F||W),can_close:F&&(Z||!U||H),length:G}};vJ.prototype.Token=t9;var tB=vJ;function ic($){switch($){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function lV($,Z){let J=$.pos;while(J<$.posMax&&!ic($.src.charCodeAt(J)))J++;if(J===$.pos)return!1;if(!Z)$.pending+=$.src.slice($.pos,J);return $.pos=J,!0}var nc=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function iV($,Z){if(!$.md.options.linkify)return!1;if($.linkLevel>0)return!1;let{pos:J,posMax:X}=$;if(J+3>X)return!1;if($.src.charCodeAt(J)!==58)return!1;if($.src.charCodeAt(J+1)!==47)return!1;if($.src.charCodeAt(J+2)!==47)return!1;let Y=$.pending.match(nc);if(!Y)return!1;let Q=Y[1],G=$.md.linkify.matchAtStart($.src.slice(J-Q.length));if(!G)return!1;let K=G.url;if(K.length<=Q.length)return!1;let W=K.length;while(W>0&&K.charCodeAt(W-1)===42)W--;if(W!==K.length)K=K.slice(0,W);let H=$.md.normalizeLink(K);if(!$.md.validateLink(H))return!1;if(!Z){$.pending=$.pending.slice(0,-Q.length);let z=$.push("link_open","a",1);z.attrs=[["href",H]],z.markup="linkify",z.info="auto";let V=$.push("text","",0);V.content=$.md.normalizeLinkText(K);let U=$.push("link_close","a",-1);U.markup="linkify",U.info="auto"}return $.pos+=K.length-Q.length,!0}function nV($,Z){let J=$.pos;if($.src.charCodeAt(J)!==10)return!1;let X=$.pending.length-1,Y=$.posMax;if(!Z)if(X>=0&&$.pending.charCodeAt(X)===32)if(X>=1&&$.pending.charCodeAt(X-1)===32){let Q=X-1;while(Q>=1&&$.pending.charCodeAt(Q-1)===32)Q--;$.pending=$.pending.slice(0,Q),$.push("hardbreak","br",0)}else $.pending=$.pending.slice(0,-1),$.push("softbreak","br",0);else $.push("softbreak","br",0);J++;while(J<Y&&Q1($.src.charCodeAt(J)))J++;return $.pos=J,!0}var oV=[];for(let $=0;$<256;$++)oV.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function($){oV[$.charCodeAt(0)]=1});function aV($,Z){let{pos:J,posMax:X}=$;if($.src.charCodeAt(J)!==92)return!1;if(J++,J>=X)return!1;let Y=$.src.charCodeAt(J);if(Y===10){if(!Z)$.push("hardbreak","br",0);J++;while(J<X){if(Y=$.src.charCodeAt(J),!Q1(Y))break;J++}return $.pos=J,!0}let Q=$.src[J];if(Y>=55296&&Y<=56319&&J+1<X){let K=$.src.charCodeAt(J+1);if(K>=56320&&K<=57343)Q+=$.src[J+1],J++}let G="\\"+Q;if(!Z){let K=$.push("text_special","",0);if(Y<256&&oV[Y]!==0)K.content=Q;else K.content=G;K.markup=G,K.info="escape"}return $.pos=J+1,!0}function sV($,Z){let J=$.pos;if($.src.charCodeAt(J)!==96)return!1;let Y=J;J++;let Q=$.posMax;while(J<Q&&$.src.charCodeAt(J)===96)J++;let G=$.src.slice(Y,J),K=G.length;if($.backticksScanned&&($.backticks[K]||0)<=Y){if(!Z)$.pending+=G;return $.pos+=K,!0}let W=J,H;while((H=$.src.indexOf("`",W))!==-1){W=H+1;while(W<Q&&$.src.charCodeAt(W)===96)W++;let z=W-H;if(z===K){if(!Z){let V=$.push("code_inline","code",0);V.markup=G,V.content=$.src.slice(J,H).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return $.pos=W,!0}$.backticks[z]=H}if($.backticksScanned=!0,!Z)$.pending+=G;return $.pos+=K,!0}function oc($,Z){let J=$.pos,X=$.src.charCodeAt(J);if(Z)return!1;if(X!==126)return!1;let Y=$.scanDelims($.pos,!0),Q=Y.length,G=String.fromCharCode(X);if(Q<2)return!1;let K;if(Q%2)K=$.push("text","",0),K.content=G,Q--;for(let W=0;W<Q;W+=2)K=$.push("text","",0),K.content=G+G,$.delimiters.push({marker:X,length:0,token:$.tokens.length-1,end:-1,open:Y.can_open,close:Y.can_close});return $.pos+=Y.length,!0}function eB($,Z){let J,X=[],Y=Z.length;for(let Q=0;Q<Y;Q++){let G=Z[Q];if(G.marker!==126)continue;if(G.end===-1)continue;let K=Z[G.end];if(J=$.tokens[G.token],J.type="s_open",J.tag="s",J.nesting=1,J.markup="~~",J.content="",J=$.tokens[K.token],J.type="s_close",J.tag="s",J.nesting=-1,J.markup="~~",J.content="",$.tokens[K.token-1].type==="text"&&$.tokens[K.token-1].content==="~")X.push(K.token-1)}while(X.length){let Q=X.pop(),G=Q+1;while(G<$.tokens.length&&$.tokens[G].type==="s_close")G++;if(G--,Q!==G)J=$.tokens[G],$.tokens[G]=$.tokens[Q],$.tokens[Q]=J}}function ac($){let Z=$.tokens_meta,J=$.tokens_meta.length;eB($,$.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)eB($,Z[X].delimiters)}var rV={tokenize:oc,postProcess:ac};function sc($,Z){let J=$.pos,X=$.src.charCodeAt(J);if(Z)return!1;if(X!==95&&X!==42)return!1;let Y=$.scanDelims($.pos,X===42);for(let Q=0;Q<Y.length;Q++){let G=$.push("text","",0);G.content=String.fromCharCode(X),$.delimiters.push({marker:X,length:Y.length,token:$.tokens.length-1,end:-1,open:Y.can_open,close:Y.can_close})}return $.pos+=Y.length,!0}function $N($,Z){let J=Z.length;for(let X=J-1;X>=0;X--){let Y=Z[X];if(Y.marker!==95&&Y.marker!==42)continue;if(Y.end===-1)continue;let Q=Z[Y.end],G=X>0&&Z[X-1].end===Y.end+1&&Z[X-1].marker===Y.marker&&Z[X-1].token===Y.token-1&&Z[Y.end+1].token===Q.token+1,K=String.fromCharCode(Y.marker),W=$.tokens[Y.token];W.type=G?"strong_open":"em_open",W.tag=G?"strong":"em",W.nesting=1,W.markup=G?K+K:K,W.content="";let H=$.tokens[Q.token];if(H.type=G?"strong_close":"em_close",H.tag=G?"strong":"em",H.nesting=-1,H.markup=G?K+K:K,H.content="",G)$.tokens[Z[X-1].token].content="",$.tokens[Z[Y.end+1].token].content="",X--}}function rc($){let Z=$.tokens_meta,J=$.tokens_meta.length;$N($,$.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)$N($,Z[X].delimiters)}var tV={tokenize:sc,postProcess:rc};function eV($,Z){let J,X,Y,Q,G="",K="",W=$.pos,H=!0;if($.src.charCodeAt($.pos)!==91)return!1;let{pos:z,posMax:V}=$,U=$.pos+1,F=$.md.helpers.parseLinkLabel($,$.pos,!0);if(F<0)return!1;let q=F+1;if(q<V&&$.src.charCodeAt(q)===40){H=!1,q++;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break;if(q>=V)return!1;if(W=q,Y=$.md.helpers.parseLinkDestination($.src,q,$.posMax),Y.ok){if(G=$.md.normalizeLink(Y.str),$.md.validateLink(G))q=Y.pos;else G="";W=q;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break;if(Y=$.md.helpers.parseLinkTitle($.src,q,$.posMax),q<V&&W!==q&&Y.ok){K=Y.str,q=Y.pos;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break}}if(q>=V||$.src.charCodeAt(q)!==41)H=!0;q++}if(H){if(typeof $.env.references>"u")return!1;if(q<V&&$.src.charCodeAt(q)===91)if(W=q+1,q=$.md.helpers.parseLinkLabel($,q),q>=0)X=$.src.slice(W,q++);else q=F+1;else q=F+1;if(!X)X=$.src.slice(U,F);if(Q=$.env.references[c$(X)],!Q)return $.pos=z,!1;G=Q.href,K=Q.title}if(!Z){$.pos=U,$.posMax=F;let D=$.push("link_open","a",1),O=[["href",G]];if(D.attrs=O,K)O.push(["title",K]);$.linkLevel++,$.md.inline.tokenize($),$.linkLevel--,$.push("link_close","a",-1)}return $.pos=q,$.posMax=V,!0}function $H($,Z){let J,X,Y,Q,G,K,W,H,z="",V=$.pos,U=$.posMax;if($.src.charCodeAt($.pos)!==33)return!1;if($.src.charCodeAt($.pos+1)!==91)return!1;let F=$.pos+2,q=$.md.helpers.parseLinkLabel($,$.pos+1,!1);if(q<0)return!1;if(Q=q+1,Q<U&&$.src.charCodeAt(Q)===40){Q++;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break;if(Q>=U)return!1;if(H=Q,K=$.md.helpers.parseLinkDestination($.src,Q,$.posMax),K.ok)if(z=$.md.normalizeLink(K.str),$.md.validateLink(z))Q=K.pos;else z="";H=Q;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break;if(K=$.md.helpers.parseLinkTitle($.src,Q,$.posMax),Q<U&&H!==Q&&K.ok){W=K.str,Q=K.pos;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break}else W="";if(Q>=U||$.src.charCodeAt(Q)!==41)return $.pos=V,!1;Q++}else{if(typeof $.env.references>"u")return!1;if(Q<U&&$.src.charCodeAt(Q)===91)if(H=Q+1,Q=$.md.helpers.parseLinkLabel($,Q),Q>=0)Y=$.src.slice(H,Q++);else Q=q+1;else Q=q+1;if(!Y)Y=$.src.slice(F,q);if(G=$.env.references[c$(Y)],!G)return $.pos=V,!1;z=G.href,W=G.title}if(!Z){X=$.src.slice(F,q);let D=[];$.md.inline.parse(X,$.md,$.env,D);let O=$.push("image","img",0),B=[["src",z],["alt",""]];if(O.attrs=B,O.children=D,O.content=X,W)B.push(["title",W])}return $.pos=Q,$.posMax=U,!0}var tc=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ec=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ZH($,Z){let J=$.pos;if($.src.charCodeAt(J)!==60)return!1;let{pos:X,posMax:Y}=$;for(;;){if(++J>=Y)return!1;let G=$.src.charCodeAt(J);if(G===60)return!1;if(G===62)break}let Q=$.src.slice(X+1,J);if(ec.test(Q)){let G=$.md.normalizeLink(Q);if(!$.md.validateLink(G))return!1;if(!Z){let K=$.push("link_open","a",1);K.attrs=[["href",G]],K.markup="autolink",K.info="auto";let W=$.push("text","",0);W.content=$.md.normalizeLinkText(Q);let H=$.push("link_close","a",-1);H.markup="autolink",H.info="auto"}return $.pos+=Q.length+2,!0}if(tc.test(Q)){let G=$.md.normalizeLink("mailto:"+Q);if(!$.md.validateLink(G))return!1;if(!Z){let K=$.push("link_open","a",1);K.attrs=[["href",G]],K.markup="autolink",K.info="auto";let W=$.push("text","",0);W.content=$.md.normalizeLinkText(Q);let H=$.push("link_close","a",-1);H.markup="autolink",H.info="auto"}return $.pos+=Q.length+2,!0}return!1}function $d($){return/^<a[>\s]/i.test($)}function Zd($){return/^<\/a\s*>/i.test($)}function Jd($){let Z=$|32;return Z>=97&&Z<=122}function JH($,Z){if(!$.md.options.html)return!1;let{posMax:J,pos:X}=$;if($.src.charCodeAt(X)!==60||X+2>=J)return!1;let Y=$.src.charCodeAt(X+1);if(Y!==33&&Y!==63&&Y!==47&&!Jd(Y))return!1;let Q=$.src.slice(X).match(aB);if(!Q)return!1;if(!Z){let G=$.push("html_inline","",0);if(G.content=Q[0],$d(G.content))$.linkLevel++;if(Zd(G.content))$.linkLevel--}return $.pos+=Q[0].length,!0}var Xd=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Yd=/^&([a-z][a-z0-9]{1,31});/i;function XH($,Z){let{pos:J,posMax:X}=$;if($.src.charCodeAt(J)!==38)return!1;if(J+1>=X)return!1;if($.src.charCodeAt(J+1)===35){let Q=$.src.slice(J).match(Xd);if(Q){if(!Z){let G=Q[1][0].toLowerCase()==="x"?parseInt(Q[1].slice(1),16):parseInt(Q[1],10),K=$.push("text_special","",0);K.content=UQ(G)?QZ(G):QZ(65533),K.markup=Q[0],K.info="entity"}return $.pos+=Q[0].length,!0}}else{let Q=$.src.slice(J).match(Yd);if(Q){let G=hJ(Q[0]);if(G!==Q[0]){if(!Z){let K=$.push("text_special","",0);K.content=G,K.markup=Q[0],K.info="entity"}return $.pos+=Q[0].length,!0}}}return!1}function ZN($){let Z={},J=$.length;if(!J)return;let X=0,Y=-2,Q=[];for(let G=0;G<J;G++){let K=$[G];if(Q.push(0),$[X].marker!==K.marker||Y!==K.token-1)X=G;if(Y=K.token,K.length=K.length||0,!K.close)continue;if(!Z.hasOwnProperty(K.marker))Z[K.marker]=[-1,-1,-1,-1,-1,-1];let W=Z[K.marker][(K.open?3:0)+K.length%3],H=X-Q[X]-1,z=H;for(;H>W;H-=Q[H]+1){let V=$[H];if(V.marker!==K.marker)continue;if(V.open&&V.end<0){let U=!1;if(V.close||K.open){if((V.length+K.length)%3===0){if(V.length%3!==0||K.length%3!==0)U=!0}}if(!U){let F=H>0&&!$[H-1].open?Q[H-1]+1:0;Q[G]=G-H+F,Q[H]=F,K.open=!1,V.end=G,V.close=!1,z=-1,Y=-2;break}}}if(z!==-1)Z[K.marker][(K.open?3:0)+(K.length||0)%3]=z}}function YH($){let Z=$.tokens_meta,J=$.tokens_meta.length;ZN($.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)ZN(Z[X].delimiters)}function QH($){let Z,J,X=0,Y=$.tokens,Q=$.tokens.length;for(Z=J=0;Z<Q;Z++){if(Y[Z].nesting<0)X--;if(Y[Z].level=X,Y[Z].nesting>0)X++;if(Y[Z].type==="text"&&Z+1<Q&&Y[Z+1].type==="text")Y[Z+1].content=Y[Z].content+Y[Z+1].content;else{if(Z!==J)Y[J]=Y[Z];J++}}if(Z!==J)Y.length=J}var GH=[["text",lV],["linkify",iV],["newline",nV],["escape",aV],["backticks",sV],["strikethrough",rV.tokenize],["emphasis",tV.tokenize],["link",eV],["image",$H],["autolink",ZH],["html_inline",JH],["entity",XH]],KH=[["balance_pairs",YH],["strikethrough",rV.postProcess],["emphasis",tV.postProcess],["fragments_join",QH]];function bJ(){this.ruler=new p$;for(let $=0;$<GH.length;$++)this.ruler.push(GH[$][0],GH[$][1]);this.ruler2=new p$;for(let $=0;$<KH.length;$++)this.ruler2.push(KH[$][0],KH[$][1])}bJ.prototype.skipToken=function($){let Z=$.pos,J=this.ruler.getRules(""),X=J.length,Y=$.md.options.maxNesting,Q=$.cache;if(typeof Q[Z]<"u"){$.pos=Q[Z];return}let G=!1;if($.level<Y){for(let K=0;K<X;K++)if($.level++,G=J[K]($,!0),$.level--,G){if(Z>=$.pos)throw Error("inline rule didn't increment state.pos");break}}else $.pos=$.posMax;if(!G)$.pos++;Q[Z]=$.pos};bJ.prototype.tokenize=function($){let Z=this.ruler.getRules(""),J=Z.length,X=$.posMax,Y=$.md.options.maxNesting;while($.pos<X){let Q=$.pos,G=!1;if($.level<Y){for(let K=0;K<J;K++)if(G=Z[K]($,!1),G){if(Q>=$.pos)throw Error("inline rule didn't increment state.pos");break}}if(G){if($.pos>=X)break;continue}$.pending+=$.src[$.pos++]}if($.pending)$.pushPending()};bJ.prototype.parse=function($,Z,J,X){let Y=new this.State($,Z,J,X);this.tokenize(Y);let Q=this.ruler2.getRules(""),G=Q.length;for(let K=0;K<G;K++)Q[K](Y)};bJ.prototype.State=tB;var JN=bJ;function WH($){let Z={};$=$||{},Z.src_Any=HQ.source,Z.src_Cc=zQ.source,Z.src_Z=qQ.source,Z.src_P=XZ.source,Z.src_ZPCc=[Z.src_Z,Z.src_P,Z.src_Cc].join("|"),Z.src_ZCc=[Z.src_Z,Z.src_Cc].join("|");let J="[><|]";return Z.src_pseudo_letter="(?:(?!"+J+"|"+Z.src_ZPCc+")"+Z.src_Any+")",Z.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",Z.src_auth="(?:(?:(?!"+Z.src_ZCc+"|[@/\\[\\]()]).)+@)?",Z.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",Z.src_host_terminator="(?=$|"+J+"|"+Z.src_ZPCc+")(?!"+($["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+Z.src_ZPCc+"))",Z.src_path="(?:[/?#](?:(?!"+Z.src_ZCc+"|"+J+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+Z.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+Z.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+Z.src_ZCc+"|[}]).)*\\}|\\\"(?:(?!"+Z.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+Z.src_ZCc+"|[']).)+\\'|\\'(?="+Z.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+Z.src_ZCc+"|[.]|$)|"+($["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+Z.src_ZCc+"|$)|;(?!"+Z.src_ZCc+"|$)|\\!+(?!"+Z.src_ZCc+"|[!]|$)|\\?(?!"+Z.src_ZCc+"|[?]|$))+|\\/)?",Z.src_email_name="[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\\"\\.a-zA-Z0-9_]*",Z.src_xn="xn--[a-z0-9\\-]{1,59}",Z.src_domain_root="(?:"+Z.src_xn+"|"+Z.src_pseudo_letter+"{1,63})",Z.src_domain="(?:"+Z.src_xn+"|(?:"+Z.src_pseudo_letter+")|(?:"+Z.src_pseudo_letter+"(?:-|"+Z.src_pseudo_letter+"){0,61}"+Z.src_pseudo_letter+"))",Z.src_host="(?:(?:(?:(?:"+Z.src_domain+")\\.)*"+Z.src_domain+"))",Z.tpl_host_fuzzy="(?:"+Z.src_ip4+"|(?:(?:(?:"+Z.src_domain+")\\.)+(?:%TLDS%)))",Z.tpl_host_no_ip_fuzzy="(?:(?:(?:"+Z.src_domain+")\\.)+(?:%TLDS%))",Z.src_host_strict=Z.src_host+Z.src_host_terminator,Z.tpl_host_fuzzy_strict=Z.tpl_host_fuzzy+Z.src_host_terminator,Z.src_host_port_strict=Z.src_host+Z.src_port+Z.src_host_terminator,Z.tpl_host_port_fuzzy_strict=Z.tpl_host_fuzzy+Z.src_port+Z.src_host_terminator,Z.tpl_host_port_no_ip_fuzzy_strict=Z.tpl_host_no_ip_fuzzy+Z.src_port+Z.src_host_terminator,Z.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+Z.src_ZPCc+"|>|$))",Z.tpl_email_fuzzy="(^|"+J+'|"|\\(|'+Z.src_ZCc+")("+Z.src_email_name+"@"+Z.tpl_host_fuzzy_strict+")",Z.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+Z.src_ZPCc+"))"+"((?![$+<=>^`||])"+Z.tpl_host_port_fuzzy_strict+Z.src_path+")",Z.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+Z.src_ZPCc+"))"+"((?![$+<=>^`||])"+Z.tpl_host_port_no_ip_fuzzy_strict+Z.src_path+")",Z}function VH($){return Array.prototype.slice.call(arguments,1).forEach(function(J){if(!J)return;Object.keys(J).forEach(function(X){$[X]=J[X]})}),$}function LQ($){return Object.prototype.toString.call($)}function Qd($){return LQ($)==="[object String]"}function Gd($){return LQ($)==="[object Object]"}function Kd($){return LQ($)==="[object RegExp]"}function XN($){return LQ($)==="[object Function]"}function Wd($){return $.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var QN={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Vd($){return Object.keys($||{}).reduce(function(Z,J){return Z||QN.hasOwnProperty(J)},!1)}var Hd={"http:":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.http)J.re.http=new RegExp("^\\/\\/"+J.re.src_auth+J.re.src_host_port_strict+J.re.src_path,"i");if(J.re.http.test(X))return X.match(J.re.http)[0].length;return 0}},"https:":"http:","ftp:":"http:","//":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.no_http)J.re.no_http=new RegExp("^"+J.re.src_auth+"(?:localhost|(?:(?:"+J.re.src_domain+")\\.)+"+J.re.src_domain_root+")"+J.re.src_port+J.re.src_host_terminator+J.re.src_path,"i");if(J.re.no_http.test(X)){if(Z>=3&&$[Z-3]===":")return 0;if(Z>=3&&$[Z-3]==="/")return 0;return X.match(J.re.no_http)[0].length}return 0}},"mailto:":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.mailto)J.re.mailto=new RegExp("^"+J.re.src_email_name+"@"+J.re.src_host_strict,"i");if(J.re.mailto.test(X))return X.match(J.re.mailto)[0].length;return 0}}},zd="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Fd="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function qd($){return function(Z,J){let X=Z.slice(J);if($.test(X))return X.match($)[0].length;return 0}}function YN(){return function($,Z){Z.normalize($)}}function AQ($){let Z=$.re=WH($.__opts__),J=$.__tlds__.slice();if($.onCompile(),!$.__tlds_replaced__)J.push(zd);J.push(Z.src_xn),Z.src_tlds=J.join("|");function X(K){return K.replace("%TLDS%",Z.src_tlds)}Z.email_fuzzy=RegExp(X(Z.tpl_email_fuzzy),"i"),Z.email_fuzzy_global=RegExp(X(Z.tpl_email_fuzzy),"ig"),Z.link_fuzzy=RegExp(X(Z.tpl_link_fuzzy),"i"),Z.link_fuzzy_global=RegExp(X(Z.tpl_link_fuzzy),"ig"),Z.link_no_ip_fuzzy=RegExp(X(Z.tpl_link_no_ip_fuzzy),"i"),Z.link_no_ip_fuzzy_global=RegExp(X(Z.tpl_link_no_ip_fuzzy),"ig"),Z.host_fuzzy_test=RegExp(X(Z.tpl_host_fuzzy_test),"i");let Y=[];$.__compiled__={};function Q(K,W){throw Error('(LinkifyIt) Invalid schema "'+K+'": '+W)}Object.keys($.__schemas__).forEach(function(K){let W=$.__schemas__[K];if(W===null)return;let H={validate:null,link:null};if($.__compiled__[K]=H,Gd(W)){if(Kd(W.validate))H.validate=qd(W.validate);else if(XN(W.validate))H.validate=W.validate;else Q(K,W);if(XN(W.normalize))H.normalize=W.normalize;else if(!W.normalize)H.normalize=YN();else Q(K,W);return}if(Qd(W)){Y.push(K);return}Q(K,W)}),Y.forEach(function(K){if(!$.__compiled__[$.__schemas__[K]])return;$.__compiled__[K].validate=$.__compiled__[$.__schemas__[K]].validate,$.__compiled__[K].normalize=$.__compiled__[$.__schemas__[K]].normalize}),$.__compiled__[""]={validate:null,normalize:YN()};let G=Object.keys($.__compiled__).filter(function(K){return K.length>0&&$.__compiled__[K]}).map(Wd).join("|");$.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+Z.src_ZPCc+"))("+G+")","i"),$.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+Z.src_ZPCc+"))("+G+")","ig"),$.re.schema_at_start=RegExp("^"+$.re.schema_search.source,"i"),$.re.pretest=RegExp("("+$.re.schema_test.source+")|("+$.re.host_fuzzy_test.source+")|@","i")}function GN($,Z,J,X){let Y=$.slice(J,X);this.schema=Z.toLowerCase(),this.index=J,this.lastIndex=X,this.raw=Y,this.text=Y,this.url=Y}function O6($,Z){if(!(this instanceof O6))return new O6($,Z);if(!Z){if(Vd($))Z=$,$={}}this.__opts__=VH({},QN,Z),this.__schemas__=VH({},Hd,$),this.__compiled__={},this.__tlds__=Fd,this.__tlds_replaced__=!1,this.re={},AQ(this)}O6.prototype.add=function(Z,J){return this.__schemas__[Z]=J,AQ(this),this};O6.prototype.set=function(Z){return this.__opts__=VH(this.__opts__,Z),this};O6.prototype.test=function(Z){if(!Z.length)return!1;let J,X;if(this.re.schema_test.test(Z)){X=this.re.schema_search,X.lastIndex=0;while((J=X.exec(Z))!==null)if(this.testSchemaAt(Z,J[2],X.lastIndex))return!0}if(this.__opts__.fuzzyLink&&this.__compiled__["http:"]){if(Z.search(this.re.host_fuzzy_test)>=0){if(Z.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null)return!0}}if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]){if(Z.indexOf("@")>=0){if(Z.match(this.re.email_fuzzy)!==null)return!0}}return!1};O6.prototype.pretest=function(Z){return this.re.pretest.test(Z)};O6.prototype.testSchemaAt=function(Z,J,X){if(!this.__compiled__[J.toLowerCase()])return 0;return this.__compiled__[J.toLowerCase()].validate(Z,X,this)};O6.prototype.match=function(Z){let J=[],X=[],Y=[],Q=[],G,K,W;function H(U,F){if(!U)return F;if(!F)return U;if(U.index!==F.index)return U.index<F.index?U:F;return U.lastIndex>=F.lastIndex?U:F}if(!Z.length)return null;if(this.re.schema_test.test(Z)){W=this.re.schema_search,W.lastIndex=0;while((G=W.exec(Z))!==null)if(K=this.testSchemaAt(Z,G[2],W.lastIndex),K)X.push({schema:G[2],index:G.index+G[1].length,lastIndex:G.index+G[0].length+K})}if(this.__opts__.fuzzyLink&&this.__compiled__["http:"]){W=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,W.lastIndex=0;while((G=W.exec(Z))!==null)Y.push({schema:"",index:G.index+G[1].length,lastIndex:G.index+G[0].length})}if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]){W=this.re.email_fuzzy_global,W.lastIndex=0;while((G=W.exec(Z))!==null)Q.push({schema:"mailto:",index:G.index+G[1].length,lastIndex:G.index+G[0].length})}let z=[0,0,0],V=0;for(;;){let U=[X[z[0]],Q[z[1]],Y[z[2]]],F=H(H(U[0],U[1]),U[2]);if(!F)break;if(F===U[0])z[0]++;else if(F===U[1])z[1]++;else z[2]++;if(F.index<V)continue;let q=new GN(Z,F.schema,F.index,F.lastIndex);this.__compiled__[q.schema].normalize(q,this),J.push(q),V=F.lastIndex}if(J.length)return J;return null};O6.prototype.matchAtStart=function(Z){if(!Z.length)return null;let J=this.re.schema_at_start.exec(Z);if(!J)return null;let X=this.testSchemaAt(Z,J[2],J[0].length);if(!X)return null;let Y=new GN(Z,J[2],J.index+J[1].length,J.index+J[0].length+X);return this.__compiled__[Y.schema].normalize(Y,this),Y};O6.prototype.tlds=function(Z,J){if(Z=Array.isArray(Z)?Z:[Z],!J)return this.__tlds__=Z.slice(),this.__tlds_replaced__=!0,AQ(this),this;return this.__tlds__=this.__tlds__.concat(Z).sort().filter(function(X,Y,Q){return X!==Q[Y-1]}).reverse(),AQ(this),this};O6.prototype.normalize=function(Z){if(!Z.schema)Z.url="http://"+Z.url;if(Z.schema==="mailto:"&&!/^mailto:/i.test(Z.url))Z.url="mailto:"+Z.url};O6.prototype.onCompile=function(){};var KN=O6;var zH=q8(UN(),1);var ON={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var BN={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var NN={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var Td={default:ON,zero:BN,commonmark:NN},jd=/^(vbscript|javascript|file|data):/,Pd=/^data:image\/(gif|png|jpeg|webp);/;function Id($){let Z=$.trim().toLowerCase();return jd.test(Z)?Pd.test(Z):!0}var AN=["http:","https:","mailto:"];function Cd($){let Z=xJ($,!0);if(Z.hostname){if(!Z.protocol||AN.indexOf(Z.protocol)>=0)try{Z.hostname=zH.default.toASCII(Z.hostname)}catch(J){}}return KQ(JZ(Z))}function wd($){let Z=xJ($,!0);if(Z.hostname){if(!Z.protocol||AN.indexOf(Z.protocol)>=0)try{Z.hostname=zH.default.toUnicode(Z.hostname)}catch(J){}}return yJ(JZ(Z),yJ.defaultChars+"%")}function h6($,Z){if(!(this instanceof h6))return new h6($,Z);if(!Z){if(!DQ($))Z=$||{},$="default"}if(this.inline=new JN,this.block=new rB,this.core=new cB,this.renderer=new vB,this.linkify=new KN,this.validateLink=Id,this.normalizeLink=Cd,this.normalizeLinkText=wd,this.utils=AV,this.helpers=YZ({},EV),this.options={},this.configure($),Z)this.set(Z)}h6.prototype.set=function($){return YZ(this.options,$),this};h6.prototype.configure=function($){let Z=this;if(DQ($)){let J=$;if($=Td[J],!$)throw Error('Wrong `markdown-it` preset "'+J+'", check name')}if(!$)throw Error("Wrong `markdown-it` preset, can't be empty");if($.options)Z.set($.options);if($.components)Object.keys($.components).forEach(function(J){if($.components[J].rules)Z[J].ruler.enableOnly($.components[J].rules);if($.components[J].rules2)Z[J].ruler2.enableOnly($.components[J].rules2)});return this};h6.prototype.enable=function($,Z){let J=[];if(!Array.isArray($))$=[$];["core","block","inline"].forEach(function(Y){J=J.concat(this[Y].ruler.enable($,!0))},this),J=J.concat(this.inline.ruler2.enable($,!0));let X=$.filter(function(Y){return J.indexOf(Y)<0});if(X.length&&!Z)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+X);return this};h6.prototype.disable=function($,Z){let J=[];if(!Array.isArray($))$=[$];["core","block","inline"].forEach(function(Y){J=J.concat(this[Y].ruler.disable($,!0))},this),J=J.concat(this.inline.ruler2.disable($,!0));let X=$.filter(function(Y){return J.indexOf(Y)<0});if(X.length&&!Z)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+X);return this};h6.prototype.use=function($){let Z=[this].concat(Array.prototype.slice.call(arguments,1));return $.apply($,Z),this};h6.prototype.parse=function($,Z){if(typeof $!=="string")throw Error("Input data should be a String");let J=new this.core.State($,this,Z);return this.core.process(J),J.tokens};h6.prototype.render=function($,Z){return Z=Z||{},this.renderer.render(this.parse($,Z),this.options,Z)};h6.prototype.parseInline=function($,Z){let J=new this.core.State($,this,Z);return J.inlineMode=!0,this.core.process(J),J.tokens};h6.prototype.renderInline=function($,Z){return Z=Z||{},this.renderer.render(this.parseInline($,Z),this.options,Z)};var FH=h6;var nO=null;async function UH0(){if(!nO)nO=await Promise.resolve().then(() => (ou(),nu));return nO}function OH0(){return process.env.PUPPETEER_EXECUTABLE_PATH?.trim()||"/usr/bin/chromium"}var SJ=null;async function BH0(){if(!SJ)SJ=(async()=>{let $=await UH0(),Z=OH0();return $.launch({executablePath:Z,headless:!0,args:["--no-sandbox","--disable-setuid-sandbox","--disable-dev-shm-usage","--font-render-hinting=none"],defaultViewport:{width:800,height:600,deviceScaleFactor:2}})})();return SJ}async function au(){if(!SJ)return;try{await(await SJ).close()}catch{}finally{SJ=null}}var ZQ=new FH({html:!1,linkify:!0,breaks:!1,typographer:!1});ZQ.disable("image");ZQ.renderer.rules.image=()=>"";var su=($,Z)=>{return($[Z].content||"").replace(/<img\b[^>]*>/gi,"")};ZQ.renderer.rules.html_inline=su;ZQ.renderer.rules.html_block=su;function NH0($){return`<!DOCTYPE html>
|
|
230
|
+
`,Q.map=[Z,$.line],!0}function vV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;if(Y+3>Q)return!1;let G=$.src.charCodeAt(Y);if(G!==126&&G!==96)return!1;let K=Y;Y=$.skipChars(Y,G);let W=Y-K;if(W<3)return!1;let H=$.src.slice(K,Y),z=$.src.slice(Y,Q);if(G===96){if(z.indexOf(String.fromCharCode(G))>=0)return!1}if(X)return!0;let V=Z,U=!1;for(;;){if(V++,V>=J)break;if(Y=K=$.bMarks[V]+$.tShift[V],Q=$.eMarks[V],Y<Q&&$.sCount[V]<$.blkIndent)break;if($.src.charCodeAt(Y)!==G)continue;if($.sCount[V]-$.blkIndent>=4)continue;if(Y=$.skipChars(Y,G),Y-K<W)continue;if(Y=$.skipSpaces(Y),Y<Q)continue;U=!0;break}W=$.sCount[Z],$.line=V+(U?1:0);let F=$.push("fence","code",0);return F.info=z,F.content=$.getLines(Z+1,V,W,!0),F.markup=H,F.map=[Z,$.line],!0}function bV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z],G=$.lineMax;if($.sCount[Z]-$.blkIndent>=4)return!1;if($.src.charCodeAt(Y)!==62)return!1;if(X)return!0;let K=[],W=[],H=[],z=[],V=$.md.block.ruler.getRules("blockquote"),U=$.parentType;$.parentType="blockquote";let F=!1,q;for(q=Z;q<J;q++){let L=$.sCount[q]<$.blkIndent;if(Y=$.bMarks[q]+$.tShift[q],Q=$.eMarks[q],Y>=Q)break;if($.src.charCodeAt(Y++)===62&&!L){let E=$.sCount[q]+1,y,C;if($.src.charCodeAt(Y)===32)Y++,E++,C=!1,y=!0;else if($.src.charCodeAt(Y)===9)if(y=!0,($.bsCount[q]+E)%4===3)Y++,E++,C=!1;else C=!0;else y=!1;let T=E;K.push($.bMarks[q]),$.bMarks[q]=Y;while(Y<Q){let w=$.src.charCodeAt(Y);if(Q1(w))if(w===9)T+=4-(T+$.bsCount[q]+(C?1:0))%4;else T++;else break;Y++}F=Y>=Q,W.push($.bsCount[q]),$.bsCount[q]=$.sCount[q]+1+(y?1:0),H.push($.sCount[q]),$.sCount[q]=T-E,z.push($.tShift[q]),$.tShift[q]=Y-$.bMarks[q];continue}if(F)break;let M=!1;for(let E=0,y=V.length;E<y;E++)if(V[E]($,q,J,!0)){M=!0;break}if(M){if($.lineMax=q,$.blkIndent!==0)K.push($.bMarks[q]),W.push($.bsCount[q]),z.push($.tShift[q]),H.push($.sCount[q]),$.sCount[q]-=$.blkIndent;break}K.push($.bMarks[q]),W.push($.bsCount[q]),z.push($.tShift[q]),H.push($.sCount[q]),$.sCount[q]=-1}let D=$.blkIndent;$.blkIndent=0;let O=$.push("blockquote_open","blockquote",1);O.markup=">";let B=[Z,0];O.map=B,$.md.block.tokenize($,Z,q);let A=$.push("blockquote_close","blockquote",-1);A.markup=">",$.lineMax=G,$.parentType=U,B[1]=$.line;for(let L=0;L<z.length;L++)$.bMarks[L+Z]=K[L],$.tShift[L+Z]=z[L],$.sCount[L+Z]=H[L],$.bsCount[L+Z]=W[L];return $.blkIndent=D,!0}function fV($,Z,J,X){let Y=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;let Q=$.bMarks[Z]+$.tShift[Z],G=$.src.charCodeAt(Q++);if(G!==42&&G!==45&&G!==95)return!1;let K=1;while(Q<Y){let H=$.src.charCodeAt(Q++);if(H!==G&&!Q1(H))return!1;if(H===G)K++}if(K<3)return!1;if(X)return!0;$.line=Z+1;let W=$.push("hr","hr",0);return W.map=[Z,$.line],W.markup=Array(K+1).join(String.fromCharCode(G)),!0}function lB($,Z){let J=$.eMarks[Z],X=$.bMarks[Z]+$.tShift[Z],Y=$.src.charCodeAt(X++);if(Y!==42&&Y!==45&&Y!==43)return-1;if(X<J){let Q=$.src.charCodeAt(X);if(!Q1(Q))return-1}return X}function iB($,Z){let J=$.bMarks[Z]+$.tShift[Z],X=$.eMarks[Z],Y=J;if(Y+1>=X)return-1;let Q=$.src.charCodeAt(Y++);if(Q<48||Q>57)return-1;for(;;){if(Y>=X)return-1;if(Q=$.src.charCodeAt(Y++),Q>=48&&Q<=57){if(Y-J>=10)return-1;continue}if(Q===41||Q===46)break;return-1}if(Y<X){if(Q=$.src.charCodeAt(Y),!Q1(Q))return-1}return Y}function dc($,Z){let J=$.level+2;for(let X=Z+2,Y=$.tokens.length-2;X<Y;X++)if($.tokens[X].level===J&&$.tokens[X].type==="paragraph_open")$.tokens[X+2].hidden=!0,$.tokens[X].hidden=!0,X+=2}function gV($,Z,J,X){let Y,Q,G,K,W=Z,H=!0;if($.sCount[W]-$.blkIndent>=4)return!1;if($.listIndent>=0&&$.sCount[W]-$.listIndent>=4&&$.sCount[W]<$.blkIndent)return!1;let z=!1;if(X&&$.parentType==="paragraph"){if($.sCount[W]>=$.blkIndent)z=!0}let V,U,F;if((F=iB($,W))>=0){if(V=!0,G=$.bMarks[W]+$.tShift[W],U=Number($.src.slice(G,F-1)),z&&U!==1)return!1}else if((F=lB($,W))>=0)V=!1;else return!1;if(z){if($.skipSpaces(F)>=$.eMarks[W])return!1}if(X)return!0;let q=$.src.charCodeAt(F-1),D=$.tokens.length;if(V){if(K=$.push("ordered_list_open","ol",1),U!==1)K.attrs=[["start",U]]}else K=$.push("bullet_list_open","ul",1);let O=[W,0];K.map=O,K.markup=String.fromCharCode(q);let B=!1,A=$.md.block.ruler.getRules("list"),L=$.parentType;$.parentType="list";while(W<J){Q=F,Y=$.eMarks[W];let M=$.sCount[W]+F-($.bMarks[W]+$.tShift[W]),E=M;while(Q<Y){let H0=$.src.charCodeAt(Q);if(H0===9)E+=4-(E+$.bsCount[W])%4;else if(H0===32)E++;else break;Q++}let y=Q,C;if(y>=Y)C=1;else C=E-M;if(C>4)C=1;let T=M+C;K=$.push("list_item_open","li",1),K.markup=String.fromCharCode(q);let w=[W,0];if(K.map=w,V)K.info=$.src.slice(G,F-1);let u=$.tight,f=$.tShift[W],m=$.sCount[W],e=$.listIndent;if($.listIndent=$.blkIndent,$.blkIndent=T,$.tight=!0,$.tShift[W]=y-$.bMarks[W],$.sCount[W]=E,y>=Y&&$.isEmpty(W+1))$.line=Math.min($.line+2,J);else $.md.block.tokenize($,W,J,!0);if(!$.tight||B)H=!1;if(B=$.line-W>1&&$.isEmpty($.line-1),$.blkIndent=$.listIndent,$.listIndent=e,$.tShift[W]=f,$.sCount[W]=m,$.tight=u,K=$.push("list_item_close","li",-1),K.markup=String.fromCharCode(q),W=$.line,w[1]=W,W>=J)break;if($.sCount[W]<$.blkIndent)break;if($.sCount[W]-$.blkIndent>=4)break;let V0=!1;for(let H0=0,v=A.length;H0<v;H0++)if(A[H0]($,W,J,!0)){V0=!0;break}if(V0)break;if(V){if(F=iB($,W),F<0)break;G=$.bMarks[W]+$.tShift[W]}else if(F=lB($,W),F<0)break;if(q!==$.src.charCodeAt(F-1))break}if(V)K=$.push("ordered_list_close","ol",-1);else K=$.push("bullet_list_close","ul",-1);if(K.markup=String.fromCharCode(q),O[1]=W,$.line=W,$.parentType=L,H)dc($,D);return!0}function uV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z],G=Z+1;if($.sCount[Z]-$.blkIndent>=4)return!1;if($.src.charCodeAt(Y)!==91)return!1;function K(A){let L=$.lineMax;if(A>=L||$.isEmpty(A))return null;let M=!1;if($.sCount[A]-$.blkIndent>3)M=!0;if($.sCount[A]<0)M=!0;if(!M){let C=$.md.block.ruler.getRules("reference"),T=$.parentType;$.parentType="reference";let w=!1;for(let u=0,f=C.length;u<f;u++)if(C[u]($,A,L,!0)){w=!0;break}if($.parentType=T,w)return null}let E=$.bMarks[A]+$.tShift[A],y=$.eMarks[A];return $.src.slice(E,y+1)}let W=$.src.slice(Y,Q+1);Q=W.length;let H=-1;for(Y=1;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===91)return!1;else if(A===93){H=Y;break}else if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(A===92){if(Y++,Y<Q&&W.charCodeAt(Y)===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}}}if(H<0||W.charCodeAt(H+1)!==58)return!1;for(Y=H+2;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(Q1(A));else break}let z=$.md.helpers.parseLinkDestination(W,Y,Q);if(!z.ok)return!1;let V=$.md.normalizeLink(z.str);if(!$.md.validateLink(V))return!1;Y=z.pos;let U=Y,F=G,q=Y;for(;Y<Q;Y++){let A=W.charCodeAt(Y);if(A===10){let L=K(G);if(L!==null)W+=L,Q=W.length,G++}else if(Q1(A));else break}let D=$.md.helpers.parseLinkTitle(W,Y,Q);while(D.can_continue){let A=K(G);if(A===null)break;W+=A,Y=Q,Q=W.length,G++,D=$.md.helpers.parseLinkTitle(W,Y,Q,D)}let O;if(Y<Q&&q!==Y&&D.ok)O=D.str,Y=D.pos;else O="",Y=U,G=F;while(Y<Q){let A=W.charCodeAt(Y);if(!Q1(A))break;Y++}if(Y<Q&&W.charCodeAt(Y)!==10){if(O){O="",Y=U,G=F;while(Y<Q){let A=W.charCodeAt(Y);if(!Q1(A))break;Y++}}}if(Y<Q&&W.charCodeAt(Y)!==10)return!1;let B=c$(W.slice(1,H));if(!B)return!1;if(X)return!0;if(typeof $.env.references>"u")$.env.references={};if(typeof $.env.references[B]>"u")$.env.references[B]={title:O,href:V};return $.line=G,!0}var nB=["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"];var pc=`(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*")`,lc="(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*"+pc+")?)",oB="<[A-Za-z][A-Za-z0-9\\-]*"+lc+"*\\s*\\/?>";var aB=new RegExp("^(?:"+oB+"|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),sB=new RegExp("^(?:"+oB+"|<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>)");var l$=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+nB.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(sB.source+"\\s*$"),/^$/,!1]];function mV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;if(!$.md.options.html)return!1;if($.src.charCodeAt(Y)!==60)return!1;let G=$.src.slice(Y,Q),K=0;for(;K<l$.length;K++)if(l$[K][0].test(G))break;if(K===l$.length)return!1;if(X)return l$[K][2];let W=Z+1,H=l$[K][1].test("");if(!l$[K][1].test(G))for(;W<J;W++){if($.sCount[W]<$.blkIndent){if(H||!$.isEmpty(W))break}if(Y=$.bMarks[W]+$.tShift[W],Q=$.eMarks[W],G=$.src.slice(Y,Q),l$[K][1].test(G)){if(G.length!==0)W++;break}}$.line=W;let z=$.push("html_block","",0);return z.map=[Z,W],z.content=$.getLines(Z,W,$.blkIndent,!0),!0}function cV($,Z,J,X){let Y=$.bMarks[Z]+$.tShift[Z],Q=$.eMarks[Z];if($.sCount[Z]-$.blkIndent>=4)return!1;let G=$.src.charCodeAt(Y);if(G!==35||Y>=Q)return!1;let K=1;G=$.src.charCodeAt(++Y);while(G===35&&Y<Q&&K<=6)K++,G=$.src.charCodeAt(++Y);if(K>6||Y<Q&&!Q1(G))return!1;if(X)return!0;Q=$.skipSpacesBack(Q,Y);let W=$.skipCharsBack(Q,35,Y);if(W>Y&&Q1($.src.charCodeAt(W-1)))Q=W;$.line=Z+1;let H=$.push("heading_open","h"+String(K),1);H.markup="########".slice(0,K),H.map=[Z,$.line];let z=$.push("inline","",0);z.content=d$($.src.slice(Y,Q)),z.map=[Z,$.line],z.children=[];let V=$.push("heading_close","h"+String(K),-1);return V.markup="########".slice(0,K),!0}function dV($,Z,J){let X=$.md.block.ruler.getRules("paragraph");if($.sCount[Z]-$.blkIndent>=4)return!1;let Y=$.parentType;$.parentType="paragraph";let Q=0,G,K=Z+1;for(;K<J&&!$.isEmpty(K);K++){if($.sCount[K]-$.blkIndent>3)continue;if($.sCount[K]>=$.blkIndent){let F=$.bMarks[K]+$.tShift[K],q=$.eMarks[K];if(F<q){if(G=$.src.charCodeAt(F),G===45||G===61){if(F=$.skipChars(F,G),F=$.skipSpaces(F),F>=q){Q=G===61?1:2;break}}}}if($.sCount[K]<0)continue;let U=!1;for(let F=0,q=X.length;F<q;F++)if(X[F]($,K,J,!0)){U=!0;break}if(U)break}if(!Q)return $.parentType=Y,!1;let W=d$($.getLines(Z,K,$.blkIndent,!1));$.line=K+1;let H=$.push("heading_open","h"+String(Q),1);H.markup=String.fromCharCode(G),H.map=[Z,$.line];let z=$.push("inline","",0);z.content=W,z.map=[Z,$.line-1],z.children=[];let V=$.push("heading_close","h"+String(Q),-1);return V.markup=String.fromCharCode(G),$.parentType=Y,!0}function pV($,Z,J){let X=$.md.block.ruler.getRules("paragraph"),Y=$.parentType,Q=Z+1;$.parentType="paragraph";for(;Q<J&&!$.isEmpty(Q);Q++){if($.sCount[Q]-$.blkIndent>3)continue;if($.sCount[Q]<0)continue;let H=!1;for(let z=0,V=X.length;z<V;z++)if(X[z]($,Q,J,!0)){H=!0;break}if(H)break}let G=d$($.getLines(Z,Q,$.blkIndent,!1));$.line=Q;let K=$.push("paragraph_open","p",1);K.map=[Z,$.line];let W=$.push("inline","",0);return W.content=G,W.map=[Z,$.line],W.children=[],$.push("paragraph_close","p",-1),$.parentType=Y,!0}var BQ=[["table",kV,["paragraph","reference"]],["code",hV],["fence",vV,["paragraph","reference","blockquote","list"]],["blockquote",bV,["paragraph","reference","blockquote","list"]],["hr",fV,["paragraph","reference","blockquote","list"]],["list",gV,["paragraph","reference","blockquote"]],["reference",uV],["html_block",mV,["paragraph","reference","blockquote"]],["heading",cV,["paragraph","reference","blockquote"]],["lheading",dV],["paragraph",pV]];function NQ(){this.ruler=new p$;for(let $=0;$<BQ.length;$++)this.ruler.push(BQ[$][0],BQ[$][1],{alt:(BQ[$][2]||[]).slice()})}NQ.prototype.tokenize=function($,Z,J){let X=this.ruler.getRules(""),Y=X.length,Q=$.md.options.maxNesting,G=Z,K=!1;while(G<J){if($.line=G=$.skipEmptyLines(G),G>=J)break;if($.sCount[G]<$.blkIndent)break;if($.level>=Q){$.line=J;break}let W=$.line,H=!1;for(let z=0;z<Y;z++)if(H=X[z]($,G,J,!1),H){if(W>=$.line)throw Error("block rule didn't increment state.line");break}if(!H)throw Error("none of the block rules matched");if($.tight=!K,$.isEmpty($.line-1))K=!0;if(G=$.line,G<J&&$.isEmpty(G))K=!0,G++,$.line=G}};NQ.prototype.parse=function($,Z,J,X){if(!$)return;let Y=new this.State($,Z,J,X);this.tokenize(Y,Y.line,Y.lineMax)};NQ.prototype.State=dB;var rB=NQ;function vJ($,Z,J,X){this.src=$,this.env=J,this.md=Z,this.tokens=X,this.tokens_meta=Array(X.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}vJ.prototype.pushPending=function(){let $=new t9("text","",0);return $.content=this.pending,$.level=this.pendingLevel,this.tokens.push($),this.pending="",$};vJ.prototype.push=function($,Z,J){if(this.pending)this.pushPending();let X=new t9($,Z,J),Y=null;if(J<0)this.level--,this.delimiters=this._prev_delimiters.pop();if(X.level=this.level,J>0)this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],Y={delimiters:this.delimiters};return this.pendingLevel=this.level,this.tokens.push(X),this.tokens_meta.push(Y),X};vJ.prototype.scanDelims=function($,Z){let J=this.posMax,X=this.src.charCodeAt($),Y;if($===0)Y=32;else if($===1){if(Y=this.src.charCodeAt(0),(Y&63488)===55296)Y=65533}else if(Y=this.src.charCodeAt($-1),(Y&64512)===56320){let O=this.src.charCodeAt($-2);Y=(O&64512)===55296?65536+(O-55296<<10)+(Y-56320):65533}else if((Y&64512)===55296)Y=65533;let Q=$;while(Q<J&&this.src.charCodeAt(Q)===X)Q++;let G=Q-$,K=Q<J?this.src.charCodeAt(Q):32;if((K&64512)===55296){let O=this.src.charCodeAt(Q+1);K=(O&64512)===56320?65536+(K-55296<<10)+(O-56320):65533}else if((K&64512)===56320)K=65533;let W=m$(Y)||u$(Y),H=m$(K)||u$(K),z=g$(Y),V=g$(K),U=!V&&(!H||z||W),F=!z&&(!W||V||H);return{can_open:U&&(Z||!F||W),can_close:F&&(Z||!U||H),length:G}};vJ.prototype.Token=t9;var tB=vJ;function ic($){switch($){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function lV($,Z){let J=$.pos;while(J<$.posMax&&!ic($.src.charCodeAt(J)))J++;if(J===$.pos)return!1;if(!Z)$.pending+=$.src.slice($.pos,J);return $.pos=J,!0}var nc=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function iV($,Z){if(!$.md.options.linkify)return!1;if($.linkLevel>0)return!1;let{pos:J,posMax:X}=$;if(J+3>X)return!1;if($.src.charCodeAt(J)!==58)return!1;if($.src.charCodeAt(J+1)!==47)return!1;if($.src.charCodeAt(J+2)!==47)return!1;let Y=$.pending.match(nc);if(!Y)return!1;let Q=Y[1],G=$.md.linkify.matchAtStart($.src.slice(J-Q.length));if(!G)return!1;let K=G.url;if(K.length<=Q.length)return!1;let W=K.length;while(W>0&&K.charCodeAt(W-1)===42)W--;if(W!==K.length)K=K.slice(0,W);let H=$.md.normalizeLink(K);if(!$.md.validateLink(H))return!1;if(!Z){$.pending=$.pending.slice(0,-Q.length);let z=$.push("link_open","a",1);z.attrs=[["href",H]],z.markup="linkify",z.info="auto";let V=$.push("text","",0);V.content=$.md.normalizeLinkText(K);let U=$.push("link_close","a",-1);U.markup="linkify",U.info="auto"}return $.pos+=K.length-Q.length,!0}function nV($,Z){let J=$.pos;if($.src.charCodeAt(J)!==10)return!1;let X=$.pending.length-1,Y=$.posMax;if(!Z)if(X>=0&&$.pending.charCodeAt(X)===32)if(X>=1&&$.pending.charCodeAt(X-1)===32){let Q=X-1;while(Q>=1&&$.pending.charCodeAt(Q-1)===32)Q--;$.pending=$.pending.slice(0,Q),$.push("hardbreak","br",0)}else $.pending=$.pending.slice(0,-1),$.push("softbreak","br",0);else $.push("softbreak","br",0);J++;while(J<Y&&Q1($.src.charCodeAt(J)))J++;return $.pos=J,!0}var oV=[];for(let $=0;$<256;$++)oV.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function($){oV[$.charCodeAt(0)]=1});function aV($,Z){let{pos:J,posMax:X}=$;if($.src.charCodeAt(J)!==92)return!1;if(J++,J>=X)return!1;let Y=$.src.charCodeAt(J);if(Y===10){if(!Z)$.push("hardbreak","br",0);J++;while(J<X){if(Y=$.src.charCodeAt(J),!Q1(Y))break;J++}return $.pos=J,!0}let Q=$.src[J];if(Y>=55296&&Y<=56319&&J+1<X){let K=$.src.charCodeAt(J+1);if(K>=56320&&K<=57343)Q+=$.src[J+1],J++}let G="\\"+Q;if(!Z){let K=$.push("text_special","",0);if(Y<256&&oV[Y]!==0)K.content=Q;else K.content=G;K.markup=G,K.info="escape"}return $.pos=J+1,!0}function sV($,Z){let J=$.pos;if($.src.charCodeAt(J)!==96)return!1;let Y=J;J++;let Q=$.posMax;while(J<Q&&$.src.charCodeAt(J)===96)J++;let G=$.src.slice(Y,J),K=G.length;if($.backticksScanned&&($.backticks[K]||0)<=Y){if(!Z)$.pending+=G;return $.pos+=K,!0}let W=J,H;while((H=$.src.indexOf("`",W))!==-1){W=H+1;while(W<Q&&$.src.charCodeAt(W)===96)W++;let z=W-H;if(z===K){if(!Z){let V=$.push("code_inline","code",0);V.markup=G,V.content=$.src.slice(J,H).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return $.pos=W,!0}$.backticks[z]=H}if($.backticksScanned=!0,!Z)$.pending+=G;return $.pos+=K,!0}function oc($,Z){let J=$.pos,X=$.src.charCodeAt(J);if(Z)return!1;if(X!==126)return!1;let Y=$.scanDelims($.pos,!0),Q=Y.length,G=String.fromCharCode(X);if(Q<2)return!1;let K;if(Q%2)K=$.push("text","",0),K.content=G,Q--;for(let W=0;W<Q;W+=2)K=$.push("text","",0),K.content=G+G,$.delimiters.push({marker:X,length:0,token:$.tokens.length-1,end:-1,open:Y.can_open,close:Y.can_close});return $.pos+=Y.length,!0}function eB($,Z){let J,X=[],Y=Z.length;for(let Q=0;Q<Y;Q++){let G=Z[Q];if(G.marker!==126)continue;if(G.end===-1)continue;let K=Z[G.end];if(J=$.tokens[G.token],J.type="s_open",J.tag="s",J.nesting=1,J.markup="~~",J.content="",J=$.tokens[K.token],J.type="s_close",J.tag="s",J.nesting=-1,J.markup="~~",J.content="",$.tokens[K.token-1].type==="text"&&$.tokens[K.token-1].content==="~")X.push(K.token-1)}while(X.length){let Q=X.pop(),G=Q+1;while(G<$.tokens.length&&$.tokens[G].type==="s_close")G++;if(G--,Q!==G)J=$.tokens[G],$.tokens[G]=$.tokens[Q],$.tokens[Q]=J}}function ac($){let Z=$.tokens_meta,J=$.tokens_meta.length;eB($,$.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)eB($,Z[X].delimiters)}var rV={tokenize:oc,postProcess:ac};function sc($,Z){let J=$.pos,X=$.src.charCodeAt(J);if(Z)return!1;if(X!==95&&X!==42)return!1;let Y=$.scanDelims($.pos,X===42);for(let Q=0;Q<Y.length;Q++){let G=$.push("text","",0);G.content=String.fromCharCode(X),$.delimiters.push({marker:X,length:Y.length,token:$.tokens.length-1,end:-1,open:Y.can_open,close:Y.can_close})}return $.pos+=Y.length,!0}function $N($,Z){let J=Z.length;for(let X=J-1;X>=0;X--){let Y=Z[X];if(Y.marker!==95&&Y.marker!==42)continue;if(Y.end===-1)continue;let Q=Z[Y.end],G=X>0&&Z[X-1].end===Y.end+1&&Z[X-1].marker===Y.marker&&Z[X-1].token===Y.token-1&&Z[Y.end+1].token===Q.token+1,K=String.fromCharCode(Y.marker),W=$.tokens[Y.token];W.type=G?"strong_open":"em_open",W.tag=G?"strong":"em",W.nesting=1,W.markup=G?K+K:K,W.content="";let H=$.tokens[Q.token];if(H.type=G?"strong_close":"em_close",H.tag=G?"strong":"em",H.nesting=-1,H.markup=G?K+K:K,H.content="",G)$.tokens[Z[X-1].token].content="",$.tokens[Z[Y.end+1].token].content="",X--}}function rc($){let Z=$.tokens_meta,J=$.tokens_meta.length;$N($,$.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)$N($,Z[X].delimiters)}var tV={tokenize:sc,postProcess:rc};function eV($,Z){let J,X,Y,Q,G="",K="",W=$.pos,H=!0;if($.src.charCodeAt($.pos)!==91)return!1;let{pos:z,posMax:V}=$,U=$.pos+1,F=$.md.helpers.parseLinkLabel($,$.pos,!0);if(F<0)return!1;let q=F+1;if(q<V&&$.src.charCodeAt(q)===40){H=!1,q++;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break;if(q>=V)return!1;if(W=q,Y=$.md.helpers.parseLinkDestination($.src,q,$.posMax),Y.ok){if(G=$.md.normalizeLink(Y.str),$.md.validateLink(G))q=Y.pos;else G="";W=q;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break;if(Y=$.md.helpers.parseLinkTitle($.src,q,$.posMax),q<V&&W!==q&&Y.ok){K=Y.str,q=Y.pos;for(;q<V;q++)if(J=$.src.charCodeAt(q),!Q1(J)&&J!==10)break}}if(q>=V||$.src.charCodeAt(q)!==41)H=!0;q++}if(H){if(typeof $.env.references>"u")return!1;if(q<V&&$.src.charCodeAt(q)===91)if(W=q+1,q=$.md.helpers.parseLinkLabel($,q),q>=0)X=$.src.slice(W,q++);else q=F+1;else q=F+1;if(!X)X=$.src.slice(U,F);if(Q=$.env.references[c$(X)],!Q)return $.pos=z,!1;G=Q.href,K=Q.title}if(!Z){$.pos=U,$.posMax=F;let D=$.push("link_open","a",1),O=[["href",G]];if(D.attrs=O,K)O.push(["title",K]);$.linkLevel++,$.md.inline.tokenize($),$.linkLevel--,$.push("link_close","a",-1)}return $.pos=q,$.posMax=V,!0}function $H($,Z){let J,X,Y,Q,G,K,W,H,z="",V=$.pos,U=$.posMax;if($.src.charCodeAt($.pos)!==33)return!1;if($.src.charCodeAt($.pos+1)!==91)return!1;let F=$.pos+2,q=$.md.helpers.parseLinkLabel($,$.pos+1,!1);if(q<0)return!1;if(Q=q+1,Q<U&&$.src.charCodeAt(Q)===40){Q++;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break;if(Q>=U)return!1;if(H=Q,K=$.md.helpers.parseLinkDestination($.src,Q,$.posMax),K.ok)if(z=$.md.normalizeLink(K.str),$.md.validateLink(z))Q=K.pos;else z="";H=Q;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break;if(K=$.md.helpers.parseLinkTitle($.src,Q,$.posMax),Q<U&&H!==Q&&K.ok){W=K.str,Q=K.pos;for(;Q<U;Q++)if(J=$.src.charCodeAt(Q),!Q1(J)&&J!==10)break}else W="";if(Q>=U||$.src.charCodeAt(Q)!==41)return $.pos=V,!1;Q++}else{if(typeof $.env.references>"u")return!1;if(Q<U&&$.src.charCodeAt(Q)===91)if(H=Q+1,Q=$.md.helpers.parseLinkLabel($,Q),Q>=0)Y=$.src.slice(H,Q++);else Q=q+1;else Q=q+1;if(!Y)Y=$.src.slice(F,q);if(G=$.env.references[c$(Y)],!G)return $.pos=V,!1;z=G.href,W=G.title}if(!Z){X=$.src.slice(F,q);let D=[];$.md.inline.parse(X,$.md,$.env,D);let O=$.push("image","img",0),B=[["src",z],["alt",""]];if(O.attrs=B,O.children=D,O.content=X,W)B.push(["title",W])}return $.pos=Q,$.posMax=U,!0}var tc=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,ec=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ZH($,Z){let J=$.pos;if($.src.charCodeAt(J)!==60)return!1;let{pos:X,posMax:Y}=$;for(;;){if(++J>=Y)return!1;let G=$.src.charCodeAt(J);if(G===60)return!1;if(G===62)break}let Q=$.src.slice(X+1,J);if(ec.test(Q)){let G=$.md.normalizeLink(Q);if(!$.md.validateLink(G))return!1;if(!Z){let K=$.push("link_open","a",1);K.attrs=[["href",G]],K.markup="autolink",K.info="auto";let W=$.push("text","",0);W.content=$.md.normalizeLinkText(Q);let H=$.push("link_close","a",-1);H.markup="autolink",H.info="auto"}return $.pos+=Q.length+2,!0}if(tc.test(Q)){let G=$.md.normalizeLink("mailto:"+Q);if(!$.md.validateLink(G))return!1;if(!Z){let K=$.push("link_open","a",1);K.attrs=[["href",G]],K.markup="autolink",K.info="auto";let W=$.push("text","",0);W.content=$.md.normalizeLinkText(Q);let H=$.push("link_close","a",-1);H.markup="autolink",H.info="auto"}return $.pos+=Q.length+2,!0}return!1}function $d($){return/^<a[>\s]/i.test($)}function Zd($){return/^<\/a\s*>/i.test($)}function Jd($){let Z=$|32;return Z>=97&&Z<=122}function JH($,Z){if(!$.md.options.html)return!1;let{posMax:J,pos:X}=$;if($.src.charCodeAt(X)!==60||X+2>=J)return!1;let Y=$.src.charCodeAt(X+1);if(Y!==33&&Y!==63&&Y!==47&&!Jd(Y))return!1;let Q=$.src.slice(X).match(aB);if(!Q)return!1;if(!Z){let G=$.push("html_inline","",0);if(G.content=Q[0],$d(G.content))$.linkLevel++;if(Zd(G.content))$.linkLevel--}return $.pos+=Q[0].length,!0}var Xd=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Yd=/^&([a-z][a-z0-9]{1,31});/i;function XH($,Z){let{pos:J,posMax:X}=$;if($.src.charCodeAt(J)!==38)return!1;if(J+1>=X)return!1;if($.src.charCodeAt(J+1)===35){let Q=$.src.slice(J).match(Xd);if(Q){if(!Z){let G=Q[1][0].toLowerCase()==="x"?parseInt(Q[1].slice(1),16):parseInt(Q[1],10),K=$.push("text_special","",0);K.content=UQ(G)?QZ(G):QZ(65533),K.markup=Q[0],K.info="entity"}return $.pos+=Q[0].length,!0}}else{let Q=$.src.slice(J).match(Yd);if(Q){let G=hJ(Q[0]);if(G!==Q[0]){if(!Z){let K=$.push("text_special","",0);K.content=G,K.markup=Q[0],K.info="entity"}return $.pos+=Q[0].length,!0}}}return!1}function ZN($){let Z={},J=$.length;if(!J)return;let X=0,Y=-2,Q=[];for(let G=0;G<J;G++){let K=$[G];if(Q.push(0),$[X].marker!==K.marker||Y!==K.token-1)X=G;if(Y=K.token,K.length=K.length||0,!K.close)continue;if(!Z.hasOwnProperty(K.marker))Z[K.marker]=[-1,-1,-1,-1,-1,-1];let W=Z[K.marker][(K.open?3:0)+K.length%3],H=X-Q[X]-1,z=H;for(;H>W;H-=Q[H]+1){let V=$[H];if(V.marker!==K.marker)continue;if(V.open&&V.end<0){let U=!1;if(V.close||K.open){if((V.length+K.length)%3===0){if(V.length%3!==0||K.length%3!==0)U=!0}}if(!U){let F=H>0&&!$[H-1].open?Q[H-1]+1:0;Q[G]=G-H+F,Q[H]=F,K.open=!1,V.end=G,V.close=!1,z=-1,Y=-2;break}}}if(z!==-1)Z[K.marker][(K.open?3:0)+(K.length||0)%3]=z}}function YH($){let Z=$.tokens_meta,J=$.tokens_meta.length;ZN($.delimiters);for(let X=0;X<J;X++)if(Z[X]&&Z[X].delimiters)ZN(Z[X].delimiters)}function QH($){let Z,J,X=0,Y=$.tokens,Q=$.tokens.length;for(Z=J=0;Z<Q;Z++){if(Y[Z].nesting<0)X--;if(Y[Z].level=X,Y[Z].nesting>0)X++;if(Y[Z].type==="text"&&Z+1<Q&&Y[Z+1].type==="text")Y[Z+1].content=Y[Z].content+Y[Z+1].content;else{if(Z!==J)Y[J]=Y[Z];J++}}if(Z!==J)Y.length=J}var GH=[["text",lV],["linkify",iV],["newline",nV],["escape",aV],["backticks",sV],["strikethrough",rV.tokenize],["emphasis",tV.tokenize],["link",eV],["image",$H],["autolink",ZH],["html_inline",JH],["entity",XH]],KH=[["balance_pairs",YH],["strikethrough",rV.postProcess],["emphasis",tV.postProcess],["fragments_join",QH]];function bJ(){this.ruler=new p$;for(let $=0;$<GH.length;$++)this.ruler.push(GH[$][0],GH[$][1]);this.ruler2=new p$;for(let $=0;$<KH.length;$++)this.ruler2.push(KH[$][0],KH[$][1])}bJ.prototype.skipToken=function($){let Z=$.pos,J=this.ruler.getRules(""),X=J.length,Y=$.md.options.maxNesting,Q=$.cache;if(typeof Q[Z]<"u"){$.pos=Q[Z];return}let G=!1;if($.level<Y){for(let K=0;K<X;K++)if($.level++,G=J[K]($,!0),$.level--,G){if(Z>=$.pos)throw Error("inline rule didn't increment state.pos");break}}else $.pos=$.posMax;if(!G)$.pos++;Q[Z]=$.pos};bJ.prototype.tokenize=function($){let Z=this.ruler.getRules(""),J=Z.length,X=$.posMax,Y=$.md.options.maxNesting;while($.pos<X){let Q=$.pos,G=!1;if($.level<Y){for(let K=0;K<J;K++)if(G=Z[K]($,!1),G){if(Q>=$.pos)throw Error("inline rule didn't increment state.pos");break}}if(G){if($.pos>=X)break;continue}$.pending+=$.src[$.pos++]}if($.pending)$.pushPending()};bJ.prototype.parse=function($,Z,J,X){let Y=new this.State($,Z,J,X);this.tokenize(Y);let Q=this.ruler2.getRules(""),G=Q.length;for(let K=0;K<G;K++)Q[K](Y)};bJ.prototype.State=tB;var JN=bJ;function WH($){let Z={};$=$||{},Z.src_Any=HQ.source,Z.src_Cc=zQ.source,Z.src_Z=qQ.source,Z.src_P=XZ.source,Z.src_ZPCc=[Z.src_Z,Z.src_P,Z.src_Cc].join("|"),Z.src_ZCc=[Z.src_Z,Z.src_Cc].join("|");let J="[><|]";return Z.src_pseudo_letter=`(?:(?!${J}|${Z.src_ZPCc})${Z.src_Any})`,Z.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",Z.src_auth=`(?:(?:(?!${Z.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,Z.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",Z.src_host_terminator=`(?=$|${J}|${Z.src_ZPCc})(?!${$["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${Z.src_ZPCc}))`,Z.src_path=`(?:[/?#](?:(?!${Z.src_ZCc}|${J}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${Z.src_ZCc}|\\]).)*\\]|\\((?:(?!${Z.src_ZCc}|[)]).)*\\)|\\{(?:(?!${Z.src_ZCc}|[}]).)*\\}|\\"(?:(?!${Z.src_ZCc}|["]).)+\\"|\\'(?:(?!${Z.src_ZCc}|[']).)+\\'|\\'(?=${Z.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${Z.src_ZCc}|[.]|$)|`+($["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${Z.src_ZCc}|$)|;(?!${Z.src_ZCc}|$)|\\!+(?!${Z.src_ZCc}|[!]|$)|\\?(?!${Z.src_ZCc}|[?]|$))+|\\/)?`,Z.src_email_name="[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\\"\\.a-zA-Z0-9_]{0,63}",Z.src_xn="xn--[a-z0-9\\-]{1,59}",Z.src_domain_root="(?:"+Z.src_xn+`|${Z.src_pseudo_letter}{1,63})`,Z.src_domain="(?:"+Z.src_xn+`|(?:${Z.src_pseudo_letter})|(?:${Z.src_pseudo_letter}(?:-|${Z.src_pseudo_letter}){0,61}${Z.src_pseudo_letter}))`,Z.src_host=`(?:(?:(?:(?:${Z.src_domain})\\.)*${Z.src_domain}))`,Z.tpl_host_fuzzy="(?:"+Z.src_ip4+`|(?:(?:(?:${Z.src_domain})\\.)+(?:%TLDS%)))`,Z.tpl_host_no_ip_fuzzy=`(?:(?:(?:${Z.src_domain})\\.)+(?:%TLDS%))`,Z.src_host_strict=Z.src_host+Z.src_host_terminator,Z.tpl_host_fuzzy_strict=Z.tpl_host_fuzzy+Z.src_host_terminator,Z.src_host_port_strict=Z.src_host+Z.src_port+Z.src_host_terminator,Z.tpl_host_port_fuzzy_strict=Z.tpl_host_fuzzy+Z.src_port+Z.src_host_terminator,Z.tpl_host_port_no_ip_fuzzy_strict=Z.tpl_host_no_ip_fuzzy+Z.src_port+Z.src_host_terminator,Z.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${Z.src_ZPCc}|>|$))`,Z.tpl_email_fuzzy=`(^|${J}|"|\\(|${Z.src_ZCc})(${Z.src_email_name}@${Z.tpl_host_fuzzy_strict})`,Z.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${Z.src_ZPCc}))`+`((?![$+<=>^\`||])${Z.tpl_host_port_fuzzy_strict}${Z.src_path})`,Z.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${Z.src_ZPCc}))`+`((?![$+<=>^\`||])${Z.tpl_host_port_no_ip_fuzzy_strict}${Z.src_path})`,Z}function VH($){return Array.prototype.slice.call(arguments,1).forEach(function(J){if(!J)return;Object.keys(J).forEach(function(X){$[X]=J[X]})}),$}function LQ($){return Object.prototype.toString.call($)}function Qd($){return LQ($)==="[object String]"}function Gd($){return LQ($)==="[object Object]"}function Kd($){return LQ($)==="[object RegExp]"}function XN($){return LQ($)==="[object Function]"}function Wd($){return $.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var QN={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Vd($){return Object.keys($||{}).reduce(function(Z,J){return Z||QN.hasOwnProperty(J)},!1)}var Hd={"http:":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.http)J.re.http=new RegExp(`^\\/\\/${J.re.src_auth}${J.re.src_host_port_strict}${J.re.src_path}`,"i");if(J.re.http.test(X))return X.match(J.re.http)[0].length;return 0}},"https:":"http:","ftp:":"http:","//":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.no_http)J.re.no_http=new RegExp("^"+J.re.src_auth+`(?:localhost|(?:(?:${J.re.src_domain})\\.)+${J.re.src_domain_root})`+J.re.src_port+J.re.src_host_terminator+J.re.src_path,"i");if(J.re.no_http.test(X)){if(Z>=3&&$[Z-3]===":")return 0;if(Z>=3&&$[Z-3]==="/")return 0;return X.match(J.re.no_http)[0].length}return 0}},"mailto:":{validate:function($,Z,J){let X=$.slice(Z);if(!J.re.mailto)J.re.mailto=new RegExp(`^${J.re.src_email_name}@${J.re.src_host_strict}`,"i");if(J.re.mailto.test(X))return X.match(J.re.mailto)[0].length;return 0}}},zd="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Fd="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function qd($){return function(Z,J){let X=Z.slice(J);if($.test(X))return X.match($)[0].length;return 0}}function YN(){return function($,Z){Z.normalize($)}}function AQ($){let Z=$.re=WH($.__opts__),J=$.__tlds__.slice();if($.onCompile(),!$.__tlds_replaced__)J.push(zd);J.push(Z.src_xn),Z.src_tlds=J.join("|");function X(K){return K.replace("%TLDS%",Z.src_tlds)}Z.email_fuzzy=RegExp(X(Z.tpl_email_fuzzy),"i"),Z.email_fuzzy_global=RegExp(X(Z.tpl_email_fuzzy),"ig"),Z.link_fuzzy=RegExp(X(Z.tpl_link_fuzzy),"i"),Z.link_fuzzy_global=RegExp(X(Z.tpl_link_fuzzy),"ig"),Z.link_no_ip_fuzzy=RegExp(X(Z.tpl_link_no_ip_fuzzy),"i"),Z.link_no_ip_fuzzy_global=RegExp(X(Z.tpl_link_no_ip_fuzzy),"ig"),Z.host_fuzzy_test=RegExp(X(Z.tpl_host_fuzzy_test),"i");let Y=[];$.__compiled__={};function Q(K,W){throw Error(`(LinkifyIt) Invalid schema "${K}": ${W}`)}Object.keys($.__schemas__).forEach(function(K){let W=$.__schemas__[K];if(W===null)return;let H={validate:null,link:null};if($.__compiled__[K]=H,Gd(W)){if(Kd(W.validate))H.validate=qd(W.validate);else if(XN(W.validate))H.validate=W.validate;else Q(K,W);if(XN(W.normalize))H.normalize=W.normalize;else if(!W.normalize)H.normalize=YN();else Q(K,W);return}if(Qd(W)){Y.push(K);return}Q(K,W)}),Y.forEach(function(K){if(!$.__compiled__[$.__schemas__[K]])return;$.__compiled__[K].validate=$.__compiled__[$.__schemas__[K]].validate,$.__compiled__[K].normalize=$.__compiled__[$.__schemas__[K]].normalize}),$.__compiled__[""]={validate:null,normalize:YN()};let G=Object.keys($.__compiled__).filter(function(K){return K.length>0&&$.__compiled__[K]}).map(Wd).join("|");$.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${Z.src_ZPCc}))(${G})`,"i"),$.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${Z.src_ZPCc}))(${G})`,"ig"),$.re.schema_at_start=RegExp(`^${$.re.schema_search.source}`,"i"),$.re.pretest=RegExp(`(${$.re.schema_test.source})|(${$.re.host_fuzzy_test.source})|@`,"i")}function GN($,Z,J,X){let Y=$.slice(J,X);this.schema=Z.toLowerCase(),this.index=J,this.lastIndex=X,this.raw=Y,this.text=Y,this.url=Y}function O6($,Z){if(!(this instanceof O6))return new O6($,Z);if(!Z){if(Vd($))Z=$,$={}}this.__opts__=VH({},QN,Z),this.__schemas__=VH({},Hd,$),this.__compiled__={},this.__tlds__=Fd,this.__tlds_replaced__=!1,this.re={},AQ(this)}O6.prototype.add=function(Z,J){return this.__schemas__[Z]=J,AQ(this),this};O6.prototype.set=function(Z){return this.__opts__=VH(this.__opts__,Z),this};O6.prototype.test=function(Z){if(!Z.length)return!1;let J,X;if(this.re.schema_test.test(Z)){X=this.re.schema_search,X.lastIndex=0;while((J=X.exec(Z))!==null)if(this.testSchemaAt(Z,J[2],X.lastIndex))return!0}if(this.__opts__.fuzzyLink&&this.__compiled__["http:"]){if(Z.search(this.re.host_fuzzy_test)>=0){if(Z.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null)return!0}}if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]){if(Z.indexOf("@")>=0){if(Z.match(this.re.email_fuzzy)!==null)return!0}}return!1};O6.prototype.pretest=function(Z){return this.re.pretest.test(Z)};O6.prototype.testSchemaAt=function(Z,J,X){if(!this.__compiled__[J.toLowerCase()])return 0;return this.__compiled__[J.toLowerCase()].validate(Z,X,this)};O6.prototype.match=function(Z){let J=[],X=[],Y=[],Q=[],G,K,W;function H(U,F){if(!U)return F;if(!F)return U;if(U.index!==F.index)return U.index<F.index?U:F;return U.lastIndex>=F.lastIndex?U:F}if(!Z.length)return null;if(this.re.schema_test.test(Z)){W=this.re.schema_search,W.lastIndex=0;while((G=W.exec(Z))!==null)if(K=this.testSchemaAt(Z,G[2],W.lastIndex),K)X.push({schema:G[2],index:G.index+G[1].length,lastIndex:G.index+G[0].length+K})}if(this.__opts__.fuzzyLink&&this.__compiled__["http:"]){W=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,W.lastIndex=0;while((G=W.exec(Z))!==null)Y.push({schema:"",index:G.index+G[1].length,lastIndex:G.index+G[0].length})}if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]){W=this.re.email_fuzzy_global,W.lastIndex=0;while((G=W.exec(Z))!==null)Q.push({schema:"mailto:",index:G.index+G[1].length,lastIndex:G.index+G[0].length})}let z=[0,0,0],V=0;for(;;){let U=[X[z[0]],Q[z[1]],Y[z[2]]],F=H(H(U[0],U[1]),U[2]);if(!F)break;if(F===U[0])z[0]++;else if(F===U[1])z[1]++;else z[2]++;if(F.index<V)continue;let q=new GN(Z,F.schema,F.index,F.lastIndex);this.__compiled__[q.schema].normalize(q,this),J.push(q),V=F.lastIndex}if(J.length)return J;return null};O6.prototype.matchAtStart=function(Z){if(!Z.length)return null;let J=this.re.schema_at_start.exec(Z);if(!J)return null;let X=this.testSchemaAt(Z,J[2],J[0].length);if(!X)return null;let Y=new GN(Z,J[2],J.index+J[1].length,J.index+J[0].length+X);return this.__compiled__[Y.schema].normalize(Y,this),Y};O6.prototype.tlds=function(Z,J){if(Z=Array.isArray(Z)?Z:[Z],!J)return this.__tlds__=Z.slice(),this.__tlds_replaced__=!0,AQ(this),this;return this.__tlds__=this.__tlds__.concat(Z).sort().filter(function(X,Y,Q){return X!==Q[Y-1]}).reverse(),AQ(this),this};O6.prototype.normalize=function(Z){if(!Z.schema)Z.url=`http://${Z.url}`;if(Z.schema==="mailto:"&&!/^mailto:/i.test(Z.url))Z.url=`mailto:${Z.url}`};O6.prototype.onCompile=function(){};var KN=O6;var zH=q8(UN(),1);var ON={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}};var BN={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}};var NN={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}};var Td={default:ON,zero:BN,commonmark:NN},jd=/^(vbscript|javascript|file|data):/,Pd=/^data:image\/(gif|png|jpeg|webp);/;function Id($){let Z=$.trim().toLowerCase();return jd.test(Z)?Pd.test(Z):!0}var AN=["http:","https:","mailto:"];function Cd($){let Z=xJ($,!0);if(Z.hostname){if(!Z.protocol||AN.indexOf(Z.protocol)>=0)try{Z.hostname=zH.default.toASCII(Z.hostname)}catch(J){}}return KQ(JZ(Z))}function wd($){let Z=xJ($,!0);if(Z.hostname){if(!Z.protocol||AN.indexOf(Z.protocol)>=0)try{Z.hostname=zH.default.toUnicode(Z.hostname)}catch(J){}}return yJ(JZ(Z),yJ.defaultChars+"%")}function h6($,Z){if(!(this instanceof h6))return new h6($,Z);if(!Z){if(!DQ($))Z=$||{},$="default"}if(this.inline=new JN,this.block=new rB,this.core=new cB,this.renderer=new vB,this.linkify=new KN,this.validateLink=Id,this.normalizeLink=Cd,this.normalizeLinkText=wd,this.utils=AV,this.helpers=YZ({},EV),this.options={},this.configure($),Z)this.set(Z)}h6.prototype.set=function($){return YZ(this.options,$),this};h6.prototype.configure=function($){let Z=this;if(DQ($)){let J=$;if($=Td[J],!$)throw Error('Wrong `markdown-it` preset "'+J+'", check name')}if(!$)throw Error("Wrong `markdown-it` preset, can't be empty");if($.options)Z.set($.options);if($.components)Object.keys($.components).forEach(function(J){if($.components[J].rules)Z[J].ruler.enableOnly($.components[J].rules);if($.components[J].rules2)Z[J].ruler2.enableOnly($.components[J].rules2)});return this};h6.prototype.enable=function($,Z){let J=[];if(!Array.isArray($))$=[$];["core","block","inline"].forEach(function(Y){J=J.concat(this[Y].ruler.enable($,!0))},this),J=J.concat(this.inline.ruler2.enable($,!0));let X=$.filter(function(Y){return J.indexOf(Y)<0});if(X.length&&!Z)throw Error("MarkdownIt. Failed to enable unknown rule(s): "+X);return this};h6.prototype.disable=function($,Z){let J=[];if(!Array.isArray($))$=[$];["core","block","inline"].forEach(function(Y){J=J.concat(this[Y].ruler.disable($,!0))},this),J=J.concat(this.inline.ruler2.disable($,!0));let X=$.filter(function(Y){return J.indexOf(Y)<0});if(X.length&&!Z)throw Error("MarkdownIt. Failed to disable unknown rule(s): "+X);return this};h6.prototype.use=function($){let Z=[this].concat(Array.prototype.slice.call(arguments,1));return $.apply($,Z),this};h6.prototype.parse=function($,Z){if(typeof $!=="string")throw Error("Input data should be a String");let J=new this.core.State($,this,Z);return this.core.process(J),J.tokens};h6.prototype.render=function($,Z){return Z=Z||{},this.renderer.render(this.parse($,Z),this.options,Z)};h6.prototype.parseInline=function($,Z){let J=new this.core.State($,this,Z);return J.inlineMode=!0,this.core.process(J),J.tokens};h6.prototype.renderInline=function($,Z){return Z=Z||{},this.renderer.render(this.parseInline($,Z),this.options,Z)};var FH=h6;var nO=null;async function UH0(){if(!nO)nO=await Promise.resolve().then(() => (ou(),nu));return nO}function OH0(){return process.env.PUPPETEER_EXECUTABLE_PATH?.trim()||"/usr/bin/chromium"}var SJ=null;async function BH0(){if(!SJ)SJ=(async()=>{let $=await UH0(),Z=OH0();return $.launch({executablePath:Z,headless:!0,args:["--no-sandbox","--disable-setuid-sandbox","--disable-dev-shm-usage","--font-render-hinting=none"],defaultViewport:{width:800,height:600,deviceScaleFactor:2}})})();return SJ}async function au(){if(!SJ)return;try{await(await SJ).close()}catch{}finally{SJ=null}}var ZQ=new FH({html:!1,linkify:!0,breaks:!1,typographer:!1});ZQ.disable("image");ZQ.renderer.rules.image=()=>"";var su=($,Z)=>{return($[Z].content||"").replace(/<img\b[^>]*>/gi,"")};ZQ.renderer.rules.html_inline=su;ZQ.renderer.rules.html_block=su;function NH0($){return`<!DOCTYPE html>
|
|
231
231
|
<html lang="zh-CN">
|
|
232
232
|
<head>
|
|
233
233
|
<meta charset="UTF-8">
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type LocalProcessState = {
|
|
2
|
+
kind: "alive";
|
|
3
|
+
pid: number;
|
|
4
|
+
} | {
|
|
5
|
+
kind: "stale";
|
|
6
|
+
pid: number;
|
|
7
|
+
} | {
|
|
8
|
+
kind: "none";
|
|
9
|
+
};
|
|
10
|
+
export declare function describeLocalProcess(state: LocalProcessState): string;
|
|
11
|
+
/** doctor 印完节点清单后的那一句:说清这一列量的是本机,不是 hub。 */
|
|
12
|
+
export declare const LOCAL_VS_HUB_NOTE: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 一列该多宽:装得下表头,也装得下这一列里最长的那个值。
|
|
3
|
+
*
|
|
4
|
+
* 🔴 两处用它的地方来源不同,但问题一样:
|
|
5
|
+
* - `anet node ls` 的 RUNTIME 列:值域来自 `SUPPORTED_RUNTIME_NAMES`(唯一真源);
|
|
6
|
+
* - `anet status` / `anet tasks` 的 STATUS 列:值域散在 server/ 里(另一个包),
|
|
7
|
+
* CLI 没法 import —— 但**要打印的那些行就在手上**,直接从数据算。
|
|
8
|
+
*
|
|
9
|
+
* 两种情况都不该写死一个数:写死的那个,下一次加 runtime / 加状态时就漂了。
|
|
10
|
+
*/
|
|
11
|
+
export declare function columnWidth(values: readonly unknown[], header: string): number;
|
|
12
|
+
/** RUNTIME 列的专用入口 —— 保留原名,调用点不用改。 */
|
|
13
|
+
export declare function runtimeColumnWidth(names: readonly string[], header?: string): number;
|
|
14
|
+
export declare function lsHeaderRow(runtimeWidth: number): string;
|
|
15
|
+
export declare function lsSeparatorRow(runtimeWidth: number): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nodeNotFoundMessage(ref: string, knownNames: string[], suggestion: string | null): string;
|