@bigduu/lotus 2026.5.12 → 2026.5.13

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 (97) hide show
  1. package/dist/assets/{App-D9R-_Pem.css → App-DNZiQHSs.css} +1 -1
  2. package/dist/assets/App-bVqmFSlk.js +224 -0
  3. package/dist/assets/{FeatureGuide-BNBq_PLn.js → FeatureGuide-BlFyQEho.js} +1 -1
  4. package/dist/assets/MetricsService-PUxHq4VE.js +1 -0
  5. package/dist/assets/SubAgentsPanel-B1pN_aEg.js +1 -0
  6. package/dist/assets/{_baseUniq-DVrw3Tro.js → _baseUniq-Rkm-pzcz.js} +1 -1
  7. package/dist/assets/{architectureDiagram-Q4EWVU46-BZE_2gaA.js → architectureDiagram-Q4EWVU46-Dr89vzdU.js} +1 -1
  8. package/dist/assets/{blockDiagram-DXYQGD6D-CI8uSrzU.js → blockDiagram-DXYQGD6D-TGOxvREa.js} +1 -1
  9. package/dist/assets/{c4Diagram-AHTNJAMY-DYfj69gY.js → c4Diagram-AHTNJAMY-CBv5o-M1.js} +1 -1
  10. package/dist/assets/{chunk-4BX2VUAB-Cw-2rap4.js → chunk-4BX2VUAB-CxLevY_l.js} +1 -1
  11. package/dist/assets/{chunk-4TB4RGXK-jxTPHq0D.js → chunk-4TB4RGXK-CZ85N7UX.js} +1 -1
  12. package/dist/assets/{chunk-55IACEB6-DmAIxchJ.js → chunk-55IACEB6-CyMcswjM.js} +1 -1
  13. package/dist/assets/{chunk-EDXVE4YY-FvClTRCF.js → chunk-EDXVE4YY-KspsFgAM.js} +1 -1
  14. package/dist/assets/{chunk-FMBD7UC4-Dv-f6b4O.js → chunk-FMBD7UC4-BH440Lco.js} +1 -1
  15. package/dist/assets/{chunk-OYMX7WX6-CUAa_Yz6.js → chunk-OYMX7WX6-D5KuKqj-.js} +1 -1
  16. package/dist/assets/{chunk-QZHKN3VN-D1FDs1aQ.js → chunk-QZHKN3VN-CYjk1VsY.js} +1 -1
  17. package/dist/assets/{chunk-YZCP3GAM-C2iPLYG9.js → chunk-YZCP3GAM-D1Ua-1JA.js} +1 -1
  18. package/dist/assets/classDiagram-6PBFFD2Q-D76pdmuK.js +1 -0
  19. package/dist/assets/classDiagram-v2-HSJHXN6E-D76pdmuK.js +1 -0
  20. package/dist/assets/clone-L6_2PEie.js +1 -0
  21. package/dist/assets/{cose-bilkent-S5V4N54A-CidaofdU.js → cose-bilkent-S5V4N54A-DBcT_Wx0.js} +1 -1
  22. package/dist/assets/{dagre-KV5264BT-B5okAMLc.js → dagre-KV5264BT-DXZkFF5A.js} +1 -1
  23. package/dist/assets/{diagram-5BDNPKRD-DqlBY-17.js → diagram-5BDNPKRD-BsQPI1ko.js} +1 -1
  24. package/dist/assets/{diagram-G4DWMVQ6-BuAFDD-X.js → diagram-G4DWMVQ6-BO9UfQRh.js} +1 -1
  25. package/dist/assets/{diagram-MMDJMWI5-CFv_32_w.js → diagram-MMDJMWI5-DkWy2py4.js} +1 -1
  26. package/dist/assets/{diagram-TYMM5635-CEU-9NCq.js → diagram-TYMM5635-DkuaI_3A.js} +1 -1
  27. package/dist/assets/en-US-CnZu52UQ.js +3 -0
  28. package/dist/assets/{erDiagram-SMLLAGMA-BGcZ-Hfc.js → erDiagram-SMLLAGMA-5BQBJx-k.js} +1 -1
  29. package/dist/assets/{flowDiagram-DWJPFMVM-CCSeCjR1.js → flowDiagram-DWJPFMVM-CBv8eO1S.js} +1 -1
  30. package/dist/assets/{ganttDiagram-T4ZO3ILL-BqAoxnNO.js → ganttDiagram-T4ZO3ILL-CkWwjmoY.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-UUTBAWPF-DJ0V7_Rv.js → gitGraphDiagram-UUTBAWPF-Cq7iSNVm.js} +1 -1
  32. package/dist/assets/{graph-BxbYGKIB.js → graph-DP71R45G.js} +1 -1
  33. package/dist/assets/index-BBEDlZ5R.js +1 -0
  34. package/dist/assets/index-Bcpx4-c6.js +1 -0
  35. package/dist/assets/{index-DvyQfHOQ.js → index-BfCdANOc.js} +1 -1
  36. package/dist/assets/index-C1smAwgR.js +1 -0
  37. package/dist/assets/index-CIgS9N5-.js +1 -0
  38. package/dist/assets/index-CWTKRCxw.js +21 -0
  39. package/dist/assets/index-D9ODTr93.css +1 -0
  40. package/dist/assets/index-Dyeykeg3.js +8 -0
  41. package/dist/assets/index-GggL5P0b.js +1 -0
  42. package/dist/assets/index-Y7yrhp6h.js +1 -0
  43. package/dist/assets/{index-B-HCj2Sv.js → index-YqZv5PIH.js} +1 -1
  44. package/dist/assets/index-ZWAEbTDI.js +1 -0
  45. package/dist/assets/index-oQX-HGAT.js +1 -0
  46. package/dist/assets/index-rcVNW1p_.js +1 -0
  47. package/dist/assets/{index.es-BhiHSeCT.js → index.es-usLOUMSp.js} +1 -1
  48. package/dist/assets/{infoDiagram-42DDH7IO-Cemw9omR.js → infoDiagram-42DDH7IO-Cs719lD3.js} +1 -1
  49. package/dist/assets/{ishikawaDiagram-UXIWVN3A-BYRE-suN.js → ishikawaDiagram-UXIWVN3A-zTI5fHSR.js} +1 -1
  50. package/dist/assets/{journeyDiagram-VCZTEJTY-BRkAfzxG.js → journeyDiagram-VCZTEJTY-DINdIE0t.js} +1 -1
  51. package/dist/assets/{kanban-definition-6JOO6SKY-DrTcKNPa.js → kanban-definition-6JOO6SKY-BWZUu9_H.js} +1 -1
  52. package/dist/assets/{layout-B2E_GeCC.js → layout-QZEMSKRD.js} +1 -1
  53. package/dist/assets/main-BEVjNwcv.js +8 -0
  54. package/dist/assets/{min-5KBdYKFY.js → min-BB314uX0.js} +1 -1
  55. package/dist/assets/{mindmap-definition-QFDTVHPH-sq4qw8uy.js → mindmap-definition-QFDTVHPH-GgqTvonx.js} +1 -1
  56. package/dist/assets/{pieDiagram-DEJITSTG-C8vOtX53.js → pieDiagram-DEJITSTG-wmUFaxVG.js} +1 -1
  57. package/dist/assets/{quadrantDiagram-34T5L4WZ-LV5yQE3M.js → quadrantDiagram-34T5L4WZ-Bt7Nxjyo.js} +1 -1
  58. package/dist/assets/{requirementDiagram-MS252O5E-Bq6y8VCF.js → requirementDiagram-MS252O5E-4eb0TnXV.js} +1 -1
  59. package/dist/assets/{sankeyDiagram-XADWPNL6-DvABiNaK.js → sankeyDiagram-XADWPNL6-H6jXqw4X.js} +1 -1
  60. package/dist/assets/{sequenceDiagram-FGHM5R23-Bv9Ckauz.js → sequenceDiagram-FGHM5R23-DgqfEZPw.js} +1 -1
  61. package/dist/assets/{stateDiagram-FHFEXIEX-CwYUsnc5.js → stateDiagram-FHFEXIEX-CZrwRbTi.js} +1 -1
  62. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CwhUMrAy.js +1 -0
  63. package/dist/assets/{timeline-definition-GMOUNBTQ-BgidC49j.js → timeline-definition-GMOUNBTQ-CMjl6c48.js} +1 -1
  64. package/dist/assets/vendor-antd-C8lKwvI6.js +502 -0
  65. package/dist/assets/{vendor-charts-BYce7JXy.js → vendor-charts-bhMup2Pu.js} +1 -1
  66. package/dist/assets/{vendor-markdown-DzaXAW9Q.js → vendor-markdown-DZuK0SxV.js} +1 -1
  67. package/dist/assets/{vendor-mermaid-De-Yacw-.js → vendor-mermaid-C1Gk9PtT.js} +4 -4
  68. package/dist/assets/{vendor-pdf-DHgAFQ2M.js → vendor-pdf-DB-djSmA.js} +4 -4
  69. package/dist/assets/{vennDiagram-DHZGUBPP-Bzkbjibi.js → vennDiagram-DHZGUBPP-CJuHv1C-.js} +1 -1
  70. package/dist/assets/{wardley-RL74JXVD-CBRp4POe.js → wardley-RL74JXVD-3f0MBifK.js} +1 -1
  71. package/dist/assets/{wardleyDiagram-NUSXRM2D-DAhT4-uz.js → wardleyDiagram-NUSXRM2D-DsfJX8FP.js} +1 -1
  72. package/dist/assets/{xychartDiagram-5P7HB3ND-CXfA4uSx.js → xychartDiagram-5P7HB3ND-DnywOWSH.js} +1 -1
  73. package/dist/assets/zh-CN-NcKxgANL.js +3 -0
  74. package/dist/index.html +4 -4
  75. package/package.json +2 -2
  76. package/dist/assets/App-D0lPE9xB.js +0 -223
  77. package/dist/assets/SubAgentsPanel-Cd3hI6oA.js +0 -1
  78. package/dist/assets/classDiagram-6PBFFD2Q-DVvX4wPS.js +0 -1
  79. package/dist/assets/classDiagram-v2-HSJHXN6E-DVvX4wPS.js +0 -1
  80. package/dist/assets/clone-DRAA6Q7k.js +0 -1
  81. package/dist/assets/en-US-DLwJLted.js +0 -3
  82. package/dist/assets/index-BEkwZ-K8.js +0 -1
  83. package/dist/assets/index-BJ91JKHM.js +0 -1
  84. package/dist/assets/index-BU7SwU12.js +0 -1
  85. package/dist/assets/index-CZebUuvC.js +0 -1
  86. package/dist/assets/index-CjawVLpi.js +0 -1
  87. package/dist/assets/index-CucuFwVZ.css +0 -1
  88. package/dist/assets/index-D6i0E0ol.js +0 -8
  89. package/dist/assets/index-DMuHtlMb.js +0 -1
  90. package/dist/assets/index-DYN0Kom_.js +0 -1
  91. package/dist/assets/index-DaK9qR94.js +0 -1
  92. package/dist/assets/index-sP4t2bcu.js +0 -1
  93. package/dist/assets/index-t4uyozr6.js +0 -21
  94. package/dist/assets/main-C9Xbnb0p.js +0 -6
  95. package/dist/assets/stateDiagram-v2-QKLJ7IA2-aegiqwuH.js +0 -1
  96. package/dist/assets/vendor-antd-DODjfilb.js +0 -502
  97. package/dist/assets/zh-CN-B74Ip0pW.js +0 -3
