orbitchat 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/assets/{api-CK3k3ceJ.js → api-DZkCbfw-.js} +1 -1
  2. package/dist/assets/{arc-CvECY7sY-BAfm7gAl.js → arc-CvECY7sY-CCUjLJq2.js} +1 -1
  3. package/dist/assets/{blockDiagram-c4efeb88-NvaZhZFT-B2z-bNEd.js → blockDiagram-c4efeb88-NvaZhZFT-2jTGmfzw.js} +1 -1
  4. package/dist/assets/{c4Diagram-c83219d4-gPr1eF38-BpklvzfC.js → c4Diagram-c83219d4-gPr1eF38-DMPWXy6y.js} +1 -1
  5. package/dist/assets/channel-6PI3wNcc-BxckuQvX.js +1 -0
  6. package/dist/assets/{classDiagram-beda092f-B8axaKGu-C7KpiekH.js → classDiagram-beda092f-B8axaKGu-Cu_ZIJ6u.js} +1 -1
  7. package/dist/assets/{classDiagram-v2-2358418a-DPdf2DxR-CfXv0anP.js → classDiagram-v2-2358418a-DPdf2DxR-BZsTNggP.js} +1 -1
  8. package/dist/assets/clone-D01vUIhD-DmY5mrln.js +1 -0
  9. package/dist/assets/{createText-1719965b-D9Y3vUMn-UiwO3q8Q.js → createText-1719965b-D9Y3vUMn-DDdadCK5.js} +1 -1
  10. package/dist/assets/{edges-96097737-Zc6U9nQz-Czq3--42.js → edges-96097737-Zc6U9nQz-BzB5ko4h.js} +1 -1
  11. package/dist/assets/{erDiagram-0228fc6a-BLw8FsIp-CkgJ5rpM.js → erDiagram-0228fc6a-BLw8FsIp-Cs8VClxW.js} +1 -1
  12. package/dist/assets/{flowDb-c6c81e3f-DXVkMlSE-DRQM6L-v.js → flowDb-c6c81e3f-DXVkMlSE-lHya7k5v.js} +1 -1
  13. package/dist/assets/{flowDiagram-50d868cf-mkkB0hFd-CL_JosYM.js → flowDiagram-50d868cf-mkkB0hFd-S2mNfjcZ.js} +1 -1
  14. package/dist/assets/flowDiagram-v2-4f6560a1-BRIhxQ3y-DOhW7LIb.js +1 -0
  15. package/dist/assets/{flowchart-elk-definition-6af322e1-D9IbjnSJ-DWoCBlEO.js → flowchart-elk-definition-6af322e1-D9IbjnSJ-RN3qt1rV.js} +1 -1
  16. package/dist/assets/{ganttDiagram-a2739b55-Cqs5_Zht-CyVqot_b.js → ganttDiagram-a2739b55-Cqs5_Zht-C5tqANPy.js} +1 -1
  17. package/dist/assets/{gitGraphDiagram-82fe8481-txBzFn40-CZkxfaP2.js → gitGraphDiagram-82fe8481-txBzFn40-CsYRcfiT.js} +1 -1
  18. package/dist/assets/{graph-BZahQKIN-CTgzd5us.js → graph-BZahQKIN-CenQ9kLM.js} +1 -1
  19. package/dist/assets/{index-5325376f-DsNDppci-BaFeDo3U.js → index-5325376f-DsNDppci-BmtId_7h.js} +1 -1
  20. package/dist/assets/{index-CDwx2U7N.js → index-CVRNWcf-.js} +91 -91
  21. package/dist/assets/{infoDiagram-8eee0895-SbmhgTjv-CCnN8bBn.js → infoDiagram-8eee0895-SbmhgTjv-DWbp8qIg.js} +1 -1
  22. package/dist/assets/{journeyDiagram-c64418c1-C7AiwbKr-YZTGwLv1.js → journeyDiagram-c64418c1-C7AiwbKr-CR4ESCM3.js} +1 -1
  23. package/dist/assets/{layout-j-hMNqAM-C88IAVJC.js → layout-j-hMNqAM-d_O0ZYu6.js} +1 -1
  24. package/dist/assets/{mindmap-definition-8da855dc-B1WjnfxE-a9TK-xQN.js → mindmap-definition-8da855dc-B1WjnfxE-C_ekkGNm.js} +1 -1
  25. package/dist/assets/{pieDiagram-a8764435-zrkaw4r--BMPBVA0x.js → pieDiagram-a8764435-zrkaw4r--nNryZ7xt.js} +1 -1
  26. package/dist/assets/{quadrantDiagram-1e28029f-C2Wa5n16-DwWDm6cx.js → quadrantDiagram-1e28029f-C2Wa5n16-DJsmIh09.js} +1 -1
  27. package/dist/assets/{requirementDiagram-08caed73-BtHxx079-zeP-18qR.js → requirementDiagram-08caed73-BtHxx079-DyPYX9i4.js} +1 -1
  28. package/dist/assets/{sankeyDiagram-a04cb91d-DXlmqTKB-BJu62Tg5.js → sankeyDiagram-a04cb91d-DXlmqTKB-DF_MhieU.js} +1 -1
  29. package/dist/assets/{sequenceDiagram-c5b8d532-BVQF3vcA-GR7-Xw8e.js → sequenceDiagram-c5b8d532-BVQF3vcA-OQvBng6Z.js} +1 -1
  30. package/dist/assets/{stateDiagram-1ecb1508-Dybc3i2m-BMJzxrY5.js → stateDiagram-1ecb1508-Dybc3i2m-DpShq5Fv.js} +1 -1
  31. package/dist/assets/{stateDiagram-v2-c2b004d7-Bp8rRkv2-Dm74LB8O.js → stateDiagram-v2-c2b004d7-Bp8rRkv2-9nDDCxFS.js} +1 -1
  32. package/dist/assets/{styles-b4e223ce-BSiU4oYL-9ql-THae.js → styles-b4e223ce-BSiU4oYL-D8WR6bxO.js} +1 -1
  33. package/dist/assets/{styles-ca3715f6-DU7x0doE-B7zhH0Zm.js → styles-ca3715f6-DU7x0doE-BqM8h3vG.js} +1 -1
  34. package/dist/assets/{styles-d45a18b0-B_CU21kM--NwLlmWK.js → styles-d45a18b0-B_CU21kM-BP9RAefH.js} +1 -1
  35. package/dist/assets/{svgDrawCommon-b86b1483-sbEe2n2v-CJw2W-Er.js → svgDrawCommon-b86b1483-sbEe2n2v-CFwc1_jc.js} +1 -1
  36. package/dist/assets/{timeline-definition-faaaa080-b82QCnJ9-CY85LKH1.js → timeline-definition-faaaa080-b82QCnJ9-D_9su1EE.js} +1 -1
  37. package/dist/assets/{xychartDiagram-f5964ef8-BtRcO0uy-ylxrBreP.js → xychartDiagram-f5964ef8-BtRcO0uy-C_Ru9X19.js} +1 -1
  38. package/dist/index.html +1 -1
  39. package/package.json +1 -1
  40. package/dist/assets/channel-6PI3wNcc-1exBkyGg.js +0 -1
  41. package/dist/assets/clone-D01vUIhD-D0aslzw6.js +0 -1
  42. package/dist/assets/flowDiagram-v2-4f6560a1-BRIhxQ3y-BzGZQhJW.js +0 -1
