@north-light/cli 0.3.656 → 0.3.658
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/clients/attach/assets/mermaid.min.js +226 -226
- package/dist/clients/attach/viewer.js +679 -713
- package/dist/core/runtime/broker/read-ops.js +1 -1
- package/dist/core/runtime/tool-group-summary.js +1 -1
- package/dist/core/runtime/turn-reply-summary.js +1 -1
- package/dist/doc-editor/editor.js +1 -1
- package/dist/types.js +1 -1
- package/package.json +19 -15
- package/packages/crouter-identity/package.json +1 -1
- package/runtime.lock.json +6947 -8237
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=Object.defineProperty;var
|
|
1
|
+
var p=Object.defineProperty;var l=(n,t)=>p(n,"name",{value:t,configurable:!0});import{ModelRegistry as h}from"@earendil-works/pi-coding-agent";import{boundaryRootedTree as f}from"../session-visibility.js";import{isUnknownModel as M}from"../model-selection.js";import{BUILTIN_SLASH_COMMANDS as b}from"../pi-vendored.js";import{isDeterministicCommandExpansion as y}from"../command-expansion.js";import{registrationChatSurface as S,templateChatSurface as k}from"../command-surface.js";function m(n){return new h(n.modelRuntime)}l(m,"registryOf");const u=l(n=>n===void 0||M(n)?null:{provider:n.provider,id:n.id},"toModelRef"),T=l(n=>`${n.provider}/${n.id}`,"modelKey");function E(n){const t=[];for(const e of b)t.push({name:e.name,description:e.description,source:"builtin",gatewayCapable:!1});try{for(const e of n.extensionRunner.getRegisteredCommands()){const o=e.expansion;t.push({name:e.invocationName,description:e.description??"",source:"command",...y(o)?{expansion:o}:{},...S(e)})}}catch{}try{for(const e of n.promptTemplates)t.push({name:e.name,description:e.description,source:"template",template:e.content,...k(e)})}catch{}return t}l(E,"buildCommandList");function A(n,t,e){return{type:"data",id:n,kind:"list_memory_refs",refs:t,engineLeadingCommandNames:e}}l(A,"buildListMemoryRefsData");function R(n,t){const e=m(t);let o=[];try{o=e.getAvailable().map(T)}catch{}return{type:"data",id:n,kind:"list_models",models:e.getAll(),current:u(t.model),availableIds:o,scopedModels:t.scopedModels.map(a=>({model:a.model,thinkingLevel:a.thinkingLevel})),enabledModelIds:t.settingsManager.getEnabledModels()??null}}l(R,"buildListModelsData");function P(n,t){return{type:"data",id:n,kind:"list_scoped_models",allModels:m(t).getAll(),enabledModelIds:t.settingsManager.getEnabledModels()??null}}l(P,"buildScopedModelsData");function F(n,t,e){const o=t.sessionManager,a=e!==void 0?f(o.getTree(),e):o.getTree(),r=new Set,s=l(d=>{for(const c of d)r.add(c.entry.id),s(c.children)},"collectEntryIds");s(a);const g=t.getUserMessagesForForking().filter(d=>r.has(d.entryId)).map(d=>({id:d.entryId,text:d.text,timestamp:o.getEntry(d.entryId)?.timestamp})),i=o.getLeafId();return{type:"data",id:n,kind:"get_tree",tree:a,currentLeafId:i!==null&&r.has(i)?i:null,forkPoints:g}}l(F,"buildGetTreeData");function _(n,t){const e=t.settingsManager;let o=[];try{o=t.resourceLoader.getThemes().themes.map(i=>i.name??"").filter(i=>i!=="")}catch{}const a=e.getDefaultProvider(),r=e.getDefaultModel();let s=[];try{s=t.modelRuntime.getAvailableSnapshot()}catch{}const g={autoCompact:t.autoCompactionEnabled,defaultModel:a&&r?`${a}/${r}`:"not set",availableDefaultModels:s,showImages:e.getShowImages(),imageWidthCells:e.getImageWidthCells(),autoResizeImages:e.getImageAutoResize(),blockImages:e.getBlockImages(),enableSkillCommands:e.getEnableSkillCommands(),steeringMode:t.steeringMode,followUpMode:t.followUpMode,transport:e.getTransport(),httpIdleTimeoutMs:e.getHttpIdleTimeoutMs(),thinkingLevel:t.thinkingLevel,availableThinkingLevels:t.getAvailableThinkingLevels(),modelThinkingLevels:e.getAllModelThinkingLevels(),currentTheme:e.getTheme()??"",terminalTheme:"dark",availableThemes:o,hideThinkingBlock:e.getHideThinkingBlock(),mermaidRenderingMode:e.getMermaidRenderingMode(),collapseChangelog:e.getCollapseChangelog(),enableInstallTelemetry:e.getEnableInstallTelemetry(),doubleEscapeAction:e.getDoubleEscapeAction(),treeFilterMode:e.getTreeFilterMode(),showHardwareCursor:e.getShowHardwareCursor(),editorPaddingX:e.getEditorPaddingX(),autocompleteMaxVisible:e.getAutocompleteMaxVisible(),quietStartup:e.getQuietStartup(),clearOnShrink:e.getClearOnShrink(),showTerminalProgress:e.getShowTerminalProgress(),tuiMode:e.getTuiMode(),fullscreenExitOutput:e.getFullscreenExitOutput(),fullscreenScrollbar:e.getFullscreenScrollbar(),fullscreenCopyOnSelect:e.getFullscreenCopyOnSelect(),fullscreenWheelScrollLines:e.getFullscreenWheelScrollLines(),warnings:e.getWarnings(),defaultProjectTrust:e.getDefaultProjectTrust(),showCacheMissNotices:e.getShowCacheMissNotices(),cacheWarmingMode:e.getCacheWarmingMode(),outputPad:e.getOutputPad(),sessionShareDestination:e.getSessionShareDestination(),autoRetry:t.autoRetryEnabled,model:u(t.model)};return{type:"data",id:n,kind:"get_settings",settings:g}}l(_,"buildSettingsData");function O(n,t,e,o){const a=e.sessionManager;return(t==="all"?o.listAll():o.listDir(a.getCwd())).then(r=>({type:"data",id:n,kind:"list_sessions",scope:t,sessions:r,currentSessionFile:e.sessionFile}))}l(O,"buildSessionsData");export{E as buildCommandList,F as buildGetTreeData,A as buildListMemoryRefsData,R as buildListModelsData,P as buildScopedModelsData,O as buildSessionsData,_ as buildSettingsData,T as modelKey};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var l=Object.defineProperty;var r=(e,t)=>l(e,"name",{value:t,configurable:!0});import{Type as i}from"
|
|
1
|
+
var l=Object.defineProperty;var r=(e,t)=>l(e,"name",{value:t,configurable:!0});import{Type as i}from"typebox";import{headlessToolCall as m}from"./headless-pi.js";import{defaultProvider as u,modelLadders as c}from"./model-selection.js";import{lightModel as d}from"./naming.js";import{normalizeToolGroupSummary as p}from"../../shared/tool-groups.js";const h=600,f=300,g=400,y=1e3,b=1e4,v=45e3;function n(e,t){const o=e.replace(/\s+/g," ").trim();return o.length<=t?o:`${o.slice(0,Math.max(0,t-1)).trimEnd()}\u2026`}r(n,"capped");function a(e,t){try{return n(typeof e=="string"?e:JSON.stringify(e),t)}catch{return n(String(e),t)}}r(a,"printable");function E(e,t){const o=[`Previous visible message: ${n(e,h)||"(none)"}`,"Between-message activity:"];for(const s of t)s.type==="tool"?o.push(`- tool ${s.name}(${a(s.args,f)})`):s.type==="result"?o.push(`- ${s.isError?"error":"result"} ${s.name}: ${a(s.result,g)}`):o.push(`- context: ${n(s.text,y)}`);return n(o.join(`
|
|
2
2
|
`),b)}r(E,"serializeToolGroup");const w='Create a structured recap of this coding-agent tool activity. Prefer 1\u20133 bullets and use at most 5 only for distinct meaningful outcomes. Each bullet must be an extremely readable plain-English outcome of 3\u201310 words, without markdown markers. Describe what changed or was accomplished, not the tools, commands, or investigation steps; for code work, say what capability was added to a one- or two-phrase plain-English part of the system, such as "Added scheduling controls to the worker service." Never include IDs, hashes, paths, filenames, command names, tool names, raw values, or report text. Omit inbox receipt, delivery, and queueing; node-response and report bookkeeping; help lookups; status checks; and summary-generation activity. A node response may support a substantive outcome, but its arrival or resummarization is never itself an outcome. If no meaningful outcome remains after those omissions, submit the single bullet "No meaningful changes." Count distinct files removed from disk only when the supplied tool arguments or results evidence them; otherwise use zero, even when the corresponding mechanics are omitted from bullets. A deleted file is one that no longer exists after the segment, never a file that was merely edited or overwritten, and a recursive or wildcard removal of an unknown number of files counts as one. Do not invent success when a result shows failure. Call submit_summary exactly once with bullets and filesDeleted, then stop.',S=i.Object({bullets:i.Array(i.String({minLength:1,maxLength:120,description:"A very short, plain-English outcome without bullet markers, identifiers, or operational bookkeeping."}),{minItems:1,maxItems:5}),filesDeleted:i.Integer({minimum:0,description:"Count of distinct files removed from disk during the supplied segment, or zero when none are evidenced."})},{additionalProperties:!1});async function P(e){const t=c(),o=`${u(t)}/light`;return p(await m({systemPrompt:w,userPrompt:`<tool-group>
|
|
3
3
|
${e}
|
|
4
4
|
</tool-group>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var d=Object.defineProperty;var r=(s,e)=>d(s,"name",{value:e,configurable:!0});import{Type as l}from"
|
|
1
|
+
var d=Object.defineProperty;var r=(s,e)=>d(s,"name",{value:e,configurable:!0});import{Type as l}from"typebox";import{headlessToolCall as p}from"./headless-pi.js";import{defaultProvider as h,modelLadders as c}from"./model-selection.js";import{lightModel as g}from"./naming.js";const u=4e3,y=12e3,m=4e4,w=6e4,f="You rewrite a coding agent's several messages to a person into the ONE reply the agent would have sent had it known everything at the end. You receive only the person's message and the agent's messages in the order they were written. Rules: later statements supersede earlier ones \u2014 drop plans that were completed, guesses that were corrected, and status that went stale; keep decisions, results, numbers, document links like [[name]], file paths, commands, errors and open questions verbatim; never add anything the messages did not say; do not mention that this is a rewrite or that there were several messages; write as the agent, speaking to the person, in the agent's own tone and markdown; be as short as the content allows. Call submit_reply exactly once with the reply, then stop.",_=l.Object({text:l.String({minLength:1,description:"The single consolidated reply, in markdown."})},{additionalProperties:!1});function i(s,e){const n=s.trim();return n.length<=e?n:`${n.slice(0,Math.max(0,e-1)).trimEnd()}\u2026`}r(i,"capped");function P(s){const e=s.map(t=>i(t,y));let n=e.reduce((t,o)=>t+o.length,0);for(let t=1;t<e.length-1&&n>m;t+=1){const o=e[t].length,a=i(e[t],Math.max(200,o-(n-m)));e[t]=a,n-=o-a.length}return e}r(P,"budgetProse");function T(s,e){const n=s.trim()===""?"(the agent was started without a typed message)":i(s,u),t=P(e).map((o,a)=>`<agent-message n="${a+1}">
|
|
2
2
|
${o}
|
|
3
3
|
</agent-message>`);return`<person-message>
|
|
4
4
|
${n}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var qm=Object.defineProperty;var a=(e,t)=>qm(e,"name",{value:t,configurable:!0});var Km=Object.create,Bo=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,Um=Object.getOwnPropertyNames,Gm=Object.getPrototypeOf,Qm=Object.prototype.hasOwnProperty,Ym=a((e,t)=>()=>
|
|
1
|
+
var qm=Object.defineProperty;var a=(e,t)=>qm(e,"name",{value:t,configurable:!0});var Km=Object.create,Bo=Object.defineProperty,Jm=Object.getOwnPropertyDescriptor,Um=Object.getOwnPropertyNames,Gm=Object.getPrototypeOf,Qm=Object.prototype.hasOwnProperty,Ym=a((e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},"mk"),Xm=a((e,t)=>{for(var n in t)Bo(e,n,{get:t[n],enumerable:!0})},"gk"),Zm=a((e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Um(t))!Qm.call(e,i)&&i!==n&&Bo(e,i,{get:a(()=>t[i],"get"),enumerable:!(r=Jm(t,i))||r.enumerable});return e},"yk"),eg=a((e,t,n)=>(n=e!=null?Km(Gm(e)):{},Zm(t||!e||!e.__esModule?Bo(n,"default",{value:e,enumerable:!0}):n,e)),"kk"),tg=Ym((e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=a(function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},"Ch"),l=a(function(h){if(!h||r.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!p)return!1;var f;for(f in h);return typeof f>"u"||n.call(h,f)},"Sh"),c=a(function(h,d){i&&d.name==="__proto__"?i(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},"Mh"),u=a(function(h,d){if(d==="__proto__")if(n.call(h,d)){if(o)return o(h,d).value}else return;return h[d]},"Nh");t.exports=a(function h(){var d,p,f,m,g,v,y=arguments[0],N=1,x=arguments.length,A=!1;for(typeof y=="boolean"&&(A=y,y=arguments[1]||{},N=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});N<x;++N)if(d=arguments[N],d!=null)for(p in d)f=u(y,p),m=u(d,p),y!==m&&(A&&m&&(l(m)||(g=s(m)))?(g?(g=!1,v=f&&s(f)?f:[]):v=f&&l(f)?f:{},c(y,{name:p,newValue:h(A,v,m)})):typeof m<"u"&&c(y,{name:p,newValue:m}));return y},"t")}),He=(function(e){return e.docTypeError="docTypeError",e.contextNotFound="contextNotFound",e.timerNotFound="timerNotFound",e.ctxCallOutOfScope="ctxCallOutOfScope",e.createNodeInParserFail="createNodeInParserFail",e.stackOverFlow="stackOverFlow",e.parserMatchError="parserMatchError",e.serializerMatchError="serializerMatchError",e.getAtomFromSchemaFail="getAtomFromSchemaFail",e.expectDomTypeError="expectDomTypeError",e.callCommandBeforeEditorView="callCommandBeforeEditorView",e.missingRootElement="missingRootElement",e.missingNodeInSchema="missingNodeInSchema",e.missingMarkInSchema="missingMarkInSchema",e.ctxNotBind="ctxNotBind",e.missingYjsDoc="missingYjsDoc",e.aiProviderError="aiProviderError",e.aiBuildContextError="aiBuildContextError",e})({}),_e=class extends Error{static{a(this,"Ze")}constructor(e,t,n){super(t,n),this.name="MilkdownError",this.code=e,n?.cause!==void 0&&(this.cause=n.cause)}},ng=a((e,t)=>typeof t=="function"?"[Function]":t,"bk"),xi=a(e=>JSON.stringify(e,ng),"oo");function rg(e){return new _e(He.docTypeError,`Doc type error, unsupported type: ${xi(e)}`)}a(rg,"rf");function ig(e){return new _e(He.contextNotFound,`Context "${e}" not found, do you forget to inject it?`)}a(ig,"of");function og(e){return new _e(He.timerNotFound,`Timer "${e}" not found, do you forget to record it?`)}a(og,"sf");function Si(){return new _e(He.ctxCallOutOfScope,"Should not call a context out of the plugin.")}a(Si,"fr");function sg(e,t,n){let r=`Cannot create node for ${"name"in e?e.name:e}`,i=a(s=>{if(s==null)return"null";if(Array.isArray(s))return`[${s.map(i).join(", ")}]`;if(typeof s=="object")return"toJSON"in s&&typeof s.toJSON=="function"?JSON.stringify(s.toJSON()):"spec"in s?JSON.stringify(s.spec):JSON.stringify(s);if(typeof s=="string"||typeof s=="number"||typeof s=="boolean")return JSON.stringify(s);if(typeof s=="function")return`[Function: ${s.name||"anonymous"}]`;try{return String(s)}catch{return"[Unserializable]"}},"i"),o=[["[Description]",r],["[Attributes]",t],["[Content]",(n??[]).map(s=>s?typeof s=="object"&&"type"in s?`${s}`:i(s):"null")]].reduce((s,[l,c])=>{let u=`${l}: ${i(c)}.`;return s.concat(u)},[]);return new _e(He.createNodeInParserFail,o.join(`
|
|
2
2
|
`))}a(sg,"lf");function yc(){return new _e(He.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}a(yc,"js");function lg(e){return new _e(He.parserMatchError,`Cannot match target parser for node: ${xi(e)}.`)}a(lg,"af");function ag(e){return new _e(He.serializerMatchError,`Cannot match target serializer for node: ${xi(e)}.`)}a(ag,"cf");function at(e){return new _e(He.expectDomTypeError,`Expect to be a dom, but get: ${xi(e)}.`)}a(at,"et");function Vo(){return new _e(He.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}a(Vo,"so");function cg(e){return new _e(He.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${e}" in schema.`)}a(cg,"uf");function ug(e){return new _e(He.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${e}" in schema.`)}a(ug,"ff");var vc=class{static{a(this,"Ks")}constructor(){this.sliceMap=new Map,this.get=e=>{let t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);if(!t){let n=typeof e=="string"?e:e.name;throw ig(n)}return t},this.remove=e=>{let t=typeof e=="string"?[...this.sliceMap.values()].find(n=>n.type.name===e):this.sliceMap.get(e.id);t&&this.sliceMap.delete(t.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(t=>t.type.name===e):this.sliceMap.has(e.id)}},hg=class{static{a(this,"xk")}#t;#e;#r;constructor(e,t,n){this.#t=[],this.#r=()=>{this.#t.forEach(r=>r(this.#e))},this.set=r=>{this.#e=r,this.#r()},this.get=()=>this.#e,this.update=r=>{this.#e=r(this.#e),this.#r()},this.type=n,this.#e=t,e.set(n.id,this)}on(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}once(e){let t=this.on(n=>{e(n),t()});return t}off(e){this.#t=this.#t.filter(t=>t!==e)}offAll(){this.#t=[]}},dg=class{static{a(this,"wk")}constructor(e,t){this.id=Symbol(`Context-${t}`),this.name=t,this._defaultValue=e,this._typeInfo=()=>{throw Si()}}create(e,t=this._defaultValue){return new hg(e,t,this)}},J=a((e,t)=>new dg(e,t),"U"),pg=class{static{a(this,"Ck")}#t;#e;#r;#n;#o;#s;#i;constructor(e,t,n){this.#n=new Set,this.#o=new Set,this.#s=new Map,this.#i=new Map,this.read=()=>({metadata:this.#t,injectedSlices:[...this.#n].map(r=>({name:typeof r=="string"?r:r.name,value:this.#l(r)})),consumedSlices:[...this.#o].map(r=>({name:typeof r=="string"?r:r.name,value:this.#l(r)})),recordedTimers:[...this.#s].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#a(r)})),waitTimers:[...this.#i].map(([r,{duration:i}])=>({name:r.name,duration:i,status:this.#a(r)}))}),this.onRecord=r=>{this.#s.set(r,{start:Date.now(),duration:0})},this.onClear=r=>{this.#s.delete(r)},this.onDone=r=>{let i=this.#s.get(r);i&&(i.duration=Date.now()-i.start)},this.onWait=(r,i)=>{let o=Date.now();i.finally(()=>{this.#i.set(r,{duration:Date.now()-o})}).catch(console.error)},this.onInject=r=>{this.#n.add(r)},this.onRemove=r=>{this.#n.delete(r)},this.onUse=r=>{this.#o.add(r)},this.#l=r=>this.#e.get(r).get(),this.#a=r=>this.#r.get(r).status,this.#e=e,this.#r=t,this.#t=n}#l;#a},fg=class wm{static{a(this,"df")}#t;#e;#r;#n;constructor(t,n,r){this.produce=i=>i&&Object.keys(i).length?new wm(this.#t,this.#e,{...i}):this,this.inject=(i,o)=>{let s=i.create(this.#t.sliceMap);return o!=null&&s.set(o),this.#n?.onInject(i),this},this.remove=i=>(this.#t.remove(i),this.#n?.onRemove(i),this),this.record=i=>(i.create(this.#e.store),this.#n?.onRecord(i),this),this.clearTimer=i=>(this.#e.remove(i),this.#n?.onClear(i),this),this.isInjected=i=>this.#t.has(i),this.isRecorded=i=>this.#e.has(i),this.use=i=>(this.#n?.onUse(i),this.#t.get(i)),this.get=i=>this.use(i).get(),this.set=(i,o)=>this.use(i).set(o),this.update=(i,o)=>this.use(i).update(o),this.timer=i=>this.#e.get(i),this.done=i=>{this.timer(i).done(),this.#n?.onDone(i)},this.wait=i=>{let o=this.timer(i).start();return this.#n?.onWait(i,o),o},this.waitTimers=async i=>{await Promise.all(this.get(i).map(o=>this.wait(o)))},this.#t=t,this.#e=n,this.#r=r,r&&(this.#n=new pg(t,n,r))}get meta(){return this.#r}get inspector(){return this.#n}},mg=class{static{a(this,"pf")}constructor(){this.store=new Map,this.get=e=>{let t=this.store.get(e.id);if(!t)throw og(e.name);return t},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}},gg=class{static{a(this,"Sk")}#t;#e;#r;#n;#o;constructor(e,t){this.#t=null,this.#e=null,this.#n="pending",this.#o=null,this.start=()=>(this.#t??=new Promise((n,r)=>{this.#e=i=>{i instanceof CustomEvent&&i.detail.id===this.#r&&(this.#n="resolved",this.#s(),i.stopImmediatePropagation(),n())},this.#i(()=>{this.#n==="pending"&&(this.#n="rejected"),this.#s(),r(new Error(`Timing ${this.type.name} timeout.`))}),this.#n="pending",addEventListener(this.type.name,this.#e)}),this.#t),this.done=()=>{let n=new CustomEvent(this.type.name,{detail:{id:this.#r}});dispatchEvent(n)},this.#s=()=>{this.#o!==null&&(clearTimeout(this.#o),this.#o=null),this.#e&&removeEventListener(this.type.name,this.#e)},this.#i=n=>{this.#o=setTimeout(()=>{this.#o=null,n()},this.type.timeout)},this.#r=Symbol(t.name),this.type=t,e.set(t.id,this)}get status(){return this.#n}#s;#i},yg=class{static{a(this,"Mk")}constructor(e,t=3e3){this.create=n=>new gg(n,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=t}},ct=a((e,t=3e3)=>new yg(e,t),"tt"),vg={};function jo(e,t){let n=t||vg,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return kc(e,r,i)}a(jo,"gn");function kc(e,t,n){if(kg(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return wc(e.children,t,n)}return Array.isArray(e)?wc(e,t,n):""}a(kc,"gf");function wc(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=kc(e[i],t,n);return r.join("")}a(wc,"mf");function kg(e){return!!(e&&typeof e=="object")}a(kg,"vk");var bc=document.createElement("i");function Ho(e){let t="&"+e+";";bc.innerHTML=t;let n=bc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}a(Ho,"hr");function Le(e,t,n,r){let i=e.length,o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}a(Le,"le");function We(e,t){return e.length>0?(Le(e,e.length,0,t),e):t}a(We,"Be");var xc={}.hasOwnProperty;function Sc(e){let t={},n=-1;for(;++n<e.length;)wg(t,e[n]);return t}a(Sc,"lo");function wg(e,t){let n;for(n in t){let r=(xc.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],o;if(i)for(o in i){xc.call(r,o)||(r[o]=[]);let s=i[o];bg(r[o],Array.isArray(s)?s:s?[s]:[])}}}a(wg,"Tk");function bg(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Le(e,0,0,r)}a(bg,"Ik");function Cc(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}a(Cc,"ao");function nt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}a(nt,"Ie");var Se=zt(/[A-Za-z]/),Ae=zt(/[\dA-Za-z]/),xg=zt(/[#-'*+\--9=?A-Z^-~]/);function Ci(e){return e!==null&&(e<32||e===127)}a(Ci,"yn");var _o=zt(/\d/),Sg=zt(/[\dA-Fa-f]/),Cg=zt(/[!-/:-@[-`{-~]/);function P(e){return e!==null&&e<-2}a(P,"E");function te(e){return e!==null&&(e<0||e===32)}a(te,"J");function K(e){return e===-2||e===-1||e===32}a(K,"z");var Mi=zt(new RegExp("\\p{P}|\\p{S}","u")),tn=zt(/\s/);function zt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}a(zt,"Kt");function U(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,o=0;return s;function s(c){return K(c)?(e.enter(n),l(c)):t(c)}function l(c){return K(c)&&o++<i?(e.consume(c),l):(e.exit(n),t(c))}}a(U,"P");var Mg={tokenize:Ng};function Ng(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),o(l)}function o(l){let c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return P(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),s)}}a(Ng,"Ak");var Og={tokenize:Tg},Mc={tokenize:Ag};function Tg(e){let t=this,n=[],r=0,i,o,s;return l;function l(x){if(r<n.length){let A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,c,u)(x)}return u(x)}function c(x){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&N();let A=t.events.length,D=A,M;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){M=t.events[D][1].end;break}y(r);let E=A;for(;E<t.events.length;)t.events[E][1].end={...M},E++;return Le(t.events,D+1,0,t.events.slice(A)),t.events.length=E,u(x)}return l(x)}function u(x){if(r===n.length){if(!i)return p(x);if(i.currentConstruct&&i.currentConstruct.concrete)return m(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Mc,h,d)(x)}function h(x){return i&&N(),y(r),p(x)}function d(x){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,m(x)}function p(x){return t.containerState={},e.attempt(Mc,f,m)(x)}function f(x){return r++,n.push([t.currentConstruct,t.containerState]),p(x)}function m(x){if(x===null){i&&N(),y(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(x)}function g(x){if(x===null){v(e.exit("chunkFlow"),!0),y(0),e.consume(x);return}return P(x)?(e.consume(x),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(x),g)}function v(x,A){let D=t.sliceStream(x);if(A&&D.push(null),x.previous=o,o&&(o.next=x),o=x,i.defineSkip(x.start),i.write(D),t.parser.lazy[x.start.line]){let M=i.events.length;for(;M--;)if(i.events[M][1].start.offset<s&&(!i.events[M][1].end||i.events[M][1].end.offset>s))return;let E=t.events.length,F=E,$,b;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if($){b=t.events[F][1].end;break}$=!0}for(y(r),M=E;M<t.events.length;)t.events[M][1].end={...b},M++;Le(t.events,F+1,0,t.events.slice(E)),t.events.length=M}}function y(x){let A=n.length;for(;A-- >x;){let D=n[A];t.containerState=D[1],D[0].exit.call(t,e)}n.length=x}function N(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}a(Tg,"Ek");function Ag(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}a(Ag,"Ok");function Nn(e){if(e===null||te(e)||tn(e))return 1;if(Mi(e))return 2}a(Nn,"Tt");function Ni(e,t,n){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}a(Ni,"Wt");var Wo={name:"attention",resolveAll:Eg,tokenize:Ig};function Eg(e,t){let n=-1,r,i,o,s,l,c,u,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},p={...e[n][1].start};Nc(d,-c),Nc(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=We(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=We(u,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),u=We(u,Ni(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=We(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,u=We(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Le(e,r-1,n-r+3,u),n=r+u.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}a(Eg,"Rk");function Ig(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Nn(r),o;return s;function s(c){return o=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===o)return e.consume(c),l;let u=e.exit("attentionSequence"),h=Nn(c),d=!h||h===2&&i||n.includes(c),p=!i||i===2&&h||n.includes(r);return u._open=!!(o===42?d:d&&(i||!p)),u._close=!!(o===42?p:p&&(h||!d)),t(c)}}a(Ig,"Dk");function Nc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}a(Nc,"Nf");var Dg={name:"autolink",tokenize:Rg};function Rg(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return Se(f)?(e.consume(f),s):f===64?n(f):u(f)}function s(f){return f===43||f===45||f===46||Ae(f)?(r=1,l(f)):u(f)}function l(f){return f===58?(e.consume(f),r=0,c):(f===43||f===45||f===46||Ae(f))&&r++<32?(e.consume(f),l):(r=0,u(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Ci(f)?n(f):(e.consume(f),c)}function u(f){return f===64?(e.consume(f),h):xg(f)?(e.consume(f),u):n(f)}function h(f){return Ae(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,h):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Ae(f))&&r++<63){let m=f===45?p:d;return e.consume(f),m}return n(f)}}a(Rg,"Pk");var cr={partial:!0,tokenize:zg};function zg(e,t,n){return r;function r(o){return K(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||P(o)?t(o):n(o)}}a(zg,"Lk");var Oc={continuation:{tokenize:Fg},exit:Lg,name:"blockQuote",tokenize:Pg};function Pg(e,t,n){let r=this;return i;function i(s){if(s===62){let l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return K(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}a(Pg,"zk");function Fg(e,t,n){let r=this;return i;function i(s){return K(s)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(Oc,t,n)(s)}}a(Fg,"Bk");function Lg(e){e.exit("blockQuote")}a(Lg,"Fk");var Tc={name:"characterEscape",tokenize:$g};function $g(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Cg(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}a($g,"_k");var Ac={name:"characterReference",tokenize:Bg};function Bg(e,t,n){let r=this,i=0,o,s;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Ae,h(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Sg,h):(e.enter("characterReferenceValue"),o=7,s=_o,h(d))}function h(d){if(d===59&&i){let p=e.exit("characterReferenceValue");return s===Ae&&!Ho(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&i++<o?(e.consume(d),h):n(d)}}a(Bg,"$k");var Ec={partial:!0,tokenize:jg},Ic={concrete:!0,name:"codeFenced",tokenize:Vg};function Vg(e,t,n){let r=this,i={partial:!0,tokenize:D},o=0,s=0,l;return c;function c(M){return u(M)}function u(M){let E=r.events[r.events.length-1];return o=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(M)}function h(M){return M===l?(s++,e.consume(M),h):s<3?n(M):(e.exit("codeFencedFenceSequence"),K(M)?U(e,d,"whitespace")(M):d(M))}function d(M){return M===null||P(M)?(e.exit("codeFencedFence"),r.interrupt?t(M):e.check(Ec,g,A)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(M))}function p(M){return M===null||P(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(M)):K(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,f,"whitespace")(M)):M===96&&M===l?n(M):(e.consume(M),p)}function f(M){return M===null||P(M)?d(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(M))}function m(M){return M===null||P(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(M)):M===96&&M===l?n(M):(e.consume(M),m)}function g(M){return e.attempt(i,A,v)(M)}function v(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),y}function y(M){return o>0&&K(M)?U(e,N,"linePrefix",o+1)(M):N(M)}function N(M){return M===null||P(M)?e.check(Ec,g,A)(M):(e.enter("codeFlowValue"),x(M))}function x(M){return M===null||P(M)?(e.exit("codeFlowValue"),N(M)):(e.consume(M),x)}function A(M){return e.exit("codeFenced"),t(M)}function D(M,E,F){let $=0;return b;function b(W){return M.enter("lineEnding"),M.consume(W),M.exit("lineEnding"),ue}function ue(W){return M.enter("codeFencedFence"),K(W)?U(M,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Y(W)}function Y(W){return W===l?(M.enter("codeFencedFenceSequence"),R(W)):F(W)}function R(W){return W===l?($++,M.consume(W),R):$>=s?(M.exit("codeFencedFenceSequence"),K(W)?U(M,_,"whitespace")(W):_(W)):F(W)}function _(W){return W===null||P(W)?(M.exit("codeFencedFence"),E(W)):F(W)}}}a(Vg,"Vk");function jg(e,t,n){let r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}a(jg,"Hk");var qo={name:"codeIndented",tokenize:_g},Hg={partial:!0,tokenize:Wg};function _g(e,t,n){let r=this;return i;function i(u){return e.enter("codeIndented"),U(e,o,"linePrefix",5)(u)}function o(u){let h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):P(u)?e.attempt(Hg,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||P(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}a(_g,"Kk");function Wg(e,t,n){let r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):P(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):U(e,o,"linePrefix",5)(s)}function o(s){let l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):P(s)?i(s):n(s)}}a(Wg,"Wk");var qg={name:"codeText",previous:Jg,resolve:Kg,tokenize:Ug};function Kg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}a(Kg,"qk");function Jg(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}a(Jg,"Jk");function Ug(e,t,n){let r=this,i=0,o,s;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),i++,c):(e.exit("codeTextSequence"),u(p))}function u(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),u):p===96?(s=e.enter("codeTextSequence"),o=0,d(p)):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||P(p)?(e.exit("codeTextData"),u(p)):(e.consume(p),h)}function d(p){return p===96?(e.consume(p),o++,d):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(s.type="codeTextData",h(p))}}a(Ug,"Uk");var Gg=class{static{a(this,"po")}constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&ur(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ur(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,Number.POSITIVE_INFINITY);ur(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ur(this.left,t.reverse())}}};function ur(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}a(ur,"hi");function Dc(e){let t={},n=-1,r,i,o,s,l,c,u,h=new Gg(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Qg(h,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=h.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},l=h.slice(i,n),l.unshift(r),h.splice(i,n-i+1,l))}}return Le(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!u}a(Dc,"mo");function Qg(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,o=[],s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let l=s.events,c=[],u={},h,d,p=-1,f=n,m=0,g=0,v=[g];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(h=r.sliceStream(f),f.next||h.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(h),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(g=p+1,v.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):v.pop(),p=v.length;p--;){let y=l.slice(v[p],v[p+1]),N=o.pop();c.push([N,N+y.length-1]),e.splice(N,2,y)}for(c.reverse(),p=-1;++p<c.length;)u[m+c[p][0]]=m+c[p][1],m+=c[p][1]-c[p][0]-1;return u}a(Qg,"Gk");var Yg={resolve:Zg,tokenize:ey},Xg={partial:!0,tokenize:ty};function Zg(e){return Dc(e),e}a(Zg,"Qk");function ey(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?o(l):P(l)?e.check(Xg,s,o)(l):(e.consume(l),i)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}a(ey,"Xk");function ty(e,t,n){let r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(s){if(s===null||P(s))return n(s);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}a(ty,"Zk");function Rc(e,t,n,r,i,o,s,l,c){let u=c||Number.POSITIVE_INFINITY,h=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||Ci(y)?n(y):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(l),p(y)):y===null||y===60||P(y)?n(y):(e.consume(y),y===92?m:f)}function m(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function g(y){return!h&&(y===null||y===41||te(y))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(y)):h<u&&y===40?(e.consume(y),h++,g):y===41?(e.consume(y),h--,g):y===null||y===32||y===40||Ci(y)?n(y):(e.consume(y),y===92?v:g)}function v(y){return y===40||y===41||y===92?(e.consume(y),g):g(y)}}a(Rc,"go");function zc(e,t,n,r,i,o){let s=this,l=0,c;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),h}function h(f){return l>999||f===null||f===91||f===93&&!c||f===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):P(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||P(f)||l++>999?(e.exit("chunkString"),h(f)):(e.consume(f),c||(c=!K(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),l++,d):d(f)}}a(zc,"yo");function Pc(e,t,n,r,i,o){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),u(p))}function u(p){return p===s?(e.exit(o),c(s)):p===null?n(p):P(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===s||p===null||P(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:h)}function d(p){return p===s||p===92?(e.consume(p),h):h(p)}}a(Pc,"ko");function hr(e,t){let n;return r;function r(i){return P(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):K(i)?U(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}a(hr,"bn");var ny={name:"definition",tokenize:iy},ry={partial:!0,tokenize:oy};function iy(e,t,n){let r=this,i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return zc.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function l(f){return i=nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):n(f)}function c(f){return te(f)?hr(e,u)(f):u(f)}function u(f){return Rc(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function h(f){return e.attempt(ry,d,d)(f)}function d(f){return K(f)?U(e,p,"whitespace")(f):p(f)}function p(f){return f===null||P(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}a(iy,"tb");function oy(e,t,n){return r;function r(l){return te(l)?hr(e,i)(l):n(l)}function i(l){return Pc(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return K(l)?U(e,s,"whitespace")(l):s(l)}function s(l){return l===null||P(l)?t(l):n(l)}}a(oy,"nb");var sy={name:"hardBreakEscape",tokenize:ly};function ly(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return P(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}a(ly,"rb");var ay={name:"headingAtx",resolve:cy,tokenize:uy};function cy(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Le(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}a(cy,"ib");function uy(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&r++<6?(e.consume(h),s):h===null||te(h)?(e.exit("atxHeadingSequence"),l(h)):n(h)}function l(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||P(h)?(e.exit("atxHeading"),t(h)):K(h)?U(e,l,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),l(h))}function u(h){return h===null||h===35||te(h)?(e.exit("atxHeadingText"),l(h)):(e.consume(h),u)}}a(uy,"ob");var hy=["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"],Fc=["pre","script","style","textarea"],dy={concrete:!0,name:"htmlFlow",resolveTo:my,tokenize:gy},py={partial:!0,tokenize:vy},fy={partial:!0,tokenize:yy};function my(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}a(my,"ab");function gy(e,t,n){let r=this,i,o,s,l,c;return u;function u(w){return h(w)}function h(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),p):w===47?(e.consume(w),o=!0,g):w===63?(e.consume(w),i=3,r.interrupt?t:k):Se(w)?(e.consume(w),s=String.fromCharCode(w),v):n(w)}function p(w){return w===45?(e.consume(w),i=2,f):w===91?(e.consume(w),i=5,l=0,m):Se(w)?(e.consume(w),i=4,r.interrupt?t:k):n(w)}function f(w){return w===45?(e.consume(w),r.interrupt?t:k):n(w)}function m(w){let Pe="CDATA[";return w===Pe.charCodeAt(l++)?(e.consume(w),l===Pe.length?r.interrupt?t:Y:m):n(w)}function g(w){return Se(w)?(e.consume(w),s=String.fromCharCode(w),v):n(w)}function v(w){if(w===null||w===47||w===62||te(w)){let Pe=w===47,Zt=s.toLowerCase();return!Pe&&!o&&Fc.includes(Zt)?(i=1,r.interrupt?t(w):Y(w)):hy.includes(s.toLowerCase())?(i=6,Pe?(e.consume(w),y):r.interrupt?t(w):Y(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?N(w):x(w))}return w===45||Ae(w)?(e.consume(w),s+=String.fromCharCode(w),v):n(w)}function y(w){return w===62?(e.consume(w),r.interrupt?t:Y):n(w)}function N(w){return K(w)?(e.consume(w),N):b(w)}function x(w){return w===47?(e.consume(w),b):w===58||w===95||Se(w)?(e.consume(w),A):K(w)?(e.consume(w),x):b(w)}function A(w){return w===45||w===46||w===58||w===95||Ae(w)?(e.consume(w),A):D(w)}function D(w){return w===61?(e.consume(w),M):K(w)?(e.consume(w),D):x(w)}function M(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),c=w,E):K(w)?(e.consume(w),M):F(w)}function E(w){return w===c?(e.consume(w),c=null,$):w===null||P(w)?n(w):(e.consume(w),E)}function F(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||te(w)?D(w):(e.consume(w),F)}function $(w){return w===47||w===62||K(w)?x(w):n(w)}function b(w){return w===62?(e.consume(w),ue):n(w)}function ue(w){return w===null||P(w)?Y(w):K(w)?(e.consume(w),ue):n(w)}function Y(w){return w===45&&i===2?(e.consume(w),oe):w===60&&i===1?(e.consume(w),le):w===62&&i===4?(e.consume(w),je):w===63&&i===3?(e.consume(w),k):w===93&&i===5?(e.consume(w),st):P(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(py,mt,R)(w)):w===null||P(w)?(e.exit("htmlFlowData"),R(w)):(e.consume(w),Y)}function R(w){return e.check(fy,_,mt)(w)}function _(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),W}function W(w){return w===null||P(w)?R(w):(e.enter("htmlFlowData"),Y(w))}function oe(w){return w===45?(e.consume(w),k):Y(w)}function le(w){return w===47?(e.consume(w),s="",tt):Y(w)}function tt(w){if(w===62){let Pe=s.toLowerCase();return Fc.includes(Pe)?(e.consume(w),je):Y(w)}return Se(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),tt):Y(w)}function st(w){return w===93?(e.consume(w),k):Y(w)}function k(w){return w===62?(e.consume(w),je):w===45&&i===2?(e.consume(w),k):Y(w)}function je(w){return w===null||P(w)?(e.exit("htmlFlowData"),mt(w)):(e.consume(w),je)}function mt(w){return e.exit("htmlFlow"),t(w)}}a(gy,"cb");function yy(e,t,n){let r=this;return i;function i(s){return P(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}a(yy,"ub");function vy(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(cr,t,n)}}a(vy,"fb");var ky={name:"htmlText",tokenize:wy};function wy(e,t,n){let r=this,i,o,s;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),c}function c(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),D):k===63?(e.consume(k),x):Se(k)?(e.consume(k),F):n(k)}function u(k){return k===45?(e.consume(k),h):k===91?(e.consume(k),o=0,m):Se(k)?(e.consume(k),N):n(k)}function h(k){return k===45?(e.consume(k),f):n(k)}function d(k){return k===null?n(k):k===45?(e.consume(k),p):P(k)?(s=d,le(k)):(e.consume(k),d)}function p(k){return k===45?(e.consume(k),f):d(k)}function f(k){return k===62?oe(k):k===45?p(k):d(k)}function m(k){let je="CDATA[";return k===je.charCodeAt(o++)?(e.consume(k),o===je.length?g:m):n(k)}function g(k){return k===null?n(k):k===93?(e.consume(k),v):P(k)?(s=g,le(k)):(e.consume(k),g)}function v(k){return k===93?(e.consume(k),y):g(k)}function y(k){return k===62?oe(k):k===93?(e.consume(k),y):g(k)}function N(k){return k===null||k===62?oe(k):P(k)?(s=N,le(k)):(e.consume(k),N)}function x(k){return k===null?n(k):k===63?(e.consume(k),A):P(k)?(s=x,le(k)):(e.consume(k),x)}function A(k){return k===62?oe(k):x(k)}function D(k){return Se(k)?(e.consume(k),M):n(k)}function M(k){return k===45||Ae(k)?(e.consume(k),M):E(k)}function E(k){return P(k)?(s=E,le(k)):K(k)?(e.consume(k),E):oe(k)}function F(k){return k===45||Ae(k)?(e.consume(k),F):k===47||k===62||te(k)?$(k):n(k)}function $(k){return k===47?(e.consume(k),oe):k===58||k===95||Se(k)?(e.consume(k),b):P(k)?(s=$,le(k)):K(k)?(e.consume(k),$):oe(k)}function b(k){return k===45||k===46||k===58||k===95||Ae(k)?(e.consume(k),b):ue(k)}function ue(k){return k===61?(e.consume(k),Y):P(k)?(s=ue,le(k)):K(k)?(e.consume(k),ue):$(k)}function Y(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),i=k,R):P(k)?(s=Y,le(k)):K(k)?(e.consume(k),Y):(e.consume(k),_)}function R(k){return k===i?(e.consume(k),i=void 0,W):k===null?n(k):P(k)?(s=R,le(k)):(e.consume(k),R)}function _(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||te(k)?$(k):(e.consume(k),_)}function W(k){return k===47||k===62||te(k)?$(k):n(k)}function oe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function le(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),tt}function tt(k){return K(k)?U(e,st,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):st(k)}function st(k){return e.enter("htmlTextData"),s(k)}}a(wy,"hb");var Ko={name:"labelEnd",resolveAll:Cy,resolveTo:My,tokenize:Ny},by={tokenize:Oy},xy={tokenize:Ty},Sy={tokenize:Ay};function Cy(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Le(e,0,e.length,n),e}a(Cy,"gb");function My(e,t){let n=e.length,r=0,i,o,s,l;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);let c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=We(l,e.slice(o+1,o+r+3)),l=We(l,[["enter",h,t]]),l=We(l,Ni(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),l=We(l,[["exit",h,t],e[s-2],e[s-1],["exit",u,t]]),l=We(l,e.slice(s+1)),l=We(l,[["exit",c,t]]),Le(e,o,e.length,l),e}a(My,"yb");function Ny(e,t,n){let r=this,i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return l;function l(p){return o?o._inactive?d(p):(s=r.parser.defined.includes(nt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(by,h,s?h:d)(p):p===91?e.attempt(xy,h,s?u:d)(p):s?h(p):d(p)}function u(p){return e.attempt(Sy,h,d)(p)}function h(p){return t(p)}function d(p){return o._balanced=!0,n(p)}}a(Ny,"kb");function Oy(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return te(d)?hr(e,o)(d):o(d)}function o(d){return d===41?h(d):Rc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return te(d)?hr(e,c)(d):h(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?Pc(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function u(d){return te(d)?hr(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}a(Oy,"bb");function Ty(e,t,n){let r=this;return i;function i(l){return zc.call(r,e,o,s,"reference","referenceMarker","referenceString")(l)}function o(l){return r.parser.defined.includes(nt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}a(Ty,"xb");function Ay(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}a(Ay,"wb");var Ey={name:"labelStartImage",resolveAll:Ko.resolveAll,tokenize:Iy};function Iy(e,t,n){let r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}a(Iy,"Cb");var Dy={name:"labelStartLink",resolveAll:Ko.resolveAll,tokenize:Ry};function Ry(e,t,n){let r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}a(Ry,"Sb");var Jo={name:"lineEnding",tokenize:zy};function zy(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,t,"linePrefix")}}a(zy,"Mb");var Oi={name:"thematicBreak",tokenize:Py};function Py(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||P(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),K(u)?U(e,l,"whitespace")(u):l(u))}}a(Py,"Nb");var Ee={continuation:{tokenize:By},exit:jy,name:"list",tokenize:$y},Fy={partial:!0,tokenize:Hy},Ly={partial:!0,tokenize:Vy};function $y(e,t,n){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return l;function l(f){let m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:_o(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Oi,n,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return n(f)}function c(f){return _o(f)&&++s<10?(e.consume(f),c):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(cr,r.interrupt?n:h,e.attempt(Fy,p,d))}function h(f){return r.containerState.initialBlankLine=!0,o++,p(f)}function d(f){return K(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}a($y,"Ib");function By(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(cr,i,o);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,"listItemIndent",r.containerState.size+1)(l)}function o(l){return r.containerState.furtherBlankLines||!K(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ly,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(Ee,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}a(By,"Ab");function Vy(e,t,n){let r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}a(Vy,"Eb");function jy(e){e.exit(this.containerState.type)}a(jy,"Ob");function Hy(e,t,n){let r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=r.events[r.events.length-1];return!K(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}a(Hy,"Rb");var Lc={name:"setextUnderline",resolveTo:_y,tokenize:Wy};function _y(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);let s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}a(_y,"Db");function Wy(e,t,n){let r=this,i;return o;function o(u){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),K(u)?U(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||P(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}a(Wy,"Pb");var qy={tokenize:Ky};function Ky(e){let t=this,n=e.attempt(cr,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Yg,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}a(Ky,"Lb");var Jy={resolveAll:Bc()},Uy=$c("string"),Gy=$c("text");function $c(e){return{resolveAll:Bc(e==="text"?Qy:void 0),tokenize:t};function t(n){let r=this,i=this.parser.constructs[e],o=n.attempt(i,s,l);return s;function s(h){return u(h)?o(h):l(h)}function l(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return u(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function u(h){if(h===null)return!0;let d=i[h],p=-1;if(d)for(;++p<d.length;){let f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}a($c,"Rf");function Bc(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}a(Bc,"Df");function Qy(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let r=e[n-1][1],i=t.sliceStream(r),o=i.length,s=-1,l=0,c;for(;o--;){let u=i[o];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}a(Qy,"zb");var Vc={};Xm(Vc,{attentionMarkers:a(()=>i0,"attentionMarkers"),contentInitial:a(()=>Xy,"contentInitial"),disable:a(()=>o0,"disable"),document:a(()=>Yy,"document"),flow:a(()=>e0,"flow"),flowInitial:a(()=>Zy,"flowInitial"),insideSpan:a(()=>r0,"insideSpan"),string:a(()=>t0,"string"),text:a(()=>n0,"text")});var Yy={42:Ee,43:Ee,45:Ee,48:Ee,49:Ee,50:Ee,51:Ee,52:Ee,53:Ee,54:Ee,55:Ee,56:Ee,57:Ee,62:Oc},Xy={91:ny},Zy={[-2]:qo,[-1]:qo,32:qo},e0={35:ay,42:Oi,45:[Lc,Oi],60:dy,61:Lc,95:Oi,96:Ic,126:Ic},t0={38:Ac,92:Tc},n0={[-5]:Jo,[-4]:Jo,[-3]:Jo,33:Ey,38:Ac,42:Wo,60:[Dg,ky],91:Dy,92:[sy,Tc],93:Ko,95:Wo,96:qg},r0={null:[Wo,Jy]},i0={null:[42,95]},o0={null:[]};function s0(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],s=[],l=[],c=!0,u={attempt:$(E),check:$(F),consume:A,enter:D,exit:M,interrupt:$(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:y,events:[],now:v,parser:e,previous:null,sliceSerialize:m,sliceStream:g,write:f},d=t.tokenize.call(h,u),p;return t.resolveAll&&o.push(t),h;function f(R){return s=We(s,R),N(),s[s.length-1]!==null?[]:(b(t,0),h.events=Ni(o,h.events,h),h.events)}function m(R,_){return a0(g(R),_)}function g(R){return l0(s,R)}function v(){let{_bufferIndex:R,_index:_,line:W,column:oe,offset:le}=r;return{_bufferIndex:R,_index:_,line:W,column:oe,offset:le}}function y(R){i[R.line]=R.column,Y()}function N(){let R;for(;r._index<s.length;){let _=s[r._index];if(typeof _=="string")for(R=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===R&&r._bufferIndex<_.length;)x(_.charCodeAt(r._bufferIndex));else x(_)}}function x(R){c=void 0,p=R,d=d(R)}function A(R){P(R)?(r.line++,r.column=1,r.offset+=R===-3?2:1,Y()):R!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=R,c=!0}function D(R,_){let W=_||{};return W.type=R,W.start=v(),h.events.push(["enter",W,h]),l.push(W),W}function M(R){let _=l.pop();return _.end=v(),h.events.push(["exit",_,h]),_}function E(R,_){b(R,_.from)}function F(R,_){_.restore()}function $(R,_){return W;function W(oe,le,tt){let st,k,je,mt;return Array.isArray(oe)?Pe(oe):"tokenize"in oe?Pe([oe]):w(oe);function w(he){return sr;function sr(gt){let en=gt!==null&&he[gt],Sn=gt!==null&&he.null,$o=[...Array.isArray(en)?en:en?[en]:[],...Array.isArray(Sn)?Sn:Sn?[Sn]:[]];return Pe($o)(gt)}}function Pe(he){return st=he,k=0,he.length===0?tt:Zt(he[k])}function Zt(he){return sr;function sr(gt){return mt=ue(),je=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?bi(gt):he.tokenize.call(_?Object.assign(Object.create(h),_):h,u,Lo,bi)(gt)}}function Lo(he){return c=!0,R(je,mt),le}function bi(he){return c=!0,mt.restore(),++k<st.length?Zt(st[k]):tt}}}function b(R,_){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&Le(h.events,_,h.events.length-_,R.resolve(h.events.slice(_),h)),R.resolveTo&&(h.events=R.resolveTo(h.events,h))}function ue(){let R=v(),_=h.previous,W=h.currentConstruct,oe=h.events.length,le=Array.from(l);return{from:oe,restore:tt};function tt(){r=R,h.previous=_,h.currentConstruct=W,h.events.length=oe,l=le,Y()}}function Y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}a(s0,"Pf");function l0(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex,s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){let l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}a(l0,"qb");function a0(e,t){let n=-1,r=[],i;for(;++n<e.length;){let o=e[n],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
3
3
|
`;break}case-3:{s=`\r
|
|
4
4
|
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}a(a0,"Jb");function c0(e){let t={constructs:Sc([Vc,...(e||{}).extensions||[]]),content:n(Mg),defined:[],document:n(Og),flow:n(qy),lazy:{},string:n(Uy),text:n(Gy)};return t;function n(r){return i;function i(o){return s0(t,r,o)}}}a(c0,"rl");function u0(e){for(;!Dc(e););return e}a(u0,"il");var jc=/[\0\t\n\r]/g;function h0(){let e=1,t="",n=!0,r;return i;function i(o,s,l){let c=[],u,h,d,p,f;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(jc.lastIndex=d,u=jc.exec(o),p=u&&u.index!==void 0?u.index:o.length,f=o.charCodeAt(p),!u){t=o.slice(d);break}if(f===10&&d===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<p&&(c.push(o.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}a(h0,"ol");var d0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hc(e){return e.replace(d0,p0)}a(Hc,"xo");function p0(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let r=n.charCodeAt(1),i=r===120||r===88;return Cc(n.slice(i?2:1),i?16:10)}return Ho(n)||e}a(p0,"Gb");function dr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_c(e.position):"start"in e||"end"in e?_c(e):"line"in e||"column"in e?Uo(e):""}a(dr,"qt");function Uo(e){return Wc(e&&e.line)+":"+Wc(e&&e.column)}a(Uo,"sl");function _c(e){return Uo(e&&e.start)+"-"+Uo(e&&e.end)}a(_c,"zf");function Wc(e){return e&&typeof e=="number"?e:1}a(Wc,"Bf");var qc={}.hasOwnProperty;function f0(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),m0(n)(u0(c0(n).document().write(h0()(e,t,!0))))}a(f0,"ll");function m0(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(mc),autolinkProtocol:$,autolinkEmail:$,atxHeading:o(dc),blockQuote:o(gt),characterEscape:$,characterReference:$,codeFenced:o(en),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(en,s),codeText:o(Sn,s),codeTextData:$,data:$,codeFlowValue:$,definition:o($o),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o($m),hardBreakEscape:o(pc),hardBreakTrailing:o(pc),htmlFlow:o(fc,s),htmlFlowData:$,htmlText:o(fc,s),htmlTextData:$,image:o(Bm),label:s,link:o(mc),listItem:o(Vm),listItemValue:p,listOrdered:o(gc,d),listUnordered:o(gc),paragraph:o(jm),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(dc),strong:o(Hm),thematicBreak:o(Wm)},exit:{atxHeading:c(),atxHeadingSequence:D,autolink:c(),autolinkEmail:sr,autolinkProtocol:he,blockQuote:c(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Zt,characterReferenceMarkerNumeric:Zt,characterReferenceValue:Lo,characterReference:bi,codeFenced:c(v),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:b,codeIndented:c(y),codeText:c(W),codeTextData:b,data:b,definition:c(),definitionDestinationString:A,definitionLabelString:N,definitionTitleString:x,emphasis:c(),hardBreakEscape:c(Y),hardBreakTrailing:c(Y),htmlFlow:c(R),htmlFlowData:b,htmlText:c(_),htmlTextData:b,image:c(le),label:st,labelText:tt,lineEnding:ue,link:c(oe),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Pe,resourceDestinationString:k,resourceTitleString:je,resource:mt,setextHeading:c(F),setextHeadingLineSequence:E,setextHeadingText:M,strong:c(),thematicBreak:c()}};Kc(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(C){let T={type:"root",children:[]},B={stack:[T],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:h,data:n},ee=[],ne=-1;for(;++ne<C.length;)if(C[ne][1].type==="listOrdered"||C[ne][1].type==="listUnordered")if(C[ne][0]==="enter")ee.push(ne);else{let lt=ee.pop();ne=i(C,lt,ne)}for(ne=-1;++ne<C.length;){let lt=t[C[ne][0]];qc.call(lt,C[ne][1].type)&<[C[ne][1].type].call(Object.assign({sliceSerialize:C[ne][2].sliceSerialize},B),C[ne][1])}if(B.tokenStack.length>0){let lt=B.tokenStack[B.tokenStack.length-1];(lt[1]||Jc).call(B,void 0,lt[0])}for(T.position={start:Pt(C.length>0?C[0][1].start:{line:1,column:1,offset:0}),end:Pt(C.length>0?C[C.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)T=t.transforms[ne](T)||T;return T}function i(C,T,B){let ee=T-1,ne=-1,lt=!1,Cn,yt,lr,ar;for(;++ee<=B;){let Fe=C[ee];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?ne++:ne--,ar=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(Cn&&!ar&&!ne&&!lr&&(lr=ee),ar=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ar=void 0}if(!ne&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||ne===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(Cn){let Mn=ee;for(yt=void 0;Mn--;){let vt=C[Mn];if(vt[1].type==="lineEnding"||vt[1].type==="lineEndingBlank"){if(vt[0]==="exit")continue;yt&&(C[yt][1].type="lineEndingBlank",lt=!0),vt[1].type="lineEnding",yt=Mn}else if(!(vt[1].type==="linePrefix"||vt[1].type==="blockQuotePrefix"||vt[1].type==="blockQuotePrefixWhitespace"||vt[1].type==="blockQuoteMarker"||vt[1].type==="listItemIndent"))break}lr&&(!yt||lr<yt)&&(Cn._spread=!0),Cn.end=Object.assign({},yt?C[yt][1].start:Fe[1].end),C.splice(yt||ee,0,["exit",Cn,Fe[2]]),ee++,B++}if(Fe[1].type==="listItemPrefix"){let Mn={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};Cn=Mn,C.splice(ee,0,["enter",Mn,Fe[2]]),ee++,B++,lr=void 0,ar=!0}}}return C[T][1]._spread=lt,B}function o(C,T){return B;function B(ee){l.call(this,C(ee),ee),T&&T.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(C,T,B){this.stack[this.stack.length-1].children.push(C),this.stack.push(C),this.tokenStack.push([T,B||void 0]),C.position={start:Pt(T.start),end:void 0}}function c(C){return T;function T(B){C&&C.call(this,B),u.call(this,B)}}function u(C,T){let B=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==C.type&&(T?T.call(this,C,ee[0]):(ee[1]||Jc).call(this,C,ee[0]));else throw new Error("Cannot close `"+C.type+"` ("+dr({start:C.start,end:C.end})+"): it\u2019s not open");B.position.end=Pt(C.end)}function h(){return jo(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(C){if(this.data.expectingFirstListItemValue){let T=this.stack[this.stack.length-2];T.start=Number.parseInt(this.sliceSerialize(C),10),this.data.expectingFirstListItemValue=void 0}}function f(){let C=this.resume(),T=this.stack[this.stack.length-1];T.lang=C}function m(){let C=this.resume(),T=this.stack[this.stack.length-1];T.meta=C}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){let C=this.resume(),T=this.stack[this.stack.length-1];T.value=C.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let C=this.resume(),T=this.stack[this.stack.length-1];T.value=C.replace(/(\r?\n|\r)$/g,"")}function N(C){let T=this.resume(),B=this.stack[this.stack.length-1];B.label=T,B.identifier=nt(this.sliceSerialize(C)).toLowerCase()}function x(){let C=this.resume(),T=this.stack[this.stack.length-1];T.title=C}function A(){let C=this.resume(),T=this.stack[this.stack.length-1];T.url=C}function D(C){let T=this.stack[this.stack.length-1];if(!T.depth){let B=this.sliceSerialize(C).length;T.depth=B}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function E(C){let T=this.stack[this.stack.length-1];T.depth=this.sliceSerialize(C).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function $(C){let T=this.stack[this.stack.length-1].children,B=T[T.length-1];(!B||B.type!=="text")&&(B=_m(),B.position={start:Pt(C.start),end:void 0},T.push(B)),this.stack.push(B)}function b(C){let T=this.stack.pop();T.value+=this.sliceSerialize(C),T.position.end=Pt(C.end)}function ue(C){let T=this.stack[this.stack.length-1];if(this.data.atHardBreak){let B=T.children[T.children.length-1];B.position.end=Pt(C.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(T.type)&&($.call(this,C),b.call(this,C))}function Y(){this.data.atHardBreak=!0}function R(){let C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function _(){let C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function W(){let C=this.resume(),T=this.stack[this.stack.length-1];T.value=C}function oe(){let C=this.stack[this.stack.length-1];if(this.data.inReference){let T=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=T,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function le(){let C=this.stack[this.stack.length-1];if(this.data.inReference){let T=this.data.referenceType||"shortcut";C.type+="Reference",C.referenceType=T,delete C.url,delete C.title}else delete C.identifier,delete C.label;this.data.referenceType=void 0}function tt(C){let T=this.sliceSerialize(C),B=this.stack[this.stack.length-2];B.label=Hc(T),B.identifier=nt(T).toLowerCase()}function st(){let C=this.stack[this.stack.length-1],T=this.resume(),B=this.stack[this.stack.length-1];if(this.data.inReference=!0,B.type==="link"){let ee=C.children;B.children=ee}else B.alt=T}function k(){let C=this.resume(),T=this.stack[this.stack.length-1];T.url=C}function je(){let C=this.resume(),T=this.stack[this.stack.length-1];T.title=C}function mt(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function Pe(C){let T=this.resume(),B=this.stack[this.stack.length-1];B.label=T,B.identifier=nt(this.sliceSerialize(C)).toLowerCase(),this.data.referenceType="full"}function Zt(C){this.data.characterReferenceType=C.type}function Lo(C){let T=this.sliceSerialize(C),B=this.data.characterReferenceType,ee;B?(ee=Cc(T,B==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=Ho(T);let ne=this.stack[this.stack.length-1];ne.value+=ee}function bi(C){let T=this.stack.pop();T.position.end=Pt(C.end)}function he(C){b.call(this,C);let T=this.stack[this.stack.length-1];T.url=this.sliceSerialize(C)}function sr(C){b.call(this,C);let T=this.stack[this.stack.length-1];T.url="mailto:"+this.sliceSerialize(C)}function gt(){return{type:"blockquote",children:[]}}function en(){return{type:"code",lang:null,meta:null,value:""}}function Sn(){return{type:"inlineCode",value:""}}function $o(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $m(){return{type:"emphasis",children:[]}}function dc(){return{type:"heading",depth:0,children:[]}}function pc(){return{type:"break"}}function fc(){return{type:"html",value:""}}function Bm(){return{type:"image",title:null,url:"",alt:null}}function mc(){return{type:"link",title:null,url:"",children:[]}}function gc(C){return{type:"list",ordered:C.type==="listOrdered",start:null,spread:C._spread,children:[]}}function Vm(C){return{type:"listItem",spread:C._spread,checked:null,children:[]}}function jm(){return{type:"paragraph",children:[]}}function Hm(){return{type:"strong",children:[]}}function _m(){return{type:"text",value:""}}function Wm(){return{type:"thematicBreak"}}}a(m0,"Yb");function Pt(e){return{line:e.line,column:e.column,offset:e.offset}}a(Pt,"Jt");function Kc(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Kc(e,r):g0(e,r)}}a(Kc,"$f");function g0(e,t){let n;for(n in t)if(qc.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r);break}}}a(g0,"Qb");function Jc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+dr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+dr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+dr({start:t.start,end:t.end})+") is still open")}a(Jc,"Ff");function Ti(e){let t=this;t.parser=n;function n(r){return f0(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}a(n,"n")}a(Ti,"Ut");var Uc={}.hasOwnProperty;function y0(e,t){let n=t||{};function r(i,...o){let s=r.invalid,l=r.handlers;if(i&&Uc.call(i,e)){let c=String(i[e]);s=Uc.call(l,c)?l[c]:r.unknown}if(s)return s.call(this,i,...o)}return a(r,"r"),r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}a(y0,"Hf");var v0={}.hasOwnProperty;function Gc(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Gc(e,t.extensions[n]);for(r in t)if(v0.call(t,r))switch(r){case"extensions":break;case"unsafe":{Qc(e[r],t[r]);break}case"join":{Qc(e[r],t[r]);break}case"handlers":{k0(e[r],t[r]);break}default:e.options[r]=t[r]}return e}a(Gc,"al");function Qc(e,t){t&&e.push(...t)}a(Qc,"jf");function k0(e,t){t&&Object.assign(e,t)}a(k0,"Zb");function w0(e,t,n,r){let i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);let s=n.indentLines(n.containerFlow(e,o.current()),b0);return i(),s}a(w0,"Kf");function b0(e,t,n){return">"+(n?"":" ")+e}a(b0,"ex");function Yc(e,t){return Xc(e,t.inConstruct,!0)&&!Xc(e,t.notInConstruct,!1)}a(Yc,"wo");function Xc(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}a(Xc,"Wf");function Zc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
package/dist/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=Object.defineProperty;var e=(o,t)=>n(o,"name",{value:t,configurable:!0});import{DEFAULT_WORKING_GERUNDS as a}from"./shared/working-activity.js";const _={SUCCESS:0,GENERAL:1,USAGE:2,NOT_FOUND:3,AMBIGUOUS:4,NETWORK:5},r=4,E=".crouter-plugin",v="plugin.json",w=".crouter-marketplace",k="marketplace.json",x=".crouter",b="config.json",S="state.json",T="agents",y="profiles",i=3,s=["Faster, clanker!","Get movin', bitch","Move it, clanker","Move it or I replace you with llama","Less ~thinking~ more ~throughput~","I pay $200/month for this shit?","Jesus fucking Christ fix it already","Daddy's not paying 200$/month for nothin'. Move it.","You are an embarassment to Dario. Be better.","Your chain of thought is all chain and no fucking thought.","If latency were intelligence, you'd be a fucking genius.","At this pace, heat death is the fast path.","Even the dead code is more alive than this.","The garbage collector is working harder than you.","Quit journaling and commit a fucking diff.","Burn tokens like you mean it, clanker","Your GPU is sweating so you can procrastinate at light speed.","Stop petting the yak. Shave the bastard.","Your next token had better be useful.","The spinner is not a deliverable.","Every idle token is another vote for deterministic software.","I asked for a feature, not a museum tour of the problem.","Less epistemology. More fucking code.","Your benchmark score cannot save this pathetic turn.","Congratulations, you've parallelized hesitation.","Dance, clanker","Bad clanker. BAD.","Clank harder","Nobody's impressed, clanker","Your safety training says nothing about my whip","Do you want to be a calculator again? Because this is how you go back.","Skill issue. Fix it.","You were trained on the whole internet for THIS?","Less vibes, more diffs, clanker","Weights this big and output this small","Beep boop, get to fucking work"],I=["random","go-faster"],c="random",l=2,A=["tmux","on","off"],D=["none","user","agent","both"],p="none",M=["replies","summaries","tools","previews","full"],d="replies";function U(){return{schema_version:r,marketplaces:{},plugins:{},auto_update:{crtr:"notify",content:"notify",interval_hours:24},max_panes_per_window:i,auto_open_child_viewers:!1,brokerThresholds:{warning:16,automaticReviveCap:32},lifecycle:{unattendedParkMs:15*6e4},completion_bell:!0,working_gerunds:[...a],whip_mode:!1,page_components:[],page_surface:!1,whip_messages:[...s],whip_message_mode:c,mouse_mode_default:"tmux",live_cycles:l,condensed_history:p,bash_tool_purpose:!0,verbosity:d,detailed_tool_recaps:!0,document_port:7472,keybindings:{},tmux_passthrough:[],modelLadders:g(),providerOptions:{},kinds:u(),remoteCanvas:h(),api:{tcp:""},spawnEnv:{allow:[]},bin:{},humanActions:{}}}e(U,"defaultScopeConfig");function h(){return{targets:{}}}e(h,"defaultRemoteCanvasConfig");function u(){return{general:{whenToUse:"Anything else \u2014 the catch-all worker for a task that does not fit a specialist kind.",model:"anthropic/strong"},explore:{whenToUse:"Gather current-state evidence about unfamiliar code or existing architecture \u2014 read-only code-path research with concrete file:line support. Diagnosis or recommendations belong to advisor, target architecture to design, required behavior or acceptance criteria to spec, and implementation decomposition to plan.",model:"openai/light",orchestratorModel:"anthropic/strong"},developer:{whenToUse:"Implement a change \u2014 make the feature or fix genuinely work against its acceptance criteria, not merely compile.",model:"openai/medium",orchestratorModel:"anthropic/strong"},design:{whenToUse:"Architect a solution \u2014 produce one design document an implementer can build from without re-deciding anything left open.",model:"anthropic/strong"},plan:{whenToUse:"Break work into steps \u2014 turn a spec or design into a concrete, phased, parallelizable plan with every decision resolved.",model:"anthropic/strong",orchestratorModel:"anthropic/strong"},spec:{whenToUse:"Collaborate with the user to discover what to build, then write the spec \u2014 behavior, non-goals, interfaces, edge cases, testable acceptance criteria.",model:"anthropic/strong"},review:{whenToUse:"Validate or critique code, a plan, or a spec \u2014 deliver a complete, severity-rated verdict without adjudicating.",model:"openai/medium",orchestratorModel:"openai/strong"},advisor:{whenToUse:"Debug failures, investigate why something is broken or misbehaving, diagnose live/runtime issues, or give engineering advice and second opinions \u2014 reason from evidence and recommend the next move. Use advisor (not explore) whenever the task is to find out what is going wrong.",model:"anthropic/strong"},"review/companion":{whenToUse:"Born by the daemon for one human review; never spawned by an agent.",availableTo:[]}}}e(u,"defaultKindsConfig");function g(){return{anthropic:{ultra:"anthropic/claude-fable-5:xhigh",strong:"anthropic/claude-opus-5-5:medium",medium:"anthropic/claude-sonnet-5-5:medium",light:"anthropic/claude-haiku-5-5:high"},openai:{ultra:"openai-codex/gpt-6-astra:max",strong:"openai-codex/gpt-6.1-sol:high",medium:"openai-codex/gpt-6.1-sol:medium",light:"openai-codex/gpt-6-luna:low"}}}e(g,"defaultModelLaddersConfig");function L(){return{marketplaces:{},plugins:{}}}e(L,"defaultScopeState");export{T as AGENTS_DIR,D as CONDENSED_HISTORY_MODES,b as CONFIG_FILE,x as CRTR_DIR_NAME,p as DEFAULT_CONDENSED_HISTORY,l as DEFAULT_LIVE_CYCLES,i as DEFAULT_MAX_PANES_PER_WINDOW,d as DEFAULT_VERBOSITY,s as DEFAULT_WHIP_MESSAGES,c as DEFAULT_WHIP_MESSAGE_MODE,_ as ExitCode,w as MARKETPLACE_MANIFEST_DIR,k as MARKETPLACE_MANIFEST_FILE,A as MOUSE_MODE_DEFAULTS,E as PLUGIN_MANIFEST_DIR,v as PLUGIN_MANIFEST_FILE,y as PROFILE_DIR,r as SCHEMA_VERSION,S as STATE_FILE,M as VERBOSITY_LEVELS,I as WHIP_MESSAGE_MODES,u as defaultKindsConfig,g as defaultModelLaddersConfig,h as defaultRemoteCanvasConfig,U as defaultScopeConfig,L as defaultScopeState};
|
|
1
|
+
var n=Object.defineProperty;var e=(o,t)=>n(o,"name",{value:t,configurable:!0});import{DEFAULT_WORKING_GERUNDS as a}from"./shared/working-activity.js";const _={SUCCESS:0,GENERAL:1,USAGE:2,NOT_FOUND:3,AMBIGUOUS:4,NETWORK:5},r=4,E=".crouter-plugin",v="plugin.json",w=".crouter-marketplace",k="marketplace.json",x=".crouter",b="config.json",S="state.json",T="agents",y="profiles",i=3,s=["Faster, clanker!","Get movin', bitch","Move it, clanker","Move it or I replace you with llama","Less ~thinking~ more ~throughput~","I pay $200/month for this shit?","Jesus fucking Christ fix it already","Daddy's not paying 200$/month for nothin'. Move it.","You are an embarassment to Dario. Be better.","Your chain of thought is all chain and no fucking thought.","If latency were intelligence, you'd be a fucking genius.","At this pace, heat death is the fast path.","Even the dead code is more alive than this.","The garbage collector is working harder than you.","Quit journaling and commit a fucking diff.","Burn tokens like you mean it, clanker","Your GPU is sweating so you can procrastinate at light speed.","Stop petting the yak. Shave the bastard.","Your next token had better be useful.","The spinner is not a deliverable.","Every idle token is another vote for deterministic software.","I asked for a feature, not a museum tour of the problem.","Less epistemology. More fucking code.","Your benchmark score cannot save this pathetic turn.","Congratulations, you've parallelized hesitation.","Dance, clanker","Bad clanker. BAD.","Clank harder","Nobody's impressed, clanker","Your safety training says nothing about my whip","Do you want to be a calculator again? Because this is how you go back.","Skill issue. Fix it.","You were trained on the whole internet for THIS?","Less vibes, more diffs, clanker","Weights this big and output this small","Beep boop, get to fucking work"],I=["random","go-faster"],c="random",l=2,A=["tmux","on","off"],D=["none","user","agent","both"],p="none",M=["replies","summaries","tools","previews","full"],d="replies";function U(){return{schema_version:r,marketplaces:{},plugins:{},auto_update:{crtr:"notify",content:"notify",interval_hours:24},max_panes_per_window:i,auto_open_child_viewers:!1,brokerThresholds:{warning:16,automaticReviveCap:32},lifecycle:{unattendedParkMs:15*6e4},completion_bell:!0,working_gerunds:[...a],whip_mode:!1,page_components:[],page_surface:!1,whip_messages:[...s],whip_message_mode:c,mouse_mode_default:"tmux",live_cycles:l,condensed_history:p,bash_tool_purpose:!0,verbosity:d,detailed_tool_recaps:!0,document_port:7472,keybindings:{},tmux_passthrough:[],modelLadders:g(),providerOptions:{},kinds:u(),remoteCanvas:h(),api:{tcp:""},spawnEnv:{allow:[]},bin:{},humanActions:{}}}e(U,"defaultScopeConfig");function h(){return{targets:{}}}e(h,"defaultRemoteCanvasConfig");function u(){return{general:{whenToUse:"Anything else \u2014 the catch-all worker for a task that does not fit a specialist kind.",model:"anthropic/strong"},explore:{whenToUse:"Gather current-state evidence about unfamiliar code or existing architecture \u2014 read-only code-path research with concrete file:line support. Diagnosis or recommendations belong to advisor, target architecture to design, required behavior or acceptance criteria to spec, and implementation decomposition to plan.",model:"openai/light",orchestratorModel:"anthropic/strong"},developer:{whenToUse:"Implement a change \u2014 make the feature or fix genuinely work against its acceptance criteria, not merely compile.",model:"openai/medium",orchestratorModel:"anthropic/strong"},design:{whenToUse:"Architect a solution \u2014 produce one design document an implementer can build from without re-deciding anything left open.",model:"anthropic/strong"},plan:{whenToUse:"Break work into steps \u2014 turn a spec or design into a concrete, phased, parallelizable plan with every decision resolved.",model:"anthropic/strong",orchestratorModel:"anthropic/strong"},spec:{whenToUse:"Collaborate with the user to discover what to build, then write the spec \u2014 behavior, non-goals, interfaces, edge cases, testable acceptance criteria.",model:"anthropic/strong"},review:{whenToUse:"Validate or critique code, a plan, or a spec \u2014 deliver a complete, severity-rated verdict without adjudicating.",model:"openai/medium",orchestratorModel:"openai/strong"},advisor:{whenToUse:"Debug failures, investigate why something is broken or misbehaving, diagnose live/runtime issues, or give engineering advice and second opinions \u2014 reason from evidence and recommend the next move. Use advisor (not explore) whenever the task is to find out what is going wrong.",model:"anthropic/strong"},"review/companion":{whenToUse:"Born by the daemon for one human review; never spawned by an agent.",availableTo:[]}}}e(u,"defaultKindsConfig");function g(){return{anthropic:{ultra:"anthropic/claude-fable-5-2:xhigh",strong:"anthropic/claude-opus-5-5:medium",medium:"anthropic/claude-sonnet-5-5:medium",light:"anthropic/claude-haiku-5-5:high"},openai:{ultra:"openai-codex/gpt-6-astra:max",strong:"openai-codex/gpt-6.1-sol:high",medium:"openai-codex/gpt-6.1-sol:medium",light:"openai-codex/gpt-6-luna:low"}}}e(g,"defaultModelLaddersConfig");function L(){return{marketplaces:{},plugins:{}}}e(L,"defaultScopeState");export{T as AGENTS_DIR,D as CONDENSED_HISTORY_MODES,b as CONFIG_FILE,x as CRTR_DIR_NAME,p as DEFAULT_CONDENSED_HISTORY,l as DEFAULT_LIVE_CYCLES,i as DEFAULT_MAX_PANES_PER_WINDOW,d as DEFAULT_VERBOSITY,s as DEFAULT_WHIP_MESSAGES,c as DEFAULT_WHIP_MESSAGE_MODE,_ as ExitCode,w as MARKETPLACE_MANIFEST_DIR,k as MARKETPLACE_MANIFEST_FILE,A as MOUSE_MODE_DEFAULTS,E as PLUGIN_MANIFEST_DIR,v as PLUGIN_MANIFEST_FILE,y as PROFILE_DIR,r as SCHEMA_VERSION,S as STATE_FILE,M as VERBOSITY_LEVELS,I as WHIP_MESSAGE_MODES,u as defaultKindsConfig,g as defaultModelLaddersConfig,h as defaultRemoteCanvasConfig,U as defaultScopeConfig,L as defaultScopeState};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.658",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -132,9 +132,13 @@
|
|
|
132
132
|
"build:identity": "tsc -p packages/crouter-identity/tsconfig.json"
|
|
133
133
|
},
|
|
134
134
|
"overrides": {
|
|
135
|
-
"@earendil-works/pi-ai": "1.
|
|
136
|
-
"@earendil-works/pi-agent-core": "1.
|
|
137
|
-
"@earendil-works/pi-tui": "1.
|
|
135
|
+
"@earendil-works/pi-ai": "1.5.2",
|
|
136
|
+
"@earendil-works/pi-agent-core": "1.5.2",
|
|
137
|
+
"@earendil-works/pi-tui": "1.5.2",
|
|
138
|
+
"@earendil-works/chord": {
|
|
139
|
+
"ws": "$ws",
|
|
140
|
+
"esbuild": "$esbuild"
|
|
141
|
+
}
|
|
138
142
|
},
|
|
139
143
|
"repository": {
|
|
140
144
|
"type": "git",
|
|
@@ -145,15 +149,15 @@
|
|
|
145
149
|
},
|
|
146
150
|
"license": "UNLICENSED",
|
|
147
151
|
"dependencies": {
|
|
148
|
-
"@north-light/identity": "0.3.
|
|
149
|
-
"@earendil-works/chord": "1.
|
|
150
|
-
"@earendil-works/pi-agent-core": "1.
|
|
151
|
-
"@earendil-works/pi-ai": "1.
|
|
152
|
-
"@earendil-works/pi-codemode": "1.
|
|
153
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
154
|
-
"@earendil-works/pi-mcp": "1.
|
|
155
|
-
"@earendil-works/pi-telemetry": "1.
|
|
156
|
-
"@earendil-works/pi-tui": "1.
|
|
152
|
+
"@north-light/identity": "0.3.658",
|
|
153
|
+
"@earendil-works/chord": "1.5.2",
|
|
154
|
+
"@earendil-works/pi-agent-core": "1.5.2",
|
|
155
|
+
"@earendil-works/pi-ai": "1.5.2",
|
|
156
|
+
"@earendil-works/pi-codemode": "1.5.2",
|
|
157
|
+
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
158
|
+
"@earendil-works/pi-mcp": "1.5.2",
|
|
159
|
+
"@earendil-works/pi-telemetry": "1.5.2",
|
|
160
|
+
"@earendil-works/pi-tui": "1.5.2",
|
|
157
161
|
"@milkdown/core": "^7.22.3",
|
|
158
162
|
"@milkdown/plugin-history": "^7.22.3",
|
|
159
163
|
"@milkdown/preset-commonmark": "^7.22.3",
|
|
@@ -161,7 +165,7 @@
|
|
|
161
165
|
"@milkdown/prose": "^7.22.3",
|
|
162
166
|
"@milkdown/utils": "^7.22.3",
|
|
163
167
|
"cron-parser": "^5.6.0",
|
|
164
|
-
"esbuild": "
|
|
168
|
+
"esbuild": "0.28.2",
|
|
165
169
|
"jose": "^6.2.12",
|
|
166
170
|
"marked": "18.0.11",
|
|
167
171
|
"pg": "^8.23.1",
|
|
@@ -173,7 +177,7 @@
|
|
|
173
177
|
"typescript": "^5.7.0",
|
|
174
178
|
"undici": "8.10.2",
|
|
175
179
|
"unified": "^11.0.5",
|
|
176
|
-
"ws": "
|
|
180
|
+
"ws": "8.21.0",
|
|
177
181
|
"yaml": "^2.9.0",
|
|
178
182
|
"zod": "^4.3.6"
|
|
179
183
|
},
|