@@ -1,4 +1,4 @@
1
- var Ah=Object.defineProperty;var $h=(t,e,r)=>e in t?Ah(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Jt=(t,e,r)=>$h(t,typeof e!="symbol"?e+"":e,r);import{c7 as Ch,_ as St}from"./vendor-mermaid-De-Yacw-.js";import{m as Gt,f as Sh,d as wh}from"./min-5KBdYKFY.js";import{b as kh,l as bh,c as _h,m as Nh,r as vc,n as xs}from"./_baseUniq-DVrw3Tro.js";import{e as Ih}from"./vendor-i18n-BNURlJ23.js";function Ph(t,e){return kh(Gt(t,e))}function Oh(t,e){return t&&t.length?bh(t,_h(e)):[]}function Fe(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ut(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Qt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Lh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Jn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Af{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Fe(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Ii(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function $f(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Cf(t){return Ii(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ze})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=xh(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Ze:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ze})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(Za(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ze})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(Za(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ze})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ze:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ze})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function xh(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Za(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Sf=new xe(()=>{},()=>Ze),Ze=Object.freeze({done:!0,value:void 0});function de(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(Za(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Ze)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];Za(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Ze}):Sf}class Jl extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ze})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(fo||(fo={}));function ho(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Fe(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&ho(i,e))}):Fe(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&ho(n,e)))}function vs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ma(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ma(t){for(;t.$container;)t=t.$container;return t}function Ec(t){return ut(t)?t.ref?[t.ref]:[]:Qt(t)?t.items.map(e=>e.ref):[]}function Zl(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Fe(a)){if(n.keyIndex++,Ac(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Fe(o)&&Ac(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Ze})}function qi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e),{includeRoot:!0})}function Ac(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?ip(r,e):!1}function Qa(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(ut(n)||Qt(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(ut(a)||Qt(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Ze})}function Dh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=wf(i.defaultValue))}function wf(t){return Array.isArray(t)?[...t.map(wf)]:t}const Je={$type:"AbstractElement",cardinality:"cardinality"};function Mh(t){return J.isInstance(t,Je.$type)}const Fa={$type:"AbstractParserRule"};function Bi(t){return J.isInstance(t,Fa.$type)}const ga={$type:"AbstractRule"},ot={$type:"AbstractType"},vr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Es(t){return J.isInstance(t,vr.$type)}const Ga={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function kf(t){return J.isInstance(t,Ga.$type)}const $c={$type:"ArrayLiteral",elements:"elements"},Cc={$type:"ArrayType",elementType:"elementType"},Er={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function br(t){return J.isInstance(t,Er.$type)}const po={$type:"BooleanLiteral",true:"true"};function Fh(t){return J.isInstance(t,po.$type)}const Ar={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Gh(t){return J.isInstance(t,Ar.$type)}const Fr={$type:"Condition"},ja={$type:"Conjunction",left:"left",right:"right"};function jh(t){return J.isInstance(t,ja.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function As(t){return J.isInstance(t,$r.$type)}const za={$type:"Disjunction",left:"left",right:"right"};function zh(t){return J.isInstance(t,za.$type)}const mo={$type:"EndOfFile",cardinality:"cardinality"};function Uh(t){return J.isInstance(t,mo.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Sc={$type:"GrammarImport",path:"path"},Br={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Ql(t){return J.isInstance(t,Br.$type)}const go={$type:"InferredType",name:"name"};function bf(t){return J.isInstance(t,go.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function es(t){return J.isInstance(t,Lt.$type)}const Ds={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},wc={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function qh(t){return J.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function _r(t){return J.isInstance(t,Ai.$type)}const ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},Wr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Bh(t){return J.isInstance(t,Wr.$type)}const yo={$type:"Negation",value:"value"};function Wh(t){return J.isInstance(t,yo.$type)}const kc={$type:"NumberLiteral",value:"value"},Ta={$type:"Parameter",name:"name"},To={$type:"ParameterReference",parameter:"parameter"};function Vh(t){return J.isInstance(t,To.$type)}const pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Bt(t){return J.isInstance(t,pt.$type)}const Ms={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Vr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Kh(t){return J.isInstance(t,Vr.$type)}const Ro={$type:"ReturnType",name:"name"};function Hh(t){return J.isInstance(t,Ro.$type)}const Kr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Nr(t){return J.isInstance(t,Kr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Xh(t){return J.isInstance(t,$i.$type)}const bc={$type:"StringLiteral",value:"value"},Hr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Yh(t){return J.isInstance(t,Hr.$type)}const rt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Xr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Jh(t){return J.isInstance(t,Xr.$type)}const Zt={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Wt(t){return J.isInstance(t,Zt.$type)}const Yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zh(t){return J.isInstance(t,Yr.$type)}const Ua={$type:"Type",name:"name",type:"type"};function Qh(t){return J.isInstance(t,Ua.$type)}const Zn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Qn={$type:"TypeDefinition"},_c={$type:"UnionType",types:"types"},qa={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _f(t){return J.isInstance(t,qa.$type)}const Jr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ep(t){return J.isInstance(t,Jr.$type)}const ei={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function tp(t){return J.isInstance(t,Ci.$type)}class Nf extends Af{constructor(){super(...arguments),this.types={AbstractElement:{name:Je.$type,properties:{cardinality:{name:Je.cardinality}},superTypes:[]},AbstractParserRule:{name:Fa.$type,properties:{},superTypes:[ga.$type,ot.$type]},AbstractRule:{name:ga.$type,properties:{},superTypes:[]},AbstractType:{name:ot.$type,properties:{},superTypes:[]},Action:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},feature:{name:vr.feature},inferredType:{name:vr.inferredType},operator:{name:vr.operator},type:{name:vr.type,referenceType:ot.$type}},superTypes:[Je.$type]},Alternatives:{name:Ga.$type,properties:{cardinality:{name:Ga.cardinality},elements:{name:Ga.elements,defaultValue:[]}},superTypes:[Je.$type]},ArrayLiteral:{name:$c.$type,properties:{elements:{name:$c.elements,defaultValue:[]}},superTypes:[ei.$type]},ArrayType:{name:Cc.$type,properties:{elementType:{name:Cc.elementType}},superTypes:[Qn.$type]},Assignment:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},operator:{name:Er.operator},predicate:{name:Er.predicate},terminal:{name:Er.terminal}},superTypes:[Je.$type]},BooleanLiteral:{name:po.$type,properties:{true:{name:po.true,defaultValue:!1}},superTypes:[Fr.$type,ei.$type]},CharacterRange:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},left:{name:Ar.left},lookahead:{name:Ar.lookahead},parenthesized:{name:Ar.parenthesized,defaultValue:!1},right:{name:Ar.right}},superTypes:[rt.$type]},Condition:{name:Fr.$type,properties:{},superTypes:[]},Conjunction:{name:ja.$type,properties:{left:{name:ja.left},right:{name:ja.right}},superTypes:[Fr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:ot.$type}},superTypes:[Je.$type]},Disjunction:{name:za.$type,properties:{left:{name:za.left},right:{name:za.right}},superTypes:[Fr.$type]},EndOfFile:{name:mo.$type,properties:{cardinality:{name:mo.cardinality}},superTypes:[Je.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Sc.$type,properties:{path:{name:Sc.path}},superTypes:[]},Group:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},elements:{name:Br.elements,defaultValue:[]},guardCondition:{name:Br.guardCondition},predicate:{name:Br.predicate}},superTypes:[Je.$type]},InferredType:{name:go.$type,properties:{name:{name:go.name}},superTypes:[ot.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},InfixRuleOperatorList:{name:Ds.$type,properties:{associativity:{name:Ds.associativity},operators:{name:Ds.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:wc.$type,properties:{precedences:{name:wc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ot.$type}},superTypes:[ot.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Je.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:Ta.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},lookahead:{name:Wr.lookahead},parenthesized:{name:Wr.parenthesized,defaultValue:!1},terminal:{name:Wr.terminal}},superTypes:[rt.$type]},Negation:{name:yo.$type,properties:{value:{name:yo.value}},superTypes:[Fr.$type]},NumberLiteral:{name:kc.$type,properties:{value:{name:kc.value}},superTypes:[ei.$type]},Parameter:{name:Ta.$type,properties:{name:{name:Ta.name}},superTypes:[]},ParameterReference:{name:To.$type,properties:{parameter:{name:To.parameter,referenceType:Ta.$type}},superTypes:[Fr.$type]},ParserRule:{name:pt.$type,properties:{dataType:{name:pt.dataType},definition:{name:pt.definition},entry:{name:pt.entry,defaultValue:!1},fragment:{name:pt.fragment,defaultValue:!1},inferredType:{name:pt.inferredType},name:{name:pt.name},parameters:{name:pt.parameters,defaultValue:[]},returnType:{name:pt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},ReferenceType:{name:Ms.$type,properties:{isMulti:{name:Ms.isMulti,defaultValue:!1},referenceType:{name:Ms.referenceType}},superTypes:[Qn.$type]},RegexToken:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},lookahead:{name:Vr.lookahead},parenthesized:{name:Vr.parenthesized,defaultValue:!1},regex:{name:Vr.regex}},superTypes:[rt.$type]},ReturnType:{name:Ro.$type,properties:{name:{name:Ro.name}},superTypes:[]},RuleCall:{name:Kr.$type,properties:{arguments:{name:Kr.arguments,defaultValue:[]},cardinality:{name:Kr.cardinality},predicate:{name:Kr.predicate},rule:{name:Kr.rule,referenceType:ga.$type}},superTypes:[Je.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ot.$type}},superTypes:[Qn.$type]},StringLiteral:{name:bc.$type,properties:{value:{name:bc.value}},superTypes:[ei.$type]},TerminalAlternatives:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},elements:{name:Hr.elements,defaultValue:[]},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalElement:{name:rt.$type,properties:{cardinality:{name:rt.cardinality},lookahead:{name:rt.lookahead},parenthesized:{name:rt.parenthesized,defaultValue:!1}},superTypes:[Je.$type]},TerminalGroup:{name:Xr.$type,properties:{cardinality:{name:Xr.cardinality},elements:{name:Xr.elements,defaultValue:[]},lookahead:{name:Xr.lookahead},parenthesized:{name:Xr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalRule:{name:Zt.$type,properties:{definition:{name:Zt.definition},fragment:{name:Zt.fragment,defaultValue:!1},hidden:{name:Zt.hidden,defaultValue:!1},name:{name:Zt.name},type:{name:Zt.type}},superTypes:[ga.$type]},TerminalRuleCall:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1},rule:{name:Yr.rule,referenceType:Zt.$type}},superTypes:[rt.$type]},Type:{name:Ua.$type,properties:{name:{name:Ua.name},type:{name:Ua.type}},superTypes:[ot.$type]},TypeAttribute:{name:Zn.$type,properties:{defaultValue:{name:Zn.defaultValue},isOptional:{name:Zn.isOptional,defaultValue:!1},name:{name:Zn.name},type:{name:Zn.type}},superTypes:[]},TypeDefinition:{name:Qn.$type,properties:{},superTypes:[]},UnionType:{name:_c.$type,properties:{types:{name:_c.types,defaultValue:[]}},superTypes:[Qn.$type]},UnorderedGroup:{name:qa.$type,properties:{cardinality:{name:qa.cardinality},elements:{name:qa.elements,defaultValue:[]}},superTypes:[Je.$type]},UntilToken:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1},terminal:{name:Jr.terminal}},superTypes:[rt.$type]},ValueLiteral:{name:ei.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[rt.$type]}}}}const J=new Nf;function vo(t){return new Jl(t,e=>Ii(e)?e.content:[],{includeRoot:!0})}function rp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Eo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ts(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Mt||(Mt={}));function np(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function ip(t,e){return np(t,e)>Mt.After}const ap=/^[\w\p{L}]$/u;function sp(t,e){if(t){const r=op(t,!0);if(r&&Nc(r,e))return r;if(Cf(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(Nc(a,e))return a}}}}function Nc(t,e){return $f(t)&&e.includes(t.tokenType.name)}function op(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class If extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Wi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function Fs(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function ti(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Gr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function lp(){throw Error("Internal Error - Should never get here!")}function Ic(t){return t.type==="Character"}const rs=[];for(let t=U("0");t<=U("9");t++)rs.push(t);const ns=[U("_")].concat(rs);for(let t=U("a");t<=U("z");t++)ns.push(t);for(let t=U("A");t<=U("Z");t++)ns.push(t);const Pc=[U(" "),U("\f"),U(`
1
+ var Ah=Object.defineProperty;var $h=(t,e,r)=>e in t?Ah(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Jt=(t,e,r)=>$h(t,typeof e!="symbol"?e+"":e,r);import{c7 as Ch,_ as St}from"./vendor-mermaid-C1Gk9PtT.js";import{m as Gt,f as Sh,d as wh}from"./min-BB314uX0.js";import{b as kh,l as bh,c as _h,m as Nh,r as vc,n as xs}from"./_baseUniq-Rkm-pzcz.js";import{e as Ih}from"./vendor-i18n-BNURlJ23.js";function Ph(t,e){return kh(Gt(t,e))}function Oh(t,e){return t&&t.length?bh(t,_h(e)):[]}function Fe(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ut(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Qt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Lh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Jn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Af{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Fe(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Ii(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function $f(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Cf(t){return Ii(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ze})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=xh(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Ze:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ze})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(Za(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ze})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(Za(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ze})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ze:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ze})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function xh(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Za(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Sf=new xe(()=>{},()=>Ze),Ze=Object.freeze({done:!0,value:void 0});function de(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(Za(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Ze)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];Za(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Ze}):Sf}class Jl extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ze})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(fo||(fo={}));function ho(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Fe(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&ho(i,e))}):Fe(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&ho(n,e)))}function vs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ma(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ma(t){for(;t.$container;)t=t.$container;return t}function Ec(t){return ut(t)?t.ref?[t.ref]:[]:Qt(t)?t.items.map(e=>e.ref):[]}function Zl(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Fe(a)){if(n.keyIndex++,Ac(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Fe(o)&&Ac(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Ze})}function qi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e),{includeRoot:!0})}function Ac(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?ip(r,e):!1}function Qa(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(ut(n)||Qt(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(ut(a)||Qt(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Ze})}function Dh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=wf(i.defaultValue))}function wf(t){return Array.isArray(t)?[...t.map(wf)]:t}const Je={$type:"AbstractElement",cardinality:"cardinality"};function Mh(t){return J.isInstance(t,Je.$type)}const Fa={$type:"AbstractParserRule"};function Bi(t){return J.isInstance(t,Fa.$type)}const ga={$type:"AbstractRule"},ot={$type:"AbstractType"},vr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Es(t){return J.isInstance(t,vr.$type)}const Ga={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function kf(t){return J.isInstance(t,Ga.$type)}const $c={$type:"ArrayLiteral",elements:"elements"},Cc={$type:"ArrayType",elementType:"elementType"},Er={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function br(t){return J.isInstance(t,Er.$type)}const po={$type:"BooleanLiteral",true:"true"};function Fh(t){return J.isInstance(t,po.$type)}const Ar={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Gh(t){return J.isInstance(t,Ar.$type)}const Fr={$type:"Condition"},ja={$type:"Conjunction",left:"left",right:"right"};function jh(t){return J.isInstance(t,ja.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function As(t){return J.isInstance(t,$r.$type)}const za={$type:"Disjunction",left:"left",right:"right"};function zh(t){return J.isInstance(t,za.$type)}const mo={$type:"EndOfFile",cardinality:"cardinality"};function Uh(t){return J.isInstance(t,mo.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Sc={$type:"GrammarImport",path:"path"},Br={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Ql(t){return J.isInstance(t,Br.$type)}const go={$type:"InferredType",name:"name"};function bf(t){return J.isInstance(t,go.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function es(t){return J.isInstance(t,Lt.$type)}const Ds={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},wc={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function qh(t){return J.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function _r(t){return J.isInstance(t,Ai.$type)}const ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},Wr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Bh(t){return J.isInstance(t,Wr.$type)}const yo={$type:"Negation",value:"value"};function Wh(t){return J.isInstance(t,yo.$type)}const kc={$type:"NumberLiteral",value:"value"},Ta={$type:"Parameter",name:"name"},To={$type:"ParameterReference",parameter:"parameter"};function Vh(t){return J.isInstance(t,To.$type)}const pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Bt(t){return J.isInstance(t,pt.$type)}const Ms={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Vr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Kh(t){return J.isInstance(t,Vr.$type)}const Ro={$type:"ReturnType",name:"name"};function Hh(t){return J.isInstance(t,Ro.$type)}const Kr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Nr(t){return J.isInstance(t,Kr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Xh(t){return J.isInstance(t,$i.$type)}const bc={$type:"StringLiteral",value:"value"},Hr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Yh(t){return J.isInstance(t,Hr.$type)}const rt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Xr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Jh(t){return J.isInstance(t,Xr.$type)}const Zt={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Wt(t){return J.isInstance(t,Zt.$type)}const Yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zh(t){return J.isInstance(t,Yr.$type)}const Ua={$type:"Type",name:"name",type:"type"};function Qh(t){return J.isInstance(t,Ua.$type)}const Zn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Qn={$type:"TypeDefinition"},_c={$type:"UnionType",types:"types"},qa={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _f(t){return J.isInstance(t,qa.$type)}const Jr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ep(t){return J.isInstance(t,Jr.$type)}const ei={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function tp(t){return J.isInstance(t,Ci.$type)}class Nf extends Af{constructor(){super(...arguments),this.types={AbstractElement:{name:Je.$type,properties:{cardinality:{name:Je.cardinality}},superTypes:[]},AbstractParserRule:{name:Fa.$type,properties:{},superTypes:[ga.$type,ot.$type]},AbstractRule:{name:ga.$type,properties:{},superTypes:[]},AbstractType:{name:ot.$type,properties:{},superTypes:[]},Action:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},feature:{name:vr.feature},inferredType:{name:vr.inferredType},operator:{name:vr.operator},type:{name:vr.type,referenceType:ot.$type}},superTypes:[Je.$type]},Alternatives:{name:Ga.$type,properties:{cardinality:{name:Ga.cardinality},elements:{name:Ga.elements,defaultValue:[]}},superTypes:[Je.$type]},ArrayLiteral:{name:$c.$type,properties:{elements:{name:$c.elements,defaultValue:[]}},superTypes:[ei.$type]},ArrayType:{name:Cc.$type,properties:{elementType:{name:Cc.elementType}},superTypes:[Qn.$type]},Assignment:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},operator:{name:Er.operator},predicate:{name:Er.predicate},terminal:{name:Er.terminal}},superTypes:[Je.$type]},BooleanLiteral:{name:po.$type,properties:{true:{name:po.true,defaultValue:!1}},superTypes:[Fr.$type,ei.$type]},CharacterRange:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},left:{name:Ar.left},lookahead:{name:Ar.lookahead},parenthesized:{name:Ar.parenthesized,defaultValue:!1},right:{name:Ar.right}},superTypes:[rt.$type]},Condition:{name:Fr.$type,properties:{},superTypes:[]},Conjunction:{name:ja.$type,properties:{left:{name:ja.left},right:{name:ja.right}},superTypes:[Fr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:ot.$type}},superTypes:[Je.$type]},Disjunction:{name:za.$type,properties:{left:{name:za.left},right:{name:za.right}},superTypes:[Fr.$type]},EndOfFile:{name:mo.$type,properties:{cardinality:{name:mo.cardinality}},superTypes:[Je.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Sc.$type,properties:{path:{name:Sc.path}},superTypes:[]},Group:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},elements:{name:Br.elements,defaultValue:[]},guardCondition:{name:Br.guardCondition},predicate:{name:Br.predicate}},superTypes:[Je.$type]},InferredType:{name:go.$type,properties:{name:{name:go.name}},superTypes:[ot.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},InfixRuleOperatorList:{name:Ds.$type,properties:{associativity:{name:Ds.associativity},operators:{name:Ds.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:wc.$type,properties:{precedences:{name:wc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ot.$type}},superTypes:[ot.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Je.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:Ta.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},lookahead:{name:Wr.lookahead},parenthesized:{name:Wr.parenthesized,defaultValue:!1},terminal:{name:Wr.terminal}},superTypes:[rt.$type]},Negation:{name:yo.$type,properties:{value:{name:yo.value}},superTypes:[Fr.$type]},NumberLiteral:{name:kc.$type,properties:{value:{name:kc.value}},superTypes:[ei.$type]},Parameter:{name:Ta.$type,properties:{name:{name:Ta.name}},superTypes:[]},ParameterReference:{name:To.$type,properties:{parameter:{name:To.parameter,referenceType:Ta.$type}},superTypes:[Fr.$type]},ParserRule:{name:pt.$type,properties:{dataType:{name:pt.dataType},definition:{name:pt.definition},entry:{name:pt.entry,defaultValue:!1},fragment:{name:pt.fragment,defaultValue:!1},inferredType:{name:pt.inferredType},name:{name:pt.name},parameters:{name:pt.parameters,defaultValue:[]},returnType:{name:pt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},ReferenceType:{name:Ms.$type,properties:{isMulti:{name:Ms.isMulti,defaultValue:!1},referenceType:{name:Ms.referenceType}},superTypes:[Qn.$type]},RegexToken:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},lookahead:{name:Vr.lookahead},parenthesized:{name:Vr.parenthesized,defaultValue:!1},regex:{name:Vr.regex}},superTypes:[rt.$type]},ReturnType:{name:Ro.$type,properties:{name:{name:Ro.name}},superTypes:[]},RuleCall:{name:Kr.$type,properties:{arguments:{name:Kr.arguments,defaultValue:[]},cardinality:{name:Kr.cardinality},predicate:{name:Kr.predicate},rule:{name:Kr.rule,referenceType:ga.$type}},superTypes:[Je.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ot.$type}},superTypes:[Qn.$type]},StringLiteral:{name:bc.$type,properties:{value:{name:bc.value}},superTypes:[ei.$type]},TerminalAlternatives:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},elements:{name:Hr.elements,defaultValue:[]},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalElement:{name:rt.$type,properties:{cardinality:{name:rt.cardinality},lookahead:{name:rt.lookahead},parenthesized:{name:rt.parenthesized,defaultValue:!1}},superTypes:[Je.$type]},TerminalGroup:{name:Xr.$type,properties:{cardinality:{name:Xr.cardinality},elements:{name:Xr.elements,defaultValue:[]},lookahead:{name:Xr.lookahead},parenthesized:{name:Xr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalRule:{name:Zt.$type,properties:{definition:{name:Zt.definition},fragment:{name:Zt.fragment,defaultValue:!1},hidden:{name:Zt.hidden,defaultValue:!1},name:{name:Zt.name},type:{name:Zt.type}},superTypes:[ga.$type]},TerminalRuleCall:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1},rule:{name:Yr.rule,referenceType:Zt.$type}},superTypes:[rt.$type]},Type:{name:Ua.$type,properties:{name:{name:Ua.name},type:{name:Ua.type}},superTypes:[ot.$type]},TypeAttribute:{name:Zn.$type,properties:{defaultValue:{name:Zn.defaultValue},isOptional:{name:Zn.isOptional,defaultValue:!1},name:{name:Zn.name},type:{name:Zn.type}},superTypes:[]},TypeDefinition:{name:Qn.$type,properties:{},superTypes:[]},UnionType:{name:_c.$type,properties:{types:{name:_c.types,defaultValue:[]}},superTypes:[Qn.$type]},UnorderedGroup:{name:qa.$type,properties:{cardinality:{name:qa.cardinality},elements:{name:qa.elements,defaultValue:[]}},superTypes:[Je.$type]},UntilToken:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1},terminal:{name:Jr.terminal}},superTypes:[rt.$type]},ValueLiteral:{name:ei.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[rt.$type]}}}}const J=new Nf;function vo(t){return new Jl(t,e=>Ii(e)?e.content:[],{includeRoot:!0})}function rp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Eo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ts(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Mt||(Mt={}));function np(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function ip(t,e){return np(t,e)>Mt.After}const ap=/^[\w\p{L}]$/u;function sp(t,e){if(t){const r=op(t,!0);if(r&&Nc(r,e))return r;if(Cf(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(Nc(a,e))return a}}}}function Nc(t,e){return $f(t)&&e.includes(t.tokenType.name)}function op(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class If extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Wi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function Fs(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function ti(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Gr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function lp(){throw Error("Internal Error - Should never get here!")}function Ic(t){return t.type==="Character"}const rs=[];for(let t=U("0");t<=U("9");t++)rs.push(t);const ns=[U("_")].concat(rs);for(let t=U("a");t<=U("z");t++)ns.push(t);for(let t=U("A");t<=U("Z");t++)ns.push(t);const Pc=[U(" "),U("\f"),U(`
2
2
  `),U("\r"),U(" "),U("\v"),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U("\u2028"),U("\u2029"),U(" "),U(" "),U(" "),U("\uFEFF")],cp=/[0-9a-fA-F]/,Ra=/[0-9]/,up=/[1-9]/;class Pf{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":ti(n,"global");break;case"i":ti(n,"ignoreCase");break;case"m":ti(n,"multiLine");break;case"u":ti(n,"unicode");break;case"y":ti(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}Gr(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return lp()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Gr(r);break}if(!(e===!0&&r===void 0)&&Gr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Gr(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[U(`
3
3
  `),U("\r"),U("\u2028"),U("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=rs;break;case"D":e=rs,r=!0;break;case"s":e=Pc;break;case"S":e=Pc,r=!0;break;case"w":e=ns;break;case"W":e=ns,r=!0;break}if(Gr(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=U("\f");break;case"n":e=U(`
4
4
  `);break;case"r":e=U("\r");break;case"t":e=U(" ");break;case"v":e=U("\v");break}if(Gr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:U("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:U(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
@@ -1,4 +1,4 @@
1
- import{a4 as Lt,a5 as zt,ap as Xt,ao as At,a6 as Ct,a7 as Et,a8 as y,ab as et,aF as Tt,ac as Yt,av as Bt,a9 as H,af as Ft}from"./vendor-mermaid-De-Yacw-.js";import{p as Rt}from"./chunk-4BX2VUAB-Cw-2rap4.js";import{p as Ot}from"./wardley-RL74JXVD-CBRp4POe.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";import"./min-5KBdYKFY.js";import"./_baseUniq-DVrw3Tro.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),It=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Rt(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=It(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await Ot("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},F,Dt=(F=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(F,"WardleyBuilder"),F),P=new Dt;function N(a){const r=H();return Ft(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:zt,setAccDescription:Lt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,L;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((L=a.wardley)==null?void 0:L.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
1
+ import{a4 as Lt,a5 as zt,ap as Xt,ao as At,a6 as Ct,a7 as Et,a8 as y,ab as et,aF as Tt,ac as Yt,av as Bt,a9 as H,af as Ft}from"./vendor-mermaid-C1Gk9PtT.js";import{p as Rt}from"./chunk-4BX2VUAB-CxLevY_l.js";import{p as Ot}from"./wardley-RL74JXVD-3f0MBifK.js";import"./vendor-antd-C8lKwvI6.js";import"./vendor-i18n-BNURlJ23.js";import"./min-BB314uX0.js";import"./_baseUniq-Rkm-pzcz.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),It=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Rt(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=It(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await Ot("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},F,Dt=(F=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(F,"WardleyBuilder"),F),P=new Dt;function N(a){const r=H();return Ft(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:zt,setAccDescription:Lt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,L;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((L=a.wardley)==null?void 0:L.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
2
2
  `+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,L=Tt(r);L.selectAll("*").remove(),Yt(L,b,M,o.useMaxWidth),L.attr("viewBox",`0 0 ${M} ${b}`);const S=L.append("g").attr("class","wardley-map"),j=L.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const R=M-o.padding*2,O=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const C=y(t=>o.padding+t/100*R,"projectX"),E=y(t=>b-o.padding-t/100*O,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+R/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+O/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+O/2})`).text(bt);const I=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(I.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===I.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/I.length;I.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}I.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*R,f=o.padding+l.end*R,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+R*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-O*s).attr("y2",b-o.padding-O*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const X=(p+l)/2;$.x=X,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,X=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${X} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const z=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));z.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=z.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),z.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),z.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const X=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(X)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Nt=G.getBBox();$=Math.max($,Nt.height)});const X=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-X,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",X).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
3
3
  M ${s} ${i-l/2}
4
4
  L ${s+p-x} ${i-l/2}
@@ -1,4 +1,4 @@
1
- import{a4 as gi,a5 as xi,ap as Xt,ao as di,a6 as pi,a7 as fi,a8 as n,ab as Yt,aF as yi,ac as mi,av as bi,aA as St,af as Ai,aC as Nt,aD as wi,aJ as Ci,g as Bt,aK as Si,o as Wt,Q as zt}from"./vendor-mermaid-De-Yacw-.js";import"./vendor-antd-DODjfilb.js";import"./vendor-i18n-BNURlJ23.js";var bt=function(){var s=n(function(O,r,c,u){for(c=c||{},u=O.length;u--;c[O[u]]=r);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],l=[1,6],g=[1,7],b=[1,5,10,12,14,16,18,19,21,23,34,35,36],w=[1,25],L=[1,26],M=[1,28],R=[1,29],E=[1,30],z=[1,31],F=[1,32],D=[1,33],B=[1,34],p=[1,35],_=[1,36],h=[1,37],I=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],f=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],m=[1,64],P={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,c,u,x,A,o,ot){var d=o.length-1;switch(A){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:this.$=[Number(o[d-2]),...o[d]];break;case 21:this.$=[Number(o[d])];break;case 22:x.setXAxisTitle(o[d]);break;case 23:x.setXAxisTitle(o[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[d]);break;case 26:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 27:this.$=o[d-1];break;case 28:this.$=[o[d-2],...o[d]];break;case 29:this.$=[o[d]];break;case 30:x.setYAxisTitle(o[d]);break;case 31:x.setYAxisTitle(o[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 37:this.$={text:o[d],type:"text"};break;case 38:this.$={text:o[d],type:"text"};break;case 39:this.$={text:o[d],type:"markdown"};break;case 40:this.$=o[d];break;case 41:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:l,36:g}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:l,36:g}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:l,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(b,[2,34]),s(b,[2,35]),s(b,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:l,36:g}),{1:[2,3]},s(b,[2,5]),s(t,[2,7],{4:22,34:a,35:l,36:g}),{11:23,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:39,13:38,24:I,27:W,29:40,30:41,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:45,15:44,27:X,33:46,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:49,17:48,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:52,17:51,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{20:[1,53]},{22:[1,54]},s(C,[2,18]),{1:[2,2]},s(C,[2,8]),s(C,[2,9]),s(U,[2,37],{40:55,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h}),s(U,[2,38]),s(U,[2,39]),s(f,[2,40]),s(f,[2,42]),s(f,[2,43]),s(f,[2,44]),s(f,[2,45]),s(f,[2,46]),s(f,[2,47]),s(f,[2,48]),s(f,[2,49]),s(f,[2,50]),s(f,[2,51]),s(C,[2,10]),s(C,[2,22],{30:41,29:56,24:I,27:W}),s(C,[2,24]),s(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,11]),s(C,[2,30],{33:60,27:X}),s(C,[2,32]),{31:[1,61]},s(C,[2,12]),{17:62,24:Y},{25:63,27:m},s(C,[2,14]),{17:65,24:Y},s(C,[2,16]),s(C,[2,17]),s(f,[2,41]),s(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(C,[2,31]),{27:[1,69]},s(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(C,[2,15]),s(C,[2,26]),s(C,[2,27]),{11:59,32:72,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,33]),s(C,[2,19]),{25:73,27:m},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,c){if(c.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=c,u}},"parseError"),parse:n(function(r){var c=this,u=[0],x=[],A=[null],o=[],ot=this.table,d="",ct=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),k=Object.create(this.lexer),$={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&($.yy[pt]=this.yy[pt]);k.setInput(r,$.yy),$.yy.lexer=k,$.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var ft=k.yylloc;o.push(ft);var ci=k.options&&k.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){u.length=u.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||k.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=c.symbols_[v]||v),v}n(Vt,"lex");for(var T,q,V,yt,G={},ut,N,Mt,gt;;){if(q=u[u.length-1],this.defaultActions[q]?V=this.defaultActions[q]:((T===null||typeof T>"u")&&(T=Vt()),V=ot[q]&&ot[q][T]),typeof V>"u"||!V.length||!V[0]){var mt="";gt=[];for(ut in ot[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");k.showPosition?mt="Parse error on line "+(ct+1)+`:
1
+ import{a4 as gi,a5 as xi,ap as Xt,ao as di,a6 as pi,a7 as fi,a8 as n,ab as Yt,aF as yi,ac as mi,av as bi,aA as St,af as Ai,aC as Nt,aD as wi,aJ as Ci,g as Bt,aK as Si,o as Wt,Q as zt}from"./vendor-mermaid-C1Gk9PtT.js";import"./vendor-antd-C8lKwvI6.js";import"./vendor-i18n-BNURlJ23.js";var bt=function(){var s=n(function(O,r,c,u){for(c=c||{},u=O.length;u--;c[O[u]]=r);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],e=[1,3],a=[1,5],l=[1,6],g=[1,7],b=[1,5,10,12,14,16,18,19,21,23,34,35,36],w=[1,25],L=[1,26],M=[1,28],R=[1,29],E=[1,30],z=[1,31],F=[1,32],D=[1,33],B=[1,34],p=[1,35],_=[1,36],h=[1,37],I=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],f=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],m=[1,64],P={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:n(function(r,c,u,x,A,o,ot){var d=o.length-1;switch(A){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:this.$=[Number(o[d-2]),...o[d]];break;case 21:this.$=[Number(o[d])];break;case 22:x.setXAxisTitle(o[d]);break;case 23:x.setXAxisTitle(o[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[d]);break;case 26:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 27:this.$=o[d-1];break;case 28:this.$=[o[d-2],...o[d]];break;case 29:this.$=[o[d]];break;case 30:x.setYAxisTitle(o[d]);break;case 31:x.setYAxisTitle(o[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 37:this.$={text:o[d],type:"text"};break;case 38:this.$={text:o[d],type:"text"};break;case 39:this.$={text:o[d],type:"markdown"};break;case 40:this.$=o[d];break;case 41:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[s(t,i,{3:1,4:2,7:4,5:e,34:a,35:l,36:g}),{1:[3]},s(t,i,{4:2,7:4,3:8,5:e,34:a,35:l,36:g}),s(t,i,{4:2,7:4,6:9,3:10,5:e,8:[1,11],34:a,35:l,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},s(b,[2,34]),s(b,[2,35]),s(b,[2,36]),{1:[2,1]},s(t,i,{4:2,7:4,3:21,5:e,34:a,35:l,36:g}),{1:[2,3]},s(b,[2,5]),s(t,[2,7],{4:22,34:a,35:l,36:g}),{11:23,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:39,13:38,24:I,27:W,29:40,30:41,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:45,15:44,27:X,33:46,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:49,17:48,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{11:52,17:51,24:Y,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},{20:[1,53]},{22:[1,54]},s(C,[2,18]),{1:[2,2]},s(C,[2,8]),s(C,[2,9]),s(U,[2,37],{40:55,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h}),s(U,[2,38]),s(U,[2,39]),s(f,[2,40]),s(f,[2,42]),s(f,[2,43]),s(f,[2,44]),s(f,[2,45]),s(f,[2,46]),s(f,[2,47]),s(f,[2,48]),s(f,[2,49]),s(f,[2,50]),s(f,[2,51]),s(C,[2,10]),s(C,[2,22],{30:41,29:56,24:I,27:W}),s(C,[2,24]),s(C,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,11]),s(C,[2,30],{33:60,27:X}),s(C,[2,32]),{31:[1,61]},s(C,[2,12]),{17:62,24:Y},{25:63,27:m},s(C,[2,14]),{17:65,24:Y},s(C,[2,16]),s(C,[2,17]),s(f,[2,41]),s(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},s(C,[2,31]),{27:[1,69]},s(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},s(C,[2,15]),s(C,[2,26]),s(C,[2,27]),{11:59,32:72,37:24,38:w,39:L,40:27,41:M,42:R,43:E,44:z,45:F,46:D,47:B,48:p,49:_,50:h},s(C,[2,33]),s(C,[2,19]),{25:73,27:m},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:n(function(r,c){if(c.recoverable)this.trace(r);else{var u=new Error(r);throw u.hash=c,u}},"parseError"),parse:n(function(r){var c=this,u=[0],x=[],A=[null],o=[],ot=this.table,d="",ct=0,Et=0,hi=2,It=1,li=o.slice.call(arguments,1),k=Object.create(this.lexer),$={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&($.yy[pt]=this.yy[pt]);k.setInput(r,$.yy),$.yy.lexer=k,$.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var ft=k.yylloc;o.push(ft);var ci=k.options&&k.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(v){u.length=u.length-2*v,A.length=A.length-v,o.length=o.length-v}n(ui,"popStack");function Vt(){var v;return v=x.pop()||k.lex()||It,typeof v!="number"&&(v instanceof Array&&(x=v,v=x.pop()),v=c.symbols_[v]||v),v}n(Vt,"lex");for(var T,q,V,yt,G={},ut,N,Mt,gt;;){if(q=u[u.length-1],this.defaultActions[q]?V=this.defaultActions[q]:((T===null||typeof T>"u")&&(T=Vt()),V=ot[q]&&ot[q][T]),typeof V>"u"||!V.length||!V[0]){var mt="";gt=[];for(ut in ot[q])this.terminals_[ut]&&ut>hi&&gt.push("'"+this.terminals_[ut]+"'");k.showPosition?mt="Parse error on line "+(ct+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+gt.join(", ")+", got '"+(this.terminals_[T]||T)+"'":mt="Parse error on line "+(ct+1)+": Unexpected "+(T==It?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(mt,{text:k.match,token:this.terminals_[T]||T,line:k.yylineno,loc:ft,expected:gt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+T);switch(V[0]){case 1:u.push(T),A.push(k.yytext),o.push(k.yylloc),u.push(V[1]),T=null,Et=k.yyleng,d=k.yytext,ct=k.yylineno,ft=k.yylloc;break;case 2:if(N=this.productions_[V[1]][1],G.$=A[A.length-N],G._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ci&&(G._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),yt=this.performAction.apply(G,[d,Et,ct,$.yy,V[1],A,o].concat(li)),typeof yt<"u")return yt;N&&(u=u.slice(0,-1*N*2),A=A.slice(0,-1*N),o=o.slice(0,-1*N)),u.push(this.productions_[V[1]][0]),A.push(G.$),o.push(G._$),Mt=ot[u[u.length-2]][u[u.length-1]],u.push(Mt);break;case 3:return!0}}return!0},"parse")},S=function(){var O={EOF:1,parseError:n(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),setInput:n(function(r,c){return this.yy=c||this.yy||{},this._input=r,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},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var c=r.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var c=r.length,u=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),c=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -0,0 +1,3 @@
1
+ const e={translation:{app:{loading:"加载中...",retry:"重试",backendNotReachable:"无法连接后端 {{baseUrl}}(最近错误:{{message}})",errorBoundary:{title:"出了点问题",description:"此区域发生了意外错误。您可以重试,或者如果问题持续存在,请重新加载页面。",tryAgain:"重试",showDetails:"显示详情",hideDetails:"隐藏详情"},passwordGate:{title:"输入访问密码",description:"进入应用前需要先通过密码验证。",passwordLabel:"访问密码",passwordPlaceholder:"请输入访问密码",submit:"验证并继续",validation:{required:"请输入访问密码",verifyFailed:"密码验证失败"}},notifications:{toolApproval:{title:"需要审批:{{tool}}",body:"工具 {{tool}} 需要您的审批后才能执行",unknownTool:"未知工具"},contextPressure:{title:"上下文即将耗尽"},backgroundTask:{completedTitle:"后台任务完成",completedBody:"「{{title}}」已完成",completedFallback:"一个后台任务已完成"},clarification:{title:"Bodhi AI 需要您的回复",fallbackBody:"Agent 需要您回答一个问题"},conversationSummarized:"对话已摘要:压缩了 {{messages}} 条消息,节省了 {{tokens}} 个 token",allTasksCompleted:"所有任务已完成!总轮次:{{rounds}},工具调用:{{toolCalls}}",evaluatingTasks:"正在评估 {{count}} 个任务...",evaluationCompleteUpdated:"评估完成:已更新 {{count}} 个任务。",evaluationCompleteNoUpdates:"评估完成:无需更新"},defaultSessionTitle:"新建会话"},layout:{showSidebar:"显示侧边栏"},commandPalette:{searchPlaceholder:"搜索会话、设置和快捷操作",navigationHint:"使用 ↑↓ 导航,Enter 打开,Esc 关闭。",empty:"没有匹配的命令",groups:{quickActions:"快捷操作",settings:"系统设置"},badges:{quickAction:"操作",pinned:"置顶",running:"运行中",child:"子会话",childSession:"子会话",rootSession:"会话"},actions:{newSession:"创建新会话",openProviderSettings:"打开 Provider 设置",openMcpSettings:"打开 MCP 设置",openWorkflowSettings:"打开工作流设置",openSessionsSettings:"打开会话监控",openSchedulesSettings:"打开计划任务"},errors:{actionFailed:"命令执行失败"}},common:{cancel:"取消",ok:"确定",apply:"应用",save:"保存",delete:"删除",saveAnyway:"仍然保存",yes:"是",no:"否",home:"主页",parentDirectory:"上级目录",currentPath:"当前路径:",workspace:"工作区",server:"服务器:",category:"类别:",parameters:"参数",approve:"批准",reject:"拒绝",download:"下载",directory:"目录",file:"文件",close:"关闭",clear:"清除"},setup:{welcome:{heading:"欢迎使用 Bodhi",description:"Bodhi 是您的 AI 驱动开发助手。配置一个 AI 提供商即可开始,或直接进入应用。",providerHint:"要开始对话,您需要配置一个 AI 提供商(如 OpenAI、Anthropic)并提供 API 密钥。",proxyHint:"在公司代理后面?您可以稍后在系统设置 > 网络中配置代理。"},button:{getStarted:"开始使用",configureProvider:"配置 Provider"},complete:{title:"一切就绪!",restartMessage:"正在重新加载应用..."},error:{completeFailed:"完成设置失败,请重试。"}},onboarding:{welcome:{title:"欢迎使用 Bodhi!",description:"Bodhi 是您的 AI 驱动开发助手。让我们快速了解一下界面。"},newSession:{title:"新建会话",description:"点击这里开始一个与 AI 助手的新对话。"},taskTemplates:{title:"任务模板",description:"从预置模板中选择,如代码审查、Bug 调查、重构等,快速启动工作。"},modelPicker:{title:"模型选择",description:"随时在此切换 AI 模型和提供商。"},sidebar:{title:"会话侧边栏",description:"在此管理您的会话——搜索、过滤、置顶和切换对话。"},settings:{title:"设置",description:"配置 AI 提供商、代理设置、模型映射、MCP 服务器等。"}},chat:{sidebar:{newSession:"新建会话",createFailedTitle:"创建会话失败",createFailedUnknown:"未知错误",searchPlaceholder:"搜索会话",filters:{all:"全部",pinned:"置顶",running:"运行中",child:"子会话"},empty:{noSessions:"暂无会话",noMatches:"没有匹配的会话",hint:"点击「新建会话」开始",filterHint:"请尝试调整搜索词或筛选条件"},dateGroups:{today:"今天",yesterday:"昨天",thisWeek:"本周",thisMonth:"本月",pinned:"置顶",scheduled:"计划任务"},actions:{collapseChildren:"折叠子会话",expandChildren:"展开子会话"},delete:{title:"删除会话",confirm:"确定要删除这个会话吗?"},deleteByDate:{title:"删除 {{date}} 的会话",confirm:"确定要删除 {{date}} 的 {{count}} 个会话吗?"},newSessionWithPrompt:"基于 {{prompt}} 的新会话"},workspace:{modalTitle:"设置工作区路径",invalidTitle:"无效的工作区路径",issuesDetected:"检测到工作区路径的潜在问题:",confirmSaveInvalid:"您仍要保存此路径吗?",errorEnterPath:"请输入工作区路径",errorSaveFailed:"保存工作区路径失败",placeholder:"例如:/Users/alice/Workspace/MyProject",label:"工作区",browseFolder:"浏览文件夹",descriptionTitle:"工作区路径描述",descriptionP1:"设置工作区路径后,文件引用和工作区相关工具才能稳定地定位文件。",descriptionP2:"建议选择真实存在的项目目录。即使路径无效也可继续保存,但相关功能可能不可用。",checkTitle:"工作区路径检查",checkDescription:"工作区路径校验失败。",recentTitle:"最近工作区",suggestedTitle:"推荐工作区",noRecentWorkspaces:"暂无最近工作区",noSuggestions:"暂无推荐",defaultWorkspaceName:"工作区",validWorkspace:"工作区有效",fileCount:"{{count}} 个文件",folderSelected:"文件夹选择成功"},folderBrowser:{title:"选择工作区文件夹",selectCurrent:"选择当前文件夹",emptyFolder:"此文件夹为空",tip:"提示:点击文件夹进入,点击「选择当前文件夹」确认",readFolderError:"无法读取文件夹"},input:{placeholder:"发送消息...",placeholderWithReference:"发送消息(包含引用)",placeholderWithWorkflows:"发送消息...(输入 '/' 选择工作流)",toolCallsOnly:"仅工具调用(允许的工具:{{tools}})",autoPrefixMode:"自动前缀模式:{{prefix}}(输入 '/' 选择工具)",toolSpecificMode:"工具特定模式(允许的工具:{{tools}})",processingFiles:"正在处理文件…",dropImagesHere:"将图片拖放到此处",referencing:"引用中",addAttachments:"添加附件",referenceWorkspaceFiles:"引用工作区文件",imageCountSingular:"{{count}} 张图片",imageCountPlural:"{{count}} 张图片",moreImages:"还有 {{count}} 张",clearAllImages:"清除所有图片",charLimitExceeded:"消息超过了最大长度限制 {{max}} 个字符。",messageFormatInvalid:"消息格式不正确",filesAdded:"已添加 {{count}} 个文件",filesAttached:"已附加 {{count}} 个文件",reasoningTitle:"推理强度:{{label}}",reasoning:{low:"低",medium:"中",high:"高",xhigh:"很高",max:"最大"},strictToolOnlyMode:"严格仅工具模式",toolSpecificModeLabel:"工具特定模式",allowedTools:"允许的工具:",autoPrefixLabel:"自动前缀:{{prefix}}",mustStartWithPrefix:"消息必须以“{{prefix}}”开头"},actions:{regenerate:"重新生成响应",retryFailed:"重试失败的请求",retryOptions:"重试选项",cancelRequest:"取消请求",sendMessage:"发送消息",copyMessage:"复制消息",referenceMessage:"引用消息",unpin:"取消置顶",pin:"置顶",generateTitle:"生成 AI 标题",runProjectDream:"运行 Project Dream",runProjectDreamRunning:"正在运行 Project Dream...",runProjectDreamSuccess:"Project Dream 已更新",runProjectDreamNoChange:"无需更新 Project Dream",runProjectDreamFailed:"运行 Project Dream 失败"},prompt:{selectorTitle:"选择系统提示词",createButton:"创建新会话",helperText:"为 AI 选择一个基础系统提示词。您可以在系统设置中添加或编辑提示词。",emptyDescription:"未找到系统提示词。在系统设置中添加一个。",newSessionSelectorTitle:"为新会话选择系统提示词",defaultDescription:"默认系统提示词。",loadPresetsFailed:"加载预设失败",loadCurrentInfoFailed:"加载当前信息失败",systemCard:{title:"系统提示词",viewEnhanced:"查看增强版",viewBase:"查看基础版",copy:"复制",snapshotTitle:"提示快照",sections:{base:"基础提示",enhancement:"增强层",workspace:"工作区",instruction:"指令层",env:"环境变量",skills:"技能",toolGuide:"工具指引",dream:"Dream Notebook",sessionMemory:"会话记忆",externalMemory:"记忆层",taskList:"任务列表",effective:"最终提示词"}}},fileReference:{title:"@ 文件引用",setWorkspace:"设置工作区",noMatches:"未找到匹配的文件",emptyDirectory:"目录为空"},imagePreview:{counter:"第 {{current}} / {{total}} 张"},filePreview:{fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件"},commandSelector:{loading:"正在加载命令...",emptyWithSearch:"没有匹配“{{search}}”的命令",empty:"暂无可用命令。",navigationHint:"导航:上下键 或 Ctrl+P/N | 选择:Enter | 补全:Space/Tab | 取消:Esc",types:{workflow:"工作流",skill:"技能",mcp:"MCP"}},model:{selectModel:"选择模型",noModelSelected:"未选择模型",selectModelHint:"请选择一个模型后再开始对话。",providerNotConfigured:"提供商未配置",configureProviderHint:"请先在设置中配置提供商,然后再选择模型。",configureProvider:"配置提供商",openSettings:"打开设置",noModelsAvailable:"暂无可用模型",selectModelBeforeSend:"发送前请先选择模型。",selectModelBeforeRetry:"重试前请先选择模型。"},streaming:{assistant:"Bodhi",requestCancelled:"请求已取消",sendFailed:"发送消息失败",retryFailed:"重试请求失败",modelConfigNotLoaded:"模型配置尚未加载",agentUnavailable:"智能体不可用",noActiveChatTitle:"没有活动会话",noActiveChatSendContent:"发送前请先创建或选择一个会话。",noActiveChatRetryContent:"重试前请先创建或选择一个会话。",noChatIdTitle:"缺少会话 ID",noChatIdSendContent:"当前会话缺少 ID,请新建会话后再试。",noChatIdRetryContent:"当前会话缺少 ID,请新建会话后重试。"},selectionToolbar:{selectMessages:"选择消息",selectedCount:"已选择 {{selected}} 条(共 {{total}} 条)",selectAll:"全选",clear:"清空",exportMarkdown:"导出 Markdown",exportPdf:"导出 PDF",done:"完成"},scroll:{jumpToTop:"回到顶部",backToLatest:"回到最新消息",newMessages:"有新消息",newMessagesWithCount:"有 {{count}} 条新消息"},compression:{tag:"已压缩上下文",timelineDetail:"已归档 {{count}} 条消息",timelineAria:"{{time}},{{detail}}",tooltip:"最近一次压缩:{{time}},已归档 {{count}} 条消息",archivedShort:"已归档 {{count}} 条"},subAgents:{title:"子代理",expand:"展开",collapse:"收起",continue:"在此继续",open:"打开",retry:"重试",hiddenHint:"已隐藏 {{count}} 个子代理",runChildFailed:"运行子会话失败",continueChildFailed:"继续子会话失败",fallbackTitle:"子代理",statusRunning:"运行中",statusCompleted:"已完成",statusPending:"等待中",statusError:"错误",statusCancelled:"已取消",statusFailed:"失败",pinned:"已固定",heartbeat:"心跳",round:"轮次",summaryCompleted:"{{count}} 已完成",summaryRunning:"{{count}} 运行中",summaryPending:"{{count}} 等待中",summaryFailed:"{{count}} 失败"},chatItem:{edit:"编辑",childTag:"子会话"},systemPromptSelector:{defaultTag:"默认",hide:"隐藏",preview:"预览",copy:"复制",lines:"{{count}} 行",words:"{{count}} 词",chars:"{{count}} 字",noContent:"无内容"},title:{updated:"会话标题已更新",generateFailed:"生成会话标题失败"},respond:{customAnswerPlaceholder:"输入你的自定义回答..."},emptyLauncher:{title:"从任务开始",subtitle:"在当前分栏中创建一个聚焦会话,并先预填第一条消息,再由你决定是否发送。",hint:"不会自动发送,你可以先编辑提示词。",actions:{blank:{title:"空白会话",description:"使用默认助手从零开始,并保留空白输入框。",sessionTitle:"新建会话",prefill:""},codeReview:{title:"代码评审",description:"打开一个面向评审的会话,并预填可编辑的评审说明。",sessionTitle:"代码评审",prefill:"请审查这个工作区或仓库中的相关代码变更。先概述范围,再列出风险点、关键 diff,以及最值得优先修复的问题。"},tokenUsage:{title:"Token 使用调查",description:"诊断上下文膨胀、截断风险和 token 预算压力。",sessionTitle:"Token 使用调查",prefill:"请帮我分析这个会话或工作流的 token 使用、上下文增长和截断风险,归纳主要原因,并给出下一步最具体的优化建议。"}},errors:{createFailed:"创建会话失败"}},multiPane:{splitHorizontal:"水平拆分",splitVertical:"垂直拆分",closePane:"关闭分栏",selectSessionHint:"请选择一个会话查看消息",hoverToSplitHint:"将鼠标悬停在分栏上可进行拆分对比",selectMessagesToExport:"请选择要导出的消息"},messageCard:{authRequired:"需要身份验证",goToSettings:"前往设置",assistantThinking:"助手正在思考...",assistantCompactingContext:"助手正在压缩上下文...",assistantCompactingContextDegraded:"助手正在压缩上下文(降级模式)...",assistantCompactingContextFailed:"助手压缩上下文失败,继续处理中...",assistantUpdatingMemory:"助手正在更新记忆...",assistantRunningTool:"助手正在运行 {{tool}}...",reasoning:"推理",selected:"已选中",selectedTool:"已选工具"},messageActions:{copy:"复制",exportMarkdown:"导出 Markdown",exportPdf:"导出 PDF",restoreChat:"仅恢复会话",restoreFilesAndChat:"恢复文件和会话",deleteMessage:"删除消息",deleteFailed:"删除消息失败",deleteNotFound:"后端中找不到该消息,请刷新后重试",deleteConflict:"会话正在运行,请先停止后再删除",deleteBatchFailed:"共 {{total}} 条中有 {{failed}} 条删除失败",savedFile:"已保存到 {{filename}}",nothingToExport:"没有可导出的内容",exportFailed:"导出失败",cannotRestore:"无法恢复这条消息",restorePartial:"会话已恢复,但有 {{count}} 个文件未能恢复。",restoreFilesSuccess:"文件和会话已恢复(移除 {{count}} 条消息)。",restoreSuccess:"会话已恢复(移除 {{count}} 条消息)。",restoreFailed:"恢复会话失败",pdfUnavailable:"当前环境不支持导出 PDF",exportingPdf:"正在导出 PDF..."},session:{defaultTitle:"新建会话"},view:{roleUser:"你",roleAssistant:"助手",roleSystem:"系统",roleDefault:"消息",exportSaved:"已保存:{{filename}}",providerNotConfigured:"请先配置供应商",unknownError:"未知错误",workspacePathEmpty:"工作区路径不能为空",brandName:"Bodhi",subTitleUser:"提示词",chatMessagesAria:"聊天消息",aiRespondingAria:"AI 正在回复",noExportableMessages:"没有可导出的消息",noActiveChat:"没有活跃的对话",selectAtLeastOneMessage:"请至少选择一条消息"},statusRail:{idle:"就绪",thinking:"思考中…",runningTools:"正在调用工具…",waitingAnswer:"等待您的回答",runningChildren:"正在运行子代理…",completed:"已完成",error:"错误",childrenTooltip:"{{running}} 个子代理运行中"},systemPrompt:{preparing:"系统提示词正在准备中..."},home:{running:"运行中",justNow:"刚刚",minutesAgo:"{{count}}分钟前",hoursAgo:"{{count}}小时前",daysAgo:"{{count}}天前"}},settings:{page:{back:"返回",title:"系统设置",tabs:{config:"配置",prompts:"提示词",mermaid:"Mermaid",skills:"技能",workflows:"工作流",mcp:"MCP",modelLimits:"模型限制",metrics:"指标",schedules:"调度",sessions:"会话",app:"应用",provider:"提供商",hooks:"Hooks",masking:"脱敏",envVars:"环境变量"},groups:{ai:"AI",toolsAndExtensions:"工具与扩展",securityAndPrivacy:"安全",monitoring:"监控",system:"系统"}},notifications:{deleteAllSuccess:"已删除所有会话(置顶除外)",deleteEmptySuccess:"已删除空会话(置顶除外)",localStorageCleared:"本地存储已清空",resetSuccessReloading:"应用重置成功,正在重新加载...",resetFailed:"重置应用失败",promptEnhancementSaved:"系统提示增强已保存"},appTab:{switchOn:"开",switchOff:"关",darkMode:"深色模式",vdiSafeMode:"图形兼容模式",vdiSafeModeDesc:"禁用模糊和玻璃效果,这些效果在某些虚拟桌面、远程或图形受限的环境中可能导致下拉菜单和悬浮层异常。",vdiSafeModeEnabled:"已启用图形兼容模式",vdiSafeModeDisabled:"已关闭图形兼容模式",darkModeDark:"深色",darkModeLight:"浅色",language:"语言",languageEnglish:"English",languageChinese:"简体中文",languageTraditionalChinese:"繁體中文",languageFrench:"Français",languageJapanese:"日本語",languageHindi:"हिन्दी",deleteAllTitle:"删除所有会话",deleteAllDescription:"确认删除?将删除所有会话(置顶除外)。",deleteAllButton:"删除所有会话",deleteEmptyTitle:"删除空会话",deleteEmptyDescription:"确认删除?将删除没有消息内容的会话(置顶除外)。",deleteEmptyButton:"删除空会话",clearLocalStorageTitle:"清空本地存储",clearLocalStorageDescription:"确认清空?将删除所有本地存储数据并重置应用。",clearLocalStorageButton:"清空本地存储",confirmDeleteAll:"确认,全部删除",confirmDeleteEmpty:"确认,删除空会话",confirmClear:"确认,清空",cancel:"取消",dangerZone:"危险操作",dangerDescription:"以下操作不可撤销,所有数据将被永久删除。",resetApplicationTitle:"重置应用",resetApplicationIntro:"确认执行以下操作:",resetStepDeleteAllSessions:"删除所有会话(包括置顶)",resetStepClearStorage:"清空所有本地存储数据",resetStepResetConfig:"将 config.json 重置为默认值",resetStepSetupFlow:"下次启动时触发初始化流程",resetStepReplayGuide:"重播功能引导",resetStepReload:"重新加载应用",resetConfirm:"确认,重置全部",resetButton:"重置应用(清空全部数据)",runningVersion:"运行版本",runningVersionDesc:"当前运行的 Lotus 前端版本。"},configTab:{tabs:{general:"常规",tools:"工具"},loadConfigFailed:"加载配置失败",invalidConfig:"配置无效",saveConfigSuccess:"配置保存成功",saveConfigFailed:"保存配置失败",toolsLoadFailed:"加载可用工具失败",toolsReloadSuccess:"工具列表已刷新",toolsSaveSuccess:"工具设置保存成功",toolsSaveFailed:"保存工具设置失败",backendSaved:"后端地址已保存",backendResetDefault:"后端地址已重置为默认值",backendUrlEmpty:"后端地址不能为空",backendUrlInvalidProtocol:"后端地址必须以 http:// 或 https:// 开头",backendUrlInvalidUrl:"后端地址不是有效的 URL",backendUrlMustEndWithV1:'后端地址必须以 "/v1" 结尾',providerMovedTitle:"Provider 配置已迁移",providerMovedDescription:"GitHub Copilot 和其他 Provider 配置已迁移到 Provider Settings 标签页,请前往那里进行配置。",backendApiBaseUrlTitle:"后端 API 基础地址",backendApiPlaceholder:"http://127.0.0.1:9562/v1",backendApiHint:"必须包含 /v1 路径",accessPasswordTitle:"访问密码",accessPassword:{helperNotEnabled:"未设置访问密码。设置后,远程访问需要先输入密码,本地 loopback 访问可直接绕过。",helperLocalBypass:"当前是本地访问,可直接修改访问密码,无需输入当前密码。",helperRemote:"当前是远程访问。修改访问密码前,必须先输入当前密码。",loadStatusFailed:"加载访问状态失败",updated:"访问密码已更新",enabled:"访问密码已设置",updateFailed:"更新访问密码失败",statusEnabled:"访问密码已启用",statusDisabled:"访问密码未启用",currentPasswordLabel:"当前密码",newPasswordLabel:"新密码",setPasswordLabel:"设置密码",confirmPasswordLabel:"确认密码",updateAction:"更新访问密码",enableAction:"启用访问密码",validation:{currentPasswordRequired:"请输入当前密码",newPasswordRequired:"请输入新密码",confirmPasswordRequired:"请再次输入新密码",minLength:"密码长度至少 4 位",passwordMismatch:"两次输入的密码不一致"}},resetToDefault:"恢复默认",save:"保存",language:"语言",languageEnglish:"English",languageChinese:"简体中文",languageTraditionalChinese:"繁體中文",languageFrench:"Français",languageJapanese:"日本語",languageHindi:"हिन्दी",toolsTitle:"工具可用性",toolsDescription:"控制每个工具是否可以发送给 AI 模型。关闭后,该工具不会出现在模型可用工具列表中。",memoryTitle:"Memory 与 Auto Dream",memoryDescription:"管理 Bamboo 的记忆层:会话记忆用于当前工作连续性,长期记忆用于沉淀 durable knowledge,而 Auto Dream 负责在后台更新 Dream Notebook 并提取长期记忆候选项。",autoDreamEnabled:"启用 Auto Dream",autoDreamEnabledHint:"在后台自动维护 Dream Notebook,并提取长期记忆候选项。",backgroundModel:"后台记忆模型",backgroundModelPlaceholder:"留空则使用当前 Provider 的 fast model",backgroundModelHint:"可选的专用 memory summarization / reflection 模型。若留空,Bamboo 会回退到当前 Provider 的 fast model。",toolsEmpty:"当前没有可用工具。",reloadTools:"刷新工具列表",loadBambooConfigFailed:"加载 Bamboo 配置失败",bambooConfigSaved:"Bamboo 配置已保存",saveBambooConfigFailed:"保存 Bamboo 配置失败"},networkCard:{title:"网络设置",guideTip:"如果您在公司代理后面,可以在此配置 HTTP/HTTPS 代理和凭据。",httpProxy:"HTTP 代理",httpsProxy:"HTTPS 代理",proxyPlaceholder:"http://proxy.example.com:8080",proxyAuthTitle:"代理认证",proxyConfiguredForUser:"已为用户 {{username}} 配置认证",clearCredentials:"清除凭据",username:"用户名",password:"密码",apply:"应用",credentialsStorageNote:"代理凭据会加密存储在 ~/.bamboo/config.json",reload:"重新加载",save:"保存"},modelMappingCard:{loadProviderFailed:"加载 Provider 配置失败",loadMappingsFailed:"加载现有映射失败",loadModelsFailed:"加载模型失败",loadModelsHint:"加载模型失败,请检查 Provider 配置。",mappingSaved:"模型映射已保存",mappingSaveFailed:"保存模型映射失败",enterModelName:"请输入模型名称",customMappingSaved:"自定义模型映射已保存",customMappingSaveFailed:"保存自定义模型映射失败",collapseTitle:"Anthropic 模型映射",description:"配置当 Claude CLI 请求特定模型时,应该使用的 {{provider}} 模型。",loadModelsErrorTitle:"加载模型失败",retry:"重试",loadingModels:"模型加载中...",modelTypeOpus:"Opus",modelTypeOpusDescription:'匹配包含 "opus" 的模型',modelTypeSonnet:"Sonnet",modelTypeSonnetDescription:'匹配包含 "sonnet" 的模型',modelTypeHaiku:"Haiku",modelTypeHaikuDescription:'匹配包含 "haiku" 的模型',selectModelPlaceholder:"选择 {{label}} 模型",customModelOption:"自定义模型...",mappedModelNotFound:'映射模型 "{{model}}" 不在当前 Provider 的可用模型列表中',refreshModels:"刷新模型",currentProvider:"当前 Provider",loadingProvider:"加载中...",availableModels:"可用模型数量",cached:"(缓存)",storedIn:"存储位置",customModalTitle:"输入自定义模型名称",customModalDescription:"为 {{modelType}} 输入自定义模型名称",customModalPlaceholder:"例如:gpt-4-turbo-preview",customModalNote:"注意:请确认该模型名称对当前 Provider 有效。",save:"保存",cancel:"取消"},modelTab:{selectModelTitle:"选择模型",loadingModels:"正在加载模型...",selectModelPlaceholder:"请选择模型",backendApiBaseUrlTitle:"后端 API 基础地址",resetToDefault:"恢复默认",save:"保存",backendApiHint:"必须是包含 /v1 的完整基础地址(例如 {{example}})。"},mermaidTab:{title:"Mermaid 图表设置",description:"自定义 Mermaid 图在聊天中的渲染方式",themeCardTitle:"主题",themeLabel:"Mermaid 主题",themeTooltip:"选择内置 Mermaid 主题。Default 和 Neutral 会根据应用主题自动切换明暗。",themeOptions:{default:"Default(自动明/暗)",neutral:"Neutral(自动明/暗)",dark:"Dark",forest:"Forest(绿色调)",base:"Base(极简)"},themeDescriptionsTitle:"主题说明:",themeDescriptions:{default:"Default:经典 Mermaid 风格,自动适配明/暗主题",neutral:"Neutral:灰度风格,自动适配明/暗主题",dark:"Dark:始终使用暗色主题",forest:"Forest:绿色配色,适合技术图表",base:"Base:最小化样式,适合自定义主题"},globalCardTitle:"全局设置",fontSizeLabel:"字体大小",fontSizeTooltip:"图表文本的基础字号(像素)",defaultZoomLabel:"默认缩放",defaultZoomTooltip:"图表初始缩放比例(1.0 = 100%)",responsiveWidthLabel:"自适应宽度",responsiveWidthTooltip:"开启后图表会自适应容器宽度;关闭后使用固定宽度。",switchAuto:"自动",switchFixed:"固定",flowchartCardTitle:"流程图设置",flowchartNodeSpacingLabel:"节点间距",flowchartNodeSpacingTooltip:"节点之间的水平间距",flowchartRankSpacingLabel:"层级间距",flowchartRankSpacingTooltip:"层与层之间的垂直间距",flowchartCurveTypeLabel:"连线类型",flowchartCurveTypeTooltip:"连接线使用的曲线类型",flowchartCurveOptions:{basis:"平滑(Basis)",linear:"线性",cardinal:"Cardinal"},sequenceCardTitle:"时序图设置",sequenceActorMarginLabel:"参与者间距",sequenceActorMarginTooltip:"参与者之间的间距",sequenceMessageMarginLabel:"消息间距",sequenceMessageMarginTooltip:"消息之间的间距",sequenceActorWidthLabel:"参与者宽度",sequenceActorWidthTooltip:"每个参与者框的宽度",sequenceActorHeightLabel:"参与者高度",sequenceActorHeightTooltip:"每个参与者框的高度",ganttCardTitle:"甘特图设置",ganttBarHeightLabel:"任务条高度",ganttBarHeightTooltip:"每个任务条的高度",ganttTopPaddingLabel:"顶部留白",ganttTopPaddingTooltip:"图表顶部的留白间距",resetToDefaults:"恢复默认",previewTitle:"预览",previewDescription:"修改会立即生效。可新建或查看图表以查看效果。"},modelLimits:{title:"Token 预算模型限制",descriptionPrefix:"配置按模型划分的 token 上限。这些设置会全局保存到 Bamboo 的",descriptionSuffix:"并由后端解析器使用。",defaultsTitle:"模型默认值",defaultsDescription:"已预置 GPT-5 / GPT-4 / Gemini / Kimi / GLM 的上下文与输出默认值,可按需继续调整。",migratedFromLocalStorage:"已将本地存储中的模型限制迁移到全局配置。",loadFailed:"加载模型限制设置失败",saveSuccess:"模型限制已保存到全局配置",saveFailed:"保存模型限制设置失败",resetSuccess:"模型限制已恢复为产品默认值",resetFailed:"重置模型限制设置失败",defaults:{gpt54:"高阶推理能力,适合复杂任务。",gpt53Codex:"面向代码重构与工程场景优化。",gpt52Pro:"复杂任务下逻辑稳定性较强。",gpt5Mini:"速度快、成本低,适合通用任务。",gpt41:"经典大上下文模型,支持 1M 窗口。",gpt4o:"低延迟,适合日常对话。",gemini25Pro:"多模态分析能力较强。",kimiK25:"适合长文本中文内容处理。",kimiCoding:"针对编码场景优化。",glm5:"适合一次性大文档生成。"},columns:{vendor:"厂商/系列",model:"模型",contextWindow:"上下文窗口",maxOutput:"最大输出",notes:"备注",actions:"操作"},placeholders:{vendor:"OpenAI / Google / Moonshot",model:"例如 gpt-5.4-thinking",optional:"可选"},actions:{remove:"删除",addRow:"新增行",save:"保存",resetToDefaults:"恢复默认",reload:"重新加载"},validation:{atLeastOneRow:"至少保留一条模型限制记录。",modelPatternEmpty:"模型模式不能为空。",duplicateModelPattern:"模型模式重复:{{pattern}}",contextWindowMin:"{{pattern}} 的上下文窗口最小为 1000。",maxOutputMin:"{{pattern}} 的最大输出最小为 1。",maxOutputExceedsContext:"{{pattern}} 的最大输出必须小于或等于上下文窗口。",safetyMarginNegative:"{{pattern}} 的安全边距不能为负数。",safetyMarginTooLarge:"{{pattern}} 的安全边距必须小于上下文窗口。"}},common:{loading:"加载中...",successful:"成功",failed:"失败"},systemPromptManager:{title:"系统提示词管理",addButton:"添加提示词",defaultPromptLocked:"默认系统提示词已锁定,无法编辑。",updateSuccess:"提示词更新成功",addSuccess:"提示词添加成功",saveError:"保存提示词失败,请重试。",deleteSuccess:"提示词删除成功",deleteError:"删除提示词失败,请重试。",deleteConfirm:"确认删除此提示词吗?",defaultTag:"默认(锁定)",editTitle:"编辑系统提示词",addTitle:"新增系统提示词",nameLabel:"提示词名称",nameRequired:"请输入提示词名称!",descriptionLabel:"提示词描述",descriptionRequired:"请输入提示词描述!",contentLabel:"提示词内容",contentRequired:"请输入提示词内容!"},envVars:{title:"环境变量",description:"这些变量会注入到 Bash 工具进程。密钥变量会在存储时加密。",fetchError:"加载环境变量失败",created:"变量已创建",updated:"变量已更新",saveError:"保存变量失败",deleted:"变量已删除",deleteError:"删除变量失败",addButton:"添加变量",noVars:"尚未配置环境变量",addTitle:"添加环境变量",editTitle:"编辑变量",save:"保存",cancel:"取消",name:"名称",nameRequired:"变量名不能为空",nameInvalid:"必须以字母或下划线开头,后续仅可包含字母、数字或下划线",value:"值",valueRequired:"新建变量时必须填写值",valueEditHint:"留空则保留现有值",valuePlaceholder:"输入值",valuePlaceholderEdit:"输入新值或留空",secret:"密钥",secretHint:"密钥变量会加密存储,并在界面中脱敏显示",descriptionField:"说明",descriptionPlaceholder:"可选说明",type:"类型",plain:"普通",descriptionCol:"说明",actions:"操作",deleteConfirm:"确认删除该变量?",yes:"是",no:"否",notSet:"(未设置)",empty:"(空)"},promptsTab:{title:"系统提示增强",mermaidEnhancement:"Mermaid 增强",taskListRules:"共享任务规则",copilotConclusionWithOptionsBeforeFinish:"Copilot 结束前 conclusion_with_options",switchOn:"开",switchOff:"关",enhancementPlaceholder:"为每次系统提示追加全局增强文本。",saveEnhancement:"保存增强",description:"该文本会先追加,然后再拼接已启用的系统增强,最后再发送请求。"},hooksTab:{title:"图像 Hooks",enableImagePreflight:"启用图像预检 Hook",modeLabel:"模式",description:"Placeholder 模式会把图像改写为文本摘要(可能影响依赖真实图像数据的工具)。OCR 目前仅支持 Windows。",loadFailed:"加载 Hooks 设置失败",updateFailed:"更新 Hooks 失败",modeUpdateFailed:"更新 Hook 模式失败",enabled:"已启用图像 Hooks",disabled:"已禁用图像 Hooks",modeUpdated:"图像 Hook 模式已设置为:{{mode}}",mode:{placeholder:"占位符",error:"报错",ocr:"OCR(Windows)",vision:"视觉描述(LLM)"}},keywordMaskingTab:{title:"关键词脱敏",addKeyword:"添加关键词",description:"配置发送到 Copilot API 前需要脱敏的关键词。可使用精确匹配或正则匹配,匹配内容会被替换为 [MASKED]。",empty:"暂无关键词脱敏规则",cancel:"取消",patternPlaceholder:"输入要匹配的模式",examples:"示例",exactMatch:"精确匹配",regexPattern:"正则模式",enabled:"启用",disabled:"禁用",sampleText:"示例文本",sampleTextPlaceholder:"输入示例文本",maskedPreview:"脱敏预览",emptyPattern:"(空)",loadFailed:"加载关键词脱敏配置失败",saveFailed:"保存配置失败",saveSuccess:"关键词脱敏配置已保存",validationFailedPrefix:"校验失败",patternRequired:"匹配模式不能为空",invalidRegexPattern:"无效的正则表达式模式",example:{literalToken:"脱敏字面量 token",githubTokens:"脱敏 GitHub token",awsKeys:"脱敏 AWS Key",emails:"脱敏邮箱地址"}},schedulesTab:{loadFailed:"加载调度失败",loadSessionsFailed:"加载调度会话失败",createFailed:"创建调度失败",updateFailed:"更新调度失败",deleteFailed:"删除调度失败",runNowFailed:"立即执行失败",taskMessageRequired:"启用自动执行时必须填写任务消息",created:"调度已创建",updated:"调度已更新",deleted:"调度已删除",enqueuedRun:"已加入执行队列",loading:"加载中...",yes:"是",no:"否",optional:"(可选)",defaultName:"我的调度",createTitle:"创建调度",listTitle:"调度列表",scheduleSessionsTitle:"调度会话",scheduleRunsTitle:"调度运行历史",noSessionsYet:"暂无会话。",noRunsYet:"暂无运行记录。",loadRunsFailed:"加载调度运行记录失败",editTitle:"编辑调度",nonIntervalReadOnly:"仅间隔触发器支持快速间隔编辑。",columns:{name:"名称",status:"状态",activity:"活动",autoExecute:"自动执行",model:"模型",enabled:"启用",intervalSeconds:"间隔(秒)",nextRun:"下次运行",lastRun:"最近运行",actions:"操作"},triggerTypes:{interval:"间隔",daily:"每天",weekly:"每周",monthly:"每月",cron:"Cron"},misfirePolicyOptions:{runOnce:"执行一次",skip:"跳过",catchUpAll:"补执行全部",catchUpWindow:"补执行窗口"},overlapPolicyOptions:{queueOne:"排队一个",skip:"跳过重叠运行",allow:"允许重叠"},form:{name:"名称",triggerType:"触发类型",intervalSeconds:"间隔秒数",dailyHour:"小时",dailyMinute:"分钟",weeklyWeekdays:"工作日",monthlyDays:"月份天数",monthlyDaysPlaceholder:"例如 1, 15, 28",cronExpr:"Cron 表达式",cronExprPlaceholder:"例如 0 9 * * 1-5",timezone:"时区",timezonePlaceholder:"例如 Asia/Shanghai",startAt:"开始时间",endAt:"结束时间",datetimePlaceholder:"RFC3339 格式,例如 2026-04-05T09:00:00Z",misfirePolicy:"错过策略",overlapPolicy:"重叠策略",catchUpWindowMaxRuns:"补执行最大运行次数",catchUpWindowMaxLatenessSeconds:"补执行最大延迟(秒)",enabled:"启用",taskMessage:"任务消息",taskMessagePlaceholder:"(可选)要执行的任务",model:"模型",modelPlaceholder:"(可选)例如 gpt-4o-mini",modelRequiredIfAuto:"启用自动执行时必填",autoExecute:"自动执行",systemPrompt:"系统提示词",workspacePath:"工作区路径",enhancePrompt:"增强提示"},validation:{nameRequired:"名称不能为空",triggerRequired:"触发配置不能为空",intervalRequired:"间隔不能为空",weekdaysRequired:"至少选择一个工作日",monthDaysRequired:"至少选择一个月份天数",invalidMonthDays:"月份天数必须是 1-31 之间的逗号分隔值",cronRequired:"Cron 表达式不能为空"},actions:{create:"创建",refresh:"刷新",edit:"编辑",runNow:"立即执行",sessions:"会话",runs:"运行记录",delete:"删除",open:"打开",save:"保存"},runHistory:{columns:{status:"状态",scheduledFor:"计划时间",startedAt:"开始时间",completedAt:"完成时间",session:"会话",duration:"耗时",outcome:"结果"}},weekdays:{mon:"周一",tue:"周二",wed:"周三",thu:"周四",fri:"周五",sat:"周六",sun:"周日"},triggerLabels:{interval:"{{type}} · {{seconds}}s",daily:"{{type}} · {{time}}",weekly:"{{type}} · {{weekdays}}",monthly:"{{type}} · {{days}}",cron:"{{type}} · {{expr}}"},statusLabels:{running:"运行中",queued:"排队中",failing:"失败中",disabled:"已禁用",healthy:"正常",idle:"空闲"},statusDetails:{active:"{{count}} 个活跃",pending:"{{count}} 个等待",consecutiveFailures:"连续 {{count}} 次失败",lastRunSucceeded:"上次运行成功"},activityLabels:{queued:"排队: {{count}}",running:"运行: {{count}}",ok:"成功: {{count}}",fail:"失败: {{count}}"}},sessionsTab:{currentSessionTitle:"当前会话",id:"ID",kind:"类型",clearMessages:"清空消息",clearMessagesTitle:"清空会话消息",clearMessagesContent:"将清空当前会话的消息/附件,但保留会话条目。",clear:"清空",cancel:"取消",sessionCleared:"会话已清空",noActiveSession:"当前没有活跃会话。",bulkCleanupTitle:"批量清理",keepPinned:"保留置顶",deleteAll:"删除全部",deleteAllTitle:"删除所有会话",deleteAllKeepPinned:"删除所有会话(保留置顶)。",deleteAllIncludePinned:"删除所有会话(包含置顶)。",deleteEmpty:"删除空会话",deleteEmptyTitle:"删除空会话",deleteEmptyKeepPinned:"删除空会话(保留置顶)。",deleteEmptyIncludePinned:"删除空会话(包含置顶)。",deleteChildren:"删除子会话",deleteChildrenTitle:"删除子会话",deleteChildrenKeepPinned:"删除所有子会话(保留置顶)。",deleteChildrenIncludePinned:"删除所有子会话(包含置顶)。",delete:"删除",cleanupComplete:"清理完成",devResetTitle:"开发重置",devResetDescription:"会话存储绿地重置(删除 sessions/ 并重置 sessions.json)。",devResetAction:"开发重置会话",devResetConfirmTitle:"重置会话存储(开发)",devResetConfirmContent:"将删除所有会话(包含置顶/子会话)并重置会话索引。刷新后会创建一个新的空会话。",reset:"重置",devResetDone:"会话存储已重置"},workflowsTab:{title:"工作流",description:"工作流会以 Markdown 文件存储在 `~/.bamboo/workflows`。可在聊天中使用 `/name` 插入工作流。",loadFailed:"加载工作流失败",loadContentFailed:"加载工作流内容失败",invalidName:"工作流名称不合法",nameAlreadyExists:"同名工作流已存在",saved:"工作流已保存",saveFailed:"保存工作流失败",deleted:"工作流已删除",deleteFailed:"删除工作流失败",refresh:"刷新",newWorkflow:"新建工作流",save:"保存",empty:"暂无工作流",namePlaceholder:"工作流名称",contentPlaceholder:`# 工作流标题
2
+
3
+ 在这里描述工作流步骤。`},providerTab:{title:"LLM 提供商配置",description:"配置你偏好的 LLM 提供商。点击“保存并应用配置”后会保存并生效。",currentProvider:"当前提供商",activeProvider:"当前激活的 LLM 提供商",selectProviderRequired:"请选择提供商",saveAndApply:"保存并应用配置",loadConfigFailed:"加载提供商配置失败",checkStatusFailed:"检查状态失败",startCopilotAuthFailed:"启动 Copilot 认证失败",copilotAuthSuccess:"Copilot 认证成功!",providerReloaded:"提供商已使用新认证重新加载。",completeAuthFailed:"完成认证失败,请重试。",userCodeCopied:"用户代码已复制到剪贴板!",copyCodeFailedPrefix:"复制失败,请手动复制:",logoutSuccess:"已退出 Copilot",logoutFailed:"退出 Copilot 失败",unknownError:"未知错误",invalidConfig:"配置无效",invalidConfigPrefix:"配置无效",invalidRequestOverridesJson:"{{provider}} 的 request_overrides JSON 无效:{{error}}",fetchModelsCopilotFailed:"获取模型失败,请先完成 Copilot 认证后重试。",fetchModelsFailed:"获取模型失败,请检查 API Key 与 Base URL。",noModelsReturned:"未返回模型,请先完成 Copilot 认证后再获取。",foundModels:"已找到 {{count}} 个可用模型",fetchModelsErrorPrefix:"获取模型失败",saveConfigSuccess:"配置保存成功",saveConfigFailed:"保存配置失败",saveConfigErrorPrefix:"保存配置失败",applyConfigSuccess:"配置应用成功,新对话将使用最新配置。",applyConfigFailed:"应用配置失败",applyConfigErrorPrefix:"应用配置失败",modelUpdated:"模型更新成功",updateModelFailed:"更新模型失败",updateModelErrorPrefix:"更新模型失败",fetchingModels:"正在获取模型...",refreshModelsFrom:"从 {{source}} 刷新可用模型",fetchModelsFrom:"从 {{source}} 获取可用模型",saveModelChangeFailed:"保存模型变更失败",fetchModelsFailedShort:"获取模型失败",retry:"重试",openaiConfigTitle:"OpenAI 配置",openaiConfigDescription:"输入 OpenAI API Key 以使用 GPT 模型。你也可以指定自定义 Base URL。",openaiApiKey:"OpenAI API Key",openaiApiKeyRequired:"请输入 OpenAI API Key",openaiApiKeyPlaceholder:"sk-...",baseUrlOptional:"Base URL(可选)",openaiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiBaseUrlHelp:"留空将使用默认 OpenAI 接口地址;如有需要请包含完整路径(例如 /v1)。",defaultModel:"默认模型",modelPreferences:"模型偏好",fastModel:"快速模型(可选)",fastModelHelp:"用于标题生成、Mermaid 修复、摘要等轻量任务的低成本/快速模型。未设置时使用默认模型。",subAgentModel:"Sub Agent 模型(可选)",subAgentModelHelp:"新建 Sub Agent 时默认使用的模型。未设置时使用快速模型,再回退到默认模型。",visionModel:"视觉模型(可选)",visionModelHelp:"用于图片理解的视觉模型。当 hooks.image_fallback.mode 设为 'vision' 时,此模型会将图片描述为文本,让纯文本模型也能理解图片内容。未设置时使用默认模型。",sameAsDefault:"与默认模型相同",selectModelRequired:"请选择模型",selectModel:"选择模型",responsesOnlyModelsOptional:"仅 Responses 模型(可选)",responsesOnlyModelsPlaceholder:'例如 "gpt-5.3-codex", "gpt-5*"',responsesOnlyHelp1:"部分模型仅支持 OpenAI Responses API(不支持 chat/completions)。可在此添加模型 ID 强制 Bamboo 使用",responsesOnlyHelp2:"支持精确匹配(如 gpt-5.3-codex)和后缀 * 的前缀匹配(如 gpt-5*)。",anthropicConfigTitle:"Anthropic 配置",anthropicConfigDescription:"输入 Anthropic API Key 以使用 Claude 模型。",anthropicApiKey:"Anthropic API Key",anthropicApiKeyRequired:"请输入 Anthropic API Key",anthropicApiKeyPlaceholder:"sk-ant-...",anthropicBaseUrlPlaceholder:"https://api.anthropic.com/v1",anthropicBaseUrlHelp:"留空将使用默认 Anthropic 接口地址;如有需要请包含完整路径(例如 /v1)。",maxTokensOptional:"最大 Tokens(可选)",maxTokensHelp:"生成时允许的最大 token 数",maxTokensPlaceholder:"4096",geminiConfigTitle:"Google Gemini 配置",geminiConfigDescription:"输入 Google AI API Key 以使用 Gemini 模型。",geminiApiKey:"Gemini API Key",geminiApiKeyRequired:"请输入 Gemini API Key",geminiApiKeyPlaceholder:"AIza...",geminiBaseUrlPlaceholder:"https://generativelanguage.googleapis.com/v1beta",geminiBaseUrlHelp:"留空将使用默认 Google AI 接口地址;必要时可填写完整路径。",copilotConfigTitle:"GitHub Copilot 配置",copilotConfigDescription:"GitHub Copilot 使用 OAuth 认证,无需 API Key。请确保账号有有效订阅。",authStatusTitle:"认证状态",authenticated:"已认证",notAuthenticated:"未认证",logoutCopilot:"退出 Copilot",authenticateCopilot:"认证 Copilot",refreshStatus:"刷新状态",headlessAuth:"无头认证",headlessAuthHelp:"在控制台输出登录链接,而不是自动打开浏览器",noModelsLoaded:"尚未加载模型,点击“从 backend 获取可用模型”。",authFirstThenFetch:"请先完成 Copilot 认证,再获取模型。",copilotUsageTitle:"使用 GitHub Copilot:",copilotUsageStep1:"确保你已开通有效的 GitHub Copilot 订阅",copilotUsageStep2:"点击“认证 Copilot”启动设备码流程",copilotUsageStep3:"按终端提示完成认证",copilotAuthModalTitle:"Copilot 认证",cancel:"取消",completedAuthorization:"我已完成授权",browserOpened:"浏览器已自动打开",authStep1:"浏览器中应已打开 GitHub 页面",authStep2:"复制下方代码并粘贴到 GitHub 页面",authStep3:"在 GitHub 点击“Continue”完成授权",visitUrl:"1. 打开该 URL:",enterCode:"2. 输入此代码:",copied:"已复制!",copyCode:"复制代码",afterContinueHint:"在 GitHub 点击 Continue 后,请点击下方“我已完成授权”。",providerNames:{openai:"OpenAI",anthropic:"Anthropic",gemini:"Gemini",copilot:"Copilot"},providerModelRef:"提供商模型目录",providerModelRefHelp:"使用后端提供的模型目录进行模型选择。启用后,模型选择器将显示提供商目录中的可用模型,而非手动配置的模型。",catalogModeInfo:"模型来自提供商目录。",fetchAllModels:"获取所有模型",fetchingAllModels:"正在获取模型...",fetchModelsSuccess:"成功获取 {{count}} 个提供商的模型",fetchModelsPartialSuccess:"已获取 {{success}}/{{total}} 个提供商的模型",providerNotConfigured:"未配置",capabilityVision:"视觉",capabilityTools:"工具",capabilityReasoning:"推理",refreshCatalog:"刷新目录",noCatalogModels:"未发现模型,点击“获取所有模型”加载。",reasoningEffortDefault:"默认",reasoningEffortOptional:"推理强度(可选)",reasoningEffortHelp:"通过此提供商发送请求的默认推理强度。",activeProviderReasoningEffort:"当前提供商推理强度",reasoningEffortUpdated:"推理强度已更新",updateReasoningEffortErrorPrefix:"更新推理强度失败",updateReasoningEffortFailed:"更新推理强度失败",advancedRequestOverrides:"高级请求覆盖 (JSON)",advancedRequestOverridesHelp:"自定义提供商请求头/请求体补丁规则。",envVarInjection:"环境变量注入:",bodhiApiKey:"Bodhi API 密钥",bodhiBaseUrl:"基础 URL",targetProvider:"目标提供商",bodhiBaseUrlExtra:"Bodhi 服务端端点地址",targetProviderExtra:"通过 Bodhi 路由到的上游提供商",apiKeyRequired:"请输入 API 密钥",bodhiApiKeyPlaceholder:"bhi_sk_...",bodhiBaseUrlPlaceholder:"http://localhost:8080",targetProviderPlaceholder:"openai"},mcpTab:{status:{connecting:"连接中",ready:"就绪",degraded:"降级",stopped:"已停止",error:"错误"},statusGuideTitle:"状态说明:",statusHelp:{connecting:"服务器正在启动或重连中",ready:"服务器已连接,工具可正常使用",degraded:"服务器部分可用,部分工具可能失败",stopped:"服务器未运行",error:"服务器启动失败或运行时发生错误"},statusLastError:"最近错误:{{error}}",serverDeleted:"MCP 服务器已删除",deleteServerFailed:"删除 MCP 服务器失败",connectedTo:"已连接到 {{name}}",connectServerFailed:"连接 MCP 服务器失败",disconnected:"已断开 {{name}}",disconnectServerFailed:"断开 MCP 服务器失败",toolsRefreshedFor:"{{name}} 的工具已刷新",refreshToolsFailed:"刷新工具失败",statusRefreshed:"MCP 状态已刷新",refreshStatusFailed:"刷新 MCP 状态失败",noServerForEditing:"没有可编辑的服务器",savedServer:"已保存 {{name}}",addedServer:"已添加 {{name}}",saveServerFailed:"保存 MCP 服务器失败",copiedConfig:"MCP 配置已复制到剪贴板",clipboardUnavailable:"剪贴板不可用,已在弹窗中显示导出内容。",invalidJsonPrefix:"JSON 无效",unknownError:"未知错误",jsonMustBeObject:"JSON 必须是对象",missingMcpServers:'缺少 mcpServers。请粘贴完整 Claude Desktop 风格配置:{ "mcpServers": { ... } }',importSummary:"已导入 {{count}} 个服务器(新增 {{added}},更新 {{updated}},删除 {{removed}})。启动失败 {{failed}} 个。",importStartFailures:"部分服务器未成功启动,配置已保存,请在服务器列表查看错误。",importFailed:"导入 MCP 服务器失败",overviewTitle:"MCP 概览",overviewDescription:"配置外部 MCP 服务器并查看已注册的工具别名。",totalServers:"服务器总数:{{count}}",totalTools:"工具总数:{{count}}",serversTitle:"MCP 服务器",addServer:"添加服务器",refreshAll:"全部刷新",export:"导出",import:"导入",importModalTitle:"导入 MCP 服务器",importHint:"粘贴 Claude Desktop 风格配置片段,例如:",importModeMerge:"合并(Upsert)",importModeReplace:"替换(删除其余)",replaceWarning:"替换模式会删除不在导入 mcpServers 中的现有 MCP 服务器。"},mcpServerTable:{columns:{name:"名称",transportType:"传输类型",status:"状态",toolCount:"工具数",actions:"操作"},transportOptions:{sse:"SSE",stdio:"Stdio"},deleteTitle:"删除 MCP 服务器",deleteDescription:"确认删除服务器“{{name}}”?",empty:"尚未配置 MCP 服务器",actions:{edit:"编辑",delete:"删除",disconnect:"断开",connect:"连接",refreshTools:"刷新工具"}},mcpToolList:{title:"MCP 工具",selectServerHint:"请选择一个服务器以查看其 MCP 工具",empty:"该服务器没有可用工具",noDescription:"暂无描述",aliasMapping:"别名映射",parametersSchema:"参数 Schema"},mcpServerForm:{jsonMustBeObject:"JSON 必须是对象",detectedBulkConfig:"检测到 mcpServers(批量配置)。批量导入请使用 MCP 标签页中的“导入”按钮,或在这里粘贴单个服务器配置。",missingIdField:"缺少或无效的 id 字段",missingTransportField:"缺少或无效的 transport 字段",missingTransportInfo:"缺少传输信息。应包含 transport(Bodhi 格式)或 command/url(主流 MCP 格式)。",invalidJson:"JSON 无效:{{message}}",unknownError:"未知错误",editTitle:"编辑 MCP 服务器",addTitle:"添加 MCP 服务器",save:"保存",modeForm:"表单",modeJson:"JSON",jsonError:"JSON 错误",serverId:"服务器 ID",serverIdRequired:"服务器 ID 不能为空",serverIdPatternError:"仅支持字母、数字、下划线和连字符",displayName:"显示名称",enabled:"启用",enabledHelp:"禁用的服务器会保留在配置中,但不会自动启动。",transportType:"传输类型",transportTypeRequired:"传输类型不能为空",transportOptions:{stdio:"Stdio",sse:"SSE"},command:"命令",commandRequired:"命令不能为空",arguments:"参数",argumentsPlaceholder:"输入参数后按 Enter 添加",envVars:"环境变量",addEnv:"添加环境变量",keyRequired:"键不能为空",sseUrl:"SSE URL",sseUrlRequired:"SSE URL 不能为空",validUrlRequired:"请输入有效 URL",headers:"请求头",addHeader:"添加请求头",headerNameRequired:"请求头名称不能为空"},metricsCards:{totalSessions:"会话总数",chatTokens:"聊天 Tokens",totalToolCalls:"工具调用总数",tokensSaved:"节约 Tokens",toolContextSavedTokens:"工具上下文节约 Tokens",compressionEvents:"压缩次数",avgSessionDuration:"平均会话时长"},forwardMetricsCards:{totalForwardRequests:"Forward 请求总数",successRate:"成功率",forwardTokens:"Forward Tokens",avgResponseTime:"平均响应时间"},unifiedMetricsCards:{totalRequests:"请求总数",totalTokens:"Tokens 总数",successRate:"成功率",avgResponseTime:"平均响应时间",chatSessions:"聊天会话",chatTokens:"聊天 Tokens",toolCalls:"工具调用",avgSessionDuration:"平均会话时长",tokensSaved:"节约 Tokens",compressionEvents:"压缩次数",totalMemories:"记忆总数",staleCandidates:"陈旧候选项",memoryProjects:"记忆项目数",lastReindex:"上次重建索引",forwardRequests:"Forward 请求",forwardTokens:"Forward Tokens",successful:"成功",failed:"失败"},metricsTable:{session:{columns:{session:"会话",model:"模型",status:"状态",started:"开始时间",duration:"耗时",tokens:"Tokens",toolCalls:"工具调用",messages:"消息数",action:"操作"},view:"查看"},forward:{columns:{id:"ID",endpoint:"端点",model:"模型",type:"类型",status:"状态",tokens:"Tokens",duration:"耗时",started:"开始时间",error:"错误"},typeStream:"流式",typeSync:"同步",totalRequests:"{{total}} 条请求",empty:"当前范围内暂无 forward 请求记录"}},metricsDashboard:{roundColumns:{round:"轮次",status:"状态",duration:"耗时",tokens:"Tokens",toolCalls:"工具调用"},compactStats:{combinedTokens:"合并 Tokens",chatTokens:"聊天 Tokens",forwardTokens:"Forward Tokens",avgTokensPerSession:"平均 Tokens / 会话",savedTokens:"节约 Tokens",toolContextSavedTokens:"工具上下文节约 Tokens",nonToolCompressionSavedTokens:"非工具压缩节约 Tokens",savedTokenRatio:"节约 / 聊天 Tokens",toolSavedShare:"工具节约占比",promptCachedToolOutputs:"Prompt 缓存工具输出数",compressionEvents:"压缩事件数",estimatedTimeSaved:"预估节省时长",estimatedEfficiencyLift:"预估效率提升",estimatedSpeedMultiplier:"预估速度倍率",estimatedSavedWorkdays:"预估节省工作日",avgRoundsPerSession:"平均轮次 / 会话",toolCallsPerSession:"工具调用 / 会话",activeSessionRate:"活跃会话占比",avgTokensPerForward:"平均 Tokens / Forward",forwardErrorRate:"Forward 错误率",streamingRatio:"流式占比",p95ForwardLatency:"P95 Forward 延迟",modelCoverage:"模型覆盖数",endpointCoverage:"端点覆盖数"},multiplierSuffix:"x",filtersTitle:"筛选",refresh:"刷新",startDate:"开始日期",endDate:"结束日期",model:"模型",daysOption:"{{value}} 天",granularity:{daily:"按天",weekly:"按周",monthly:"按月"},dashboardTitle:"仪表盘",tabs:{overview:"概览",analysis:"分析",records:"记录",chat:"聊天",skillsAndMcp:"技能 & MCP",forward:"Forward",memory:"记忆"},derivedMetricsTitle:"衍生指标(紧凑)",derivedMetricsSubtitle:"更多维度,同时保持页面紧凑",overviewSections:{scaleTitle:"规模与活跃度",scaleSubtitle:"集中查看 Chat、Forward、技能与记忆的总体使用规模。",efficiencyTitle:"压缩收益与效率优势",efficiencySubtitle:"重点展示上下文压缩,尤其是工具密集型工作流带来的真实节约。"},efficiencyHint:"这些指标优先使用真实运行统计:总节约 Tokens、工具上下文压缩节约、非工具压缩节约、压缩事件数,以及会话 / Forward 的平均负载与质量指标。",toolUsageTitle:"工具使用频次",noToolUsage:"当前范围内没有工具调用记录。",calls:"调用次数",activityHeatmapTitle:"每日活跃热力图",noActivity:"当前范围内没有活跃数据。",sessionsCount:"{{count}} 个会话",tokensAmount:"{{value}} tokens",sessionsTabLabel:"会话({{count}})",chatSessionsLabel:"聊天会话({{count}})",sessionsHint:"点击会话可查看完整轮次详情",forwardTabLabel:"Forward 请求({{count}})",detailedMetricsTitle:"详细指标",sessionMetricsTitle:"会话指标",loadingSessionDetails:"正在加载会话详情...",sessionDetail:{sessionId:"会话 ID",model:"模型",status:"状态",duration:"耗时",messages:"消息数",totalTokens:"总 Tokens",toolCalls:"工具调用"},noDetail:"暂无详情。",skillsAndMcp:{cards:{skillLoadCalls:"技能加载",uniqueSkills:"独立技能",mcpCalls:"MCP 调用",uniqueMcpServers:"MCP 服务器",uniqueMcpTools:"MCP 工具",coreToolCalls:"核心工具调用"},mix:{coreTools:"核心工具",skillLoads:"技能加载",mcpCalls:"MCP 调用"},meta:{uniqueTools:"{{count}} 个工具"},usageMixTitle:"使用构成",usageMixSubtitle:"在同一视图中对比核心工具、技能加载和 MCP 调用。",noUsageMix:"当前范围内暂无使用数据。",topSkillsTitle:"热门技能",topSkillsSubtitle:"统计匹配会话中的 load_skill 调用。",noSkills:"当前范围内未加载任何技能。",topMcpServersTitle:"热门 MCP 服务器",topMcpServersSubtitle:"服务器级别的 MCP 调用分布。",noMcpServers:"当前范围内无 MCP 活动记录。",topMcpToolsTitle:"热门 MCP 工具",topMcpToolsSubtitle:"调用频次最高的 MCP 工具别名。",noMcpTools:"当前范围内未调用任何 MCP 工具。",topCoreToolsTitle:"热门核心工具",topCoreToolsSubtitle:"标准化后的内置及服务器工具使用排名。",noCoreTools:"当前范围内未调用任何核心工具。"},forward:{performanceTitle:"Forward 性能",performance:{p95Latency:"P95 延迟",errorRate:"错误率",streamingRatio:"流式占比",endpointCoverage:"端点覆盖数"}},memory:{breakdownTitle:"记忆分布",byType:"按类型",byStatus:"按状态",byScope:"按范围",lastDream:"上次 Dream",lastReindex:"上次重建索引"}},charts:{tokenUsageOverTime:"Token 使用趋势",unifiedTokenUsageOverTime:"Token 使用趋势(Chat + Forward)",memoryTrendTitle:"记忆趋势",noTokenUsage:"暂无 token 使用数据",noMemoryTrend:"暂无记忆趋势数据",tokenUsageDescription:"按日期/周期展示 Prompt、Completion 与总 Tokens。",unifiedTokenUsageDescription:"按时间展示 Chat 与 Forward 的合并 token 使用。",memoryTrendDescription:"展示记忆新增、更新以及累计总量的时间变化。",total:"总计",prompt:"Prompt",completion:"Completion",chat:"Chat",forward:"Forward",totalMemories:"记忆总量",createdMemories:"新增记忆",updatedMemories:"更新记忆",modelDistribution:"模型分布",noModelMetrics:"暂无模型指标数据",modelDistributionDescription:"按模型展示总 token 消耗占比。",endpointDistribution:"端点分布",noForwardMetrics:"当前范围内暂无 forward 指标数据。"}},components:{markdown:{codeCopiedSuccess:"代码已复制到剪贴板",copyFailed:"复制失败",copyCodeAriaLabel:"复制代码"},jsonSchema:{field:"字段",type:"类型",required:"必填",yes:"是",no:"否",default:"默认值",description:"描述",noProperties:"架构中无属性"},workflowResult:{userWorkflow:"用户工作流",waitingForResult:"等待工作流结果...",executionFailed:"工作流执行失败",retryWorkflow:"重试工作流",copyParameters:"复制参数",copyResult:"复制结果",expandResult:"展开结果",collapseResult:"收起结果"},toolResult:{waiting:"等待中",waitingForResult:"等待结果...",executionFailed:"工具执行失败",copyResult:"复制结果",checkpoint:"检查点",checkpointNone:"无",diffTruncated:"差异内容过长,已截断显示",structuredToolResultHint:"工具结果 · {{tool}}",memory:{action:{inspect:"检查",rebuild:"重建"},totalMemories:"{{count}} 条记忆",staleCandidates:"候选陈旧项:{{count}}",coverage:"覆盖情况",viewsLabel:"视图:",indexesLabel:"索引:",stateFilesLabel:"状态文件:",lastReindexLabel:"上次重建索引:",lastDreamLabel:"上次梦境整理:",viewFiles:"视图文件",indexFiles:"索引文件",stateFiles:"状态文件",topicPaths:"主题路径",recentMemories:"最近记忆"}},toolCall:{liveOutput:"实时输出",keyParameters:"关键参数",fullParameters:"完整参数",copyParameters:"复制参数"},toolSteps:{title:"工具运行",running:"运行中…",viewFullOutput:"查看完整输出",details:"详情",preview:"预览",parameters:"参数",result:"结果",noResult:"暂无结果",intent:"意图",keyParameters:"关键参数",statusError:"错误",statusFinish:"完成",statusProcess:"执行中",statusWait:"等待"},plan:{executionPlan:"执行计划",goal:"目标",steps:"步骤",stepTitle:"步骤 {{number}}",reason:"原因",estimated:"预计",tools:"工具",prerequisites:"前置条件",potentialRisks:"潜在风险({{count}})",totalEstimatedTime:"总预计时长",feedbackPlaceholder:"告诉智能体你希望如何调整...",sendFeedback:"发送反馈",refinePlan:"优化计划",executePlan:"执行计划"},question:{agentQuestion:"智能体提问",context:"上下文",chooseOption:"请选择一个选项",recommended:"推荐",customAnswerHint:"没有合适选项?可输入自定义回答。",customAnswerPlaceholder:"输入你的自定义回答...",submitAnswer:"提交回答"},questionDialog:{selectOptionWarning:"提交前请先选择一个选项。",responseSubmitted:"回答已提交",responseSubmittedContinue:"回答已提交,AI 将继续处理",submitFailed:"提交回答失败",noModelConfigured:"未配置模型",customAnswerTip:"自定义回答",otherTypeBelow:"其他(在下方输入)",confirm:"确认"},skillManager:{title:"技能",refresh:"刷新",skillsRefreshed:"技能已刷新",lastUpdated:"上次更新:{{value}}",justNow:"刚刚",secondsAgo:"{{count}} 秒前",minutesAgo:"{{count}} 分钟前",searchPlaceholder:"搜索技能",readOnlyHint:"技能文件本身仍是只读的,但你可以控制它们是否参与 prompt 使用。",disabledHint:"这里会显示全部技能。被禁用的技能不会进入系统提示中的 skill context,且运行时会被禁止 load_skill。",disabledTag:"已禁用",switchEnabled:"开",switchDisabled:"关",skillStateSaved:"技能状态已保存",saveFailed:"保存技能状态失败",noSkillsFound:"未找到技能",noMatch:"没有匹配的技能",loadFailed:"加载技能失败",getFailed:"获取技能失败"},skillSelector:{placeholder:"选择技能",disabledSkillsHint:"有 {{count}} 个先前选中的技能现已被全局禁用,并已从选择中移除。"},imageGrid:{preview:"预览",ocr:"OCR"},todoList:{title:"任务列表",evaluating:"评估中",pin:"固定",unpin:"取消固定",llmEvaluation:"LLM 评估",tools:"个工具",dependsOn:"依赖:{{deps}}",dependencies:"项依赖",status:{pending:"待处理",inProgress:"进行中",completed:"已完成",blocked:"阻塞",skipped:"已跳过",failed:"失败"},listStatus:{active:"进行中",completed:"已完成",abandoned:"已放弃"},percentComplete:"{{percent}}% 已完成",progressLabel:"{{completed}} / {{total}} 个任务已完成",currentLabel:"当前:{{description}}"},tokenUsage:{title:"Token 使用",contextWindow:"上下文窗口",summary:"汇总",system:"系统",messages:"消息",tokens:"tokens",usedPercent:"已使用 {{value}}%"},approval:{workflow:"工作流",executionRequest:"执行请求",aiWantsExecute:"AI 想执行以下操作"},toolSession:{title:"工具会话",running:"运行中",done:"完成",error:"错误",completedOnly:"已完成 {{completed}} 项",completedWithErrors:"已完成 {{completed}} 项(含错误)",completedProgress:"已完成 {{completed}} / {{total}}",noPersistedMessage:"无持久化输出",deleteMessage:"删除工具会话"},mermaid:{loadingDiagram:"正在加载图表...",diagramError:"Mermaid 图表错误",errorTitlePrefix:"错误",checkConsoleHint:"请检查 Mermaid 语法,或打开控制台查看详情。",fixMermaid:"修复 Mermaid",renderingDiagram:"正在渲染图表...",exportSvg:"导出 SVG",exportFailed:"导出图表失败",downloadChartAriaLabel:"下载图表"}},validation:{workspaceRequired:"请输入工作区路径",invalidPath:"无效路径"},error:{saveWorkspaceFailed:"保存工作区路径失败",readFolderFailed:"无法读取文件夹",copyPromptFailed:"复制提示词内容失败"},success:{promptCopied:"已复制「{{name}}」提示词"}}};export{e as zhCnTranslation};
package/dist/index.html CHANGED
@@ -5,11 +5,11 @@
5
5
  <link rel="icon" type="image/png" href="./favicon.png" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Bodhi</title>
8
- <script type="module" crossorigin src="./assets/main-C9Xbnb0p.js"></script>
8
+ <script type="module" crossorigin src="./assets/main-BEVjNwcv.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="./assets/vendor-i18n-BNURlJ23.js">
10
- <link rel="modulepreload" crossorigin href="./assets/vendor-antd-DODjfilb.js">
11
- <link rel="modulepreload" crossorigin href="./assets/vendor-mermaid-De-Yacw-.js">
12
- <link rel="modulepreload" crossorigin href="./assets/vendor-markdown-DzaXAW9Q.js">
10
+ <link rel="modulepreload" crossorigin href="./assets/vendor-antd-C8lKwvI6.js">
11
+ <link rel="modulepreload" crossorigin href="./assets/vendor-mermaid-C1Gk9PtT.js">
12
+ <link rel="modulepreload" crossorigin href="./assets/vendor-markdown-DZuK0SxV.js">
13
13
  <link rel="stylesheet" crossorigin href="./assets/main-B6snAd4S.css">
14
14
  </head>
15
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bigduu/lotus",
3
3
  "private": false,
4
- "version": "2026.5.12",
4
+ "version": "2026.5.13",
5
5
  "description": "Standalone Lotus frontend assets for Bodhi shell and web runtime.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -107,7 +107,7 @@
107
107
  },
108
108
  "lint-staged": {
109
109
  "src/**/*.{ts,tsx}": [
110
- "eslint --fix --max-warnings 0",
110
+ "eslint --fix --max-warnings 0 --no-warn-ignored",
111
111
  "prettier --write"
112
112
  ],
113
113
  "src/**/*.{css,json,md}": [