@@ -1,2 +1,2 @@
1
- import{_ as K}from"./index-CDwx2U7N.js";var j=Object.defineProperty,q=(l,i,e)=>i in l?j(l,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[i]=e,I=(l,i,e)=>q(l,typeof i!="symbol"?i+"":i,e);let F=null,$=null;typeof window>"u"&&Promise.all([K(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]).catch(()=>null),K(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]).catch(()=>null)]).then(([l,i])=>{var e,t;(e=l==null?void 0:l.default)!=null&&e.Agent?F=new l.default.Agent({keepAlive:!0}):l!=null&&l.Agent&&(F=new l.Agent({keepAlive:!0})),(t=i==null?void 0:i.default)!=null&&t.Agent?$=new i.default.Agent({keepAlive:!0}):i!=null&&i.Agent&&($=new i.Agent({keepAlive:!0}))}).catch(l=>{console.warn("Failed to initialize HTTP agents:",l.message)});class D{constructor(i){if(I(this,"apiUrl"),I(this,"apiKey"),I(this,"sessionId"),!i.apiUrl||typeof i.apiUrl!="string")throw new Error("API URL must be a valid string");if(i.apiKey!==void 0&&i.apiKey!==null&&typeof i.apiKey!="string")throw new Error("API key must be a valid string or null");if(i.sessionId!==void 0&&i.sessionId!==null&&typeof i.sessionId!="string")throw new Error("Session ID must be a valid string or null");this.apiUrl=i.apiUrl,this.apiKey=i.apiKey??null,this.sessionId=i.sessionId??null}setSessionId(i){if(i!==null&&typeof i!="string")throw new Error("Session ID must be a valid string or null");this.sessionId=i}getSessionId(){return this.sessionId}async validateApiKey(){var i;if(!this.apiKey)throw new Error("API key is required for validation");try{const e=await fetch(`${this.apiUrl}/admin/api-keys/${this.apiKey}/status`,{...this.getFetchOptions({method:"GET"})}).catch(r=>{throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):r});if(!e.ok){let r="";try{r=await e.text()}catch{r=`HTTP ${e.status}`}let s,o;try{const a=JSON.parse(r);s=a.detail||a.message||r}catch{s=r||`HTTP ${e.status}`}switch(e.status){case 401:o="API key is invalid or expired";break;case 403:o="Access denied: API key does not have required permissions";break;case 404:o="API key not found";break;case 503:o="API key management is not available in inference-only mode";break;default:o=`Failed to validate API key: ${s}`;break}throw new Error(o)}const t=await e.json();if(!t.exists){const r="API key does not exist";throw new Error(r)}if(!t.active){const r="API key is inactive";throw new Error(r)}return t}catch(e){let t;throw e instanceof Error&&e.message?e.message.includes("API key")||e.message.includes("Access denied")||e.message.includes("invalid")||e.message.includes("expired")||e.message.includes("inactive")||e.message.includes("not found")||e.message.includes("Could not connect")?t=e.message:t=`API key validation failed: ${e.message}`:e.name==="TypeError"&&(i=e.message)!=null&&i.includes("Failed to fetch")?t="Could not connect to the server. Please check if the server is running.":t="API key validation failed. Please check your API key and try again.",console.warn(`[ApiClient] ${t}`),new Error(t)}}async getAdapterInfo(){var i;if(!this.apiKey)throw new Error("API key is required to get adapter information");try{const e=await fetch(`${this.apiUrl}/admin/api-keys/info`,{...this.getFetchOptions({method:"GET"})}).catch(t=>{throw t.name==="TypeError"&&t.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):t});if(!e.ok){let t="";try{t=await e.text()}catch{t=`HTTP ${e.status}`}let r,s;try{const o=JSON.parse(t);r=o.detail||o.message||t}catch{r=t||`HTTP ${e.status}`}switch(e.status){case 401:s="API key is invalid, disabled, or has no associated adapter";break;case 404:s="Adapter configuration not found";break;case 503:s="Service is not available";break;default:s=`Failed to get adapter info: ${r}`;break}throw new Error(s)}return await e.json()}catch(e){let t;throw e instanceof Error&&e.message?e.message.includes("API key")||e.message.includes("Adapter")||e.message.includes("invalid")||e.message.includes("disabled")||e.message.includes("not found")||e.message.includes("Could not connect")?t=e.message:t=`Failed to get adapter info: ${e.message}`:e.name==="TypeError"&&(i=e.message)!=null&&i.includes("Failed to fetch")?t="Could not connect to the server. Please check if the server is running.":t="Failed to get adapter information. Please try again.",console.warn(`[ApiClient] ${t}`),new Error(t)}}getFetchOptions(i={}){const e={};if(typeof window>"u"){const r=this.apiUrl.startsWith("https:")?$:F;r&&(e.agent=r)}else e.headers={Connection:"keep-alive"};const t={"X-Request-ID":Date.now().toString(36)+Math.random().toString(36).substring(2)};if(e.headers&&Object.assign(t,e.headers),i.headers){const r=i.headers;for(const[s,o]of Object.entries(r))(s.toLowerCase()!=="x-api-key"||!this.apiKey)&&(t[s]=o)}return this.apiKey&&(t["X-API-Key"]=this.apiKey),this.sessionId&&(t["X-Session-ID"]=this.sessionId),{...i,...e,headers:t}}createChatRequest(i,e=!0,t,r,s,o,a,h,p,y,v){const c={messages:[{role:"user",content:i}],stream:e};return t&&t.length>0&&(c.file_ids=t),r&&(c.thread_id=r),s&&(c.audio_input=s),o&&(c.audio_format=o),a&&(c.language=a),h!==void 0&&(c.return_audio=h),p&&(c.tts_voice=p),y&&(c.source_language=y),v&&(c.target_language=v),c}async*streamChat(i,e=!0,t,r,s,o,a,h,p,y,v){var c,C;try{const w=new AbortController,O=setTimeout(()=>w.abort(),6e4),g=await fetch(`${this.apiUrl}/v1/chat`,{...this.getFetchOptions({method:"POST",headers:{"Content-Type":"application/json",Accept:e?"text/event-stream":"application/json"},body:JSON.stringify(this.createChatRequest(i,e,t,r,s,o,a,h,p,y,v))}),signal:w.signal});if(clearTimeout(O),!g.ok){const f=await g.text();throw new Error(`Network response was not ok: ${g.status} ${f}`)}if(!e){const f=await g.json();f.response&&(yield{text:f.response,done:!0,audio:f.audio,audioFormat:f.audio_format});return}const A=(c=g.body)==null?void 0:c.getReader();if(!A)throw new Error("No reader available");const _=new TextDecoder;let u="",E=!1;try{for(;;){const{done:f,value:S}=await A.read();if(f)break;const U=_.decode(S,{stream:!0});u+=U;let k=0,P;for(;(P=u.indexOf(`
1
+ import{_ as K}from"./index-CVRNWcf-.js";var j=Object.defineProperty,q=(l,i,e)=>i in l?j(l,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[i]=e,I=(l,i,e)=>q(l,typeof i!="symbol"?i+"":i,e);let F=null,$=null;typeof window>"u"&&Promise.all([K(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]).catch(()=>null),K(()=>import("./__vite-browser-external-BIHI7g3E.js"),[]).catch(()=>null)]).then(([l,i])=>{var e,t;(e=l==null?void 0:l.default)!=null&&e.Agent?F=new l.default.Agent({keepAlive:!0}):l!=null&&l.Agent&&(F=new l.Agent({keepAlive:!0})),(t=i==null?void 0:i.default)!=null&&t.Agent?$=new i.default.Agent({keepAlive:!0}):i!=null&&i.Agent&&($=new i.Agent({keepAlive:!0}))}).catch(l=>{console.warn("Failed to initialize HTTP agents:",l.message)});class D{constructor(i){if(I(this,"apiUrl"),I(this,"apiKey"),I(this,"sessionId"),!i.apiUrl||typeof i.apiUrl!="string")throw new Error("API URL must be a valid string");if(i.apiKey!==void 0&&i.apiKey!==null&&typeof i.apiKey!="string")throw new Error("API key must be a valid string or null");if(i.sessionId!==void 0&&i.sessionId!==null&&typeof i.sessionId!="string")throw new Error("Session ID must be a valid string or null");this.apiUrl=i.apiUrl,this.apiKey=i.apiKey??null,this.sessionId=i.sessionId??null}setSessionId(i){if(i!==null&&typeof i!="string")throw new Error("Session ID must be a valid string or null");this.sessionId=i}getSessionId(){return this.sessionId}async validateApiKey(){var i;if(!this.apiKey)throw new Error("API key is required for validation");try{const e=await fetch(`${this.apiUrl}/admin/api-keys/${this.apiKey}/status`,{...this.getFetchOptions({method:"GET"})}).catch(r=>{throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):r});if(!e.ok){let r="";try{r=await e.text()}catch{r=`HTTP ${e.status}`}let s,o;try{const a=JSON.parse(r);s=a.detail||a.message||r}catch{s=r||`HTTP ${e.status}`}switch(e.status){case 401:o="API key is invalid or expired";break;case 403:o="Access denied: API key does not have required permissions";break;case 404:o="API key not found";break;case 503:o="API key management is not available in inference-only mode";break;default:o=`Failed to validate API key: ${s}`;break}throw new Error(o)}const t=await e.json();if(!t.exists){const r="API key does not exist";throw new Error(r)}if(!t.active){const r="API key is inactive";throw new Error(r)}return t}catch(e){let t;throw e instanceof Error&&e.message?e.message.includes("API key")||e.message.includes("Access denied")||e.message.includes("invalid")||e.message.includes("expired")||e.message.includes("inactive")||e.message.includes("not found")||e.message.includes("Could not connect")?t=e.message:t=`API key validation failed: ${e.message}`:e.name==="TypeError"&&(i=e.message)!=null&&i.includes("Failed to fetch")?t="Could not connect to the server. Please check if the server is running.":t="API key validation failed. Please check your API key and try again.",console.warn(`[ApiClient] ${t}`),new Error(t)}}async getAdapterInfo(){var i;if(!this.apiKey)throw new Error("API key is required to get adapter information");try{const e=await fetch(`${this.apiUrl}/admin/api-keys/info`,{...this.getFetchOptions({method:"GET"})}).catch(t=>{throw t.name==="TypeError"&&t.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):t});if(!e.ok){let t="";try{t=await e.text()}catch{t=`HTTP ${e.status}`}let r,s;try{const o=JSON.parse(t);r=o.detail||o.message||t}catch{r=t||`HTTP ${e.status}`}switch(e.status){case 401:s="API key is invalid, disabled, or has no associated adapter";break;case 404:s="Adapter configuration not found";break;case 503:s="Service is not available";break;default:s=`Failed to get adapter info: ${r}`;break}throw new Error(s)}return await e.json()}catch(e){let t;throw e instanceof Error&&e.message?e.message.includes("API key")||e.message.includes("Adapter")||e.message.includes("invalid")||e.message.includes("disabled")||e.message.includes("not found")||e.message.includes("Could not connect")?t=e.message:t=`Failed to get adapter info: ${e.message}`:e.name==="TypeError"&&(i=e.message)!=null&&i.includes("Failed to fetch")?t="Could not connect to the server. Please check if the server is running.":t="Failed to get adapter information. Please try again.",console.warn(`[ApiClient] ${t}`),new Error(t)}}getFetchOptions(i={}){const e={};if(typeof window>"u"){const r=this.apiUrl.startsWith("https:")?$:F;r&&(e.agent=r)}else e.headers={Connection:"keep-alive"};const t={"X-Request-ID":Date.now().toString(36)+Math.random().toString(36).substring(2)};if(e.headers&&Object.assign(t,e.headers),i.headers){const r=i.headers;for(const[s,o]of Object.entries(r))(s.toLowerCase()!=="x-api-key"||!this.apiKey)&&(t[s]=o)}return this.apiKey&&(t["X-API-Key"]=this.apiKey),this.sessionId&&(t["X-Session-ID"]=this.sessionId),{...i,...e,headers:t}}createChatRequest(i,e=!0,t,r,s,o,a,h,p,y,v){const c={messages:[{role:"user",content:i}],stream:e};return t&&t.length>0&&(c.file_ids=t),r&&(c.thread_id=r),s&&(c.audio_input=s),o&&(c.audio_format=o),a&&(c.language=a),h!==void 0&&(c.return_audio=h),p&&(c.tts_voice=p),y&&(c.source_language=y),v&&(c.target_language=v),c}async*streamChat(i,e=!0,t,r,s,o,a,h,p,y,v){var c,C;try{const w=new AbortController,O=setTimeout(()=>w.abort(),6e4),g=await fetch(`${this.apiUrl}/v1/chat`,{...this.getFetchOptions({method:"POST",headers:{"Content-Type":"application/json",Accept:e?"text/event-stream":"application/json"},body:JSON.stringify(this.createChatRequest(i,e,t,r,s,o,a,h,p,y,v))}),signal:w.signal});if(clearTimeout(O),!g.ok){const f=await g.text();throw new Error(`Network response was not ok: ${g.status} ${f}`)}if(!e){const f=await g.json();f.response&&(yield{text:f.response,done:!0,audio:f.audio,audioFormat:f.audio_format});return}const A=(c=g.body)==null?void 0:c.getReader();if(!A)throw new Error("No reader available");const _=new TextDecoder;let u="",E=!1;try{for(;;){const{done:f,value:S}=await A.read();if(f)break;const U=_.decode(S,{stream:!0});u+=U;let k=0,P;for(;(P=u.indexOf(`
2
2
  `,k))!==-1;){const m=u.slice(k,P).trim();if(k=P+1,m&&m.startsWith("data: ")){const d=m.slice(6).trim();if(!d||d==="[DONE]"){yield{text:"",done:!0};return}try{const n=JSON.parse(d);if(n.error){const x=`Server error: ${((C=n.error)==null?void 0:C.message)||n.error||"Unknown server error"}`;throw console.warn(`[ApiClient] ${x}`),new Error(x)}if(n.done===!0){E=!0,yield{text:"",done:!0,audio:n.audio,audioFormat:n.audio_format||n.audioFormat,threading:n.threading};return}const b=n.response||"";n.audio_chunk!==void 0&&(yield{text:"",done:!1,audio_chunk:n.audio_chunk,audioFormat:n.audioFormat||n.audio_format||"opus",chunk_index:n.chunk_index??0}),(b||n.audio)&&(E=!0,yield{text:b,done:n.done||!1,audio:n.audio,audioFormat:n.audio_format||n.audioFormat,threading:n.threading})}catch(n){console.warn("[ApiClient] Unable to parse server response. This may be a temporary issue."),console.warn("[ApiClient] Parse error details:",n==null?void 0:n.message),console.warn("[ApiClient] JSON text length:",d==null?void 0:d.length),console.warn("[ApiClient] JSON text preview (first 200 chars):",d==null?void 0:d.substring(0,200)),console.warn("[ApiClient] JSON text preview (last 200 chars):",d==null?void 0:d.substring(d.length-200))}}else m&&(E=!0,yield{text:m,done:!1})}u=u.slice(k),u.length>1e6&&(console.warn("[ApiClient] Buffer too large, truncating..."),u=u.slice(-5e5))}E&&(yield{text:"",done:!0})}finally{A.releaseLock()}}catch(w){throw w.name==="AbortError"?new Error("Connection timed out. Please check if the server is running."):w.name==="TypeError"&&w.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):w}}async clearConversationHistory(i){const e=i||this.sessionId;if(!e)throw new Error("No session ID provided and no current session available");if(!this.apiKey)throw new Error("API key is required for clearing conversation history");const t={"Content-Type":"application/json","X-Session-ID":e,"X-API-Key":this.apiKey};try{const r=await fetch(`${this.apiUrl}/admin/chat-history/${e}`,{...this.getFetchOptions({method:"DELETE",headers:t})});if(!r.ok){const s=await r.text();throw new Error(`Failed to clear conversation history: ${r.status} ${s}`)}return await r.json()}catch(r){throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):r}}async deleteConversationWithFiles(i,e){const t=i||this.sessionId;if(!t)throw new Error("No session ID provided and no current session available");if(!this.apiKey)throw new Error("API key is required for deleting conversation");const r={"Content-Type":"application/json","X-Session-ID":t,"X-API-Key":this.apiKey},s=e&&e.length>0?`?file_ids=${e.join(",")}`:"",o=`${this.apiUrl}/admin/conversations/${t}${s}`;try{const a=await fetch(o,{...this.getFetchOptions({method:"DELETE",headers:r})});if(!a.ok){const h=await a.text();throw new Error(`Failed to delete conversation: ${a.status} ${h}`)}return await a.json()}catch(a){throw a.name==="TypeError"&&a.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):a}}async createThread(i,e){if(!this.apiKey)throw new Error("API key is required for creating threads");const t={"Content-Type":"application/json","X-API-Key":this.apiKey};try{const r=await fetch(`${this.apiUrl}/api/threads`,{...this.getFetchOptions({method:"POST",headers:t,body:JSON.stringify({message_id:i,session_id:e})})});if(!r.ok){const s=await r.text();throw new Error(`Failed to create thread: ${r.status} ${s}`)}return await r.json()}catch(r){throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):r}}async getThreadInfo(i){if(!this.apiKey)throw new Error("API key is required for getting thread info");const e={"X-API-Key":this.apiKey};try{const t=await fetch(`${this.apiUrl}/api/threads/${i}`,{...this.getFetchOptions({method:"GET",headers:e})});if(!t.ok){const r=await t.text();throw new Error(`Failed to get thread info: ${t.status} ${r}`)}return await t.json()}catch(t){throw t.name==="TypeError"&&t.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):t}}async deleteThread(i){if(!this.apiKey)throw new Error("API key is required for deleting threads");const e={"X-API-Key":this.apiKey};try{const t=await fetch(`${this.apiUrl}/api/threads/${i}`,{...this.getFetchOptions({method:"DELETE",headers:e})});if(!t.ok){const r=await t.text();throw new Error(`Failed to delete thread: ${t.status} ${r}`)}return await t.json()}catch(t){throw t.name==="TypeError"&&t.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):t}}async uploadFile(i){if(!this.apiKey)throw new Error("API key is required for file upload");const e=new FormData;e.append("file",i);try{const t=await fetch(`${this.apiUrl}/api/files/upload`,{...this.getFetchOptions({method:"POST",body:e})});if(!t.ok){const r=await t.text();throw new Error(`Failed to upload file: ${t.status} ${r}`)}return await t.json()}catch(t){throw t.name==="TypeError"&&t.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):t}}async listFiles(){if(!this.apiKey)throw new Error("API key is required for listing files");try{const i=await fetch(`${this.apiUrl}/api/files`,{...this.getFetchOptions({method:"GET"})});if(!i.ok){const e=await i.text();throw new Error(`Failed to list files: ${i.status} ${e}`)}return await i.json()}catch(i){throw i.name==="TypeError"&&i.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):i}}async getFileInfo(i){if(!this.apiKey)throw new Error("API key is required for getting file info");try{const e=await fetch(`${this.apiUrl}/api/files/${i}`,{...this.getFetchOptions({method:"GET"})});if(!e.ok){const t=await e.text();throw new Error(`Failed to get file info: ${e.status} ${t}`)}return await e.json()}catch(e){throw e.name==="TypeError"&&e.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):e}}async queryFile(i,e,t=10){if(!this.apiKey)throw new Error("API key is required for querying files");try{const r=await fetch(`${this.apiUrl}/api/files/${i}/query`,{...this.getFetchOptions({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,max_results:t})})});if(!r.ok){const s=await r.text();throw new Error(`Failed to query file: ${r.status} ${s}`)}return await r.json()}catch(r){throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?new Error("Could not connect to the server. Please check if the server is running."):r}}async deleteFile(i){if(!this.apiKey)throw new Error("API key is required for deleting files");const e=`${this.apiUrl}/api/files/${i}`,t=this.getFetchOptions({method:"DELETE"});try{const r=await fetch(e,t);if(!r.ok){const s=await r.text();let o;try{const a=JSON.parse(s);o=a.detail||a.message||`Failed to delete file (HTTP ${r.status})`}catch{o=`Failed to delete file (HTTP ${r.status})`}throw console.warn(`[ApiClient] ${o}`),new Error(o)}return await r.json()}catch(r){let s;throw r.name==="TypeError"&&r.message.includes("Failed to fetch")?s="Could not connect to the server. Please check if the server is running.":r.message&&!r.message.includes("Failed to delete file")?s=r.message:s="Failed to delete file. Please try again.",console.warn(`[ApiClient] ${s}`),new Error(s)}}}let T=null;const J=(l,i=null,e=null)=>{T=new D({apiUrl:l,apiKey:i,sessionId:e})};async function*L(l,i=!0,e,t,r,s,o,a,h,p,y){if(!T)throw new Error("API not configured. Please call configureApi() with your server URL before using any API functions.");yield*T.streamChat(l,i,e,t,r,s,o,a,h,p,y)}export{D as ApiClient,J as configureApi,L as streamChat};
@@ -1 +1 @@
1
- import{aP as sn,aQ as an,aR as I,aS as X,ag as Z,aT as un,aU as l,ai as on,aV as Y,aW as q,aX as cn,aY as e,aZ as en,a_ as rn,a$ as yn}from"./index-CDwx2U7N.js";function fn(s){return s.innerRadius}function ln(s){return s.outerRadius}function mn(s){return s.startAngle}function gn(s){return s.endAngle}function pn(s){return s&&s.padAngle}function xn(s,v,D,O,R,d,_,a){var K=D-s,r=O-v,n=_-R,g=a-d,u=g*K-n*r;if(!(u*u<l))return u=(n*(v-d)-g*(s-R))/u,[s+u*K,v+u*r]}function H(s,v,D,O,R,d,_){var a=s-D,K=v-O,r=(_?d:-d)/Y(a*a+K*K),n=r*K,g=-r*a,u=s+n,i=v+g,y=D+n,f=O+g,B=(u+y)/2,o=(i+f)/2,p=y-u,m=f-i,T=p*p+m*m,A=R-d,E=u*f-y*i,S=(m<0?-1:1)*Y(en(0,A*A*T-E*E)),U=(E*m-p*S)/T,V=(-E*p-m*S)/T,W=(E*m+p*S)/T,x=(-E*p+m*S)/T,h=U-B,t=V-o,c=W-B,Q=x-o;return h*h+t*t>c*c+Q*Q&&(U=W,V=x),{cx:U,cy:V,x01:-n,y01:-g,x11:U*(R/A-1),y11:V*(R/A-1)}}function vn(){var s=fn,v=ln,D=Z(0),O=null,R=mn,d=gn,_=pn,a=null,K=sn(r);function r(){var n,g,u=+s.apply(this,arguments),i=+v.apply(this,arguments),y=R.apply(this,arguments)-un,f=d.apply(this,arguments)-un,B=cn(f-y),o=f>y;if(a||(a=n=K()),i<u&&(g=i,i=u,u=g),!(i>l))a.moveTo(0,0);else if(B>on-l)a.moveTo(i*I(y),i*X(y)),a.arc(0,0,i,y,f,!o),u>l&&(a.moveTo(u*I(f),u*X(f)),a.arc(0,0,u,f,y,o));else{var p=y,m=f,T=y,A=f,E=B,S=B,U=_.apply(this,arguments)/2,V=U>l&&(O?+O.apply(this,arguments):Y(u*u+i*i)),W=q(cn(i-u)/2,+D.apply(this,arguments)),x=W,h=W,t,c;if(V>l){var Q=rn(V/u*X(U)),$=rn(V/i*X(U));(E-=Q*2)>l?(Q*=o?1:-1,T+=Q,A-=Q):(E=0,T=A=(y+f)/2),(S-=$*2)>l?($*=o?1:-1,p+=$,m-=$):(S=0,p=m=(y+f)/2)}var L=i*I(p),M=i*X(p),b=u*I(A),k=u*X(A);if(W>l){var F=i*I(m),G=i*X(m),N=u*I(T),C=u*X(T),P;if(B<an)if(P=xn(L,M,N,C,F,G,b,k)){var J=L-P[0],j=M-P[1],w=F-P[0],z=G-P[1],nn=1/X(yn((J*w+j*z)/(Y(J*J+j*j)*Y(w*w+z*z)))/2),tn=Y(P[0]*P[0]+P[1]*P[1]);x=q(W,(u-tn)/(nn-1)),h=q(W,(i-tn)/(nn+1))}else x=h=0}S>l?h>l?(t=H(N,C,L,M,i,h,o),c=H(F,G,b,k,i,h,o),a.moveTo(t.cx+t.x01,t.cy+t.y01),h<W?a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,i,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),!o),a.arc(c.cx,c.cy,h,e(c.y11,c.x11),e(c.y01,c.x01),!o))):(a.moveTo(L,M),a.arc(0,0,i,p,m,!o)):a.moveTo(L,M),!(u>l)||!(E>l)?a.lineTo(b,k):x>l?(t=H(b,k,F,G,u,-x,o),c=H(L,M,N,C,u,-x,o),a.lineTo(t.cx+t.x01,t.cy+t.y01),x<W?a.arc(t.cx,t.cy,x,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,x,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,u,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),o),a.arc(c.cx,c.cy,x,e(c.y11,c.x11),e(c.y01,c.x01),!o))):a.arc(0,0,u,A,T,o)}if(a.closePath(),n)return a=null,n+""||null}return r.centroid=function(){var n=(+s.apply(this,arguments)+ +v.apply(this,arguments))/2,g=(+R.apply(this,arguments)+ +d.apply(this,arguments))/2-an/2;return[I(g)*n,X(g)*n]},r.innerRadius=function(n){return arguments.length?(s=typeof n=="function"?n:Z(+n),r):s},r.outerRadius=function(n){return arguments.length?(v=typeof n=="function"?n:Z(+n),r):v},r.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Z(+n),r):D},r.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:Z(+n),r):O},r.startAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Z(+n),r):R},r.endAngle=function(n){return arguments.length?(d=typeof n=="function"?n:Z(+n),r):d},r.padAngle=function(n){return arguments.length?(_=typeof n=="function"?n:Z(+n),r):_},r.context=function(n){return arguments.length?(a=n??null,r):a},r}export{vn as h};
1
+ import{aP as sn,aQ as an,aR as I,aS as X,ag as Z,aT as un,aU as l,ai as on,aV as Y,aW as q,aX as cn,aY as e,aZ as en,a_ as rn,a$ as yn}from"./index-CVRNWcf-.js";function fn(s){return s.innerRadius}function ln(s){return s.outerRadius}function mn(s){return s.startAngle}function gn(s){return s.endAngle}function pn(s){return s&&s.padAngle}function xn(s,v,D,O,R,d,_,a){var K=D-s,r=O-v,n=_-R,g=a-d,u=g*K-n*r;if(!(u*u<l))return u=(n*(v-d)-g*(s-R))/u,[s+u*K,v+u*r]}function H(s,v,D,O,R,d,_){var a=s-D,K=v-O,r=(_?d:-d)/Y(a*a+K*K),n=r*K,g=-r*a,u=s+n,i=v+g,y=D+n,f=O+g,B=(u+y)/2,o=(i+f)/2,p=y-u,m=f-i,T=p*p+m*m,A=R-d,E=u*f-y*i,S=(m<0?-1:1)*Y(en(0,A*A*T-E*E)),U=(E*m-p*S)/T,V=(-E*p-m*S)/T,W=(E*m+p*S)/T,x=(-E*p+m*S)/T,h=U-B,t=V-o,c=W-B,Q=x-o;return h*h+t*t>c*c+Q*Q&&(U=W,V=x),{cx:U,cy:V,x01:-n,y01:-g,x11:U*(R/A-1),y11:V*(R/A-1)}}function vn(){var s=fn,v=ln,D=Z(0),O=null,R=mn,d=gn,_=pn,a=null,K=sn(r);function r(){var n,g,u=+s.apply(this,arguments),i=+v.apply(this,arguments),y=R.apply(this,arguments)-un,f=d.apply(this,arguments)-un,B=cn(f-y),o=f>y;if(a||(a=n=K()),i<u&&(g=i,i=u,u=g),!(i>l))a.moveTo(0,0);else if(B>on-l)a.moveTo(i*I(y),i*X(y)),a.arc(0,0,i,y,f,!o),u>l&&(a.moveTo(u*I(f),u*X(f)),a.arc(0,0,u,f,y,o));else{var p=y,m=f,T=y,A=f,E=B,S=B,U=_.apply(this,arguments)/2,V=U>l&&(O?+O.apply(this,arguments):Y(u*u+i*i)),W=q(cn(i-u)/2,+D.apply(this,arguments)),x=W,h=W,t,c;if(V>l){var Q=rn(V/u*X(U)),$=rn(V/i*X(U));(E-=Q*2)>l?(Q*=o?1:-1,T+=Q,A-=Q):(E=0,T=A=(y+f)/2),(S-=$*2)>l?($*=o?1:-1,p+=$,m-=$):(S=0,p=m=(y+f)/2)}var L=i*I(p),M=i*X(p),b=u*I(A),k=u*X(A);if(W>l){var F=i*I(m),G=i*X(m),N=u*I(T),C=u*X(T),P;if(B<an)if(P=xn(L,M,N,C,F,G,b,k)){var J=L-P[0],j=M-P[1],w=F-P[0],z=G-P[1],nn=1/X(yn((J*w+j*z)/(Y(J*J+j*j)*Y(w*w+z*z)))/2),tn=Y(P[0]*P[0]+P[1]*P[1]);x=q(W,(u-tn)/(nn-1)),h=q(W,(i-tn)/(nn+1))}else x=h=0}S>l?h>l?(t=H(N,C,L,M,i,h,o),c=H(F,G,b,k,i,h,o),a.moveTo(t.cx+t.x01,t.cy+t.y01),h<W?a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,h,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,i,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),!o),a.arc(c.cx,c.cy,h,e(c.y11,c.x11),e(c.y01,c.x01),!o))):(a.moveTo(L,M),a.arc(0,0,i,p,m,!o)):a.moveTo(L,M),!(u>l)||!(E>l)?a.lineTo(b,k):x>l?(t=H(b,k,F,G,u,-x,o),c=H(L,M,N,C,u,-x,o),a.lineTo(t.cx+t.x01,t.cy+t.y01),x<W?a.arc(t.cx,t.cy,x,e(t.y01,t.x01),e(c.y01,c.x01),!o):(a.arc(t.cx,t.cy,x,e(t.y01,t.x01),e(t.y11,t.x11),!o),a.arc(0,0,u,e(t.cy+t.y11,t.cx+t.x11),e(c.cy+c.y11,c.cx+c.x11),o),a.arc(c.cx,c.cy,x,e(c.y11,c.x11),e(c.y01,c.x01),!o))):a.arc(0,0,u,A,T,o)}if(a.closePath(),n)return a=null,n+""||null}return r.centroid=function(){var n=(+s.apply(this,arguments)+ +v.apply(this,arguments))/2,g=(+R.apply(this,arguments)+ +d.apply(this,arguments))/2-an/2;return[I(g)*n,X(g)*n]},r.innerRadius=function(n){return arguments.length?(s=typeof n=="function"?n:Z(+n),r):s},r.outerRadius=function(n){return arguments.length?(v=typeof n=="function"?n:Z(+n),r):v},r.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Z(+n),r):D},r.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:Z(+n),r):O},r.startAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Z(+n),r):R},r.endAngle=function(n){return arguments.length?(d=typeof n=="function"?n:Z(+n),r):d},r.padAngle=function(n){return arguments.length?(_=typeof n=="function"?n:Z(+n),r):_},r.context=function(n){return arguments.length?(a=n??null,r):a},r}export{vn as h};
@@ -1,4 +1,4 @@
1
- import{ak as se,o as me,F as q,J as _e,O as f,ae as ke,j as Ee,p as De,S as ge,b as we}from"./index-CDwx2U7N.js";import{a as ve}from"./clone-D01vUIhD-D0aslzw6.js";import{c as Ne,g as $e,x as Te,d as Oe,h as de,p as Ie}from"./edges-96097737-Zc6U9nQz-Czq3--42.js";import{K as Ae}from"./graph-BZahQKIN-CTgzd5us.js";import{t as Ce}from"./channel-6PI3wNcc-1exBkyGg.js";import{r as ze}from"./Tableau10-D7jGxypv-Cyu9clx1.js";import"./createText-1719965b-D9Y3vUMn-UiwO3q8Q.js";var oe,ae,ee=function(){var e=function(m,s,r,l){for(r=r||{},l=m.length;l--;r[m[l]]=s);return r},o=[1,7],h=[1,13],c=[1,14],n=[1,15],g=[1,19],a=[1,16],y=[1,17],b=[1,18],d=[8,30],x=[8,21,28,29,30,31,32,40,44,47],_=[1,23],T=[1,24],k=[8,15,16,21,28,29,30,31,32,40,44,47],v=[8,15,16,21,27,28,29,30,31,32,40,44,47],L=[1,49],D={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(m,s,r,l,p,t,u){var i=t.length-1;switch(p){case 4:l.getLogger().debug("Rule: separator (NL) ");break;case 5:l.getLogger().debug("Rule: separator (Space) ");break;case 6:l.getLogger().debug("Rule: separator (EOF) ");break;case 7:l.getLogger().debug("Rule: hierarchy: ",t[i-1]),l.setHierarchy(t[i-1]);break;case 8:l.getLogger().debug("Stop NL ");break;case 9:l.getLogger().debug("Stop EOF ");break;case 10:l.getLogger().debug("Stop NL2 ");break;case 11:l.getLogger().debug("Stop EOF2 ");break;case 12:l.getLogger().debug("Rule: statement: ",t[i]),typeof t[i].length=="number"?this.$=t[i]:this.$=[t[i]];break;case 13:l.getLogger().debug("Rule: statement #2: ",t[i-1]),this.$=[t[i-1]].concat(t[i]);break;case 14:l.getLogger().debug("Rule: link: ",t[i],m),this.$={edgeTypeStr:t[i],label:""};break;case 15:l.getLogger().debug("Rule: LABEL link: ",t[i-3],t[i-1],t[i]),this.$={edgeTypeStr:t[i],label:t[i-1]};break;case 18:const O=parseInt(t[i]),B=l.generateId();this.$={id:B,type:"space",label:"",width:O,children:[]};break;case 23:l.getLogger().debug("Rule: (nodeStatement link node) ",t[i-2],t[i-1],t[i]," typestr: ",t[i-1].edgeTypeStr);const X=l.edgeStrToEdgeData(t[i-1].edgeTypeStr);this.$=[{id:t[i-2].id,label:t[i-2].label,type:t[i-2].type,directions:t[i-2].directions},{id:t[i-2].id+"-"+t[i].id,start:t[i-2].id,end:t[i].id,label:t[i-1].label,type:"edge",directions:t[i].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:t[i].id,label:t[i].label,type:l.typeStr2Type(t[i].typeStr),directions:t[i].directions}];break;case 24:l.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[i-1],t[i]),this.$={id:t[i-1].id,label:t[i-1].label,type:l.typeStr2Type(t[i-1].typeStr),directions:t[i-1].directions,widthInColumns:parseInt(t[i],10)};break;case 25:l.getLogger().debug("Rule: nodeStatement (node) ",t[i]),this.$={id:t[i].id,label:t[i].label,type:l.typeStr2Type(t[i].typeStr),directions:t[i].directions,widthInColumns:1};break;case 26:l.getLogger().debug("APA123",this?this:"na"),l.getLogger().debug("COLUMNS: ",t[i]),this.$={type:"column-setting",columns:t[i]==="auto"?-1:parseInt(t[i])};break;case 27:l.getLogger().debug("Rule: id-block statement : ",t[i-2],t[i-1]),l.generateId(),this.$={...t[i-2],type:"composite",children:t[i-1]};break;case 28:l.getLogger().debug("Rule: blockStatement : ",t[i-2],t[i-1],t[i]);const C=l.generateId();this.$={id:C,type:"composite",label:"",children:t[i-1]};break;case 29:l.getLogger().debug("Rule: node (NODE_ID separator): ",t[i]),this.$={id:t[i]};break;case 30:l.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[i-1],t[i]),this.$={id:t[i-1],label:t[i].label,typeStr:t[i].typeStr,directions:t[i].directions};break;case 31:l.getLogger().debug("Rule: dirList: ",t[i]),this.$=[t[i]];break;case 32:l.getLogger().debug("Rule: dirList: ",t[i-1],t[i]),this.$=[t[i-1]].concat(t[i]);break;case 33:l.getLogger().debug("Rule: nodeShapeNLabel: ",t[i-2],t[i-1],t[i]),this.$={typeStr:t[i-2]+t[i],label:t[i-1]};break;case 34:l.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[i-3],t[i-2]," #3:",t[i-1],t[i]),this.$={typeStr:t[i-3]+t[i],label:t[i-2],directions:t[i-1]};break;case 35:case 36:this.$={type:"classDef",id:t[i-1].trim(),css:t[i].trim()};break;case 37:this.$={type:"applyClass",id:t[i-1].trim(),styleClass:t[i].trim()};break;case 38:this.$={type:"applyStyles",id:t[i-1].trim(),stylesStr:t[i].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:o,28:h,29:c,31:n,32:g,40:a,44:y,47:b}),e(x,[2,16],{14:22,15:_,16:T}),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),e(x,[2,21]),e(x,[2,22]),e(k,[2,25],{27:[1,25]}),e(x,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(v,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(k,[2,24]),{11:37,13:4,14:22,15:_,16:T,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(v,[2,30]),{18:[1,43]},{18:[1,44]},e(k,[2,23]),{18:[1,45]},{30:[1,46]},e(x,[2,28]),e(x,[2,35]),e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{37:[1,47]},{34:48,35:L},{15:[1,50]},e(x,[2,27]),e(v,[2,33]),{39:[1,51]},{34:52,35:L,39:[2,31]},{32:[2,15]},e(v,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(m,s){if(s.recoverable)this.trace(m);else{var r=new Error(m);throw r.hash=s,r}},parse:function(m){var s=this,r=[0],l=[],p=[null],t=[],u=this.table,i="",O=0,B=0,X=2,C=1,F=t.slice.call(arguments,1),E=Object.create(this.lexer),P={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(P.yy[G]=this.yy[G]);E.setInput(m,P.yy),P.yy.lexer=E,P.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var V=E.yylloc;t.push(V);var Le=E.options&&E.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(){var R;return R=l.pop()||E.lex()||C,typeof R!="number"&&(R instanceof Array&&(l=R,R=l.pop()),R=s.symbols_[R]||R),R}for(var N,Y,I,Z,K={},j,z,le,H;;){if(Y=r[r.length-1],this.defaultActions[Y]?I=this.defaultActions[Y]:((N===null||typeof N>"u")&&(N=Se()),I=u[Y]&&u[Y][N]),typeof I>"u"||!I.length||!I[0]){var Q="";H=[];for(j in u[Y])this.terminals_[j]&&j>X&&H.push("'"+this.terminals_[j]+"'");E.showPosition?Q="Parse error on line "+(O+1)+`:
1
+ import{ak as se,o as me,F as q,J as _e,O as f,ae as ke,j as Ee,p as De,S as ge,b as we}from"./index-CVRNWcf-.js";import{a as ve}from"./clone-D01vUIhD-DmY5mrln.js";import{c as Ne,g as $e,x as Te,d as Oe,h as de,p as Ie}from"./edges-96097737-Zc6U9nQz-BzB5ko4h.js";import{K as Ae}from"./graph-BZahQKIN-CenQ9kLM.js";import{t as Ce}from"./channel-6PI3wNcc-BxckuQvX.js";import{r as ze}from"./Tableau10-D7jGxypv-Cyu9clx1.js";import"./createText-1719965b-D9Y3vUMn-DDdadCK5.js";var oe,ae,ee=function(){var e=function(m,s,r,l){for(r=r||{},l=m.length;l--;r[m[l]]=s);return r},o=[1,7],h=[1,13],c=[1,14],n=[1,15],g=[1,19],a=[1,16],y=[1,17],b=[1,18],d=[8,30],x=[8,21,28,29,30,31,32,40,44,47],_=[1,23],T=[1,24],k=[8,15,16,21,28,29,30,31,32,40,44,47],v=[8,15,16,21,27,28,29,30,31,32,40,44,47],L=[1,49],D={trace:function(){},yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:function(m,s,r,l,p,t,u){var i=t.length-1;switch(p){case 4:l.getLogger().debug("Rule: separator (NL) ");break;case 5:l.getLogger().debug("Rule: separator (Space) ");break;case 6:l.getLogger().debug("Rule: separator (EOF) ");break;case 7:l.getLogger().debug("Rule: hierarchy: ",t[i-1]),l.setHierarchy(t[i-1]);break;case 8:l.getLogger().debug("Stop NL ");break;case 9:l.getLogger().debug("Stop EOF ");break;case 10:l.getLogger().debug("Stop NL2 ");break;case 11:l.getLogger().debug("Stop EOF2 ");break;case 12:l.getLogger().debug("Rule: statement: ",t[i]),typeof t[i].length=="number"?this.$=t[i]:this.$=[t[i]];break;case 13:l.getLogger().debug("Rule: statement #2: ",t[i-1]),this.$=[t[i-1]].concat(t[i]);break;case 14:l.getLogger().debug("Rule: link: ",t[i],m),this.$={edgeTypeStr:t[i],label:""};break;case 15:l.getLogger().debug("Rule: LABEL link: ",t[i-3],t[i-1],t[i]),this.$={edgeTypeStr:t[i],label:t[i-1]};break;case 18:const O=parseInt(t[i]),B=l.generateId();this.$={id:B,type:"space",label:"",width:O,children:[]};break;case 23:l.getLogger().debug("Rule: (nodeStatement link node) ",t[i-2],t[i-1],t[i]," typestr: ",t[i-1].edgeTypeStr);const X=l.edgeStrToEdgeData(t[i-1].edgeTypeStr);this.$=[{id:t[i-2].id,label:t[i-2].label,type:t[i-2].type,directions:t[i-2].directions},{id:t[i-2].id+"-"+t[i].id,start:t[i-2].id,end:t[i].id,label:t[i-1].label,type:"edge",directions:t[i].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:t[i].id,label:t[i].label,type:l.typeStr2Type(t[i].typeStr),directions:t[i].directions}];break;case 24:l.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[i-1],t[i]),this.$={id:t[i-1].id,label:t[i-1].label,type:l.typeStr2Type(t[i-1].typeStr),directions:t[i-1].directions,widthInColumns:parseInt(t[i],10)};break;case 25:l.getLogger().debug("Rule: nodeStatement (node) ",t[i]),this.$={id:t[i].id,label:t[i].label,type:l.typeStr2Type(t[i].typeStr),directions:t[i].directions,widthInColumns:1};break;case 26:l.getLogger().debug("APA123",this?this:"na"),l.getLogger().debug("COLUMNS: ",t[i]),this.$={type:"column-setting",columns:t[i]==="auto"?-1:parseInt(t[i])};break;case 27:l.getLogger().debug("Rule: id-block statement : ",t[i-2],t[i-1]),l.generateId(),this.$={...t[i-2],type:"composite",children:t[i-1]};break;case 28:l.getLogger().debug("Rule: blockStatement : ",t[i-2],t[i-1],t[i]);const C=l.generateId();this.$={id:C,type:"composite",label:"",children:t[i-1]};break;case 29:l.getLogger().debug("Rule: node (NODE_ID separator): ",t[i]),this.$={id:t[i]};break;case 30:l.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[i-1],t[i]),this.$={id:t[i-1],label:t[i].label,typeStr:t[i].typeStr,directions:t[i].directions};break;case 31:l.getLogger().debug("Rule: dirList: ",t[i]),this.$=[t[i]];break;case 32:l.getLogger().debug("Rule: dirList: ",t[i-1],t[i]),this.$=[t[i-1]].concat(t[i]);break;case 33:l.getLogger().debug("Rule: nodeShapeNLabel: ",t[i-2],t[i-1],t[i]),this.$={typeStr:t[i-2]+t[i],label:t[i-1]};break;case 34:l.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[i-3],t[i-2]," #3:",t[i-1],t[i]),this.$={typeStr:t[i-3]+t[i],label:t[i-2],directions:t[i-1]};break;case 35:case 36:this.$={type:"classDef",id:t[i-1].trim(),css:t[i].trim()};break;case 37:this.$={type:"applyClass",id:t[i-1].trim(),styleClass:t[i].trim()};break;case 38:this.$={type:"applyStyles",id:t[i-1].trim(),stylesStr:t[i].trim()};break}},table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:o,28:h,29:c,31:n,32:g,40:a,44:y,47:b}),e(x,[2,16],{14:22,15:_,16:T}),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),e(x,[2,21]),e(x,[2,22]),e(k,[2,25],{27:[1,25]}),e(x,[2,26]),{19:26,26:12,32:g},{11:27,13:4,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(v,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,32:g},{32:[2,14]},{17:[1,36]},e(k,[2,24]),{11:37,13:4,14:22,15:_,16:T,19:5,20:6,21:o,22:8,23:9,24:10,25:11,26:12,28:h,29:c,31:n,32:g,40:a,44:y,47:b},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(v,[2,30]),{18:[1,43]},{18:[1,44]},e(k,[2,23]),{18:[1,45]},{30:[1,46]},e(x,[2,28]),e(x,[2,35]),e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{37:[1,47]},{34:48,35:L},{15:[1,50]},e(x,[2,27]),e(v,[2,33]),{39:[1,51]},{34:52,35:L,39:[2,31]},{32:[2,15]},e(v,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:function(m,s){if(s.recoverable)this.trace(m);else{var r=new Error(m);throw r.hash=s,r}},parse:function(m){var s=this,r=[0],l=[],p=[null],t=[],u=this.table,i="",O=0,B=0,X=2,C=1,F=t.slice.call(arguments,1),E=Object.create(this.lexer),P={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(P.yy[G]=this.yy[G]);E.setInput(m,P.yy),P.yy.lexer=E,P.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var V=E.yylloc;t.push(V);var Le=E.options&&E.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(){var R;return R=l.pop()||E.lex()||C,typeof R!="number"&&(R instanceof Array&&(l=R,R=l.pop()),R=s.symbols_[R]||R),R}for(var N,Y,I,Z,K={},j,z,le,H;;){if(Y=r[r.length-1],this.defaultActions[Y]?I=this.defaultActions[Y]:((N===null||typeof N>"u")&&(N=Se()),I=u[Y]&&u[Y][N]),typeof I>"u"||!I.length||!I[0]){var Q="";H=[];for(j in u[Y])this.terminals_[j]&&j>X&&H.push("'"+this.terminals_[j]+"'");E.showPosition?Q="Parse error on line "+(O+1)+`:
2
2
  `+E.showPosition()+`
3
3
  Expecting `+H.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Q="Parse error on line "+(O+1)+": Unexpected "+(N==C?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Q,{text:E.match,token:this.terminals_[N]||N,line:E.yylineno,loc:V,expected:H})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+N);switch(I[0]){case 1:r.push(N),p.push(E.yytext),t.push(E.yylloc),r.push(I[1]),N=null,B=E.yyleng,i=E.yytext,O=E.yylineno,V=E.yylloc;break;case 2:if(z=this.productions_[I[1]][1],K.$=p[p.length-z],K._$={first_line:t[t.length-(z||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(z||1)].first_column,last_column:t[t.length-1].last_column},Le&&(K._$.range=[t[t.length-(z||1)].range[0],t[t.length-1].range[1]]),Z=this.performAction.apply(K,[i,B,O,P.yy,I[1],p,t].concat(F)),typeof Z<"u")return Z;z&&(r=r.slice(0,-1*z*2),p=p.slice(0,-1*z),t=t.slice(0,-1*z)),r.push(this.productions_[I[1]][0]),p.push(K.$),t.push(K._$),le=u[r[r.length-2]][r[r.length-1]],r.push(le);break;case 3:return!0}}return!0}},A=function(){var m={EOF:1,parseError:function(s,r){if(this.yy.parser)this.yy.parser.parseError(s,r);else throw new Error(s)},setInput:function(s,r){return this.yy=r||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var r=s.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var r=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var t=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[t[0],t[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),r=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{S as wt,R as Oe,D as ke,N as ve,I as Te,F as jt,O as re,J as we,P as Re,a as kt,G as he,T as De,Z as Ne,p as Ht,Q as le}from"./index-CDwx2U7N.js";import{l as Pe,p as je}from"./svgDrawCommon-b86b1483-sbEe2n2v-CJw2W-Er.js";var Yt=function(){var e=function(F,g,x,b){for(x=x||{},b=F.length;b--;x[F[b]]=g);return x},t=[1,24],r=[1,25],o=[1,26],l=[1,27],n=[1,28],i=[1,63],s=[1,64],a=[1,65],d=[1,66],u=[1,67],p=[1,68],f=[1,69],m=[1,29],v=[1,30],T=[1,31],P=[1,32],U=[1,33],Y=[1,34],V=[1,35],q=[1,36],H=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],pt=[1,55],ut=[1,56],yt=[1,57],ft=[1,58],bt=[1,59],gt=[1,60],Ct=[14,42],Ft=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],vt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],S=[1,84],C=[1,85],O=[12,14,42],ne=[12,14,33,42],Dt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(F,g,x,b,k,h,D){var y=h.length-1;switch(k){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:case 29:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(Ct,[2,14]),e(Ft,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:A,79:S,80:C},{35:86,75:81,76:E,77:A,79:S,80:C},{35:87,75:81,76:E,77:A,79:S,80:C},{35:88,75:81,76:E,77:A,79:S,80:C},{35:89,75:81,76:E,77:A,79:S,80:C},{35:90,75:81,76:E,77:A,79:S,80:C},{35:91,75:81,76:E,77:A,79:S,80:C},{35:92,75:81,76:E,77:A,79:S,80:C},{35:93,75:81,76:E,77:A,79:S,80:C},{35:94,75:81,76:E,77:A,79:S,80:C},{35:95,75:81,76:E,77:A,79:S,80:C},{35:96,75:81,76:E,77:A,79:S,80:C},{35:97,75:81,76:E,77:A,79:S,80:C},{35:98,75:81,76:E,77:A,79:S,80:C},{35:99,75:81,76:E,77:A,79:S,80:C},{35:100,75:81,76:E,77:A,79:S,80:C},{35:101,75:81,76:E,77:A,79:S,80:C},{35:102,75:81,76:E,77:A,79:S,80:C},{35:103,75:81,76:E,77:A,79:S,80:C},{35:104,75:81,76:E,77:A,79:S,80:C},e(O,[2,59]),{35:105,75:81,76:E,77:A,79:S,80:C},{35:106,75:81,76:E,77:A,79:S,80:C},{35:107,75:81,76:E,77:A,79:S,80:C},{35:108,75:81,76:E,77:A,79:S,80:C},{35:109,75:81,76:E,77:A,79:S,80:C},{35:110,75:81,76:E,77:A,79:S,80:C},{35:111,75:81,76:E,77:A,79:S,80:C},{35:112,75:81,76:E,77:A,79:S,80:C},{35:113,75:81,76:E,77:A,79:S,80:C},{35:114,75:81,76:E,77:A,79:S,80:C},{35:115,75:81,76:E,77:A,79:S,80:C},{20:116,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:S,80:C},{35:120,75:81,76:E,77:A,79:S,80:C},{35:121,75:81,76:E,77:A,79:S,80:C},{35:122,75:81,76:E,77:A,79:S,80:C},{35:123,75:81,76:E,77:A,79:S,80:C},{35:124,75:81,76:E,77:A,79:S,80:C},{35:125,75:81,76:E,77:A,79:S,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Ft,[2,17],{21:22,19:130,22:t,23:r,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:o,26:l,28:n,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(vt,[2,21]),e(vt,[2,22]),e(O,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:A,79:S,80:C}),e(Dt,[2,73]),{78:[1,133]},e(Dt,[2,75]),e(Dt,[2,76]),e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),e(O,[2,47]),e(O,[2,48]),e(O,[2,49]),e(O,[2,50]),e(O,[2,51]),e(O,[2,52]),e(O,[2,53]),e(O,[2,54]),e(O,[2,55]),e(O,[2,56]),e(O,[2,57]),e(O,[2,58]),e(O,[2,60]),e(O,[2,61]),e(O,[2,62]),e(O,[2,63]),e(O,[2,64]),e(O,[2,65]),e(O,[2,66]),e(O,[2,67]),e(O,[2,68]),e(O,[2,69]),e(O,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Ft,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Dt,[2,74]),e(O,[2,24]),e(O,[2,35]),e(Xt,[2,25]),e(Xt,[2,26],{12:[1,138]}),e(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(F,g){if(g.recoverable)this.trace(F);else{var x=new Error(F);throw x.hash=g,x}},parse:function(F){var g=this,x=[0],b=[],k=[null],h=[],D=this.table,y="",Et=0,ae=0,Ee=2,ie=1,Ae=h.slice.call(arguments,1),w=Object.create(this.lexer),At={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(At.yy[Qt]=this.yy[Qt]);w.setInput(F,At.yy),At.yy.lexer=w,At.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var $t=w.yylloc;h.push($t);var Se=w.options&&w.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var Q;return Q=b.pop()||w.lex()||ie,typeof Q!="number"&&(Q instanceof Array&&(b=Q,Q=b.pop()),Q=g.symbols_[Q]||Q),Q}for(var N,St,j,Vt,Ot={},Nt,z,se,Pt;;){if(St=x[x.length-1],this.defaultActions[St]?j=this.defaultActions[St]:((N===null||typeof N>"u")&&(N=Ce()),j=D[St]&&D[St][N]),typeof j>"u"||!j.length||!j[0]){var qt="";Pt=[];for(Nt in D[St])this.terminals_[Nt]&&Nt>Ee&&Pt.push("'"+this.terminals_[Nt]+"'");w.showPosition?qt="Parse error on line "+(Et+1)+`:
1
+ import{S as wt,R as Oe,D as ke,N as ve,I as Te,F as jt,O as re,J as we,P as Re,a as kt,G as he,T as De,Z as Ne,p as Ht,Q as le}from"./index-CVRNWcf-.js";import{l as Pe,p as je}from"./svgDrawCommon-b86b1483-sbEe2n2v-CFwc1_jc.js";var Yt=function(){var e=function(F,g,x,b){for(x=x||{},b=F.length;b--;x[F[b]]=g);return x},t=[1,24],r=[1,25],o=[1,26],l=[1,27],n=[1,28],i=[1,63],s=[1,64],a=[1,65],d=[1,66],u=[1,67],p=[1,68],f=[1,69],m=[1,29],v=[1,30],T=[1,31],P=[1,32],U=[1,33],Y=[1,34],V=[1,35],q=[1,36],H=[1,37],G=[1,38],K=[1,39],J=[1,40],Z=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],dt=[1,54],pt=[1,55],ut=[1,56],yt=[1,57],ft=[1,58],bt=[1,59],gt=[1,60],Ct=[14,42],Ft=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],vt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],S=[1,84],C=[1,85],O=[12,14,42],ne=[12,14,33,42],Dt=[12,14,33,42,76,77,79,80],mt=[12,33],Xt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Wt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:function(F,g,x,b,k,h,D){var y=h.length-1;switch(k){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[y-3]);break;case 19:b.setTitle(h[y].substring(6)),this.$=h[y].substring(6);break;case 20:b.setAccDescription(h[y].substring(15)),this.$=h[y].substring(15);break;case 21:this.$=h[y].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[y].trim(),b.setAccDescription(this.$);break;case 28:case 29:h[y].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 30:b.addPersonOrSystemBoundary(...h[y]),this.$=h[y];break;case 31:h[y].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[y]),this.$=h[y];break;case 32:b.addDeploymentNode("node",...h[y]),this.$=h[y];break;case 33:b.addDeploymentNode("nodeL",...h[y]),this.$=h[y];break;case 34:b.addDeploymentNode("nodeR",...h[y]),this.$=h[y];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[y]),this.$=h[y];break;case 40:b.addPersonOrSystem("external_person",...h[y]),this.$=h[y];break;case 41:b.addPersonOrSystem("system",...h[y]),this.$=h[y];break;case 42:b.addPersonOrSystem("system_db",...h[y]),this.$=h[y];break;case 43:b.addPersonOrSystem("system_queue",...h[y]),this.$=h[y];break;case 44:b.addPersonOrSystem("external_system",...h[y]),this.$=h[y];break;case 45:b.addPersonOrSystem("external_system_db",...h[y]),this.$=h[y];break;case 46:b.addPersonOrSystem("external_system_queue",...h[y]),this.$=h[y];break;case 47:b.addContainer("container",...h[y]),this.$=h[y];break;case 48:b.addContainer("container_db",...h[y]),this.$=h[y];break;case 49:b.addContainer("container_queue",...h[y]),this.$=h[y];break;case 50:b.addContainer("external_container",...h[y]),this.$=h[y];break;case 51:b.addContainer("external_container_db",...h[y]),this.$=h[y];break;case 52:b.addContainer("external_container_queue",...h[y]),this.$=h[y];break;case 53:b.addComponent("component",...h[y]),this.$=h[y];break;case 54:b.addComponent("component_db",...h[y]),this.$=h[y];break;case 55:b.addComponent("component_queue",...h[y]),this.$=h[y];break;case 56:b.addComponent("external_component",...h[y]),this.$=h[y];break;case 57:b.addComponent("external_component_db",...h[y]),this.$=h[y];break;case 58:b.addComponent("external_component_queue",...h[y]),this.$=h[y];break;case 60:b.addRel("rel",...h[y]),this.$=h[y];break;case 61:b.addRel("birel",...h[y]),this.$=h[y];break;case 62:b.addRel("rel_u",...h[y]),this.$=h[y];break;case 63:b.addRel("rel_d",...h[y]),this.$=h[y];break;case 64:b.addRel("rel_l",...h[y]),this.$=h[y];break;case 65:b.addRel("rel_r",...h[y]),this.$=h[y];break;case 66:b.addRel("rel_b",...h[y]),this.$=h[y];break;case 67:h[y].splice(0,1),b.addRel("rel",...h[y]),this.$=h[y];break;case 68:b.updateElStyle("update_el_style",...h[y]),this.$=h[y];break;case 69:b.updateRelStyle("update_rel_style",...h[y]),this.$=h[y];break;case 70:b.updateLayoutConfig("update_layout_config",...h[y]),this.$=h[y];break;case 71:this.$=[h[y]];break;case 72:h[y].unshift(h[y-1]),this.$=h[y];break;case 73:case 75:this.$=h[y].trim();break;case 74:let Et={};Et[h[y-1].trim()]=h[y].trim(),this.$=Et;break;case 76:this.$="";break}},table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:r,24:o,26:l,28:n,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(Ct,[2,14]),e(Ft,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(vt,[2,19]),e(vt,[2,20]),{25:[1,78]},{27:[1,79]},e(vt,[2,23]),{35:80,75:81,76:E,77:A,79:S,80:C},{35:86,75:81,76:E,77:A,79:S,80:C},{35:87,75:81,76:E,77:A,79:S,80:C},{35:88,75:81,76:E,77:A,79:S,80:C},{35:89,75:81,76:E,77:A,79:S,80:C},{35:90,75:81,76:E,77:A,79:S,80:C},{35:91,75:81,76:E,77:A,79:S,80:C},{35:92,75:81,76:E,77:A,79:S,80:C},{35:93,75:81,76:E,77:A,79:S,80:C},{35:94,75:81,76:E,77:A,79:S,80:C},{35:95,75:81,76:E,77:A,79:S,80:C},{35:96,75:81,76:E,77:A,79:S,80:C},{35:97,75:81,76:E,77:A,79:S,80:C},{35:98,75:81,76:E,77:A,79:S,80:C},{35:99,75:81,76:E,77:A,79:S,80:C},{35:100,75:81,76:E,77:A,79:S,80:C},{35:101,75:81,76:E,77:A,79:S,80:C},{35:102,75:81,76:E,77:A,79:S,80:C},{35:103,75:81,76:E,77:A,79:S,80:C},{35:104,75:81,76:E,77:A,79:S,80:C},e(O,[2,59]),{35:105,75:81,76:E,77:A,79:S,80:C},{35:106,75:81,76:E,77:A,79:S,80:C},{35:107,75:81,76:E,77:A,79:S,80:C},{35:108,75:81,76:E,77:A,79:S,80:C},{35:109,75:81,76:E,77:A,79:S,80:C},{35:110,75:81,76:E,77:A,79:S,80:C},{35:111,75:81,76:E,77:A,79:S,80:C},{35:112,75:81,76:E,77:A,79:S,80:C},{35:113,75:81,76:E,77:A,79:S,80:C},{35:114,75:81,76:E,77:A,79:S,80:C},{35:115,75:81,76:E,77:A,79:S,80:C},{20:116,29:49,30:61,32:62,34:i,36:s,37:a,38:d,39:u,40:p,41:f,43:23,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:S,80:C},{35:120,75:81,76:E,77:A,79:S,80:C},{35:121,75:81,76:E,77:A,79:S,80:C},{35:122,75:81,76:E,77:A,79:S,80:C},{35:123,75:81,76:E,77:A,79:S,80:C},{35:124,75:81,76:E,77:A,79:S,80:C},{35:125,75:81,76:E,77:A,79:S,80:C},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Ft,[2,17],{21:22,19:130,22:t,23:r,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:o,26:l,28:n,34:i,36:s,37:a,38:d,39:u,40:p,41:f,44:m,45:v,46:T,47:P,48:U,49:Y,50:V,51:q,52:H,53:G,54:K,55:J,56:Z,57:tt,58:et,59:nt,60:at,61:it,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:dt,69:pt,70:ut,71:yt,72:ft,73:bt,74:gt}),e(vt,[2,21]),e(vt,[2,22]),e(O,[2,39]),e(ne,[2,71],{75:81,35:132,76:E,77:A,79:S,80:C}),e(Dt,[2,73]),{78:[1,133]},e(Dt,[2,75]),e(Dt,[2,76]),e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),e(O,[2,47]),e(O,[2,48]),e(O,[2,49]),e(O,[2,50]),e(O,[2,51]),e(O,[2,52]),e(O,[2,53]),e(O,[2,54]),e(O,[2,55]),e(O,[2,56]),e(O,[2,57]),e(O,[2,58]),e(O,[2,60]),e(O,[2,61]),e(O,[2,62]),e(O,[2,63]),e(O,[2,64]),e(O,[2,65]),e(O,[2,66]),e(O,[2,67]),e(O,[2,68]),e(O,[2,69]),e(O,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(mt,[2,28]),e(mt,[2,29]),e(mt,[2,30]),e(mt,[2,31]),e(mt,[2,32]),e(mt,[2,33]),e(mt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Ft,[2,18]),e(Ct,[2,38]),e(ne,[2,72]),e(Dt,[2,74]),e(O,[2,24]),e(O,[2,35]),e(Xt,[2,25]),e(Xt,[2,26],{12:[1,138]}),e(Xt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:function(F,g){if(g.recoverable)this.trace(F);else{var x=new Error(F);throw x.hash=g,x}},parse:function(F){var g=this,x=[0],b=[],k=[null],h=[],D=this.table,y="",Et=0,ae=0,Ee=2,ie=1,Ae=h.slice.call(arguments,1),w=Object.create(this.lexer),At={yy:{}};for(var Qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qt)&&(At.yy[Qt]=this.yy[Qt]);w.setInput(F,At.yy),At.yy.lexer=w,At.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var $t=w.yylloc;h.push($t);var Se=w.options&&w.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ce(){var Q;return Q=b.pop()||w.lex()||ie,typeof Q!="number"&&(Q instanceof Array&&(b=Q,Q=b.pop()),Q=g.symbols_[Q]||Q),Q}for(var N,St,j,Vt,Ot={},Nt,z,se,Pt;;){if(St=x[x.length-1],this.defaultActions[St]?j=this.defaultActions[St]:((N===null||typeof N>"u")&&(N=Ce()),j=D[St]&&D[St][N]),typeof j>"u"||!j.length||!j[0]){var qt="";Pt=[];for(Nt in D[St])this.terminals_[Nt]&&Nt>Ee&&Pt.push("'"+this.terminals_[Nt]+"'");w.showPosition?qt="Parse error on line "+(Et+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+Pt.join(", ")+", got '"+(this.terminals_[N]||N)+"'":qt="Parse error on line "+(Et+1)+": Unexpected "+(N==ie?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(qt,{text:w.match,token:this.terminals_[N]||N,line:w.yylineno,loc:$t,expected:Pt})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+St+", token: "+N);switch(j[0]){case 1:x.push(N),k.push(w.yytext),h.push(w.yylloc),x.push(j[1]),N=null,ae=w.yyleng,y=w.yytext,Et=w.yylineno,$t=w.yylloc;break;case 2:if(z=this.productions_[j[1]][1],Ot.$=k[k.length-z],Ot._$={first_line:h[h.length-(z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(z||1)].first_column,last_column:h[h.length-1].last_column},Se&&(Ot._$.range=[h[h.length-(z||1)].range[0],h[h.length-1].range[1]]),Vt=this.performAction.apply(Ot,[y,ae,Et,At.yy,j[1],k,h].concat(Ae)),typeof Vt<"u")return Vt;z&&(x=x.slice(0,-1*z*2),k=k.slice(0,-1*z),h=h.slice(0,-1*z)),x.push(this.productions_[j[1]][0]),k.push(Ot.$),h.push(Ot._$),se=D[x[x.length-2]][x[x.length-1]],x.push(se);break;case 3:return!0}}return!0}},me=function(){var F={EOF:1,parseError:function(g,x){if(this.yy.parser)this.yy.parser.parseError(g,x);else throw new Error(g)},setInput:function(g,x){return this.yy=x||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var x=g.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},unput:function(g){var x=g.length,b=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===k.length?this.yylloc.first_column:0)+k[k.length-b.length].length-b[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(g){this.unput(this.match.slice(g))},pastInput:function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var g=this.pastInput(),x=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
@@ -0,0 +1 @@
1
+ import{b0 as t,b1 as a}from"./index-CVRNWcf-.js";const n=(o,r)=>t.lang.round(a.parse(o)[r]);export{n as t};
@@ -1,2 +1,2 @@
1
- import{Y,K as B,z as C}from"./styles-b4e223ce-BSiU4oYL-9ql-THae.js";import{S as H,O as f,F as v,J,e as D,l as W,u as T,V as X}from"./index-CDwx2U7N.js";import{K as Z}from"./graph-BZahQKIN-CTgzd5us.js";import{A as $}from"./layout-j-hMNqAM-C88IAVJC.js";let O=0;const R=function(n,a,t,s,l){const c=function(i){switch(i){case l.db.relationType.AGGREGATION:return"aggregation";case l.db.relationType.EXTENSION:return"extension";case l.db.relationType.COMPOSITION:return"composition";case l.db.relationType.DEPENDENCY:return"dependency";case l.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(i=>!Number.isNaN(i.y));const o=a.points,g=D().x(function(i){return i.x}).y(function(i){return i.y}).curve(W),d=n.append("path").attr("d",g(o)).attr("id","edge"+O).attr("class","relation");let r="";s.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&d.attr("class","relation dashed-line"),t.relation.lineType==10&&d.attr("class","relation dotted-line"),t.relation.type1!=="none"&&d.attr("marker-start","url("+r+"#"+c(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&d.attr("marker-end","url("+r+"#"+c(t.relation.type2)+"End)");let y,p;const x=a.points.length;let m=T.calcLabelPosition(a.points);y=m.x,p=m.y;let b,w,e,h;if(x%2!==0&&x>1){let i=T.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),u=T.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);f.debug("cardinality_1_point "+JSON.stringify(i)),f.debug("cardinality_2_point "+JSON.stringify(u)),b=i.x,w=i.y,e=u.x,h=u.y}if(t.title!==void 0){const i=n.append("g").attr("class","classLabel"),u=i.append("text").attr("class","label").attr("x",y).attr("y",p).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=u;const E=u.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",E.x-s.padding/2).attr("y",E.y-s.padding/2).attr("width",E.width+s.padding).attr("height",E.height+s.padding)}f.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",w).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",e).attr("y",h).attr("fill","black").attr("font-size","6").text(t.relationTitle2),O++},F=function(n,a,t,s){f.debug("Rendering class ",a,t);const l=a.id,c={id:l,label:a.id,width:0,height:0},o=n.append("g").attr("id",s.db.lookUpDomId(l)).attr("class","classGroup");let g;a.link?g=o.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let d=!0;a.annotations.forEach(function(i){const u=g.append("tspan").text("«"+i+"»");d||u.attr("dy",t.textHeight),d=!1});let r=A(a);const y=g.append("tspan").text(r).attr("class","title");d||y.attr("dy",t.textHeight);const p=g.node().getBBox().height;let x,m,b;if(a.members.length>0){x=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin/2).attr("y2",t.padding+p+t.dividerMargin/2);const i=o.append("text").attr("x",t.padding).attr("y",p+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.members.forEach(function(u){S(i,u,d,t),d=!1}),m=i.node().getBBox()}if(a.methods.length>0){b=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin+m.height).attr("y2",t.padding+p+t.dividerMargin+m.height);const i=o.append("text").attr("x",t.padding).attr("y",p+2*t.dividerMargin+m.height+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.methods.forEach(function(u){S(i,u,d,t),d=!1})}const w=o.node().getBBox();var e=" ";a.cssClasses.length>0&&(e=e+a.cssClasses.join(" "));const h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",w.width+2*t.padding).attr("height",w.height+t.padding+.5*t.dividerMargin).attr("class",e).node().getBBox().width;return g.node().childNodes.forEach(function(i){i.setAttribute("x",(h-i.getBBox().width)/2)}),a.tooltip&&g.insert("title").text(a.tooltip),x&&x.attr("x2",h),b&&b.attr("x2",h),c.width=h,c.height=w.height+t.padding+.5*t.dividerMargin,c},A=function(n){let a=n.id;return n.type&&(a+="<"+X(n.type)+">"),a},G=function(n,a,t,s){f.debug("Rendering note ",a,t);const l=a.id,c={id:l,text:a.text,width:0,height:0},o=n.append("g").attr("id",l).attr("class","classGroup");let g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const d=JSON.parse(`"${a.text}"`).split(`
1
+ import{Y,K as B,z as C}from"./styles-b4e223ce-BSiU4oYL-D8WR6bxO.js";import{S as H,O as f,F as v,J,e as D,l as W,u as T,V as X}from"./index-CVRNWcf-.js";import{K as Z}from"./graph-BZahQKIN-CenQ9kLM.js";import{A as $}from"./layout-j-hMNqAM-d_O0ZYu6.js";let O=0;const R=function(n,a,t,s,l){const c=function(i){switch(i){case l.db.relationType.AGGREGATION:return"aggregation";case l.db.relationType.EXTENSION:return"extension";case l.db.relationType.COMPOSITION:return"composition";case l.db.relationType.DEPENDENCY:return"dependency";case l.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(i=>!Number.isNaN(i.y));const o=a.points,g=D().x(function(i){return i.x}).y(function(i){return i.y}).curve(W),d=n.append("path").attr("d",g(o)).attr("id","edge"+O).attr("class","relation");let r="";s.arrowMarkerAbsolute&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.relation.lineType==1&&d.attr("class","relation dashed-line"),t.relation.lineType==10&&d.attr("class","relation dotted-line"),t.relation.type1!=="none"&&d.attr("marker-start","url("+r+"#"+c(t.relation.type1)+"Start)"),t.relation.type2!=="none"&&d.attr("marker-end","url("+r+"#"+c(t.relation.type2)+"End)");let y,p;const x=a.points.length;let m=T.calcLabelPosition(a.points);y=m.x,p=m.y;let b,w,e,h;if(x%2!==0&&x>1){let i=T.calcCardinalityPosition(t.relation.type1!=="none",a.points,a.points[0]),u=T.calcCardinalityPosition(t.relation.type2!=="none",a.points,a.points[x-1]);f.debug("cardinality_1_point "+JSON.stringify(i)),f.debug("cardinality_2_point "+JSON.stringify(u)),b=i.x,w=i.y,e=u.x,h=u.y}if(t.title!==void 0){const i=n.append("g").attr("class","classLabel"),u=i.append("text").attr("class","label").attr("x",y).attr("y",p).attr("fill","red").attr("text-anchor","middle").text(t.title);window.label=u;const E=u.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",E.x-s.padding/2).attr("y",E.y-s.padding/2).attr("width",E.width+s.padding).attr("height",E.height+s.padding)}f.info("Rendering relation "+JSON.stringify(t)),t.relationTitle1!==void 0&&t.relationTitle1!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",b).attr("y",w).attr("fill","black").attr("font-size","6").text(t.relationTitle1),t.relationTitle2!==void 0&&t.relationTitle2!=="none"&&n.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",e).attr("y",h).attr("fill","black").attr("font-size","6").text(t.relationTitle2),O++},F=function(n,a,t,s){f.debug("Rendering class ",a,t);const l=a.id,c={id:l,label:a.id,width:0,height:0},o=n.append("g").attr("id",s.db.lookUpDomId(l)).attr("class","classGroup");let g;a.link?g=o.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",t.textHeight+t.padding).attr("x",0):g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);let d=!0;a.annotations.forEach(function(i){const u=g.append("tspan").text("«"+i+"»");d||u.attr("dy",t.textHeight),d=!1});let r=A(a);const y=g.append("tspan").text(r).attr("class","title");d||y.attr("dy",t.textHeight);const p=g.node().getBBox().height;let x,m,b;if(a.members.length>0){x=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin/2).attr("y2",t.padding+p+t.dividerMargin/2);const i=o.append("text").attr("x",t.padding).attr("y",p+t.dividerMargin+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.members.forEach(function(u){S(i,u,d,t),d=!1}),m=i.node().getBBox()}if(a.methods.length>0){b=o.append("line").attr("x1",0).attr("y1",t.padding+p+t.dividerMargin+m.height).attr("y2",t.padding+p+t.dividerMargin+m.height);const i=o.append("text").attr("x",t.padding).attr("y",p+2*t.dividerMargin+m.height+t.textHeight).attr("fill","white").attr("class","classText");d=!0,a.methods.forEach(function(u){S(i,u,d,t),d=!1})}const w=o.node().getBBox();var e=" ";a.cssClasses.length>0&&(e=e+a.cssClasses.join(" "));const h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",w.width+2*t.padding).attr("height",w.height+t.padding+.5*t.dividerMargin).attr("class",e).node().getBBox().width;return g.node().childNodes.forEach(function(i){i.setAttribute("x",(h-i.getBBox().width)/2)}),a.tooltip&&g.insert("title").text(a.tooltip),x&&x.attr("x2",h),b&&b.attr("x2",h),c.width=h,c.height=w.height+t.padding+.5*t.dividerMargin,c},A=function(n){let a=n.id;return n.type&&(a+="<"+X(n.type)+">"),a},G=function(n,a,t,s){f.debug("Rendering note ",a,t);const l=a.id,c={id:l,text:a.text,width:0,height:0},o=n.append("g").attr("id",l).attr("class","classGroup");let g=o.append("text").attr("y",t.textHeight+t.padding).attr("x",0);const d=JSON.parse(`"${a.text}"`).split(`
2
2
  `);d.forEach(function(p){f.debug(`Adding line: ${p}`),g.append("tspan").text(p).attr("class","title").attr("dy",t.textHeight)});const r=o.node().getBBox(),y=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",r.width+2*t.padding).attr("height",r.height+d.length*t.textHeight+t.padding+.5*t.dividerMargin).node().getBBox().width;return g.node().childNodes.forEach(function(p){p.setAttribute("x",(y-p.getBBox().width)/2)}),c.width=y,c.height=r.height+d.length*t.textHeight+t.padding+.5*t.dividerMargin,c},S=function(n,a,t,s){const{displayText:l,cssStyle:c}=a.getDisplayDetails(),o=n.append("tspan").attr("x",s.padding).text(l);c!==""&&o.attr("style",a.cssStyle),t||o.attr("dy",s.textHeight)},M={getClassTitleString:A,drawClass:F,drawEdge:R,drawNote:G};let N={};const L=20,k=function(n){const a=Object.entries(N).find(t=>t[1].label===n);if(a)return a[0]},I=function(n){n.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},P=function(n,a,t,s){const l=H().class;N={},f.info("Rendering diagram "+n);const c=H().securityLevel;let o;c==="sandbox"&&(o=v("#i"+a));const g=c==="sandbox"?v(o.nodes()[0].contentDocument.body):v("body"),d=g.select(`[id='${a}']`);I(d);const r=new Z({multigraph:!0});r.setGraph({isMultiGraph:!0}),r.setDefaultEdgeLabel(function(){return{}});const y=s.db.getClasses(),p=Object.keys(y);for(const e of p){const h=y[e],i=M.drawClass(d,h,l,s);N[i.id]=i,r.setNode(i.id,i),f.info("Org height: "+i.height)}s.db.getRelations().forEach(function(e){f.info("tjoho"+k(e.id1)+k(e.id2)+JSON.stringify(e)),r.setEdge(k(e.id1),k(e.id2),{relation:e},e.title||"DEFAULT")}),s.db.getNotes().forEach(function(e){f.debug(`Adding note: ${JSON.stringify(e)}`);const h=M.drawNote(d,e,l,s);N[h.id]=h,r.setNode(h.id,h),e.class&&e.class in y&&r.setEdge(e.id,k(e.class),{relation:{id1:e.id,id2:e.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),$(r),r.nodes().forEach(function(e){e!==void 0&&r.node(e)!==void 0&&(f.debug("Node "+e+": "+JSON.stringify(r.node(e))),g.select("#"+(s.db.lookUpDomId(e)||e)).attr("transform","translate("+(r.node(e).x-r.node(e).width/2)+","+(r.node(e).y-r.node(e).height/2)+" )"))}),r.edges().forEach(function(e){e!==void 0&&r.edge(e)!==void 0&&(f.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r.edge(e))),M.drawEdge(d,r.edge(e),r.edge(e).relation,l,s))});const x=d.node().getBBox(),m=x.width+L*2,b=x.height+L*2;J(d,b,m,l.useMaxWidth);const w=`${x.x-L} ${x.y-L} ${m} ${b}`;f.debug(`viewBox ${w}`),d.attr("viewBox",w)},z={draw:P},V={parser:C,db:B,renderer:z,styles:Y,init:n=>{n.class||(n.class={}),n.class.arrowMarkerAbsolute=n.arrowMarkerAbsolute,B.clear()}};export{V as diagram};
@@ -1,2 +1,2 @@
1
- import{Y as _,K as L,z as B}from"./styles-b4e223ce-BSiU4oYL-9ql-THae.js";import{O as c,S as d,F as w,u as F,k as K,p as E,b as D,c as A,d as C}from"./index-CDwx2U7N.js";import{K as O}from"./graph-BZahQKIN-CTgzd5us.js";import{b as R}from"./index-5325376f-DsNDppci-BaFeDo3U.js";import"./layout-j-hMNqAM-C88IAVJC.js";import"./clone-D01vUIhD-D0aslzw6.js";import"./edges-96097737-Zc6U9nQz-Czq3--42.js";import"./createText-1719965b-D9Y3vUMn-UiwO3q8Q.js";const k=a=>E.sanitizeText(a,d());let x={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const j=function(a,t,b,i){const e=Object.keys(a);c.info("keys:",e),c.info(a),e.forEach(function(s){var l,r;const o=a[s],n={shape:"rect",id:o.id,domId:o.domId,labelText:k(o.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};t.setNode(o.id,n),I(o.classes,t,b,i,o.id),c.info("setNode",n)})},I=function(a,t,b,i,e){const s=Object.keys(a);c.info("keys:",s),c.info(a),s.filter(l=>a[l].parent==e).forEach(function(l){var r,o;const n=a[l],u=n.cssClasses.join(" "),y=D(n.styles),g=n.label??n.id,p=0,f={labelStyle:y.labelStyle,shape:"class_box",labelText:k(g),classData:n,rx:p,ry:p,class:u,style:y.style,id:n.id,domId:n.domId,tooltip:i.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=d().flowchart)==null?void 0:r.padding)??((o=d().class)==null?void 0:o.padding)};t.setNode(n.id,f),e&&t.setParent(n.id,e),c.info("setNode",f)})},z=function(a,t,b,i){c.info(a),a.forEach(function(e,s){var l,r;const o=e,n="",u={labelStyle:"",style:""},y=o.text,g=0,p={labelStyle:u.labelStyle,shape:"note",labelText:k(y),noteData:o,rx:g,ry:g,class:n,style:u.style,id:o.id,domId:o.id,tooltip:"",type:"note",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};if(t.setNode(o.id,p),c.info("setNode",p),!o.class||!(o.class in i))return;const f=b+s,m={id:`edgeNote${f}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:A(x.curve,C)};t.setEdge(o.id,o.class,m,f)})},P=function(a,t){const b=d().flowchart;let i=0;a.forEach(function(e){var s;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:N(e.relation.type1),arrowTypeEnd:N(e.relation.type2),style:"fill:none",labelStyle:"",curve:A(b==null?void 0:b.curve,C)};if(c.info(l,e),e.style!==void 0){const r=D(e.style);l.style=r.style,l.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((s=d().flowchart)==null?void 0:s.htmlLabels)??d().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(E.lineBreakRegex,`
1
+ import{Y as _,K as L,z as B}from"./styles-b4e223ce-BSiU4oYL-D8WR6bxO.js";import{O as c,S as d,F as w,u as F,k as K,p as E,b as D,c as A,d as C}from"./index-CVRNWcf-.js";import{K as O}from"./graph-BZahQKIN-CenQ9kLM.js";import{b as R}from"./index-5325376f-DsNDppci-BmtId_7h.js";import"./layout-j-hMNqAM-d_O0ZYu6.js";import"./clone-D01vUIhD-DmY5mrln.js";import"./edges-96097737-Zc6U9nQz-BzB5ko4h.js";import"./createText-1719965b-D9Y3vUMn-DDdadCK5.js";const k=a=>E.sanitizeText(a,d());let x={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const j=function(a,t,b,i){const e=Object.keys(a);c.info("keys:",e),c.info(a),e.forEach(function(s){var l,r;const o=a[s],n={shape:"rect",id:o.id,domId:o.domId,labelText:k(o.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};t.setNode(o.id,n),I(o.classes,t,b,i,o.id),c.info("setNode",n)})},I=function(a,t,b,i,e){const s=Object.keys(a);c.info("keys:",s),c.info(a),s.filter(l=>a[l].parent==e).forEach(function(l){var r,o;const n=a[l],u=n.cssClasses.join(" "),y=D(n.styles),g=n.label??n.id,p=0,f={labelStyle:y.labelStyle,shape:"class_box",labelText:k(g),classData:n,rx:p,ry:p,class:u,style:y.style,id:n.id,domId:n.domId,tooltip:i.db.getTooltip(n.id,e)||"",haveCallback:n.haveCallback,link:n.link,width:n.type==="group"?500:void 0,type:n.type,padding:((r=d().flowchart)==null?void 0:r.padding)??((o=d().class)==null?void 0:o.padding)};t.setNode(n.id,f),e&&t.setParent(n.id,e),c.info("setNode",f)})},z=function(a,t,b,i){c.info(a),a.forEach(function(e,s){var l,r;const o=e,n="",u={labelStyle:"",style:""},y=o.text,g=0,p={labelStyle:u.labelStyle,shape:"note",labelText:k(y),noteData:o,rx:g,ry:g,class:n,style:u.style,id:o.id,domId:o.id,tooltip:"",type:"note",padding:((l=d().flowchart)==null?void 0:l.padding)??((r=d().class)==null?void 0:r.padding)};if(t.setNode(o.id,p),c.info("setNode",p),!o.class||!(o.class in i))return;const f=b+s,m={id:`edgeNote${f}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:A(x.curve,C)};t.setEdge(o.id,o.class,m,f)})},P=function(a,t){const b=d().flowchart;let i=0;a.forEach(function(e){var s;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:N(e.relation.type1),arrowTypeEnd:N(e.relation.type2),style:"fill:none",labelStyle:"",curve:A(b==null?void 0:b.curve,C)};if(c.info(l,e),e.style!==void 0){const r=D(e.style);l.style=r.style,l.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((s=d().flowchart)==null?void 0:s.htmlLabels)??d().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(E.lineBreakRegex,`
2
2
  `),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,l,i)})},G=function(a){x={...x,...a}},H=async function(a,t,b,i){c.info("Drawing class - ",t);const e=d().flowchart??d().class,s=d().securityLevel;c.info("config:",e);const l=(e==null?void 0:e.nodeSpacing)??50,r=(e==null?void 0:e.rankSpacing)??50,o=new O({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=i.db.getNamespaces(),u=i.db.getClasses(),y=i.db.getRelations(),g=i.db.getNotes();c.info(y),j(n,o,t,i),I(u,o,t,i),P(y,o),z(g,o,y.length+1,u);let p;s==="sandbox"&&(p=w("#i"+t));const f=s==="sandbox"?w(p.nodes()[0].contentDocument.body):w("body"),m=f.select(`[id="${t}"]`),$=f.select("#"+t+" g");if(await R($,o,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),F.insertTitle(m,"classTitleText",(e==null?void 0:e.titleTopMargin)??5,i.db.getDiagramTitle()),K(o,m,e==null?void 0:e.diagramPadding,e==null?void 0:e.useMaxWidth),!(e!=null&&e.htmlLabels)){const S=s==="sandbox"?p.nodes()[0].contentDocument:document,M=S.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const v of M){const T=v.getBBox(),h=S.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",T.width),h.setAttribute("height",T.height),v.insertBefore(h,v.firstChild)}}};function N(a){let t;switch(a){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const J={setConf:G,draw:H},ee={parser:B,db:L,renderer:J,styles:_,init:a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,L.clear()}};export{ee as diagram};
@@ -0,0 +1 @@
1
+ import{U as o}from"./graph-BZahQKIN-CenQ9kLM.js";var t=4;function n(r){return o(r,t)}export{n as a};
@@ -1,4 +1,4 @@
1
- import{O as Et,br as At,G as It,ak as Tt,bs as Ct,bt as ze}from"./index-CDwx2U7N.js";const wt={};function zt(e,r){const t=wt,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(e,n,u)}function et(e,r,t){if(Dt(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qe(e.children,r,t)}return Array.isArray(e)?qe(e,r,t):""}function qe(e,r,t){const n=[];let u=-1;for(;++u<e.length;)n[u]=et(e[u],r,t);return n.join("")}function Dt(e){return!!(e&&typeof e=="object")}function te(e,r,t,n){const u=e.length;let c=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,n.length<1e4)i=Array.from(n),i.unshift(r,t),e.splice(...i);else for(t&&e.splice(r,t);c<n.length;)i=n.slice(c,c+1e4),i.unshift(r,0),e.splice(...i),c+=1e4,r+=1e4}function G(e,r){return e.length>0?(te(e,e.length,0,r),e):r}const Ve={}.hasOwnProperty;function _t(e){const r={};let t=-1;for(;++t<e.length;)Bt(r,e[t]);return r}function Bt(e,r){let t;for(t in r){const n=(Ve.call(e,t)?e[t]:void 0)||(e[t]={}),u=r[t];let c;if(u)for(c in u){Ve.call(n,c)||(n[c]=[]);const i=u[c];Mt(n[c],Array.isArray(i)?i:i?[i]:[])}}}function Mt(e,r){let t=-1;const n=[];for(;++t<r.length;)(r[t].add==="after"?e:n).push(r[t]);te(e,0,0,n)}const Pt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=se(/[A-Za-z]/),Z=se(/[\dA-Za-z]/),Lt=se(/[#-'*+\--9=?A-Z^-~]/);function Ae(e){return e!==null&&(e<32||e===127)}const Ie=se(/\d/),Ot=se(/[\dA-Fa-f]/),jt=se(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function T(e){return e===-2||e===-1||e===32}const Ht=se(Pt),Rt=se(/\s/);function se(e){return r;function r(t){return t!==null&&e.test(String.fromCharCode(t))}}function _(e,r,t,n){const u=n?n-1:Number.POSITIVE_INFINITY;let c=0;return i;function i(p){return T(p)?(e.enter(t),o(p)):r(p)}function o(p){return T(p)&&c++<u?(e.consume(p),o):(e.exit(t),r(p))}}const qt={tokenize:Vt};function Vt(e){const r=e.attempt(this.parser.constructs.contentInitial,n,u);let t;return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_(e,r,"linePrefix")}function u(o){return e.enter("paragraph"),c(o)}function c(o){const p=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),c):(e.consume(o),i)}}const Nt={tokenize:Ut},Ne={tokenize:Wt};function Ut(e){const r=this,t=[];let n=0,u,c,i;return o;function o(S){if(n<t.length){const B=t[n];return r.containerState=B[1],e.attempt(B[0].continuation,p,a)(S)}return a(S)}function p(S){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&O();const B=r.events.length;let P=B,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let w=B;for(;w<r.events.length;)r.events[w][1].end=Object.assign({},x),w++;return te(r.events,P+1,0,r.events.slice(B)),r.events.length=w,a(S)}return o(S)}function a(S){if(n===t.length){if(!u)return g(S);if(u.currentConstruct&&u.currentConstruct.concrete)return I(S);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ne,d,h)(S)}function d(S){return u&&O(),y(n),g(S)}function h(S){return r.parser.lazy[r.now().line]=n!==t.length,i=r.now().offset,I(S)}function g(S){return r.containerState={},e.attempt(Ne,f,I)(S)}function f(S){return n++,t.push([r.currentConstruct,r.containerState]),g(S)}function I(S){if(S===null){u&&O(),y(0),e.consume(S);return}return u=u||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:c,_tokenizer:u}),C(S)}function C(S){if(S===null){L(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return E(S)?(e.consume(S),L(e.exit("chunkFlow")),n=0,r.interrupt=void 0,o):(e.consume(S),C)}function L(S,B){const P=r.sliceStream(S);if(B&&P.push(null),S.previous=c,c&&(c.next=S),c=S,u.defineSkip(S.start),u.write(P),r.parser.lazy[S.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<i&&(!u.events[x][1].end||u.events[x][1].end.offset>i))return;const w=r.events.length;let R=w,q,V;for(;R--;)if(r.events[R][0]==="exit"&&r.events[R][1].type==="chunkFlow"){if(q){V=r.events[R][1].end;break}q=!0}for(y(n),x=w;x<r.events.length;)r.events[x][1].end=Object.assign({},V),x++;te(r.events,R+1,0,r.events.slice(w)),r.events.length=x}}function y(S){let B=t.length;for(;B-- >S;){const P=t[B];r.containerState=P[1],P[0].exit.call(r,e)}t.length=S}function O(){u.write([null]),c=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(e,r,t){return _(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||Q(e)||Rt(e))return 1;if(Ht(e))return 2}function De(e,r,t){const n=[];let u=-1;for(;++u<e.length;){const c=e[u].resolveAll;c&&!n.includes(c)&&(r=c(r,t),n.push(c))}return r}const Te={name:"attention",tokenize:Qt,resolveAll:$t};function $t(e,r){let t=-1,n,u,c,i,o,p,a,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(n=t;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&r.sliceSerialize(e[n][1]).charCodeAt(0)===r.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[n][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;p=e[n][1].end.offset-e[n][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),g=Object.assign({},e[t][1].start);We(h,-p),We(g,p),i={type:p>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},c={type:p>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[t][1].start=Object.assign({},o.end),a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=G(a,[["enter",e[n][1],r],["exit",e[n][1],r]])),a=G(a,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",c,r]]),a=G(a,De(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),a=G(a,[["exit",c,r],["enter",o,r],["exit",o,r],["exit",u,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,a=G(a,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,te(e,n-1,t-n+3,a),t=n+a.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Qt(e,r){const t=this.parser.constructs.attentionMarkers.null,n=this.previous,u=Ue(n);let c;return i;function i(p){return c=p,e.enter("attentionSequence"),o(p)}function o(p){if(p===c)return e.consume(p),o;const a=e.exit("attentionSequence"),d=Ue(p),h=!d||d===2&&u||t.includes(p),g=!u||u===2&&d||t.includes(n);return a._open=!!(c===42?h:h&&(u||!g)),a._close=!!(c===42?g:g&&(d||!h)),r(p)}}function We(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const Gt={name:"autolink",tokenize:Kt};function Kt(e,r,t){let n=0;return u;function u(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(f){return ee(f)?(e.consume(f),i):a(f)}function i(f){return f===43||f===45||f===46||Z(f)?(n=1,o(f)):a(f)}function o(f){return f===58?(e.consume(f),n=0,p):(f===43||f===45||f===46||Z(f))&&n++<32?(e.consume(f),o):(n=0,a(f))}function p(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):f===null||f===32||f===60||Ae(f)?t(f):(e.consume(f),p)}function a(f){return f===64?(e.consume(f),d):Lt(f)?(e.consume(f),a):t(f)}function d(f){return Z(f)?h(f):t(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):g(f)}function g(f){if((f===45||Z(f))&&n++<63){const I=f===45?g:h;return e.consume(f),I}return t(f)}}const Fe={tokenize:Jt,partial:!0};function Jt(e,r,t){return n;function n(c){return T(c)?_(e,u,"linePrefix")(c):u(c)}function u(c){return c===null||E(c)?r(c):t(c)}}const tt={name:"blockQuote",tokenize:Xt,continuation:{tokenize:Zt},exit:Yt};function Xt(e,r,t){const n=this;return u;function u(i){if(i===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),c}return t(i)}function c(i){return T(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(i))}}function Zt(e,r,t){const n=this;return u;function u(i){return T(i)?_(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):c(i)}function c(i){return e.attempt(tt,r,t)(i)}}function Yt(e){e.exit("blockQuote")}const nt={name:"characterEscape",tokenize:en};function en(e,r,t){return n;function n(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),u}function u(c){return jt(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):t(c)}}const rt={name:"characterReference",tokenize:tn};function tn(e,r,t){const n=this;let u=0,c,i;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),p}function p(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),c=31,i=Z,d(h))}function a(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,i=Ot,d):(e.enter("characterReferenceValue"),c=7,i=Ie,d(h))}function d(h){if(h===59&&u){const g=e.exit("characterReferenceValue");return i===Z&&!ze(n.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return i(h)&&u++<c?(e.consume(h),d):t(h)}}const $e={tokenize:rn,partial:!0},Qe={name:"codeFenced",tokenize:nn,concrete:!0};function nn(e,r,t){const n=this,u={tokenize:P,partial:!0};let c=0,i=0,o;return p;function p(x){return a(x)}function a(x){const w=n.events[n.events.length-1];return c=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(i++,e.consume(x),d):i<3?t(x):(e.exit("codeFencedFenceSequence"),T(x)?_(e,h,"whitespace")(x):h(x))}function h(x){return x===null||E(x)?(e.exit("codeFencedFence"),n.interrupt?r(x):e.check($e,C,B)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):T(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,f,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function f(x){return x===null||E(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(x))}function I(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),I)}function C(x){return e.attempt(u,B,L)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return c>0&&T(x)?_(e,O,"linePrefix",c+1)(x):O(x)}function O(x){return x===null||E(x)?e.check($e,C,B)(x):(e.enter("codeFlowValue"),S(x))}function S(x){return x===null||E(x)?(e.exit("codeFlowValue"),O(x)):(e.consume(x),S)}function B(x){return e.exit("codeFenced"),r(x)}function P(x,w,R){let q=0;return V;function V(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),F}function F(A){return x.enter("codeFencedFence"),T(A)?_(x,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===o?(x.enter("codeFencedFenceSequence"),M(A)):R(A)}function M(A){return A===o?(q++,x.consume(A),M):q>=i?(x.exit("codeFencedFenceSequence"),T(A)?_(x,j,"whitespace")(A):j(A)):R(A)}function j(A){return A===null||E(A)?(x.exit("codeFencedFence"),w(A)):R(A)}}}function rn(e,r,t){const n=this;return u;function u(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}const be={name:"codeIndented",tokenize:cn},un={tokenize:on,partial:!0};function cn(e,r,t){const n=this;return u;function u(a){return e.enter("codeIndented"),_(e,c,"linePrefix",5)(a)}function c(a){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(a):t(a)}function i(a){return a===null?p(a):E(a)?e.attempt(un,i,p)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||E(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function p(a){return e.exit("codeIndented"),r(a)}}function on(e,r,t){const n=this;return u;function u(i){return n.parser.lazy[n.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):_(e,c,"linePrefix",5)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):E(i)?u(i):t(i)}}const sn={name:"codeText",tokenize:fn,resolve:ln,previous:an};function ln(e){let r=e.length-4,t=3,n,u;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n<r;)if(e[n][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(n=t-1,r++;++n<=r;)u===void 0?n!==r&&e[n][1].type!=="lineEnding"&&(u=n):(n===r||e[n][1].type==="lineEnding")&&(e[u][1].type="codeTextData",n!==u+2&&(e[u][1].end=e[n-1][1].end,e.splice(u+2,n-u-2),r-=n-u-2,n=u+2),u=void 0);return e}function an(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fn(e,r,t){let n=0,u,c;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),p(h))}function p(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),p):h===96?(c=e.enter("codeTextSequence"),u=0,d(h)):E(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),p):(e.enter("codeTextData"),a(h))}function a(h){return h===null||h===32||h===96||E(h)?(e.exit("codeTextData"),p(h)):(e.consume(h),a)}function d(h){return h===96?(e.consume(h),u++,d):u===n?(e.exit("codeTextSequence"),e.exit("codeText"),r(h)):(c.type="codeTextData",a(h))}}function it(e){const r={};let t=-1,n,u,c,i,o,p,a;for(;++t<e.length;){for(;t in r;)t=r[t];if(n=e[t],t&&n[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(p=n[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,dn(e,t)),t=r[t],a=!0);else if(n[1]._container){for(c=t,u=void 0;c--&&(i=e[c],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(e[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=c);u&&(n[1].end=Object.assign({},e[u][1].start),o=e.slice(u,t),o.unshift(n),te(e,u,t-u+1,o))}}return!a}function dn(e,r){const t=e[r][1],n=e[r][2];let u=r-1;const c=[],i=t._tokenizer||n.parser[t.contentType](t.start),o=i.events,p=[],a={};let d,h,g=-1,f=t,I=0,C=0;const L=[C];for(;f;){for(;e[++u][1]!==f;);c.push(u),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(C=g+1,L.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):L.pop(),g=L.length;g--;){const y=o.slice(L[g],L[g+1]),O=c.pop();p.unshift([O,O+y.length-1]),te(e,O,2,y)}for(g=-1;++g<p.length;)a[I+p[g][0]]=I+p[g][1],I+=p[g][1]-p[g][0]-1;return a}const pn={tokenize:gn,resolve:mn},hn={tokenize:xn,partial:!0};function mn(e){return it(e),e}function gn(e,r){let t;return n;function n(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?c(o):E(o)?e.check(hn,i,c)(o):(e.consume(o),u)}function c(o){return e.exit("chunkContent"),e.exit("content"),r(o)}function i(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function xn(e,r,t){const n=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_(e,c,"linePrefix")}function c(i){if(i===null||E(i))return t(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):e.interrupt(n.parser.constructs.flow,t,r)(i)}}function ut(e,r,t,n,u,c,i,o,p){const a=p||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(n),e.enter(u),e.enter(c),e.consume(y),e.exit(c),g):y===null||y===32||y===41||Ae(y)?t(y):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(y))}function g(y){return y===62?(e.enter(c),e.consume(y),e.exit(c),e.exit(u),e.exit(n),r):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),g(y)):y===null||y===60||E(y)?t(y):(e.consume(y),y===92?I:f)}function I(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function C(y){return!d&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),r(y)):d<a&&y===40?(e.consume(y),d++,C):y===41?(e.consume(y),d--,C):y===null||y===32||y===40||Ae(y)?t(y):(e.consume(y),y===92?L:C)}function L(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function ct(e,r,t,n,u,c){const i=this;let o=0,p;return a;function a(f){return e.enter(n),e.enter(u),e.consume(f),e.exit(u),e.enter(c),d}function d(f){return o>999||f===null||f===91||f===93&&!p||f===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(f):f===93?(e.exit(c),e.enter(u),e.consume(f),e.exit(u),e.exit(n),r):E(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||E(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),p||(p=!T(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function ot(e,r,t,n,u,c){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(n),e.enter(u),e.consume(g),e.exit(u),i=g===40?41:g,p):t(g)}function p(g){return g===i?(e.enter(u),e.consume(g),e.exit(u),e.exit(n),r):(e.enter(c),a(g))}function a(g){return g===i?(e.exit(c),p(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===i||g===null||E(g)?(e.exit("chunkString"),a(g)):(e.consume(g),g===92?h:d)}function h(g){return g===i||g===92?(e.consume(g),d):d(g)}}function xe(e,r){let t;return n;function n(u){return E(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t=!0,n):T(u)?_(e,n,t?"linePrefix":"lineSuffix")(u):r(u)}}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn={name:"definition",tokenize:Fn},yn={tokenize:vn,partial:!0};function Fn(e,r,t){const n=this;let u;return c;function c(f){return e.enter("definition"),i(f)}function i(f){return ct.call(n,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return u=he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),p):t(f)}function p(f){return Q(f)?xe(e,a)(f):a(f)}function a(f){return ut(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(yn,h,h)(f)}function h(f){return T(f)?_(e,g,"whitespace")(f):g(f)}function g(f){return f===null||E(f)?(e.exit("definition"),n.parser.defined.push(u),r(f)):t(f)}}function vn(e,r,t){return n;function n(o){return Q(o)?xe(e,u)(o):t(o)}function u(o){return ot(e,c,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function c(o){return T(o)?_(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?r(o):t(o)}}const Sn={name:"hardBreakEscape",tokenize:bn};function bn(e,r,t){return n;function n(c){return e.enter("hardBreakEscape"),e.consume(c),u}function u(c){return E(c)?(e.exit("hardBreakEscape"),r(c)):t(c)}}const En={name:"headingAtx",tokenize:In,resolve:An};function An(e,r){let t=e.length-2,n=3,u,c;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(u={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},c={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},te(e,n,t-n+1,[["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r]])),e}function In(e,r,t){let n=0;return u;function u(d){return e.enter("atxHeading"),c(d)}function c(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&n++<6?(e.consume(d),i):d===null||Q(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),p(d)):d===null||E(d)?(e.exit("atxHeading"),r(d)):T(d)?_(e,o,"whitespace")(d):(e.enter("atxHeadingText"),a(d))}function p(d){return d===35?(e.consume(d),p):(e.exit("atxHeadingSequence"),o(d))}function a(d){return d===null||d===35||Q(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),a)}}const Tn=["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"],Ge=["pre","script","style","textarea"],Cn={name:"htmlFlow",tokenize:_n,resolveTo:Dn,concrete:!0},wn={tokenize:Mn,partial:!0},zn={tokenize:Bn,partial:!0};function Dn(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function _n(e,r,t){const n=this;let u,c,i,o,p;return a;function a(l){return d(l)}function d(l){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(l),h}function h(l){return l===33?(e.consume(l),g):l===47?(e.consume(l),c=!0,C):l===63?(e.consume(l),u=3,n.interrupt?r:s):ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function g(l){return l===45?(e.consume(l),u=2,f):l===91?(e.consume(l),u=5,o=0,I):ee(l)?(e.consume(l),u=4,n.interrupt?r:s):t(l)}function f(l){return l===45?(e.consume(l),n.interrupt?r:s):t(l)}function I(l){const X="CDATA[";return l===X.charCodeAt(o++)?(e.consume(l),o===X.length?n.interrupt?r:v:I):t(l)}function C(l){return ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){if(l===null||l===47||l===62||Q(l)){const X=l===47,ae=i.toLowerCase();return!X&&!c&&Ge.includes(ae)?(u=1,n.interrupt?r(l):v(l)):Tn.includes(i.toLowerCase())?(u=6,X?(e.consume(l),y):n.interrupt?r(l):v(l)):(u=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(l):c?O(l):S(l))}return l===45||Z(l)?(e.consume(l),i+=String.fromCharCode(l),L):t(l)}function y(l){return l===62?(e.consume(l),n.interrupt?r:v):t(l)}function O(l){return T(l)?(e.consume(l),O):V(l)}function S(l){return l===47?(e.consume(l),V):l===58||l===95||ee(l)?(e.consume(l),B):T(l)?(e.consume(l),S):V(l)}function B(l){return l===45||l===46||l===58||l===95||Z(l)?(e.consume(l),B):P(l)}function P(l){return l===61?(e.consume(l),x):T(l)?(e.consume(l),P):S(l)}function x(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(e.consume(l),p=l,w):T(l)?(e.consume(l),x):R(l)}function w(l){return l===p?(e.consume(l),p=null,q):l===null||E(l)?t(l):(e.consume(l),w)}function R(l){return l===null||l===34||l===39||l===47||l===60||l===61||l===62||l===96||Q(l)?P(l):(e.consume(l),R)}function q(l){return l===47||l===62||T(l)?S(l):t(l)}function V(l){return l===62?(e.consume(l),F):t(l)}function F(l){return l===null||E(l)?v(l):T(l)?(e.consume(l),F):t(l)}function v(l){return l===45&&u===2?(e.consume(l),W):l===60&&u===1?(e.consume(l),N):l===62&&u===4?(e.consume(l),J):l===63&&u===3?(e.consume(l),s):l===93&&u===5?(e.consume(l),ne):E(l)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(wn,re,M)(l)):l===null||E(l)?(e.exit("htmlFlowData"),M(l)):(e.consume(l),v)}function M(l){return e.check(zn,j,re)(l)}function j(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A}function A(l){return l===null||E(l)?M(l):(e.enter("htmlFlowData"),v(l))}function W(l){return l===45?(e.consume(l),s):v(l)}function N(l){return l===47?(e.consume(l),i="",K):v(l)}function K(l){if(l===62){const X=i.toLowerCase();return Ge.includes(X)?(e.consume(l),J):v(l)}return ee(l)&&i.length<8?(e.consume(l),i+=String.fromCharCode(l),K):v(l)}function ne(l){return l===93?(e.consume(l),s):v(l)}function s(l){return l===62?(e.consume(l),J):l===45&&u===2?(e.consume(l),s):v(l)}function J(l){return l===null||E(l)?(e.exit("htmlFlowData"),re(l)):(e.consume(l),J)}function re(l){return e.exit("htmlFlow"),r(l)}}function Bn(e,r,t){const n=this;return u;function u(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):t(i)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}function Mn(e,r,t){return n;function n(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Fe,r,t)}}const Pn={name:"htmlText",tokenize:Ln};function Ln(e,r,t){const n=this;let u,c,i;return o;function o(s){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(s),p}function p(s){return s===33?(e.consume(s),a):s===47?(e.consume(s),P):s===63?(e.consume(s),S):ee(s)?(e.consume(s),R):t(s)}function a(s){return s===45?(e.consume(s),d):s===91?(e.consume(s),c=0,I):ee(s)?(e.consume(s),O):t(s)}function d(s){return s===45?(e.consume(s),f):t(s)}function h(s){return s===null?t(s):s===45?(e.consume(s),g):E(s)?(i=h,N(s)):(e.consume(s),h)}function g(s){return s===45?(e.consume(s),f):h(s)}function f(s){return s===62?W(s):s===45?g(s):h(s)}function I(s){const J="CDATA[";return s===J.charCodeAt(c++)?(e.consume(s),c===J.length?C:I):t(s)}function C(s){return s===null?t(s):s===93?(e.consume(s),L):E(s)?(i=C,N(s)):(e.consume(s),C)}function L(s){return s===93?(e.consume(s),y):C(s)}function y(s){return s===62?W(s):s===93?(e.consume(s),y):C(s)}function O(s){return s===null||s===62?W(s):E(s)?(i=O,N(s)):(e.consume(s),O)}function S(s){return s===null?t(s):s===63?(e.consume(s),B):E(s)?(i=S,N(s)):(e.consume(s),S)}function B(s){return s===62?W(s):S(s)}function P(s){return ee(s)?(e.consume(s),x):t(s)}function x(s){return s===45||Z(s)?(e.consume(s),x):w(s)}function w(s){return E(s)?(i=w,N(s)):T(s)?(e.consume(s),w):W(s)}function R(s){return s===45||Z(s)?(e.consume(s),R):s===47||s===62||Q(s)?q(s):t(s)}function q(s){return s===47?(e.consume(s),W):s===58||s===95||ee(s)?(e.consume(s),V):E(s)?(i=q,N(s)):T(s)?(e.consume(s),q):W(s)}function V(s){return s===45||s===46||s===58||s===95||Z(s)?(e.consume(s),V):F(s)}function F(s){return s===61?(e.consume(s),v):E(s)?(i=F,N(s)):T(s)?(e.consume(s),F):q(s)}function v(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(e.consume(s),u=s,M):E(s)?(i=v,N(s)):T(s)?(e.consume(s),v):(e.consume(s),j)}function M(s){return s===u?(e.consume(s),u=void 0,A):s===null?t(s):E(s)?(i=M,N(s)):(e.consume(s),M)}function j(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===47||s===62||Q(s)?q(s):(e.consume(s),j)}function A(s){return s===47||s===62||Q(s)?q(s):t(s)}function W(s){return s===62?(e.consume(s),e.exit("htmlTextData"),e.exit("htmlText"),r):t(s)}function N(s){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),K}function K(s){return T(s)?_(e,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):ne(s)}function ne(s){return e.enter("htmlTextData"),i(s)}}const _e={name:"labelEnd",tokenize:Vn,resolveTo:qn,resolveAll:Rn},On={tokenize:Nn},jn={tokenize:Un},Hn={tokenize:Wn};function Rn(e){let r=-1;for(;++r<e.length;){const t=e[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return e}function qn(e,r){let t=e.length,n=0,u,c,i,o;for(;t--;)if(u=e[t][1],c){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(c=t,u.type!=="labelLink")){n=2;break}}else u.type==="labelEnd"&&(i=t);const p={type:e[c][1].type==="labelLink"?"link":"image",start:Object.assign({},e[c][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[c][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[c+n+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",p,r],["enter",a,r]],o=G(o,e.slice(c+1,c+n+3)),o=G(o,[["enter",d,r]]),o=G(o,De(r.parser.constructs.insideSpan.null,e.slice(c+n+4,i-3),r)),o=G(o,[["exit",d,r],e[i-2],e[i-1],["exit",a,r]]),o=G(o,e.slice(i+1)),o=G(o,[["exit",p,r]]),te(e,c,e.length,o),e}function Vn(e,r,t){const n=this;let u=n.events.length,c,i;for(;u--;)if((n.events[u][1].type==="labelImage"||n.events[u][1].type==="labelLink")&&!n.events[u][1]._balanced){c=n.events[u][1];break}return o;function o(g){return c?c._inactive?h(g):(i=n.parser.defined.includes(he(n.sliceSerialize({start:c.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):t(g)}function p(g){return g===40?e.attempt(On,d,i?d:h)(g):g===91?e.attempt(jn,d,i?a:h)(g):i?d(g):h(g)}function a(g){return e.attempt(Hn,d,h)(g)}function d(g){return r(g)}function h(g){return c._balanced=!0,t(g)}}function Nn(e,r,t){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return Q(h)?xe(e,c)(h):c(h)}function c(h){return h===41?d(h):ut(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return Q(h)?xe(e,p)(h):d(h)}function o(h){return t(h)}function p(h){return h===34||h===39||h===40?ot(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function a(h){return Q(h)?xe(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),r):t(h)}}function Un(e,r,t){const n=this;return u;function u(o){return ct.call(n,e,c,i,"reference","referenceMarker","referenceString")(o)}function c(o){return n.parser.defined.includes(he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(o):t(o)}function i(o){return t(o)}}function Wn(e,r,t){return n;function n(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),u}function u(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),r):t(c)}}const $n={name:"labelStartImage",tokenize:Qn,resolveAll:_e.resolveAll};function Qn(e,r,t){const n=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),c}function c(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(o):r(o)}}const Gn={name:"labelStartLink",tokenize:Kn,resolveAll:_e.resolveAll};function Kn(e,r,t){const n=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),c}function c(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(i):r(i)}}const Ee={name:"lineEnding",tokenize:Jn};function Jn(e,r){return t;function t(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),_(e,r,"linePrefix")}}const ke={name:"thematicBreak",tokenize:Xn};function Xn(e,r,t){let n=0,u;return c;function c(a){return e.enter("thematicBreak"),i(a)}function i(a){return u=a,o(a)}function o(a){return a===u?(e.enter("thematicBreakSequence"),p(a)):n>=3&&(a===null||E(a))?(e.exit("thematicBreak"),r(a)):t(a)}function p(a){return a===u?(e.consume(a),n++,p):(e.exit("thematicBreakSequence"),T(a)?_(e,o,"whitespace")(a):o(a))}}const $={name:"list",tokenize:er,continuation:{tokenize:tr},exit:rr},Zn={tokenize:ir,partial:!0},Yn={tokenize:nr,partial:!0};function er(e,r,t){const n=this,u=n.events[n.events.length-1];let c=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(f){const I=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(I==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ie(f)){if(n.containerState.type||(n.containerState.type=I,e.enter(I,{_container:!0})),I==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ke,t,a)(f):a(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(f)}return t(f)}function p(f){return Ie(f)&&++i<10?(e.consume(f),p):(!n.interrupt||i<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fe,n.interrupt?t:d,e.attempt(Zn,g,h))}function d(f){return n.containerState.initialBlankLine=!0,c++,g(f)}function h(f){return T(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=c+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(f)}}function tr(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(Fe,u,c);function u(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,_(e,r,"listItemIndent",n.containerState.size+1)(o)}function c(o){return n.containerState.furtherBlankLines||!T(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Yn,r,i)(o))}function i(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,_(e,e.attempt($,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nr(e,r,t){const n=this;return _(e,u,"listItemIndent",n.containerState.size+1);function u(c){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?r(c):t(c)}}function rr(e){e.exit(this.containerState.type)}function ir(e,r,t){const n=this;return _(e,u,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(c){const i=n.events[n.events.length-1];return!T(c)&&i&&i[1].type==="listItemPrefixWhitespace"?r(c):t(c)}}const Ke={name:"setextUnderline",tokenize:cr,resolveTo:ur};function ur(e,r){let t=e.length,n,u,c;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(u=t)}else e[t][1].type==="content"&&e.splice(t,1),!c&&e[t][1].type==="definition"&&(c=t);const i={type:"setextHeading",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[u][1].type="setextHeadingText",c?(e.splice(u,0,["enter",i,r]),e.splice(c+1,0,["exit",e[n][1],r]),e[n][1].end=Object.assign({},e[c][1].end)):e[n][1]=i,e.push(["exit",i,r]),e}function cr(e,r,t){const n=this;let u;return c;function c(a){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),u=a,i(a)):t(a)}function i(a){return e.enter("setextHeadingLineSequence"),o(a)}function o(a){return a===u?(e.consume(a),o):(e.exit("setextHeadingLineSequence"),T(a)?_(e,p,"lineSuffix")(a):p(a))}function p(a){return a===null||E(a)?(e.exit("setextHeadingLine"),r(a)):t(a)}}const or={tokenize:sr};function sr(e){const r=this,t=e.attempt(Fe,n,e.attempt(this.parser.constructs.flowInitial,u,_(e,e.attempt(this.parser.constructs.flow,u,e.attempt(pn,u)),"linePrefix")));return t;function n(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:lt()},ar=st("string"),fr=st("text");function st(e){return{tokenize:r,resolveAll:lt(e==="text"?dr:void 0)};function r(t){const n=this,u=this.parser.constructs[e],c=t.attempt(u,i,o);return i;function i(d){return a(d)?c(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),p}function p(d){return a(d)?(t.exit("data"),c(d)):(t.consume(d),p)}function a(d){if(d===null)return!0;const h=u[d];let g=-1;if(h)for(;++g<h.length;){const f=h[g];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function lt(e){return r;function r(t,n){let u=-1,c;for(;++u<=t.length;)c===void 0?t[u]&&t[u][1].type==="data"&&(c=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==c+2&&(t[c][1].end=t[u-1][1].end,t.splice(c+2,u-c-2),u=c+2),c=void 0);return e?e(t,n):t}}function dr(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],u=r.sliceStream(n);let c=u.length,i=-1,o=0,p;for(;c--;){const a=u[c];if(typeof a=="string"){for(i=a.length;a.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(a===-2)p=!0,o++;else if(a!==-1){c++;break}}if(o){const a={type:t===e.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-o,offset:n.end.offset-o,_index:n.start._index+c,_bufferIndex:c?i:n.start._bufferIndex+i},end:Object.assign({},n.end)};n.end=Object.assign({},a.start),n.start.offset===n.end.offset?Object.assign(n,a):(e.splice(t,0,["enter",a,r],["exit",a,r]),t+=2)}t++}return e}function pr(e,r,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},c=[];let i=[],o=[];const p={consume:O,enter:S,exit:B,attempt:w(P),check:w(x),interrupt:w(x,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:g,now:I,defineSkip:C,write:h};let d=r.tokenize.call(a,p);return r.resolveAll&&c.push(r),a;function h(F){return i=G(i,F),L(),i[i.length-1]!==null?[]:(R(r,0),a.events=De(c,a.events,a),a.events)}function g(F,v){return mr(f(F),v)}function f(F){return hr(i,F)}function I(){const{line:F,column:v,offset:M,_index:j,_bufferIndex:A}=n;return{line:F,column:v,offset:M,_index:j,_bufferIndex:A}}function C(F){u[F.line]=F.column,V()}function L(){let F;for(;n._index<i.length;){const v=i[n._index];if(typeof v=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<v.length;)y(v.charCodeAt(n._bufferIndex));else y(v)}}function y(F){d=d(F)}function O(F){E(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,V()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),a.previous=F}function S(F,v){const M=v||{};return M.type=F,M.start=I(),a.events.push(["enter",M,a]),o.push(M),M}function B(F){const v=o.pop();return v.end=I(),a.events.push(["exit",v,a]),v}function P(F,v){R(F,v.from)}function x(F,v){v.restore()}function w(F,v){return M;function M(j,A,W){let N,K,ne,s;return Array.isArray(j)?re(j):"tokenize"in j?re([j]):J(j);function J(U){return fe;function fe(ce){const de=ce!==null&&U[ce],pe=ce!==null&&U.null,ve=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return re(ve)(ce)}}function re(U){return N=U,K=0,U.length===0?W:l(U[K])}function l(U){return fe;function fe(ce){return s=q(),ne=U,U.partial||(a.currentConstruct=U),U.name&&a.parser.constructs.disable.null.includes(U.name)?ae():U.tokenize.call(v?Object.assign(Object.create(a),v):a,p,X,ae)(ce)}}function X(U){return F(ne,s),A}function ae(U){return s.restore(),++K<N.length?l(N[K]):W}}}function R(F,v){F.resolveAll&&!c.includes(F)&&c.push(F),F.resolve&&te(a.events,v,a.events.length-v,F.resolve(a.events.slice(v),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function q(){const F=I(),v=a.previous,M=a.currentConstruct,j=a.events.length,A=Array.from(o);return{restore:W,from:j};function W(){n=F,a.previous=v,a.currentConstruct=M,a.events.length=j,o=A,V()}}function V(){n.line in u&&n.column<2&&(n.column=u[n.line],n.offset+=u[n.line]-1)}}function hr(e,r){const t=r.start._index,n=r.start._bufferIndex,u=r.end._index,c=r.end._bufferIndex;let i;if(t===u)i=[e[t].slice(n,c)];else{if(i=e.slice(t,u),n>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(n):i.shift()}c>0&&i.push(e[u].slice(0,c))}return i}function mr(e,r){let t=-1;const n=[];let u;for(;++t<e.length;){const c=e[t];let i;if(typeof c=="string")i=c;else switch(c){case-5:{i="\r";break}case-4:{i=`
1
+ import{O as Et,br as At,G as It,ak as Tt,bs as Ct,bt as ze}from"./index-CVRNWcf-.js";const wt={};function zt(e,r){const t=wt,n=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,u=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return et(e,n,u)}function et(e,r,t){if(Dt(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qe(e.children,r,t)}return Array.isArray(e)?qe(e,r,t):""}function qe(e,r,t){const n=[];let u=-1;for(;++u<e.length;)n[u]=et(e[u],r,t);return n.join("")}function Dt(e){return!!(e&&typeof e=="object")}function te(e,r,t,n){const u=e.length;let c=0,i;if(r<0?r=-r>u?0:u+r:r=r>u?u:r,t=t>0?t:0,n.length<1e4)i=Array.from(n),i.unshift(r,t),e.splice(...i);else for(t&&e.splice(r,t);c<n.length;)i=n.slice(c,c+1e4),i.unshift(r,0),e.splice(...i),c+=1e4,r+=1e4}function G(e,r){return e.length>0?(te(e,e.length,0,r),e):r}const Ve={}.hasOwnProperty;function _t(e){const r={};let t=-1;for(;++t<e.length;)Bt(r,e[t]);return r}function Bt(e,r){let t;for(t in r){const n=(Ve.call(e,t)?e[t]:void 0)||(e[t]={}),u=r[t];let c;if(u)for(c in u){Ve.call(n,c)||(n[c]=[]);const i=u[c];Mt(n[c],Array.isArray(i)?i:i?[i]:[])}}}function Mt(e,r){let t=-1;const n=[];for(;++t<r.length;)(r[t].add==="after"?e:n).push(r[t]);te(e,0,0,n)}const Pt=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,ee=se(/[A-Za-z]/),Z=se(/[\dA-Za-z]/),Lt=se(/[#-'*+\--9=?A-Z^-~]/);function Ae(e){return e!==null&&(e<32||e===127)}const Ie=se(/\d/),Ot=se(/[\dA-Fa-f]/),jt=se(/[!-/:-@[-`{-~]/);function E(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function T(e){return e===-2||e===-1||e===32}const Ht=se(Pt),Rt=se(/\s/);function se(e){return r;function r(t){return t!==null&&e.test(String.fromCharCode(t))}}function _(e,r,t,n){const u=n?n-1:Number.POSITIVE_INFINITY;let c=0;return i;function i(p){return T(p)?(e.enter(t),o(p)):r(p)}function o(p){return T(p)&&c++<u?(e.consume(p),o):(e.exit(t),r(p))}}const qt={tokenize:Vt};function Vt(e){const r=e.attempt(this.parser.constructs.contentInitial,n,u);let t;return r;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_(e,r,"linePrefix")}function u(o){return e.enter("paragraph"),c(o)}function c(o){const p=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=p),t=p,i(o)}function i(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return E(o)?(e.consume(o),e.exit("chunkText"),c):(e.consume(o),i)}}const Nt={tokenize:Ut},Ne={tokenize:Wt};function Ut(e){const r=this,t=[];let n=0,u,c,i;return o;function o(S){if(n<t.length){const B=t[n];return r.containerState=B[1],e.attempt(B[0].continuation,p,a)(S)}return a(S)}function p(S){if(n++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,u&&O();const B=r.events.length;let P=B,x;for(;P--;)if(r.events[P][0]==="exit"&&r.events[P][1].type==="chunkFlow"){x=r.events[P][1].end;break}y(n);let w=B;for(;w<r.events.length;)r.events[w][1].end=Object.assign({},x),w++;return te(r.events,P+1,0,r.events.slice(B)),r.events.length=w,a(S)}return o(S)}function a(S){if(n===t.length){if(!u)return g(S);if(u.currentConstruct&&u.currentConstruct.concrete)return I(S);r.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ne,d,h)(S)}function d(S){return u&&O(),y(n),g(S)}function h(S){return r.parser.lazy[r.now().line]=n!==t.length,i=r.now().offset,I(S)}function g(S){return r.containerState={},e.attempt(Ne,f,I)(S)}function f(S){return n++,t.push([r.currentConstruct,r.containerState]),g(S)}function I(S){if(S===null){u&&O(),y(0),e.consume(S);return}return u=u||r.parser.flow(r.now()),e.enter("chunkFlow",{contentType:"flow",previous:c,_tokenizer:u}),C(S)}function C(S){if(S===null){L(e.exit("chunkFlow"),!0),y(0),e.consume(S);return}return E(S)?(e.consume(S),L(e.exit("chunkFlow")),n=0,r.interrupt=void 0,o):(e.consume(S),C)}function L(S,B){const P=r.sliceStream(S);if(B&&P.push(null),S.previous=c,c&&(c.next=S),c=S,u.defineSkip(S.start),u.write(P),r.parser.lazy[S.start.line]){let x=u.events.length;for(;x--;)if(u.events[x][1].start.offset<i&&(!u.events[x][1].end||u.events[x][1].end.offset>i))return;const w=r.events.length;let R=w,q,V;for(;R--;)if(r.events[R][0]==="exit"&&r.events[R][1].type==="chunkFlow"){if(q){V=r.events[R][1].end;break}q=!0}for(y(n),x=w;x<r.events.length;)r.events[x][1].end=Object.assign({},V),x++;te(r.events,R+1,0,r.events.slice(w)),r.events.length=x}}function y(S){let B=t.length;for(;B-- >S;){const P=t[B];r.containerState=P[1],P[0].exit.call(r,e)}t.length=S}function O(){u.write([null]),c=void 0,u=void 0,r.containerState._closeFlow=void 0}}function Wt(e,r,t){return _(e,e.attempt(this.parser.constructs.document,r,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ue(e){if(e===null||Q(e)||Rt(e))return 1;if(Ht(e))return 2}function De(e,r,t){const n=[];let u=-1;for(;++u<e.length;){const c=e[u].resolveAll;c&&!n.includes(c)&&(r=c(r,t),n.push(c))}return r}const Te={name:"attention",tokenize:Qt,resolveAll:$t};function $t(e,r){let t=-1,n,u,c,i,o,p,a,d;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(n=t;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&r.sliceSerialize(e[n][1]).charCodeAt(0)===r.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[n][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;p=e[n][1].end.offset-e[n][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),g=Object.assign({},e[t][1].start);We(h,-p),We(g,p),i={type:p>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:p>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},c={type:p>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[t][1].start)},u={type:p>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[t][1].start=Object.assign({},o.end),a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=G(a,[["enter",e[n][1],r],["exit",e[n][1],r]])),a=G(a,[["enter",u,r],["enter",i,r],["exit",i,r],["enter",c,r]]),a=G(a,De(r.parser.constructs.insideSpan.null,e.slice(n+1,t),r)),a=G(a,[["exit",c,r],["enter",o,r],["exit",o,r],["exit",u,r]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,a=G(a,[["enter",e[t][1],r],["exit",e[t][1],r]])):d=0,te(e,n-1,t-n+3,a),t=n+a.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Qt(e,r){const t=this.parser.constructs.attentionMarkers.null,n=this.previous,u=Ue(n);let c;return i;function i(p){return c=p,e.enter("attentionSequence"),o(p)}function o(p){if(p===c)return e.consume(p),o;const a=e.exit("attentionSequence"),d=Ue(p),h=!d||d===2&&u||t.includes(p),g=!u||u===2&&d||t.includes(n);return a._open=!!(c===42?h:h&&(u||!g)),a._close=!!(c===42?g:g&&(d||!h)),r(p)}}function We(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const Gt={name:"autolink",tokenize:Kt};function Kt(e,r,t){let n=0;return u;function u(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),c}function c(f){return ee(f)?(e.consume(f),i):a(f)}function i(f){return f===43||f===45||f===46||Z(f)?(n=1,o(f)):a(f)}function o(f){return f===58?(e.consume(f),n=0,p):(f===43||f===45||f===46||Z(f))&&n++<32?(e.consume(f),o):(n=0,a(f))}function p(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):f===null||f===32||f===60||Ae(f)?t(f):(e.consume(f),p)}function a(f){return f===64?(e.consume(f),d):Lt(f)?(e.consume(f),a):t(f)}function d(f){return Z(f)?h(f):t(f)}function h(f){return f===46?(e.consume(f),n=0,d):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),r):g(f)}function g(f){if((f===45||Z(f))&&n++<63){const I=f===45?g:h;return e.consume(f),I}return t(f)}}const Fe={tokenize:Jt,partial:!0};function Jt(e,r,t){return n;function n(c){return T(c)?_(e,u,"linePrefix")(c):u(c)}function u(c){return c===null||E(c)?r(c):t(c)}}const tt={name:"blockQuote",tokenize:Xt,continuation:{tokenize:Zt},exit:Yt};function Xt(e,r,t){const n=this;return u;function u(i){if(i===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),c}return t(i)}function c(i){return T(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(i))}}function Zt(e,r,t){const n=this;return u;function u(i){return T(i)?_(e,c,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):c(i)}function c(i){return e.attempt(tt,r,t)(i)}}function Yt(e){e.exit("blockQuote")}const nt={name:"characterEscape",tokenize:en};function en(e,r,t){return n;function n(c){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(c),e.exit("escapeMarker"),u}function u(c){return jt(c)?(e.enter("characterEscapeValue"),e.consume(c),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):t(c)}}const rt={name:"characterReference",tokenize:tn};function tn(e,r,t){const n=this;let u=0,c,i;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),p}function p(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),c=31,i=Z,d(h))}function a(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),c=6,i=Ot,d):(e.enter("characterReferenceValue"),c=7,i=Ie,d(h))}function d(h){if(h===59&&u){const g=e.exit("characterReferenceValue");return i===Z&&!ze(n.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return i(h)&&u++<c?(e.consume(h),d):t(h)}}const $e={tokenize:rn,partial:!0},Qe={name:"codeFenced",tokenize:nn,concrete:!0};function nn(e,r,t){const n=this,u={tokenize:P,partial:!0};let c=0,i=0,o;return p;function p(x){return a(x)}function a(x){const w=n.events[n.events.length-1];return c=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(i++,e.consume(x),d):i<3?t(x):(e.exit("codeFencedFenceSequence"),T(x)?_(e,h,"whitespace")(x):h(x))}function h(x){return x===null||E(x)?(e.exit("codeFencedFence"),n.interrupt?r(x):e.check($e,C,B)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):T(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_(e,f,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function f(x){return x===null||E(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),I(x))}function I(x){return x===null||E(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),I)}function C(x){return e.attempt(u,B,L)(x)}function L(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y}function y(x){return c>0&&T(x)?_(e,O,"linePrefix",c+1)(x):O(x)}function O(x){return x===null||E(x)?e.check($e,C,B)(x):(e.enter("codeFlowValue"),S(x))}function S(x){return x===null||E(x)?(e.exit("codeFlowValue"),O(x)):(e.consume(x),S)}function B(x){return e.exit("codeFenced"),r(x)}function P(x,w,R){let q=0;return V;function V(A){return x.enter("lineEnding"),x.consume(A),x.exit("lineEnding"),F}function F(A){return x.enter("codeFencedFence"),T(A)?_(x,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):v(A)}function v(A){return A===o?(x.enter("codeFencedFenceSequence"),M(A)):R(A)}function M(A){return A===o?(q++,x.consume(A),M):q>=i?(x.exit("codeFencedFenceSequence"),T(A)?_(x,j,"whitespace")(A):j(A)):R(A)}function j(A){return A===null||E(A)?(x.exit("codeFencedFence"),w(A)):R(A)}}}function rn(e,r,t){const n=this;return u;function u(i){return i===null?t(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}const be={name:"codeIndented",tokenize:cn},un={tokenize:on,partial:!0};function cn(e,r,t){const n=this;return u;function u(a){return e.enter("codeIndented"),_(e,c,"linePrefix",5)(a)}function c(a){const d=n.events[n.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(a):t(a)}function i(a){return a===null?p(a):E(a)?e.attempt(un,i,p)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||E(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function p(a){return e.exit("codeIndented"),r(a)}}function on(e,r,t){const n=this;return u;function u(i){return n.parser.lazy[n.now().line]?t(i):E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),u):_(e,c,"linePrefix",5)(i)}function c(i){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):E(i)?u(i):t(i)}}const sn={name:"codeText",tokenize:fn,resolve:ln,previous:an};function ln(e){let r=e.length-4,t=3,n,u;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(n=t;++n<r;)if(e[n][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[r][1].type="codeTextPadding",t+=2,r-=2;break}}for(n=t-1,r++;++n<=r;)u===void 0?n!==r&&e[n][1].type!=="lineEnding"&&(u=n):(n===r||e[n][1].type==="lineEnding")&&(e[u][1].type="codeTextData",n!==u+2&&(e[u][1].end=e[n-1][1].end,e.splice(u+2,n-u-2),r-=n-u-2,n=u+2),u=void 0);return e}function an(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fn(e,r,t){let n=0,u,c;return i;function i(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),n++,o):(e.exit("codeTextSequence"),p(h))}function p(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),p):h===96?(c=e.enter("codeTextSequence"),u=0,d(h)):E(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),p):(e.enter("codeTextData"),a(h))}function a(h){return h===null||h===32||h===96||E(h)?(e.exit("codeTextData"),p(h)):(e.consume(h),a)}function d(h){return h===96?(e.consume(h),u++,d):u===n?(e.exit("codeTextSequence"),e.exit("codeText"),r(h)):(c.type="codeTextData",a(h))}}function it(e){const r={};let t=-1,n,u,c,i,o,p,a;for(;++t<e.length;){for(;t in r;)t=r[t];if(n=e[t],t&&n[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(p=n[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(n[0]==="enter")n[1].contentType&&(Object.assign(r,dn(e,t)),t=r[t],a=!0);else if(n[1]._container){for(c=t,u=void 0;c--&&(i=e[c],i[1].type==="lineEnding"||i[1].type==="lineEndingBlank");)i[0]==="enter"&&(u&&(e[u][1].type="lineEndingBlank"),i[1].type="lineEnding",u=c);u&&(n[1].end=Object.assign({},e[u][1].start),o=e.slice(u,t),o.unshift(n),te(e,u,t-u+1,o))}}return!a}function dn(e,r){const t=e[r][1],n=e[r][2];let u=r-1;const c=[],i=t._tokenizer||n.parser[t.contentType](t.start),o=i.events,p=[],a={};let d,h,g=-1,f=t,I=0,C=0;const L=[C];for(;f;){for(;e[++u][1]!==f;);c.push(u),f._tokenizer||(d=n.sliceStream(f),f.next||d.push(null),h&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(d),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(C=g+1,L.push(C),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):L.pop(),g=L.length;g--;){const y=o.slice(L[g],L[g+1]),O=c.pop();p.unshift([O,O+y.length-1]),te(e,O,2,y)}for(g=-1;++g<p.length;)a[I+p[g][0]]=I+p[g][1],I+=p[g][1]-p[g][0]-1;return a}const pn={tokenize:gn,resolve:mn},hn={tokenize:xn,partial:!0};function mn(e){return it(e),e}function gn(e,r){let t;return n;function n(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),u(o)}function u(o){return o===null?c(o):E(o)?e.check(hn,i,c)(o):(e.consume(o),u)}function c(o){return e.exit("chunkContent"),e.exit("content"),r(o)}function i(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,u}}function xn(e,r,t){const n=this;return u;function u(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_(e,c,"linePrefix")}function c(i){if(i===null||E(i))return t(i);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(i):e.interrupt(n.parser.constructs.flow,t,r)(i)}}function ut(e,r,t,n,u,c,i,o,p){const a=p||Number.POSITIVE_INFINITY;let d=0;return h;function h(y){return y===60?(e.enter(n),e.enter(u),e.enter(c),e.consume(y),e.exit(c),g):y===null||y===32||y===41||Ae(y)?t(y):(e.enter(n),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),C(y))}function g(y){return y===62?(e.enter(c),e.consume(y),e.exit(c),e.exit(u),e.exit(n),r):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(o),g(y)):y===null||y===60||E(y)?t(y):(e.consume(y),y===92?I:f)}function I(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function C(y){return!d&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(n),r(y)):d<a&&y===40?(e.consume(y),d++,C):y===41?(e.consume(y),d--,C):y===null||y===32||y===40||Ae(y)?t(y):(e.consume(y),y===92?L:C)}function L(y){return y===40||y===41||y===92?(e.consume(y),C):C(y)}}function ct(e,r,t,n,u,c){const i=this;let o=0,p;return a;function a(f){return e.enter(n),e.enter(u),e.consume(f),e.exit(u),e.enter(c),d}function d(f){return o>999||f===null||f===91||f===93&&!p||f===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?t(f):f===93?(e.exit(c),e.enter(u),e.consume(f),e.exit(u),e.exit(n),r):E(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||E(f)||o++>999?(e.exit("chunkString"),d(f)):(e.consume(f),p||(p=!T(f)),f===92?g:h)}function g(f){return f===91||f===92||f===93?(e.consume(f),o++,h):h(f)}}function ot(e,r,t,n,u,c){let i;return o;function o(g){return g===34||g===39||g===40?(e.enter(n),e.enter(u),e.consume(g),e.exit(u),i=g===40?41:g,p):t(g)}function p(g){return g===i?(e.enter(u),e.consume(g),e.exit(u),e.exit(n),r):(e.enter(c),a(g))}function a(g){return g===i?(e.exit(c),p(i)):g===null?t(g):E(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===i||g===null||E(g)?(e.exit("chunkString"),a(g)):(e.consume(g),g===92?h:d)}function h(g){return g===i||g===92?(e.consume(g),d):d(g)}}function xe(e,r){let t;return n;function n(u){return E(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t=!0,n):T(u)?_(e,n,t?"linePrefix":"lineSuffix")(u):r(u)}}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const kn={name:"definition",tokenize:Fn},yn={tokenize:vn,partial:!0};function Fn(e,r,t){const n=this;let u;return c;function c(f){return e.enter("definition"),i(f)}function i(f){return ct.call(n,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return u=he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),p):t(f)}function p(f){return Q(f)?xe(e,a)(f):a(f)}function a(f){return ut(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function d(f){return e.attempt(yn,h,h)(f)}function h(f){return T(f)?_(e,g,"whitespace")(f):g(f)}function g(f){return f===null||E(f)?(e.exit("definition"),n.parser.defined.push(u),r(f)):t(f)}}function vn(e,r,t){return n;function n(o){return Q(o)?xe(e,u)(o):t(o)}function u(o){return ot(e,c,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function c(o){return T(o)?_(e,i,"whitespace")(o):i(o)}function i(o){return o===null||E(o)?r(o):t(o)}}const Sn={name:"hardBreakEscape",tokenize:bn};function bn(e,r,t){return n;function n(c){return e.enter("hardBreakEscape"),e.consume(c),u}function u(c){return E(c)?(e.exit("hardBreakEscape"),r(c)):t(c)}}const En={name:"headingAtx",tokenize:In,resolve:An};function An(e,r){let t=e.length-2,n=3,u,c;return e[n][1].type==="whitespace"&&(n+=2),t-2>n&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(n===t-1||t-4>n&&e[t-2][1].type==="whitespace")&&(t-=n+1===t?2:4),t>n&&(u={type:"atxHeadingText",start:e[n][1].start,end:e[t][1].end},c={type:"chunkText",start:e[n][1].start,end:e[t][1].end,contentType:"text"},te(e,n,t-n+1,[["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r]])),e}function In(e,r,t){let n=0;return u;function u(d){return e.enter("atxHeading"),c(d)}function c(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&n++<6?(e.consume(d),i):d===null||Q(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),p(d)):d===null||E(d)?(e.exit("atxHeading"),r(d)):T(d)?_(e,o,"whitespace")(d):(e.enter("atxHeadingText"),a(d))}function p(d){return d===35?(e.consume(d),p):(e.exit("atxHeadingSequence"),o(d))}function a(d){return d===null||d===35||Q(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),a)}}const Tn=["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"],Ge=["pre","script","style","textarea"],Cn={name:"htmlFlow",tokenize:_n,resolveTo:Dn,concrete:!0},wn={tokenize:Mn,partial:!0},zn={tokenize:Bn,partial:!0};function Dn(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function _n(e,r,t){const n=this;let u,c,i,o,p;return a;function a(l){return d(l)}function d(l){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(l),h}function h(l){return l===33?(e.consume(l),g):l===47?(e.consume(l),c=!0,C):l===63?(e.consume(l),u=3,n.interrupt?r:s):ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function g(l){return l===45?(e.consume(l),u=2,f):l===91?(e.consume(l),u=5,o=0,I):ee(l)?(e.consume(l),u=4,n.interrupt?r:s):t(l)}function f(l){return l===45?(e.consume(l),n.interrupt?r:s):t(l)}function I(l){const X="CDATA[";return l===X.charCodeAt(o++)?(e.consume(l),o===X.length?n.interrupt?r:v:I):t(l)}function C(l){return ee(l)?(e.consume(l),i=String.fromCharCode(l),L):t(l)}function L(l){if(l===null||l===47||l===62||Q(l)){const X=l===47,ae=i.toLowerCase();return!X&&!c&&Ge.includes(ae)?(u=1,n.interrupt?r(l):v(l)):Tn.includes(i.toLowerCase())?(u=6,X?(e.consume(l),y):n.interrupt?r(l):v(l)):(u=7,n.interrupt&&!n.parser.lazy[n.now().line]?t(l):c?O(l):S(l))}return l===45||Z(l)?(e.consume(l),i+=String.fromCharCode(l),L):t(l)}function y(l){return l===62?(e.consume(l),n.interrupt?r:v):t(l)}function O(l){return T(l)?(e.consume(l),O):V(l)}function S(l){return l===47?(e.consume(l),V):l===58||l===95||ee(l)?(e.consume(l),B):T(l)?(e.consume(l),S):V(l)}function B(l){return l===45||l===46||l===58||l===95||Z(l)?(e.consume(l),B):P(l)}function P(l){return l===61?(e.consume(l),x):T(l)?(e.consume(l),P):S(l)}function x(l){return l===null||l===60||l===61||l===62||l===96?t(l):l===34||l===39?(e.consume(l),p=l,w):T(l)?(e.consume(l),x):R(l)}function w(l){return l===p?(e.consume(l),p=null,q):l===null||E(l)?t(l):(e.consume(l),w)}function R(l){return l===null||l===34||l===39||l===47||l===60||l===61||l===62||l===96||Q(l)?P(l):(e.consume(l),R)}function q(l){return l===47||l===62||T(l)?S(l):t(l)}function V(l){return l===62?(e.consume(l),F):t(l)}function F(l){return l===null||E(l)?v(l):T(l)?(e.consume(l),F):t(l)}function v(l){return l===45&&u===2?(e.consume(l),W):l===60&&u===1?(e.consume(l),N):l===62&&u===4?(e.consume(l),J):l===63&&u===3?(e.consume(l),s):l===93&&u===5?(e.consume(l),ne):E(l)&&(u===6||u===7)?(e.exit("htmlFlowData"),e.check(wn,re,M)(l)):l===null||E(l)?(e.exit("htmlFlowData"),M(l)):(e.consume(l),v)}function M(l){return e.check(zn,j,re)(l)}function j(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),A}function A(l){return l===null||E(l)?M(l):(e.enter("htmlFlowData"),v(l))}function W(l){return l===45?(e.consume(l),s):v(l)}function N(l){return l===47?(e.consume(l),i="",K):v(l)}function K(l){if(l===62){const X=i.toLowerCase();return Ge.includes(X)?(e.consume(l),J):v(l)}return ee(l)&&i.length<8?(e.consume(l),i+=String.fromCharCode(l),K):v(l)}function ne(l){return l===93?(e.consume(l),s):v(l)}function s(l){return l===62?(e.consume(l),J):l===45&&u===2?(e.consume(l),s):v(l)}function J(l){return l===null||E(l)?(e.exit("htmlFlowData"),re(l)):(e.consume(l),J)}function re(l){return e.exit("htmlFlow"),r(l)}}function Bn(e,r,t){const n=this;return u;function u(i){return E(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),c):t(i)}function c(i){return n.parser.lazy[n.now().line]?t(i):r(i)}}function Mn(e,r,t){return n;function n(u){return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),e.attempt(Fe,r,t)}}const Pn={name:"htmlText",tokenize:Ln};function Ln(e,r,t){const n=this;let u,c,i;return o;function o(s){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(s),p}function p(s){return s===33?(e.consume(s),a):s===47?(e.consume(s),P):s===63?(e.consume(s),S):ee(s)?(e.consume(s),R):t(s)}function a(s){return s===45?(e.consume(s),d):s===91?(e.consume(s),c=0,I):ee(s)?(e.consume(s),O):t(s)}function d(s){return s===45?(e.consume(s),f):t(s)}function h(s){return s===null?t(s):s===45?(e.consume(s),g):E(s)?(i=h,N(s)):(e.consume(s),h)}function g(s){return s===45?(e.consume(s),f):h(s)}function f(s){return s===62?W(s):s===45?g(s):h(s)}function I(s){const J="CDATA[";return s===J.charCodeAt(c++)?(e.consume(s),c===J.length?C:I):t(s)}function C(s){return s===null?t(s):s===93?(e.consume(s),L):E(s)?(i=C,N(s)):(e.consume(s),C)}function L(s){return s===93?(e.consume(s),y):C(s)}function y(s){return s===62?W(s):s===93?(e.consume(s),y):C(s)}function O(s){return s===null||s===62?W(s):E(s)?(i=O,N(s)):(e.consume(s),O)}function S(s){return s===null?t(s):s===63?(e.consume(s),B):E(s)?(i=S,N(s)):(e.consume(s),S)}function B(s){return s===62?W(s):S(s)}function P(s){return ee(s)?(e.consume(s),x):t(s)}function x(s){return s===45||Z(s)?(e.consume(s),x):w(s)}function w(s){return E(s)?(i=w,N(s)):T(s)?(e.consume(s),w):W(s)}function R(s){return s===45||Z(s)?(e.consume(s),R):s===47||s===62||Q(s)?q(s):t(s)}function q(s){return s===47?(e.consume(s),W):s===58||s===95||ee(s)?(e.consume(s),V):E(s)?(i=q,N(s)):T(s)?(e.consume(s),q):W(s)}function V(s){return s===45||s===46||s===58||s===95||Z(s)?(e.consume(s),V):F(s)}function F(s){return s===61?(e.consume(s),v):E(s)?(i=F,N(s)):T(s)?(e.consume(s),F):q(s)}function v(s){return s===null||s===60||s===61||s===62||s===96?t(s):s===34||s===39?(e.consume(s),u=s,M):E(s)?(i=v,N(s)):T(s)?(e.consume(s),v):(e.consume(s),j)}function M(s){return s===u?(e.consume(s),u=void 0,A):s===null?t(s):E(s)?(i=M,N(s)):(e.consume(s),M)}function j(s){return s===null||s===34||s===39||s===60||s===61||s===96?t(s):s===47||s===62||Q(s)?q(s):(e.consume(s),j)}function A(s){return s===47||s===62||Q(s)?q(s):t(s)}function W(s){return s===62?(e.consume(s),e.exit("htmlTextData"),e.exit("htmlText"),r):t(s)}function N(s){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),K}function K(s){return T(s)?_(e,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):ne(s)}function ne(s){return e.enter("htmlTextData"),i(s)}}const _e={name:"labelEnd",tokenize:Vn,resolveTo:qn,resolveAll:Rn},On={tokenize:Nn},jn={tokenize:Un},Hn={tokenize:Wn};function Rn(e){let r=-1;for(;++r<e.length;){const t=e[r][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(r+1,t.type==="labelImage"?4:2),t.type="data",r++)}return e}function qn(e,r){let t=e.length,n=0,u,c,i,o;for(;t--;)if(u=e[t][1],c){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[t][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(c=t,u.type!=="labelLink")){n=2;break}}else u.type==="labelEnd"&&(i=t);const p={type:e[c][1].type==="labelLink"?"link":"image",start:Object.assign({},e[c][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[c][1].start),end:Object.assign({},e[i][1].end)},d={type:"labelText",start:Object.assign({},e[c+n+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",p,r],["enter",a,r]],o=G(o,e.slice(c+1,c+n+3)),o=G(o,[["enter",d,r]]),o=G(o,De(r.parser.constructs.insideSpan.null,e.slice(c+n+4,i-3),r)),o=G(o,[["exit",d,r],e[i-2],e[i-1],["exit",a,r]]),o=G(o,e.slice(i+1)),o=G(o,[["exit",p,r]]),te(e,c,e.length,o),e}function Vn(e,r,t){const n=this;let u=n.events.length,c,i;for(;u--;)if((n.events[u][1].type==="labelImage"||n.events[u][1].type==="labelLink")&&!n.events[u][1]._balanced){c=n.events[u][1];break}return o;function o(g){return c?c._inactive?h(g):(i=n.parser.defined.includes(he(n.sliceSerialize({start:c.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),p):t(g)}function p(g){return g===40?e.attempt(On,d,i?d:h)(g):g===91?e.attempt(jn,d,i?a:h)(g):i?d(g):h(g)}function a(g){return e.attempt(Hn,d,h)(g)}function d(g){return r(g)}function h(g){return c._balanced=!0,t(g)}}function Nn(e,r,t){return n;function n(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),u}function u(h){return Q(h)?xe(e,c)(h):c(h)}function c(h){return h===41?d(h):ut(e,i,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function i(h){return Q(h)?xe(e,p)(h):d(h)}function o(h){return t(h)}function p(h){return h===34||h===39||h===40?ot(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function a(h){return Q(h)?xe(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),r):t(h)}}function Un(e,r,t){const n=this;return u;function u(o){return ct.call(n,e,c,i,"reference","referenceMarker","referenceString")(o)}function c(o){return n.parser.defined.includes(he(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?r(o):t(o)}function i(o){return t(o)}}function Wn(e,r,t){return n;function n(c){return e.enter("reference"),e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),u}function u(c){return c===93?(e.enter("referenceMarker"),e.consume(c),e.exit("referenceMarker"),e.exit("reference"),r):t(c)}}const $n={name:"labelStartImage",tokenize:Qn,resolveAll:_e.resolveAll};function Qn(e,r,t){const n=this;return u;function u(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),c}function c(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),i):t(o)}function i(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(o):r(o)}}const Gn={name:"labelStartLink",tokenize:Kn,resolveAll:_e.resolveAll};function Kn(e,r,t){const n=this;return u;function u(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),c}function c(i){return i===94&&"_hiddenFootnoteSupport"in n.parser.constructs?t(i):r(i)}}const Ee={name:"lineEnding",tokenize:Jn};function Jn(e,r){return t;function t(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),_(e,r,"linePrefix")}}const ke={name:"thematicBreak",tokenize:Xn};function Xn(e,r,t){let n=0,u;return c;function c(a){return e.enter("thematicBreak"),i(a)}function i(a){return u=a,o(a)}function o(a){return a===u?(e.enter("thematicBreakSequence"),p(a)):n>=3&&(a===null||E(a))?(e.exit("thematicBreak"),r(a)):t(a)}function p(a){return a===u?(e.consume(a),n++,p):(e.exit("thematicBreakSequence"),T(a)?_(e,o,"whitespace")(a):o(a))}}const $={name:"list",tokenize:er,continuation:{tokenize:tr},exit:rr},Zn={tokenize:ir,partial:!0},Yn={tokenize:nr,partial:!0};function er(e,r,t){const n=this,u=n.events[n.events.length-1];let c=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,i=0;return o;function o(f){const I=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(I==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Ie(f)){if(n.containerState.type||(n.containerState.type=I,e.enter(I,{_container:!0})),I==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(ke,t,a)(f):a(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(f)}return t(f)}function p(f){return Ie(f)&&++i<10?(e.consume(f),p):(!n.interrupt||i<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Fe,n.interrupt?t:d,e.attempt(Zn,g,h))}function d(f){return n.containerState.initialBlankLine=!0,c++,g(f)}function h(f){return T(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),g):t(f)}function g(f){return n.containerState.size=c+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(f)}}function tr(e,r,t){const n=this;return n.containerState._closeFlow=void 0,e.check(Fe,u,c);function u(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,_(e,r,"listItemIndent",n.containerState.size+1)(o)}function c(o){return n.containerState.furtherBlankLines||!T(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,i(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Yn,r,i)(o))}function i(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,_(e,e.attempt($,r,t),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function nr(e,r,t){const n=this;return _(e,u,"listItemIndent",n.containerState.size+1);function u(c){const i=n.events[n.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===n.containerState.size?r(c):t(c)}}function rr(e){e.exit(this.containerState.type)}function ir(e,r,t){const n=this;return _(e,u,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(c){const i=n.events[n.events.length-1];return!T(c)&&i&&i[1].type==="listItemPrefixWhitespace"?r(c):t(c)}}const Ke={name:"setextUnderline",tokenize:cr,resolveTo:ur};function ur(e,r){let t=e.length,n,u,c;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){n=t;break}e[t][1].type==="paragraph"&&(u=t)}else e[t][1].type==="content"&&e.splice(t,1),!c&&e[t][1].type==="definition"&&(c=t);const i={type:"setextHeading",start:Object.assign({},e[u][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[u][1].type="setextHeadingText",c?(e.splice(u,0,["enter",i,r]),e.splice(c+1,0,["exit",e[n][1],r]),e[n][1].end=Object.assign({},e[c][1].end)):e[n][1]=i,e.push(["exit",i,r]),e}function cr(e,r,t){const n=this;let u;return c;function c(a){let d=n.events.length,h;for(;d--;)if(n.events[d][1].type!=="lineEnding"&&n.events[d][1].type!=="linePrefix"&&n.events[d][1].type!=="content"){h=n.events[d][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),u=a,i(a)):t(a)}function i(a){return e.enter("setextHeadingLineSequence"),o(a)}function o(a){return a===u?(e.consume(a),o):(e.exit("setextHeadingLineSequence"),T(a)?_(e,p,"lineSuffix")(a):p(a))}function p(a){return a===null||E(a)?(e.exit("setextHeadingLine"),r(a)):t(a)}}const or={tokenize:sr};function sr(e){const r=this,t=e.attempt(Fe,n,e.attempt(this.parser.constructs.flowInitial,u,_(e,e.attempt(this.parser.constructs.flow,u,e.attempt(pn,u)),"linePrefix")));return t;function n(c){if(c===null){e.consume(c);return}return e.enter("lineEndingBlank"),e.consume(c),e.exit("lineEndingBlank"),r.currentConstruct=void 0,t}function u(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),r.currentConstruct=void 0,t}}const lr={resolveAll:lt()},ar=st("string"),fr=st("text");function st(e){return{tokenize:r,resolveAll:lt(e==="text"?dr:void 0)};function r(t){const n=this,u=this.parser.constructs[e],c=t.attempt(u,i,o);return i;function i(d){return a(d)?c(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),p}function p(d){return a(d)?(t.exit("data"),c(d)):(t.consume(d),p)}function a(d){if(d===null)return!0;const h=u[d];let g=-1;if(h)for(;++g<h.length;){const f=h[g];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function lt(e){return r;function r(t,n){let u=-1,c;for(;++u<=t.length;)c===void 0?t[u]&&t[u][1].type==="data"&&(c=u,u++):(!t[u]||t[u][1].type!=="data")&&(u!==c+2&&(t[c][1].end=t[u-1][1].end,t.splice(c+2,u-c-2),u=c+2),c=void 0);return e?e(t,n):t}}function dr(e,r){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const n=e[t-1][1],u=r.sliceStream(n);let c=u.length,i=-1,o=0,p;for(;c--;){const a=u[c];if(typeof a=="string"){for(i=a.length;a.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(a===-2)p=!0,o++;else if(a!==-1){c++;break}}if(o){const a={type:t===e.length||p||o<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-o,offset:n.end.offset-o,_index:n.start._index+c,_bufferIndex:c?i:n.start._bufferIndex+i},end:Object.assign({},n.end)};n.end=Object.assign({},a.start),n.start.offset===n.end.offset?Object.assign(n,a):(e.splice(t,0,["enter",a,r],["exit",a,r]),t+=2)}t++}return e}function pr(e,r,t){let n=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const u={},c=[];let i=[],o=[];const p={consume:O,enter:S,exit:B,attempt:w(P),check:w(x),interrupt:w(x,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:g,now:I,defineSkip:C,write:h};let d=r.tokenize.call(a,p);return r.resolveAll&&c.push(r),a;function h(F){return i=G(i,F),L(),i[i.length-1]!==null?[]:(R(r,0),a.events=De(c,a.events,a),a.events)}function g(F,v){return mr(f(F),v)}function f(F){return hr(i,F)}function I(){const{line:F,column:v,offset:M,_index:j,_bufferIndex:A}=n;return{line:F,column:v,offset:M,_index:j,_bufferIndex:A}}function C(F){u[F.line]=F.column,V()}function L(){let F;for(;n._index<i.length;){const v=i[n._index];if(typeof v=="string")for(F=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===F&&n._bufferIndex<v.length;)y(v.charCodeAt(n._bufferIndex));else y(v)}}function y(F){d=d(F)}function O(F){E(F)?(n.line++,n.column=1,n.offset+=F===-3?2:1,V()):F!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===i[n._index].length&&(n._bufferIndex=-1,n._index++)),a.previous=F}function S(F,v){const M=v||{};return M.type=F,M.start=I(),a.events.push(["enter",M,a]),o.push(M),M}function B(F){const v=o.pop();return v.end=I(),a.events.push(["exit",v,a]),v}function P(F,v){R(F,v.from)}function x(F,v){v.restore()}function w(F,v){return M;function M(j,A,W){let N,K,ne,s;return Array.isArray(j)?re(j):"tokenize"in j?re([j]):J(j);function J(U){return fe;function fe(ce){const de=ce!==null&&U[ce],pe=ce!==null&&U.null,ve=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(pe)?pe:pe?[pe]:[]];return re(ve)(ce)}}function re(U){return N=U,K=0,U.length===0?W:l(U[K])}function l(U){return fe;function fe(ce){return s=q(),ne=U,U.partial||(a.currentConstruct=U),U.name&&a.parser.constructs.disable.null.includes(U.name)?ae():U.tokenize.call(v?Object.assign(Object.create(a),v):a,p,X,ae)(ce)}}function X(U){return F(ne,s),A}function ae(U){return s.restore(),++K<N.length?l(N[K]):W}}}function R(F,v){F.resolveAll&&!c.includes(F)&&c.push(F),F.resolve&&te(a.events,v,a.events.length-v,F.resolve(a.events.slice(v),a)),F.resolveTo&&(a.events=F.resolveTo(a.events,a))}function q(){const F=I(),v=a.previous,M=a.currentConstruct,j=a.events.length,A=Array.from(o);return{restore:W,from:j};function W(){n=F,a.previous=v,a.currentConstruct=M,a.events.length=j,o=A,V()}}function V(){n.line in u&&n.column<2&&(n.column=u[n.line],n.offset+=u[n.line]-1)}}function hr(e,r){const t=r.start._index,n=r.start._bufferIndex,u=r.end._index,c=r.end._bufferIndex;let i;if(t===u)i=[e[t].slice(n,c)];else{if(i=e.slice(t,u),n>-1){const o=i[0];typeof o=="string"?i[0]=o.slice(n):i.shift()}c>0&&i.push(e[u].slice(0,c))}return i}function mr(e,r){let t=-1;const n=[];let u;for(;++t<e.length;){const c=e[t];let i;if(typeof c=="string")i=c;else switch(c){case-5:{i="\r";break}case-4:{i=`
2
2
  `;break}case-3:{i=`\r
3
3
  `;break}case-2:{i=r?" ":" ";break}case-1:{if(!r&&u)continue;i=" ";break}default:i=String.fromCharCode(c)}u=c===-2,n.push(i)}return n.join("")}const gr={42:$,43:$,45:$,48:$,49:$,50:$,51:$,52:$,53:$,54:$,55:$,56:$,57:$,62:tt},xr={91:kn},kr={[-2]:be,[-1]:be,32:be},yr={35:En,42:ke,45:[Ke,ke],60:Cn,61:Ke,95:ke,96:Qe,126:Qe},Fr={38:rt,92:nt},vr={[-5]:Ee,[-4]:Ee,[-3]:Ee,33:$n,38:rt,42:Te,60:[Gt,Pn],91:Gn,92:[Sn,nt],93:_e,95:Te,96:sn},Sr={null:[Te,lr]},br={null:[42,95]},Er={null:[]},Ar=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:br,contentInitial:xr,disable:Er,document:gr,flow:yr,flowInitial:kr,insideSpan:Sr,string:Fr,text:vr},Symbol.toStringTag,{value:"Module"}));function Ir(e){const r=_t([Ar,...(e||{}).extensions||[]]),t={defined:[],lazy:{},constructs:r,content:n(qt),document:n(Nt),flow:n(or),string:n(ar),text:n(fr)};return t;function n(u){return c;function c(i){return pr(t,u,i)}}}const Je=/[\0\t\n\r]/g;function Tr(){let e=1,r="",t=!0,n;return u;function u(c,i,o){const p=[];let a,d,h,g,f;for(c=r+c.toString(i),h=0,r="",t&&(c.charCodeAt(0)===65279&&h++,t=void 0);h<c.length;){if(Je.lastIndex=h,a=Je.exec(c),g=a&&a.index!==void 0?a.index:c.length,f=c.charCodeAt(g),!a){r=c.slice(h);break}if(f===10&&h===g&&n)p.push(-3),n=void 0;else switch(n&&(p.push(-5),n=void 0),h<g&&(p.push(c.slice(h,g)),e+=g-h),f){case 0:{p.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,p.push(-2);e++<d;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:n=!0,e=1}h=g+1}return o&&(n&&p.push(-5),r&&p.push(r),p.push(null)),p}}function Cr(e){for(;!it(e););return e}function at(e,r){const t=Number.parseInt(e,r);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const wr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zr(e){return e.replace(wr,Dr)}function Dr(e,r,t){if(r)return r;if(t.charCodeAt(0)===35){const n=t.charCodeAt(1),u=n===120||n===88;return at(t.slice(u?2:1),u?16:10)}return ze(t)||e}function ye(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Xe(e.position):"start"in e||"end"in e?Xe(e):"line"in e||"column"in e?Ce(e):""}function Ce(e){return Ze(e&&e.line)+":"+Ze(e&&e.column)}function Xe(e){return Ce(e&&e.start)+"-"+Ce(e&&e.end)}function Ze(e){return e&&typeof e=="number"?e:1}const ft={}.hasOwnProperty,dt=function(e,r,t){return typeof r!="string"&&(t=r,r=void 0),_r(t)(Cr(Ir(t).document().write(Tr()(e,r,!0))))};function _r(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(He),autolinkProtocol:F,autolinkEmail:F,atxHeading:o(Le),blockQuote:o(ve),characterEscape:F,characterReference:F,codeFenced:o(Pe),codeFencedFenceInfo:p,codeFencedFenceMeta:p,codeIndented:o(Pe,p),codeText:o(mt,p),codeTextData:F,data:F,codeFlowValue:F,definition:o(gt),definitionDestinationString:p,definitionLabelString:p,definitionTitleString:p,emphasis:o(xt),hardBreakEscape:o(Oe),hardBreakTrailing:o(Oe),htmlFlow:o(je,p),htmlFlowData:F,htmlText:o(je,p),htmlTextData:F,image:o(kt),label:p,link:o(He),listItem:o(yt),listItemValue:I,listOrdered:o(Re,f),listUnordered:o(Re),paragraph:o(Ft),reference:ae,referenceString:p,resourceDestinationString:p,resourceTitleString:p,setextHeading:o(Le),strong:o(vt),thematicBreak:o(bt)},exit:{atxHeading:d(),atxHeadingSequence:w,autolink:d(),autolinkEmail:pe,autolinkProtocol:de,blockQuote:d(),characterEscapeValue:v,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ce,codeFenced:d(O),codeFencedFence:y,codeFencedFenceInfo:C,codeFencedFenceMeta:L,codeFlowValue:v,codeIndented:d(S),codeText:d(N),codeTextData:v,data:v,definition:d(),definitionDestinationString:x,definitionLabelString:B,definitionTitleString:P,emphasis:d(),hardBreakEscape:d(j),hardBreakTrailing:d(j),htmlFlow:d(A),htmlFlowData:v,htmlText:d(W),htmlTextData:v,image:d(ne),label:J,labelText:s,lineEnding:M,link:d(K),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:U,resourceDestinationString:re,resourceTitleString:l,resource:X,setextHeading:d(V),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};pt(r,(e||{}).mdastExtensions||[]);const t={};return n;function n(m){let k={type:"root",children:[]};const b={stack:[k],tokenStack:[],config:r,enter:a,exit:h,buffer:p,resume:g,setData:c,getData:i},z=[];let D=-1;for(;++D<m.length;)if(m[D][1].type==="listOrdered"||m[D][1].type==="listUnordered")if(m[D][0]==="enter")z.push(D);else{const Y=z.pop();D=u(m,Y,D)}for(D=-1;++D<m.length;){const Y=r[m[D][0]];ft.call(Y,m[D][1].type)&&Y[m[D][1].type].call(Object.assign({sliceSerialize:m[D][2].sliceSerialize},b),m[D][1])}if(b.tokenStack.length>0){const Y=b.tokenStack[b.tokenStack.length-1];(Y[1]||Ye).call(b,void 0,Y[0])}for(k.position={start:oe(m.length>0?m[0][1].start:{line:1,column:1,offset:0}),end:oe(m.length>0?m[m.length-2][1].end:{line:1,column:1,offset:0})},D=-1;++D<r.transforms.length;)k=r.transforms[D](k)||k;return k}function u(m,k,b){let z=k-1,D=-1,Y=!1,le,ie,me,ge;for(;++z<=b;){const H=m[z];if(H[1].type==="listUnordered"||H[1].type==="listOrdered"||H[1].type==="blockQuote"?(H[0]==="enter"?D++:D--,ge=void 0):H[1].type==="lineEndingBlank"?H[0]==="enter"&&(le&&!ge&&!D&&!me&&(me=z),ge=void 0):H[1].type==="linePrefix"||H[1].type==="listItemValue"||H[1].type==="listItemMarker"||H[1].type==="listItemPrefix"||H[1].type==="listItemPrefixWhitespace"||(ge=void 0),!D&&H[0]==="enter"&&H[1].type==="listItemPrefix"||D===-1&&H[0]==="exit"&&(H[1].type==="listUnordered"||H[1].type==="listOrdered")){if(le){let Se=z;for(ie=void 0;Se--;){const ue=m[Se];if(ue[1].type==="lineEnding"||ue[1].type==="lineEndingBlank"){if(ue[0]==="exit")continue;ie&&(m[ie][1].type="lineEndingBlank",Y=!0),ue[1].type="lineEnding",ie=Se}else if(!(ue[1].type==="linePrefix"||ue[1].type==="blockQuotePrefix"||ue[1].type==="blockQuotePrefixWhitespace"||ue[1].type==="blockQuoteMarker"||ue[1].type==="listItemIndent"))break}me&&(!ie||me<ie)&&(le._spread=!0),le.end=Object.assign({},ie?m[ie][1].start:H[1].end),m.splice(ie||z,0,["exit",le,H[2]]),z++,b++}H[1].type==="listItemPrefix"&&(le={type:"listItem",_spread:!1,start:Object.assign({},H[1].start),end:void 0},m.splice(z,0,["enter",le,H[2]]),z++,b++,me=void 0,ge=!0)}}return m[k][1]._spread=Y,b}function c(m,k){t[m]=k}function i(m){return t[m]}function o(m,k){return b;function b(z){a.call(this,m(z),z),k&&k.call(this,z)}}function p(){this.stack.push({type:"fragment",children:[]})}function a(m,k,b){return this.stack[this.stack.length-1].children.push(m),this.stack.push(m),this.tokenStack.push([k,b]),m.position={start:oe(k.start)},m}function d(m){return k;function k(b){m&&m.call(this,b),h.call(this,b)}}function h(m,k){const b=this.stack.pop(),z=this.tokenStack.pop();if(z)z[0].type!==m.type&&(k?k.call(this,m,z[0]):(z[1]||Ye).call(this,m,z[0]));else throw new Error("Cannot close `"+m.type+"` ("+ye({start:m.start,end:m.end})+"): it’s not open");return b.position.end=oe(m.end),b}function g(){return zt(this.stack.pop())}function f(){c("expectingFirstListItemValue",!0)}function I(m){if(i("expectingFirstListItemValue")){const k=this.stack[this.stack.length-2];k.start=Number.parseInt(this.sliceSerialize(m),10),c("expectingFirstListItemValue")}}function C(){const m=this.resume(),k=this.stack[this.stack.length-1];k.lang=m}function L(){const m=this.resume(),k=this.stack[this.stack.length-1];k.meta=m}function y(){i("flowCodeInside")||(this.buffer(),c("flowCodeInside",!0))}function O(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),c("flowCodeInside")}function S(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m.replace(/(\r?\n|\r)$/g,"")}function B(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase()}function P(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function x(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function w(m){const k=this.stack[this.stack.length-1];if(!k.depth){const b=this.sliceSerialize(m).length;k.depth=b}}function R(){c("setextHeadingSlurpLineEnding",!0)}function q(m){const k=this.stack[this.stack.length-1];k.depth=this.sliceSerialize(m).charCodeAt(0)===61?1:2}function V(){c("setextHeadingSlurpLineEnding")}function F(m){const k=this.stack[this.stack.length-1];let b=k.children[k.children.length-1];(!b||b.type!=="text")&&(b=St(),b.position={start:oe(m.start)},k.children.push(b)),this.stack.push(b)}function v(m){const k=this.stack.pop();k.value+=this.sliceSerialize(m),k.position.end=oe(m.end)}function M(m){const k=this.stack[this.stack.length-1];if(i("atHardBreak")){const b=k.children[k.children.length-1];b.position.end=oe(m.end),c("atHardBreak");return}!i("setextHeadingSlurpLineEnding")&&r.canContainEols.includes(k.type)&&(F.call(this,m),v.call(this,m))}function j(){c("atHardBreak",!0)}function A(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function W(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function N(){const m=this.resume(),k=this.stack[this.stack.length-1];k.value=m}function K(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function ne(){const m=this.stack[this.stack.length-1];if(i("inReference")){const k=i("referenceType")||"shortcut";m.type+="Reference",m.referenceType=k,delete m.url,delete m.title}else delete m.identifier,delete m.label;c("referenceType")}function s(m){const k=this.sliceSerialize(m),b=this.stack[this.stack.length-2];b.label=zr(k),b.identifier=he(k).toLowerCase()}function J(){const m=this.stack[this.stack.length-1],k=this.resume(),b=this.stack[this.stack.length-1];if(c("inReference",!0),b.type==="link"){const z=m.children;b.children=z}else b.alt=k}function re(){const m=this.resume(),k=this.stack[this.stack.length-1];k.url=m}function l(){const m=this.resume(),k=this.stack[this.stack.length-1];k.title=m}function X(){c("inReference")}function ae(){c("referenceType","collapsed")}function U(m){const k=this.resume(),b=this.stack[this.stack.length-1];b.label=k,b.identifier=he(this.sliceSerialize(m)).toLowerCase(),c("referenceType","full")}function fe(m){c("characterReferenceType",m.type)}function ce(m){const k=this.sliceSerialize(m),b=i("characterReferenceType");let z;b?(z=at(k,b==="characterReferenceMarkerNumeric"?10:16),c("characterReferenceType")):z=ze(k);const D=this.stack.pop();D.value+=z,D.position.end=oe(m.end)}function de(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url=this.sliceSerialize(m)}function pe(m){v.call(this,m);const k=this.stack[this.stack.length-1];k.url="mailto:"+this.sliceSerialize(m)}function ve(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function mt(){return{type:"inlineCode",value:""}}function gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function xt(){return{type:"emphasis",children:[]}}function Le(){return{type:"heading",depth:void 0,children:[]}}function Oe(){return{type:"break"}}function je(){return{type:"html",value:""}}function kt(){return{type:"image",title:null,url:"",alt:null}}function He(){return{type:"link",title:null,url:"",children:[]}}function Re(m){return{type:"list",ordered:m.type==="listOrdered",start:null,spread:m._spread,children:[]}}function yt(m){return{type:"listItem",spread:m._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function bt(){return{type:"thematicBreak"}}}function oe(e){return{line:e.line,column:e.column,offset:e.offset}}function pt(e,r){let t=-1;for(;++t<r.length;){const n=r[t];Array.isArray(n)?pt(e,n):Br(e,n)}}function Br(e,r){let t;for(t in r)if(ft.call(r,t)){if(t==="canContainEols"){const n=r[t];n&&e[t].push(...n)}else if(t==="transforms"){const n=r[t];n&&e[t].push(...n)}else if(t==="enter"||t==="exit"){const n=r[t];n&&Object.assign(e[t],n)}}}function Ye(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+ye({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+ye({start:r.start,end:r.end})+") is still open")}function Mr(e){const r=e.replace(/\n{2,}/g,`
4
4
  `);return Ct(r)}function Pr(e){const r=Mr(e),{children:t}=dt(r),n=[[]];let u=0;function c(i,o="normal"){i.type==="text"?i.value.split(`